code
stringlengths
5
1.01M
repo_name
stringlengths
5
84
path
stringlengths
4
311
language
stringclasses
30 values
license
stringclasses
15 values
size
int64
5
1.01M
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
// Copyright 2004-present Facebook. All Rights Reserved. #include <vector> #include <string> #include <osquery/core.h> #include <osquery/logger.h> #include <osquery/tables.h> #include "osquery/events/linux/udev.h" namespace osquery { namespace tables { /** * @brief Track udev events in Linux */ class HardwareEventSubscriber : public EventSubscriber { DECLARE_EVENTSUBSCRIBER(HardwareEventSubscriber, UdevEventPublisher); DECLARE_CALLBACK(Callback, UdevEventContext); public: void init(); Status Callback(const UdevEventContextRef ec); }; REGISTER_EVENTSUBSCRIBER(HardwareEventSubscriber); void HardwareEventSubscriber::init() { auto subscription = UdevEventPublisher::createSubscriptionContext(); subscription->action = UDEV_EVENT_ACTION_ALL; BIND_CALLBACK(Callback, subscription); } Status HardwareEventSubscriber::Callback(const UdevEventContextRef ec) { Row r; if (ec->devtype.empty()) { // Superfluous hardware event. return Status(0, "Missing type."); } else if (ec->devnode.empty() && ec->driver.empty()) { return Status(0, "Missing node and driver."); } struct udev_device *device = ec->device; r["action"] = ec->action_string; r["path"] = ec->devnode; r["type"] = ec->devtype; r["driver"] = ec->driver; // UDEV properties. r["model"] = UdevEventPublisher::getValue(device, "ID_MODEL_FROM_DATABASE"); if (r["path"].empty() && r["model"].empty()) { // Don't emit mising path/model combos. return Status(0, "Missing path and model."); } r["model_id"] = INTEGER(UdevEventPublisher::getValue(device, "ID_MODEL_ID")); r["vendor"] = UdevEventPublisher::getValue(device, "ID_VENDOR_FROM_DATABASE"); r["vendor_id"] = INTEGER(UdevEventPublisher::getValue(device, "ID_VENDOR_ID")); r["serial"] = INTEGER(UdevEventPublisher::getValue(device, "ID_SERIAL_SHORT")); r["revision"] = INTEGER(UdevEventPublisher::getValue(device, "ID_REVISION")); r["time"] = INTEGER(ec->time); add(r, ec->time); return Status(0, "OK"); } } }
Anubisss/osquery
osquery/tables/events/linux/hardware_events.cpp
C++
bsd-3-clause
2,025
[ 30522, 1013, 1013, 9385, 2432, 1011, 2556, 9130, 1012, 2035, 30524, 1013, 8833, 4590, 1012, 1044, 1028, 1001, 2421, 1026, 9808, 4226, 2854, 1013, 7251, 1012, 1044, 1028, 1001, 2421, 1000, 9808, 4226, 2854, 1013, 2824, 1013, 11603, 1013, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// Copyright 2005 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry.listener; import java.util.Collection; import org.apache.tapestry.IActionListener; /** * @author Howard M. Lewis Ship */ public interface ListenerMap { /** * Gets a listener for the given name (which is both a property name and a method name). The * listener is created as needed, but is also cached for later use. The returned object * implements the {@link org.apache.tapestry.IActionListener}. * * @param name * the name of the method to invoke (the most appropriate method will be selected if * there are multiple overloadings of the same method name) * @returns an object implementing {@link IActionListener}. * @throws ApplicationRuntimeException * if the listener can not be created. */ public IActionListener getListener(String name); /** * Returns an unmodifiable collection of the names of the listeners implemented by the target * class. * * @since 1.0.6 */ public Collection getListenerNames(); /** * Returns true if this ListenerMapImpl can provide a listener with the given name. * * @since 2.2 */ public boolean canProvideListener(String name); }
apache/tapestry4
framework/src/java/org/apache/tapestry/listener/ListenerMap.java
Java
apache-2.0
1,865
[ 30522, 1013, 1013, 9385, 2384, 1996, 15895, 4007, 3192, 1013, 1013, 1013, 1013, 7000, 2104, 1996, 15895, 6105, 1010, 2544, 1016, 1012, 1014, 1006, 1996, 1000, 6105, 1000, 1007, 1025, 1013, 1013, 2017, 2089, 2025, 2224, 2023, 5371, 3272, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#ifndef UI_H_ #define UI_H_ #include "engine.h" void UI_buildui(IBusHandwriteEngine * engine); void UI_show_ui(IBusHandwriteEngine * engine); void UI_hide_ui(IBusHandwriteEngine * engine); void UI_cancelui(IBusHandwriteEngine* engine); //Cancel #endif /* UI_H_ */
microcai/ibus-handwrite
src/UI.h
C
gpl-3.0
270
[ 30522, 1001, 2065, 13629, 2546, 21318, 1035, 1044, 1035, 1001, 9375, 21318, 1035, 1044, 1035, 1001, 2421, 1000, 3194, 1012, 1044, 1000, 11675, 21318, 1035, 3857, 10179, 1006, 21307, 20668, 5685, 26373, 13159, 3170, 1008, 3194, 1007, 1025, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
require 'rubygems' require 'test/unit' require 'flexmock/test_unit' require 'action_view/test_case' require 'action_view/helpers' require File.expand_path(File.dirname(__FILE__) + '/../lib/i18n_multi_locales_form')
ZenCocoon/i18n_multi_locales_form
test/test_helper.rb
Ruby
mit
217
[ 30522, 5478, 1005, 10090, 3351, 5244, 1005, 5478, 1005, 3231, 1013, 3131, 1005, 5478, 1005, 23951, 5302, 3600, 30524, 5371, 1012, 16101, 18442, 1006, 1035, 1035, 5371, 1035, 1035, 1007, 1009, 1005, 1013, 1012, 1012, 1013, 5622, 2497, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# RetrieverForReddit This is a service that will return certain data for the top posting on any five subreddits on Reddit.com for the past 24 hours. The data elements returned are: 1.) Subreddit name 2.) Post title 3.) Post author 4.) Post created time 5.) Upvote count 6.) Downvote count 7.) Content URL Usage: URL: localhost:8080/getPosts?listOfSubreddits=subreddit1, subreddit2 Requirements for listOfSubreddits: 1.) The field should be entered as a comma delineated String. 2.) At least one subreddit is required. 3.) Service will process up to 5, any additional will be ignored. 4.) Subreddit names can be with or without the 'r/' prefix. Future enhancements: 1.) Utilize unit testing 2.) Provide more descriptive error handling 3.) Create application level ExecutorService - complete v. 1.1 4.) Offer searching for top post of other than 24 hours.
kcd1992/RetrieverForReddit
README.md
Markdown
mit
946
[ 30522, 1001, 12850, 12881, 2953, 5596, 23194, 2023, 2003, 1037, 2326, 2008, 2097, 2709, 3056, 2951, 2005, 1996, 2327, 14739, 2006, 2151, 2274, 4942, 5596, 23194, 2015, 2006, 2417, 23194, 1012, 4012, 2005, 1996, 2627, 2484, 2847, 1012, 1996,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package com.ek.mobileapp.model; import java.io.Serializable; public abstract class Entity implements Serializable { protected int id; public int getId() { return id; } protected String cacheKey; public String getCacheKey() { return cacheKey; } public void setCacheKey(String cacheKey) { this.cacheKey = cacheKey; } }
yangjiandong/MobileBase.G
MobileBase/src/main/java/com/ek/mobileapp/model/Entity.java
Java
apache-2.0
380
[ 30522, 7427, 4012, 1012, 23969, 1012, 4684, 29098, 1012, 2944, 1025, 12324, 9262, 1012, 22834, 1012, 7642, 21335, 3468, 1025, 2270, 10061, 2465, 9178, 22164, 7642, 21335, 3468, 1063, 5123, 20014, 8909, 1025, 2270, 20014, 2131, 3593, 1006, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#!/usr/bin/env python # -*- coding: utf8 -*- """The Tornado web framework. 核心模块, 参考示例使用代码: - 重要模块: - tornado.web - tornado.ioloop # 根据示例,可知入口在此.参看: ioloop.py - tornado.httpserver The Tornado web framework looks a bit like web.py (http://webpy.org/) or Google's webapp (http://code.google.com/appengine/docs/python/tools/webapp/), but with additional tools and optimizations to take advantage of the Tornado non-blocking web server and tools. Here is the canonical "Hello, world" example app: import tornado.httpserver import tornado.ioloop import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") if __name__ == "__main__": application = tornado.web.Application([ (r"/", MainHandler), ]) http_server = tornado.httpserver.HTTPServer(application) http_server.listen(8888) tornado.ioloop.IOLoop.instance().start() See the Tornado walkthrough on GitHub for more details and a good getting started guide. """ import base64 import binascii import calendar import Cookie import cStringIO import datetime import email.utils import escape import functools import gzip import hashlib import hmac import httplib import locale import logging import mimetypes import os.path import re import stat import sys import template import time import types import urllib import urlparse import uuid """ # 模块说明: 核心模块 RequestHandler() 需要处理哪些工作: - 1. HTTP方法支持(GET,POST, HEAD, DELETE, PUT), 预定义各种接口 - 2. 预定义接口: 配对定义[类似 unittest 的 setUp(), tearDown() 方法] - prepare() # 运行前, 准备工作 - on_connection_close() # 运行后, 清理工作 - 根据需要, 选择使用 - 3. cookies处理: - set - get - clear - 4. HTTP头处理: - set_status() # 状态码 - set_header() # 头信息 - 5. 重定向: - redirect() """ class RequestHandler(object): """Subclass this class and define get() or post() to make a handler. If you want to support more methods than the standard GET/HEAD/POST, you should override the class variable SUPPORTED_METHODS in your RequestHandler class. 译: 1. 继承此类,并自定义get(), post()方法,创建 handler 2. 若需要支持更多方法(GET/HEAD/POST), 需要 在 子类中 覆写 类变量 SUPPORTED_METHODS """ SUPPORTED_METHODS = ("GET", "HEAD", "POST", "DELETE", "PUT") def __init__(self, application, request, transforms=None): self.application = application self.request = request self._headers_written = False self._finished = False self._auto_finish = True self._transforms = transforms or [] self.ui = _O((n, self._ui_method(m)) for n, m in application.ui_methods.iteritems()) self.ui["modules"] = _O((n, self._ui_module(n, m)) for n, m in application.ui_modules.iteritems()) self.clear() # Check since connection is not available in WSGI if hasattr(self.request, "connection"): self.request.connection.stream.set_close_callback( self.on_connection_close) # 注意 self.on_connection_close() 调用时机 @property def settings(self): return self.application.settings # 如下这部分, 默认的接口定义, 如果子类没有覆写这些方法,就直接抛出异常. # 也就是说: 这些接口, 必须要 覆写,才可以用 def head(self, *args, **kwargs): raise HTTPError(405) def get(self, *args, **kwargs): raise HTTPError(405) def post(self, *args, **kwargs): raise HTTPError(405) def delete(self, *args, **kwargs): raise HTTPError(405) def put(self, *args, **kwargs): raise HTTPError(405) # 预定义接口: 准备工作函数, 给需要 个性化配置用 # 注意调用时机: self._execute() def prepare(self): """Called before the actual handler method. Useful to override in a handler if you want a common bottleneck for all of your requests. """ pass # 预定义接口2: 执行完后, 附带清理工作.(根据需要自行修改) # 注意调用时机: __init__() def on_connection_close(self): """Called in async handlers if the client closed the connection. You may override this to clean up resources associated with long-lived connections. Note that the select()-based implementation of IOLoop does not detect closed connections and so this method will not be called until you try (and fail) to produce some output. The epoll- and kqueue- based implementations should detect closed connections even while the request is idle. """ pass def clear(self): """Resets all headers and content for this response.""" self._headers = { "Server": "TornadoServer/1.0", "Content-Type": "text/html; charset=UTF-8", } if not self.request.supports_http_1_1(): if self.request.headers.get("Connection") == "Keep-Alive": self.set_header("Connection", "Keep-Alive") self._write_buffer = [] self._status_code = 200 # 设置 HTTP状态码 def set_status(self, status_code): """Sets the status code for our response.""" assert status_code in httplib.responses # 使用 assert 方式 作条件判断, 出错时,直接抛出 self._status_code = status_code # 设置 HTTP头信息 # 根据 value 类型, 作 格式转换处理 def set_header(self, name, value): """Sets the given response header name and value. If a datetime is given, we automatically format it according to the HTTP specification. If the value is not a string, we convert it to a string. All header values are then encoded as UTF-8. """ if isinstance(value, datetime.datetime): t = calendar.timegm(value.utctimetuple()) value = email.utils.formatdate(t, localtime=False, usegmt=True) elif isinstance(value, int) or isinstance(value, long): value = str(value) else: value = _utf8(value) # If \n is allowed into the header, it is possible to inject # additional headers or split the request. Also cap length to # prevent obviously erroneous values. safe_value = re.sub(r"[\x00-\x1f]", " ", value)[:4000] # 正则过滤 + 截取4000长度字符串 if safe_value != value: raise ValueError("Unsafe header value %r", value) self._headers[name] = value _ARG_DEFAULT = [] def get_argument(self, name, default=_ARG_DEFAULT, strip=True): """Returns the value of the argument with the given name. If default is not provided, the argument is considered to be required, and we throw an HTTP 404 exception if it is missing. If the argument appears in the url more than once, we return the last value. The returned value is always unicode. """ args = self.get_arguments(name, strip=strip) if not args: if default is self._ARG_DEFAULT: raise HTTPError(404, "Missing argument %s" % name) return default return args[-1] def get_arguments(self, name, strip=True): """Returns a list of the arguments with the given name. If the argument is not present, returns an empty list. The returned values are always unicode. """ values = self.request.arguments.get(name, []) # Get rid of any weird control chars values = [re.sub(r"[\x00-\x08\x0e-\x1f]", " ", x) for x in values] values = [_unicode(x) for x in values] if strip: values = [x.strip() for x in values] return values @property def cookies(self): """A dictionary of Cookie.Morsel objects.""" # 如果不存在,定义cookies # 如果存在, 返回之 if not hasattr(self, "_cookies"): self._cookies = Cookie.BaseCookie() # 定义 if "Cookie" in self.request.headers: try: self._cookies.load(self.request.headers["Cookie"]) # 赋值 except: self.clear_all_cookies() # 异常时,调用 自定义清理函数 return self._cookies def get_cookie(self, name, default=None): """Gets the value of the cookie with the given name, else default.""" if name in self.cookies: # 注意, 因为 cookies() 被定义成 property, 可以直接这样调用 return self.cookies[name].value return default def set_cookie(self, name, value, domain=None, expires=None, path="/", expires_days=None, **kwargs): """Sets the given cookie name/value with the given options. Additional keyword arguments are set on the Cookie.Morsel directly. See http://docs.python.org/library/cookie.html#morsel-objects for available attributes. """ name = _utf8(name) value = _utf8(value) if re.search(r"[\x00-\x20]", name + value): # Don't let us accidentally inject bad stuff raise ValueError("Invalid cookie %r: %r" % (name, value)) if not hasattr(self, "_new_cookies"): self._new_cookies = [] new_cookie = Cookie.BaseCookie() self._new_cookies.append(new_cookie) new_cookie[name] = value if domain: new_cookie[name]["domain"] = domain if expires_days is not None and not expires: expires = datetime.datetime.utcnow() + datetime.timedelta( days=expires_days) if expires: timestamp = calendar.timegm(expires.utctimetuple()) new_cookie[name]["expires"] = email.utils.formatdate( timestamp, localtime=False, usegmt=True) if path: new_cookie[name]["path"] = path for k, v in kwargs.iteritems(): new_cookie[name][k] = v def clear_cookie(self, name, path="/", domain=None): """Deletes the cookie with the given name.""" expires = datetime.datetime.utcnow() - datetime.timedelta(days=365) # 赋空值, 清掉 cookie, 多个web框架,标准实现写法 self.set_cookie(name, value="", path=path, expires=expires, domain=domain) def clear_all_cookies(self): """Deletes all the cookies the user sent with this request.""" # 注: 注意如上2个相关函数 命名特征 # - 单个操作: clear_cookie() # - 批量操作: clear_all_cookies() for name in self.cookies.iterkeys(): self.clear_cookie(name) def set_secure_cookie(self, name, value, expires_days=30, **kwargs): """Signs and timestamps a cookie so it cannot be forged. You must specify the 'cookie_secret' setting in your Application to use this method. It should be a long, random sequence of bytes to be used as the HMAC secret for the signature. To read a cookie set with this method, use get_secure_cookie(). """ # 如下几步, 构造 "安全的cookie", 加 时间戳, 防伪造 timestamp = str(int(time.time())) value = base64.b64encode(value) signature = self._cookie_signature(name, value, timestamp) # 加时间戳 value = "|".join([value, timestamp, signature]) self.set_cookie(name, value, expires_days=expires_days, **kwargs) def get_secure_cookie(self, name, include_name=True, value=None): """Returns the given signed cookie if it validates, or None. In older versions of Tornado (0.1 and 0.2), we did not include the name of the cookie in the cookie signature. To read these old-style cookies, pass include_name=False to this method. Otherwise, all attempts to read old-style cookies will fail (and you may log all your users out whose cookies were written with a previous Tornado version). """ if value is None: value = self.get_cookie(name) if not value: return None parts = value.split("|") if len(parts) != 3: return None if include_name: signature = self._cookie_signature(name, parts[0], parts[1]) else: signature = self._cookie_signature(parts[0], parts[1]) if not _time_independent_equals(parts[2], signature): logging.warning("Invalid cookie signature %r", value) return None timestamp = int(parts[1]) if timestamp < time.time() - 31 * 86400: logging.warning("Expired cookie %r", value) return None # 尝试返回 try: return base64.b64decode(parts[0]) except: return None def _cookie_signature(self, *parts): self.require_setting("cookie_secret", "secure cookies") hash = hmac.new(self.application.settings["cookie_secret"], digestmod=hashlib.sha1) for part in parts: hash.update(part) return hash.hexdigest() # 关键代码: 重定向 # def redirect(self, url, permanent=False): """Sends a redirect to the given (optionally relative) URL.""" if self._headers_written: raise Exception("Cannot redirect after headers have been written") self.set_status(301 if permanent else 302) # Remove whitespace url = re.sub(r"[\x00-\x20]+", "", _utf8(url)) self.set_header("Location", urlparse.urljoin(self.request.uri, url)) self.finish() # 调用处理 # 关键代码: 准备 渲染页面的 数据, 常用接口函数 # 特别说明: # - 这里 write() 方法, 并没有直接 渲染页面, 而是在 准备 渲染数据 # - 实际的 渲染HTML页面操作, 在 finish() 中 def write(self, chunk): """Writes the given chunk to the output buffer. To write the output to the network, use the flush() method below. If the given chunk is a dictionary, we write it as JSON and set the Content-Type of the response to be text/javascript. """ assert not self._finished if isinstance(chunk, dict): chunk = escape.json_encode(chunk) self.set_header("Content-Type", "text/javascript; charset=UTF-8") chunk = _utf8(chunk) self._write_buffer.append(chunk) # 准备 待渲染的 HTML数据 # 关键代码: 渲染页面 # def render(self, template_name, **kwargs): """Renders the template with the given arguments as the response.""" html = self.render_string(template_name, **kwargs) # Insert the additional JS and CSS added by the modules on the page js_embed = [] js_files = [] css_embed = [] css_files = [] html_heads = [] html_bodies = [] for module in getattr(self, "_active_modules", {}).itervalues(): # JS 部分 embed_part = module.embedded_javascript() if embed_part: js_embed.append(_utf8(embed_part)) file_part = module.javascript_files() if file_part: if isinstance(file_part, basestring): js_files.append(file_part) else: js_files.extend(file_part) # CSS 部分 embed_part = module.embedded_css() if embed_part: css_embed.append(_utf8(embed_part)) file_part = module.css_files() if file_part: if isinstance(file_part, basestring): css_files.append(file_part) else: css_files.extend(file_part) # Header 部分 head_part = module.html_head() if head_part: html_heads.append(_utf8(head_part)) body_part = module.html_body() if body_part: html_bodies.append(_utf8(body_part)) # ---------------------------------------------------------- # 如下是 分块处理部分: # - 本质工作: 在 拼接一个 长 HTML 字符串(包含 HTML,CSS,JS) # ---------------------------------------------------------- if js_files: # Maintain order of JavaScript files given by modules paths = [] unique_paths = set() for path in js_files: if not path.startswith("/") and not path.startswith("http:"): path = self.static_url(path) if path not in unique_paths: paths.append(path) unique_paths.add(path) js = ''.join('<script src="' + escape.xhtml_escape(p) + '" type="text/javascript"></script>' for p in paths) sloc = html.rindex('</body>') html = html[:sloc] + js + '\n' + html[sloc:] if js_embed: js = '<script type="text/javascript">\n//<![CDATA[\n' + \ '\n'.join(js_embed) + '\n//]]>\n</script>' sloc = html.rindex('</body>') html = html[:sloc] + js + '\n' + html[sloc:] if css_files: paths = set() for path in css_files: if not path.startswith("/") and not path.startswith("http:"): paths.add(self.static_url(path)) else: paths.add(path) css = ''.join('<link href="' + escape.xhtml_escape(p) + '" ' 'type="text/css" rel="stylesheet"/>' for p in paths) hloc = html.index('</head>') html = html[:hloc] + css + '\n' + html[hloc:] if css_embed: css = '<style type="text/css">\n' + '\n'.join(css_embed) + \ '\n</style>' hloc = html.index('</head>') html = html[:hloc] + css + '\n' + html[hloc:] if html_heads: hloc = html.index('</head>') html = html[:hloc] + ''.join(html_heads) + '\n' + html[hloc:] if html_bodies: hloc = html.index('</body>') html = html[:hloc] + ''.join(html_bodies) + '\n' + html[hloc:] # 注意 self.finish(html) # 关键调用 def render_string(self, template_name, **kwargs): """Generate the given template with the given arguments. We return the generated string. To generate and write a template as a response, use render() above. """ # If no template_path is specified, use the path of the calling file template_path = self.get_template_path() if not template_path: frame = sys._getframe(0) web_file = frame.f_code.co_filename while frame.f_code.co_filename == web_file: frame = frame.f_back template_path = os.path.dirname(frame.f_code.co_filename) if not getattr(RequestHandler, "_templates", None): RequestHandler._templates = {} if template_path not in RequestHandler._templates: loader = self.application.settings.get("template_loader") or\ template.Loader(template_path) RequestHandler._templates[template_path] = loader # 注意 t = RequestHandler._templates[template_path].load(template_name) args = dict( handler=self, request=self.request, current_user=self.current_user, locale=self.locale, _=self.locale.translate, static_url=self.static_url, xsrf_form_html=self.xsrf_form_html, reverse_url=self.application.reverse_url ) args.update(self.ui) args.update(kwargs) return t.generate(**args) def flush(self, include_footers=False): """Flushes the current output buffer to the nextwork.""" if self.application._wsgi: raise Exception("WSGI applications do not support flush()") chunk = "".join(self._write_buffer) self._write_buffer = [] if not self._headers_written: self._headers_written = True for transform in self._transforms: self._headers, chunk = transform.transform_first_chunk( self._headers, chunk, include_footers) headers = self._generate_headers() else: for transform in self._transforms: chunk = transform.transform_chunk(chunk, include_footers) headers = "" # Ignore the chunk and only write the headers for HEAD requests if self.request.method == "HEAD": if headers: self.request.write(headers) # 特别注意 self.request.write() 方法 return if headers or chunk: self.request.write(headers + chunk) # 超级关键代码: 写HTML页面 # # def finish(self, chunk=None): """Finishes this response, ending the HTTP request.""" assert not self._finished if chunk is not None: self.write(chunk) # 特别注意, 这里的关键调用 # Automatically support ETags and add the Content-Length header if # we have not flushed any content yet. if not self._headers_written: if (self._status_code == 200 and self.request.method == "GET" and "Etag" not in self._headers): hasher = hashlib.sha1() for part in self._write_buffer: hasher.update(part) etag = '"%s"' % hasher.hexdigest() inm = self.request.headers.get("If-None-Match") if inm and inm.find(etag) != -1: self._write_buffer = [] self.set_status(304) else: self.set_header("Etag", etag) if "Content-Length" not in self._headers: content_length = sum(len(part) for part in self._write_buffer) self.set_header("Content-Length", content_length) if hasattr(self.request, "connection"): # Now that the request is finished, clear the callback we # set on the IOStream (which would otherwise prevent the # garbage collection of the RequestHandler when there # are keepalive connections) self.request.connection.stream.set_close_callback(None) if not self.application._wsgi: self.flush(include_footers=True) self.request.finish() # 注意调用 self._log() self._finished = True # 给浏览器,返回 内部错误 def send_error(self, status_code=500, **kwargs): """Sends the given HTTP error code to the browser. We also send the error HTML for the given error code as returned by get_error_html. Override that method if you want custom error pages for your application. """ if self._headers_written: logging.error("Cannot send error response after headers written") if not self._finished: self.finish() return self.clear() self.set_status(status_code) message = self.get_error_html(status_code, **kwargs) self.finish(message) # 写出信息 def get_error_html(self, status_code, **kwargs): """Override to implement custom error pages. If this error was caused by an uncaught exception, the exception object can be found in kwargs e.g. kwargs['exception'] """ return "<html><title>%(code)d: %(message)s</title>" \ "<body>%(code)d: %(message)s</body></html>" % { "code": status_code, "message": httplib.responses[status_code], } # 本地配置: 通常用于设置 国际化-语言 (浏览器语言) # @property def locale(self): """The local for the current session. Determined by either get_user_locale, which you can override to set the locale based on, e.g., a user preference stored in a database, or get_browser_locale, which uses the Accept-Language header. """ if not hasattr(self, "_locale"): self._locale = self.get_user_locale() # 配置为 用户设置 if not self._locale: self._locale = self.get_browser_locale() # 配置为 浏览器默认设置 assert self._locale return self._locale # 预定义接口 - 用户配置 # - 使用前, 需覆写该函数 def get_user_locale(self): """Override to determine the locale from the authenticated user. If None is returned, we use the Accept-Language header. """ return None # 默认浏览器设置语言环境 def get_browser_locale(self, default="en_US"): """Determines the user's locale from Accept-Language header. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4 """ if "Accept-Language" in self.request.headers: languages = self.request.headers["Accept-Language"].split(",") locales = [] for language in languages: parts = language.strip().split(";") if len(parts) > 1 and parts[1].startswith("q="): try: score = float(parts[1][2:]) except (ValueError, TypeError): score = 0.0 else: score = 1.0 locales.append((parts[0], score)) if locales: locales.sort(key=lambda (l, s): s, reverse=True) codes = [l[0] for l in locales] return locale.get(*codes) return locale.get(default) # 获取当前用户 @property def current_user(self): """The authenticated user for this request. Determined by either get_current_user, which you can override to set the user based on, e.g., a cookie. If that method is not overridden, this method always returns None. We lazy-load the current user the first time this method is called and cache the result after that. """ if not hasattr(self, "_current_user"): self._current_user = self.get_current_user() return self._current_user # 预定义接口 - 获取当前用户 # - 使用前, 需覆写 # - 特别说明: 通常都需要用到该接口, 基本上一定是需要 覆写的 def get_current_user(self): """Override to determine the current user from, e.g., a cookie.""" return None # ---------------------------------------------------- # 如下2个函数, 用于获取 默认配置参数 # - 登录 URL # - 模板路径 # - 支持 # ---------------------------------------------------- def get_login_url(self): """Override to customize the login URL based on the request. By default, we use the 'login_url' application setting. """ self.require_setting("login_url", "@tornado.web.authenticated") return self.application.settings["login_url"] def get_template_path(self): """Override to customize template path for each handler. By default, we use the 'template_path' application setting. Return None to load templates relative to the calling file. """ return self.application.settings.get("template_path") # 预防 跨站攻击 # # - 默认先判断是否记录了 token # - 若已记录, 直接返回 # - 若未记录, 尝试从 cookie 中 获取 # - 若 cookie 中 存在, 从 cookie 中获取,并返回 # - 若 cookie 中 不存在, 主动生成 token, 并同步写入 cookie. (目的是,无需重复生成) # @property def xsrf_token(self): """The XSRF-prevention token for the current user/session. To prevent cross-site request forgery, we set an '_xsrf' cookie and include the same '_xsrf' value as an argument with all POST requests. If the two do not match, we reject the form submission as a potential forgery. See http://en.wikipedia.org/wiki/Cross-site_request_forgery """ if not hasattr(self, "_xsrf_token"): token = self.get_cookie("_xsrf") # cookie 中获取 if not token: token = binascii.b2a_hex(uuid.uuid4().bytes) # token 生成方法 expires_days = 30 if self.current_user else None # token 有效期 self.set_cookie("_xsrf", token, expires_days=expires_days) # 更新 cookie self._xsrf_token = token # 更新 token return self._xsrf_token def check_xsrf_cookie(self): """Verifies that the '_xsrf' cookie matches the '_xsrf' argument. To prevent cross-site request forgery, we set an '_xsrf' cookie and include the same '_xsrf' value as an argument with all POST requests. If the two do not match, we reject the form submission as a potential forgery. See http://en.wikipedia.org/wiki/Cross-site_request_forgery """ if self.request.headers.get("X-Requested-With") == "XMLHttpRequest": return token = self.get_argument("_xsrf", None) if not token: raise HTTPError(403, "'_xsrf' argument missing from POST") if self.xsrf_token != token: raise HTTPError(403, "XSRF cookie does not match POST argument") # 提交表单 - 预防 xsrf 攻击方法 def xsrf_form_html(self): """An HTML <input/> element to be included with all POST forms. It defines the _xsrf input value, which we check on all POST requests to prevent cross-site request forgery. If you have set the 'xsrf_cookies' application setting, you must include this HTML within all of your HTML forms. See check_xsrf_cookie() above for more information. """ # 特别注意: 该 <表单提交> HTML字符串, 要含有 (name="_xsrf") 字段 return '<input type="hidden" name="_xsrf" value="' + \ escape.xhtml_escape(self.xsrf_token) + '"/>' # 静态资源路径 def static_url(self, path): """Returns a static URL for the given relative static file path. This method requires you set the 'static_path' setting in your application (which specifies the root directory of your static files). We append ?v=<signature> to the returned URL, which makes our static file handler set an infinite expiration header on the returned content. The signature is based on the content of the file. If this handler has a "include_host" attribute, we include the full host for every static URL, including the "http://". Set this attribute for handlers whose output needs non-relative static path names. """ self.require_setting("static_path", "static_url") if not hasattr(RequestHandler, "_static_hashes"): RequestHandler._static_hashes = {} hashes = RequestHandler._static_hashes if path not in hashes: try: f = open(os.path.join( self.application.settings["static_path"], path)) hashes[path] = hashlib.md5(f.read()).hexdigest() f.close() except: logging.error("Could not open static file %r", path) hashes[path] = None base = self.request.protocol + "://" + self.request.host \ if getattr(self, "include_host", False) else "" static_url_prefix = self.settings.get('static_url_prefix', '/static/') if hashes.get(path): return base + static_url_prefix + path + "?v=" + hashes[path][:5] else: return base + static_url_prefix + path # 异步回调 def async_callback(self, callback, *args, **kwargs): """Wrap callbacks with this if they are used on asynchronous requests. Catches exceptions and properly finishes the request. """ if callback is None: return None if args or kwargs: callback = functools.partial(callback, *args, **kwargs) def wrapper(*args, **kwargs): try: return callback(*args, **kwargs) except Exception, e: if self._headers_written: logging.error("Exception after headers written", exc_info=True) else: self._handle_request_exception(e) return wrapper def require_setting(self, name, feature="this feature"): """Raises an exception if the given app setting is not defined.""" if not self.application.settings.get(name): raise Exception("You must define the '%s' setting in your " "application to use %s" % (name, feature)) def reverse_url(self, name, *args): return self.application.reverse_url(name, *args) # 关键代码: # def _execute(self, transforms, *args, **kwargs): """Executes this request with the given output transforms.""" self._transforms = transforms try: if self.request.method not in self.SUPPORTED_METHODS: raise HTTPError(405) # If XSRF cookies are turned on, reject form submissions without # the proper cookie if self.request.method == "POST" and \ self.application.settings.get("xsrf_cookies"): self.check_xsrf_cookie() # 检查 self.prepare() # 注意调用时机 if not self._finished: getattr(self, self.request.method.lower())(*args, **kwargs) if self._auto_finish and not self._finished: self.finish() # 关键调用 except Exception, e: self._handle_request_exception(e) def _generate_headers(self): lines = [self.request.version + " " + str(self._status_code) + " " + httplib.responses[self._status_code]] lines.extend(["%s: %s" % (n, v) for n, v in self._headers.iteritems()]) for cookie_dict in getattr(self, "_new_cookies", []): for cookie in cookie_dict.values(): lines.append("Set-Cookie: " + cookie.OutputString(None)) return "\r\n".join(lines) + "\r\n\r\n" # 打印出错日志 def _log(self): if self._status_code < 400: log_method = logging.info elif self._status_code < 500: log_method = logging.warning else: log_method = logging.error request_time = 1000.0 * self.request.request_time() # 日志打印 log_method("%d %s %.2fms", self._status_code, self._request_summary(), request_time) def _request_summary(self): return self.request.method + " " + self.request.uri + " (" + \ self.request.remote_ip + ")" def _handle_request_exception(self, e): if isinstance(e, HTTPError): if e.log_message: format = "%d %s: " + e.log_message args = [e.status_code, self._request_summary()] + list(e.args) logging.warning(format, *args) if e.status_code not in httplib.responses: logging.error("Bad HTTP status code: %d", e.status_code) self.send_error(500, exception=e) else: self.send_error(e.status_code, exception=e) else: logging.error("Uncaught exception %s\n%r", self._request_summary(), self.request, exc_info=e) self.send_error(500, exception=e) def _ui_module(self, name, module): def render(*args, **kwargs): if not hasattr(self, "_active_modules"): self._active_modules = {} if name not in self._active_modules: self._active_modules[name] = module(self) rendered = self._active_modules[name].render(*args, **kwargs) return rendered return render def _ui_method(self, method): return lambda *args, **kwargs: method(self, *args, **kwargs) # 装饰器定义: 异步处理 def asynchronous(method): """Wrap request handler methods with this if they are asynchronous. If this decorator is given, the response is not finished when the method returns. It is up to the request handler to call self.finish() to finish the HTTP request. Without this decorator, the request is automatically finished when the get() or post() method returns. class MyRequestHandler(web.RequestHandler): @web.asynchronous def get(self): http = httpclient.AsyncHTTPClient() http.fetch("http://friendfeed.com/", self._on_download) def _on_download(self, response): self.write("Downloaded!") self.finish() """ @functools.wraps(method) def wrapper(self, *args, **kwargs): if self.application._wsgi: raise Exception("@asynchronous is not supported for WSGI apps") self._auto_finish = False return method(self, *args, **kwargs) return wrapper # 装饰器定义: 去 斜杠(/) def removeslash(method): """Use this decorator to remove trailing slashes from the request path. For example, a request to '/foo/' would redirect to '/foo' with this decorator. Your request handler mapping should use a regular expression like r'/foo/*' in conjunction with using the decorator. """ @functools.wraps(method) def wrapper(self, *args, **kwargs): if self.request.path.endswith("/"): # 结尾含 / if self.request.method == "GET": uri = self.request.path.rstrip("/") # 过滤掉 / if self.request.query: uri += "?" + self.request.query self.redirect(uri) # 重定向 return raise HTTPError(404) return method(self, *args, **kwargs) return wrapper # 装饰器定义: 添加 斜杠(/) def addslash(method): """Use this decorator to add a missing trailing slash to the request path. For example, a request to '/foo' would redirect to '/foo/' with this decorator. Your request handler mapping should use a regular expression like r'/foo/?' in conjunction with using the decorator. """ @functools.wraps(method) def wrapper(self, *args, **kwargs): if not self.request.path.endswith("/"): if self.request.method == "GET": uri = self.request.path + "/" if self.request.query: uri += "?" + self.request.query self.redirect(uri) # 重定向 return raise HTTPError(404) return method(self, *args, **kwargs) return wrapper # ---------------------------------------------------------------- # 入口: # # # ---------------------------------------------------------------- class Application(object): """A collection of request handlers that make up a web application. Instances of this class are callable and can be passed directly to HTTPServer to serve the application: application = web.Application([ (r"/", MainPageHandler), ]) http_server = httpserver.HTTPServer(application) http_server.listen(8080) ioloop.IOLoop.instance().start() The constructor for this class takes in a list of URLSpec objects or (regexp, request_class) tuples. When we receive requests, we iterate over the list in order and instantiate an instance of the first request class whose regexp matches the request path. Each tuple can contain an optional third element, which should be a dictionary if it is present. That dictionary is passed as keyword arguments to the contructor of the handler. This pattern is used for the StaticFileHandler below: application = web.Application([ (r"/static/(.*)", web.StaticFileHandler, {"path": "/var/www"}), ]) We support virtual hosts with the add_handlers method, which takes in a host regular expression as the first argument: application.add_handlers(r"www\.myhost\.com", [ (r"/article/([0-9]+)", ArticleHandler), ]) You can serve static files by sending the static_path setting as a keyword argument. We will serve those files from the /static/ URI (this is configurable with the static_url_prefix setting), and we will serve /favicon.ico and /robots.txt from the same directory. """ def __init__(self, handlers=None, default_host="", transforms=None, wsgi=False, **settings): """ :param handlers: :param default_host: :param transforms: :param wsgi: :param settings: - gzip : 压缩 - static_path : 静态资源路径 - debug : 调试开关 :return: """ if transforms is None: self.transforms = [] if settings.get("gzip"): # 配置选项 self.transforms.append(GZipContentEncoding) self.transforms.append(ChunkedTransferEncoding) else: self.transforms = transforms self.handlers = [] self.named_handlers = {} self.default_host = default_host self.settings = settings # 自定义配置项 self.ui_modules = {} self.ui_methods = {} self._wsgi = wsgi self._load_ui_modules(settings.get("ui_modules", {})) self._load_ui_methods(settings.get("ui_methods", {})) if self.settings.get("static_path"): # 配置项中含: 静态资源路径 path = self.settings["static_path"] handlers = list(handlers or []) static_url_prefix = settings.get("static_url_prefix", "/static/") handlers = [ (re.escape(static_url_prefix) + r"(.*)", StaticFileHandler, dict(path=path)), (r"/(favicon\.ico)", StaticFileHandler, dict(path=path)), (r"/(robots\.txt)", StaticFileHandler, dict(path=path)), ] + handlers if handlers: self.add_handlers(".*$", handlers) # 关键调用 # Automatically reload modified modules if self.settings.get("debug") and not wsgi: # 调试模式时, 自动监测,并重启项目 import autoreload # tornado 自定义模块 autoreload.start() def add_handlers(self, host_pattern, host_handlers): """Appends the given handlers to our handler list.""" if not host_pattern.endswith("$"): host_pattern += "$" handlers = [] # The handlers with the wildcard host_pattern are a special # case - they're added in the constructor but should have lower # precedence than the more-precise handlers added later. # If a wildcard handler group exists, it should always be last # in the list, so insert new groups just before it. if self.handlers and self.handlers[-1][0].pattern == '.*$': self.handlers.insert(-1, (re.compile(host_pattern), handlers)) # 正则匹配 else: self.handlers.append((re.compile(host_pattern), handlers)) # 正则匹配 for spec in host_handlers: if type(spec) is type(()): # 元组 assert len(spec) in (2, 3) pattern = spec[0] handler = spec[1] if len(spec) == 3: kwargs = spec[2] else: kwargs = {} spec = URLSpec(pattern, handler, kwargs) # 关键调用 handlers.append(spec) if spec.name: if spec.name in self.named_handlers: logging.warning( "Multiple handlers named %s; replacing previous value", spec.name) self.named_handlers[spec.name] = spec def add_transform(self, transform_class): """Adds the given OutputTransform to our transform list.""" self.transforms.append(transform_class) def _get_host_handlers(self, request): host = request.host.lower().split(':')[0] for pattern, handlers in self.handlers: if pattern.match(host): return handlers # Look for default host if not behind load balancer (for debugging) if "X-Real-Ip" not in request.headers: for pattern, handlers in self.handlers: if pattern.match(self.default_host): return handlers return None def _load_ui_methods(self, methods): if type(methods) is types.ModuleType: self._load_ui_methods(dict((n, getattr(methods, n)) for n in dir(methods))) elif isinstance(methods, list): for m in methods: self._load_ui_methods(m) else: for name, fn in methods.iteritems(): if not name.startswith("_") and hasattr(fn, "__call__") \ and name[0].lower() == name[0]: self.ui_methods[name] = fn def _load_ui_modules(self, modules): if type(modules) is types.ModuleType: self._load_ui_modules(dict((n, getattr(modules, n)) for n in dir(modules))) elif isinstance(modules, list): for m in modules: self._load_ui_modules(m) else: assert isinstance(modules, dict) for name, cls in modules.iteritems(): try: if issubclass(cls, UIModule): self.ui_modules[name] = cls except TypeError: pass # 关键定义: 类对象 --> 可调用对象 # # 注意: 被调用时机 # - wsgi.py # - WSGIApplication() # - self.__call__() 方法 # def __call__(self, request): """Called by HTTPServer to execute the request.""" transforms = [t(request) for t in self.transforms] handler = None args = [] kwargs = {} handlers = self._get_host_handlers(request) if not handlers: handler = RedirectHandler( request, "http://" + self.default_host + "/") else: for spec in handlers: match = spec.regex.match(request.path) if match: # None-safe wrapper around urllib.unquote to handle # unmatched optional groups correctly def unquote(s): if s is None: return s return urllib.unquote(s) handler = spec.handler_class(self, request, **spec.kwargs) # Pass matched groups to the handler. Since # match.groups() includes both named and unnamed groups, # we want to use either groups or groupdict but not both. kwargs = dict((k, unquote(v)) for (k, v) in match.groupdict().iteritems()) if kwargs: args = [] else: args = [unquote(s) for s in match.groups()] break if not handler: handler = ErrorHandler(self, request, 404) # In debug mode, re-compile templates and reload static files on every # request so you don't need to restart to see changes if self.settings.get("debug"): if getattr(RequestHandler, "_templates", None): map(lambda loader: loader.reset(), RequestHandler._templates.values()) RequestHandler._static_hashes = {} # 关键代码调用时机: handler._execute(transforms, *args, **kwargs) return handler def reverse_url(self, name, *args): """Returns a URL path for handler named `name` The handler must be added to the application as a named URLSpec """ if name in self.named_handlers: return self.named_handlers[name].reverse(*args) raise KeyError("%s not found in named urls" % name) # ---------------------------------------------------- # 异常基类 # ---------------------------------------------------- class HTTPError(Exception): """An exception that will turn into an HTTP error response.""" def __init__(self, status_code, log_message=None, *args): self.status_code = status_code self.log_message = log_message self.args = args def __str__(self): message = "HTTP %d: %s" % ( self.status_code, httplib.responses[self.status_code]) if self.log_message: return message + " (" + (self.log_message % self.args) + ")" else: return message # ---------------------------------------------------- # 扩展子类: 出错处理 # ---------------------------------------------------- class ErrorHandler(RequestHandler): """Generates an error response with status_code for all requests.""" def __init__(self, application, request, status_code): RequestHandler.__init__(self, application, request) self.set_status(status_code) def prepare(self): raise HTTPError(self._status_code) # ---------------------------------------------------- # 扩展子类: 重定向处理 # ---------------------------------------------------- class RedirectHandler(RequestHandler): """Redirects the client to the given URL for all GET requests. You should provide the keyword argument "url" to the handler, e.g.: application = web.Application([ (r"/oldpath", web.RedirectHandler, {"url": "/newpath"}), ]) """ def __init__(self, application, request, url, permanent=True): RequestHandler.__init__(self, application, request) self._url = url self._permanent = permanent # GET 请求,变成 重定向调用 def get(self): self.redirect(self._url, permanent=self._permanent) # ---------------------------------------------------- # 扩展子类: 静态资源处理 # 说明: # - 覆写 get(), head() 方法 # ---------------------------------------------------- class StaticFileHandler(RequestHandler): """A simple handler that can serve static content from a directory. To map a path to this handler for a static data directory /var/www, you would add a line to your application like: application = web.Application([ (r"/static/(.*)", web.StaticFileHandler, {"path": "/var/www"}), ]) The local root directory of the content should be passed as the "path" argument to the handler. To support aggressive browser caching, if the argument "v" is given with the path, we set an infinite HTTP expiration header. So, if you want browsers to cache a file indefinitely, send them to, e.g., /static/images/myimage.png?v=xxx. """ def __init__(self, application, request, path): RequestHandler.__init__(self, application, request) self.root = os.path.abspath(path) + os.path.sep def head(self, path): self.get(path, include_body=False) def get(self, path, include_body=True): abspath = os.path.abspath(os.path.join(self.root, path)) if not abspath.startswith(self.root): raise HTTPError(403, "%s is not in root static directory", path) if not os.path.exists(abspath): raise HTTPError(404) if not os.path.isfile(abspath): raise HTTPError(403, "%s is not a file", path) stat_result = os.stat(abspath) modified = datetime.datetime.fromtimestamp(stat_result[stat.ST_MTIME]) self.set_header("Last-Modified", modified) if "v" in self.request.arguments: self.set_header("Expires", datetime.datetime.utcnow() + \ datetime.timedelta(days=365*10)) self.set_header("Cache-Control", "max-age=" + str(86400*365*10)) else: self.set_header("Cache-Control", "public") mime_type, encoding = mimetypes.guess_type(abspath) if mime_type: self.set_header("Content-Type", mime_type) self.set_extra_headers(path) # Check the If-Modified-Since, and don't send the result if the # content has not been modified ims_value = self.request.headers.get("If-Modified-Since") if ims_value is not None: date_tuple = email.utils.parsedate(ims_value) if_since = datetime.datetime.fromtimestamp(time.mktime(date_tuple)) if if_since >= modified: self.set_status(304) return if not include_body: return self.set_header("Content-Length", stat_result[stat.ST_SIZE]) file = open(abspath, "rb") # 读文件 try: self.write(file.read()) # 写出 finally: file.close() def set_extra_headers(self, path): """For subclass to add extra headers to the response""" pass # ---------------------------------------------------- # 扩展子类: 包裹 另外一个 回调 # 说明: # - 覆写 prepare() 预定义接口 # ---------------------------------------------------- class FallbackHandler(RequestHandler): """A RequestHandler that wraps another HTTP server callback. The fallback is a callable object that accepts an HTTPRequest, such as an Application or tornado.wsgi.WSGIContainer. This is most useful to use both tornado RequestHandlers and WSGI in the same server. Typical usage: wsgi_app = tornado.wsgi.WSGIContainer( django.core.handlers.wsgi.WSGIHandler()) application = tornado.web.Application([ (r"/foo", FooHandler), (r".*", FallbackHandler, dict(fallback=wsgi_app), ]) """ def __init__(self, app, request, fallback): RequestHandler.__init__(self, app, request) self.fallback = fallback # 覆写接口 def prepare(self): self.fallback(self.request) self._finished = True # ---------------------------------------------------- # 自定义基类: 输出转换 # 说明: # - 2个子类 # - GZipContentEncoding() # - ChunkedTransferEncoding() # ---------------------------------------------------- class OutputTransform(object): """A transform modifies the result of an HTTP request (e.g., GZip encoding) A new transform instance is created for every request. See the ChunkedTransferEncoding example below if you want to implement a new Transform. """ def __init__(self, request): pass def transform_first_chunk(self, headers, chunk, finishing): return headers, chunk def transform_chunk(self, chunk, finishing): return chunk class GZipContentEncoding(OutputTransform): """Applies the gzip content encoding to the response. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11 """ CONTENT_TYPES = set([ "text/plain", "text/html", "text/css", "text/xml", "application/x-javascript", "application/xml", "application/atom+xml", "text/javascript", "application/json", "application/xhtml+xml"]) MIN_LENGTH = 5 def __init__(self, request): self._gzipping = request.supports_http_1_1() and \ "gzip" in request.headers.get("Accept-Encoding", "") def transform_first_chunk(self, headers, chunk, finishing): if self._gzipping: ctype = headers.get("Content-Type", "").split(";")[0] self._gzipping = (ctype in self.CONTENT_TYPES) and \ (not finishing or len(chunk) >= self.MIN_LENGTH) and \ (finishing or "Content-Length" not in headers) and \ ("Content-Encoding" not in headers) if self._gzipping: headers["Content-Encoding"] = "gzip" self._gzip_value = cStringIO.StringIO() self._gzip_file = gzip.GzipFile(mode="w", fileobj=self._gzip_value) self._gzip_pos = 0 chunk = self.transform_chunk(chunk, finishing) # 关键调用 if "Content-Length" in headers: headers["Content-Length"] = str(len(chunk)) return headers, chunk def transform_chunk(self, chunk, finishing): if self._gzipping: self._gzip_file.write(chunk) if finishing: self._gzip_file.close() else: self._gzip_file.flush() chunk = self._gzip_value.getvalue() if self._gzip_pos > 0: chunk = chunk[self._gzip_pos:] self._gzip_pos += len(chunk) return chunk class ChunkedTransferEncoding(OutputTransform): """Applies the chunked transfer encoding to the response. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1 """ def __init__(self, request): self._chunking = request.supports_http_1_1() def transform_first_chunk(self, headers, chunk, finishing): if self._chunking: # No need to chunk the output if a Content-Length is specified if "Content-Length" in headers or "Transfer-Encoding" in headers: self._chunking = False else: headers["Transfer-Encoding"] = "chunked" chunk = self.transform_chunk(chunk, finishing) return headers, chunk def transform_chunk(self, block, finishing): if self._chunking: # Don't write out empty chunks because that means END-OF-STREAM # with chunked encoding if block: block = ("%x" % len(block)) + "\r\n" + block + "\r\n" if finishing: block += "0\r\n\r\n" return block # ---------------------------------------------------- # 装饰器定义: 权限认证 # 代码功能逻辑: # - 若当前用户已登录, 正常调用 # - 若当前用户未登录 # - 若是 GET 请求, # - 先获取 login(网站登录页面) URL # - URL中, 记录 next 字段参数, 记录 未登录前 访问的页面 # - 重定向到 login 页面 # - 正确登录后, 会根据 next 参数, 自动跳转到 登录前的页面 # - 其他请求, 直接抛出 403 错误页面 # 批注: # - 权限验证的典型实现, 值得学习 # - 代码很精简, 并不复杂 # ---------------------------------------------------- def authenticated(method): """Decorate methods with this to require that the user be logged in.""" @functools.wraps(method) def wrapper(self, *args, **kwargs): if not self.current_user: # 用户未登录 if self.request.method == "GET": # GET 请求 处理 url = self.get_login_url() # 获取登录页面的 URL if "?" not in url: # 关键处理: # - 在 URL 中,添加 <next>字段 [格式: ?next=/xxxx.html] # - 目的: 当用户成功登录后,返回到登录前,访问的页面 url += "?" + urllib.urlencode(dict(next=self.request.uri)) self.redirect(url) # 重定向 return raise HTTPError(403) # 其他请求, 抛出 403 错误 return method(self, *args, **kwargs) # 用户已登录时, 正常调用 return wrapper # ---------------------------------------------------- # 预定义接口类: UI模块 (处理 CSS,JS) # 说明: # - 预定义了一些接口方法,需要 子类化, 并覆写后,才可使用 # ---------------------------------------------------- class UIModule(object): """A UI re-usable, modular unit on a page. UI modules often execute additional queries, and they can include additional CSS and JavaScript that will be included in the output page, which is automatically inserted on page render. """ def __init__(self, handler): self.handler = handler self.request = handler.request self.ui = handler.ui self.current_user = handler.current_user self.locale = handler.locale # 预定义接口: 必须要 覆写,才能用 def render(self, *args, **kwargs): raise NotImplementedError() def embedded_javascript(self): """Returns a JavaScript string that will be embedded in the page.""" return None def javascript_files(self): """Returns a list of JavaScript files required by this module.""" return None def embedded_css(self): """Returns a CSS string that will be embedded in the page.""" return None def css_files(self): """Returns a list of CSS files required by this module.""" return None def html_head(self): """Returns a CSS string that will be put in the <head/> element""" return None def html_body(self): """Returns an HTML string that will be put in the <body/> element""" return None def render_string(self, path, **kwargs): return self.handler.render_string(path, **kwargs) # ---------------------------------------------------- # 预定义接口类: URL 匹配 # 说明: # - URL 与 handler 映射 # ---------------------------------------------------- class URLSpec(object): """Specifies mappings between URLs and handlers.""" def __init__(self, pattern, handler_class, kwargs={}, name=None): """Creates a URLSpec. Parameters: pattern: Regular expression to be matched. Any groups in the regex will be passed in to the handler's get/post/etc methods as arguments. handler_class: RequestHandler subclass to be invoked. kwargs (optional): A dictionary of additional arguments to be passed to the handler's constructor. name (optional): A name for this handler. Used by Application.reverse_url. """ if not pattern.endswith('$'): pattern += '$' self.regex = re.compile(pattern) # 正则匹配 self.handler_class = handler_class self.kwargs = kwargs self.name = name self._path, self._group_count = self._find_groups() def _find_groups(self): """Returns a tuple (reverse string, group count) for a url. For example: Given the url pattern /([0-9]{4})/([a-z-]+)/, this method would return ('/%s/%s/', 2). """ pattern = self.regex.pattern if pattern.startswith('^'): pattern = pattern[1:] if pattern.endswith('$'): pattern = pattern[:-1] if self.regex.groups != pattern.count('('): # The pattern is too complicated for our simplistic matching, # so we can't support reversing it. return (None, None) pieces = [] for fragment in pattern.split('('): if ')' in fragment: paren_loc = fragment.index(')') if paren_loc >= 0: pieces.append('%s' + fragment[paren_loc + 1:]) else: pieces.append(fragment) return (''.join(pieces), self.regex.groups) def reverse(self, *args): assert self._path is not None, \ "Cannot reverse url regex " + self.regex.pattern assert len(args) == self._group_count, "required number of arguments "\ "not found" if not len(args): return self._path return self._path % tuple([str(a) for a in args]) url = URLSpec # ---------------------------------------------------- # UTF8 编码处理: 编码检查 # 代码逻辑: # - 若 s 是 unicode 字符串 # - 使用 UTF8编码,并返回 # - 若 s 不是 字符串类型, 直接报错 # - 若 s 是 ASCII 字符串, 直接返回 # ---------------------------------------------------- def _utf8(s): if isinstance(s, unicode): return s.encode("utf-8") assert isinstance(s, str) return s # ---------------------------------------------------- # unicode 编码处理: 编码检查 # 代码逻辑: # - 基本类似 _utf8() 函数 # ---------------------------------------------------- def _unicode(s): if isinstance(s, str): try: return s.decode("utf-8") except UnicodeDecodeError: raise HTTPError(400, "Non-utf8 argument") assert isinstance(s, unicode) return s def _time_independent_equals(a, b): if len(a) != len(b): return False result = 0 for x, y in zip(a, b): result |= ord(x) ^ ord(y) return result == 0 class _O(dict): """Makes a dictionary behave like an object.""" def __getattr__(self, name): try: return self[name] except KeyError: raise AttributeError(name) def __setattr__(self, name, value): self[name] = value
hhstore/tornado-annotated
src/tornado-1.0.0/tornado/web.py
Python
mit
66,814
[ 30522, 1001, 999, 1013, 2149, 2099, 1013, 8026, 1013, 4372, 2615, 18750, 1001, 1011, 1008, 30524, 100, 100, 1923, 100, 100, 100, 1760, 100, 1024, 1011, 100, 100, 100, 100, 1024, 1011, 11352, 1012, 4773, 1011, 11352, 1012, 22834, 4135, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
--- layout: page title: "SCGIS Webinar" order: 2 subtitle: "Amazing Uses of CartoDB" category: tlk date: 2014-02-05 12:00:00 author: 'Andrew Hill' length: 2 --- ### Amazing Uses of CartoDB #### Target Audience: novice mappers #### Objectives: * Tool audience is pretty solid accross disciplines * Integrations/Open Source advantage * Utility: Storytelling, Analysis/Reporting, making beautiful maps [View Slides here](https://speakerdeck.com/andrewxhill/scgis-webinar) [View Video Recording Here](https://www.youtube.com/watch?v=BRPyAJRCyhc)
ohasselblad/workshops
_posts/2015-02-05-scgis-webinar.md
Markdown
bsd-2-clause
548
[ 30522, 1011, 1011, 1011, 9621, 1024, 3931, 2516, 1024, 1000, 8040, 17701, 4773, 3981, 2099, 1000, 2344, 1024, 1016, 4942, 3775, 9286, 1024, 1000, 6429, 3594, 1997, 11122, 7716, 2497, 1000, 4696, 1024, 1056, 13687, 3058, 1024, 2297, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# PopGen 1.1 is A Synthetic Population Generator for Advanced # Microsimulation Models of Travel Demand # Copyright (C) 2009, Arizona State University # See PopGen/License DEFAULT_PERSON_PUMS2000_QUERIES = [ "alter table person_pums add column agep bigint", "alter table person_pums add column gender bigint", "alter table person_pums add column race bigint", "alter table person_pums add column employment bigint", "update person_pums set agep = 1 where age < 5", "update person_pums set agep = 2 where age >= 5 and age < 15", "update person_pums set agep = 3 where age >= 15 and age < 25", "update person_pums set agep = 4 where age >= 25 and age < 35", "update person_pums set agep = 5 where age >= 35 and age < 45", "update person_pums set agep = 6 where age >= 45 and age < 55", "update person_pums set agep = 7 where age >= 55 and age < 65", "update person_pums set agep = 8 where age >= 65 and age < 75", "update person_pums set agep = 9 where age >= 75 and age < 85", "update person_pums set agep = 10 where age >= 85", "update person_pums set gender = sex", "update person_pums set race = 1 where race1 = 1", "update person_pums set race = 2 where race1 = 2", "update person_pums set race = 3 where race1 >=3 and race1 <= 5", "update person_pums set race = 4 where race1 = 6", "update person_pums set race = 5 where race1 = 7", "update person_pums set race = 6 where race1 = 8", "update person_pums set race = 7 where race1 = 9", "update person_pums set employment = 1 where esr = 0", "update person_pums set employment = 2 where esr = 1 or esr = 2 or esr = 4 or esr = 5", "update person_pums set employment = 3 where esr = 3", "update person_pums set employment = 4 where esr = 6", "drop table person_sample", "create table person_sample select state, pumano, hhid, serialno, pnum, agep, gender, race, employment, relate from person_pums", "alter table person_sample add index(serialno, pnum)", "drop table hhld_sample_temp", "alter table hhld_sample drop column hhldrage", "alter table hhld_sample rename to hhld_sample_temp", "drop table hhld_sample", "create table hhld_sample select hhld_sample_temp.*, agep as hhldrage from hhld_sample_temp left join person_sample using(serialno) where relate = 1", "alter table hhld_sample add index(serialno)", "update hhld_sample set hhldrage = 1 where hhldrage <=7 ", "update hhld_sample set hhldrage = 2 where hhldrage >7"] DEFAULT_PERSON_PUMSACS_QUERIES = ["alter table person_pums change agep age bigint", "alter table person_pums change puma pumano bigint", "alter table person_pums change rac1p race1 bigint", "alter table person_pums change st state bigint", "alter table person_pums change sporder pnum bigint", "alter table person_pums change rel relate bigint", "alter table person_pums add column agep bigint", "alter table person_pums add column gender bigint", "alter table person_pums add column race bigint", "alter table person_pums add column employment bigint", "update person_pums set agep = 1 where age < 5", "update person_pums set agep = 2 where age >= 5 and age < 15", "update person_pums set agep = 3 where age >= 15 and age < 25", "update person_pums set agep = 4 where age >= 25 and age < 35", "update person_pums set agep = 5 where age >= 35 and age < 45", "update person_pums set agep = 6 where age >= 45 and age < 55", "update person_pums set agep = 7 where age >= 55 and age < 65", "update person_pums set agep = 8 where age >= 65 and age < 75", "update person_pums set agep = 9 where age >= 75 and age < 85", "update person_pums set agep = 10 where age >= 85", "update person_pums set gender = sex", "update person_pums set race = 1 where race1 = 1", "update person_pums set race = 2 where race1 = 2", "update person_pums set race = 3 where race1 >=3 and race1 <= 5", "update person_pums set race = 4 where race1 = 6", "update person_pums set race = 5 where race1 = 7", "update person_pums set race = 6 where race1 = 8", "update person_pums set race = 7 where race1 = 9", "update person_pums set employment = 1 where esr = 0", "update person_pums set employment = 2 where esr = 1 or esr = 2 or esr = 4 or esr = 5", "update person_pums set employment = 3 where esr = 3", "update person_pums set employment = 4 where esr = 6", "alter table person_pums add index(serialno)", "create table person_pums1 select person_pums.*, hhid from person_pums left join serialcorr using(serialno)", "update person_pums1 set serialno = hhid", "drop table person_sample", "create table person_sample select state, pumano, hhid, serialno, pnum, agep, gender, race, employment, relate from person_pums1", "alter table person_sample add index(serialno, pnum)", "drop table hhld_sample_temp", "alter table hhld_sample drop column hhldrage", "alter table hhld_sample rename to hhld_sample_temp", "drop table hhld_sample", "create table hhld_sample select hhld_sample_temp.*, agep as hhldrage from hhld_sample_temp left join person_sample using(serialno) where relate = 0", "alter table hhld_sample add index(serialno)", "update hhld_sample set hhldrage = 1 where hhldrage <=7 ", "update hhld_sample set hhldrage = 2 where hhldrage >7", "drop table hhld_sample_temp", "drop table person_pums1"] DEFAULT_HOUSING_PUMS2000_QUERIES = ["alter table housing_pums add index(serialno)", "alter table housing_pums add column hhtype bigint", "alter table housing_pums add column hhldtype bigint", "alter table housing_pums add column hhldinc bigint", "alter table housing_pums add column hhldtenure bigint", "alter table housing_pums add column hhldsize bigint", "alter table housing_pums add column childpresence bigint", "alter table housing_pums add column groupquarter bigint", "alter table housing_pums add column hhldfam bigint", "update housing_pums set hhtype = 1 where unittype = 0", "update housing_pums set hhtype = 2 where unittype = 1 or unittype = 2", "update housing_pums set hhldtype = 1 where hht = 1", "update housing_pums set hhldtype = 2 where hht = 2", "update housing_pums set hhldtype = 3 where hht = 3", "update housing_pums set hhldtype = 4 where hht = 4 or hht = 5", "update housing_pums set hhldtype = 5 where hht = 6 or hht = 7", "update housing_pums set hhldtype = -99 where hht = 0", "update housing_pums set hhldinc = 1 where hinc <15000", "update housing_pums set hhldinc = 2 where hinc >= 15000 and hinc < 25000", "update housing_pums set hhldinc = 3 where hinc >= 25000 and hinc < 35000", "update housing_pums set hhldinc = 4 where hinc >= 35000 and hinc < 45000", "update housing_pums set hhldinc = 5 where hinc >= 45000 and hinc < 60000", "update housing_pums set hhldinc = 6 where hinc >= 60000 and hinc < 100000", "update housing_pums set hhldinc = 7 where hinc >= 100000 and hinc < 150000", "update housing_pums set hhldinc = 8 where hinc >= 150000", "update housing_pums set hhldinc = -99 where hht = 0", #"update housing_pums set hhldtenure = 1 where tenure = 1 or tenure = 2", #"update housing_pums set hhldtenure = 2 where tenure = 3 or tenure = 4", #"update housing_pums set hhldtenure = -99 where tenure = 0", "update housing_pums set hhldsize = persons where persons < 7", "update housing_pums set hhldsize = 7 where persons >= 7", "update housing_pums set hhldsize = -99 where hht = 0", "update housing_pums set childpresence = 1 where noc > 0", "update housing_pums set childpresence = 2 where noc = 0", "update housing_pums set childpresence = -99 where hht = 0", "update housing_pums set groupquarter = unittype where unittype >0", "update housing_pums set groupquarter = -99 where unittype =0", "update housing_pums set hhldfam = 1 where hhldtype <=3", "update housing_pums set hhldfam = 2 where hhldtype > 3", "delete from housing_pums where persons = 0", "drop table hhld_sample", "drop table gq_sample", "create table hhld_sample select state, pumano, hhid, serialno, hhtype, hhldtype, hhldinc, hhldsize, childpresence, hhldfam from housing_pums where hhtype = 1", "create table gq_sample select state, pumano, hhid, serialno, hhtype, groupquarter from housing_pums where hhtype = 2", "alter table hhld_sample add index(serialno)", "alter table gq_sample add index(serialno)"] DEFAULT_HOUSING_PUMSACS_QUERIES = ["alter table housing_pums add index(serialno)", "alter table housing_pums change hincp hinc bigint", "alter table housing_pums change np persons bigint", "alter table housing_pums change hupaoc noc bigint", "alter table housing_pums change type unittype bigint", "alter table housing_pums change st state bigint", "alter table housing_pums change puma pumano bigint", "alter table housing_pums add column hhtype bigint", "alter table housing_pums add column hhldtype bigint", "alter table housing_pums add column hhldinc bigint", "alter table housing_pums add column hhldtenure bigint", "alter table housing_pums add column hhldsize bigint", "alter table housing_pums add column childpresence bigint", "alter table housing_pums add column groupquarter bigint", "alter table housing_pums add column hhldfam bigint", "update housing_pums set hhtype = 1 where unittype = 1", "update housing_pums set hhtype = 2 where unittype = 2 or unittype = 3", "update housing_pums set hhldtype = 1 where hht = 1", "update housing_pums set hhldtype = 2 where hht = 2", "update housing_pums set hhldtype = 3 where hht = 3", "update housing_pums set hhldtype = 4 where hht = 4 or hht = 6", "update housing_pums set hhldtype = 5 where hht = 5 or hht = 7", "update housing_pums set hhldtype = -99 where hht = 0", "update housing_pums set hhldinc = 1 where hinc <15000", "update housing_pums set hhldinc = 2 where hinc >= 15000 and hinc < 25000", "update housing_pums set hhldinc = 3 where hinc >= 25000 and hinc < 35000", "update housing_pums set hhldinc = 4 where hinc >= 35000 and hinc < 45000", "update housing_pums set hhldinc = 5 where hinc >= 45000 and hinc < 60000", "update housing_pums set hhldinc = 6 where hinc >= 60000 and hinc < 100000", "update housing_pums set hhldinc = 7 where hinc >= 100000 and hinc < 150000", "update housing_pums set hhldinc = 8 where hinc >= 150000", "update housing_pums set hhldinc = -99 where hht = 0", #"update housing_pums set hhldtenure = 1 where tenure = 1 or tenure = 2", #"update housing_pums set hhldtenure = 2 where tenure = 3 or tenure = 4", #"update housing_pums set hhldtenure = -99 where tenure = 0", "update housing_pums set hhldsize = persons where persons < 7", "update housing_pums set hhldsize = 7 where persons >= 7", "update housing_pums set hhldsize = -99 where hht = 0", "update housing_pums set childpresence = 1 where noc =1 or noc = 2 or noc = 3", "update housing_pums set childpresence = 2 where noc = 4", "update housing_pums set childpresence = -99 where hht = 0", "update housing_pums set groupquarter = 1 where unittype >1", "update housing_pums set groupquarter = -99 where unittype =1", "update housing_pums set hhldfam = 1 where hhldtype <=3", "update housing_pums set hhldfam = 2 where hhldtype > 3", "delete from housing_pums where persons = 0", "drop table serialcorr", "create table serialcorr select state, pumano, serialno from housing_pums group by serialno", "alter table serialcorr add column hhid bigint primary key auto_increment not null", "alter table serialcorr add index(serialno)", "drop table hhld_sample", "drop table gq_sample", "alter table housing_pums add index(serialno)", "create table housing_pums1 select housing_pums.*, hhid from housing_pums left join serialcorr using(serialno)", "update housing_pums1 set serialno = hhid", "create table hhld_sample select state, pumano, hhid, serialno, hhtype, hhldtype, hhldinc, hhldsize, childpresence, hhldfam from housing_pums1 where hhtype = 1", "create table gq_sample select state, pumano, hhid, serialno, hhtype, groupquarter from housing_pums1 where hhtype = 2", "alter table hhld_sample add index(serialno)", "alter table gq_sample add index(serialno)", "drop table housing_pums1"] DEFAULT_SF2000_QUERIES = ["alter table %s add column agep1 bigint", "alter table %s add column agep2 bigint", "alter table %s add column agep3 bigint", "alter table %s add column agep4 bigint", "alter table %s add column agep5 bigint", "alter table %s add column agep6 bigint", "alter table %s add column agep7 bigint", "alter table %s add column agep8 bigint", "alter table %s add column agep9 bigint", "alter table %s add column agep10 bigint", "alter table %s add column gender1 bigint", "alter table %s add column gender2 bigint", "alter table %s add column race1 bigint", "alter table %s add column race2 bigint", "alter table %s add column race3 bigint", "alter table %s add column race4 bigint", "alter table %s add column race5 bigint", "alter table %s add column race6 bigint", "alter table %s add column race7 bigint", "alter table %s add column employment1 bigint", "alter table %s add column employment2 bigint", "alter table %s add column employment3 bigint", "alter table %s add column employment4 bigint", "alter table %s add column childpresence1 bigint", "alter table %s add column childpresence2 bigint", "alter table %s add column groupquarter1 bigint", "alter table %s add column groupquarter2 bigint", "alter table %s add column hhldinc1 bigint", "alter table %s add column hhldinc2 bigint", "alter table %s add column hhldinc3 bigint", "alter table %s add column hhldinc4 bigint", "alter table %s add column hhldinc5 bigint", "alter table %s add column hhldinc6 bigint", "alter table %s add column hhldinc7 bigint", "alter table %s add column hhldinc8 bigint", "alter table %s add column hhldsize1 bigint", "alter table %s add column hhldsize2 bigint", "alter table %s add column hhldsize3 bigint", "alter table %s add column hhldsize4 bigint", "alter table %s add column hhldsize5 bigint", "alter table %s add column hhldsize6 bigint", "alter table %s add column hhldsize7 bigint", "alter table %s add column hhldtype1 bigint", "alter table %s add column hhldtype2 bigint", "alter table %s add column hhldtype3 bigint", "alter table %s add column hhldtype4 bigint", "alter table %s add column hhldtype5 bigint", "alter table %s add column hhldrage1 bigint", "alter table %s add column hhldrage2 bigint", "alter table %s add column hhldfam1 bigint", "alter table %s add column hhldfam2 bigint", "update %s set agep1 = (P008003+P008004+P008005+P008006+P008007) + (P008042+P008043+P008044+P008045+P008046)", "update %s set agep2 = (P008008+P008009+P008010+P008011+P008012+P008013+P008014+P008015+P008016+P008017 ) + (P008047+P008048+P008049+P008050+P008051+P008052+P008053+P008054+P008055+P008056)", "update %s set agep3 = (P008018+P008019+P008020+P008021+P008022+P008023+P008024+P008025 ) + (P008057+P008058+P008059+P008060+P008061+P008062+P008063+P008064)", "update %s set agep4 = (P008026+P008027) + (P008065+P008066)", "update %s set agep5 = (P008028+P008029) + (P008067+P008068)", "update %s set agep6 = (P008030+P008031) + (P008069+P008070)", "update %s set agep7 = (P008032+P008033+P008034) + (P008071+P008072+P008073)", "update %s set agep8 = (P008035+P008036+P008037) + (P008074+P008075+P008076)", "update %s set agep9 = (P008038+P008039) + (P008077+P008078)", "update %s set agep10 = (P008040) + (P008079)", "update %s set gender1 = P008002", "update %s set gender2 = P008041", "update %s set race1 = P006002", "update %s set race2 = P006003", "update %s set race3 = P006004", "update %s set race4 = P006005", "update %s set race5 = P006006", "update %s set race6 = P006007", "update %s set race7 = P006008", "update %s set employment1 = agep1+agep2+P008018+P008057", "update %s set employment2 = P043004+P043006+P043011+P043013", "update %s set employment3 = P043007+P043014", "update %s set employment4 = P043008+P043015", "update %s set childpresence1 = P010008 + P010012 + P010015", "update %s set childpresence2 = P010009 + P010013 + P010016 + P010017 + P010002", "update %s set groupquarter1 = P009026", "update %s set groupquarter2 = P009027", "update %s set hhldinc1 = P052002 + P052003", "update %s set hhldinc2 = P052004 + P052005", "update %s set hhldinc3 = P052006 + P052007", "update %s set hhldinc4 = P052008 + P052009", "update %s set hhldinc5 = P052010 + P052011", "update %s set hhldinc6 = P052012 + P052013", "update %s set hhldinc7 = P052014 + P052015", "update %s set hhldinc8 = P052016 + P052017", "update %s set hhldsize1 = P014010 ", "update %s set hhldsize2 = P014003+P014011 ", "update %s set hhldsize3 = P014004+P014012 ", "update %s set hhldsize4 = P014005+P014013 ", "update %s set hhldsize5 = P014006+P014014 ", "update %s set hhldsize6 = P014007+P014015 ", "update %s set hhldsize7 = P014008+P014016 ", "update %s set hhldtype1 = P010007", "update %s set hhldtype2 = P010011 ", "update %s set hhldtype3 = P010014", "update %s set hhldtype4 = P010002", "update %s set hhldtype5 = P010017", "update %s set hhldrage1 = P012002", "update %s set hhldrage2 = P012017", "update %s set hhldfam1 = hhldtype1 + hhldtype2 + hhldtype3", "update %s set hhldfam2 = hhldtype4 + hhldtype5", "drop table hhld_marginals", "drop table gq_marginals", "drop table person_marginals", """create table hhld_marginals select state, county, tract, bg, hhldinc1, hhldinc2, hhldinc3, hhldinc4, hhldinc5, hhldinc6, hhldinc7, hhldinc8,""" """hhldsize1, hhldsize2, hhldsize3, hhldsize4, hhldsize5, hhldsize6, hhldsize7, hhldtype1, hhldtype2, hhldtype3, hhldtype4, hhldtype5,""" """childpresence1, childpresence2, hhldrage1, hhldrage2, hhldfam1, hhldfam2 from %s""", "create table gq_marginals select state, county, tract, bg, groupquarter1, groupquarter2 from %s", """create table person_marginals select state, county, tract, bg, agep1, agep2, agep3, agep4, agep5, agep6, agep7, agep8, agep9, agep10,""" """gender1, gender2, race1, race2, race3, race4, race5, race6, race7, employment1, employment2, employment3, employment4 from""" """ %s"""] DEFAULT_SFACS_QUERIES = ["alter table %s add column agep1 bigint", "alter table %s add column agep2 bigint", "alter table %s add column agep3 bigint", "alter table %s add column agep4 bigint", "alter table %s add column agep5 bigint", "alter table %s add column agep6 bigint", "alter table %s add column agep7 bigint", "alter table %s add column agep8 bigint", "alter table %s add column agep9 bigint", "alter table %s add column agep10 bigint", "alter table %s add column gender1 bigint", "alter table %s add column gender2 bigint", "alter table %s add column race1 bigint", "alter table %s add column race2 bigint", "alter table %s add column race3 bigint", "alter table %s add column race4 bigint", "alter table %s add column race5 bigint", "alter table %s add column race6 bigint", "alter table %s add column race7 bigint", "alter table %s add column race11 bigint", "alter table %s add column race12 bigint", "alter table %s add column race13 bigint", "alter table %s add column race14 bigint", "alter table %s add column race15 bigint", "alter table %s add column race16 bigint", "alter table %s add column race17 bigint", "alter table %s add column race21 bigint", "alter table %s add column race22 bigint", "alter table %s add column race23 bigint", "alter table %s add column race24 bigint", "alter table %s add column race25 bigint", "alter table %s add column race26 bigint", "alter table %s add column race27 bigint", "alter table %s add column employment1 bigint", "alter table %s add column employment2 bigint", "alter table %s add column employment3 bigint", "alter table %s add column employment4 bigint", "alter table %s add column childpresence1 bigint", "alter table %s add column childpresence2 bigint", "alter table %s add column groupquarter1 bigint", "alter table %s add column hhldinc1 bigint", "alter table %s add column hhldinc2 bigint", "alter table %s add column hhldinc3 bigint", "alter table %s add column hhldinc4 bigint", "alter table %s add column hhldinc5 bigint", "alter table %s add column hhldinc6 bigint", "alter table %s add column hhldinc7 bigint", "alter table %s add column hhldinc8 bigint", "alter table %s add column hhldsize1 bigint", "alter table %s add column hhldsize2 bigint", "alter table %s add column hhldsize3 bigint", "alter table %s add column hhldsize4 bigint", "alter table %s add column hhldsize5 bigint", "alter table %s add column hhldsize6 bigint", "alter table %s add column hhldsize7 bigint", "alter table %s add column hhldtype1 bigint", "alter table %s add column hhldtype2 bigint", "alter table %s add column hhldtype3 bigint", "alter table %s add column hhldtype4 bigint", "alter table %s add column hhldtype5 bigint", "alter table %s add column hhldrage1 bigint", "alter table %s add column hhldrage2 bigint", "alter table %s add column hhldfam1 bigint", "alter table %s add column hhldfam2 bigint", "alter table %s add column check_gender bigint", "alter table %s add column check_age bigint", "alter table %s add column check_race bigint", "alter table %s add column check_race1 bigint", "alter table %s add column check_race2 bigint", "alter table %s add column check_employment bigint", "alter table %s add column check_type bigint", "alter table %s add column check_size bigint", "alter table %s add column check_fam bigint", "alter table %s add column check_hhldrage bigint", "alter table %s add column check_inc bigint", "alter table %s add column check_child bigint", "update %s set agep1 = (B01001000003)+(B01001000027)", "update %s set agep2 = (B01001000004+B01001000005) + (B01001000028+B01001000029)", "update %s set agep3 = (B01001000006+B01001000007+B01001000008+B01001000009+B01001000010) + (B01001000030+B01001000031+B01001000032+B01001000033+B01001000034)", "update %s set agep4 = (B01001000011+B01001000012) + (B01001000035+B01001000036)", "update %s set agep5 = (B01001000013+B01001000014) + (B01001000037+B01001000038)", "update %s set agep6 = (B01001000015+B01001000016) + (B01001000039+B01001000040)", "update %s set agep7 = (B01001000017+B01001000018+B01001000019) + (B01001000041+B01001000042+B01001000043)", "update %s set agep8 = (B01001000020+B01001000021+B01001000022) + (B01001000044+B01001000045+B01001000046)", "update %s set agep9 = (B01001000023+B01001000024) + (B01001000047+B01001000048)", "update %s set agep10 = (B01001000025) + (B01001000049)", "update %s set gender1 = B01001000002", "update %s set gender2 = B01001000026", "update %s set race1 = B02001000002", "update %s set race2 = B02001000003", "update %s set race3 = B02001000004", "update %s set race4 = B02001000005", "update %s set race5 = B02001000006", "update %s set race6 = B02001000007", "update %s set race7 = B02001000009+B02001000010", "update %s set race11 = C01001A00001", "update %s set race12 = C01001B00001", "update %s set race13 = C01001C00001", "update %s set race14 = C01001D00001", "update %s set race15 = C01001E00001", "update %s set race16 = C01001F00001", "update %s set race17 = C01001G00001", "update %s set race21 = B01001A00001", "update %s set race22 = B01001B00001", "update %s set race23 = B01001C00001", "update %s set race24 = B01001D00001", "update %s set race25 = B01001E00001", "update %s set race26 = B01001F00001", "update %s set race27 = B01001G00001", """update %s set employment2 = (B23001000005 + B23001000007) + (B23001000012 + B23001000014) + """ """(B23001000019 + B23001000021) + (B23001000026 + B23001000028) + (B23001000033 + B23001000035) + """ """(B23001000040 + B23001000042) + (B23001000047 + B23001000049) + (B23001000054 + B23001000056) + """ """(B23001000061 + B23001000063) + (B23001000068 + B23001000070) + (B23001000075 + B23001000080 + B23001000085) + """ """(B23001000091 + B23001000093) + (B23001000098 + B23001000100) + """ """(B23001000105 + B23001000107) + (B23001000112 + B23001000114) + (B23001000119 + B23001000121) + """ """(B23001000126 + B23001000128) + (B23001000133 + B23001000135) + (B23001000140 + B23001000142) + """ """(B23001000147 + B23001000149) + (B23001000154 + B23001000156) + (B23001000161 + B23001000166 + B23001000171)""", """update %s set employment3 = (B23001000008 + B23001000015 + B23001000022 + """ """B23001000029 + B23001000036 + B23001000043 + B23001000050 + B23001000057 + B23001000064 +""" """B23001000071 + B23001000076 + B23001000081 + B23001000086 + B23001000094 + B23001000101 +""" """B23001000108 + B23001000115 + B23001000122 + B23001000129 + B23001000136 + B23001000143 +""" """B23001000150 + B23001000157 + B23001000162 + B23001000167 + B23001000172) """, """update %s set employment4 = (B23001000009 + B23001000016 + B23001000023 + """ """B23001000030 + B23001000037 + B23001000044 + B23001000051 + B23001000058 + B23001000065 +""" """B23001000072 + B23001000077 + B23001000082 + B23001000087 + B23001000095 + B23001000102 +""" """B23001000109 + B23001000116 + B23001000123 + B23001000130 + B23001000137 + B23001000144 +""" """B23001000151 + B23001000158 + B23001000163 + B23001000168 + B23001000173) """, "update %s set employment1 = gender1 + gender2 - employment2 - employment3 - employment4", "update %s set groupquarter1 = B26001000001", "update %s set hhldinc1 = B19001000002 + B19001000003", "update %s set hhldinc2 = B19001000004 + B19001000005", "update %s set hhldinc3 = B19001000006 + B19001000007", "update %s set hhldinc4 = B19001000008 + B19001000009", "update %s set hhldinc5 = B19001000010 + B19001000011", "update %s set hhldinc6 = B19001000012 + B19001000013", "update %s set hhldinc7 = B19001000014 + B19001000015", "update %s set hhldinc8 = B19001000016 + B19001000017", "update %s set hhldsize1 = B25009000003+B25009000011", "update %s set hhldsize2 = B25009000004+B25009000012", "update %s set hhldsize3 = B25009000005+B25009000013", "update %s set hhldsize4 = B25009000006+B25009000014", "update %s set hhldsize5 = B25009000007+B25009000015", "update %s set hhldsize6 = B25009000008+B25009000016", "update %s set hhldsize7 = B25009000009+B25009000017", "update %s set hhldtype1 = B11001000003", "update %s set hhldtype2 = B11001000005", "update %s set hhldtype3 = B11001000006", "update %s set hhldtype4 = B11001000008", "update %s set hhldtype5 = B11001000009", """update %s set hhldrage1 = (B25007000003+B25007000004+B25007000005+B25007000006+B25007000007+B25007000008)+""" """(B25007000013+B25007000014+B25007000015+B25007000016+B25007000017+B25007000018)""", "update %s set hhldrage2 = (B25007000009+ B25007000010+B25007000011)+(B25007000019+ B25007000020+B25007000021)", "update %s set hhldfam1 = hhldtype1 + hhldtype2 + hhldtype3", "update %s set hhldfam2 = hhldtype4 + hhldtype5", "update %s set childpresence1 = C23007000002", "update %s set childpresence2 = C23007000017 + hhldtype4 + hhldtype5", "update %s set check_gender = gender1 + gender2", "update %s set check_age = agep1+agep2+agep3+agep4+agep5+agep6+agep7+agep8+agep9+agep10", "update %s set check_race = race1+race2+race3+race4+race5+race6+race7", "update %s set check_race1 = race11+race12+race13+race14+race15+race16+race17", "update %s set check_race2 = race21+race22+race23+race24+race25+race26+race27", "update %s set check_employment = employment1 + employment2 + employment3 + employment4", "update %s set check_type = hhldtype1+hhldtype2+hhldtype3+hhldtype4+hhldtype5", "update %s set check_size = hhldsize1+hhldsize2+hhldsize3+hhldsize4+hhldsize5+hhldsize6+hhldsize7", "update %s set check_hhldrage = hhldrage1+hhldrage2", "update %s set check_inc = hhldinc1+hhldinc2+hhldinc3+hhldinc4+hhldinc5+hhldinc6+hhldinc7+hhldinc8", "update %s set check_fam = hhldfam1+hhldfam2", "update %s set check_child = childpresence1+childpresence2", "drop table hhld_marginals", "drop table gq_marginals", "drop table person_marginals", """create table hhld_marginals select state, county, tract, bg, hhldinc1, hhldinc2, hhldinc3, hhldinc4, hhldinc5, hhldinc6, hhldinc7, hhldinc8,""" """hhldsize1, hhldsize2, hhldsize3, hhldsize4, hhldsize5, hhldsize6, hhldsize7, hhldtype1, hhldtype2, hhldtype3, hhldtype4, hhldtype5,""" """childpresence1, childpresence2, hhldrage1, hhldrage2, hhldfam1, hhldfam2 from %s""", "create table gq_marginals select state, county, tract, bg, groupquarter1 from %s", """create table person_marginals select state, county, tract, bg, agep1, agep2, agep3, agep4, agep5, agep6, agep7, agep8, agep9, agep10,""" """gender1, gender2, race1, race2, race3, race4, race5, race6, race7 from %s"""]
christianurich/VIBe2UrbanSim
3rdparty/opus/src/synthesizer/gui/default_census_cat_transforms.py
Python
gpl-2.0
42,838
[ 30522, 1001, 3769, 6914, 1015, 1012, 1015, 2003, 1037, 12553, 2313, 13103, 2005, 3935, 1001, 12702, 5332, 12274, 13490, 4275, 1997, 3604, 5157, 1001, 9385, 1006, 1039, 1007, 2268, 1010, 5334, 2110, 2118, 1001, 2156, 3769, 6914, 1013, 6105, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* * @test * @summary Test subtyping for wildcards with related type bounds. * * @compile/fail/ref=AssignmentDifferentTypes.out -XDrawDiagnostics AssignmentDifferentTypes.java */ public class AssignmentDifferentTypes { public static void main(String[] args) { Ref<Der> derexact = null; Ref<Base> baseexact = null; Ref<? extends Der> derext = null; Ref<? extends Base> baseext = null; Ref<? super Der> dersuper = null; Ref<? super Base> basesuper = null; baseext = derext; // <<pass>> <? extends Base> = <? extends Der> baseext = derexact; // <<pass>> <? extends Base> = <Der> dersuper = basesuper; // <<pass>> <? super Der> = <? super Base> dersuper = baseexact; // <<pass>> <? super Der> = <Base> derexact = baseexact; // <<fail>> <Der> = <Base> baseexact = derexact; // <<fail>> <Base> = <Der> derext = baseext; // <<fail>> <? extends Der> = <? extends Base> derext = baseexact; // <<fail>> <? extends Der> = <Base> derext = basesuper; // <<fail>> <? extends Der> = <? super Base> baseext = dersuper; // <<fail>> <? extends Base> = <? super Der> basesuper = dersuper; // <<fail>> <? super Base> = <? super Der> basesuper = derexact; // <<fail>> <? super Base> = <Der> } } class Ref<T> {} class Base {} class Der extends Base {}
FauxFaux/jdk9-langtools
test/tools/javac/generics/wildcards/AssignmentDifferentTypes.java
Java
gpl-2.0
2,490
[ 30522, 1013, 1008, 1008, 9385, 1006, 1039, 1007, 2494, 1010, 2325, 1010, 14721, 1998, 1013, 2030, 2049, 18460, 1012, 2035, 2916, 9235, 1012, 1008, 2079, 2025, 11477, 2030, 6366, 9385, 14444, 2030, 2023, 5371, 20346, 1012, 1008, 1008, 2023, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_21) on Wed Nov 12 14:55:37 EST 2014 --> <TITLE> org.eclipse.mylyn.wikitext.markdown.core </TITLE> <META NAME="date" CONTENT="2014-11-12"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"> </HEAD> <BODY BGCOLOR="white"> <FONT size="+1" CLASS="FrameTitleFont"> <A HREF="../../../../../../org/eclipse/mylyn/wikitext/markdown/core/package-summary.html" target="classFrame">org.eclipse.mylyn.wikitext.markdown.core</A></FONT> <TABLE BORDER="0" WIDTH="100%" SUMMARY=""> <TR> <TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont"> Classes</FONT>&nbsp; <FONT CLASS="FrameItemFont"> <BR> <A HREF="MarkdownLanguage.html" title="class in org.eclipse.mylyn.wikitext.markdown.core" target="classFrame">MarkdownLanguage</A></FONT></TD> </TR> </TABLE> </BODY> </HTML>
elelpublic/wikitext-all
apidoc/org/eclipse/mylyn/wikitext/markdown/core/package-frame.html
HTML
epl-1.0
974
[ 30522, 1026, 999, 9986, 13874, 16129, 2270, 1000, 1011, 1013, 1013, 1059, 2509, 2278, 1013, 1013, 26718, 2094, 16129, 1018, 1012, 5890, 17459, 1013, 1013, 4372, 1000, 1000, 8299, 1024, 1013, 1013, 7479, 1012, 1059, 2509, 1012, 8917, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
module MailItemsHelper end
xsunsmile/smartmail
app/helpers/mail_items_helper.rb
Ruby
mit
27
[ 30522, 11336, 5653, 4221, 5244, 16001, 4842, 2203, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
import { Accessor, AnimationSampler, Document, Root, Transform, TransformContext } from '@gltf-transform/core'; import { createTransform, isTransformPending } from './utils'; const NAME = 'resample'; export interface ResampleOptions {tolerance?: number} const RESAMPLE_DEFAULTS: Required<ResampleOptions> = {tolerance: 1e-4}; /** * Resample {@link Animation}s, losslessly deduplicating keyframes to reduce file size. Duplicate * keyframes are commonly present in animation 'baked' by the authoring software to apply IK * constraints or other software-specific features. Based on THREE.KeyframeTrack.optimize(). * * Example: (0,0,0,0,1,1,1,0,0,0,0,0,0,0) --> (0,0,1,1,0,0) */ export const resample = (_options: ResampleOptions = RESAMPLE_DEFAULTS): Transform => { const options = {...RESAMPLE_DEFAULTS, ..._options} as Required<ResampleOptions>; return createTransform(NAME, (doc: Document, context?: TransformContext): void => { const accessorsVisited = new Set<Accessor>(); const accessorsCountPrev = doc.getRoot().listAccessors().length; const logger = doc.getLogger(); let didSkipMorphTargets = false; for (const animation of doc.getRoot().listAnimations()) { // Skip morph targets, see https://github.com/donmccurdy/glTF-Transform/issues/290. const morphTargetSamplers = new Set<AnimationSampler>(); for (const channel of animation.listChannels()) { if (channel.getSampler() && channel.getTargetPath() === 'weights') { morphTargetSamplers.add(channel.getSampler()!); } } for (const sampler of animation.listSamplers()) { if (morphTargetSamplers.has(sampler)) { didSkipMorphTargets = true; continue; } if (sampler.getInterpolation() === 'STEP' || sampler.getInterpolation() === 'LINEAR') { accessorsVisited.add(sampler.getInput()!); accessorsVisited.add(sampler.getOutput()!); optimize(sampler, options); } } } for (const accessor of Array.from(accessorsVisited.values())) { const used = accessor.listParents().some((p) => !(p instanceof Root)); if (!used) accessor.dispose(); } if (doc.getRoot().listAccessors().length > accessorsCountPrev && !isTransformPending(context, NAME, 'dedup')) { logger.warn( `${NAME}: Resampling required copying accessors, some of which may be duplicates.` + ' Consider using "dedup" to consolidate any duplicates.' ); } if (didSkipMorphTargets) { logger.warn(`${NAME}: Skipped optimizing morph target keyframes, not yet supported.`); } logger.debug(`${NAME}: Complete.`); }); }; function optimize (sampler: AnimationSampler, options: ResampleOptions): void { const input = sampler.getInput()!.clone(); const output = sampler.getOutput()!.clone(); const tolerance = options.tolerance as number; const lastIndex = input.getCount() - 1; const tmp: number[] = []; let writeIndex = 1; for (let i = 1; i < lastIndex; ++ i) { const time = input.getScalar(i); const timePrev = input.getScalar(i - 1); const timeNext = input.getScalar(i + 1); const timeMix = (time - timePrev) / (timeNext - timePrev); let keep = false; // Remove unnecessary adjacent keyframes. if (time !== timeNext && (i !== 1 || time !== input.getScalar(0))) { for (let j = 0; j < output.getElementSize(); j++) { const value = output.getElement(i, tmp)[j]; const valuePrev = output.getElement(i - 1, tmp)[j]; const valueNext = output.getElement(i + 1, tmp)[j]; if (sampler.getInterpolation() === 'LINEAR') { // Prune keyframes that are colinear with prev/next keyframes. if (Math.abs(value - lerp(valuePrev, valueNext, timeMix)) > tolerance) { keep = true; break; } } else if (sampler.getInterpolation() === 'STEP') { // Prune keyframes that are identical to prev/next keyframes. if (value !== valuePrev || value !== valueNext) { keep = true; break; } } } } // In-place compaction. if (keep) { if (i !== writeIndex) { input.setScalar(writeIndex, input.getScalar(i)); output.setElement(writeIndex, output.getElement(i, tmp)); } writeIndex++; } } // Flush last keyframe (compaction looks ahead). if (lastIndex > 0) { input.setScalar(writeIndex, input.getScalar(lastIndex)); output.setElement(writeIndex, output.getElement(lastIndex, tmp)); writeIndex++; } // If the sampler was optimized, truncate and save the results. If not, clean up. if (writeIndex !== input.getCount()) { input.setArray(input.getArray()!.slice(0, writeIndex)); output.setArray(output.getArray()!.slice(0, writeIndex * output.getElementSize())); sampler.setInput(input); sampler.setOutput(output); } else { input.dispose(); output.dispose(); } } function lerp (v0: number, v1: number, t: number): number { return v0 * (1 - t) + v1 * t; }
damienmortini/dlib
node_modules/@gltf-transform/functions/src/resample.ts
TypeScript
isc
4,825
[ 30522, 12324, 1063, 3229, 2953, 1010, 7284, 21559, 10814, 2099, 1010, 6254, 1010, 7117, 1010, 10938, 1010, 10938, 8663, 18209, 1065, 2013, 1005, 1030, 1043, 7096, 2546, 1011, 10938, 1013, 4563, 1005, 1025, 12324, 1063, 3443, 6494, 3619, 141...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package cn.jzvd.demo; import android.content.Context; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.LayoutInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.AbsListView; import android.widget.BaseAdapter; import android.widget.ListView; import android.widget.TextView; import com.bumptech.glide.Glide; import cn.jzvd.Jzvd; import cn.jzvd.JzvdStd; /** * Created by Nathen * On 2016/05/23 21:34 */ public class ActivityListViewMultiHolder extends AppCompatActivity { ListView listView; VideoListAdapter mAdapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_listview_normal); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayShowHomeEnabled(true); getSupportActionBar().setDisplayShowTitleEnabled(true); getSupportActionBar().setDisplayUseLogoEnabled(false); getSupportActionBar().setTitle("MultiHolderListView"); listView = findViewById(R.id.listview); mAdapter = new VideoListAdapter(this); listView.setAdapter(mAdapter); listView.setOnScrollListener(new AbsListView.OnScrollListener() { @Override public void onScrollStateChanged(AbsListView view, int scrollState) { } @Override public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { if (Jzvd.CURRENT_JZVD == null) return; int lastVisibleItem = firstVisibleItem + visibleItemCount; int currentPlayPosition = Jzvd.CURRENT_JZVD.positionInList; // Log.e(TAG, "onScrollReleaseAllVideos: " + // currentPlayPosition + " " + firstVisibleItem + " " + currentPlayPosition + " " + lastVisibleItem); if (currentPlayPosition >= 0) { if ((currentPlayPosition < firstVisibleItem || currentPlayPosition > (lastVisibleItem - 1))) { if (Jzvd.CURRENT_JZVD.screen != Jzvd.SCREEN_FULLSCREEN) { Jzvd.releaseAllVideos();//为什么最后一个视频横屏会调用这个,其他地方不会 } } } } }); } @Override public void onBackPressed() { if (Jzvd.backPress()) { return; } super.onBackPressed(); } @Override protected void onPause() { super.onPause(); Jzvd.releaseAllVideos(); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: finish(); break; } return super.onOptionsItemSelected(item); } public class VideoListAdapter extends BaseAdapter { int[] viewtype = {0, 0, 0, 1, 0, 0, 0, 1, 0, 0};//1 = jzvdStd, 0 = textView Context context; LayoutInflater mInflater; public VideoListAdapter(Context context) { this.context = context; mInflater = LayoutInflater.from(context); } @Override public int getCount() { return viewtype.length; } @Override public Object getItem(int position) { return null; } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { if (getItemViewType(position) == 1) { VideoHolder viewHolder; if (convertView != null && convertView.getTag() != null && convertView.getTag() instanceof VideoHolder) { viewHolder = (VideoHolder) convertView.getTag(); } else { viewHolder = new VideoHolder(); convertView = mInflater.inflate(R.layout.item_videoview, null); viewHolder.jzvdStd = convertView.findViewById(R.id.videoplayer); convertView.setTag(viewHolder); } viewHolder.jzvdStd.setUp( VideoConstant.videoUrls[0][position], VideoConstant.videoTitles[0][position], Jzvd.SCREEN_NORMAL); viewHolder.jzvdStd.positionInList = position; Glide.with(ActivityListViewMultiHolder.this) .load(VideoConstant.videoThumbs[0][position]) .into(viewHolder.jzvdStd.thumbImageView); } else { TextViewHolder textViewHolder; if (convertView != null && convertView.getTag() != null && convertView.getTag() instanceof TextViewHolder) { textViewHolder = (TextViewHolder) convertView.getTag(); } else { textViewHolder = new TextViewHolder(); LayoutInflater mInflater = LayoutInflater.from(context); convertView = mInflater.inflate(R.layout.item_textview, null); textViewHolder.textView = convertView.findViewById(R.id.textview); convertView.setTag(textViewHolder); } } return convertView; } @Override public int getItemViewType(int position) { return viewtype[position]; } @Override public int getViewTypeCount() { return 2; } class VideoHolder { JzvdStd jzvdStd; } class TextViewHolder { TextView textView; } } }
lipangit/JiaoZiVideoPlayer
app/src/main/java/cn/jzvd/demo/ActivityListViewMultiHolder.java
Java
mit
5,869
[ 30522, 7427, 27166, 1012, 1046, 2480, 16872, 1012, 9703, 1025, 12324, 11924, 1012, 4180, 1012, 6123, 1025, 12324, 11924, 1012, 9808, 1012, 14012, 1025, 12324, 11924, 1012, 2490, 1012, 1058, 2581, 1012, 10439, 1012, 10439, 9006, 4502, 2696, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
## breaking changes In an effort to solve namespace conflicts and to increase consistency among the plugins, [sbt plugins best practices](https://github.com/harrah/xsbt/wiki/Plugins-Best-Practices) was created. Here are the changes based on its recommendations: ### keys are under `ScalaxbKeys` object Keys provided by sbt-scalaxb now resides in `ScalaxbKeys` object. Place the following at the top of your `build.sbt`: import ScalaxbKeys._ Scala identifiers for the keys remain the same (e.g. `packageName`), but key names accessible from the shell are now prefixed with `scalaxb-` (e.g. `scalaxb-package-name`). ### settings are scoped under `scalaxb` task `scalaxb`-specific settings are now scoped under `scalaxb` task. The default settings `scalaxbSettings` is scoped additionally by `Compile` configuration (no more`Scalaxb` configuration!). seq(scalaxbSettings: _*) packageName in scalaxb in Compile := "ipo" sourceGenerators in Compile <+= scalaxb in Compile If you wish to use `scalaxb` task multiple times in a project, you can do so by creating custom configurations in `build.scala`. val Xsd = config("xsd") extend(Compile) val Wsdl = config("wsdl") extend(Compile) lazy val appSettings = buildSettings ++ inConfig(Xsd)(baseScalaxbSettings ++ inTask(scalaxb)(customScalaxbSettings("xmlschema"))) ++ inConfig(Wsdl)(baseScalaxbSettings ++ inTask(scalaxb)(customScalaxbSettings("wsdl11"))) def customScalaxbSettings(base: String): Seq[Project.Setting[_]] = Seq( sources <<= xsdSource map { xsd => Seq(xsd / (base + ".xsd")) }, packageName := base, ) ## bug fixes and minor enhancements - Fixes namespace binding conflict. [#84](https://github.com/eed3si9n/scalaxb/issues/84) reported and fixed by [jxstanford](https://github.com/jxstanford) - Fixes `anyType` support in wsdl. [#88](https://github.com/eed3si9n/scalaxb/issues/88) reported by [radirk](https://github.com/radirk) - Fixes `SOAPAction` header in wsdl. - Fixes `Fault` handling in wsdl. - Uses Logback internally for logging.
Fayho/scalaxb
notes/0.6.5.markdown
Markdown
mit
2,067
[ 30522, 1001, 1001, 4911, 3431, 1999, 2019, 3947, 2000, 9611, 3415, 15327, 9755, 1998, 2000, 3623, 18700, 2426, 1996, 13354, 7076, 1010, 1031, 24829, 2102, 13354, 7076, 2190, 6078, 1033, 1006, 16770, 1024, 1013, 1013, 21025, 2705, 12083, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// This file was generated based on '(multiple files)'. // WARNING: Changes might be lost if you edit this file directly. #include <Fuse.Drawing.Meshes.MeshGenerator.h> #include <Fuse.Entities.Mesh.h> #include <Fuse.Entities.MeshHitTestMode.h> #include <Fuse.Entities.Primitives.ConeRenderer.h> #include <Fuse.Entities.Primitives.CubeRenderer.h> #include <Fuse.Entities.Primitives.CylinderRenderer.h> #include <Fuse.Entities.Primitives.SphereRenderer.h> #include <Uno.Bool.h> #include <Uno.Content.Models.ModelMesh.h> #include <Uno.Float.h> #include <Uno.Float3.h> #include <Uno.Int.h> static uType* TYPES[1]; namespace g{ namespace Fuse{ namespace Entities{ namespace Primitives{ // C:\ProgramData\Uno\Packages\Fuse.Entities\0.18.8\$.uno(1788) // ------------------------------------------------------------ // public sealed class ConeRenderer :1788 // { ::g::Fuse::Entities::MeshRenderer_type* ConeRenderer_typeof() { static uSStrong< ::g::Fuse::Entities::MeshRenderer_type*> type; if (type != NULL) return type; uTypeOptions options; options.FieldCount = 6; options.ObjectSize = sizeof(ConeRenderer); options.TypeSize = sizeof(::g::Fuse::Entities::MeshRenderer_type); type = (::g::Fuse::Entities::MeshRenderer_type*)uClassType::New("Fuse.Entities.Primitives.ConeRenderer", options); type->SetBase(::g::Fuse::Entities::MeshRenderer_typeof()); type->fp_ctor_ = (void*)ConeRenderer__New2_fn; ::TYPES[0] = ::g::Fuse::Entities::MeshRenderer_typeof(); type->SetFields(6); type->Reflection.SetFunctions(1, new uFunction(".ctor", NULL, (void*)ConeRenderer__New2_fn, 0, true, ConeRenderer_typeof(), 0)); return type; } // public ConeRenderer() :1790 void ConeRenderer__ctor_2_fn(ConeRenderer* __this) { __this->ctor_2(); } // public ConeRenderer New() :1790 void ConeRenderer__New2_fn(ConeRenderer** __retval) { *__retval = ConeRenderer::New2(); } // public ConeRenderer() [instance] :1790 void ConeRenderer::ctor_2() { ctor_1(); Mesh(::g::Fuse::Entities::Mesh::New2(::g::Fuse::Drawing::Meshes::MeshGenerator::CreateCone(10.0f, 5.0f, 16, 16))); } // public ConeRenderer New() [static] :1790 ConeRenderer* ConeRenderer::New2() { ConeRenderer* obj1 = (ConeRenderer*)uNew(ConeRenderer_typeof()); obj1->ctor_2(); return obj1; } // } // C:\ProgramData\Uno\Packages\Fuse.Entities\0.18.8\$.uno(1729) // ------------------------------------------------------------ // public sealed class CubeRenderer :1729 // { ::g::Fuse::Entities::MeshRenderer_type* CubeRenderer_typeof() { static uSStrong< ::g::Fuse::Entities::MeshRenderer_type*> type; if (type != NULL) return type; uTypeOptions options; options.FieldCount = 6; options.ObjectSize = sizeof(CubeRenderer); options.TypeSize = sizeof(::g::Fuse::Entities::MeshRenderer_type); type = (::g::Fuse::Entities::MeshRenderer_type*)uClassType::New("Fuse.Entities.Primitives.CubeRenderer", options); type->SetBase(::g::Fuse::Entities::MeshRenderer_typeof()); type->fp_ctor_ = (void*)CubeRenderer__New2_fn; ::TYPES[0] = ::g::Fuse::Entities::MeshRenderer_typeof(); type->SetFields(6); type->Reflection.SetFunctions(1, new uFunction(".ctor", NULL, (void*)CubeRenderer__New2_fn, 0, true, CubeRenderer_typeof(), 0)); return type; } // public CubeRenderer() :1731 void CubeRenderer__ctor_2_fn(CubeRenderer* __this) { __this->ctor_2(); } // public CubeRenderer New() :1731 void CubeRenderer__New2_fn(CubeRenderer** __retval) { *__retval = CubeRenderer::New2(); } // public CubeRenderer() [instance] :1731 void CubeRenderer::ctor_2() { ctor_1(); Mesh(::g::Fuse::Entities::Mesh::New2(::g::Fuse::Drawing::Meshes::MeshGenerator::CreateCube(::g::Uno::Float3__New1(0.0f), 5.0f))); HitTestMode(1); } // public CubeRenderer New() [static] :1731 CubeRenderer* CubeRenderer::New2() { CubeRenderer* obj1 = (CubeRenderer*)uNew(CubeRenderer_typeof()); obj1->ctor_2(); return obj1; } // } // C:\ProgramData\Uno\Packages\Fuse.Entities\0.18.8\$.uno(1797) // ------------------------------------------------------------ // public sealed class CylinderRenderer :1797 // { ::g::Fuse::Entities::MeshRenderer_type* CylinderRenderer_typeof() { static uSStrong< ::g::Fuse::Entities::MeshRenderer_type*> type; if (type != NULL) return type; uTypeOptions options; options.FieldCount = 6; options.ObjectSize = sizeof(CylinderRenderer); options.TypeSize = sizeof(::g::Fuse::Entities::MeshRenderer_type); type = (::g::Fuse::Entities::MeshRenderer_type*)uClassType::New("Fuse.Entities.Primitives.CylinderRenderer", options); type->SetBase(::g::Fuse::Entities::MeshRenderer_typeof()); type->fp_ctor_ = (void*)CylinderRenderer__New2_fn; ::TYPES[0] = ::g::Fuse::Entities::MeshRenderer_typeof(); type->SetFields(6); type->Reflection.SetFunctions(1, new uFunction(".ctor", NULL, (void*)CylinderRenderer__New2_fn, 0, true, CylinderRenderer_typeof(), 0)); return type; } // public CylinderRenderer() :1799 void CylinderRenderer__ctor_2_fn(CylinderRenderer* __this) { __this->ctor_2(); } // public CylinderRenderer New() :1799 void CylinderRenderer__New2_fn(CylinderRenderer** __retval) { *__retval = CylinderRenderer::New2(); } // public CylinderRenderer() [instance] :1799 void CylinderRenderer::ctor_2() { ctor_1(); Mesh(::g::Fuse::Entities::Mesh::New2(::g::Fuse::Drawing::Meshes::MeshGenerator::CreateCylinder(10.0f, 5.0f, 16, 16))); } // public CylinderRenderer New() [static] :1799 CylinderRenderer* CylinderRenderer::New2() { CylinderRenderer* obj1 = (CylinderRenderer*)uNew(CylinderRenderer_typeof()); obj1->ctor_2(); return obj1; } // } // C:\ProgramData\Uno\Packages\Fuse.Entities\0.18.8\$.uno(1739) // ------------------------------------------------------------ // public sealed class SphereRenderer :1739 // { ::g::Fuse::Entities::MeshRenderer_type* SphereRenderer_typeof() { static uSStrong< ::g::Fuse::Entities::MeshRenderer_type*> type; if (type != NULL) return type; uTypeOptions options; options.FieldCount = 9; options.ObjectSize = sizeof(SphereRenderer); options.TypeSize = sizeof(::g::Fuse::Entities::MeshRenderer_type); type = (::g::Fuse::Entities::MeshRenderer_type*)uClassType::New("Fuse.Entities.Primitives.SphereRenderer", options); type->SetBase(::g::Fuse::Entities::MeshRenderer_typeof()); type->fp_ctor_ = (void*)SphereRenderer__New2_fn; type->fp_Validate = (void(*)(::g::Fuse::Entities::MeshRenderer*))SphereRenderer__Validate_fn; ::TYPES[0] = ::g::Fuse::Entities::MeshRenderer_typeof(); type->SetFields(6, ::g::Uno::Bool_typeof(), offsetof(::g::Fuse::Entities::Primitives::SphereRenderer, _isDirty), 0, ::g::Uno::Int_typeof(), offsetof(::g::Fuse::Entities::Primitives::SphereRenderer, _quality), 0, ::g::Uno::Float_typeof(), offsetof(::g::Fuse::Entities::Primitives::SphereRenderer, _radius), 0); type->Reflection.SetFunctions(5, new uFunction(".ctor", NULL, (void*)SphereRenderer__New2_fn, 0, true, SphereRenderer_typeof(), 0), new uFunction("get_Quality", NULL, (void*)SphereRenderer__get_Quality_fn, 0, false, ::g::Uno::Int_typeof(), 0), new uFunction("set_Quality", NULL, (void*)SphereRenderer__set_Quality_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::Int_typeof()), new uFunction("get_Radius", NULL, (void*)SphereRenderer__get_Radius_fn, 0, false, ::g::Uno::Float_typeof(), 0), new uFunction("set_Radius", NULL, (void*)SphereRenderer__set_Radius_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::Float_typeof())); return type; } // public SphereRenderer() :1771 void SphereRenderer__ctor_2_fn(SphereRenderer* __this) { __this->ctor_2(); } // public SphereRenderer New() :1771 void SphereRenderer__New2_fn(SphereRenderer** __retval) { *__retval = SphereRenderer::New2(); } // public int get_Quality() :1760 void SphereRenderer__get_Quality_fn(SphereRenderer* __this, int* __retval) { *__retval = __this->Quality(); } // public void set_Quality(int value) :1761 void SphereRenderer__set_Quality_fn(SphereRenderer* __this, int* value) { __this->Quality(*value); } // public float get_Radius() :1746 void SphereRenderer__get_Radius_fn(SphereRenderer* __this, float* __retval) { *__retval = __this->Radius(); } // public void set_Radius(float value) :1747 void SphereRenderer__set_Radius_fn(SphereRenderer* __this, float* value) { __this->Radius(*value); } // protected override sealed void Validate() :1776 void SphereRenderer__Validate_fn(SphereRenderer* __this) { if (__this->_isDirty || (__this->Mesh() == NULL)) { if (__this->Mesh() != NULL) uPtr(__this->Mesh())->Dispose(); __this->Mesh(::g::Fuse::Entities::Mesh::New2(::g::Fuse::Drawing::Meshes::MeshGenerator::CreateSphere(::g::Uno::Float3__New1(0.0f), __this->_radius, __this->_quality, __this->_quality))); __this->_isDirty = false; } } // public SphereRenderer() [instance] :1771 void SphereRenderer::ctor_2() { _radius = 5.0f; _quality = 16; ctor_1(); HitTestMode(2); } // public int get_Quality() [instance] :1760 int SphereRenderer::Quality() { return _quality; } // public void set_Quality(int value) [instance] :1761 void SphereRenderer::Quality(int value) { if (_quality != value) { _quality = value; _isDirty = true; } } // public float get_Radius() [instance] :1746 float SphereRenderer::Radius() { return _radius; } // public void set_Radius(float value) [instance] :1747 void SphereRenderer::Radius(float value) { if (_radius != value) { _radius = value; _isDirty = true; } } // public SphereRenderer New() [static] :1771 SphereRenderer* SphereRenderer::New2() { SphereRenderer* obj1 = (SphereRenderer*)uNew(SphereRenderer_typeof()); obj1->ctor_2(); return obj1; } // } }}}} // ::g::Fuse::Entities::Primitives
blyk/BlackCode-Fuse
TestApp/.build/Simulator/Android/jni/Fuse.Entities.Primitives.g.cpp
C++
mit
9,980
[ 30522, 1013, 1013, 2023, 5371, 2001, 7013, 2241, 2006, 1005, 1006, 3674, 6764, 1007, 1005, 1012, 1013, 1013, 5432, 1024, 3431, 2453, 2022, 2439, 2065, 2017, 10086, 2023, 5371, 3495, 1012, 1001, 2421, 1026, 19976, 1012, 5059, 1012, 20437, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" href="../../../style.css" type="text/css" media="screen"> <link rel="stylesheet" href="../../../print.css" type="text/css" media="print"> <meta content="MapMoveEvent,com.google.maps.MapMoveEvent,MOVE_END,MOVE_START,MOVE_STEP,latLng" name="keywords"> <title>com.google.maps.MapMoveEvent</title> </head> <body> <script type="text/javascript" language="javascript" src="../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../cookies.js"></script><script type="text/javascript" language="javascript"> <!-- asdocTitle = 'MapMoveEvent - Google Maps API for Flash Documentation'; var baseRef = '../../../'; window.onload = configPage; --></script> <table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable"> <tr> <td align="left" class="titleTableTitle">Google Maps API for Flash Documentation, Version 1.20</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?com/google/maps/MapMoveEvent.html&amp;com/google/maps/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../images/logo.jpg"></td> </tr> <tr class="titleTableRow2"> <td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;MapMoveEvent</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#constantSummary">Constants</a></td> </tr> <tr class="titleTableRow3"> <td colspan="2">&nbsp;</td> </tr> </table> <script type="text/javascript" language="javascript"> <!-- if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class MapMoveEvent"); titleBar_setSubNav(true,true,false,false,false,false,true,false,false,false,false,false,false,false);} --></script> <div class="MainContent"> <table cellspacing="0" cellpadding="0" class="classHeaderTable"> <tr> <td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.google.maps</a></td> </tr> <tr> <td class="classHeaderTableLabel">Class</td><td class="classSignature">public class MapMoveEvent</td> </tr> <tr> <td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">MapMoveEvent <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../images/inherit-arrow.gif"> <a href="MapEvent.html">MapEvent</a> <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../images/inherit-arrow.gif"> flash.events.Event</td> </tr> </table> <p></p> A MapMoveEvent object is dispatched into the event flow whenever the map view is changing. <p></p> <br> <hr> </div> <a name="propertySummary"></a> <div class="summarySection"> <div class="summaryTableTitle">Public Properties</div> <div class="showHideLinks"> <div class="hideInheritedProperty" id="hideInheritedProperty"> <a onclick="javascript:setInheritedVisible(false,'Property');" href="#propertySummary" class="showHideLink"><img src="../../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Public Properties</a> </div> <div class="showInheritedProperty" id="showInheritedProperty"> <a onclick="javascript:setInheritedVisible(true,'Property');" href="#propertySummary" class="showHideLink"><img src="../../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Public Properties</a> </div> </div> <table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0"> <tr> <th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th> </tr> <tr class="hideInheritedProperty"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#feature">feature</a> : Object<div class="summaryTableDescription"> The object that the event refers to (such as an instance of <code>IMapType</code> for <code>MapEvent.MAPTYPE_ADDED</code> event or an instance of <code>IControl</code> for <code>MapEvent.CONTROL_REMOVED</code>).</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> <tr class=""> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#latLng">latLng</a> : <a href="../maps/LatLng.html">LatLng</a> <div class="summaryTableDescription">[read-only] LatLng over which the MapMoveEvent occurred.</div> </td><td class="summaryTableOwnerCol">MapMoveEvent</td> </tr> </table> </div> <a name="methodSummary"></a> <div class="summarySection"> <div class="summaryTableTitle">Public Methods</div> <table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0"> <tr> <th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th> </tr> <tr class=""> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"> <div class="summarySignature"> <a class="signatureLink" href="#MapMoveEvent()">MapMoveEvent</a>(type:String, latLng:<a href="LatLng.html">LatLng</a>, bubbles:Boolean = false, cancellable:Boolean = false)</div> <div class="summaryTableDescription"> Creates a MapMoveEvent object to pass as a parameter to event listeners.</div> </td><td class="summaryTableOwnerCol">MapMoveEvent</td> </tr> </table> </div> <a name="constantSummary"></a> <div class="summarySection"> <div class="summaryTableTitle">Public Constants</div> <div class="showHideLinks"> <div class="hideInheritedConstant" id="hideInheritedConstant"> <a onclick="javascript:setInheritedVisible(false,'Constant');" href="#constantSummary" class="showHideLink"><img src="../../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Public Constants</a> </div> <div class="showInheritedConstant" id="showInheritedConstant"> <a onclick="javascript:setInheritedVisible(true,'Constant');" href="#constantSummary" class="showHideLink"><img src="../../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Public Constants</a> </div> </div> <table id="summaryTableConstant" class="summaryTable " cellpadding="3" cellspacing="0"> <tr> <th>&nbsp;</th><th colspan="2">Constant</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th> </tr> <tr class="hideInheritedConstant"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#CONTROL_ADDED">CONTROL_ADDED</a> : String = "mapevent_controladded"<div class="summaryTableDescription">[static] This event is fired on the map when a control is added to the map.</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> <tr class="hideInheritedConstant"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#CONTROL_REMOVED">CONTROL_REMOVED</a> : String = "mapevent_controlremoved"<div class="summaryTableDescription">[static] This event is fired on the map when a control is removed from the map.</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> <tr class="hideInheritedConstant"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#COPYRIGHTS_UPDATED">COPYRIGHTS_UPDATED</a> : String = "mapevent_copyrightsupdated"<div class="summaryTableDescription">[static] This event is fired when the copyright that should be displayed on the map is updated.</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> <tr class="hideInheritedConstant"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#FLY_TO_CANCELED">FLY_TO_CANCELED</a> : String = "mapevent_flytocanceled"<div class="summaryTableDescription">[static] This event is fired when the map motion produced by a call to <code>Map3D.flyTo()</code> is canceled via a call to <code>Map3D.cancelFlyTo()</code>.</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> <tr class="hideInheritedConstant"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#FLY_TO_DONE">FLY_TO_DONE</a> : String = "mapevent_flytodone"<div class="summaryTableDescription">[static] This event is fired when the map motion produced by a call to <code>Map3D.flyTo()</code> completes.</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> <tr class="hideInheritedConstant"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#INFOWINDOW_CLOSED">INFOWINDOW_CLOSED</a> : String = "mapevent_infowindowclosed"<div class="summaryTableDescription">[static] This event is fired when the info window closes.</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> <tr class="hideInheritedConstant"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#INFOWINDOW_CLOSING">INFOWINDOW_CLOSING</a> : String = "mapevent_infowindowclosing"<div class="summaryTableDescription">[static] This event is fired before the info window closes.</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> <tr class="hideInheritedConstant"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#INFOWINDOW_OPENED">INFOWINDOW_OPENED</a> : String = "mapevent_infowindowopened"<div class="summaryTableDescription">[static] This event is fired when the info window opens.</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> <tr class="hideInheritedConstant"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#MAP_PREINITIALIZE">MAP_PREINITIALIZE</a> : String = "mapevent_mappreinitialize"<div class="summaryTableDescription">[static] This event is fired immediately before the map is initialized.</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> <tr class="hideInheritedConstant"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#MAP_READY">MAP_READY</a> : String = "mapevent_mapready"<div class="summaryTableDescription">[static] This event is fired when map initialization is complete and isLoaded() would return true.</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> <tr class="hideInheritedConstant"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#MAPTYPE_ADDED">MAPTYPE_ADDED</a> : String = "mapevent_maptypeadded"<div class="summaryTableDescription">[static] This event is fired when a new MapType has been added to the map.</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> <tr class="hideInheritedConstant"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#MAPTYPE_CHANGED">MAPTYPE_CHANGED</a> : String = "maptypechanged"<div class="summaryTableDescription">[static] This event is fired when another map type is selected.</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> <tr class="hideInheritedConstant"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#MAPTYPE_REMOVED">MAPTYPE_REMOVED</a> : String = "mapevent_maptyperemoved"<div class="summaryTableDescription">[static] This event is fired when a MapType has been removed from the map.</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> <tr class="hideInheritedConstant"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#MAPTYPE_STYLE_CHANGED">MAPTYPE_STYLE_CHANGED</a> : String = "mapevent_maptypestylechanged"<div class="summaryTableDescription">[static] This event is fired when the style of a styled map type changes.</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> <tr class=""> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#MOVE_END">MOVE_END</a> : String = "mapevent_moveend"<div class="summaryTableDescription">[static] This event is fired when the change of the map view ends.</div> </td><td class="summaryTableOwnerCol">MapMoveEvent</td> </tr> <tr class=""> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#MOVE_START">MOVE_START</a> : String = "mapevent_movestart"<div class="summaryTableDescription">[static] This event is fired when the map view starts changing.</div> </td><td class="summaryTableOwnerCol">MapMoveEvent</td> </tr> <tr class=""> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#MOVE_STEP">MOVE_STEP</a> : String = "mapevent_movestep"<div class="summaryTableDescription">[static] This event is fired repeatedly while the map view is changing.</div> </td><td class="summaryTableOwnerCol">MapMoveEvent</td> </tr> <tr class="hideInheritedConstant"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#OVERLAY_BEFORE_REMOVED">OVERLAY_BEFORE_REMOVED</a> : String = "mapevent_overlaybeforeremoved"<div class="summaryTableDescription">[static] This event is fired when an overlay is about to be removed from the map.</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> <tr class="hideInheritedConstant"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#OVERLAY_MOVED">OVERLAY_MOVED</a> : String = "mapevent_overlaymoved"<div class="summaryTableDescription">[static] This event is fired when an overlay's position is changed.</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> <tr class="hideInheritedConstant"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#OVERLAY_REMOVED">OVERLAY_REMOVED</a> : String = "mapevent_overlayremoved"<div class="summaryTableDescription">[static] This event is fired after a single overlay is removed from the map.</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> <tr class="hideInheritedConstant"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#SIZE_CHANGED">SIZE_CHANGED</a> : String = "mapevent_sizechanged"<div class="summaryTableDescription">[static] This event is fired when the size of the map has changed.</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> <tr class="hideInheritedConstant"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#TILES_LOADED">TILES_LOADED</a> : String = "mapevent_tilesloaded"<div class="summaryTableDescription">[static] This event is fired when all visible target tiles have finished loading.</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> <tr class="hideInheritedConstant"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#TILES_LOADED_PENDING">TILES_LOADED_PENDING</a> : String = "mapevent_tilesloadedpending"<div class="summaryTableDescription">[static] This is a companion event to <code>MapEvent.TILES_LOADED</code> indicating that loading of new tiles has been initiated and that <code>MapEvent.TILES_LOADED</code> will be dispatched when all tiles have loaded.</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> <tr class="hideInheritedConstant"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#VIEW_CHANGED">VIEW_CHANGED</a> : String = "mapevent_viewchanged"<div class="summaryTableDescription">[static] This event is fired when the map view changes.</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> <tr class="hideInheritedConstant"> <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="MapEvent.html#VISIBILITY_CHANGED">VISIBILITY_CHANGED</a> : String = "mapevent_visibilitychanged"<div class="summaryTableDescription">[static] This event is fired when an overlay's visibility has changed (from visible to hidden or vice-versa).</div> </td><td class="summaryTableOwnerCol"><a href="MapEvent.html">MapEvent</a></td> </tr> </table> </div> <script type="text/javascript" language="javascript"> <!-- showHideInherited(); --></script> <div class="MainContent"> <a name="propertyDetail"></a> <div class="detailSectionHeader">Property detail</div> <a name="latLng"></a> <table cellspacing="0" cellpadding="0" class="detailHeader"> <tr> <td class="detailHeaderName">latLng</td><td class="detailHeaderType">property</td> </tr> </table> <div class="detailBody"> <code>latLng:<a href="../maps/LatLng.html">LatLng</a></code>&nbsp;&nbsp;[read-only]<p> LatLng over which the MapMoveEvent occurred. </p><span class="label">Implementation</span> <br> <code>&nbsp;&nbsp;&nbsp;&nbsp;public function get latLng():<a href="../maps/LatLng.html">LatLng</a></code> <br> </div> <a name="constructorDetail"></a> <div class="detailSectionHeader">Constructor detail</div> <a name="MapMoveEvent()"></a> <table cellspacing="0" cellpadding="0" class="detailHeader"> <tr> <td class="detailHeaderName">MapMoveEvent</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td> </tr> </table> <div class="detailBody"> <code>public function MapMoveEvent(type:String, latLng:<a href="LatLng.html">LatLng</a>, bubbles:Boolean = false, cancellable:Boolean = false)</code><p> Creates a MapMoveEvent object to pass as a parameter to event listeners. </p><span class="label">Parameters</span> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="20px"></td><td><code><span class="label">type</span>:String</code> &mdash; The type of the event, accessible as MapMoveEvent.type. </td> </tr> <tr> <td class="paramSpacer">&nbsp;</td> </tr> <tr> <td width="20px"></td><td><code><span class="label">latLng</span>:<a href="LatLng.html">LatLng</a></code> &mdash; Map's latLng. </td> </tr> <tr> <td class="paramSpacer">&nbsp;</td> </tr> <tr> <td width="20px"></td><td><code><span class="label">bubbles</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; Determines whether the Event object participates in the bubbling stage of the event flow. The default value is false. </td> </tr> <tr> <td class="paramSpacer">&nbsp;</td> </tr> <tr> <td width="20px"></td><td><code><span class="label">cancellable</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; Determines whether the Event object can be cancelled. The default values is false. </td> </tr> </table> </div> <a name="constantDetail"></a> <div class="detailSectionHeader">Constant detail</div> <a name="MOVE_END"></a> <table cellspacing="0" cellpadding="0" class="detailHeader"> <tr> <td class="detailHeaderName">MOVE_END</td><td class="detailHeaderType">constant</td> </tr> </table> <div class="detailBody"> <code>public static const MOVE_END:String = "mapevent_moveend"</code><p> This event is fired when the change of the map view ends. </p></div> <a name="MOVE_START"></a> <table cellspacing="0" cellpadding="0" class="detailHeader"> <tr> <td class="detailHeaderName">MOVE_START</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td> </tr> </table> <div class="detailBody"> <code>public static const MOVE_START:String = "mapevent_movestart"</code><p> This event is fired when the map view starts changing. This can be caused by dragging, in which case a MapMouseEvent.DRAG_START event is also fired, or by invocation of a method that changes the map view. </p></div> <a name="MOVE_STEP"></a> <table cellspacing="0" cellpadding="0" class="detailHeader"> <tr> <td class="detailHeaderName">MOVE_STEP</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td> </tr> </table> <div class="detailBody"> <code>public static const MOVE_STEP:String = "mapevent_movestep"</code><p> This event is fired repeatedly while the map view is changing. If the change is caused as a result of dragging, MapMouseEvent.DRAG_STEP events will also be generated. </p></div> <br> <br> <hr> <br> <p></p> <center class="copyright"> </center> </div> </body> </html> <!-- -->
g-amador/Tangible-User-Interface
tui_flashdevelop4_2_1__tuioAS3_0_8__AIR2_6/docs/GoogleMapsAPIforFlash/com/google/maps/MapMoveEvent.html
HTML
apache-2.0
26,033
[ 30522, 1026, 999, 9986, 13874, 16129, 2270, 1000, 1011, 1013, 1013, 1059, 2509, 2278, 1013, 1013, 26718, 2094, 16129, 1018, 1012, 5890, 17459, 1013, 1013, 4372, 1000, 1000, 8299, 1024, 1013, 1013, 7479, 1012, 1059, 2509, 1012, 8917, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/*************************************************************************** plugin.cpp Import tool for various worldmap analysis output files Functions: ------------------- begin : Jan 21, 2004 copyright : (C) 2004 by Tim Sutton email : tim@linfiniti.com ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ // includes #include "qgsdecorationnortharrow.h" #include "qgsdecorationnortharrowdialog.h" #include "qgisapp.h" #include "qgsbearingutils.h" #include "qgscoordinatetransform.h" #include "qgsexception.h" #include "qgslogger.h" #include "qgsmaplayer.h" #include "qgsproject.h" #include "qgssymbollayerutils.h" #include "qgssvgcache.h" // qt includes #include <QPainter> #include <QMenu> #include <QDir> #include <QFile> #include <QSvgRenderer> //non qt includes #include <cmath> #include <cassert> // const double QgsNorthArrowPlugin::DEG2RAD = 0.0174532925199433; const double QgsDecorationNorthArrow::TOL = 1e-8; /** * Constructor for the plugin. The plugin is passed a pointer to the main app * and an interface object that provides access to exposed functions in QGIS. * @param qgis Pointer to the QGIS main window * @param _qI Pointer to the QGIS interface object */ QgsDecorationNorthArrow::QgsDecorationNorthArrow( QObject *parent ) : QgsDecorationItem( parent ) { mPlacement = BottomLeft; mMarginUnit = QgsUnitTypes::RenderMillimeters; setName( "North Arrow" ); projectRead(); } void QgsDecorationNorthArrow::projectRead() { QgsDecorationItem::projectRead(); mColor = QgsSymbolLayerUtils::decodeColor( QgsProject::instance()->readEntry( mNameConfig, QStringLiteral( "/Color" ), QStringLiteral( "#000000" ) ) ); mOutlineColor = QgsSymbolLayerUtils::decodeColor( QgsProject::instance()->readEntry( mNameConfig, QStringLiteral( "/OutlineColor" ), QStringLiteral( "#FFFFFF" ) ) ); mRotationInt = QgsProject::instance()->readNumEntry( mNameConfig, QStringLiteral( "/Rotation" ), 0 ); mAutomatic = QgsProject::instance()->readBoolEntry( mNameConfig, QStringLiteral( "/Automatic" ), true ); mMarginHorizontal = QgsProject::instance()->readNumEntry( mNameConfig, QStringLiteral( "/MarginH" ), 0 ); mMarginVertical = QgsProject::instance()->readNumEntry( mNameConfig, QStringLiteral( "/MarginV" ), 0 ); } void QgsDecorationNorthArrow::saveToProject() { QgsDecorationItem::saveToProject(); QgsProject::instance()->writeEntry( mNameConfig, QStringLiteral( "/Color" ), QgsSymbolLayerUtils::encodeColor( mColor ) ); QgsProject::instance()->writeEntry( mNameConfig, QStringLiteral( "/OutlineColor" ), QgsSymbolLayerUtils::encodeColor( mOutlineColor ) ); QgsProject::instance()->writeEntry( mNameConfig, QStringLiteral( "/Rotation" ), mRotationInt ); QgsProject::instance()->writeEntry( mNameConfig, QStringLiteral( "/Automatic" ), mAutomatic ); QgsProject::instance()->writeEntry( mNameConfig, QStringLiteral( "/MarginH" ), mMarginHorizontal ); QgsProject::instance()->writeEntry( mNameConfig, QStringLiteral( "/MarginV" ), mMarginVertical ); } // Slot called when the buffer menu item is activated void QgsDecorationNorthArrow::run() { QgsDecorationNorthArrowDialog dlg( *this, QgisApp::instance() ); dlg.exec(); } void QgsDecorationNorthArrow::render( const QgsMapSettings &mapSettings, QgsRenderContext &context ) { //Large IF statement controlled by enable checkbox if ( enabled() ) { QSize size( 64, 64 ); QSvgRenderer svg; const QByteArray &svgContent = QgsApplication::svgCache()->svgContent( QStringLiteral( ":/images/north_arrows/default.svg" ), size.width(), mColor, mOutlineColor, 1.0, 1.0 ); svg.load( svgContent ); if ( svg.isValid() ) { double centerXDouble = size.width() / 2.0; double centerYDouble = size.width() / 2.0; //save the current canvas rotation context.painter()->save(); // //work out how to shift the image so that it rotates // properly about its center //(x cos a + y sin a - x, -x sin a + y cos a - y) // // could move this call to somewhere else so that it is only // called when the projection or map extent changes if ( mAutomatic ) { mRotationInt = QgsBearingUtils:: bearingTrueNorth( mapSettings.destinationCrs(), context.extent().center() ); mRotationInt += mapSettings.rotation(); } double myRadiansDouble = mRotationInt * M_PI / 180.0; int xShift = static_cast<int>( ( ( centerXDouble * std::cos( myRadiansDouble ) ) + ( centerYDouble * std::sin( myRadiansDouble ) ) ) - centerXDouble ); int yShift = static_cast<int>( ( ( -centerXDouble * std::sin( myRadiansDouble ) ) + ( centerYDouble * std::cos( myRadiansDouble ) ) ) - centerYDouble ); // need width/height of paint device int myHeight = context.painter()->device()->height(); int myWidth = context.painter()->device()->width(); //QgsDebugMsg("Rendering north arrow at " + mPlacementLabels.at(mPlacementIndex)); // Set margin according to selected units int myXOffset = 0; int myYOffset = 0; switch ( mMarginUnit ) { case QgsUnitTypes::RenderMillimeters: { int myPixelsInchX = context.painter()->device()->logicalDpiX(); int myPixelsInchY = context.painter()->device()->logicalDpiY(); myXOffset = myPixelsInchX * INCHES_TO_MM * mMarginHorizontal; myYOffset = myPixelsInchY * INCHES_TO_MM * mMarginVertical; break; } case QgsUnitTypes::RenderPixels: myXOffset = mMarginHorizontal - 5; // Minus 5 to shift tight into corner myYOffset = mMarginVertical - 5; break; case QgsUnitTypes::RenderPercentage: myXOffset = ( ( myWidth - size.width() ) / 100. ) * mMarginHorizontal; myYOffset = ( ( myHeight - size.width() ) / 100. ) * mMarginVertical; break; default: // Use default of top left break; } //Determine placement of label from form combo box switch ( mPlacement ) { case BottomLeft: context.painter()->translate( myXOffset, myHeight - myYOffset - size.width() ); break; case TopLeft: context.painter()->translate( myXOffset, myYOffset ); break; case TopRight: context.painter()->translate( myWidth - myXOffset - size.width(), myYOffset ); break; case BottomRight: context.painter()->translate( myWidth - myXOffset - size.width(), myHeight - myYOffset - size.width() ); break; default: { //QgsDebugMsg("Unable to determine where to put north arrow so defaulting to top left"); } } //rotate the canvas by the north arrow rotation amount context.painter()->rotate( mRotationInt ); //Now we can actually do the drawing, and draw a smooth north arrow even when rotated context.painter()->translate( xShift, yShift ); svg.render( context.painter(), QRectF( 0, 0, size.width(), size.height() ) ); //unrotate the canvas again context.painter()->restore(); } else { QFont myQFont( QStringLiteral( "time" ), 12, QFont::Bold ); context.painter()->setFont( myQFont ); context.painter()->setPen( Qt::black ); context.painter()->drawText( 10, 20, tr( "North arrow pixmap not found" ) ); } } }
GeoCat/QGIS
src/app/qgsdecorationnortharrow.cpp
C++
gpl-2.0
8,356
[ 30522, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package csdn.shimiso.eim.activity.im; import java.util.Calendar; import java.util.Collections; import java.util.List; import org.jivesoftware.smack.Chat; import org.jivesoftware.smack.packet.Message; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import csdn.shimiso.eim.activity.ActivitySupport; import csdn.shimiso.eim.comm.Constant; import csdn.shimiso.eim.manager.MessageManager; import csdn.shimiso.eim.manager.NoticeManager; import csdn.shimiso.eim.manager.XmppConnectionManager; import csdn.shimiso.eim.model.IMMessage; import csdn.shimiso.eim.model.Notice; import csdn.shimiso.eim.util.DateUtil; /** * * ÁÄÌì¶Ô»°. * * @author shimiso */ public abstract class AChatActivity extends ActivitySupport { private Chat chat = null; private List<IMMessage> message_pool = null; protected String to;// ÁÄÌìÈË private static int pageSize = 10; private List<Notice> noticeList; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); to = getIntent().getStringExtra("to"); if (to == null) return; chat = XmppConnectionManager.getInstance().getConnection() .getChatManager().createChat(to, null); } @Override protected void onPause() { unregisterReceiver(receiver); super.onPause(); } @Override protected void onResume() { // µÚÒ»´Î²éѯ message_pool = MessageManager.getInstance(context) .getMessageListByFrom(to, 1, pageSize); if (null != message_pool && message_pool.size() > 0) Collections.sort(message_pool); IntentFilter filter = new IntentFilter(); filter.addAction(Constant.NEW_MESSAGE_ACTION); registerReceiver(receiver, filter); // ¸üÐÂijÈËËùÓÐ֪ͨ NoticeManager.getInstance(context).updateStatusByFrom(to, Notice.READ); super.onResume(); } private BroadcastReceiver receiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (Constant.NEW_MESSAGE_ACTION.equals(action)) { IMMessage message = intent .getParcelableExtra(IMMessage.IMMESSAGE_KEY); message_pool.add(message); receiveNewMessage(message); refreshMessage(message_pool); } } }; protected abstract void receiveNewMessage(IMMessage message); protected abstract void refreshMessage(List<IMMessage> messages); protected List<IMMessage> getMessages() { return message_pool; } /** * ·¢ËÍÏûÏ¢ * @param messageContent * @throws Exception */ protected void sendMessage(String messageContent) throws Exception { String time = DateUtil.date2Str(Calendar.getInstance(), Constant.MS_FORMART); /* ÏûÏ¢·¢ËÍ */ Message message = new Message(); message.setProperty(IMMessage.KEY_TIME, time); message.setBody(messageContent); chat.sendMessage(message); /* ÏûÏ¢ÁбíˢР*/ IMMessage newMessage = new IMMessage(); newMessage.setMsgType(1); newMessage.setFromSubJid(chat.getParticipant()); newMessage.setContent(messageContent); newMessage.setTime(time); //newMessage.setPath(path); message_pool.add(newMessage); MessageManager.getInstance(context).saveIMMessage(newMessage); // MChatManager.message_pool.add(newMessage); // Ë¢ÐÂÊÓͼ refreshMessage(message_pool); } /** * Ï»¬¼ÓÔØÐÅÏ¢,true ·µ»Ø³É¹¦£¬false Êý¾ÝÒѾ­È«²¿¼ÓÔØ£¬È«²¿²éÍêÁË£¬ * * @param message */ protected Boolean addNewMessage() { List<IMMessage> newMsgList = MessageManager.getInstance(context) .getMessageListByFrom(to, message_pool.size(), pageSize); if (newMsgList != null && newMsgList.size() > 0) { message_pool.addAll(newMsgList); Collections.sort(message_pool); return true; } return false; } protected void resh() { // Ë¢ÐÂÊÓͼ refreshMessage(message_pool); } }
ice-coffee/EIM
src/csdn/shimiso/eim/activity/im/AChatActivity.java
Java
apache-2.0
3,876
[ 30522, 7427, 20116, 2094, 2078, 1012, 11895, 15630, 2080, 1012, 1041, 5714, 1012, 4023, 1012, 10047, 1025, 12324, 9262, 1012, 21183, 4014, 1012, 8094, 1025, 12324, 9262, 1012, 21183, 4014, 1012, 6407, 1025, 12324, 9262, 1012, 21183, 4014, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // <auto-generated/> #nullable disable using System; using System.Linq; using System.Threading; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; using Azure.ResourceManager.Core; using Azure.ResourceManager.Network.Models; using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.Network { /// <summary> A class representing collection of PublicIPAddress and their operations over a ResourceGroup. </summary> public partial class PublicIPAddressContainer : ArmContainer { private readonly ClientDiagnostics _clientDiagnostics; private readonly PublicIPAddressesRestOperations _restClient; /// <summary> Initializes a new instance of the <see cref="PublicIPAddressContainer"/> class for mocking. </summary> protected PublicIPAddressContainer() { } /// <summary> Initializes a new instance of PublicIPAddressContainer class. </summary> /// <param name="parent"> The resource representing the parent resource. </param> internal PublicIPAddressContainer(ArmResource parent) : base(parent) { _clientDiagnostics = new ClientDiagnostics(ClientOptions); _restClient = new PublicIPAddressesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, Id.SubscriptionId, BaseUri); } /// <summary> Gets the valid resource type for this object. </summary> protected override ResourceType ValidResourceType => ResourceGroup.ResourceType; // Container level operations. /// <summary> Creates or updates a static or dynamic public IP address. </summary> /// <param name="publicIpAddressName"> The name of the public IP address. </param> /// <param name="parameters"> Parameters supplied to the create or update public IP address operation. </param> /// <param name="waitForCompletion"> Waits for the completion of the long running operations. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="publicIpAddressName"/> or <paramref name="parameters"/> is null. </exception> public virtual PublicIPAddressCreateOrUpdateOperation CreateOrUpdate(string publicIpAddressName, PublicIPAddressData parameters, bool waitForCompletion = true, CancellationToken cancellationToken = default) { if (publicIpAddressName == null) { throw new ArgumentNullException(nameof(publicIpAddressName)); } if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } using var scope = _clientDiagnostics.CreateScope("PublicIPAddressContainer.CreateOrUpdate"); scope.Start(); try { var response = _restClient.CreateOrUpdate(Id.ResourceGroupName, publicIpAddressName, parameters, cancellationToken); var operation = new PublicIPAddressCreateOrUpdateOperation(Parent, _clientDiagnostics, Pipeline, _restClient.CreateCreateOrUpdateRequest(Id.ResourceGroupName, publicIpAddressName, parameters).Request, response); if (waitForCompletion) operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) { scope.Failed(e); throw; } } /// <summary> Creates or updates a static or dynamic public IP address. </summary> /// <param name="publicIpAddressName"> The name of the public IP address. </param> /// <param name="parameters"> Parameters supplied to the create or update public IP address operation. </param> /// <param name="waitForCompletion"> Waits for the completion of the long running operations. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="publicIpAddressName"/> or <paramref name="parameters"/> is null. </exception> public async virtual Task<PublicIPAddressCreateOrUpdateOperation> CreateOrUpdateAsync(string publicIpAddressName, PublicIPAddressData parameters, bool waitForCompletion = true, CancellationToken cancellationToken = default) { if (publicIpAddressName == null) { throw new ArgumentNullException(nameof(publicIpAddressName)); } if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } using var scope = _clientDiagnostics.CreateScope("PublicIPAddressContainer.CreateOrUpdate"); scope.Start(); try { var response = await _restClient.CreateOrUpdateAsync(Id.ResourceGroupName, publicIpAddressName, parameters, cancellationToken).ConfigureAwait(false); var operation = new PublicIPAddressCreateOrUpdateOperation(Parent, _clientDiagnostics, Pipeline, _restClient.CreateCreateOrUpdateRequest(Id.ResourceGroupName, publicIpAddressName, parameters).Request, response); if (waitForCompletion) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) { scope.Failed(e); throw; } } /// <summary> Gets details for this resource from the service. </summary> /// <param name="publicIpAddressName"> The name of the public IP address. </param> /// <param name="expand"> Expands referenced resources. </param> /// <param name="cancellationToken"> A token to allow the caller to cancel the call to the service. The default value is <see cref="CancellationToken.None" />. </param> public virtual Response<PublicIPAddress> Get(string publicIpAddressName, string expand = null, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("PublicIPAddressContainer.Get"); scope.Start(); try { if (publicIpAddressName == null) { throw new ArgumentNullException(nameof(publicIpAddressName)); } var response = _restClient.Get(Id.ResourceGroupName, publicIpAddressName, expand, cancellationToken: cancellationToken); if (response.Value == null) throw _clientDiagnostics.CreateRequestFailedException(response.GetRawResponse()); return Response.FromValue(new PublicIPAddress(Parent, response.Value), response.GetRawResponse()); } catch (Exception e) { scope.Failed(e); throw; } } /// <summary> Gets details for this resource from the service. </summary> /// <param name="publicIpAddressName"> The name of the public IP address. </param> /// <param name="expand"> Expands referenced resources. </param> /// <param name="cancellationToken"> A token to allow the caller to cancel the call to the service. The default value is <see cref="CancellationToken.None" />. </param> public async virtual Task<Response<PublicIPAddress>> GetAsync(string publicIpAddressName, string expand = null, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("PublicIPAddressContainer.Get"); scope.Start(); try { if (publicIpAddressName == null) { throw new ArgumentNullException(nameof(publicIpAddressName)); } var response = await _restClient.GetAsync(Id.ResourceGroupName, publicIpAddressName, expand, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(response.GetRawResponse()).ConfigureAwait(false); return Response.FromValue(new PublicIPAddress(Parent, response.Value), response.GetRawResponse()); } catch (Exception e) { scope.Failed(e); throw; } } /// <summary> Tries to get details for this resource from the service. </summary> /// <param name="publicIpAddressName"> The name of the public IP address. </param> /// <param name="expand"> Expands referenced resources. </param> /// <param name="cancellationToken"> A token to allow the caller to cancel the call to the service. The default value is <see cref="CancellationToken.None" />. </param> public virtual Response<PublicIPAddress> GetIfExists(string publicIpAddressName, string expand = null, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("PublicIPAddressContainer.GetIfExists"); scope.Start(); try { if (publicIpAddressName == null) { throw new ArgumentNullException(nameof(publicIpAddressName)); } var response = _restClient.Get(Id.ResourceGroupName, publicIpAddressName, expand, cancellationToken: cancellationToken); return response.Value == null ? Response.FromValue<PublicIPAddress>(null, response.GetRawResponse()) : Response.FromValue(new PublicIPAddress(this, response.Value), response.GetRawResponse()); } catch (Exception e) { scope.Failed(e); throw; } } /// <summary> Tries to get details for this resource from the service. </summary> /// <param name="publicIpAddressName"> The name of the public IP address. </param> /// <param name="expand"> Expands referenced resources. </param> /// <param name="cancellationToken"> A token to allow the caller to cancel the call to the service. The default value is <see cref="CancellationToken.None" />. </param> public async virtual Task<Response<PublicIPAddress>> GetIfExistsAsync(string publicIpAddressName, string expand = null, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("PublicIPAddressContainer.GetIfExists"); scope.Start(); try { if (publicIpAddressName == null) { throw new ArgumentNullException(nameof(publicIpAddressName)); } var response = await _restClient.GetAsync(Id.ResourceGroupName, publicIpAddressName, expand, cancellationToken: cancellationToken).ConfigureAwait(false); return response.Value == null ? Response.FromValue<PublicIPAddress>(null, response.GetRawResponse()) : Response.FromValue(new PublicIPAddress(this, response.Value), response.GetRawResponse()); } catch (Exception e) { scope.Failed(e); throw; } } /// <summary> Tries to get details for this resource from the service. </summary> /// <param name="publicIpAddressName"> The name of the public IP address. </param> /// <param name="expand"> Expands referenced resources. </param> /// <param name="cancellationToken"> A token to allow the caller to cancel the call to the service. The default value is <see cref="CancellationToken.None" />. </param> public virtual Response<bool> CheckIfExists(string publicIpAddressName, string expand = null, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("PublicIPAddressContainer.CheckIfExists"); scope.Start(); try { if (publicIpAddressName == null) { throw new ArgumentNullException(nameof(publicIpAddressName)); } var response = GetIfExists(publicIpAddressName, expand, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) { scope.Failed(e); throw; } } /// <summary> Tries to get details for this resource from the service. </summary> /// <param name="publicIpAddressName"> The name of the public IP address. </param> /// <param name="expand"> Expands referenced resources. </param> /// <param name="cancellationToken"> A token to allow the caller to cancel the call to the service. The default value is <see cref="CancellationToken.None" />. </param> public async virtual Task<Response<bool>> CheckIfExistsAsync(string publicIpAddressName, string expand = null, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("PublicIPAddressContainer.CheckIfExists"); scope.Start(); try { if (publicIpAddressName == null) { throw new ArgumentNullException(nameof(publicIpAddressName)); } var response = await GetIfExistsAsync(publicIpAddressName, expand, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) { scope.Failed(e); throw; } } /// <summary> Gets all public IP addresses in a resource group. </summary> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <returns> A collection of <see cref="PublicIPAddress" /> that may take multiple service requests to iterate over. </returns> public virtual Pageable<PublicIPAddress> GetAll(CancellationToken cancellationToken = default) { Page<PublicIPAddress> FirstPageFunc(int? pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("PublicIPAddressContainer.GetAll"); scope.Start(); try { var response = _restClient.GetAll(Id.ResourceGroupName, cancellationToken: cancellationToken); return Page.FromValues(response.Value.Value.Select(value => new PublicIPAddress(Parent, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { scope.Failed(e); throw; } } Page<PublicIPAddress> NextPageFunc(string nextLink, int? pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("PublicIPAddressContainer.GetAll"); scope.Start(); try { var response = _restClient.GetAllNextPage(nextLink, Id.ResourceGroupName, cancellationToken: cancellationToken); return Page.FromValues(response.Value.Value.Select(value => new PublicIPAddress(Parent, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { scope.Failed(e); throw; } } return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); } /// <summary> Gets all public IP addresses in a resource group. </summary> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <returns> An async collection of <see cref="PublicIPAddress" /> that may take multiple service requests to iterate over. </returns> public virtual AsyncPageable<PublicIPAddress> GetAllAsync(CancellationToken cancellationToken = default) { async Task<Page<PublicIPAddress>> FirstPageFunc(int? pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("PublicIPAddressContainer.GetAll"); scope.Start(); try { var response = await _restClient.GetAllAsync(Id.ResourceGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); return Page.FromValues(response.Value.Value.Select(value => new PublicIPAddress(Parent, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { scope.Failed(e); throw; } } async Task<Page<PublicIPAddress>> NextPageFunc(string nextLink, int? pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("PublicIPAddressContainer.GetAll"); scope.Start(); try { var response = await _restClient.GetAllNextPageAsync(nextLink, Id.ResourceGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); return Page.FromValues(response.Value.Value.Select(value => new PublicIPAddress(Parent, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { scope.Failed(e); throw; } } return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); } /// <summary> Filters the list of <see cref="PublicIPAddress" /> for this resource group represented as generic resources. </summary> /// <param name="nameFilter"> The filter used in this operation. </param> /// <param name="expand"> Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`. </param> /// <param name="top"> The number of results to return. </param> /// <param name="cancellationToken"> A token to allow the caller to cancel the call to the service. The default value is <see cref="CancellationToken.None" />. </param> /// <returns> A collection of resource that may take multiple service requests to iterate over. </returns> public virtual Pageable<GenericResource> GetAllAsGenericResources(string nameFilter, string expand = null, int? top = null, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("PublicIPAddressContainer.GetAllAsGenericResources"); scope.Start(); try { var filters = new ResourceFilterCollection(PublicIPAddress.ResourceType); filters.SubstringFilter = nameFilter; return ResourceListOperations.GetAtContext(Parent as ResourceGroup, filters, expand, top, cancellationToken); } catch (Exception e) { scope.Failed(e); throw; } } /// <summary> Filters the list of <see cref="PublicIPAddress" /> for this resource group represented as generic resources. </summary> /// <param name="nameFilter"> The filter used in this operation. </param> /// <param name="expand"> Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`. </param> /// <param name="top"> The number of results to return. </param> /// <param name="cancellationToken"> A token to allow the caller to cancel the call to the service. The default value is <see cref="CancellationToken.None" />. </param> /// <returns> An async collection of resource that may take multiple service requests to iterate over. </returns> public virtual AsyncPageable<GenericResource> GetAllAsGenericResourcesAsync(string nameFilter, string expand = null, int? top = null, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("PublicIPAddressContainer.GetAllAsGenericResources"); scope.Start(); try { var filters = new ResourceFilterCollection(PublicIPAddress.ResourceType); filters.SubstringFilter = nameFilter; return ResourceListOperations.GetAtContextAsync(Parent as ResourceGroup, filters, expand, top, cancellationToken); } catch (Exception e) { scope.Failed(e); throw; } } // Builders. // public ArmBuilder<ResourceIdentifier, PublicIPAddress, PublicIPAddressData> Construct() { } } }
AsrOneSdk/azure-sdk-for-net
sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressContainer.cs
C#
mit
21,480
[ 30522, 1013, 1013, 9385, 1006, 1039, 1007, 7513, 3840, 1012, 2035, 2916, 9235, 1012, 1013, 1013, 7000, 2104, 1996, 10210, 6105, 1012, 1013, 1013, 1026, 8285, 1011, 7013, 1013, 1028, 1001, 19701, 3085, 4487, 19150, 2478, 2291, 1025, 2478, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. //! Shareable mutable containers. //! //! Values of the `Cell` and `RefCell` types may be mutated through //! shared references (i.e. the common `&T` type), whereas most Rust //! types can only be mutated through unique (`&mut T`) references. We //! say that `Cell` and `RefCell` provide *interior mutability*, in //! contrast with typical Rust types that exhibit *inherited //! mutability*. //! //! Cell types come in two flavors: `Cell` and `RefCell`. `Cell` //! provides `get` and `set` methods that change the //! interior value with a single method call. `Cell` though is only //! compatible with types that implement `Copy`. For other types, //! one must use the `RefCell` type, acquiring a write lock before //! mutating. //! //! `RefCell` uses Rust's lifetimes to implement *dynamic borrowing*, //! a process whereby one can claim temporary, exclusive, mutable //! access to the inner value. Borrows for `RefCell`s are tracked *at //! runtime*, unlike Rust's native reference types which are entirely //! tracked statically, at compile time. Because `RefCell` borrows are //! dynamic it is possible to attempt to borrow a value that is //! already mutably borrowed; when this happens it results in task //! failure. //! //! # When to choose interior mutability //! //! The more common inherited mutability, where one must have unique //! access to mutate a value, is one of the key language elements that //! enables Rust to reason strongly about pointer aliasing, statically //! preventing crash bugs. Because of that, inherited mutability is //! preferred, and interior mutability is something of a last //! resort. Since cell types enable mutation where it would otherwise //! be disallowed though, there are occasions when interior //! mutability might be appropriate, or even *must* be used, e.g. //! //! * Introducing inherited mutability roots to shared types. //! * Implementation details of logically-immutable methods. //! * Mutating implementations of `clone`. //! //! ## Introducing inherited mutability roots to shared types //! //! Shared smart pointer types, including `Rc` and `Arc`, provide //! containers that can be cloned and shared between multiple parties. //! Because the contained values may be multiply-aliased, they can //! only be borrowed as shared references, not mutable references. //! Without cells it would be impossible to mutate data inside of //! shared boxes at all! //! //! It's very common then to put a `RefCell` inside shared pointer //! types to reintroduce mutability: //! //! ``` //! use std::collections::HashMap; //! use std::cell::RefCell; //! use std::rc::Rc; //! //! fn main() { //! let shared_map: Rc<RefCell<_>> = Rc::new(RefCell::new(HashMap::new())); //! shared_map.borrow_mut().insert("africa", 92388i); //! shared_map.borrow_mut().insert("kyoto", 11837i); //! shared_map.borrow_mut().insert("piccadilly", 11826i); //! shared_map.borrow_mut().insert("marbles", 38i); //! } //! ``` //! //! ## Implementation details of logically-immutable methods //! //! Occasionally it may be desirable not to expose in an API that //! there is mutation happening "under the hood". This may be because //! logically the operation is immutable, but e.g. caching forces the //! implementation to perform mutation; or because you must employ //! mutation to implement a trait method that was originally defined //! to take `&self`. //! //! ``` //! use std::cell::RefCell; //! //! struct Graph { //! edges: Vec<(uint, uint)>, //! span_tree_cache: RefCell<Option<Vec<(uint, uint)>>> //! } //! //! impl Graph { //! fn minimum_spanning_tree(&self) -> Vec<(uint, uint)> { //! // Create a new scope to contain the lifetime of the //! // dynamic borrow //! { //! // Take a reference to the inside of cache cell //! let mut cache = self.span_tree_cache.borrow_mut(); //! if cache.is_some() { //! return cache.get_ref().clone(); //! } //! //! let span_tree = self.calc_span_tree(); //! *cache = Some(span_tree); //! } //! //! // Recursive call to return the just-cached value. //! // Note that if we had not let the previous borrow //! // of the cache fall out of scope then the subsequent //! // recursive borrow would cause a dynamic task failure. //! // This is the major hazard of using `RefCell`. //! self.minimum_spanning_tree() //! } //! # fn calc_span_tree(&self) -> Vec<(uint, uint)> { vec![] } //! } //! # fn main() { } //! ``` //! //! ## Mutating implementations of `clone` //! //! This is simply a special - but common - case of the previous: //! hiding mutability for operations that appear to be immutable. //! The `clone` method is expected to not change the source value, and //! is declared to take `&self`, not `&mut self`. Therefore any //! mutation that happens in the `clone` method must use cell //! types. For example, `Rc` maintains its reference counts within a //! `Cell`. //! //! ``` //! use std::cell::Cell; //! //! struct Rc<T> { //! ptr: *mut RcBox<T> //! } //! //! struct RcBox<T> { //! value: T, //! refcount: Cell<uint> //! } //! //! impl<T> Clone for Rc<T> { //! fn clone(&self) -> Rc<T> { //! unsafe { //! (*self.ptr).refcount.set((*self.ptr).refcount.get() + 1); //! Rc { ptr: self.ptr } //! } //! } //! } //! ``` //! // FIXME: Explain difference between Cell and RefCell // FIXME: Downsides to interior mutability // FIXME: Can't be shared between threads. Dynamic borrows // FIXME: Relationship to Atomic types and RWLock use clone::Clone; use cmp::PartialEq; use kinds::{marker, Copy}; use ops::{Deref, DerefMut, Drop}; use option::{None, Option, Some}; /// A mutable memory location that admits only `Copy` data. #[unstable = "likely to be renamed; otherwise stable"] pub struct Cell<T> { value: UnsafeCell<T>, noshare: marker::NoSync, } #[stable] impl<T:Copy> Cell<T> { /// Creates a new `Cell` containing the given value. pub fn new(value: T) -> Cell<T> { Cell { value: UnsafeCell::new(value), noshare: marker::NoSync, } } /// Returns a copy of the contained value. #[inline] pub fn get(&self) -> T { unsafe{ *self.value.get() } } /// Sets the contained value. #[inline] pub fn set(&self, value: T) { unsafe { *self.value.get() = value; } } } #[unstable = "waiting for `Clone` trait to become stable"] impl<T:Copy> Clone for Cell<T> { fn clone(&self) -> Cell<T> { Cell::new(self.get()) } } #[unstable = "waiting for `PartialEq` trait to become stable"] impl<T:PartialEq + Copy> PartialEq for Cell<T> { fn eq(&self, other: &Cell<T>) -> bool { self.get() == other.get() } } /// A mutable memory location with dynamically checked borrow rules #[unstable = "likely to be renamed; otherwise stable"] pub struct RefCell<T> { value: UnsafeCell<T>, borrow: Cell<BorrowFlag>, nocopy: marker::NoCopy, noshare: marker::NoSync, } // Values [1, MAX-1] represent the number of `Ref` active // (will not outgrow its range since `uint` is the size of the address space) type BorrowFlag = uint; static UNUSED: BorrowFlag = 0; static WRITING: BorrowFlag = -1; impl<T> RefCell<T> { /// Create a new `RefCell` containing `value` #[stable] pub fn new(value: T) -> RefCell<T> { RefCell { value: UnsafeCell::new(value), borrow: Cell::new(UNUSED), nocopy: marker::NoCopy, noshare: marker::NoSync, } } /// Consumes the `RefCell`, returning the wrapped value. #[unstable = "may be renamed, depending on global conventions"] pub fn unwrap(self) -> T { debug_assert!(self.borrow.get() == UNUSED); unsafe{self.value.unwrap()} } /// Attempts to immutably borrow the wrapped value. /// /// The borrow lasts until the returned `Ref` exits scope. Multiple /// immutable borrows can be taken out at the same time. /// /// Returns `None` if the value is currently mutably borrowed. #[unstable = "may be renamed, depending on global conventions"] pub fn try_borrow<'a>(&'a self) -> Option<Ref<'a, T>> { match self.borrow.get() { WRITING => None, borrow => { self.borrow.set(borrow + 1); Some(Ref { _parent: self }) } } } /// Immutably borrows the wrapped value. /// /// The borrow lasts until the returned `Ref` exits scope. Multiple /// immutable borrows can be taken out at the same time. /// /// # Failure /// /// Fails if the value is currently mutably borrowed. #[unstable] pub fn borrow<'a>(&'a self) -> Ref<'a, T> { match self.try_borrow() { Some(ptr) => ptr, None => fail!("RefCell<T> already mutably borrowed") } } /// Mutably borrows the wrapped value. /// /// The borrow lasts until the returned `RefMut` exits scope. The value /// cannot be borrowed while this borrow is active. /// /// Returns `None` if the value is currently borrowed. #[unstable = "may be renamed, depending on global conventions"] pub fn try_borrow_mut<'a>(&'a self) -> Option<RefMut<'a, T>> { match self.borrow.get() { UNUSED => { self.borrow.set(WRITING); Some(RefMut { _parent: self }) }, _ => None } } /// Mutably borrows the wrapped value. /// /// The borrow lasts until the returned `RefMut` exits scope. The value /// cannot be borrowed while this borrow is active. /// /// # Failure /// /// Fails if the value is currently borrowed. #[unstable] pub fn borrow_mut<'a>(&'a self) -> RefMut<'a, T> { match self.try_borrow_mut() { Some(ptr) => ptr, None => fail!("RefCell<T> already borrowed") } } } #[unstable = "waiting for `Clone` to become stable"] impl<T: Clone> Clone for RefCell<T> { fn clone(&self) -> RefCell<T> { RefCell::new(self.borrow().clone()) } } #[unstable = "waiting for `PartialEq` to become stable"] impl<T: PartialEq> PartialEq for RefCell<T> { fn eq(&self, other: &RefCell<T>) -> bool { *self.borrow() == *other.borrow() } } /// Wraps a borrowed reference to a value in a `RefCell` box. #[unstable] pub struct Ref<'b, T> { // FIXME #12808: strange name to try to avoid interfering with // field accesses of the contained type via Deref _parent: &'b RefCell<T> } #[unsafe_destructor] #[unstable] impl<'b, T> Drop for Ref<'b, T> { fn drop(&mut self) { let borrow = self._parent.borrow.get(); debug_assert!(borrow != WRITING && borrow != UNUSED); self._parent.borrow.set(borrow - 1); } } #[unstable = "waiting for `Deref` to become stable"] impl<'b, T> Deref<T> for Ref<'b, T> { #[inline] fn deref<'a>(&'a self) -> &'a T { unsafe { &*self._parent.value.get() } } } /// Copy a `Ref`. /// /// The `RefCell` is already immutably borrowed, so this cannot fail. /// /// A `Clone` implementation would interfere with the widespread /// use of `r.borrow().clone()` to clone the contents of a `RefCell`. #[experimental = "likely to be moved to a method, pending language changes"] pub fn clone_ref<'b, T>(orig: &Ref<'b, T>) -> Ref<'b, T> { // Since this Ref exists, we know the borrow flag // is not set to WRITING. let borrow = orig._parent.borrow.get(); debug_assert!(borrow != WRITING && borrow != UNUSED); orig._parent.borrow.set(borrow + 1); Ref { _parent: orig._parent, } } /// Wraps a mutable borrowed reference to a value in a `RefCell` box. #[unstable] pub struct RefMut<'b, T> { // FIXME #12808: strange name to try to avoid interfering with // field accesses of the contained type via Deref _parent: &'b RefCell<T> } #[unsafe_destructor] #[unstable] impl<'b, T> Drop for RefMut<'b, T> { fn drop(&mut self) { let borrow = self._parent.borrow.get(); debug_assert!(borrow == WRITING); self._parent.borrow.set(UNUSED); } } #[unstable = "waiting for `Deref` to become stable"] impl<'b, T> Deref<T> for RefMut<'b, T> { #[inline] fn deref<'a>(&'a self) -> &'a T { unsafe { &*self._parent.value.get() } } } #[unstable = "waiting for `DerefMut` to become stable"] impl<'b, T> DerefMut<T> for RefMut<'b, T> { #[inline] fn deref_mut<'a>(&'a mut self) -> &'a mut T { unsafe { &mut *self._parent.value.get() } } } /// The core primitive for interior mutability in Rust. /// /// `UnsafeCell` type that wraps a type T and indicates unsafe interior /// operations on the wrapped type. Types with an `UnsafeCell<T>` field are /// considered to have an *unsafe interior*. The `UnsafeCell` type is the only /// legal way to obtain aliasable data that is considered mutable. In general, /// transmuting an &T type into an &mut T is considered undefined behavior. /// /// Although it is possible to put an `UnsafeCell<T>` into static item, it is /// not permitted to take the address of the static item if the item is not /// declared as mutable. This rule exists because immutable static items are /// stored in read-only memory, and thus any attempt to mutate their interior /// can cause segfaults. Immutable static items containing `UnsafeCell<T>` /// instances are still useful as read-only initializers, however, so we do not /// forbid them altogether. /// /// Types like `Cell` and `RefCell` use this type to wrap their internal data. /// /// `UnsafeCell` doesn't opt-out from any kind, instead, types with an /// `UnsafeCell` interior are expected to opt-out from kinds themselves. /// /// # Example: /// /// ```rust /// use std::cell::UnsafeCell; /// use std::kinds::marker; /// /// struct NotThreadSafe<T> { /// value: UnsafeCell<T>, /// marker: marker::NoSync /// } /// ``` /// /// **NOTE:** `UnsafeCell<T>` fields are public to allow static initializers. It /// is not recommended to access its fields directly, `get` should be used /// instead. #[lang="unsafe"] #[unstable = "this type may be renamed in the future"] pub struct UnsafeCell<T> { /// Wrapped value /// /// This field should not be accessed directly, it is made public for static /// initializers. #[unstable] pub value: T, } impl<T> UnsafeCell<T> { /// Construct a new instance of `UnsafeCell` which will wrap the specified /// value. /// /// All access to the inner value through methods is `unsafe`, and it is /// highly discouraged to access the fields directly. #[stable] pub fn new(value: T) -> UnsafeCell<T> { UnsafeCell { value: value } } /// Gets a mutable pointer to the wrapped value. /// /// This function is unsafe as the pointer returned is an unsafe pointer and /// no guarantees are made about the aliasing of the pointers being handed /// out in this or other tasks. #[inline] #[unstable = "conventions around acquiring an inner reference are still \ under development"] pub unsafe fn get(&self) -> *mut T { &self.value as *const T as *mut T } /// Unwraps the value /// /// This function is unsafe because there is no guarantee that this or other /// tasks are currently inspecting the inner value. #[inline] #[unstable = "conventions around the name `unwrap` are still under \ development"] pub unsafe fn unwrap(self) -> T { self.value } }
jbclements/rust
src/libcore/cell.rs
Rust
apache-2.0
16,210
[ 30522, 1013, 1013, 9385, 2262, 1011, 2286, 1996, 18399, 2622, 9797, 1012, 2156, 1996, 9385, 1013, 1013, 5371, 2012, 1996, 2327, 1011, 2504, 14176, 1997, 2023, 4353, 1998, 2012, 1013, 1013, 8299, 1024, 1013, 1013, 18399, 1011, 11374, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
class StaticController < ApplicationController def guidelines @title = t('static.guidelines.title') end def guidelines_tips @title = t('static.guidelines_tips.title') end def faq @title = t('static.faq.title') end def thank_you backer = Backer.find session[:thank_you_backer_id] redirect_to [backer.project, backer] end def sitemap # TODO: update this sitemap to use new homepage logic @home_page ||= Project.includes(:user, :category).visible.limit(6).all @expiring ||= Project.includes(:user, :category).visible.expiring.not_expired.order("(projects.expires_at), created_at DESC").limit(3).all @recent ||= Project.includes(:user, :category).visible.not_expiring.not_expired.where("projects.user_id <> 7329").order('created_at DESC').limit(3).all @successful ||= Project.includes(:user, :category).visible.successful.order("(projects.expires_at) DESC").limit(3).all return render 'sitemap' end end
alexandred/catarse
app/controllers/static_controller.rb
Ruby
mit
983
[ 30522, 2465, 10763, 8663, 13181, 10820, 1026, 4646, 8663, 13181, 10820, 13366, 11594, 1030, 2516, 1027, 1056, 1006, 1005, 10763, 1012, 11594, 1012, 2516, 1005, 1007, 2203, 13366, 11594, 1035, 10247, 1030, 2516, 1027, 1056, 1006, 1005, 10763, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php require_once(sfConfig::get('sf_lib_dir').'/filter/base/BaseFormFilterPropel.class.php'); /** * CatArt filter form base class. * * @package sf_sandbox * @subpackage filter * @author Your name here * @version SVN: $Id: sfPropelFormFilterGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $ */ class BaseCatArtFormFilter extends BaseFormFilterPropel { public function setup() { $this->setWidgets(array( 'cat_des' => new sfWidgetFormFilterInput(), 'dis_cen' => new sfWidgetFormFilterInput(), 'campo1' => new sfWidgetFormFilterInput(), 'campo2' => new sfWidgetFormFilterInput(), 'campo3' => new sfWidgetFormFilterInput(), 'campo4' => new sfWidgetFormFilterInput(), 'co_us_in' => new sfWidgetFormFilterInput(), 'fe_us_in' => new sfWidgetFormFilterInput(), 'co_us_mo' => new sfWidgetFormFilterInput(), 'fe_us_mo' => new sfWidgetFormFilterInput(), 'co_us_el' => new sfWidgetFormFilterInput(), 'fe_us_el' => new sfWidgetFormFilterInput(), 'revisado' => new sfWidgetFormFilterInput(), 'trasnfe' => new sfWidgetFormFilterInput(), 'co_sucu' => new sfWidgetFormFilterInput(), 'rowguid' => new sfWidgetFormFilterInput(), 'co_imun' => new sfWidgetFormFilterInput(), 'co_reten' => new sfWidgetFormFilterInput(), 'row_id' => new sfWidgetFormFilterInput(), 'movil' => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))), )); $this->setValidators(array( 'cat_des' => new sfValidatorPass(array('required' => false)), 'dis_cen' => new sfValidatorPass(array('required' => false)), 'campo1' => new sfValidatorPass(array('required' => false)), 'campo2' => new sfValidatorPass(array('required' => false)), 'campo3' => new sfValidatorPass(array('required' => false)), 'campo4' => new sfValidatorPass(array('required' => false)), 'co_us_in' => new sfValidatorPass(array('required' => false)), 'fe_us_in' => new sfValidatorPass(array('required' => false)), 'co_us_mo' => new sfValidatorPass(array('required' => false)), 'fe_us_mo' => new sfValidatorPass(array('required' => false)), 'co_us_el' => new sfValidatorPass(array('required' => false)), 'fe_us_el' => new sfValidatorPass(array('required' => false)), 'revisado' => new sfValidatorPass(array('required' => false)), 'trasnfe' => new sfValidatorPass(array('required' => false)), 'co_sucu' => new sfValidatorPass(array('required' => false)), 'rowguid' => new sfValidatorPass(array('required' => false)), 'co_imun' => new sfValidatorPass(array('required' => false)), 'co_reten' => new sfValidatorPass(array('required' => false)), 'row_id' => new sfValidatorPass(array('required' => false)), 'movil' => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))), )); $this->widgetSchema->setNameFormat('cat_art_filters[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); parent::setup(); } public function getModelName() { return 'CatArt'; } public function getFields() { return array( 'co_cat' => 'Text', 'cat_des' => 'Text', 'dis_cen' => 'Text', 'campo1' => 'Text', 'campo2' => 'Text', 'campo3' => 'Text', 'campo4' => 'Text', 'co_us_in' => 'Text', 'fe_us_in' => 'Text', 'co_us_mo' => 'Text', 'fe_us_mo' => 'Text', 'co_us_el' => 'Text', 'fe_us_el' => 'Text', 'revisado' => 'Text', 'trasnfe' => 'Text', 'co_sucu' => 'Text', 'rowguid' => 'Text', 'co_imun' => 'Text', 'co_reten' => 'Text', 'row_id' => 'Text', 'movil' => 'Boolean', ); } }
luelher/gescob
lib/filter/profit/base/BaseCatArtFormFilter.class.php
PHP
gpl-2.0
3,869
[ 30522, 1026, 1029, 25718, 5478, 1035, 2320, 1006, 16420, 8663, 8873, 2290, 1024, 1024, 2131, 1006, 1005, 16420, 1035, 5622, 2497, 1035, 16101, 1005, 1007, 1012, 1005, 1013, 11307, 1013, 2918, 1013, 2918, 14192, 8873, 21928, 21572, 11880, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# dear-recruiter Recruiter Email Response Generator
rodrigosetti/dear-recruiter
README.md
Markdown
unlicense
52
[ 30522, 1001, 6203, 1011, 13024, 2121, 13024, 2121, 10373, 3433, 13103, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
{-# LANGUAGE OverloadedStrings, RecursiveDo, ScopedTypeVariables, FlexibleContexts, TypeFamilies, ConstraintKinds #-} module Frontend.Properties.R53 ( r53Properties ) where import Prelude hiding (mapM, mapM_, all, sequence) import qualified Data.Map as Map import Data.Monoid ((<>)) import Data.Text (Text) import qualified Data.Text as T import Reflex import Reflex.Dom.Core ------ import AWSFunction -------------------------------------------------------------------------- -- Route53 Properties ------- calcR53ZoneF :: Text -> Text -> Text calcR53ZoneF hz tf = toText $ hosZ (readDouble hz) + (50.0 * (readDouble tf)) where hosZ hz' | hz' <= 25 = 0.50 * hz' | otherwise = (0.50 * 25) + (0.10 * (hz' - 25)) calcR53Queries :: Text -> Int -> Text -> Int -> Text -> Int -> Text calcR53Queries sq skey lbrq lkey gdq gkey = toText $ (standardQ (readDouble sq) skey) + (latencyQ (readDouble lbrq) lkey) + (geoDnsQ (readDouble gdq) gkey) where standardQ i k1 = case k1 of 1 -> 30 * standardQ' i 2 -> 4 * standardQ' i _ -> standardQ' i where standardQ' sq' | sq' <= 1000 = 0.400 * sq' | otherwise = (0.400 * 1000) + (0.200 * (sq' - 1000)) latencyQ i k2 = case k2 of 1 -> 30 * latencyQ' i 2 -> 4 * latencyQ' i _ -> latencyQ' i where latencyQ' lq' | lq' <= 1000 = 0.600 * lq' | otherwise = (0.600 * 1000) + (0.300 * (lq' - 1000)) geoDnsQ i k3 = case k3 of 1 -> 30 * geoDnsQ' i 2 -> 4 * geoDnsQ' i _ -> geoDnsQ' i where geoDnsQ' gq' | gq' <= 1000 = 0.700 * gq' | otherwise = (0.700 * 1000) + (0.350 * (gq' - 1000)) ------------------------------------- r53Properties :: (Reflex t, MonadWidget t m) => Dynamic t (Map.Map T.Text T.Text) -> m (Dynamic t Text) r53Properties dynAttrs = do result <- elDynAttr "div" ((constDyn $ idAttrs R53) <> dynAttrs <> rightClassAttrs) $ do rec r53HostZ <- r53HostedZone evReset evReset <- button "Reset" return $ r53HostZ return $ result r53HostedZone :: (Reflex t, MonadWidget t m) => Event t a -> m (Dynamic t Text) r53HostedZone evReset = do rec let resultR53ZoneF = calcR53ZoneF <$> (value r53Hz) <*> (value r53Tf) resultR53Queries = calcR53Queries <$> (value r53Sq) <*> (value ddR53Sq) <*> (value r53Lbrq) <*> (value ddR53Lbrq) <*> (value r53GeoDQ) <*> (value ddR53GeoDQ) resultR53HZone = (+) <$> (readDouble <$> resultR53ZoneF) <*> (readDouble <$> resultR53Queries) el "h4" $ text "Hosted Zone: " el "p" $ text "Hosted Zone:" r53Hz <- textInput $ def & textInputConfig_inputType .~ "number" & textInputConfig_initialValue .~ "0" & setValue .~ (leftmost ["0" <$ evReset]) el "p" $ text "Traffic Flow:" r53Tf <- textInput $ def & textInputConfig_inputType .~ "number" & textInputConfig_initialValue .~ "0" & setValue .~ (leftmost ["0" <$ evReset]) el "p" $ text "Standard Queries" el "p" $ text "(in Million Queries):" r53Sq <- textInput $ def & textInputConfig_inputType .~ "number" & textInputConfig_initialValue .~ "0" & setValue .~ (leftmost ["0" <$ evReset]) ddR53Sq <- dropdown 3 (constDyn ddPerMonth) def el "p" $ text "Latency Based" el "p" $ text "Routing Queries" el "p" $ text "(in Million Queries):" r53Lbrq <- textInput $ def & textInputConfig_inputType .~ "number" & textInputConfig_initialValue .~ "0" & setValue .~ (leftmost ["0" <$ evReset]) ddR53Lbrq <- dropdown 3 (constDyn ddPerMonth) def el "p" $ text "Geo DNS Queries" el "p" $ text "(in Million Queries):" r53GeoDQ <- textInput $ def & textInputConfig_inputType .~ "number" & textInputConfig_initialValue .~ "0" & setValue .~ (leftmost ["0" <$ evReset]) ddR53GeoDQ <- dropdown 3 (constDyn ddPerMonth) def return $ toDynText resultR53HZone
Rizary/awspi
Lib/Frontend/Properties/R53.hs
Haskell
bsd-3-clause
4,264
[ 30522, 1063, 1011, 1001, 2653, 2058, 17468, 3367, 4892, 2015, 1010, 28667, 9236, 3512, 3527, 1010, 9531, 11927, 18863, 10755, 19210, 2015, 1010, 12379, 8663, 18209, 2015, 1010, 2828, 7011, 4328, 11983, 1010, 27142, 18824, 2015, 1001, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Cantata * * Copyright (c) 2011-2013 Craig Drummond <craig.p.drummond@gmail.com> * * ---- * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include "umsdevice.h" #include "utils.h" #include "devicepropertiesdialog.h" #include "devicepropertieswidget.h" #include "actiondialog.h" #include "localize.h" #include <QDir> #include <QFile> #include <QFileInfo> #include <QTextStream> static const QLatin1String constSettingsFile("/.is_audio_player"); static const QLatin1String constMusicFolderKey("audio_folder"); UmsDevice::UmsDevice(MusicModel *m, Solid::Device &dev) : FsDevice(m, dev) , access(dev.as<Solid::StorageAccess>()) { spaceInfo.setPath(access->filePath()); setup(); } UmsDevice::~UmsDevice() { } void UmsDevice::connectionStateChanged() { if (isConnected()) { spaceInfo.setPath(access->filePath()); setup(); if (opts.autoScan || scanned){ // Only scan if we are set to auto scan, or we have already scanned before... rescan(false); // Read from cache if we have it! } else { setStatusMessage(i18n("Not Scanned")); } } else { clear(); } } void UmsDevice::toggle() { if (solidDev.isValid() && access && access->isValid()) { if (access->isAccessible()) { if (scanner) { scanner->stop(); } access->teardown(); } else { access->setup(); } } } bool UmsDevice::isConnected() const { return solidDev.isValid() && access && access->isValid() && access->isAccessible(); } double UmsDevice::usedCapacity() { if (cacheProgress>-1) { return (cacheProgress*1.0)/100.0; } if (!isConnected()) { return -1.0; } return spaceInfo.size()>0 ? (spaceInfo.used()*1.0)/(spaceInfo.size()*1.0) : -1.0; } QString UmsDevice::capacityString() { if (cacheProgress>-1) { return statusMessage(); } if (!isConnected()) { return i18n("Not Connected"); } return i18n("%1 free", Utils::formatByteSize(spaceInfo.size()-spaceInfo.used())); } qint64 UmsDevice::freeSpace() { if (!isConnected()) { return 0; } return spaceInfo.size()-spaceInfo.used(); } void UmsDevice::setup() { if (!isConnected()) { return; } QString path=spaceInfo.path(); audioFolder = path; QFile file(path+constSettingsFile); QString audioFolderSetting; opts=DeviceOptions(); if (file.open(QIODevice::ReadOnly|QIODevice::Text)) { configured=true; QTextStream in(&file); while (!in.atEnd()) { QString line = in.readLine(); if (line.startsWith(constMusicFolderKey+"=")) { audioFolderSetting=audioFolder=Utils::cleanPath(path+'/'+line.section('=', 1, 1)); if (!QDir(audioFolder).exists()) { audioFolder = path; } } else if (line.startsWith(constMusicFilenameSchemeKey+"=")) { QString scheme = line.section('=', 1, 1); //protect against empty setting. if( !scheme.isEmpty() ) { opts.scheme = scheme; } } else if (line.startsWith(constVfatSafeKey+"=")) { opts.vfatSafe = QLatin1String("true")==line.section('=', 1, 1); } else if (line.startsWith(constAsciiOnlyKey+"=")) { opts.asciiOnly = QLatin1String("true")==line.section('=', 1, 1); } else if (line.startsWith(constIgnoreTheKey+"=")) { opts.ignoreThe = QLatin1String("true")==line.section('=', 1, 1); } else if (line.startsWith(constReplaceSpacesKey+"=")) { opts.replaceSpaces = QLatin1String("true")==line.section('=', 1, 1); } else { unusedParams+=line; } } } bool haveOpts=FsDevice::readOpts(path+constCantataSettingsFile, opts, false); if (!configured) { configured=haveOpts; } if (opts.coverName.isEmpty()) { opts.coverName=constDefCoverFileName; } // No setting, see if any standard dirs exist in path... if (audioFolderSetting.isEmpty() || audioFolderSetting!=audioFolder) { QStringList dirs; dirs << QLatin1String("Music") << QLatin1String("MUSIC") << QLatin1String("Albums") << QLatin1String("ALBUMS"); foreach (const QString &d, dirs) { if (QDir(path+d).exists()) { audioFolder=path+d; break; } } } if (!audioFolder.endsWith('/')) { audioFolder+='/'; } if (opts.autoScan || scanned){ // Only scan if we are set to auto scan, or we have already scanned before... rescan(false); // Read from cache if we have it! } else { setStatusMessage(i18n("Not Scanned")); } } void UmsDevice::configure(QWidget *parent) { if (!isIdle()) { return; } DevicePropertiesDialog *dlg=new DevicePropertiesDialog(parent); connect(dlg, SIGNAL(updatedSettings(const QString &, const DeviceOptions &)), SLOT(saveProperties(const QString &, const DeviceOptions &))); if (!configured) { connect(dlg, SIGNAL(cancelled()), SLOT(saveProperties())); } dlg->show(audioFolder, opts, qobject_cast<ActionDialog *>(parent) ? (DevicePropertiesWidget::Prop_All-DevicePropertiesWidget::Prop_Folder) : DevicePropertiesWidget::Prop_All); } void UmsDevice::saveProperties() { saveProperties(audioFolder, opts); } static inline QString toString(bool b) { return b ? QLatin1String("true") : QLatin1String("false"); } void UmsDevice::saveOptions() { if (!isConnected()) { return; } QString path=spaceInfo.path(); QFile file(path+constSettingsFile); QString fixedPath(audioFolder); if (fixedPath.startsWith(path)) { fixedPath=QLatin1String("./")+fixedPath.mid(path.length()); } DeviceOptions def; if (file.open(QIODevice::WriteOnly|QIODevice::Text)) { QTextStream out(&file); if (!fixedPath.isEmpty()) { out << constMusicFolderKey << '=' << fixedPath << '\n'; } if (opts.scheme!=def.scheme) { out << constMusicFilenameSchemeKey << '=' << opts.scheme << '\n'; } if (opts.scheme!=def.scheme) { out << constVfatSafeKey << '=' << toString(opts.vfatSafe) << '\n'; } if (opts.asciiOnly!=def.asciiOnly) { out << constAsciiOnlyKey << '=' << toString(opts.asciiOnly) << '\n'; } if (opts.ignoreThe!=def.ignoreThe) { out << constIgnoreTheKey << '=' << toString(opts.ignoreThe) << '\n'; } if (opts.replaceSpaces!=def.replaceSpaces) { out << constReplaceSpacesKey << '=' << toString(opts.replaceSpaces) << '\n'; } foreach (const QString &u, unusedParams) { out << u << '\n'; } } } void UmsDevice::saveProperties(const QString &newPath, const DeviceOptions &newOpts) { QString nPath=Utils::fixPath(newPath); if (configured && opts==newOpts && nPath==audioFolder) { return; } configured=true; bool diffCacheSettings=opts.useCache!=newOpts.useCache; opts=newOpts; if (diffCacheSettings) { if (opts.useCache) { saveCache(); } else { removeCache(); } } emit configurationChanged(); QString oldPath=audioFolder; if (!isConnected()) { return; } audioFolder=nPath; saveOptions(); FsDevice::writeOpts(spaceInfo.path()+constCantataSettingsFile, opts, false); if (oldPath!=audioFolder) { rescan(); // Path changed, so we can ignore cache... } }
polpo/cantata-mac
devices/umsdevice.cpp
C++
gpl-3.0
8,544
[ 30522, 1013, 1008, 1008, 23629, 1008, 1008, 9385, 1006, 1039, 1007, 2249, 1011, 2286, 7010, 19266, 1026, 7010, 1012, 1052, 1012, 19266, 1030, 20917, 4014, 1012, 4012, 1028, 1008, 1008, 1011, 1011, 1011, 1011, 1008, 1008, 2023, 2565, 2003, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# alsa-switch Switching of Alsa audio devices the purpose of alsa-switch is to control the flow of multiple audio-streams going through a system while supporting priority streams You invoke audio-switch like this: auido-switch <input-device> <output-device> <control-file> for example audio-switch microphone speaker control1 This creates a named pipe named "control1", it is ready to connect "microphone" audio device to "speaker" audio device once the control pipe is telling it to do so. Writing a character to the control channel does this commands to send: '1'...'9' priority 1...9 announcement '0' end of announcement (channel muted) typical use case you have audio source1...9 you have virtual speakers 1...9 you mix virtual speaker 1...9 to physical speaker in alsa (/etc/asound.conf) you run alsa-switch and it will create control files 1...9 now all sound sources are muted if source 2 now has a level 8 priority annoucement it would write '8' into "control2" this would mute all audio streams which have no announcement or a priority announcement of level '9' 1 is the highest priority 9 is the lowest priority 0 is channel is muted At startup all channels are muted. Should a higher priority annoucement come in now on source 3, then source 2 would become muted too. Once source 3 is finished and source 2 is still in priority level 8, the audio from source 2 would be heard again.
andreasfink/alsa-switch
README.md
Markdown
mit
1,452
[ 30522, 1001, 25520, 2050, 1011, 6942, 11991, 1997, 25520, 2050, 5746, 5733, 1996, 3800, 1997, 25520, 2050, 1011, 6942, 2003, 2000, 2491, 1996, 4834, 1997, 3674, 5746, 1011, 9199, 2183, 2083, 1037, 2291, 2096, 4637, 9470, 9199, 2017, 1999, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/** * Copyright (C) 2010-2017 Gordon Fraser, Andrea Arcuri and EvoSuite * contributors * * This file is part of EvoSuite. * * EvoSuite is free software: you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3.0 of the License, or * (at your option) any later version. * * EvoSuite is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with EvoSuite. If not, see <http://www.gnu.org/licenses/>. */ package org.evosuite.symbolic.vm; import org.evosuite.symbolic.expr.fp.RealValue; /** * * @author galeotti * */ public final class Fp64Operand implements DoubleWordOperand, RealOperand { private final RealValue realExpr; public Fp64Operand(RealValue realExpr) { this.realExpr = realExpr; } public RealValue getRealExpression() { return realExpr; } @Override public String toString() { return realExpr.toString(); } }
sefaakca/EvoSuite-Sefa
client/src/main/java/org/evosuite/symbolic/vm/Fp64Operand.java
Java
lgpl-3.0
1,222
[ 30522, 1013, 1008, 1008, 1008, 9385, 1006, 1039, 1007, 2230, 1011, 2418, 5146, 9443, 1010, 8657, 8115, 9496, 1998, 23408, 2891, 14663, 2063, 1008, 16884, 1008, 1008, 2023, 5371, 2003, 2112, 1997, 23408, 2891, 14663, 2063, 1012, 1008, 1008, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
//---------------------------------------------------------------------------- // Anti-Grain Geometry - Version 2.4 // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) // // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. // This software is provided "as is" without express or implied // warranty, and with no claim as to its suitability for any purpose. // // Class scanline_bin - binary scanline. // //---------------------------------------------------------------------------- // // Adaptation for 32-bit screen coordinates (scanline32_bin) has been sponsored by // Liberty Technology Systems, Inc., visit http://lib-sys.com // // Liberty Technology Systems, Inc. is the provider of // PostScript and PDF technology for software developers. // //---------------------------------------------------------------------------- #ifndef AGG_SCANLINE_BIN_INCLUDED #define AGG_SCANLINE_BIN_INCLUDED #include "agg_array.h" namespace agg { //=============================================================scanline_bin // // This is binary scaline container which supports the interface // used in the rasterizer::render(). See description of agg_scanline_u8 // for details. // //------------------------------------------------------------------------ class scanline_bin { public: typedef int32 coord_type; struct span { int16 x; int16 len; }; typedef const span* const_iterator; //-------------------------------------------------------------------- scanline_bin() : m_last_x(0x7FFFFFF0), m_spans(), m_cur_span(0) { } //-------------------------------------------------------------------- void reset(int min_x, int max_x) { unsigned max_len = max_x - min_x + 3; if(max_len > m_spans.size()) { m_spans.resize(max_len); } m_last_x = 0x7FFFFFF0; m_cur_span = &m_spans[0]; } //-------------------------------------------------------------------- void add_cell(int x, unsigned) { if(x == m_last_x+1) { m_cur_span->len++; } else { ++m_cur_span; m_cur_span->x = (int16)x; m_cur_span->len = 1; } m_last_x = x; } //-------------------------------------------------------------------- void add_span(int x, unsigned len, unsigned) { if(x == m_last_x+1) { m_cur_span->len = (int16)(m_cur_span->len + len); } else { ++m_cur_span; m_cur_span->x = (int16)x; m_cur_span->len = (int16)len; } m_last_x = x + len - 1; } //-------------------------------------------------------------------- void add_cells(int x, unsigned len, const void*) { add_span(x, len, 0); } //-------------------------------------------------------------------- void finalize(int y) { m_y = y; } //-------------------------------------------------------------------- void reset_spans() { m_last_x = 0x7FFFFFF0; m_cur_span = &m_spans[0]; } //-------------------------------------------------------------------- int y() const { return m_y; } unsigned num_spans() const { return unsigned(m_cur_span - &m_spans[0]); } const_iterator begin() const { return &m_spans[1]; } private: scanline_bin(const scanline_bin&); const scanline_bin operator = (const scanline_bin&); int m_last_x; int m_y; pod_array<span> m_spans; span* m_cur_span; }; //===========================================================scanline32_bin class scanline32_bin { public: typedef int32 coord_type; //-------------------------------------------------------------------- struct span { span() {} span(coord_type x_, coord_type len_) : x(x_), len(len_) {} coord_type x; coord_type len; }; typedef pod_bvector<span, 4> span_array_type; //-------------------------------------------------------------------- class const_iterator { public: const_iterator(const span_array_type& spans) : m_spans(spans), m_span_idx(0) {} const span& operator*() const { return m_spans[m_span_idx]; } const span* operator->() const { return &m_spans[m_span_idx]; } void operator ++ () { ++m_span_idx; } private: const span_array_type& m_spans; unsigned m_span_idx; }; //-------------------------------------------------------------------- scanline32_bin() : m_max_len(0), m_last_x(0x7FFFFFF0) {} //-------------------------------------------------------------------- void reset(int min_x, int max_x) { m_last_x = 0x7FFFFFF0; m_spans.remove_all(); } //-------------------------------------------------------------------- void add_cell(int x, unsigned) { if(x == m_last_x+1) { m_spans.last().len++; } else { m_spans.add(span(coord_type(x), 1)); } m_last_x = x; } //-------------------------------------------------------------------- void add_span(int x, unsigned len, unsigned) { if(x == m_last_x+1) { m_spans.last().len += coord_type(len); } else { m_spans.add(span(coord_type(x), coord_type(len))); } m_last_x = x + len - 1; } //-------------------------------------------------------------------- void add_cells(int x, unsigned len, const void*) { add_span(x, len, 0); } //-------------------------------------------------------------------- void finalize(int y) { m_y = y; } //-------------------------------------------------------------------- void reset_spans() { m_last_x = 0x7FFFFFF0; m_spans.remove_all(); } //-------------------------------------------------------------------- int y() const { return m_y; } unsigned num_spans() const { return m_spans.size(); } const_iterator begin() const { return const_iterator(m_spans); } private: scanline32_bin(const scanline32_bin&); const scanline32_bin operator = (const scanline32_bin&); unsigned m_max_len; int m_last_x; int m_y; span_array_type m_spans; }; } #endif
team-parasol/parasol
src/vector/agg/include/agg_scanline_bin.h
C
lgpl-2.1
7,486
[ 30522, 1013, 1013, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 30524, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.max.vm.type; import static com.sun.max.vm.MaxineVM.*; import static com.sun.max.vm.classfile.ErrorContext.*; import com.sun.max.*; import com.sun.max.annotate.*; import com.sun.max.lang.*; import com.sun.max.unsafe.*; import com.sun.max.vm.*; import com.sun.max.vm.actor.holder.*; import com.sun.max.vm.classfile.constant.*; import com.sun.max.vm.layout.*; import com.sun.max.vm.object.*; import com.sun.max.vm.reference.*; import com.sun.max.vm.runtime.*; import com.sun.max.vm.value.*; /** * Groups/categories/subsets/whatever of types with common relevant implementation traits wrt.: * size, GC, stack representation, etc. */ public abstract class Kind<Value_Type extends Value<Value_Type>> { public final KindEnum asEnum; public final Utf8Constant name; public final Class javaClass; public final Class javaArrayClass; public final Class<Value_Type> valueClass; public final Kind stackKind; @INSPECTED public final char character; public final Class boxedClass; public final WordWidth width; public final boolean isCategory1; public final int stackSlots; public final boolean isWord; public final boolean isReference; @HOSTED_ONLY protected Kind(KindEnum kindEnum, String name, Class javaClass, Class javaArrayClass, Class<Value_Type> valueClass, char character, final Class boxedClass, WordWidth width) { this.asEnum = kindEnum; kindEnum.setKind(this); this.name = SymbolTable.makeSymbol(name); this.javaClass = javaClass; this.javaArrayClass = javaArrayClass; this.valueClass = valueClass; this.character = character; this.boxedClass = boxedClass; this.width = width; this.stackKind = "ZBCS".indexOf(character) != -1 ? INT : this; this.isCategory1 = "JD".indexOf(character) == -1; this.stackSlots = !isCategory1 ? 2 : (character == 'V' ? 0 : 1); this.isWord = kindEnum == KindEnum.WORD; this.isReference = kindEnum == KindEnum.REFERENCE; } @Override public final int hashCode() { return name.hashCode(); } @Override public final String toString() { return name.toString(); } public static Kind<?> fromJava(Class type) { if (MaxineVM.isHosted()) { if (type.isPrimitive()) { for (Kind kind : Kind.PRIMITIVE_JAVA_CLASSES) { if (kind.javaClass == type) { return kind; } } } if (Word.class.isAssignableFrom(type)) { return Kind.WORD; } return Kind.REFERENCE; } return ClassActor.fromJava(type).kind; } public static Kind<?> fromBoxedClass(Class type) { assert !type.isPrimitive(); if (MaxineVM.isHosted()) { for (Kind kind : Kind.PRIMITIVE_JAVA_CLASSES) { if (kind.boxedClass == type) { return kind; } } if (Word.class.isAssignableFrom(type)) { return Kind.WORD; } return Kind.REFERENCE; } return ClassActor.fromJava(type).kind; } /** * Determines if this is a primitive kind other than {@code void}. */ public final boolean isPrimitiveValue() { return JavaTypeDescriptor.isPrimitive(typeDescriptor()); } public final boolean isExtendedPrimitiveValue() { return asEnum != KindEnum.REFERENCE && asEnum != KindEnum.VOID; } public final boolean isPrimitiveOfSameSizeAs(Kind kind) { return kind == this || isPrimitiveValue() && kind.isPrimitiveValue() && width.numberOfBytes == kind.width.numberOfBytes; } public abstract ArrayLayout arrayLayout(LayoutScheme layoutScheme); public ArrayClassActor arrayClassActor() { throw new ClassCastException("there is no canonical array class for a non-primitive Java type"); } public Value_Type readValue(Reference reference, int offset) { throw new ClassCastException(); } public void writeValue(Object object, int offset, Value_Type value) { throw new ClassCastException(); } public void writeErasedValue(Object object, int offset, Value value) { final Value_Type v = valueClass.cast(value); writeValue(object, offset, v); } public Value_Type getValue(Object array, int index) { throw new ClassCastException(); } public void setValue(Object array, int index, Value_Type value) { throw new ClassCastException(); } public void setErasedValue(Object array, int index, Value value) { final Value_Type v = valueClass.cast(value); setValue(array, index, v); } public Value_Type convert(Value value) { throw new IllegalArgumentException(); } /** * Converts a given Java boxed value to the equivalent boxed {@link Value}. * * @param boxedJavaValue * @throws IllegalArgumentException if the type of {@code boxedJavaValue} is not equivalent with this kind */ public abstract Value asValue(Object boxedJavaValue) throws IllegalArgumentException; public Value toValue(Object boxedJavaValue) { try { return asValue(boxedJavaValue); } catch (IllegalArgumentException illegalArgumentException) { return convert(Value.fromBoxedJavaValue(boxedJavaValue)); } } public abstract Value_Type zeroValue(); public static final Kind<VoidValue> VOID = new Kind<VoidValue>(KindEnum.VOID, "void", void.class, null, VoidValue.class, 'V', Void.class, null) { @Override public VoidValue convert(Value value) { final Kind kind = this; if (kind != value.kind()) { return super.convert(value); } return VoidValue.VOID; } @Override public Value asValue(Object boxedJavaValue) { if (boxedJavaValue == null || void.class.isInstance(boxedJavaValue)) { return VoidValue.VOID; } throw new IllegalArgumentException(); } @Override public final ArrayLayout arrayLayout(LayoutScheme layoutScheme) { throw new ClassCastException("there is no array layout for void"); } @Override public VoidValue zeroValue() { return VoidValue.VOID; } }; public static final Kind<IntValue> INT = new Kind<IntValue>(KindEnum.INT, "int", int.class, int[].class, IntValue.class, 'I', Integer.class, WordWidth.BITS_32) { @Override public ArrayClassActor arrayClassActor() { return ClassRegistry.INT_ARRAY; } @Override public IntValue readValue(Reference reference, int offset) { return IntValue.from(reference.readInt(offset)); } @Override public void writeValue(Object object, int offset, IntValue value) { TupleAccess.writeInt(object, offset, value.asInt()); } @Override public IntValue getValue(Object array, int index) { return IntValue.from(ArrayAccess.getInt(array, index)); } @Override public void setValue(Object array, int index, IntValue value) { ArrayAccess.setInt(array, index, value.asInt()); } @Override public IntValue convert(Value value) { return IntValue.from(value.toInt()); } @Override public IntValue asValue(Object boxedJavaValue) { try { final Integer specificBox = (Integer) boxedJavaValue; return IntValue.from(specificBox.intValue()); } catch (ClassCastException e) { throw new IllegalArgumentException(); } } @Override public IntValue zeroValue() { return IntValue.ZERO; } @Override public final ArrayLayout arrayLayout(LayoutScheme layoutScheme) { return layoutScheme.intArrayLayout; } }; public static final Kind<ByteValue> BYTE = new Kind<ByteValue>(KindEnum.BYTE, "byte", byte.class, byte[].class, ByteValue.class, 'B', Byte.class, WordWidth.BITS_8) { @Override public ArrayClassActor arrayClassActor() { return ClassRegistry.BYTE_ARRAY; } @Override public ByteValue readValue(Reference reference, int offset) { return ByteValue.from(reference.readByte(offset)); } @Override public void writeValue(Object object, int offset, ByteValue value) { TupleAccess.writeByte(object, offset, value.asByte()); } @Override public ByteValue getValue(Object array, int index) { return ByteValue.from(ArrayAccess.getByte(array, index)); } @Override public void setValue(Object array, int index, ByteValue value) { ArrayAccess.setByte(array, index, value.asByte()); } @Override public ByteValue convert(Value value) { return ByteValue.from(value.toByte()); } @Override public ByteValue asValue(Object boxedJavaValue) { try { final Byte specificBox = (Byte) boxedJavaValue; return ByteValue.from(specificBox.byteValue()); } catch (ClassCastException e) { throw new IllegalArgumentException(); } } @Override public ByteValue zeroValue() { return ByteValue.ZERO; } @Override public final ArrayLayout arrayLayout(LayoutScheme layoutScheme) { return layoutScheme.byteArrayLayout; } }; public static final Kind<BooleanValue> BOOLEAN = new Kind<BooleanValue>(KindEnum.BOOLEAN, "boolean", boolean.class, boolean[].class, BooleanValue.class, 'Z', Boolean.class, WordWidth.BITS_8) { @Override public ArrayClassActor arrayClassActor() { return ClassRegistry.BOOLEAN_ARRAY; } @Override public BooleanValue readValue(Reference reference, int offset) { return BooleanValue.from(reference.readBoolean(offset)); } @Override public void writeValue(Object object, int offset, BooleanValue value) { TupleAccess.writeBoolean(object, offset, value.asBoolean()); } @Override public BooleanValue getValue(Object array, int index) { return BooleanValue.from(ArrayAccess.getBoolean(array, index)); } @Override public void setValue(Object array, int index, BooleanValue value) { ArrayAccess.setBoolean(array, index, value.asBoolean()); } @Override public BooleanValue convert(Value value) { return BooleanValue.from(value.toBoolean()); } @Override public BooleanValue asValue(Object boxedJavaValue) { try { final Boolean specificBox = (Boolean) boxedJavaValue; return BooleanValue.from(specificBox.booleanValue()); } catch (ClassCastException e) { throw new IllegalArgumentException(); } } @Override public BooleanValue zeroValue() { return BooleanValue.FALSE; } @Override public final ArrayLayout arrayLayout(LayoutScheme layoutScheme) { return layoutScheme.booleanArrayLayout; } }; public static final Kind<ShortValue> SHORT = new Kind<ShortValue>(KindEnum.SHORT, "short", short.class, short[].class, ShortValue.class, 'S', Short.class, WordWidth.BITS_16) { @Override public ArrayClassActor arrayClassActor() { return ClassRegistry.SHORT_ARRAY; } @Override public ShortValue readValue(Reference reference, int offset) { return ShortValue.from(reference.readShort(offset)); } @Override public void writeValue(Object object, int offset, ShortValue value) { TupleAccess.writeShort(object, offset, value.asShort()); } @Override public ShortValue getValue(Object array, int index) { return ShortValue.from(ArrayAccess.getShort(array, index)); } @Override public void setValue(Object array, int index, ShortValue value) { ArrayAccess.setShort(array, index, value.asShort()); } @Override public ShortValue convert(Value value) { return ShortValue.from(value.toShort()); } @Override public ShortValue asValue(Object boxedJavaValue) { try { final Short specificBox = (Short) boxedJavaValue; return ShortValue.from(specificBox.shortValue()); } catch (ClassCastException e) { throw new IllegalArgumentException(); } } @Override public ShortValue zeroValue() { return ShortValue.ZERO; } @Override public final ArrayLayout arrayLayout(LayoutScheme layoutScheme) { return layoutScheme.shortArrayLayout; } }; public static final Kind<CharValue> CHAR = new Kind<CharValue>(KindEnum.CHAR, "char", char.class, char[].class, CharValue.class, 'C', Character.class, WordWidth.BITS_16) { @Override public ArrayClassActor arrayClassActor() { return ClassRegistry.CHAR_ARRAY; } @Override public CharValue readValue(Reference reference, int offset) { return CharValue.from(reference.readChar(offset)); } @Override public void writeValue(Object object, int offset, CharValue value) { TupleAccess.writeChar(object, offset, value.asChar()); } @Override public CharValue getValue(Object array, int index) { return CharValue.from(ArrayAccess.getChar(array, index)); } @Override public void setValue(Object array, int index, CharValue value) { ArrayAccess.setChar(array, index, value.asChar()); } @Override public CharValue convert(Value value) { return CharValue.from(value.toChar()); } @Override public CharValue asValue(Object boxedJavaValue) { try { final Character specificBox = (Character) boxedJavaValue; return CharValue.from(specificBox.charValue()); } catch (ClassCastException e) { throw new IllegalArgumentException(); } } @Override public CharValue zeroValue() { return CharValue.ZERO; } @Override public final ArrayLayout arrayLayout(LayoutScheme layoutScheme) { return layoutScheme.charArrayLayout; } }; public static final Kind<FloatValue> FLOAT = new Kind<FloatValue>(KindEnum.FLOAT, "float", float.class, float[].class, FloatValue.class, 'F', Float.class, WordWidth.BITS_32) { @Override public ArrayClassActor arrayClassActor() { return ClassRegistry.FLOAT_ARRAY; } @Override public FloatValue readValue(Reference reference, int offset) { return FloatValue.from(reference.readFloat(offset)); } @Override public void writeValue(Object object, int offset, FloatValue value) { TupleAccess.writeFloat(object, offset, value.asFloat()); } @Override public FloatValue getValue(Object array, int index) { return FloatValue.from(ArrayAccess.getFloat(array, index)); } @Override public void setValue(Object array, int index, FloatValue value) { ArrayAccess.setFloat(array, index, value.asFloat()); } @Override public FloatValue convert(Value value) { return FloatValue.from(value.toFloat()); } @Override public FloatValue asValue(Object boxedJavaValue) { try { final Float specificBox = (Float) boxedJavaValue; return FloatValue.from(specificBox.floatValue()); } catch (ClassCastException e) { throw new IllegalArgumentException(); } } @Override public FloatValue zeroValue() { return FloatValue.ZERO; } @Override public final ArrayLayout arrayLayout(LayoutScheme layoutScheme) { return layoutScheme.floatArrayLayout; } }; public static final Kind<LongValue> LONG = new Kind<LongValue>(KindEnum.LONG, "long", long.class, long[].class, LongValue.class, 'J', Long.class, WordWidth.BITS_64) { @Override public ArrayClassActor arrayClassActor() { return ClassRegistry.LONG_ARRAY; } @Override public LongValue readValue(Reference reference, int offset) { return LongValue.from(reference.readLong(offset)); } @Override public void writeValue(Object object, int offset, LongValue value) { TupleAccess.writeLong(object, offset, value.asLong()); } @Override public LongValue getValue(Object array, int index) { return LongValue.from(ArrayAccess.getLong(array, index)); } @Override public void setValue(Object array, int index, LongValue value) { ArrayAccess.setLong(array, index, value.asLong()); } @Override public LongValue convert(Value value) { return LongValue.from(value.toLong()); } @Override public LongValue asValue(Object boxedJavaValue) { try { final Long specificBox = (Long) boxedJavaValue; return LongValue.from(specificBox.longValue()); } catch (ClassCastException e) { throw new IllegalArgumentException(); } } @Override public LongValue zeroValue() { return LongValue.ZERO; } @Override public final ArrayLayout arrayLayout(LayoutScheme layoutScheme) { return layoutScheme.longArrayLayout; } }; public static final Kind<DoubleValue> DOUBLE = new Kind<DoubleValue>(KindEnum.DOUBLE, "double", double.class, double[].class, DoubleValue.class, 'D', Double.class, WordWidth.BITS_64) { @Override public ArrayClassActor arrayClassActor() { return ClassRegistry.DOUBLE_ARRAY; } @Override public DoubleValue readValue(Reference reference, int offset) { return DoubleValue.from(reference.readDouble(offset)); } @Override public void writeValue(Object object, int offset, DoubleValue value) { TupleAccess.writeDouble(object, offset, value.asDouble()); } @Override public DoubleValue getValue(Object array, int index) { return DoubleValue.from(ArrayAccess.getDouble(array, index)); } @Override public void setValue(Object array, int index, DoubleValue value) { ArrayAccess.setDouble(array, index, value.asDouble()); } @Override public DoubleValue convert(Value value) { return DoubleValue.from(value.toDouble()); } @Override public DoubleValue asValue(Object boxedJavaValue) { try { final Double specificBox = (Double) boxedJavaValue; return DoubleValue.from(specificBox.doubleValue()); } catch (ClassCastException e) { throw new IllegalArgumentException(); } } @Override public DoubleValue zeroValue() { return DoubleValue.ZERO; } @Override public final ArrayLayout arrayLayout(LayoutScheme layoutScheme) { return layoutScheme.doubleArrayLayout; } }; public static final Kind<WordValue> WORD = new Kind<WordValue>(KindEnum.WORD, "Word", Word.class, Word[].class, WordValue.class, 'W', Word.class, Word.widthValue()) { @Override public WordValue readValue(Reference reference, int offset) { return new WordValue(reference.readWord(offset)); } @Override public void writeValue(Object object, int offset, WordValue value) { TupleAccess.writeWord(object, offset, value.asWord()); } @Override public WordValue getValue(Object array, int index) { return new WordValue(ArrayAccess.getWord(array, index)); } @Override public void setValue(Object array, int index, WordValue value) { ArrayAccess.setWord(array, index, value.asWord()); } @Override public WordValue convert(Value value) { return new WordValue(value.toWord()); } @Override public WordValue asValue(Object boxedJavaValue) { if (boxedJavaValue instanceof WordValue) { return (WordValue) boxedJavaValue; } if (isHosted()) { if (boxedJavaValue instanceof Word) { final Word box = (Word) boxedJavaValue; return new WordValue(box); } } if (boxedJavaValue == null) { // we are lenient here to allow default static initializers to function return WordValue.ZERO; } throw new IllegalArgumentException(); } @Override public WordValue zeroValue() { return WordValue.ZERO; } @Override public final ArrayLayout arrayLayout(LayoutScheme layoutScheme) { return layoutScheme.wordArrayLayout; } }; public static final Kind<ReferenceValue> REFERENCE = new Kind<ReferenceValue>(KindEnum.REFERENCE, "Reference", Object.class, Object[].class, ReferenceValue.class, 'R', Object.class, Word.widthValue()) { @Override public ReferenceValue readValue(Reference reference, int offset) { return ReferenceValue.from(reference.readReference(offset).toJava()); } @Override public void writeValue(Object object, int offset, ReferenceValue value) { TupleAccess.writeObject(object, offset, value.asObject()); } @Override public ReferenceValue getValue(Object array, int index) { return ReferenceValue.from(ArrayAccess.getObject(array, index)); } @Override public void setValue(Object array, int index, ReferenceValue value) { ArrayAccess.setObject(array, index, value.asObject()); } @Override public ReferenceValue convert(Value value) { final Kind kind = this; if (kind != value.kind()) { return super.convert(value); } return (ReferenceValue) value; } @Override public ReferenceValue asValue(Object boxedJavaValue) { return ReferenceValue.from(boxedJavaValue); } @Override public ReferenceValue zeroValue() { return ReferenceValue.NULL; } @Override public final ArrayLayout arrayLayout(LayoutScheme layoutScheme) { return layoutScheme.referenceArrayLayout; } }; public static final Kind[] PRIMITIVE_VALUES = {BYTE, BOOLEAN, SHORT, CHAR, INT, FLOAT, LONG, DOUBLE}; public static final Kind[] PRIMITIVE_JAVA_CLASSES = Utils.concat(PRIMITIVE_VALUES, VOID); public static final Kind[] EXTENDED_PRIMITIVE_VALUES = Utils.concat(PRIMITIVE_VALUES, WORD); public static final Kind[] VALUES = Utils.concat(EXTENDED_PRIMITIVE_VALUES, REFERENCE); public static final Kind[] ALL = Utils.concat(VALUES, VOID); public static final Kind[] NONE = {}; public static Kind fromNewArrayTag(int tag) { switch (tag) { case 4: return Kind.BOOLEAN; case 5: return Kind.CHAR; case 6: return Kind.FLOAT; case 7: return Kind.DOUBLE; case 8: return Kind.BYTE; case 9: return Kind.SHORT; case 10: return Kind.INT; case 11: return Kind.LONG; default: throw classFormatError("Invalid newarray type tag (" + tag + ")"); } } public static Kind fromCharacter(char character) { switch (character) { case 'Z': return Kind.BOOLEAN; case 'C': return Kind.CHAR; case 'F': return Kind.FLOAT; case 'D': return Kind.DOUBLE; case 'B': return Kind.BYTE; case 'S': return Kind.SHORT; case 'I': return Kind.INT; case 'J': return Kind.LONG; case 'R': return Kind.REFERENCE; case 'W': return Kind.WORD; case 'V': return Kind.VOID; default: return null; } } /** * Unboxes a given object to a boolean. * * @throws IllegalArgumentException if {@code boxedJavaValue} is not an instance of {@link Boolean} */ public static boolean unboxBoolean(Object boxedJavaValue) { if (boxedJavaValue instanceof Boolean) { final Boolean box = (Boolean) boxedJavaValue; return box.booleanValue(); } throw new IllegalArgumentException("expected a boxed boolean, got " + boxedJavaValue.getClass().getName()); } /** * Unboxes a given object to a byte. * * @throws IllegalArgumentException if {@code boxedJavaValue} is not an instanceof {@link Byte} */ public static byte unboxByte(Object boxedJavaValue) { if (boxedJavaValue instanceof Byte) { final Byte box = (Byte) boxedJavaValue; return box.byteValue(); } throw new IllegalArgumentException("expected a boxed byte, got " + boxedJavaValue.getClass().getName()); } public TypeDescriptor typeDescriptor() { // Note: the class Kind can not have a field of class TypeDescriptor because that leads to // unnecessary and circular dependencies when initializing the class. switch (asEnum) { // Checkstyle: stop case BOOLEAN: return JavaTypeDescriptor.BOOLEAN; case BYTE: return JavaTypeDescriptor.BYTE; case CHAR: return JavaTypeDescriptor.CHAR; case SHORT: return JavaTypeDescriptor.SHORT; case INT: return JavaTypeDescriptor.INT; case LONG: return JavaTypeDescriptor.LONG; case FLOAT: return JavaTypeDescriptor.FLOAT; case DOUBLE: return JavaTypeDescriptor.DOUBLE; case WORD: return JavaTypeDescriptor.WORD; case REFERENCE: return JavaTypeDescriptor.REFERENCE; case VOID: return JavaTypeDescriptor.VOID; default: throw FatalError.unexpected("invalid kind"); // Checkstyle: resume } } /** * Unboxes a given object to a char, doing a primitive widening conversion if necessary. * * @throws IllegalArgumentException if {@code boxedJavaValue} cannot be unboxed to a char * * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Concepts.doc.html#23435">2.6.2 Widening Primitive Conversions</a> */ public static char unboxChar(Object boxedJavaValue) { if (boxedJavaValue instanceof Character) { final Character box = (Character) boxedJavaValue; return box.charValue(); } throw new IllegalArgumentException("expected a boxed char, got " + boxedJavaValue.getClass().getName()); } /** * Unboxes a given object to a short, doing a primitive widening conversion if necessary. * * @throws IllegalArgumentException if {@code boxedJavaValue} cannot be unboxed to a short * * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Concepts.doc.html#23435">2.6.2 Widening Primitive Conversions</a> */ public static short unboxShort(Object boxedJavaValue) { if (boxedJavaValue instanceof Short) { final Short box = (Short) boxedJavaValue; return box.shortValue(); } if (boxedJavaValue instanceof Byte) { final Byte box = (Byte) boxedJavaValue; return box.shortValue(); } throw new IllegalArgumentException("expected a boxed short, got " + boxedJavaValue.getClass().getName()); } /** * Unboxes a given object to an int, doing a primitive widening conversion if necessary. * * @throws IllegalArgumentException if {@code boxedJavaValue} cannot be unboxed to an int * * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Concepts.doc.html#23435">2.6.2 Widening Primitive Conversions</a> */ public static int unboxInt(Object boxedJavaValue) { if (boxedJavaValue instanceof Integer) { final Integer box = (Integer) boxedJavaValue; return box.intValue(); } if (boxedJavaValue instanceof Short) { final Short box = (Short) boxedJavaValue; return box.intValue(); } if (boxedJavaValue instanceof Character) { final Character box = (Character) boxedJavaValue; return box.charValue(); } if (boxedJavaValue instanceof Byte) { final Byte box = (Byte) boxedJavaValue; return box.intValue(); } throw new IllegalArgumentException("expected a boxed int, got " + boxedJavaValue.getClass().getName()); } /** * Unboxes a given object to a float, doing a primitive widening conversion if necessary. * * @throws IllegalArgumentException if {@code boxedJavaValue} cannot be unboxed to a float * * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Concepts.doc.html#23435">2.6.2 Widening Primitive Conversions</a> */ public static float unboxFloat(Object boxedJavaValue) { if (boxedJavaValue instanceof Float) { final Float box = (Float) boxedJavaValue; return box.floatValue(); } if (boxedJavaValue instanceof Integer) { final Integer box = (Integer) boxedJavaValue; return box.floatValue(); } if (boxedJavaValue instanceof Long) { final Long box = (Long) boxedJavaValue; return box.floatValue(); } if (boxedJavaValue instanceof Short) { final Short box = (Short) boxedJavaValue; return box.floatValue(); } if (boxedJavaValue instanceof Character) { final Character box = (Character) boxedJavaValue; return box.charValue(); } if (boxedJavaValue instanceof Byte) { final Byte box = (Byte) boxedJavaValue; return box.floatValue(); } throw new IllegalArgumentException("expected a boxed float, got " + boxedJavaValue.getClass().getName()); } /** * Unboxes a given object to a long, doing a primitive widening conversion if necessary. * * @throws IllegalArgumentException if {@code boxedJavaValue} cannot be unboxed to a long * * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Concepts.doc.html#23435">2.6.2 Widening Primitive Conversions</a> */ public static long unboxLong(Object boxedJavaValue) { if (boxedJavaValue instanceof Long) { final Long box = (Long) boxedJavaValue; return box.longValue(); } if (boxedJavaValue instanceof Integer) { final Integer box = (Integer) boxedJavaValue; return box.longValue(); } if (boxedJavaValue instanceof Short) { final Short box = (Short) boxedJavaValue; return box.longValue(); } if (boxedJavaValue instanceof Character) { final Character box = (Character) boxedJavaValue; return box.charValue(); } if (boxedJavaValue instanceof Byte) { final Byte box = (Byte) boxedJavaValue; return box.longValue(); } throw new IllegalArgumentException("expected a boxed long, got " + boxedJavaValue.getClass().getName()); } /** * Unboxes a given object to a double, doing a primitive widening conversion if necessary. * * @throws IllegalArgumentException if {@code boxedJavaValue} cannot be unboxed to a double * * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Concepts.doc.html#23435">2.6.2 Widening Primitive Conversions</a> */ public static double unboxDouble(Object boxedJavaValue) { if (boxedJavaValue instanceof Double) { final Double box = (Double) boxedJavaValue; return box.doubleValue(); } if (boxedJavaValue instanceof Float) { final Float box = (Float) boxedJavaValue; return box.doubleValue(); } if (boxedJavaValue instanceof Integer) { final Integer box = (Integer) boxedJavaValue; return box.doubleValue(); } if (boxedJavaValue instanceof Long) { final Long box = (Long) boxedJavaValue; return box.doubleValue(); } if (boxedJavaValue instanceof Short) { final Short box = (Short) boxedJavaValue; return box.doubleValue(); } if (boxedJavaValue instanceof Character) { final Character box = (Character) boxedJavaValue; return box.charValue(); } if (boxedJavaValue instanceof Byte) { final Byte box = (Byte) boxedJavaValue; return box.doubleValue(); } throw new IllegalArgumentException("expected a boxed double, got " + boxedJavaValue.getClass().getName()); } }
arodchen/MaxSim
maxine/com.oracle.max.vm/src/com/sun/max/vm/type/Kind.java
Java
gpl-2.0
37,235
[ 30522, 1013, 30524, 2923, 3089, 8569, 2618, 2009, 1998, 1013, 2030, 19933, 2009, 1008, 2104, 1996, 3408, 1997, 1996, 27004, 2236, 2270, 6105, 2544, 1016, 2069, 1010, 2004, 1008, 2405, 2011, 1996, 2489, 4007, 3192, 1012, 1008, 1008, 2023, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!DOCTYPE> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="stylesheet" type="text/css" href="resources/text-scaling.css"> <script src="resources/text-scaling.js"></script> <script src="../../../resources/js-test.js"></script> <style> section > div { -webkit-writing-mode: vertical-rl; writing-mode: vertical-rl; } section > div > div.header { border-width: 0 0 0 1px; } section > div > div > div { width: auto; height: 12ex; padding: 0 0 1ex 0; } </style> </head> <body> <section> <h1>Font Size Scaling (vertical-rl, Latin)</h1> <p> Size of the text should scale smoothly. Reported height (logical width) should be within 0.01px of that of the highlighted reference row. </p> <div id="test"></div> </section> <script> if (window.testRunner && window.testRunner.setTextSubpixelPositioning) window.testRunner.setTextSubpixelPositioning(true); var PANGRAM = 'Flygande bäckasiner söka hwila på mjuka tuvor.'; var results = runTest(document.getElementById('test'), PANGRAM, 'vertical'); if (results == PASS) { testPassed('Size of text scales smoothly and logical width scales with font size as expected.'); // Hide text if test passes as the actual numbers are // different across platforms and would require platform // specific baselines. if (window.testRunner) document.getElementById('test').style.display = 'none'; } else { testFailed('Size of text does not scale smoothly, reported logical widths highlighted in red do not match reference row.'); } </script> </body> </html>
modulexcite/blink
LayoutTests/fast/text/sub-pixel/text-scaling-vertical.html
HTML
bsd-3-clause
2,107
[ 30522, 1026, 999, 9986, 13874, 1028, 1026, 16129, 1028, 1026, 2132, 1028, 1026, 18804, 8299, 1011, 1041, 15549, 2615, 1027, 1000, 4180, 1011, 2828, 1000, 4180, 1027, 1000, 3793, 1013, 16129, 1025, 25869, 13462, 1027, 21183, 2546, 1011, 1022...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
export const API_FAIL = 'API_FAIL'; export const SAVE_TIMELINE_FAIL = 'SAVE_TIMELINE_FAIL';
WikiEducationFoundation/WikiEduDashboard
app/assets/javascripts/constants/api.js
JavaScript
mit
92
[ 30522, 9167, 9530, 3367, 17928, 1035, 8246, 1027, 1005, 17928, 1035, 8246, 1005, 1025, 9167, 9530, 3367, 3828, 1035, 17060, 1035, 8246, 1027, 1005, 3828, 1035, 17060, 1035, 8246, 1005, 1025, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>mathcomp-character: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.5.3 / mathcomp-character - 1.10.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> mathcomp-character <small> 1.10.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-02-12 05:26:42 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-02-12 05:26:42 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-num base Num library distributed with the OCaml compiler base-threads base base-unix base camlp5 7.14 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 2 Virtual package relying on perl coq 8.5.3 Formal proof management system num 0 The Num library for arbitrary-precision integer and rational arithmetic ocaml 4.03.0 The OCaml compiler (virtual package) ocaml-base-compiler 4.03.0 Official 4.03.0 release ocaml-config 1 OCaml Switch Configuration # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Mathematical Components &lt;mathcomp-dev@sympa.inria.fr&gt;&quot; homepage: &quot;https://math-comp.github.io/&quot; bug-reports: &quot;https://github.com/math-comp/math-comp/issues&quot; dev-repo: &quot;git+https://github.com/math-comp/math-comp.git&quot; license: &quot;CeCILL-B&quot; build: [ make &quot;-C&quot; &quot;mathcomp/character&quot; &quot;-j&quot; &quot;%{jobs}%&quot; ] install: [ make &quot;-C&quot; &quot;mathcomp/character&quot; &quot;install&quot; ] depends: [ &quot;coq-mathcomp-field&quot; { = version } ] tags: [ &quot;keyword:algebra&quot; &quot;keyword:character&quot; &quot;keyword:small scale reflection&quot; &quot;keyword:mathematical components&quot; &quot;keyword:odd order theorem&quot; &quot;logpath:mathcomp.character&quot; ] authors: [ &quot;Jeremy Avigad &lt;&gt;&quot; &quot;Andrea Asperti &lt;&gt;&quot; &quot;Stephane Le Roux &lt;&gt;&quot; &quot;Yves Bertot &lt;&gt;&quot; &quot;Laurence Rideau &lt;&gt;&quot; &quot;Enrico Tassi &lt;&gt;&quot; &quot;Ioana Pasca &lt;&gt;&quot; &quot;Georges Gonthier &lt;&gt;&quot; &quot;Sidi Ould Biha &lt;&gt;&quot; &quot;Cyril Cohen &lt;&gt;&quot; &quot;Francois Garillot &lt;&gt;&quot; &quot;Alexey Solovyev &lt;&gt;&quot; &quot;Russell O&#39;Connor &lt;&gt;&quot; &quot;Laurent Théry &lt;&gt;&quot; &quot;Assia Mahboubi &lt;&gt;&quot; ] synopsis: &quot;Mathematical Components Library on character theory&quot; description:&quot;&quot;&quot; This library contains definitions and theorems about group representations, characters and class functions. &quot;&quot;&quot; url { src: &quot;http://github.com/math-comp/math-comp/archive/mathcomp-1.10.0.tar.gz&quot; checksum: &quot;sha256=3f8a88417f3456da05e2755ea0510c1bd3fd13b13c41e62fbaa3de06be040166&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-mathcomp-character.1.10.0 coq.8.5.3</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.5.3). The following dependencies couldn&#39;t be met: - coq-mathcomp-character -&gt; coq-mathcomp-field = 1.10.0 -&gt; coq-mathcomp-solvable = 1.10.0 -&gt; coq-mathcomp-algebra = 1.10.0 -&gt; coq-mathcomp-fingroup = 1.10.0 -&gt; coq-mathcomp-ssreflect = 1.10.0 -&gt; coq &gt;= 8.7 -&gt; ocaml &gt;= 4.05.0 base of this switch (use `--unlock-base&#39; to force) Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-mathcomp-character.1.10.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.03.0-2.0.5/released/8.5.3/mathcomp-character/1.10.0.html
HTML
mit
7,823
[ 30522, 1026, 999, 9986, 13874, 16129, 1028, 1026, 16129, 11374, 1027, 1000, 4372, 1000, 1028, 1026, 2132, 1028, 1026, 18804, 25869, 13462, 1027, 1000, 21183, 2546, 1011, 1022, 1000, 1028, 1026, 18804, 2171, 1027, 1000, 3193, 6442, 1000, 418...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Copyright 2015 Systemic Pty Ltd * * 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. */ using Sif.Framework.Model.Persistence; using System; using System.Collections.Generic; namespace Sif.Framework.Model.Infrastructure { /// <summary> /// The following Environment elements/properties are mandatory according to the SIF specification: /// /environment[@type] /// /environment/authenticationMethod /// /environment/consumerName /// /environment/applicationInfo/applicationKey /// /environment/applicationInfo/supportedInfrastructureVersion /// /environment/applicationInfo/supportedDataModel /// /environment/applicationInfo/supportedDataModelVersion /// </summary> public class Environment : IPersistable<Guid> { /// <summary> /// The ID of the Environment as managed by the Environment Provider. /// </summary> public virtual Guid Id { get; set; } public virtual ApplicationInfo ApplicationInfo { get; set; } /// <summary> /// Defines the way in which the applicationKey can be used to enforce security. /// </summary> public virtual string AuthenticationMethod { get; set; } /// <summary> /// A descriptive name for the application that will be readily identifiable to Zone Administrators if it /// becomes a Registered Consumer. /// </summary> public virtual string ConsumerName { get; set; } /// <summary> /// The default zone used by Consumer (and Provider?) service requests when no Zone is provided with the /// request. /// </summary> public virtual Zone DefaultZone { get; set; } /// <summary> /// There must be an InfrastructureService element present for each defined Infrastructure Service. The value /// of each InfrastructureService Property value subelement defines the URL location of that Infrastructure /// Service. /// </summary> public virtual IDictionary<InfrastructureServiceNames, InfrastructureService> InfrastructureServices { get; set; } public virtual string InstanceId { get; set; } public virtual IDictionary<string, ProvisionedZone> ProvisionedZones { get; set; } /// <summary> /// The ID associated with an instance of the Environment. /// </summary> public virtual string SessionToken { get; set; } /// <summary> /// The solution the Application would like to participate in. This is optional only, is advisory, and may be /// ignored by the Administrator. If processed it may be reflected in the URLs of the infrastructure services /// which are provided in the consumerEnvironment. /// </summary> public virtual string SolutionId { get; set; } /// <summary> /// Defines whether the connection to the Environment is DIRECT or BROKERED. /// </summary> public virtual EnvironmentType Type { get; set; } public virtual string UserToken { get; set; } /// <summary> /// /// </summary> public Environment() { } /// <summary> /// /// </summary> /// <param name="applicationKey"></param> /// <param name="instanceId"></param> /// <param name="userToken"></param> /// <param name="solutionId"></param> public Environment(string applicationKey, string instanceId = null, string userToken = null, string solutionId = null) { if (!String.IsNullOrWhiteSpace(applicationKey)) { ApplicationInfo = new ApplicationInfo(); ApplicationInfo.ApplicationKey = applicationKey; } if (!String.IsNullOrWhiteSpace(instanceId)) { InstanceId = instanceId; } if (!String.IsNullOrWhiteSpace(userToken)) { UserToken = userToken; } if (!String.IsNullOrWhiteSpace(solutionId)) { SolutionId = solutionId; } } } }
nsip/Sif3Framework-dotNet
Code/Sif3Framework/Sif.Framework/Model/Infrastructure/Environment.cs
C#
apache-2.0
4,699
[ 30522, 1013, 1008, 1008, 9385, 2325, 22575, 13866, 2100, 5183, 1008, 1008, 7000, 2104, 1996, 15895, 6105, 1010, 2544, 1016, 1012, 1014, 1006, 1996, 1000, 6105, 1000, 1007, 1025, 1008, 2017, 2089, 2025, 2224, 2023, 5371, 3272, 1999, 12646, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="ro"> <head> <!-- Generated by javadoc (version 1.7.0_07) on Tue May 27 14:37:25 EEST 2014 --> <title>Uses of Interface net.sf.jasperreports.engine.util.BigDecimalHandler (JasperReports 5.6.0 API)</title> <meta name="date" content="2014-05-27"> <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="Uses of Interface net.sf.jasperreports.engine.util.BigDecimalHandler (JasperReports 5.6.0 API)"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><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="../../../../../../net/sf/jasperreports/engine/util/BigDecimalHandler.html" title="interface in net.sf.jasperreports.engine.util">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?net/sf/jasperreports/engine/util/class-use/BigDecimalHandler.html" target="_top">Frames</a></li> <li><a href="BigDecimalHandler.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Interface net.sf.jasperreports.engine.util.BigDecimalHandler" class="title">Uses of Interface<br>net.sf.jasperreports.engine.util.BigDecimalHandler</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> <caption><span>Packages that use <a href="../../../../../../net/sf/jasperreports/engine/util/BigDecimalHandler.html" title="interface in net.sf.jasperreports.engine.util">BigDecimalHandler</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="#net.sf.jasperreports.engine.util">net.sf.jasperreports.engine.util</a></td> <td class="colLast"> <div class="block">Contains utility classes for the core library.</div> </td> </tr> </tbody> </table> </li> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="net.sf.jasperreports.engine.util"> <!-- --> </a> <h3>Uses of <a href="../../../../../../net/sf/jasperreports/engine/util/BigDecimalHandler.html" title="interface in net.sf.jasperreports.engine.util">BigDecimalHandler</a> in <a href="../../../../../../net/sf/jasperreports/engine/util/package-summary.html">net.sf.jasperreports.engine.util</a></h3> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> <caption><span>Classes in <a href="../../../../../../net/sf/jasperreports/engine/util/package-summary.html">net.sf.jasperreports.engine.util</a> that implement <a href="../../../../../../net/sf/jasperreports/engine/util/BigDecimalHandler.html" title="interface in net.sf.jasperreports.engine.util">BigDecimalHandler</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Class and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>class&nbsp;</code></td> <td class="colLast"><code><strong><a href="../../../../../../net/sf/jasperreports/engine/util/Java14BigDecimalHandler.html" title="class in net.sf.jasperreports.engine.util">Java14BigDecimalHandler</a></strong></code> <div class="block"><a href="../../../../../../net/sf/jasperreports/engine/util/BigDecimalHandler.html" title="interface in net.sf.jasperreports.engine.util"><code>BigDecimalHandler</code></a> implementation used on Java 1.4.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>class&nbsp;</code></td> <td class="colLast"><code><strong><a href="../../../../../../net/sf/jasperreports/engine/util/Java15BigDecimalHandler.html" title="class in net.sf.jasperreports.engine.util">Java15BigDecimalHandler</a></strong></code> <div class="block"><a href="../../../../../../net/sf/jasperreports/engine/util/BigDecimalHandler.html" title="interface in net.sf.jasperreports.engine.util"><code>BigDecimalHandler</code></a> implementation used on Java 1.5 or newer.</div> </td> </tr> </tbody> </table> </li> </ul> </li> </ul> </div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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="../../../../../../net/sf/jasperreports/engine/util/BigDecimalHandler.html" title="interface in net.sf.jasperreports.engine.util">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?net/sf/jasperreports/engine/util/class-use/BigDecimalHandler.html" target="_top">Frames</a></li> <li><a href="BigDecimalHandler.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small> <span style="font-decoration:none;font-family:Arial,Helvetica,sans-serif;font-size:8pt;font-style:normal;color:#000000;">&copy; 2001-2010 Jaspersoft Corporation <a href="http://www.jaspersoft.com" target="_blank" style="color:#000000;">www.jaspersoft.com</a></span> </small></p> </body> </html>
phurtado1112/cnaemvc
lib/JasperReport__5.6/docs/api/net/sf/jasperreports/engine/util/class-use/BigDecimalHandler.html
HTML
apache-2.0
7,579
[ 30522, 1026, 999, 9986, 13874, 16129, 2270, 1000, 1011, 1013, 1013, 1059, 2509, 2278, 1013, 1013, 26718, 2094, 16129, 1018, 1012, 5890, 17459, 1013, 1013, 4372, 1000, 1000, 8299, 1024, 1013, 1013, 7479, 1012, 1059, 2509, 1012, 8917, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
var MemoryBlogStore = require('./MemoryBlogStore'); var blogStore = new MemoryBlogStore(); blogStore.addPost({ text: 'Hello' }, function(err, post) { console.log(err, post); }); blogStore.addPost({ text: 'Hello' }, function(err, post) { console.log(err, post); }); blogStore.addPost({ text: 'Hello' }, function(err, post) { console.log(err, post); }); // blogStore.getPostsRange(0, 2, function(err, posts) { // console.log(err, posts) // }); blogStore.getPostsAfter(1, 2, function(err, posts) { console.log(err, posts) });
galynacherniakhivska/Blog
server/sandbox.js
JavaScript
isc
537
[ 30522, 13075, 3638, 16558, 8649, 23809, 2063, 1027, 5478, 1006, 1005, 1012, 1013, 3638, 16558, 8649, 23809, 2063, 1005, 1007, 1025, 13075, 23012, 19277, 1027, 2047, 3638, 16558, 8649, 23809, 2063, 1006, 1007, 1025, 23012, 19277, 1012, 5587, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>18 --> 19</title> <link href="./../../assets/style.css" rel="stylesheet"> </head> <body> <h2>You have to be fast</h2> <a href="./556799c488885b59c0c8c6ec02fcf8623cfeb03b5c47694e54252f76c8e3dc80.html">Teleport</a> <hr> <a href="./../../about.md">About</a> (Spoilers! ) <script src="./../../assets/md5.js"></script> <script> window.currentLevel = 7; </script> <script src="./../../assets/script.js"></script> </body> </html>
simonmysun/praxis
TAIHAO2019/pub/SmallGame/AsFastAsYouCan2/5a88771b2a27a5ff558668d92b9a242db05c5b19fac3944704afe903ad407878.html
HTML
mit
550
[ 30522, 1026, 999, 9986, 13874, 16129, 1028, 1026, 16129, 11374, 1027, 1000, 4372, 1000, 1028, 1026, 2132, 1028, 1026, 18804, 25869, 13462, 1027, 1000, 21183, 2546, 1011, 1022, 1000, 1028, 1026, 2516, 1028, 2324, 1011, 1011, 1028, 2539, 1026...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * This file is part of Sponge, licensed under the MIT License (MIT). * * Copyright (c) SpongePowered.org <http://www.spongepowered.org> * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package org.spongepowered.api.event.inventory; import org.spongepowered.api.entity.Item; import org.spongepowered.api.event.GameEvent; import java.util.Collection; /** * Handles when any item or items are dropped on the ground. */ public interface ItemDropEvent extends GameEvent { /** * Gets the items that are being dropped. * * @return The dropped item entities */ Collection<Item> getDroppedItems(); /** * Checks if this is a flowerpot. * * @return Whether this is a flowerpot */ boolean isFlowerPot(); }
SpongeHistory/SpongeAPI-History
src/main/java/org/spongepowered/api/event/inventory/ItemDropEvent.java
Java
mit
1,823
[ 30522, 1013, 1008, 1008, 2023, 5371, 2003, 2112, 1997, 25742, 1010, 7000, 2104, 1996, 10210, 6105, 1006, 10210, 1007, 1012, 1008, 1008, 9385, 1006, 1039, 1007, 25742, 27267, 1012, 8917, 1026, 8299, 1024, 1013, 1013, 7479, 1012, 25742, 27267...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
namespace StackFaceSystem.Data.Common.Models { using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; public abstract class BaseModel<TKey> : IAuditInfo, IDeletableEntity { [Key] public TKey Id { get; set; } public DateTime CreatedOn { get; set; } public DateTime? ModifiedOn { get; set; } [Index] public bool IsDeleted { get; set; } public DateTime? DeletedOn { get; set; } } }
EmilMitev/ASP.NET-MVC-Course-Project
Source/StackFaceSystem/Data/StackFaceSystem.Data.Common/Models/BaseModel{TKey}.cs
C#
mit
522
[ 30522, 3415, 15327, 9991, 12172, 6508, 13473, 2213, 1012, 2951, 1012, 2691, 1012, 4275, 1063, 2478, 2291, 1025, 2478, 2291, 1012, 6922, 5302, 9247, 1012, 2951, 11639, 17287, 9285, 1025, 2478, 2291, 1012, 6922, 5302, 9247, 1012, 30524, 1024,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# frozen_string_literal: true require 'rails_com/config' require 'rails_com/engine' require 'rails_com/action_controller' require 'rails_com/action_view' require 'rails_com/action_text' require 'rails_com/action_mailbox' require 'rails_com/active_storage' # Rails extension require 'generators/scaffold_generator' require 'generators/jbuilder_generator' if defined?(Jbuilder) # default_form, 需要位于 rails_com 的加载之后 require 'default_form/config' require 'default_form/active_record/extend' require 'default_form/override/action_view/helpers/tags/collection_check_boxes' require 'default_form/override/action_view/helpers/tags/collection_radio_buttons' require 'default_form/controller_helper' require 'default_form/view_helper' # Utils require 'rails_com/utils/time_helper' require 'rails_com/utils/num_helper' require 'rails_com/utils/qrcode_helper' require 'rails_com/utils/uid_helper' require 'rails_com/utils/hex_helper' require 'rails_com/utils/jobber' # active storage require 'active_storage/service/disc_service' # outside require 'jbuilder' require 'default_where' require 'rails_extend' require 'kaminari' require 'acts_as_list' require 'turbo-rails'
qinmingyuan/rails_com
lib/rails_com.rb
Ruby
lgpl-3.0
1,183
[ 30522, 1001, 7708, 1035, 5164, 1035, 18204, 1024, 2995, 5478, 1005, 15168, 1035, 4012, 1013, 9530, 8873, 2290, 1005, 5478, 1005, 15168, 1035, 4012, 1013, 3194, 1005, 5478, 1005, 15168, 1035, 4012, 1013, 2895, 1035, 11486, 1005, 5478, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# Leptopodia murina var. alpestris (Boud.) R. Heim & L. Remy VARIETY #### Status ACCEPTED #### According to Index Fungorum #### Published in null #### Original name Leptopodia alpestris Boud. ### Remarks null
mdoering/backbone
life/Fungi/Ascomycota/Pezizomycetes/Pezizales/Helvellaceae/Helvella/Helvella ephippium/Leptopodia murina alpestris/README.md
Markdown
apache-2.0
213
[ 30522, 1001, 3393, 13876, 7361, 7716, 2401, 14163, 11796, 13075, 1012, 2632, 10374, 18886, 2015, 1006, 8945, 6784, 1012, 1007, 1054, 1012, 2002, 5714, 1004, 1048, 1012, 22712, 3528, 1001, 1001, 1001, 1001, 3570, 3970, 1001, 1001, 1001, 1001...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
extern crate hello_world; #[test] fn test_no_name() { assert_eq!("Hello, World!", hello_world::hello(None)); } #[test] //#[ignore] fn test_sample_name() { assert_eq!("Hello, Alice!", hello_world::hello(Some("Alice"))); } #[test] //#[ignore] fn test_other_same_name() { assert_eq!("Hello, Bob!", hello_world::hello(Some("Bob"))); }
Krakn/learning
src/rust/exercism/hello-world/tests/hello-world.rs
Rust
isc
346
[ 30522, 4654, 16451, 27297, 7592, 1035, 2088, 1025, 1001, 1031, 3231, 1033, 1042, 2078, 3231, 1035, 2053, 1035, 2171, 1006, 1007, 1063, 20865, 1035, 1041, 4160, 999, 1006, 1000, 7592, 1010, 2088, 999, 1000, 1010, 7592, 1035, 2088, 1024, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Contacts.Plugin.WindowsPhone81")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Contacts.Plugin.WindowsPhone81")] [assembly: AssemblyCopyright("Copyright © 2014")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0")] [assembly: AssemblyFileVersion("1.0.0")] [assembly: AssemblyInformationalVersion("1.0.0-alpha3")] [assembly: ComVisible(false)]
tim-hoff/Xamarin.Plugins
Contacts/Contacts/Contacts.Plugin.WindowsPhone81/Properties/AssemblyInfo.cs
C#
mit
1,133
[ 30522, 2478, 2291, 1012, 9185, 1025, 2478, 2291, 1012, 2448, 7292, 1012, 21624, 8043, 7903, 2229, 1025, 2478, 2291, 1012, 2448, 7292, 1012, 6970, 11923, 2121, 7903, 2229, 1025, 1013, 1013, 2236, 2592, 2055, 2019, 3320, 2003, 4758, 2083, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!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 (version 1.7.0_72) on Wed May 13 11:47:54 EDT 2015 --> <title>Uses of Class org.apache.cassandra.gms.EchoMessage (apache-cassandra API)</title> <meta name="date" content="2015-05-13"> <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="Uses of Class org.apache.cassandra.gms.EchoMessage (apache-cassandra API)"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><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/cassandra/gms/EchoMessage.html" title="class in org.apache.cassandra.gms">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../../../../../overview-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/cassandra/gms/class-use/EchoMessage.html" target="_top">Frames</a></li> <li><a href="EchoMessage.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Class org.apache.cassandra.gms.EchoMessage" class="title">Uses of Class<br>org.apache.cassandra.gms.EchoMessage</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> <caption><span>Packages that use <a href="../../../../../org/apache/cassandra/gms/EchoMessage.html" title="class in org.apache.cassandra.gms">EchoMessage</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="#org.apache.cassandra.gms">org.apache.cassandra.gms</a></td> <td class="colLast">&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><a href="#org.apache.cassandra.service">org.apache.cassandra.service</a></td> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="org.apache.cassandra.gms"> <!-- --> </a> <h3>Uses of <a href="../../../../../org/apache/cassandra/gms/EchoMessage.html" title="class in org.apache.cassandra.gms">EchoMessage</a> in <a href="../../../../../org/apache/cassandra/gms/package-summary.html">org.apache.cassandra.gms</a></h3> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing fields, and an explanation"> <caption><span>Fields in <a href="../../../../../org/apache/cassandra/gms/package-summary.html">org.apache.cassandra.gms</a> with type parameters of type <a href="../../../../../org/apache/cassandra/gms/EchoMessage.html" title="class in org.apache.cassandra.gms">EchoMessage</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Field and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>static <a href="../../../../../org/apache/cassandra/io/IVersionedSerializer.html" title="interface in org.apache.cassandra.io">IVersionedSerializer</a>&lt;<a href="../../../../../org/apache/cassandra/gms/EchoMessage.html" title="class in org.apache.cassandra.gms">EchoMessage</a>&gt;</code></td> <td class="colLast"><span class="strong">EchoMessage.</span><code><strong><a href="../../../../../org/apache/cassandra/gms/EchoMessage.html#serializer">serializer</a></strong></code>&nbsp;</td> </tr> </tbody> </table> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../org/apache/cassandra/gms/package-summary.html">org.apache.cassandra.gms</a> that return <a href="../../../../../org/apache/cassandra/gms/EchoMessage.html" title="class in org.apache.cassandra.gms">EchoMessage</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../org/apache/cassandra/gms/EchoMessage.html" title="class in org.apache.cassandra.gms">EchoMessage</a></code></td> <td class="colLast"><span class="strong">EchoMessage.EchoMessageSerializer.</span><code><strong><a href="../../../../../org/apache/cassandra/gms/EchoMessage.EchoMessageSerializer.html#deserialize(java.io.DataInput,%20int)">deserialize</a></strong>(java.io.DataInput&nbsp;in, int&nbsp;version)</code>&nbsp;</td> </tr> </tbody> </table> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../org/apache/cassandra/gms/package-summary.html">org.apache.cassandra.gms</a> with parameters of type <a href="../../../../../org/apache/cassandra/gms/EchoMessage.html" title="class in org.apache.cassandra.gms">EchoMessage</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><span class="strong">EchoMessage.EchoMessageSerializer.</span><code><strong><a href="../../../../../org/apache/cassandra/gms/EchoMessage.EchoMessageSerializer.html#serialize(org.apache.cassandra.gms.EchoMessage,%20java.io.DataOutput,%20int)">serialize</a></strong>(<a href="../../../../../org/apache/cassandra/gms/EchoMessage.html" title="class in org.apache.cassandra.gms">EchoMessage</a>&nbsp;t, java.io.DataOutput&nbsp;out, int&nbsp;version)</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>long</code></td> <td class="colLast"><span class="strong">EchoMessage.EchoMessageSerializer.</span><code><strong><a href="../../../../../org/apache/cassandra/gms/EchoMessage.EchoMessageSerializer.html#serializedSize(org.apache.cassandra.gms.EchoMessage,%20int)">serializedSize</a></strong>(<a href="../../../../../org/apache/cassandra/gms/EchoMessage.html" title="class in org.apache.cassandra.gms">EchoMessage</a>&nbsp;t, int&nbsp;version)</code>&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"><a name="org.apache.cassandra.service"> <!-- --> </a> <h3>Uses of <a href="../../../../../org/apache/cassandra/gms/EchoMessage.html" title="class in org.apache.cassandra.gms">EchoMessage</a> in <a href="../../../../../org/apache/cassandra/service/package-summary.html">org.apache.cassandra.service</a></h3> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Method parameters in <a href="../../../../../org/apache/cassandra/service/package-summary.html">org.apache.cassandra.service</a> with type arguments of type <a href="../../../../../org/apache/cassandra/gms/EchoMessage.html" title="class in org.apache.cassandra.gms">EchoMessage</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><span class="strong">EchoVerbHandler.</span><code><strong><a href="../../../../../org/apache/cassandra/service/EchoVerbHandler.html#doVerb(org.apache.cassandra.net.MessageIn,%20int)">doVerb</a></strong>(<a href="../../../../../org/apache/cassandra/net/MessageIn.html" title="class in org.apache.cassandra.net">MessageIn</a>&lt;<a href="../../../../../org/apache/cassandra/gms/EchoMessage.html" title="class in org.apache.cassandra.gms">EchoMessage</a>&gt;&nbsp;message, int&nbsp;id)</code>&nbsp;</td> </tr> </tbody> </table> </li> </ul> </li> </ul> </div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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/cassandra/gms/EchoMessage.html" title="class in org.apache.cassandra.gms">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../../../../../overview-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/cassandra/gms/class-use/EchoMessage.html" target="_top">Frames</a></li> <li><a href="EchoMessage.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small>Copyright &copy; 2015 The Apache Software Foundation</small></p> </body> </html>
anuragkapur/cassandra-2.1.2-ak-skynet
apache-cassandra-2.0.15/javadoc/org/apache/cassandra/gms/class-use/EchoMessage.html
HTML
apache-2.0
10,896
[ 30522, 1026, 999, 9986, 13874, 16129, 2270, 1000, 1011, 1013, 1013, 1059, 2509, 2278, 1013, 1013, 26718, 2094, 16129, 1018, 1012, 5890, 17459, 1013, 1013, 4372, 1000, 1000, 8299, 1024, 1013, 1013, 7479, 1012, 1059, 2509, 1012, 8917, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#!/usr/bin/python3 import argparse import traceback import sys import netaddr import requests from flask import Flask, request from jinja2 import Environment, FileSystemLoader, TemplateNotFound endpoints = "read/networks read/oplog read/snmp read/switches-management public/distro-tree public/config public/dhcp public/dhcp-summary public/ping public/switches public/switch-state".split() objects = {} def getEndpoint(endpoint): r = requests.get("http://localhost:80/api/{}".format(endpoint)) if r.status_code != 200: raise Exception("Bad status code for endpoint {}: {}".format(endpoint, r.status_code)) return r.json() def updateData(): for a in endpoints: objects[a] = getEndpoint(a) env = Environment(loader=FileSystemLoader([]), trim_blocks=True) env.filters["netmask"] = lambda ip: netaddr.IPNetwork(ip).netmask env.filters["cidr"] = lambda ip: netaddr.IPNetwork(ip).prefixlen env.filters["networkId"] = lambda ip: netaddr.IPNetwork(ip).ip env.filters["getFirstDhcpIp"] = lambda ip: netaddr.IPNetwork(ip)[3] env.filters["getLastDhcpIp"] = lambda ip: netaddr.IPNetwork(ip)[-1] env.filters["agentDistro"] = lambda src: src.split(":")[0] env.filters["agentPort"] = lambda src: src.split(":")[1] env.filters["getFirstFapIP"] = lambda ip: netaddr.IPNetwork(ip)[netaddr.IPNetwork(ip).size / 2] app = Flask(__name__) @app.after_request def add_header(response): if response.status_code == 200: response.cache_control.max_age = 5 response.cache_control.s_maxage = 1 return response @app.route("/<path>", methods=["GET"]) def root_get(path): updateData() try: template = env.get_template(path) body = template.render(objects=objects, options=request.args) except TemplateNotFound: return 'Template "{}" not found\n'.format(path), 404 except Exception as err: return 'Templating of "{}" failed to render. Most likely due to an error in the template. Error transcript:\n\n{}\n----\n\n{}\n'.format(path, err, traceback.format_exc()), 400 return body, 200 @app.route("/<path>", methods=["POST"]) def root_post(path): updateData() try: content = request.stream.read(int(request.headers["Content-Length"])) template = env.from_string(content.decode("utf-8")) body = template.render(objects=objects, options=request.args) except Exception as err: return 'Templating of "{}" failed to render. Most likely due to an error in the template. Error transcript:\n\n{}\n----\n\n{}\n'.format(path, err, traceback.format_exc()), 400 return body, 200 parser = argparse.ArgumentParser(description="Process templates for gondul.", add_help=False) parser.add_argument("-t", "--templates", type=str, nargs="+", help="location of templates") parser.add_argument("-h", "--host", type=str, default="127.0.0.1", help="host address") parser.add_argument("-p", "--port", type=int, default=8080, help="host port") parser.add_argument("-d", "--debug", action="store_true", help="enable debug mode") args = parser.parse_args() env.loader.searchpath = args.templates if not sys.argv[1:]: parser.print_help() app.run(host=args.host, port=args.port, debug=args.debug)
tech-server/gondul
templating/templating.py
Python
gpl-2.0
3,215
[ 30522, 1001, 999, 1013, 2149, 2099, 1013, 8026, 1013, 18750, 2509, 12324, 12098, 21600, 11650, 2063, 12324, 7637, 5963, 12324, 25353, 2015, 12324, 5658, 4215, 13626, 12324, 11186, 2013, 13109, 19895, 12324, 13109, 19895, 1010, 5227, 2013, 974...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package org.datacleaner.kettle.ui; import java.util.ArrayList; import java.util.List; import org.eclipse.swt.SWT; import org.eclipse.swt.events.DisposeEvent; import org.eclipse.swt.events.DisposeListener; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.layout.FormAttachment; import org.eclipse.swt.layout.FormData; import org.eclipse.swt.layout.FormLayout; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.MessageBox; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; import org.pentaho.di.core.Const; import org.pentaho.di.core.plugins.JobEntryPluginType; import org.pentaho.di.core.plugins.PluginRegistry; import org.pentaho.di.job.JobMeta; import org.pentaho.di.job.entry.JobEntryDialogInterface; import org.pentaho.di.job.entry.JobEntryInterface; import org.pentaho.di.repository.Repository; import org.pentaho.di.ui.core.gui.GUIResource; import org.pentaho.di.ui.job.entry.JobEntryDialog; import org.pentaho.di.ui.trans.step.BaseStepDialog; import plugin.DataCleanerJobEntry; public abstract class AbstractJobEntryDialog extends JobEntryDialog implements JobEntryDialogInterface, DisposeListener { private final String initialJobName; private Text jobNameField; private Button okButton; private Button cancelButton; private List<Object> resources = new ArrayList<Object>(); public AbstractJobEntryDialog(Shell parent, JobEntryInterface jobEntry, Repository rep, JobMeta jobMeta) { super(parent, jobEntry, rep, jobMeta); initialJobName = (jobEntry.getName() == null ? DataCleanerJobEntry.NAME : jobEntry.getName()); } protected void initializeShell(Shell shell) { String id = PluginRegistry.getInstance().getPluginId(JobEntryPluginType.class, jobMeta); if (id != null) { shell.setImage(GUIResource.getInstance().getImagesStepsSmall().get(id)); } } /** * @wbp.parser.entryPoint */ @Override public final JobEntryInterface open() { final Shell parent = getParent(); final Display display = parent.getDisplay(); // initialize shell { shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MIN | SWT.MAX); initializeShell(shell); FormLayout shellLayout = new FormLayout(); shellLayout.marginTop = 0; shellLayout.marginLeft = 0; shellLayout.marginRight = 0; shellLayout.marginBottom = 0; shellLayout.marginWidth = 0; shellLayout.marginHeight = 0; shell.setLayout(shellLayout); shell.setText(DataCleanerJobEntry.NAME + ": " + initialJobName); } final int middle = Const.MIDDLE_PCT; final int margin = Const.MARGIN; // DC banner final DataCleanerBanner banner = new DataCleanerBanner(shell); { final FormData bannerLayoutData = new FormData(); bannerLayoutData.left = new FormAttachment(0, 0); bannerLayoutData.right = new FormAttachment(100, 0); bannerLayoutData.top = new FormAttachment(0, 0); banner.setLayoutData(bannerLayoutData); } // Step name { final Label stepNameLabel = new Label(shell, SWT.RIGHT); stepNameLabel.setText("Step name:"); final FormData stepNameLabelLayoutData = new FormData(); stepNameLabelLayoutData.left = new FormAttachment(0, margin); stepNameLabelLayoutData.right = new FormAttachment(middle, -margin); stepNameLabelLayoutData.top = new FormAttachment(banner, margin * 2); stepNameLabel.setLayoutData(stepNameLabelLayoutData); jobNameField = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER); jobNameField.setText(initialJobName); final FormData stepNameFieldLayoutData = new FormData(); stepNameFieldLayoutData.left = new FormAttachment(middle, 0); stepNameFieldLayoutData.right = new FormAttachment(100, -margin); stepNameFieldLayoutData.top = new FormAttachment(banner, margin * 2); jobNameField.setLayoutData(stepNameFieldLayoutData); } // Properties Group final Group propertiesGroup = new Group(shell, SWT.SHADOW_ETCHED_IN); propertiesGroup.setText("Step configuration"); final FormData propertiesGroupLayoutData = new FormData(); propertiesGroupLayoutData.left = new FormAttachment(0, margin); propertiesGroupLayoutData.right = new FormAttachment(100, -margin); propertiesGroupLayoutData.top = new FormAttachment(jobNameField, margin); propertiesGroup.setLayoutData(propertiesGroupLayoutData); final GridLayout propertiesGroupLayout = new GridLayout(2, false); propertiesGroup.setLayout(propertiesGroupLayout); addConfigurationFields(propertiesGroup, margin, middle); okButton = new Button(shell, SWT.PUSH); Image saveImage = new Image(shell.getDisplay(), AbstractJobEntryDialog.class.getResourceAsStream("save.png")); resources.add(saveImage); okButton.setImage(saveImage); okButton.setText("OK"); okButton.addListener(SWT.Selection, new Listener() { @Override public void handleEvent(Event event) { ok(); final String jobEntryName = jobNameField.getText(); if (jobEntryName != null && jobEntryName.length() > 0 && !initialJobName.equals(jobEntryName)) { jobEntryInt.setName(jobEntryName); } jobEntryInt.setChanged(); shell.close(); } }); cancelButton = new Button(shell, SWT.PUSH); Image cancelImage = new Image(shell.getDisplay(), AbstractJobEntryDialog.class.getResourceAsStream("cancel.png")); resources.add(cancelImage); cancelButton.setImage(cancelImage); cancelButton.setText("Cancel"); cancelButton.addListener(SWT.Selection, new Listener() { @Override public void handleEvent(Event arg0) { cancel(); jobNameField.setText(""); shell.close(); } }); BaseStepDialog.positionBottomButtons(shell, new Button[] { okButton, cancelButton }, margin, propertiesGroup); // HI banner final DataCleanerFooter footer = new DataCleanerFooter(shell); { final FormData footerLayoutData = new FormData(); footerLayoutData.left = new FormAttachment(0, 0); footerLayoutData.right = new FormAttachment(100, 0); footerLayoutData.top = new FormAttachment(okButton, margin * 2); footer.setLayoutData(footerLayoutData); } shell.addDisposeListener(this); shell.setSize(getDialogSize()); // center the dialog in the middle of the screen final Rectangle screenSize = shell.getDisplay().getPrimaryMonitor().getBounds(); shell.setLocation((screenSize.width - shell.getBounds().width) / 2, (screenSize.height - shell.getBounds().height) / 2); shell.pack(); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } return jobEntryInt; } @Override public void widgetDisposed(DisposeEvent event) { for (Object resource : resources) { if (resource instanceof Image) { ((Image) resource).dispose(); } } } protected Point getDialogSize() { Point clientAreaSize = shell.computeSize(SWT.DEFAULT, SWT.DEFAULT); int frameX = shell.getSize().x - shell.getClientArea().width; int frameY = shell.getSize().y - shell.getClientArea().height; return new Point(frameX + clientAreaSize.x, frameY + clientAreaSize.y); } protected abstract void addConfigurationFields(Group propertiesGroup, int margin, int middle); public void cancel() { // do nothing } public abstract void ok(); protected void showWarning(String message) { MessageBox messageBox = new MessageBox(new Shell(), SWT.ICON_WARNING | SWT.OK); messageBox.setText("EasyDataQuality - Warning"); messageBox.setMessage(message); messageBox.open(); } protected String getStepDescription() { return null; } }
datacleaner/pdi-datacleaner
src/main/java/org/datacleaner/kettle/ui/AbstractJobEntryDialog.java
Java
lgpl-3.0
8,903
[ 30522, 7427, 8917, 1012, 2951, 14321, 7231, 2099, 1012, 22421, 1012, 21318, 1025, 12324, 9262, 1012, 21183, 4014, 1012, 9140, 9863, 1025, 12324, 9262, 1012, 21183, 4014, 1012, 2862, 1025, 12324, 8917, 1012, 13232, 1012, 25430, 2102, 1012, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# rounded-rectangle <div id="example"></div> <script type="application/javascript"> new Vue({ el: '#example', template: '<live-code class="full" :template="code" mode="html>iframe" :debounce="200" />', data: { code: ` <script src="${location.origin+location.pathname}global.js"><\/script> <!-- pep.js provides the pointer events (pointermove, pointerdown, etc) --> <script src="https://code.jquery.com/pep/0.4.3/pep.js"><\/script> <style> body, html { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; background: #191919; color: #ccc; } </style> <lume-scene id="scene" webgl> <lume-ambient-light intensity="0.3"></lume-ambient-light> <lume-point-light id="light" color="white" position="300 300 300" size="0 0 0" cast-shadow="true" intensity="0.8" > </lume-point-light> <lume-rounded-rectangle id="rect1" corner-radius="45" thickness="1" quadratic-corners="true" align-point="0.5 0.5" mount-point="0.5 0.5" size="100 100 100" position="55" color="skyblue" > </lume-rounded-rectangle> <lume-rounded-rectangle id="rect2" corner-radius="45" thickness="1" quadratic-corners="false" align-point="0.5 0.5" mount-point="0.5 0.5" size="100 100 100" position="-55" color="pink" > </lume-rounded-rectangle> </lume-scene> <script> // defines the default names for the HTML elements LUME.useDefaultNames() const light = document.querySelector('#light') document.addEventListener('pointermove', event => { event.preventDefault() light.position.x = event.clientX light.position.y = event.clientY }) rect1.rotation = (x, y) => [0, ++y, 0] rect2.rotation = (x, y) => [0, ++y, 0] scene.on(LUME.Events.GL_LOAD, async () => { light.three.shadow.radius = 2 light.three.distance = 800 light.three.shadow.bias = -0.001 // rect1.three.material.side = THREE.DoubleSide // rect1.three.material.wireframe = true }) <\/script> ` }, }) </script>
trusktr/infamous
packages/lume/docs/examples/rounded-rectangle.md
Markdown
mit
2,274
[ 30522, 1001, 8352, 1011, 28667, 23395, 1026, 4487, 2615, 8909, 1027, 1000, 2742, 1000, 1028, 1026, 1013, 4487, 2615, 1028, 1026, 5896, 2828, 1027, 1000, 4646, 1013, 9262, 22483, 1000, 1028, 2047, 24728, 2063, 1006, 1063, 3449, 1024, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php /** * Twenty Fifteen functions and definitions * * Set up the theme and provides some helper functions, which are used in the * theme as custom template tags. Others are attached to action and filter * hooks in WordPress to change core functionality. * * When using a child theme you can override certain functions (those wrapped * in a function_exists() call) by defining them first in your child theme's * functions.php file. The child theme's functions.php file is included before * the parent theme's file, so the child theme functions would be used. * * @link https://codex.wordpress.org/Theme_Development * @link https://codex.wordpress.org/Child_Themes * * Functions that are not pluggable (not wrapped in function_exists()) are * instead attached to a filter or action hook. * * For more information on hooks, actions, and filters, * {@link https://codex.wordpress.org/Plugin_API} * * @package WordPress * @subpackage Twenty_Fifteen * @since Twenty Fifteen 1.0 */ /** * Set the content width based on the theme's design and stylesheet. * * @since Twenty Fifteen 1.0 */ if ( ! isset( $content_width ) ) { $content_width = 660; } /** * Twenty Fifteen only works in WordPress 4.1 or later. */ if ( version_compare( $GLOBALS['wp_version'], '4.1-alpha', '<' ) ) { require get_template_directory() . '/inc/back-compat.php'; } if ( ! function_exists( 'twentyfifteen_setup' ) ) : /** * Sets up theme defaults and registers support for various WordPress features. * * Note that this function is hooked into the after_setup_theme hook, which * runs before the init hook. The init hook is too late for some features, such * as indicating support for post thumbnails. * * @since Twenty Fifteen 1.0 */ function twentyfifteen_setup() { /* * Make theme available for translation. * Translations can be filed in the /languages/ directory. * If you're building a theme based on twentyfifteen, use a find and replace * to change 'twentyfifteen' to the name of your theme in all the template files */ load_theme_textdomain( 'twentyfifteen', get_template_directory() . '/languages' ); // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); /* * Let WordPress manage the document title. * By adding theme support, we declare that this theme does not use a * hard-coded <title> tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Enable support for Post Thumbnails on posts and pages. * * See: https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails */ add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 825, 510, true ); // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( 'primary' => __( 'Primary Menu', 'twentyfifteen' ), 'social' => __( 'Social Links Menu', 'twentyfifteen' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) ); /* * Enable support for Post Formats. * * See: https://codex.wordpress.org/Post_Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat' ) ); $color_scheme = twentyfifteen_get_color_scheme(); $default_color = trim( $color_scheme[0], '#' ); // Setup the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'twentyfifteen_custom_background_args', array( 'default-color' => $default_color, 'default-attachment' => 'fixed', ) ) ); /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, icons, and column width. */ add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css', twentyfifteen_fonts_url() ) ); } endif; // twentyfifteen_setup add_action( 'after_setup_theme', 'twentyfifteen_setup' ); /** * Register widget area. * * @since Twenty Fifteen 1.0 * * @link https://codex.wordpress.org/Function_Reference/register_sidebar */ function twentyfifteen_widgets_init() { register_sidebar( array( 'name' => __( 'Widget Area', 'twentyfifteen' ), 'id' => 'sidebar-1', 'description' => __( 'Add widgets here to appear in your sidebar.', 'twentyfifteen' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h2 class="widget-title">', 'after_title' => '</h2>', ) ); } add_action( 'widgets_init', 'twentyfifteen_widgets_init' ); if ( ! function_exists( 'twentyfifteen_fonts_url' ) ) : /** * Register Google fonts for Twenty Fifteen. * * @since Twenty Fifteen 1.0 * * @return string Google fonts URL for the theme. */ function twentyfifteen_fonts_url() { $fonts_url = ''; $fonts = array(); $subsets = 'latin,latin-ext'; /* * Translators: If there are characters in your language that are not supported * by Noto Sans, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Noto Sans font: on or off', 'twentyfifteen' ) ) { $fonts[] = 'Noto Sans:400italic,700italic,400,700'; } /* * Translators: If there are characters in your language that are not supported * by Noto Serif, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Noto Serif font: on or off', 'twentyfifteen' ) ) { $fonts[] = 'Noto Serif:400italic,700italic,400,700'; } /* * Translators: If there are characters in your language that are not supported * by Inconsolata, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Inconsolata font: on or off', 'twentyfifteen' ) ) { $fonts[] = 'Inconsolata:400,700'; } /* * Translators: To add an additional character subset specific to your language, * translate this to 'greek', 'cyrillic', 'devanagari' or 'vietnamese'. Do not translate into your own language. */ $subset = _x( 'no-subset', 'Add new subset (greek, cyrillic, devanagari, vietnamese)', 'twentyfifteen' ); if ( 'cyrillic' == $subset ) { $subsets .= ',cyrillic,cyrillic-ext'; } elseif ( 'greek' == $subset ) { $subsets .= ',greek,greek-ext'; } elseif ( 'devanagari' == $subset ) { $subsets .= ',devanagari'; } elseif ( 'vietnamese' == $subset ) { $subsets .= ',vietnamese'; } if ( $fonts ) { $fonts_url = add_query_arg( array( 'family' => urlencode( implode( '|', $fonts ) ), 'subset' => urlencode( $subsets ), ), '//fonts.googleapis.com/css' ); } return $fonts_url; } endif; /** * JavaScript Detection. * * Adds a `js` class to the root `<html>` element when JavaScript is detected. * * @since Twenty Fifteen 1.1 */ function twentyfifteen_javascript_detection() { echo "<script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script>\n"; } add_action( 'wp_head', 'twentyfifteen_javascript_detection', 0 ); /** * Enqueue scripts and styles. * * @since Twenty Fifteen 1.0 */ function twentyfifteen_scripts() { // Add custom fonts, used in the main stylesheet. wp_enqueue_style( 'twentyfifteen-fonts', twentyfifteen_fonts_url(), array(), null ); // Add Genericons, used in the main stylesheet. wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.2' ); // Load our main stylesheet. wp_enqueue_style( 'twentyfifteen-style', get_stylesheet_uri() ); // Load the Internet Explorer specific stylesheet. wp_enqueue_style( 'twentyfifteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfifteen-style' ), '20141010' ); wp_style_add_data( 'twentyfifteen-ie', 'conditional', 'lt IE 9' ); // Load the Internet Explorer 7 specific stylesheet. wp_enqueue_style( 'twentyfifteen-ie7', get_template_directory_uri() . '/css/ie7.css', array( 'twentyfifteen-style' ), '20141010' ); wp_style_add_data( 'twentyfifteen-ie7', 'conditional', 'lt IE 8' ); wp_enqueue_script( 'twentyfifteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20141010', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } if ( is_singular() && wp_attachment_is_image() ) { wp_enqueue_script( 'twentyfifteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20141010' ); } wp_enqueue_script( 'twentyfifteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150330', true ); wp_localize_script( 'twentyfifteen-script', 'screenReaderText', array( 'expand' => '<span class="screen-reader-text">' . __( 'expand child menu', 'twentyfifteen' ) . '</span>', 'collapse' => '<span class="screen-reader-text">' . __( 'collapse child menu', 'twentyfifteen' ) . '</span>', ) ); } add_action( 'wp_enqueue_scripts', 'twentyfifteen_scripts' ); /** * Add featured image as background image to post navigation elements. * * @since Twenty Fifteen 1.0 * * @see wp_add_inline_style() */ function twentyfifteen_post_nav_background() { if ( ! is_single() ) { return; } $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); $css = ''; if ( is_attachment() && 'attachment' == $previous->post_type ) { return; } if ( $previous && has_post_thumbnail( $previous->ID ) ) { $prevthumb = wp_get_attachment_image_src( get_post_thumbnail_id( $previous->ID ), 'post-thumbnail' ); $css .= ' .post-navigation .nav-previous { background-image: url(' . esc_url( $prevthumb[0] ) . '); } .post-navigation .nav-previous .post-title, .post-navigation .nav-previous a:hover .post-title, .post-navigation .nav-previous .meta-nav { color: #fff; } .post-navigation .nav-previous a:before { background-color: rgba(0, 0, 0, 0.4); } '; } if ( $next && has_post_thumbnail( $next->ID ) ) { $nextthumb = wp_get_attachment_image_src( get_post_thumbnail_id( $next->ID ), 'post-thumbnail' ); $css .= ' .post-navigation .nav-next { background-image: url(' . esc_url( $nextthumb[0] ) . '); border-top: 0; } .post-navigation .nav-next .post-title, .post-navigation .nav-next a:hover .post-title, .post-navigation .nav-next .meta-nav { color: #fff; } .post-navigation .nav-next a:before { background-color: rgba(0, 0, 0, 0.4); } '; } wp_add_inline_style( 'twentyfifteen-style', $css ); } add_action( 'wp_enqueue_scripts', 'twentyfifteen_post_nav_background' ); /** * Display descriptions in main navigation. * * @since Twenty Fifteen 1.0 * * @param string $item_output The menu item output. * @param WP_Post $item Menu item object. * @param int $depth Depth of the menu. * @param array $args wp_nav_menu() arguments. * @return string Menu item with possible description. */ function twentyfifteen_nav_description( $item_output, $item, $depth, $args ) { if ( 'primary' == $args->theme_location && $item->description ) { $item_output = str_replace( $args->link_after . '</a>', '<div class="menu-item-description">' . $item->description . '</div>' . $args->link_after . '</a>', $item_output ); } return $item_output; } add_filter( 'walker_nav_menu_start_el', 'twentyfifteen_nav_description', 10, 4 ); /** * Add a `screen-reader-text` class to the search form's submit button. * * @since Twenty Fifteen 1.0 * * @param string $html Search form HTML. * @return string Modified search form HTML. */ function twentyfifteen_search_form_modify( $html ) { return str_replace( 'class="search-submit"', 'class="search-submit screen-reader-text"', $html ); } add_filter( 'get_search_form', 'twentyfifteen_search_form_modify' ); /** * Implement the Custom Header feature. * * @since Twenty Fifteen 1.0 */ require get_template_directory() . '/inc/custom-header.php'; /** * Custom template tags for this theme. * * @since Twenty Fifteen 1.0 */ require get_template_directory() . '/inc/template-tags.php'; /** * Customizer additions. * * @since Twenty Fifteen 1.0 */ require get_template_directory() . '/inc/customizer.php'; add_filter('json_api_encode', 'json_api_encode_acf'); function json_api_encode_acf($response) { if (isset($response['posts'])) { foreach ($response['posts'] as $post) { json_api_add_acf($post); // Add specs to each post } } else if (isset($response['post'])) { json_api_add_acf($response['post']); // Add a specs property } return $response; } function json_api_add_acf(&$post) { $post->acf = get_fields($post->id); }
itsmeDrew/missionquest
public/api/wordpress/wp-content/themes/twentyfifteen/functions.php
PHP
mit
12,895
[ 30522, 1026, 1029, 25718, 1013, 1008, 1008, 1008, 3174, 5417, 4972, 1998, 15182, 1008, 1008, 2275, 2039, 1996, 4323, 1998, 3640, 2070, 2393, 2121, 4972, 1010, 2029, 2024, 2109, 1999, 1996, 1008, 4323, 2004, 7661, 23561, 22073, 1012, 2500, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>finger-tree: 5 m 19 s 🏆</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.5.0 / finger-tree - 8.5.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> finger-tree <small> 8.5.0 <span class="label label-success">5 m 19 s 🏆</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-01-29 07:47:20 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-29 07:47:20 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-num base Num library distributed with the OCaml compiler base-threads base base-unix base camlp5 7.14 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 2 Virtual package relying on perl coq 8.5.0 Formal proof management system num 0 The Num library for arbitrary-precision integer and rational arithmetic ocaml 4.04.2 The OCaml compiler (virtual package) ocaml-base-compiler 4.04.2 Official 4.04.2 release ocaml-config 1 OCaml Switch Configuration # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;matej.kosik@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/finger-tree&quot; license: &quot;LGPL&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/FingerTree&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.5&quot; &amp; &lt; &quot;8.6~&quot;} ] tags: [ &quot;keyword:data structures&quot; &quot;keyword:dependent types&quot; &quot;keyword:finger trees&quot; &quot;category:Computer Science/Data Types and Data Structures&quot; &quot;date:2009-02&quot; ] authors: [ &quot;Matthieu Sozeau &lt;mattam@mattam.org&gt;&quot; ] bug-reports: &quot;https://github.com/coq-contribs/finger-tree/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/finger-tree.git&quot; synopsis: &quot;Dependent Finger Trees&quot; description: &quot;A verified generic implementation of Finger Trees&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/finger-tree/archive/v8.5.0.tar.gz&quot; checksum: &quot;md5=2e6ac43bdbddaa8882a0d6fc2effaa09&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-finger-tree.8.5.0 coq.8.5.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 4000000; timeout 4h opam install -y --deps-only coq-finger-tree.8.5.0 coq.8.5.0</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>12 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 16000000; timeout 4h opam install -y -v coq-finger-tree.8.5.0 coq.8.5.0</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>5 m 19 s</dd> </dl> <h2>Installation size</h2> <p>Total: 32 M</p> <ul> <li>9 M <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/RopeModule.vo</code></li> <li>8 M <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/FingerTreeModule.vo</code></li> <li>8 M <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/DependentFingerTreeModule.vo</code></li> <li>5 M <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/DependentFingerTree.vo</code></li> <li>393 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/DependentSequence.vo</code></li> <li>344 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/StringInterface.vo</code></li> <li>336 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/Digit.vo</code></li> <li>239 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/DependentFingerTreeModule.glob</code></li> <li>161 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/DependentFingerTree.glob</code></li> <li>145 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/DigitModule.vo</code></li> <li>97 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/FingerTree.vo</code></li> <li>88 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/PrioQueue.vo</code></li> <li>82 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/OrdSequence.vo</code></li> <li>72 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/DependentFingerTreeModule.v</code></li> <li>65 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/DependentFingerTree.v</code></li> <li>47 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/KeyMonoid.vo</code></li> <li>45 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/DependentSequence.glob</code></li> <li>43 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/Sequence.vo</code></li> <li>40 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/OrderedType.vo</code></li> <li>28 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/Monoid.vo</code></li> <li>28 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/DigitModule.glob</code></li> <li>23 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/DependentSequence.v</code></li> <li>21 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/FingerTreeModule.glob</code></li> <li>20 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/Digit.glob</code></li> <li>17 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/FingerTree.glob</code></li> <li>14 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/Reduce.vo</code></li> <li>12 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/FingerTreeModule.v</code></li> <li>11 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/RopeModule.glob</code></li> <li>10 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/FingerTree.v</code></li> <li>10 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/Notations.vo</code></li> <li>8 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/PrioQueue.glob</code></li> <li>7 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/Digit.v</code></li> <li>7 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/DigitModule.v</code></li> <li>6 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/Monoid.glob</code></li> <li>6 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/OrdSequence.v</code></li> <li>5 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/OrdSequence.glob</code></li> <li>5 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/StringInterface.glob</code></li> <li>5 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/Monoid.v</code></li> <li>5 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/Modules.vo</code></li> <li>4 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/RopeModule.v</code></li> <li>3 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/Reduce.glob</code></li> <li>3 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/OrderedType.glob</code></li> <li>3 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/PrioQueue.v</code></li> <li>3 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/Sequence.glob</code></li> <li>2 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/Modules.glob</code></li> <li>2 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/KeyMonoid.glob</code></li> <li>1 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/StringInterface.v</code></li> <li>1 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/Sequence.v</code></li> <li>1 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/KeyMonoid.v</code></li> <li>1 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/OrderedType.v</code></li> <li>1 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/Modules.v</code></li> <li>1 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/Reduce.v</code></li> <li>1 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/Notations.glob</code></li> <li>1 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/FingerTree/Notations.v</code></li> </ul> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq-finger-tree.8.5.0</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.04.2-2.0.5/released/8.5.0/finger-tree/8.5.0.html
HTML
mit
13,088
[ 30522, 1026, 999, 9986, 13874, 16129, 1028, 1026, 16129, 11374, 1027, 1000, 4372, 1000, 1028, 1026, 2132, 1028, 1026, 18804, 25869, 13462, 1027, 1000, 21183, 2546, 1011, 1022, 1000, 1028, 1026, 18804, 2171, 1027, 1000, 3193, 6442, 1000, 418...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php /** * @package HikaShop for Joomla! * @version 2.1.3 * @author hikashop.com * @copyright (C) 2010-2013 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?><?php defined('_JEXEC') or die('Restricted access'); ?> <?php class hikashopEffectType{ function load(){ $this->values = array(); $this->values[] = JHTML::_('select.option', 'slide',JText::_('SLIDE')); $this->values[] = JHTML::_('select.option', 'fade',JText::_('FADE')); } function display($map,$value, $options=''){ $this->load(); return JHTML::_('select.genericlist', $this->values, $map, 'class="inputbox" size="1" '.$options, 'value', 'text', $value ); } }
ginithax27/crazyGamers
administrator/components/com_hikashop/types/effect.php
PHP
gpl-2.0
769
[ 30522, 1026, 1029, 25718, 1013, 1008, 1008, 1008, 1030, 7427, 7632, 13716, 18471, 2005, 28576, 19968, 2050, 999, 1008, 1030, 2544, 1016, 1012, 1015, 1012, 1017, 1008, 1030, 3166, 7632, 13716, 18471, 1012, 4012, 1008, 1030, 9385, 1006, 1039,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/////////////////////////////////////////////////////////////////////////////////// /// OpenGL Mathematics (glm.g-truc.net) /// /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) /// 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. /// /// Restrictions: /// By making use of the Software for military purposes, you choose to make /// a Bunny unhappy. /// /// 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. /// /// @file test/gtx/gtx_log_base.cpp /// @date 2013-10-25 / 2014-11-25 /// @author Christophe Riccio /////////////////////////////////////////////////////////////////////////////////// #include <glm/gtx/log_base.hpp> int main() { int Error(0); return Error; }
onc/oncgl
lib/glm/test/gtx/gtx_log_base.cpp
C++
apache-2.0
1,711
[ 30522, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
import { defineAsyncComponent } from 'vue'; import { showModal } from '../../../modal/modal.service'; import { User } from '../../../user/user.model'; import { GameBuild } from '../../build/build.model'; import { Game } from '../../game.model'; import { GamePackage } from '../package.model'; interface GamePackagePurchaseModalOptions { game: Game; package: GamePackage; build: GameBuild | null; fromExtraSection: boolean; partnerKey?: string; partner?: User; } export class GamePackagePurchaseModal { static async show(options: GamePackagePurchaseModalOptions) { return await showModal<void>({ modalId: 'GamePackagePurchase', component: defineAsyncComponent(() => import('./purchase-modal.vue')), size: 'sm', props: options, }); } }
gamejolt/gamejolt
src/_common/game/package/purchase-modal/purchase-modal.service.ts
TypeScript
mit
761
[ 30522, 12324, 1063, 9375, 3022, 6038, 21408, 8737, 5643, 3372, 1065, 2013, 1005, 24728, 2063, 1005, 1025, 12324, 1063, 2265, 5302, 9305, 1065, 2013, 1005, 1012, 1012, 1013, 1012, 1012, 1013, 1012, 1012, 1013, 16913, 2389, 1013, 16913, 2389,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Dashboard for /Users/markisacat/Sites/Zend_Basic_2/module/NovumWare/src/NovumWare/Process</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/bootstrap-responsive.min.css" rel="stylesheet"> <link href="css/style.css" rel="stylesheet"> <!--[if lt IE 9]> <script src="js/html5shiv.js"></script> <![endif]--> </head> <body> <header> <div class="container"> <div class="row"> <div class="span12"> <ul class="breadcrumb"> <li><a href="index.html">/Users/markisacat/Sites/Zend_Basic_2/module/NovumWare/src/NovumWare</a> <span class="divider">/</span></li> <li><a href="Process.html">Process</a></li> <li class="active">(Dashboard)</li> </ul> </div> </div> </div> </header> <div class="container"> <div class="row"> <div class="span6"> <h2>Class Coverage Distribution</h2> <div id="classCoverageDistribution"></div> </div> <div class="span6"> <h2>Class Complexity</h2> <div id="classComplexity"></div> </div> </div> <div class="row"> <div class="span6"> <h2>Top Project Risks</h2> <ul> <li><a href="Process_AbstractProcess.php.html#9">AbstractProcess</a> (110)</li> </ul> </div> <div class="span6"> <h2>Least Tested Methods</h2> <ul> <li><a href="Process_EmailsProcess.php.html#31">EmailsProcess::sendEmail</a> (0%)</li> <li><a href="Process_ProcessException.php.html#15">ProcessException::__construct</a> (0%)</li> <li><a href="Process_ProcessException.php.html#23">ProcessException::getErrorMessage</a> (0%)</li> <li><a href="Process_ProcessResult.php.html#27">ProcessResult::__construct</a> (0%)</li> <li><a href="Process_EmailsProcess.php.html#18">EmailsProcess::sendEmailFromTemplate</a> (0%)</li> <li><a href="Process_AbstractProcessFactory.php.html#28">AbstractProcessFactory::createServiceWithName</a> (0%)</li> <li><a href="Process_AbstractProcess.php.html#35">AbstractProcess::__call</a> (0%)</li> <li><a href="Process_AbstractProcess.php.html#57">AbstractProcess::catchNovumWareException</a> (0%)</li> <li><a href="Process_AbstractProcess.php.html#89">AbstractProcess::url</a> (0%)</li> <li><a href="Process_AbstractProcess.php.html#21">AbstractProcess::__construct</a> (0%)</li> </ul> </div> </div> <footer> <p> <small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.2.8</a> using <a href="http://www.php.net/" target="_top">PHP 5.4.11</a> and <a href="http://phpunit.de/">PHPUnit 3.7.14</a> at Tue Mar 26 20:32:44 PDT 2013.</small> </p> </footer> </div> <script src="js/bootstrap.min.js" type="text/javascript"></script> <script src="js/jquery.min.js" type="text/javascript"></script> <script src="js/highcharts.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { var classCoverageDistribution = new Highcharts.Chart({ chart: { renderTo: 'classCoverageDistribution', type: 'column' }, title: {text: ''}, legend: {enabled: false}, credits: {enabled: false}, tooltip: {enabled: false}, xAxis: { labels: {style: {fontSize: '8px'}}, categories: [ '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%' ] }, yAxis: { title: '', labels: {style: {fontSize: '8px'}}, }, series: [{ data: [4,0,0,0,1,0,0,0,0,0,0,0] }], }); var classComplexity = new Highcharts.Chart({ chart: { renderTo: 'classComplexity', type: 'scatter' }, title: {text: ''}, legend: {enabled: false}, credits: {enabled: false}, xAxis: { title: {text: 'Code Coverage (in percent)'}, labels: {enabled: true}, }, yAxis: { title: 'Cyclomatic Complexity', labels: {enabled: true}, }, tooltip: { formatter: function() { return this.point.config[2]; } }, series: [{ data: [[0,10,"<a href=\"Process_AbstractProcess.php.html#9\">AbstractProcess<\/a>"],[33.333333333333,2,"<a href=\"Process_AbstractProcessFactory.php.html#6\">AbstractProcessFactory<\/a>"],[0,2,"<a href=\"Process_EmailsProcess.php.html#9\">EmailsProcess<\/a>"],[0,2,"<a href=\"Process_ProcessException.php.html#4\">ProcessException<\/a>"],[0,1,"<a href=\"Process_ProcessResult.php.html#4\">ProcessResult<\/a>"]], marker: { symbol: 'diamond' } }], }); }); </script> </body> </html>
rsmats13/UMBDT
module/NovumWare/test/log/report/Process.dashboard.html
HTML
bsd-3-clause
5,189
[ 30522, 1026, 999, 9986, 13874, 16129, 1028, 1026, 16129, 11374, 1027, 1000, 4372, 1000, 1028, 1026, 2132, 1028, 1026, 18804, 25869, 13462, 1027, 1000, 21183, 2546, 1011, 1022, 1000, 1028, 1026, 2516, 1028, 24923, 2005, 1013, 5198, 1013, 292...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!-- View Announcement --> <div class="modal fade" id="modal_announcement" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <h4 class="modal-title" id="myModalLabel">View Announcement</h4> </div> <form class="form-horizontal"> <div class="modal-body"> <div class="form-group"> <label for="announcement-subject" class="col-sm-3 control-label">Subject</label> <div class="col-sm-8"> <p class="form-control-static" id="announcement-subject"></p> </div> </div> <div class="form-group"> <label for="announcement-content" class="col-sm-3 control-label">Content</label> <div class="col-sm-8"> <p class="form-control-static" id="announcement-content"></p> </div> </div> </div> </form> <div class="modal-footer"> <a class="btn btn-default pull-left" id="deleteAnnouncement" href="">Delete</a> <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> <a class="btn btn-primary" id="restoreAnnouncement" href="">Restore</a> </div> </div> </div> </div>
jmgalino/up-oams
application/views/admin/app/form/archived.php
PHP
bsd-3-clause
1,405
[ 30522, 1026, 999, 1011, 1011, 3193, 8874, 1011, 1011, 1028, 1026, 4487, 2615, 2465, 1027, 1000, 16913, 2389, 12985, 1000, 8909, 1027, 1000, 16913, 2389, 1035, 8874, 1000, 21628, 22254, 10288, 1027, 1000, 1011, 1015, 1000, 2535, 1027, 1000, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#include "usb/UsbSpy.h" static int (*notify)(void *, int, void (*)(void *, int online), void *); int msm_register_usb_ext_notification(struct usb_ext_notification *info){ notify = info->notify; return 0; } int usb_spy_clean(void){ notify = NULL; } notify_def get_registerred_device_discovery_pointer(void) { return notify; }
NoelMacwan/android_Kernel_sony_msm8974
drivers/video/msm/mdss/mhl_sii8620_8061_drv_31/test/tests/Spy/usb/UsbSpy.c
C
gpl-2.0
335
[ 30522, 1001, 2421, 1000, 18833, 1013, 18833, 13102, 2100, 1012, 1044, 1000, 10763, 20014, 1006, 1008, 2025, 8757, 1007, 1006, 11675, 1008, 1010, 20014, 1010, 11675, 1006, 1008, 1007, 1006, 11675, 1008, 1010, 20014, 3784, 1007, 1010, 11675, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/********************************************************************** // @@@ START COPYRIGHT @@@ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you 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. // // @@@ END COPYRIGHT @@@ // **********************************************************************/ /* -*-C++-*- ****************************************************************************** * * File: RuDupElimLogRecord.cpp * Description: Implementation of class CRUIUDLogRecord * * Created: 06/12/2000 * Language: C++ * * ****************************************************************************** */ #include "dmprepstatement.h" #include "ddobject.h" #include "RuDupElimLogRecord.h" #include "RuDeltaDef.h" #include "RuException.h" //--------------------------------------------------------------------------// // CLASS CRUIUDLogRecord - PUBLIC AREA //--------------------------------------------------------------------------// //--------------------------------------------------------------------------// // Constructors and destructor //--------------------------------------------------------------------------// CRUIUDLogRecord:: CRUIUDLogRecord(CDMSqlTupleDesc &ckDesc, Int32 updateBmpSize) : // Persistent data members ckTuple_(ckDesc), syskey_(0), epoch_(0), opType_(0), ignore_(0), rangeSize_(0), pUpdateBitmap_(NULL), // Non-persistent data members ckTag_(0), action_(0) { if (0 != updateBmpSize) { pUpdateBitmap_ = new CRUUpdateBitmap(updateBmpSize); } } CRUIUDLogRecord::CRUIUDLogRecord(const CRUIUDLogRecord &other) : // Persistent data members ckTuple_(other.ckTuple_), syskey_(other.syskey_), epoch_(other.epoch_), opType_(other.opType_), ignore_(other.ignore_), rangeSize_(other.rangeSize_), pUpdateBitmap_(NULL), // Non-persistent data members ckTag_(other.ckTag_) { CRUUpdateBitmap *pOtherUpdateBitmap = other.pUpdateBitmap_; if (NULL != pOtherUpdateBitmap) { pUpdateBitmap_ = new CRUUpdateBitmap(*pOtherUpdateBitmap); } } CRUIUDLogRecord::~CRUIUDLogRecord() { delete pUpdateBitmap_; } //--------------------------------------------------------------------------// // CRUIUDLogRecord::CopyCKTupleValuesToParams() // // Copy the tuple's values to N consecutive parameters // of the statement: firstParam, ... firstParam + N - 1. // //--------------------------------------------------------------------------// void CRUIUDLogRecord:: CopyCKTupleValuesToParams(CDMPreparedStatement &stmt, Int32 firstParam) const { Lng32 len = GetCKLength(); for (Int32 i=0; i<len; i++) { ckTuple_.GetItem(i).SetStatementParam(stmt, firstParam+i); } } //--------------------------------------------------------------------------// // CRUIUDLogRecord::Build() // // Retrieve the tuple's data from the result set and store it. // The tuple's columns are contiguous in the result set, // starting from the *startCKColumn* parameter. // //--------------------------------------------------------------------------// void CRUIUDLogRecord::Build(CDMResultSet &rs, Int32 startCKColumn) { ReadControlColumns(rs, startCKColumn); ReadCKColumns(rs, startCKColumn); } //--------------------------------------------------------------------------// // CLASS CRUIUDLogRecord - PRIVATE AREA //--------------------------------------------------------------------------// //--------------------------------------------------------------------------// // CRUIUDLogRecord::ReadControlColumns() // // Get the control columns from the result set (epoch, syskey etc). // The operation_type column is stored as a bitmap, and hence // requires decoding. // //--------------------------------------------------------------------------// void CRUIUDLogRecord::ReadControlColumns(CDMResultSet &rs, Int32 startCKColumn) { // Performance optimization - switch the IsNull check off! rs.PresetNotNullable(TRUE); // Read the mandatory columns epoch_ = rs.GetInt(CRUDupElimConst::OFS_EPOCH+1); opType_ = rs.GetInt(CRUDupElimConst::OFS_OPTYPE+1); if (FALSE == IsSingleRowOp()) { // The range records are logged in the negative epochs. // Logically, however, they belong to the positive epochs. epoch_ = -epoch_; } if (FALSE == IsSingleRowOp() && FALSE == IsBeginRange()) { // End-range record rangeSize_ = rs.GetInt(CRUDupElimConst::OFS_RNGSIZE+1); } else { rangeSize_ = 0; } Int32 numCKCols = startCKColumn-2; // Count from 1 + syskey if (CRUDupElimConst::NUM_IUD_LOG_CONTROL_COLS_EXTEND == numCKCols) { // This is DE level 3, read the optional columns ignore_ = rs.GetInt(CRUDupElimConst::OFS_IGNORE+1); // The update bitmap buffer must be setup RUASSERT(NULL != pUpdateBitmap_); // The update bitmap can be a null rs.PresetNotNullable(FALSE); rs.GetString(CRUDupElimConst::OFS_UPD_BMP+1, pUpdateBitmap_->GetBuffer(), pUpdateBitmap_->GetSize()); } // Syskey is always the last column before the CK syskey_ = rs.GetLargeInt(startCKColumn-1); } //--------------------------------------------------------------------------// // CRUIUDLogRecord::ReadCKColumns() // // Retrieve the values of the clustering key columns and store // them in an SQL tuple. // //--------------------------------------------------------------------------// void CRUIUDLogRecord:: ReadCKColumns(CDMResultSet &rs, Int32 startCKColumn) { // Performance optimization - switch the IsNull check off! rs.PresetNotNullable(TRUE); Lng32 len = GetCKLength(); for (Int32 i=0; i<len; i++) { Int32 colIndex = i + startCKColumn; ckTuple_.GetItem(i).Build(rs, colIndex); } rs.PresetNotNullable(FALSE); } // Define the class CRUIUDLogRecordList with this macro DEFINE_PTRLIST(CRUIUDLogRecord);
apache/incubator-trafodion
core/sql/refresh/RuDupElimLogRecord.cpp
C++
apache-2.0
6,408
[ 30522, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package io.rapidpro.mage.task; import com.google.common.collect.ImmutableMultimap; import io.dropwizard.servlets.tasks.Task; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.PrintWriter; /** * Task to test Sentry */ public class SentryTestTask extends Task { protected static final Logger log = LoggerFactory.getLogger(SentryTestTask.class); public SentryTestTask() { super("sentry-test"); } /** * @see io.dropwizard.servlets.tasks.Task#execute(com.google.common.collect.ImmutableMultimap, java.io.PrintWriter) */ @Override public void execute(ImmutableMultimap<String, String> params, PrintWriter output) throws Exception { output.println("Testing sentry..."); try { throw new RuntimeException("This is an exception"); } catch (Exception e) { log.error("Testing Sentry", e); } output.println("Done!"); } }
xkmato/mage
src/main/java/io/rapidpro/mage/task/SentryTestTask.java
Java
agpl-3.0
957
[ 30522, 7427, 22834, 1012, 5915, 21572, 1012, 17454, 1012, 4708, 1025, 12324, 4012, 1012, 8224, 1012, 2691, 1012, 8145, 1012, 10047, 28120, 3085, 12274, 7096, 9581, 2361, 1025, 12324, 22834, 1012, 4530, 9148, 26154, 1012, 14262, 2615, 13461, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# Hey Emacs, this is a -*- makefile -*- #---------------------------------------------------------------------------- # WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al. # # Released to the Public Domain # # Additional material for this makefile was written by: # Peter Fleury # Tim Henigan # Colin O'Flynn # Reiner Patommel # Markus Pfaff # Sander Pool # Frederik Rouleau # Carlos Lamas # #---------------------------------------------------------------------------- # On command line: # # make all = Make software. # # make clean = Clean out built project files. # # make coff = Convert ELF to AVR COFF. # # make extcoff = Convert ELF to AVR Extended COFF. # # make program = Download the hex file to the device, using avrdude. # Please customize the avrdude settings below first! # # make debug = Start either simulavr or avarice as specified for debugging, # with avr-gdb or avr-insight as the front end for debugging. # # make filename.s = Just compile filename.c into the assembler code only. # # make filename.i = Create a preprocessed source file for use in submitting # bug reports to the GCC project. # # To rebuild project do "make clean" then "make all". #---------------------------------------------------------------------------- # MCU name MCU = atmega328p # Processor frequency. F_CPU = 16000000 # Output format. (can be srec, ihex, binary) FORMAT = ihex # Target file name (without extension). TARGET = ch # Object files directory # To put object files in current directory, use a dot (.), do NOT make # this an empty or blank macro! OBJDIR = . # Imported source files CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk include $(CHIBIOS)/os/hal/boards/ARDUINO_UNO/board.mk include $(CHIBIOS)/os/hal/ports/AVR/platform.mk include $(CHIBIOS)/os/hal/osal/rt/osal.mk include $(CHIBIOS)/os/rt/rt.mk include $(CHIBIOS)/os/common/ports/AVR/compilers/GCC/mk/port.mk #include $(CHIBIOS)/test/rt/test.mk # List C source files here. (C dependencies are automatically generated.) SRC = $(KERNSRC) \ $(PORTSRC) \ $(OSALSRC) \ $(HALSRC) \ $(PLATFORMSRC) \ $(BOARDSRC) \ $(CHIBIOS)/os/various/evtimer.c \ main.c # List C++ source files here. (C dependencies are automatically generated.) CPPSRC = # List Assembler source files here. # Make them always end in a capital .S. Files ending in a lowercase .s # will not be considered source files but generated files (assembler # output from the compiler), and will be deleted upon "make clean"! # Even though the DOS/Win* filesystem matches both .s and .S the same, # it will preserve the spelling of the filenames, and gcc itself does # care about how the name is spelled on its command-line. ASRC = # Optimization level, can be [0, 1, 2, 3, s]. # 0 = turn off optimization. s = optimize for size. # (Note: 3 is not always the best optimization level. See avr-libc FAQ.) OPT = 2 # Debugging format. # Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs. # AVR Studio 4.10 requires dwarf-2. # AVR [Extended] COFF format requires stabs, plus an avr-objcopy run. DEBUG = dwarf-2 # List any extra directories to look for include files here. # Each directory must be seperated by a space. # Use forward slashes for directory separators. # For a directory that has spaces, enclose it in quotes. EXTRAINCDIRS = $(CHIBIOS)/os/license $(PORTINC) $(KERNINC) $(TESTINC) \ $(HALINC) $(OSALINC) $(PLATFORMINC) \ $(BOARDINC) $(CHIBIOS)/os/various # Compiler flag to set the C Standard level. # c89 = "ANSI" C # gnu89 = c89 plus GCC extensions # c99 = ISO C99 standard (not yet fully implemented) # gnu99 = c99 plus GCC extensions CSTANDARD = -std=gnu11 # Place -D or -U options here for C sources CDEFS = -DF_CPU=$(F_CPU)UL # Place -D or -U options here for ASM sources ADEFS = -DF_CPU=$(F_CPU) # Place -D or -U options here for C++ sources CPPDEFS = -DF_CPU=$(F_CPU)UL #CPPDEFS += -D__STDC_LIMIT_MACROS #CPPDEFS += -D__STDC_CONSTANT_MACROS #---------------- Compiler Options C ---------------- # -g*: generate debugging information # -O*: optimization level # -f...: tuning, see GCC manual and avr-libc documentation # -Wall...: warning level # -Wa,...: tell GCC to pass this to the assembler. # -adhlns...: create assembler listing CFLAGS = -g$(DEBUG) CFLAGS += $(CDEFS) CFLAGS += -O$(OPT) CFLAGS += -funsigned-char CFLAGS += -funsigned-bitfields CFLAGS += -fpack-struct CFLAGS += -fshort-enums #CFLAGS += -fno-strict-aliasing CFLAGS += -Wall CFLAGS += -Wstrict-prototypes #CFLAGS += -mshort-calls #CFLAGS += -fno-unit-at-a-time #CFLAGS += -Wundef #CFLAGS += -Wunreachable-code #CFLAGS += -Wsign-compare CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst) CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) CFLAGS += $(CSTANDARD) #CFLAGS += -mrelax CFLAGS += -fdata-sections CFLAGS += -ffunction-sections #---------------- Compiler Options C++ ---------------- # -g*: generate debugging information # -O*: optimization level # -f...: tuning, see GCC manual and avr-libc documentation # -Wall...: warning level # -Wa,...: tell GCC to pass this to the assembler. # -adhlns...: create assembler listing CPPFLAGS = -g$(DEBUG) CPPFLAGS += $(CPPDEFS) CPPFLAGS += -O$(OPT) CPPFLAGS += -funsigned-char CPPFLAGS += -funsigned-bitfields CPPFLAGS += -fpack-struct CPPFLAGS += -fshort-enums CPPFLAGS += -fno-exceptions CPPFLAGS += -Wall CFLAGS += -Wundef #CPPFLAGS += -mshort-calls #CPPFLAGS += -fno-unit-at-a-time #CPPFLAGS += -Wstrict-prototypes #CPPFLAGS += -Wunreachable-code #CPPFLAGS += -Wsign-compare CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst) CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) #CPPFLAGS += $(CSTANDARD) CPPFLAGS += -fdata-sections CPPFLAGS += -ffunction-sections #---------------- Assembler Options ---------------- # -Wa,...: tell GCC to pass this to the assembler. # -adhlns: create listing # -gstabs: have the assembler create line number information; note that # for use in COFF files, additional information about filenames # and function names needs to be present in the assembler source # files -- see avr-libc docs [FIXME: not yet described there] # -listing-cont-lines: Sets the maximum number of continuation lines of hex # dump that will be displayed for a given single line of source input. ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100 #---------------- Library Options ---------------- # Minimalistic printf version PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min # Floating point printf version (requires MATH_LIB = -lm below) PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt # If this is left blank, then it will use the Standard printf version. PRINTF_LIB = $(PRINTF_LIB_MIN) #PRINTF_LIB = $(PRINTF_LIB_MIN) #PRINTF_LIB = $(PRINTF_LIB_FLOAT) # Minimalistic scanf version SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min # Floating point + %[ scanf version (requires MATH_LIB = -lm below) SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt # If this is left blank, then it will use the Standard scanf version. SCANF_LIB = $(SCANF_LIB_MIN) #SCANF_LIB = $(SCANF_LIB_MIN) #SCANF_LIB = $(SCANF_LIB_FLOAT) MATH_LIB = -lm # List any extra directories to look for libraries here. # Each directory must be seperated by a space. # Use forward slashes for directory separators. # For a directory that has spaces, enclose it in quotes. EXTRALIBDIRS = #---------------- External Memory Options ---------------- # 64 KB of external RAM, starting after internal RAM (ATmega128!), # used for variables (.data/.bss) and heap (malloc()). #EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff # 64 KB of external RAM, starting after internal RAM (ATmega128!), # only used for heap (malloc()). #EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff EXTMEMOPTS = #---------------- Linker Options ---------------- # -Wl,...: tell GCC to pass this to linker. # -Map: create map file # --cref: add cross reference to map file LDFLAGS = -Wl,-Map=$(TARGET).map,--cref,--gc-sections LDFLAGS += $(EXTMEMOPTS) LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS)) LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB) #LDFLAGS += -T linker_script.x #---------------- Programming Options (avrdude) ---------------- # Programming hardware: alf avr910 avrisp bascom bsd # dt006 pavr picoweb pony-stk200 sp12 stk200 stk500 # # Type: avrdude -c ? # to get a full listing. # AVRDUDE_PROGRAMMER = arduino # com1 = serial port. Use lpt1 to connect to parallel port. AVRDUDE_PORT = /dev/ttyACM0 AVRDUDE_WRITE_FLASH = -D -U flash:w:$(TARGET).hex #AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep # Uncomment the following if you want avrdude's erase cycle counter. # Note that this counter needs to be initialized first using -Yn, # see avrdude manual. #AVRDUDE_ERASE_COUNTER = -y # Uncomment the following if you do /not/ wish a verification to be # performed after programming the device. #AVRDUDE_NO_VERIFY = -V # Increase verbosity level. Please use this when submitting bug # reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> # to submit bug reports. #AVRDUDE_VERBOSE = -v -v AVRDUDE_FLAGS = -p $(MCU) AVRDUDE_FLAGS += -P $(AVRDUDE_PORT) AVRDUDE_FLAGS += -b 115200 AVRDUDE_FLAGS += -c $(AVRDUDE_PROGRAMMER) AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY) AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE) AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER) #---------------- Debugging Options ---------------- # For simulavr only - target MCU frequency. DEBUG_MFREQ = $(F_CPU) # Set the DEBUG_UI to either gdb or insight. # DEBUG_UI = gdb DEBUG_UI = insight # Set the debugging back-end to either avarice, simulavr. DEBUG_BACKEND = avarice #DEBUG_BACKEND = simulavr # GDB Init Filename. GDBINIT_FILE = __avr_gdbinit # When using avarice settings for the JTAG JTAG_DEV = /dev/com1 # Debugging port used to communicate between GDB / avarice / simulavr. DEBUG_PORT = 4242 # Debugging host used to communicate between GDB / avarice / simulavr, normally # just set to localhost unless doing some sort of crazy debugging when # avarice is running on a different computer. DEBUG_HOST = localhost #============================================================================ # Define programs and commands. SHELL = sh CC = avr-gcc OBJCOPY = avr-objcopy OBJDUMP = avr-objdump SIZE = avr-size AR = avr-ar rcs NM = avr-nm AVRDUDE = avrdude REMOVE = rm -f REMOVEDIR = rm -rf COPY = cp WINSHELL = cmd # Define Messages # English MSG_ERRORS_NONE = Errors: none MSG_BEGIN = -------- begin -------- MSG_END = -------- end -------- MSG_SIZE_BEFORE = Size before: MSG_SIZE_AFTER = Size after: MSG_COFF = Converting to AVR COFF: MSG_EXTENDED_COFF = Converting to AVR Extended COFF: MSG_FLASH = Creating load file for Flash: MSG_EEPROM = Creating load file for EEPROM: MSG_EXTENDED_LISTING = Creating Extended Listing: MSG_SYMBOL_TABLE = Creating Symbol Table: MSG_LINKING = Linking: MSG_COMPILING = Compiling C: MSG_COMPILING_CPP = Compiling C++: MSG_ASSEMBLING = Assembling: MSG_CLEANING = Cleaning project: MSG_CREATING_LIBRARY = Creating library: # Define all object files. OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o) # Define all listing files. LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst) # Compiler flags to generate dependency files. GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d # Combine all necessary flags and optional flags. # Add target processor to flags. ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS) ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS) ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS) # Default target. all: begin gccversion sizebefore build sizeafter end # Change the build target to build a HEX file or a library. build: elf hex bin eep lss sym #build: lib elf: $(TARGET).elf hex: $(TARGET).hex bin: $(TARGET).bin eep: $(TARGET).eep lss: $(TARGET).lss sym: $(TARGET).sym LIBNAME=lib$(TARGET).a lib: $(LIBNAME) # Eye candy. # AVR Studio 3.x does not check make's exit code but relies on # the following magic strings to be generated by the compile job. begin: @echo @echo $(MSG_BEGIN) end: @echo $(MSG_END) @echo # Display size of file. HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf sizebefore: @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \ 2>/dev/null; echo; fi sizeafter: @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \ 2>/dev/null; echo; fi # Display compiler version information. gccversion : @$(CC) --version # Program the device. program: $(TARGET).hex $(TARGET).eep $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM) # Generate avr-gdb config/init file which does the following: # define the reset signal, load the target file, connect to target, and set # a breakpoint at main(). gdb-config: @$(REMOVE) $(GDBINIT_FILE) @echo define reset >> $(GDBINIT_FILE) @echo SIGNAL SIGHUP >> $(GDBINIT_FILE) @echo end >> $(GDBINIT_FILE) @echo file $(TARGET).elf >> $(GDBINIT_FILE) @echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE) ifeq ($(DEBUG_BACKEND),simulavr) @echo load >> $(GDBINIT_FILE) endif @echo break main >> $(GDBINIT_FILE) debug: gdb-config $(TARGET).elf ifeq ($(DEBUG_BACKEND), avarice) @echo Starting AVaRICE - Press enter when "waiting to connect" message displays. @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \ $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT) @$(WINSHELL) /c pause else @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \ $(DEBUG_MFREQ) --port $(DEBUG_PORT) endif @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE) # Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB. COFFCONVERT = $(OBJCOPY) --debugging COFFCONVERT += --change-section-address .data-0x800000 COFFCONVERT += --change-section-address .bss-0x800000 COFFCONVERT += --change-section-address .noinit-0x800000 COFFCONVERT += --change-section-address .eeprom-0x810000 coff: $(TARGET).elf @echo @echo $(MSG_COFF) $(TARGET).cof $(COFFCONVERT) -O coff-avr $< $(TARGET).cof extcoff: $(TARGET).elf @echo @echo $(MSG_EXTENDED_COFF) $(TARGET).cof $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof # Create final output files (.hex, .eep) from ELF output file. %.hex: %.elf @echo @echo $(MSG_FLASH) $@ $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@ %.bin: %.elf @echo @echo $(MSG_FLASH) $@ $(OBJCOPY) -O binary -R .eeprom $< $@ %.eep: %.elf @echo @echo $(MSG_EEPROM) $@ -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \ --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0 # Create extended listing file from ELF output file. %.lss: %.elf @echo @echo $(MSG_EXTENDED_LISTING) $@ $(OBJDUMP) -h -S $< > $@ # Create a symbol table from ELF output file. %.sym: %.elf @echo @echo $(MSG_SYMBOL_TABLE) $@ $(NM) -n $< > $@ # Create library from object files. .SECONDARY : $(TARGET).a .PRECIOUS : $(OBJ) %.a: $(OBJ) @echo @echo $(MSG_CREATING_LIBRARY) $@ $(AR) $@ $(OBJ) # Link: create ELF output file from object files. .SECONDARY : $(TARGET).elf .PRECIOUS : $(OBJ) %.elf: $(OBJ) @echo @echo $(MSG_LINKING) $@ $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS) # Compile: create object files from C source files. $(OBJDIR)/%.o : %.c @echo @echo $(MSG_COMPILING) $< $(CC) -c $(ALL_CFLAGS) $< -o $@ # Compile: create object files from C++ source files. $(OBJDIR)/%.o : %.cpp @echo @echo $(MSG_COMPILING_CPP) $< $(CC) -c $(ALL_CPPFLAGS) $< -o $@ # Compile: create assembler files from C source files. %.s : %.c $(CC) -S $(ALL_CFLAGS) $< -o $@ # Compile: create assembler files from C++ source files. %.s : %.cpp $(CC) -S $(ALL_CPPFLAGS) $< -o $@ # Assemble: create object files from assembler source files. $(OBJDIR)/%.o : %.S @echo @echo $(MSG_ASSEMBLING) $< $(CC) -c $(ALL_ASFLAGS) $< -o $@ # Create preprocessed source for use in sending a bug report. %.i : %.c $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ # Target: clean project. clean: begin clean_list end clean_list : @echo @echo $(MSG_CLEANING) $(REMOVE) $(TARGET).hex $(REMOVE) $(TARGET).bin $(REMOVE) $(TARGET).eep $(REMOVE) $(TARGET).cof $(REMOVE) $(TARGET).elf $(REMOVE) $(TARGET).map $(REMOVE) $(TARGET).sym $(REMOVE) $(TARGET).lss $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) $(REMOVE) $(SRC:.c=.s) $(REMOVE) $(SRC:.c=.d) $(REMOVE) $(SRC:.c=.i) $(REMOVEDIR) .dep # Create object files directory $(shell mkdir $(OBJDIR) 2>/dev/null) # Include the dependency files. -include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*) # Listing of phony targets. .PHONY : all begin finish end sizebefore sizeafter gccversion \ build elf hex bin eep lss sym coff extcoff \ clean clean_list program debug gdb-config
netik/dc26_spqr_badge
sw/firmware/ChibiOS/demos/AVR/RT-ARDUINOUNO/Makefile
Makefile
apache-2.0
17,243
[ 30522, 1001, 4931, 7861, 6305, 2015, 1010, 2023, 2003, 1037, 1011, 1008, 1011, 2191, 8873, 2571, 1011, 1008, 1011, 1001, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/*! * froala_editor v1.2.7 (http://editor.froala.com) * License http://editor.froala.com/license * Copyright 2014-2015 Froala Labs */ .dark-theme.froala-box.fr-disabled .froala-element { color: #999999; } .dark-theme.froala-box.fr-disabled button.fr-bttn, .dark-theme.froala-box.fr-disabled button.fr-trigger { color: #999999 !important; } .dark-theme.froala-box.fr-disabled button.fr-bttn:after, .dark-theme.froala-box.fr-disabled button.fr-trigger:after { border-top-color: #999999 !important; } .dark-theme.froala-box .html-switch { border-color: #999999; } .dark-theme.froala-box .froala-wrapper.f-basic { border: solid 1px #252525; } .dark-theme.froala-box .froala-wrapper.f-basic.f-placeholder + span.fr-placeholder { margin: 10px; } .dark-theme.froala-box .froala-element hr { border-top-color: #aaaaaa; } .dark-theme.froala-box .froala-element.f-placeholder:before { color: #aaaaaa; } .dark-theme.froala-box .froala-element pre { border: solid 1px #aaaaaa; background: #fcfcfc; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box; } .dark-theme.froala-box .froala-element blockquote { border-left: solid 5px #aaaaaa; } .dark-theme.froala-box .froala-element img { min-width: 32px !important; min-height: 32px !important; } .dark-theme.froala-box .froala-element img.fr-fil { padding: 10px 10px 10px 3px; } .dark-theme.froala-box .froala-element img.fr-fir { padding: 10px 3px 10px 10px; } .dark-theme.froala-box .froala-element img.fr-fin { padding: 10px 0; } .dark-theme.froala-box .froala-element img::selection { color: #ffffff; } .dark-theme.froala-box .froala-element img::-moz-selection { color: #ffffff; } .dark-theme.froala-box .froala-element span.f-img-editor:before { border: none !important; outline: solid 1px #2c82c9 !important; } .dark-theme.froala-box .froala-element span.f-img-editor.fr-fil { margin: 10px 10px 10px 3px; } .dark-theme.froala-box .froala-element span.f-img-editor.fr-fir { margin: 10px 3px 10px 10px; } .dark-theme.froala-box .froala-element span.f-img-editor.fr-fin { margin: 10px 0; } .dark-theme.froala-box .froala-element span.f-img-handle { height: 8px; width: 8px; border: solid 1px #ffffff !important; background: #2c82c9; } .dark-theme.froala-box .froala-element span.f-video-editor.active:after { border: solid 1px #252525; } .dark-theme.froala-box .froala-element.f-basic { background: #ffffff; color: #444444; padding: 10px; } .dark-theme.froala-box .froala-element.f-basic a { color: inherit; } .dark-theme.froala-box .froala-element table td { border: solid 1px #aaaaaa; } .dark-theme.froala-box.f-html .froala-element { background: #202020; color: #ffffff; font-family: 'Courier New', Monospace; font-size: 13px; } .dark-theme.froala-editor { background: #353535; border: solid 1px #252525; border-top: solid 5px #252525; } .dark-theme.froala-editor hr { border-top-color: #aaaaaa; } .dark-theme.froala-editor span.f-sep { border-right: solid 1px #aaaaaa; height: 35px; } .dark-theme.froala-editor button.fr-bttn, .dark-theme.froala-editor button.fr-trigger { background: transparent; color: #ffffff; font-size: 16px; line-height: 35px; width: 40px; } .dark-theme.froala-editor button.fr-bttn img, .dark-theme.froala-editor button.fr-trigger img { max-width: 40px; max-height: 35px; } .dark-theme.froala-editor button.fr-bttn:disabled, .dark-theme.froala-editor button.fr-trigger:disabled { color: #999999 !important; } .dark-theme.froala-editor button.fr-bttn:disabled:after, .dark-theme.froala-editor button.fr-trigger:disabled:after { border-top-color: #999999 !important; } .dark-theme.froala-editor.ie8 button.fr-bttn:hover, .dark-theme.froala-editor.ie8 button.fr-trigger:hover { background: #2c82c9; color: #ffffff; } .dark-theme.froala-editor.ie8 button.fr-bttn:hover:after, .dark-theme.froala-editor.ie8 button.fr-trigger:hover:after { border-top-color: #ffffff; } .dark-theme.froala-editor .bttn-wrapper:not(.touch) button.fr-bttn:hover, .dark-theme.froala-editor .froala-popup button.fr-bttn:hover, .dark-theme.froala-editor .bttn-wrapper:not(.touch) button.fr-trigger:hover, .dark-theme.froala-editor .froala-popup button.fr-trigger:hover { background: #2c82c9; color: #ffffff; } .dark-theme.froala-editor .bttn-wrapper:not(.touch) button.fr-bttn:hover:after, .dark-theme.froala-editor .froala-popup button.fr-bttn:hover:after, .dark-theme.froala-editor .bttn-wrapper:not(.touch) button.fr-trigger:hover:after, .dark-theme.froala-editor .froala-popup button.fr-trigger:hover:after { border-top-color: #ffffff; } .dark-theme.froala-editor .fr-bttn.active { color: #2c82c9; background: transparent; } .dark-theme.froala-editor .fr-trigger:after { border-top-color: #ffffff; } .dark-theme.froala-editor .fr-trigger.active { color: #ffffff; background: #2c82c9; } .dark-theme.froala-editor .fr-trigger.active:after { border-top-color: #ffffff !important; } .dark-theme.froala-editor .fr-dropdown .fr-trigger { width: calc(40px - 2px); } .dark-theme.froala-editor .fr-dropdown .fr-dropdown-menu { background: #353535; border: solid 1px #252525; } .dark-theme.froala-editor .fr-dropdown .fr-dropdown-menu li.active a { background: #ffffff !important; color: #353535 !important; } .dark-theme.froala-editor .fr-dropdown .fr-dropdown-menu li a { color: #ffffff; } .dark-theme.froala-editor .fr-dropdown .fr-dropdown-menu li a:hover { background: #ffffff !important; color: #353535 !important; } .dark-theme.froala-editor .fr-dropdown .fr-dropdown-menu.fr-table > li:hover > a, .dark-theme.froala-editor .fr-dropdown .fr-dropdown-menu.fr-table > li.hover > a { background: #ffffff; color: #353535; } .dark-theme.froala-editor .fr-dropdown .fr-dropdown-menu.fr-table > li > ul { background: #353535; color: #ffffff; border: solid 1px #252525; } .dark-theme.froala-editor .fr-dropdown .fr-dropdown-menu.fr-table > li > div { background: #353535; color: #ffffff; border: solid 1px #252525; } .dark-theme.froala-editor .fr-dropdown .fr-dropdown-menu.fr-table > li > div > span > span { border: solid 1px #aaaaaa; } .dark-theme.froala-editor .fr-dropdown .fr-dropdown-menu.fr-table > li > div > span:hover > span, .dark-theme.froala-editor .fr-dropdown .fr-dropdown-menu.fr-table > li > div > span.hover > span { background: rgba(61, 142, 185, 0.3); border: solid 1px #3d8eb9; } .dark-theme.froala-editor .fr-dropdown .fr-dropdown-menu.fr-table > hr { border-top: solid 1px #252525; } .dark-theme.froala-editor .fr-dropdown.fr-color-picker .fr-dropdown-menu p { color: #ffffff; } .dark-theme.froala-editor .fr-dropdown.fr-color-picker .fr-dropdown-menu p a.fr-bttn { color: #ffffff; } .dark-theme.froala-editor .fr-dropdown.fr-color-picker .fr-dropdown-menu p a.fr-bttn:hover { color: #2c82c9; } .dark-theme.froala-editor .fr-dropdown.fr-color-picker .fr-dropdown-menu .fr-color-bttn.active { outline: solid 1px #ffffff; } .dark-theme.froala-editor .fr-dropdown.fr-color-picker .fr-dropdown-menu .fr-color-bttn.active:after { color: #ffffff; } .dark-theme.froala-editor .fr-dropdown.fr-color-picker .fr-dropdown-menu .fr-color-bttn:hover:not(:focus):not(:active) { outline: solid 1px #ffffff; } .dark-theme.froala-editor .froala-popup { background: #353535; } .dark-theme.froala-editor .froala-popup h4 { color: #ffffff; } .dark-theme.froala-editor .froala-popup h4 i { color: #aaaaaa; } .dark-theme.froala-editor .froala-popup h4 i.fa-external-link { color: #ffffff; } .dark-theme.froala-editor .froala-popup h4 i.fa-external-link:hover { color: #2c82c9; } .dark-theme.froala-editor .froala-popup h4 i:hover { color: #ffffff; } .dark-theme.froala-editor .froala-popup button.fr-p-bttn { color: #ffffff; } .dark-theme.froala-editor .froala-popup button.fr-p-bttn.f-ok { background: #2c82c9; color: #ffffff; } .dark-theme.froala-editor .froala-popup button.fr-p-bttn.f-unlink { background: #b8312f; color: #ffffff; } .dark-theme.froala-editor .froala-popup button.fr-p-bttn.f-unlink:hover { background: #ffffff; color: #353535; } .dark-theme.froala-editor .froala-popup button.fr-p-bttn:hover, .dark-theme.froala-editor .froala-popup button.fr-p-bttn:focus { background: #ffffff; color: #353535; } .dark-theme.froala-editor .froala-popup div.f-popup-line.f-popup-toolbar { background: #353535; } .dark-theme.froala-editor .froala-popup div.f-popup-line label { color: #ffffff; } .dark-theme.froala-editor .froala-popup div.f-popup-line input[type="text"] { border: solid 1px #aaaaaa; } .dark-theme.froala-editor .froala-popup div.f-popup-line input[type="text"]:focus { border: solid 1px #54acd2; } .dark-theme.froala-editor .froala-popup div.f-popup-line input[type="text"]:disabled { background: #ffffff; color: #999999; } .dark-theme.froala-editor .froala-popup div.f-popup-line textarea { border: solid 1px #aaaaaa; } .dark-theme.froala-editor .froala-popup div.f-popup-line textarea:focus { border: solid 1px #54acd2; } .dark-theme.froala-editor .froala-popup.froala-image-editor-popup div.f-popup-line + div.f-popup-line { border-top: solid 1px #aaaaaa; } .dark-theme.froala-editor .froala-popup.froala-video-popup p.or { color: #ffffff; } .dark-theme.froala-editor .froala-popup.froala-image-popup div.f-popup-line.drop-upload div.f-upload { color: #ffffff; border: dashed 2px #aaaaaa; } .dark-theme.froala-editor .froala-popup.froala-image-popup div.f-popup-line.drop-upload div.f-upload:hover { border: dashed 2px #eeeeee; } .dark-theme.froala-editor .froala-popup.froala-image-popup div.f-popup-line.drop-upload div.f-upload.f-hover { border: dashed 2px #61bd6d; } .dark-theme.froala-editor .froala-popup.froala-image-popup div.f-popup-line button.f-browse { background: #475577; color: #ffffff; } .dark-theme.froala-editor .froala-popup.froala-image-popup div.f-popup-line button.f-browse:hover { background: #ffffff; color: #353535; } .dark-theme.froala-editor .froala-popup.froala-image-popup div.f-popup-line + div.f-popup-line { border-top: solid 1px #aaaaaa; } .dark-theme.froala-editor .froala-popup.froala-image-popup p.f-progress { background-color: #61bd6d; } .dark-theme.froala-editor .froala-popup.froala-image-popup p.f-progress span { background-color: #61bd6d; color: #ffffff; } .dark-theme.froala-editor .froala-popup.froala-link-popup div.f-popup-line .f-browse-links { background: #475577; color: #ffffff; } .dark-theme.froala-editor .froala-popup.froala-link-popup div.f-popup-line .f-browse-links:hover { background: #ffffff; color: #353535; } .dark-theme.froala-editor .froala-popup.froala-link-popup div.f-popup-line ul { background: #353535; border: solid 1px #252525; } .dark-theme.froala-editor .froala-popup.froala-link-popup div.f-popup-line ul li { color: #ffffff; } .dark-theme.froala-editor .froala-popup.froala-link-popup div.f-popup-line ul li + li { border-top: solid 1px #252525; } .dark-theme.froala-editor .froala-popup.froala-link-popup div.f-popup-line ul li:hover { background: #ffffff; color: #353535; } .dark-theme.froala-modal .f-modal-wrapper { background: #353535; border: solid 1px #252525; border-top: solid 5px #252525; } .dark-theme.froala-modal .f-modal-wrapper h4 { color: #ffffff; } .dark-theme.froala-modal .f-modal-wrapper h4 i { color: #aaaaaa; } .dark-theme.froala-modal .f-modal-wrapper h4 i:hover { color: #ffffff; } .dark-theme.froala-modal .f-modal-wrapper div.f-image-list div.f-empty { background: #aaaaaa; } .dark-theme.froala-modal .f-modal-wrapper div.f-image-list div .f-delete-img { background: #b8312f; color: #ffffff; } .dark-theme.froala-modal .f-modal-wrapper div.f-image-list div .f-delete-img:hover { background: #ffffff; color: #353535; } .dark-theme.froala-modal .f-modal-wrapper div.f-image-list:not(.f-touch) div:hover .f-delete-img:hover { background: #ffffff; color: #353535; } .froala-overlay { background: #000000; }
bunsha/french
public/admin/assets/froala/css/themes/dark.css
CSS
epl-1.0
12,097
[ 30522, 1013, 1008, 999, 1008, 10424, 10441, 2721, 1035, 3559, 1058, 2487, 1012, 1016, 1012, 1021, 1006, 8299, 1024, 1013, 1013, 3559, 1012, 10424, 10441, 2721, 1012, 4012, 1007, 1008, 6105, 8299, 1024, 1013, 1013, 3559, 1012, 10424, 10441, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package com.x.message.assemble.communicate.jaxrs.connector; import com.x.base.core.project.exception.PromptException; class ExceptionZhengwuDingdingMessage extends PromptException { private static final long serialVersionUID = 4132300948670472899L; ExceptionZhengwuDingdingMessage(Integer retCode, String retMessage) { super("发送政务钉钉消息失败,错误代码:{},错误消息:{}.", retCode, retMessage); } }
o2oa/o2oa
o2server/x_message_assemble_communicate/src/main/java/com/x/message/assemble/communicate/jaxrs/connector/ExceptionZhengwuDingdingMessage.java
Java
agpl-3.0
427
[ 30522, 7427, 4012, 1012, 1060, 1012, 4471, 1012, 21365, 1012, 10639, 1012, 13118, 2869, 1012, 19400, 1025, 12324, 4012, 1012, 1060, 1012, 2918, 1012, 4563, 1012, 2622, 1012, 6453, 1012, 25732, 10288, 24422, 1025, 2465, 6453, 27922, 13159, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/******/ (function(modules) { // webpackBootstrap /******/ // install a JSONP callback for chunk loading /******/ var parentJsonpFunction = window["webpackJsonp"]; /******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) { /******/ // add "moreModules" to the modules object, /******/ // then flag all "chunkIds" as loaded and fire callback /******/ var moduleId, chunkId, i = 0, callbacks = []; /******/ for(;i < chunkIds.length; i++) { /******/ chunkId = chunkIds[i]; /******/ if(installedChunks[chunkId]) /******/ callbacks.push.apply(callbacks, installedChunks[chunkId]); /******/ installedChunks[chunkId] = 0; /******/ } /******/ for(moduleId in moreModules) { /******/ modules[moduleId] = moreModules[moduleId]; /******/ } /******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules); /******/ while(callbacks.length) /******/ callbacks.shift().call(null, __webpack_require__); /******/ if(moreModules[0]) { /******/ installedModules[0] = 0; /******/ return __webpack_require__(0); /******/ } /******/ }; /******/ var parentHotUpdateCallback = this["webpackHotUpdate"]; /******/ this["webpackHotUpdate"] = /******/ function webpackHotUpdateCallback(chunkId, moreModules) { // eslint-disable-line no-unused-vars /******/ hotAddUpdateChunk(chunkId, moreModules); /******/ if(parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules); /******/ } /******/ /******/ function hotDownloadUpdateChunk(chunkId) { // eslint-disable-line no-unused-vars /******/ var head = document.getElementsByTagName("head")[0]; /******/ var script = document.createElement("script"); /******/ script.type = "text/javascript"; /******/ script.charset = "utf-8"; /******/ script.src = __webpack_require__.p + "" + chunkId + "." + hotCurrentHash + ".hot-update.js"; /******/ head.appendChild(script); /******/ } /******/ /******/ function hotDownloadManifest(callback) { // eslint-disable-line no-unused-vars /******/ if(typeof XMLHttpRequest === "undefined") /******/ return callback(new Error("No browser support")); /******/ try { /******/ var request = new XMLHttpRequest(); /******/ var requestPath = __webpack_require__.p + "" + hotCurrentHash + ".hot-update.json"; /******/ request.open("GET", requestPath, true); /******/ request.timeout = 10000; /******/ request.send(null); /******/ } catch(err) { /******/ return callback(err); /******/ } /******/ request.onreadystatechange = function() { /******/ if(request.readyState !== 4) return; /******/ if(request.status === 0) { /******/ // timeout /******/ callback(new Error("Manifest request to " + requestPath + " timed out.")); /******/ } else if(request.status === 404) { /******/ // no update available /******/ callback(); /******/ } else if(request.status !== 200 && request.status !== 304) { /******/ // other failure /******/ callback(new Error("Manifest request to " + requestPath + " failed.")); /******/ } else { /******/ // success /******/ try { /******/ var update = JSON.parse(request.responseText); /******/ } catch(e) { /******/ callback(e); /******/ return; /******/ } /******/ callback(null, update); /******/ } /******/ }; /******/ } /******/ /******/ /******/ // Copied from https://github.com/facebook/react/blob/bef45b0/src/shared/utils/canDefineProperty.js /******/ var canDefineProperty = false; /******/ try { /******/ Object.defineProperty({}, "x", { /******/ get: function() {} /******/ }); /******/ canDefineProperty = true; /******/ } catch(x) { /******/ // IE will fail on defineProperty /******/ } /******/ /******/ var hotApplyOnUpdate = true; /******/ var hotCurrentHash = "76da46d3f9751b1fc809"; // eslint-disable-line no-unused-vars /******/ var hotCurrentModuleData = {}; /******/ var hotCurrentParents = []; // eslint-disable-line no-unused-vars /******/ /******/ function hotCreateRequire(moduleId) { // eslint-disable-line no-unused-vars /******/ var me = installedModules[moduleId]; /******/ if(!me) return __webpack_require__; /******/ var fn = function(request) { /******/ if(me.hot.active) { /******/ if(installedModules[request]) { /******/ if(installedModules[request].parents.indexOf(moduleId) < 0) /******/ installedModules[request].parents.push(moduleId); /******/ if(me.children.indexOf(request) < 0) /******/ me.children.push(request); /******/ } else hotCurrentParents = [moduleId]; /******/ } else { /******/ console.warn("[HMR] unexpected require(" + request + ") from disposed module " + moduleId); /******/ hotCurrentParents = []; /******/ } /******/ return __webpack_require__(request); /******/ }; /******/ for(var name in __webpack_require__) { /******/ if(Object.prototype.hasOwnProperty.call(__webpack_require__, name)) { /******/ if(canDefineProperty) { /******/ Object.defineProperty(fn, name, (function(name) { /******/ return { /******/ configurable: true, /******/ enumerable: true, /******/ get: function() { /******/ return __webpack_require__[name]; /******/ }, /******/ set: function(value) { /******/ __webpack_require__[name] = value; /******/ } /******/ }; /******/ }(name))); /******/ } else { /******/ fn[name] = __webpack_require__[name]; /******/ } /******/ } /******/ } /******/ /******/ function ensure(chunkId, callback) { /******/ if(hotStatus === "ready") /******/ hotSetStatus("prepare"); /******/ hotChunksLoading++; /******/ __webpack_require__.e(chunkId, function() { /******/ try { /******/ callback.call(null, fn); /******/ } finally { /******/ finishChunkLoading(); /******/ } /******/ /******/ function finishChunkLoading() { /******/ hotChunksLoading--; /******/ if(hotStatus === "prepare") { /******/ if(!hotWaitingFilesMap[chunkId]) { /******/ hotEnsureUpdateChunk(chunkId); /******/ } /******/ if(hotChunksLoading === 0 && hotWaitingFiles === 0) { /******/ hotUpdateDownloaded(); /******/ } /******/ } /******/ } /******/ }); /******/ } /******/ if(canDefineProperty) { /******/ Object.defineProperty(fn, "e", { /******/ enumerable: true, /******/ value: ensure /******/ }); /******/ } else { /******/ fn.e = ensure; /******/ } /******/ return fn; /******/ } /******/ /******/ function hotCreateModule(moduleId) { // eslint-disable-line no-unused-vars /******/ var hot = { /******/ // private stuff /******/ _acceptedDependencies: {}, /******/ _declinedDependencies: {}, /******/ _selfAccepted: false, /******/ _selfDeclined: false, /******/ _disposeHandlers: [], /******/ /******/ // Module API /******/ active: true, /******/ accept: function(dep, callback) { /******/ if(typeof dep === "undefined") /******/ hot._selfAccepted = true; /******/ else if(typeof dep === "function") /******/ hot._selfAccepted = dep; /******/ else if(typeof dep === "object") /******/ for(var i = 0; i < dep.length; i++) /******/ hot._acceptedDependencies[dep[i]] = callback; /******/ else /******/ hot._acceptedDependencies[dep] = callback; /******/ }, /******/ decline: function(dep) { /******/ if(typeof dep === "undefined") /******/ hot._selfDeclined = true; /******/ else if(typeof dep === "number") /******/ hot._declinedDependencies[dep] = true; /******/ else /******/ for(var i = 0; i < dep.length; i++) /******/ hot._declinedDependencies[dep[i]] = true; /******/ }, /******/ dispose: function(callback) { /******/ hot._disposeHandlers.push(callback); /******/ }, /******/ addDisposeHandler: function(callback) { /******/ hot._disposeHandlers.push(callback); /******/ }, /******/ removeDisposeHandler: function(callback) { /******/ var idx = hot._disposeHandlers.indexOf(callback); /******/ if(idx >= 0) hot._disposeHandlers.splice(idx, 1); /******/ }, /******/ /******/ // Management API /******/ check: hotCheck, /******/ apply: hotApply, /******/ status: function(l) { /******/ if(!l) return hotStatus; /******/ hotStatusHandlers.push(l); /******/ }, /******/ addStatusHandler: function(l) { /******/ hotStatusHandlers.push(l); /******/ }, /******/ removeStatusHandler: function(l) { /******/ var idx = hotStatusHandlers.indexOf(l); /******/ if(idx >= 0) hotStatusHandlers.splice(idx, 1); /******/ }, /******/ /******/ //inherit from previous dispose call /******/ data: hotCurrentModuleData[moduleId] /******/ }; /******/ return hot; /******/ } /******/ /******/ var hotStatusHandlers = []; /******/ var hotStatus = "idle"; /******/ /******/ function hotSetStatus(newStatus) { /******/ hotStatus = newStatus; /******/ for(var i = 0; i < hotStatusHandlers.length; i++) /******/ hotStatusHandlers[i].call(null, newStatus); /******/ } /******/ /******/ // while downloading /******/ var hotWaitingFiles = 0; /******/ var hotChunksLoading = 0; /******/ var hotWaitingFilesMap = {}; /******/ var hotRequestedFilesMap = {}; /******/ var hotAvailibleFilesMap = {}; /******/ var hotCallback; /******/ /******/ // The update info /******/ var hotUpdate, hotUpdateNewHash; /******/ /******/ function toModuleId(id) { /******/ var isNumber = (+id) + "" === id; /******/ return isNumber ? +id : id; /******/ } /******/ /******/ function hotCheck(apply, callback) { /******/ if(hotStatus !== "idle") throw new Error("check() is only allowed in idle status"); /******/ if(typeof apply === "function") { /******/ hotApplyOnUpdate = false; /******/ callback = apply; /******/ } else { /******/ hotApplyOnUpdate = apply; /******/ callback = callback || function(err) { /******/ if(err) throw err; /******/ }; /******/ } /******/ hotSetStatus("check"); /******/ hotDownloadManifest(function(err, update) { /******/ if(err) return callback(err); /******/ if(!update) { /******/ hotSetStatus("idle"); /******/ callback(null, null); /******/ return; /******/ } /******/ /******/ hotRequestedFilesMap = {}; /******/ hotAvailibleFilesMap = {}; /******/ hotWaitingFilesMap = {}; /******/ for(var i = 0; i < update.c.length; i++) /******/ hotAvailibleFilesMap[update.c[i]] = true; /******/ hotUpdateNewHash = update.h; /******/ /******/ hotSetStatus("prepare"); /******/ hotCallback = callback; /******/ hotUpdate = {}; /******/ for(var chunkId in installedChunks) /******/ { // eslint-disable-line no-lone-blocks /******/ /*globals chunkId */ /******/ hotEnsureUpdateChunk(chunkId); /******/ } /******/ if(hotStatus === "prepare" && hotChunksLoading === 0 && hotWaitingFiles === 0) { /******/ hotUpdateDownloaded(); /******/ } /******/ }); /******/ } /******/ /******/ function hotAddUpdateChunk(chunkId, moreModules) { // eslint-disable-line no-unused-vars /******/ if(!hotAvailibleFilesMap[chunkId] || !hotRequestedFilesMap[chunkId]) /******/ return; /******/ hotRequestedFilesMap[chunkId] = false; /******/ for(var moduleId in moreModules) { /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { /******/ hotUpdate[moduleId] = moreModules[moduleId]; /******/ } /******/ } /******/ if(--hotWaitingFiles === 0 && hotChunksLoading === 0) { /******/ hotUpdateDownloaded(); /******/ } /******/ } /******/ /******/ function hotEnsureUpdateChunk(chunkId) { /******/ if(!hotAvailibleFilesMap[chunkId]) { /******/ hotWaitingFilesMap[chunkId] = true; /******/ } else { /******/ hotRequestedFilesMap[chunkId] = true; /******/ hotWaitingFiles++; /******/ hotDownloadUpdateChunk(chunkId); /******/ } /******/ } /******/ /******/ function hotUpdateDownloaded() { /******/ hotSetStatus("ready"); /******/ var callback = hotCallback; /******/ hotCallback = null; /******/ if(!callback) return; /******/ if(hotApplyOnUpdate) { /******/ hotApply(hotApplyOnUpdate, callback); /******/ } else { /******/ var outdatedModules = []; /******/ for(var id in hotUpdate) { /******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) { /******/ outdatedModules.push(toModuleId(id)); /******/ } /******/ } /******/ callback(null, outdatedModules); /******/ } /******/ } /******/ /******/ function hotApply(options, callback) { /******/ if(hotStatus !== "ready") throw new Error("apply() is only allowed in ready status"); /******/ if(typeof options === "function") { /******/ callback = options; /******/ options = {}; /******/ } else if(options && typeof options === "object") { /******/ callback = callback || function(err) { /******/ if(err) throw err; /******/ }; /******/ } else { /******/ options = {}; /******/ callback = callback || function(err) { /******/ if(err) throw err; /******/ }; /******/ } /******/ /******/ function getAffectedStuff(module) { /******/ var outdatedModules = [module]; /******/ var outdatedDependencies = {}; /******/ /******/ var queue = outdatedModules.slice(); /******/ while(queue.length > 0) { /******/ var moduleId = queue.pop(); /******/ var module = installedModules[moduleId]; /******/ if(!module || module.hot._selfAccepted) /******/ continue; /******/ if(module.hot._selfDeclined) { /******/ return new Error("Aborted because of self decline: " + moduleId); /******/ } /******/ if(moduleId === 0) { /******/ return; /******/ } /******/ for(var i = 0; i < module.parents.length; i++) { /******/ var parentId = module.parents[i]; /******/ var parent = installedModules[parentId]; /******/ if(parent.hot._declinedDependencies[moduleId]) { /******/ return new Error("Aborted because of declined dependency: " + moduleId + " in " + parentId); /******/ } /******/ if(outdatedModules.indexOf(parentId) >= 0) continue; /******/ if(parent.hot._acceptedDependencies[moduleId]) { /******/ if(!outdatedDependencies[parentId]) /******/ outdatedDependencies[parentId] = []; /******/ addAllToSet(outdatedDependencies[parentId], [moduleId]); /******/ continue; /******/ } /******/ delete outdatedDependencies[parentId]; /******/ outdatedModules.push(parentId); /******/ queue.push(parentId); /******/ } /******/ } /******/ /******/ return [outdatedModules, outdatedDependencies]; /******/ } /******/ /******/ function addAllToSet(a, b) { /******/ for(var i = 0; i < b.length; i++) { /******/ var item = b[i]; /******/ if(a.indexOf(item) < 0) /******/ a.push(item); /******/ } /******/ } /******/ /******/ // at begin all updates modules are outdated /******/ // the "outdated" status can propagate to parents if they don't accept the children /******/ var outdatedDependencies = {}; /******/ var outdatedModules = []; /******/ var appliedUpdate = {}; /******/ for(var id in hotUpdate) { /******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) { /******/ var moduleId = toModuleId(id); /******/ var result = getAffectedStuff(moduleId); /******/ if(!result) { /******/ if(options.ignoreUnaccepted) /******/ continue; /******/ hotSetStatus("abort"); /******/ return callback(new Error("Aborted because " + moduleId + " is not accepted")); /******/ } /******/ if(result instanceof Error) { /******/ hotSetStatus("abort"); /******/ return callback(result); /******/ } /******/ appliedUpdate[moduleId] = hotUpdate[moduleId]; /******/ addAllToSet(outdatedModules, result[0]); /******/ for(var moduleId in result[1]) { /******/ if(Object.prototype.hasOwnProperty.call(result[1], moduleId)) { /******/ if(!outdatedDependencies[moduleId]) /******/ outdatedDependencies[moduleId] = []; /******/ addAllToSet(outdatedDependencies[moduleId], result[1][moduleId]); /******/ } /******/ } /******/ } /******/ } /******/ /******/ // Store self accepted outdated modules to require them later by the module system /******/ var outdatedSelfAcceptedModules = []; /******/ for(var i = 0; i < outdatedModules.length; i++) { /******/ var moduleId = outdatedModules[i]; /******/ if(installedModules[moduleId] && installedModules[moduleId].hot._selfAccepted) /******/ outdatedSelfAcceptedModules.push({ /******/ module: moduleId, /******/ errorHandler: installedModules[moduleId].hot._selfAccepted /******/ }); /******/ } /******/ /******/ // Now in "dispose" phase /******/ hotSetStatus("dispose"); /******/ var queue = outdatedModules.slice(); /******/ while(queue.length > 0) { /******/ var moduleId = queue.pop(); /******/ var module = installedModules[moduleId]; /******/ if(!module) continue; /******/ /******/ var data = {}; /******/ /******/ // Call dispose handlers /******/ var disposeHandlers = module.hot._disposeHandlers; /******/ for(var j = 0; j < disposeHandlers.length; j++) { /******/ var cb = disposeHandlers[j]; /******/ cb(data); /******/ } /******/ hotCurrentModuleData[moduleId] = data; /******/ /******/ // disable module (this disables requires from this module) /******/ module.hot.active = false; /******/ /******/ // remove module from cache /******/ delete installedModules[moduleId]; /******/ /******/ // remove "parents" references from all children /******/ for(var j = 0; j < module.children.length; j++) { /******/ var child = installedModules[module.children[j]]; /******/ if(!child) continue; /******/ var idx = child.parents.indexOf(moduleId); /******/ if(idx >= 0) { /******/ child.parents.splice(idx, 1); /******/ } /******/ } /******/ } /******/ /******/ // remove outdated dependency from module children /******/ for(var moduleId in outdatedDependencies) { /******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) { /******/ var module = installedModules[moduleId]; /******/ var moduleOutdatedDependencies = outdatedDependencies[moduleId]; /******/ for(var j = 0; j < moduleOutdatedDependencies.length; j++) { /******/ var dependency = moduleOutdatedDependencies[j]; /******/ var idx = module.children.indexOf(dependency); /******/ if(idx >= 0) module.children.splice(idx, 1); /******/ } /******/ } /******/ } /******/ /******/ // Not in "apply" phase /******/ hotSetStatus("apply"); /******/ /******/ hotCurrentHash = hotUpdateNewHash; /******/ /******/ // insert new code /******/ for(var moduleId in appliedUpdate) { /******/ if(Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) { /******/ modules[moduleId] = appliedUpdate[moduleId]; /******/ } /******/ } /******/ /******/ // call accept handlers /******/ var error = null; /******/ for(var moduleId in outdatedDependencies) { /******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) { /******/ var module = installedModules[moduleId]; /******/ var moduleOutdatedDependencies = outdatedDependencies[moduleId]; /******/ var callbacks = []; /******/ for(var i = 0; i < moduleOutdatedDependencies.length; i++) { /******/ var dependency = moduleOutdatedDependencies[i]; /******/ var cb = module.hot._acceptedDependencies[dependency]; /******/ if(callbacks.indexOf(cb) >= 0) continue; /******/ callbacks.push(cb); /******/ } /******/ for(var i = 0; i < callbacks.length; i++) { /******/ var cb = callbacks[i]; /******/ try { /******/ cb(outdatedDependencies); /******/ } catch(err) { /******/ if(!error) /******/ error = err; /******/ } /******/ } /******/ } /******/ } /******/ /******/ // Load self accepted modules /******/ for(var i = 0; i < outdatedSelfAcceptedModules.length; i++) { /******/ var item = outdatedSelfAcceptedModules[i]; /******/ var moduleId = item.module; /******/ hotCurrentParents = [moduleId]; /******/ try { /******/ __webpack_require__(moduleId); /******/ } catch(err) { /******/ if(typeof item.errorHandler === "function") { /******/ try { /******/ item.errorHandler(err); /******/ } catch(err) { /******/ if(!error) /******/ error = err; /******/ } /******/ } else if(!error) /******/ error = err; /******/ } /******/ } /******/ /******/ // handle errors in accept handlers and self accepted module load /******/ if(error) { /******/ hotSetStatus("fail"); /******/ return callback(error); /******/ } /******/ /******/ hotSetStatus("idle"); /******/ callback(null, outdatedModules); /******/ } /******/ // The module cache /******/ var installedModules = {}; /******/ // object to store loaded and loading chunks /******/ // "0" means "already loaded" /******/ // Array means "loading", array contains callbacks /******/ var installedChunks = { /******/ 0:0 /******/ }; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false, /******/ hot: hotCreateModule(moduleId), /******/ parents: hotCurrentParents, /******/ children: [] /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId)); /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // This file contains only the entry chunk. /******/ // The chunk loading function for additional chunks /******/ __webpack_require__.e = function requireEnsure(chunkId, callback) { /******/ // "0" is the signal for "already loaded" /******/ if(installedChunks[chunkId] === 0) /******/ return callback.call(null, __webpack_require__); /******/ // an array means "currently loading". /******/ if(installedChunks[chunkId] !== undefined) { /******/ installedChunks[chunkId].push(callback); /******/ } else { /******/ // start chunk loading /******/ installedChunks[chunkId] = [callback]; /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); /******/ script.type = 'text/javascript'; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ script.src = __webpack_require__.p + "" + chunkId + ".chunk.js"; /******/ head.appendChild(script); /******/ } /******/ }; /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // __webpack_hash__ /******/ __webpack_require__.h = function() { return hotCurrentHash; }; /******/ // Load entry module and return exports /******/ return hotCreateRequire(0)(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ function(module, exports, __webpack_require__) { // Polyfills // (these modules are what are in '@angularbundles/angular2-polyfills' so don't use that here) "use strict"; // import 'ie-shim'; // Internet Explorer // import 'es6-shim'; // import 'es6-promise'; // import 'es7-reflect-metadata'; // Prefer CoreJS over the polyfills above __webpack_require__(681); __webpack_require__(682); __webpack_require__(846); // Typescript "emit helpers" polyfill __webpack_require__(844); if (false) { } else { // Development Error.stackTraceLimit = Infinity; __webpack_require__(845); } /***/ }, /* 1 */, /* 2 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(15) , core = __webpack_require__(53) , hide = __webpack_require__(37) , redefine = __webpack_require__(38) , ctx = __webpack_require__(54) , PROTOTYPE = 'prototype'; var $export = function(type, name, source){ var IS_FORCED = type & $export.F , IS_GLOBAL = type & $export.G , IS_STATIC = type & $export.S , IS_PROTO = type & $export.P , IS_BIND = type & $export.B , target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE] , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) , expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}) , key, own, out, exp; if(IS_GLOBAL)source = name; for(key in source){ // contains in native own = !IS_FORCED && target && target[key] !== undefined; // export native or passed out = (own ? target : source)[key]; // bind timers to global for call from export context exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // extend global if(target)redefine(target, key, out, type & $export.U); // export if(exports[key] != out)hide(exports, key, exp); if(IS_PROTO && expProto[key] != out)expProto[key] = out; } }; global.core = core; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; /***/ }, /* 3 */, /* 4 */, /* 5 */, /* 6 */ /***/ function(module, exports, __webpack_require__) { var isObject = __webpack_require__(11); module.exports = function(it){ if(!isObject(it))throw TypeError(it + ' is not an object!'); return it; }; /***/ }, /* 7 */, /* 8 */, /* 9 */ /***/ function(module, exports) { module.exports = function(exec){ try { return !!exec(); } catch(e){ return true; } }; /***/ }, /* 10 */, /* 11 */ /***/ function(module, exports) { module.exports = function(it){ return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }, /* 12 */, /* 13 */ /***/ function(module, exports, __webpack_require__) { var store = __webpack_require__(156)('wks') , uid = __webpack_require__(85) , Symbol = __webpack_require__(15).Symbol , USE_SYMBOL = typeof Symbol == 'function'; var $exports = module.exports = function(name){ return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; $exports.store = store; /***/ }, /* 14 */, /* 15 */ /***/ function(module, exports) { // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef /***/ }, /* 16 */, /* 17 */, /* 18 */, /* 19 */ /***/ function(module, exports, __webpack_require__) { var anObject = __webpack_require__(6) , IE8_DOM_DEFINE = __webpack_require__(390) , toPrimitive = __webpack_require__(71) , dP = Object.defineProperty; exports.f = __webpack_require__(24) ? Object.defineProperty : function defineProperty(O, P, Attributes){ anObject(O); P = toPrimitive(P, true); anObject(Attributes); if(IE8_DOM_DEFINE)try { return dP(O, P, Attributes); } catch(e){ /* empty */ } if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); if('value' in Attributes)O[P] = Attributes.value; return O; }; /***/ }, /* 20 */, /* 21 */, /* 22 */, /* 23 */, /* 24 */ /***/ function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty module.exports = !__webpack_require__(9)(function(){ return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; }); /***/ }, /* 25 */, /* 26 */, /* 27 */, /* 28 */ /***/ function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function(it, key){ return hasOwnProperty.call(it, key); }; /***/ }, /* 29 */ /***/ function(module, exports, __webpack_require__) { // 7.1.15 ToLength var toInteger = __webpack_require__(70) , min = Math.min; module.exports = function(it){ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; /***/ }, /* 30 */, /* 31 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(2) , fails = __webpack_require__(9) , defined = __webpack_require__(55) , quot = /"/g; // B.2.3.2.1 CreateHTML(string, tag, attribute, value) var createHTML = function(string, tag, attribute, value) { var S = String(defined(string)) , p1 = '<' + tag; if(attribute !== '')p1 += ' ' + attribute + '="' + String(value).replace(quot, '&quot;') + '"'; return p1 + '>' + S + '</' + tag + '>'; }; module.exports = function(NAME, exec){ var O = {}; O[NAME] = exec(createHTML); $export($export.P + $export.F * fails(function(){ var test = ''[NAME]('"'); return test !== test.toLowerCase() || test.split('"').length > 3; }), 'String', O); }; /***/ }, /* 32 */, /* 33 */, /* 34 */, /* 35 */, /* 36 */, /* 37 */ /***/ function(module, exports, __webpack_require__) { var dP = __webpack_require__(19) , createDesc = __webpack_require__(69); module.exports = __webpack_require__(24) ? function(object, key, value){ return dP.f(object, key, createDesc(1, value)); } : function(object, key, value){ object[key] = value; return object; }; /***/ }, /* 38 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(15) , hide = __webpack_require__(37) , has = __webpack_require__(28) , SRC = __webpack_require__(85)('src') , TO_STRING = 'toString' , $toString = Function[TO_STRING] , TPL = ('' + $toString).split(TO_STRING); __webpack_require__(53).inspectSource = function(it){ return $toString.call(it); }; (module.exports = function(O, key, val, safe){ var isFunction = typeof val == 'function'; if(isFunction)has(val, 'name') || hide(val, 'name', key); if(O[key] === val)return; if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); if(O === global){ O[key] = val; } else { if(!safe){ delete O[key]; hide(O, key, val); } else { if(O[key])O[key] = val; else hide(O, key, val); } } // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative })(Function.prototype, TO_STRING, function toString(){ return typeof this == 'function' && this[SRC] || $toString.call(this); }); /***/ }, /* 39 */ /***/ function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) var defined = __webpack_require__(55); module.exports = function(it){ return Object(defined(it)); }; /***/ }, /* 40 */ /***/ function(module, exports, __webpack_require__) { var fails = __webpack_require__(9); module.exports = function(method, arg){ return !!method && fails(function(){ arg ? method.call(null, function(){}, 1) : method.call(null); }); }; /***/ }, /* 41 */ /***/ function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__(112) , defined = __webpack_require__(55); module.exports = function(it){ return IObject(defined(it)); }; /***/ }, /* 42 */, /* 43 */ /***/ function(module, exports, __webpack_require__) { // 0 -> Array#forEach // 1 -> Array#map // 2 -> Array#filter // 3 -> Array#some // 4 -> Array#every // 5 -> Array#find // 6 -> Array#findIndex var ctx = __webpack_require__(54) , IObject = __webpack_require__(112) , toObject = __webpack_require__(39) , toLength = __webpack_require__(29) , asc = __webpack_require__(685); module.exports = function(TYPE, $create){ var IS_MAP = TYPE == 1 , IS_FILTER = TYPE == 2 , IS_SOME = TYPE == 3 , IS_EVERY = TYPE == 4 , IS_FIND_INDEX = TYPE == 6 , NO_HOLES = TYPE == 5 || IS_FIND_INDEX , create = $create || asc; return function($this, callbackfn, that){ var O = toObject($this) , self = IObject(O) , f = ctx(callbackfn, that, 3) , length = toLength(self.length) , index = 0 , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined , val, res; for(;length > index; index++)if(NO_HOLES || index in self){ val = self[index]; res = f(val, index, O); if(TYPE){ if(IS_MAP)result[index] = res; // map else if(res)switch(TYPE){ case 3: return true; // some case 5: return val; // find case 6: return index; // findIndex case 2: result.push(val); // filter } else if(IS_EVERY)return false; // every } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; }; }; /***/ }, /* 44 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = __webpack_require__(28) , toObject = __webpack_require__(39) , IE_PROTO = __webpack_require__(249)('IE_PROTO') , ObjectProto = Object.prototype; module.exports = Object.getPrototypeOf || function(O){ O = toObject(O); if(has(O, IE_PROTO))return O[IE_PROTO]; if(typeof O.constructor == 'function' && O instanceof O.constructor){ return O.constructor.prototype; } return O instanceof Object ? ObjectProto : null; }; /***/ }, /* 45 */ /***/ function(module, exports, __webpack_require__) { // most Object methods by ES6 should accept primitives var $export = __webpack_require__(2) , core = __webpack_require__(53) , fails = __webpack_require__(9); module.exports = function(KEY, exec){ var fn = (core.Object || {})[KEY] || Object[KEY] , exp = {}; exp[KEY] = exec(fn); $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); }; /***/ }, /* 46 */, /* 47 */, /* 48 */, /* 49 */, /* 50 */, /* 51 */ /***/ function(module, exports) { module.exports = function(it){ if(typeof it != 'function')throw TypeError(it + ' is not a function!'); return it; }; /***/ }, /* 52 */ /***/ function(module, exports) { var toString = {}.toString; module.exports = function(it){ return toString.call(it).slice(8, -1); }; /***/ }, /* 53 */ /***/ function(module, exports) { var core = module.exports = {version: '2.4.0'}; if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef /***/ }, /* 54 */ /***/ function(module, exports, __webpack_require__) { // optional / simple context binding var aFunction = __webpack_require__(51); module.exports = function(fn, that, length){ aFunction(fn); if(that === undefined)return fn; switch(length){ case 1: return function(a){ return fn.call(that, a); }; case 2: return function(a, b){ return fn.call(that, a, b); }; case 3: return function(a, b, c){ return fn.call(that, a, b, c); }; } return function(/* ...args */){ return fn.apply(that, arguments); }; }; /***/ }, /* 55 */ /***/ function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) module.exports = function(it){ if(it == undefined)throw TypeError("Can't call method on " + it); return it; }; /***/ }, /* 56 */ /***/ function(module, exports, __webpack_require__) { var Map = __webpack_require__(408) , $export = __webpack_require__(2) , shared = __webpack_require__(156)('metadata') , store = shared.store || (shared.store = new (__webpack_require__(411))); var getOrCreateMetadataMap = function(target, targetKey, create){ var targetMetadata = store.get(target); if(!targetMetadata){ if(!create)return undefined; store.set(target, targetMetadata = new Map); } var keyMetadata = targetMetadata.get(targetKey); if(!keyMetadata){ if(!create)return undefined; targetMetadata.set(targetKey, keyMetadata = new Map); } return keyMetadata; }; var ordinaryHasOwnMetadata = function(MetadataKey, O, P){ var metadataMap = getOrCreateMetadataMap(O, P, false); return metadataMap === undefined ? false : metadataMap.has(MetadataKey); }; var ordinaryGetOwnMetadata = function(MetadataKey, O, P){ var metadataMap = getOrCreateMetadataMap(O, P, false); return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); }; var ordinaryDefineOwnMetadata = function(MetadataKey, MetadataValue, O, P){ getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); }; var ordinaryOwnMetadataKeys = function(target, targetKey){ var metadataMap = getOrCreateMetadataMap(target, targetKey, false) , keys = []; if(metadataMap)metadataMap.forEach(function(_, key){ keys.push(key); }); return keys; }; var toMetaKey = function(it){ return it === undefined || typeof it == 'symbol' ? it : String(it); }; var exp = function(O){ $export($export.S, 'Reflect', O); }; module.exports = { store: store, map: getOrCreateMetadataMap, has: ordinaryHasOwnMetadata, get: ordinaryGetOwnMetadata, set: ordinaryDefineOwnMetadata, keys: ordinaryOwnMetadataKeys, key: toMetaKey, exp: exp }; /***/ }, /* 57 */ /***/ function(module, exports, __webpack_require__) { var pIE = __webpack_require__(154) , createDesc = __webpack_require__(69) , toIObject = __webpack_require__(41) , toPrimitive = __webpack_require__(71) , has = __webpack_require__(28) , IE8_DOM_DEFINE = __webpack_require__(390) , gOPD = Object.getOwnPropertyDescriptor; exports.f = __webpack_require__(24) ? gOPD : function getOwnPropertyDescriptor(O, P){ O = toIObject(O); P = toPrimitive(P, true); if(IE8_DOM_DEFINE)try { return gOPD(O, P); } catch(e){ /* empty */ } if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]); }; /***/ }, /* 58 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; if(__webpack_require__(24)){ var LIBRARY = __webpack_require__(97) , global = __webpack_require__(15) , fails = __webpack_require__(9) , $export = __webpack_require__(2) , $typed = __webpack_require__(158) , $buffer = __webpack_require__(253) , ctx = __webpack_require__(54) , anInstance = __webpack_require__(81) , propertyDesc = __webpack_require__(69) , hide = __webpack_require__(37) , redefineAll = __webpack_require__(99) , isInteger = __webpack_require__(244) , toInteger = __webpack_require__(70) , toLength = __webpack_require__(29) , toIndex = __webpack_require__(84) , toPrimitive = __webpack_require__(71) , has = __webpack_require__(28) , same = __webpack_require__(402) , classof = __webpack_require__(110) , isObject = __webpack_require__(11) , toObject = __webpack_require__(39) , isArrayIter = __webpack_require__(242) , create = __webpack_require__(82) , getPrototypeOf = __webpack_require__(44) , gOPN = __webpack_require__(83).f , isIterable = __webpack_require__(692) , getIterFn = __webpack_require__(254) , uid = __webpack_require__(85) , wks = __webpack_require__(13) , createArrayMethod = __webpack_require__(43) , createArrayIncludes = __webpack_require__(235) , speciesConstructor = __webpack_require__(250) , ArrayIterators = __webpack_require__(407) , Iterators = __webpack_require__(96) , $iterDetect = __webpack_require__(152) , setSpecies = __webpack_require__(100) , arrayFill = __webpack_require__(234) , arrayCopyWithin = __webpack_require__(384) , $DP = __webpack_require__(19) , $GOPD = __webpack_require__(57) , dP = $DP.f , gOPD = $GOPD.f , RangeError = global.RangeError , TypeError = global.TypeError , Uint8Array = global.Uint8Array , ARRAY_BUFFER = 'ArrayBuffer' , SHARED_BUFFER = 'Shared' + ARRAY_BUFFER , BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT' , PROTOTYPE = 'prototype' , ArrayProto = Array[PROTOTYPE] , $ArrayBuffer = $buffer.ArrayBuffer , $DataView = $buffer.DataView , arrayForEach = createArrayMethod(0) , arrayFilter = createArrayMethod(2) , arraySome = createArrayMethod(3) , arrayEvery = createArrayMethod(4) , arrayFind = createArrayMethod(5) , arrayFindIndex = createArrayMethod(6) , arrayIncludes = createArrayIncludes(true) , arrayIndexOf = createArrayIncludes(false) , arrayValues = ArrayIterators.values , arrayKeys = ArrayIterators.keys , arrayEntries = ArrayIterators.entries , arrayLastIndexOf = ArrayProto.lastIndexOf , arrayReduce = ArrayProto.reduce , arrayReduceRight = ArrayProto.reduceRight , arrayJoin = ArrayProto.join , arraySort = ArrayProto.sort , arraySlice = ArrayProto.slice , arrayToString = ArrayProto.toString , arrayToLocaleString = ArrayProto.toLocaleString , ITERATOR = wks('iterator') , TAG = wks('toStringTag') , TYPED_CONSTRUCTOR = uid('typed_constructor') , DEF_CONSTRUCTOR = uid('def_constructor') , ALL_CONSTRUCTORS = $typed.CONSTR , TYPED_ARRAY = $typed.TYPED , VIEW = $typed.VIEW , WRONG_LENGTH = 'Wrong length!'; var $map = createArrayMethod(1, function(O, length){ return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); }); var LITTLE_ENDIAN = fails(function(){ return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; }); var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function(){ new Uint8Array(1).set({}); }); var strictToLength = function(it, SAME){ if(it === undefined)throw TypeError(WRONG_LENGTH); var number = +it , length = toLength(it); if(SAME && !same(number, length))throw RangeError(WRONG_LENGTH); return length; }; var toOffset = function(it, BYTES){ var offset = toInteger(it); if(offset < 0 || offset % BYTES)throw RangeError('Wrong offset!'); return offset; }; var validate = function(it){ if(isObject(it) && TYPED_ARRAY in it)return it; throw TypeError(it + ' is not a typed array!'); }; var allocate = function(C, length){ if(!(isObject(C) && TYPED_CONSTRUCTOR in C)){ throw TypeError('It is not a typed array constructor!'); } return new C(length); }; var speciesFromList = function(O, list){ return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); }; var fromList = function(C, list){ var index = 0 , length = list.length , result = allocate(C, length); while(length > index)result[index] = list[index++]; return result; }; var addGetter = function(it, key, internal){ dP(it, key, {get: function(){ return this._d[internal]; }}); }; var $from = function from(source /*, mapfn, thisArg */){ var O = toObject(source) , aLen = arguments.length , mapfn = aLen > 1 ? arguments[1] : undefined , mapping = mapfn !== undefined , iterFn = getIterFn(O) , i, length, values, result, step, iterator; if(iterFn != undefined && !isArrayIter(iterFn)){ for(iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++){ values.push(step.value); } O = values; } if(mapping && aLen > 2)mapfn = ctx(mapfn, arguments[2], 2); for(i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++){ result[i] = mapping ? mapfn(O[i], i) : O[i]; } return result; }; var $of = function of(/*...items*/){ var index = 0 , length = arguments.length , result = allocate(this, length); while(length > index)result[index] = arguments[index++]; return result; }; // iOS Safari 6.x fails here var TO_LOCALE_BUG = !!Uint8Array && fails(function(){ arrayToLocaleString.call(new Uint8Array(1)); }); var $toLocaleString = function toLocaleString(){ return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); }; var proto = { copyWithin: function copyWithin(target, start /*, end */){ return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); }, every: function every(callbackfn /*, thisArg */){ return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, fill: function fill(value /*, start, end */){ // eslint-disable-line no-unused-vars return arrayFill.apply(validate(this), arguments); }, filter: function filter(callbackfn /*, thisArg */){ return speciesFromList(this, arrayFilter(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined)); }, find: function find(predicate /*, thisArg */){ return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }, findIndex: function findIndex(predicate /*, thisArg */){ return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }, forEach: function forEach(callbackfn /*, thisArg */){ arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, indexOf: function indexOf(searchElement /*, fromIndex */){ return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }, includes: function includes(searchElement /*, fromIndex */){ return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }, join: function join(separator){ // eslint-disable-line no-unused-vars return arrayJoin.apply(validate(this), arguments); }, lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */){ // eslint-disable-line no-unused-vars return arrayLastIndexOf.apply(validate(this), arguments); }, map: function map(mapfn /*, thisArg */){ return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); }, reduce: function reduce(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars return arrayReduce.apply(validate(this), arguments); }, reduceRight: function reduceRight(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars return arrayReduceRight.apply(validate(this), arguments); }, reverse: function reverse(){ var that = this , length = validate(that).length , middle = Math.floor(length / 2) , index = 0 , value; while(index < middle){ value = that[index]; that[index++] = that[--length]; that[length] = value; } return that; }, some: function some(callbackfn /*, thisArg */){ return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, sort: function sort(comparefn){ return arraySort.call(validate(this), comparefn); }, subarray: function subarray(begin, end){ var O = validate(this) , length = O.length , $begin = toIndex(begin, length); return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( O.buffer, O.byteOffset + $begin * O.BYTES_PER_ELEMENT, toLength((end === undefined ? length : toIndex(end, length)) - $begin) ); } }; var $slice = function slice(start, end){ return speciesFromList(this, arraySlice.call(validate(this), start, end)); }; var $set = function set(arrayLike /*, offset */){ validate(this); var offset = toOffset(arguments[1], 1) , length = this.length , src = toObject(arrayLike) , len = toLength(src.length) , index = 0; if(len + offset > length)throw RangeError(WRONG_LENGTH); while(index < len)this[offset + index] = src[index++]; }; var $iterators = { entries: function entries(){ return arrayEntries.call(validate(this)); }, keys: function keys(){ return arrayKeys.call(validate(this)); }, values: function values(){ return arrayValues.call(validate(this)); } }; var isTAIndex = function(target, key){ return isObject(target) && target[TYPED_ARRAY] && typeof key != 'symbol' && key in target && String(+key) == String(key); }; var $getDesc = function getOwnPropertyDescriptor(target, key){ return isTAIndex(target, key = toPrimitive(key, true)) ? propertyDesc(2, target[key]) : gOPD(target, key); }; var $setDesc = function defineProperty(target, key, desc){ if(isTAIndex(target, key = toPrimitive(key, true)) && isObject(desc) && has(desc, 'value') && !has(desc, 'get') && !has(desc, 'set') // TODO: add validation descriptor w/o calling accessors && !desc.configurable && (!has(desc, 'writable') || desc.writable) && (!has(desc, 'enumerable') || desc.enumerable) ){ target[key] = desc.value; return target; } else return dP(target, key, desc); }; if(!ALL_CONSTRUCTORS){ $GOPD.f = $getDesc; $DP.f = $setDesc; } $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { getOwnPropertyDescriptor: $getDesc, defineProperty: $setDesc }); if(fails(function(){ arrayToString.call({}); })){ arrayToString = arrayToLocaleString = function toString(){ return arrayJoin.call(this); } } var $TypedArrayPrototype$ = redefineAll({}, proto); redefineAll($TypedArrayPrototype$, $iterators); hide($TypedArrayPrototype$, ITERATOR, $iterators.values); redefineAll($TypedArrayPrototype$, { slice: $slice, set: $set, constructor: function(){ /* noop */ }, toString: arrayToString, toLocaleString: $toLocaleString }); addGetter($TypedArrayPrototype$, 'buffer', 'b'); addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); addGetter($TypedArrayPrototype$, 'byteLength', 'l'); addGetter($TypedArrayPrototype$, 'length', 'e'); dP($TypedArrayPrototype$, TAG, { get: function(){ return this[TYPED_ARRAY]; } }); module.exports = function(KEY, BYTES, wrapper, CLAMPED){ CLAMPED = !!CLAMPED; var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array' , ISNT_UINT8 = NAME != 'Uint8Array' , GETTER = 'get' + KEY , SETTER = 'set' + KEY , TypedArray = global[NAME] , Base = TypedArray || {} , TAC = TypedArray && getPrototypeOf(TypedArray) , FORCED = !TypedArray || !$typed.ABV , O = {} , TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; var getter = function(that, index){ var data = that._d; return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); }; var setter = function(that, index, value){ var data = that._d; if(CLAMPED)value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); }; var addElement = function(that, index){ dP(that, index, { get: function(){ return getter(this, index); }, set: function(value){ return setter(this, index, value); }, enumerable: true }); }; if(FORCED){ TypedArray = wrapper(function(that, data, $offset, $length){ anInstance(that, TypedArray, NAME, '_d'); var index = 0 , offset = 0 , buffer, byteLength, length, klass; if(!isObject(data)){ length = strictToLength(data, true) byteLength = length * BYTES; buffer = new $ArrayBuffer(byteLength); } else if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ buffer = data; offset = toOffset($offset, BYTES); var $len = data.byteLength; if($length === undefined){ if($len % BYTES)throw RangeError(WRONG_LENGTH); byteLength = $len - offset; if(byteLength < 0)throw RangeError(WRONG_LENGTH); } else { byteLength = toLength($length) * BYTES; if(byteLength + offset > $len)throw RangeError(WRONG_LENGTH); } length = byteLength / BYTES; } else if(TYPED_ARRAY in data){ return fromList(TypedArray, data); } else { return $from.call(TypedArray, data); } hide(that, '_d', { b: buffer, o: offset, l: byteLength, e: length, v: new $DataView(buffer) }); while(index < length)addElement(that, index++); }); TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); hide(TypedArrayPrototype, 'constructor', TypedArray); } else if(!$iterDetect(function(iter){ // V8 works with iterators, but fails in many other cases // https://code.google.com/p/v8/issues/detail?id=4552 new TypedArray(null); // eslint-disable-line no-new new TypedArray(iter); // eslint-disable-line no-new }, true)){ TypedArray = wrapper(function(that, data, $offset, $length){ anInstance(that, TypedArray, NAME); var klass; // `ws` module bug, temporarily remove validation length for Uint8Array // https://github.com/websockets/ws/pull/645 if(!isObject(data))return new Base(strictToLength(data, ISNT_UINT8)); if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ return $length !== undefined ? new Base(data, toOffset($offset, BYTES), $length) : $offset !== undefined ? new Base(data, toOffset($offset, BYTES)) : new Base(data); } if(TYPED_ARRAY in data)return fromList(TypedArray, data); return $from.call(TypedArray, data); }); arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function(key){ if(!(key in TypedArray))hide(TypedArray, key, Base[key]); }); TypedArray[PROTOTYPE] = TypedArrayPrototype; if(!LIBRARY)TypedArrayPrototype.constructor = TypedArray; } var $nativeIterator = TypedArrayPrototype[ITERATOR] , CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined) , $iterator = $iterators.values; hide(TypedArray, TYPED_CONSTRUCTOR, true); hide(TypedArrayPrototype, TYPED_ARRAY, NAME); hide(TypedArrayPrototype, VIEW, true); hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); if(CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)){ dP(TypedArrayPrototype, TAG, { get: function(){ return NAME; } }); } O[NAME] = TypedArray; $export($export.G + $export.W + $export.F * (TypedArray != Base), O); $export($export.S, NAME, { BYTES_PER_ELEMENT: BYTES, from: $from, of: $of }); if(!(BYTES_PER_ELEMENT in TypedArrayPrototype))hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); $export($export.P, NAME, proto); setSpecies(NAME); $export($export.P + $export.F * FORCED_SET, NAME, {set: $set}); $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); $export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, {toString: arrayToString}); $export($export.P + $export.F * fails(function(){ new TypedArray(1).slice(); }), NAME, {slice: $slice}); $export($export.P + $export.F * (fails(function(){ return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString() }) || !fails(function(){ TypedArrayPrototype.toLocaleString.call([1, 2]); })), NAME, {toLocaleString: $toLocaleString}); Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; if(!LIBRARY && !CORRECT_ITER_NAME)hide(TypedArrayPrototype, ITERATOR, $iterator); }; } else module.exports = function(){ /* empty */ }; /***/ }, /* 59 */, /* 60 */, /* 61 */, /* 62 */, /* 63 */, /* 64 */, /* 65 */, /* 66 */, /* 67 */, /* 68 */ /***/ function(module, exports, __webpack_require__) { var META = __webpack_require__(85)('meta') , isObject = __webpack_require__(11) , has = __webpack_require__(28) , setDesc = __webpack_require__(19).f , id = 0; var isExtensible = Object.isExtensible || function(){ return true; }; var FREEZE = !__webpack_require__(9)(function(){ return isExtensible(Object.preventExtensions({})); }); var setMeta = function(it){ setDesc(it, META, {value: { i: 'O' + ++id, // object ID w: {} // weak collections IDs }}); }; var fastKey = function(it, create){ // return primitive with prefix if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if(!has(it, META)){ // can't set metadata to uncaught frozen object if(!isExtensible(it))return 'F'; // not necessary to add metadata if(!create)return 'E'; // add missing metadata setMeta(it); // return object ID } return it[META].i; }; var getWeak = function(it, create){ if(!has(it, META)){ // can't set metadata to uncaught frozen object if(!isExtensible(it))return true; // not necessary to add metadata if(!create)return false; // add missing metadata setMeta(it); // return hash weak collections IDs } return it[META].w; }; // add metadata on freeze-family methods calling var onFreeze = function(it){ if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it); return it; }; var meta = module.exports = { KEY: META, NEED: false, fastKey: fastKey, getWeak: getWeak, onFreeze: onFreeze }; /***/ }, /* 69 */ /***/ function(module, exports) { module.exports = function(bitmap, value){ return { enumerable : !(bitmap & 1), configurable: !(bitmap & 2), writable : !(bitmap & 4), value : value }; }; /***/ }, /* 70 */ /***/ function(module, exports) { // 7.1.4 ToInteger var ceil = Math.ceil , floor = Math.floor; module.exports = function(it){ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }, /* 71 */ /***/ function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = __webpack_require__(11); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function(it, S){ if(!isObject(it))return it; var fn, val; if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }, /* 72 */, /* 73 */, /* 74 */, /* 75 */, /* 76 */, /* 77 */, /* 78 */, /* 79 */, /* 80 */, /* 81 */ /***/ function(module, exports) { module.exports = function(it, Constructor, name, forbiddenField){ if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){ throw TypeError(name + ': incorrect invocation!'); } return it; }; /***/ }, /* 82 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(6) , dPs = __webpack_require__(397) , enumBugKeys = __webpack_require__(237) , IE_PROTO = __webpack_require__(249)('IE_PROTO') , Empty = function(){ /* empty */ } , PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function(){ // Thrash, waste and sodomy: IE GC bug var iframe = __webpack_require__(236)('iframe') , i = enumBugKeys.length , gt = '>' , iframeDocument; iframe.style.display = 'none'; __webpack_require__(240).appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write('<script>document.F=Object</script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; module.exports = Object.create || function create(O, Properties){ var result; if(O !== null){ Empty[PROTOTYPE] = anObject(O); result = new Empty; Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : dPs(result, Properties); }; /***/ }, /* 83 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) var $keys = __webpack_require__(399) , hiddenKeys = __webpack_require__(237).concat('length', 'prototype'); exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){ return $keys(O, hiddenKeys); }; /***/ }, /* 84 */ /***/ function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(70) , max = Math.max , min = Math.min; module.exports = function(index, length){ index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); }; /***/ }, /* 85 */ /***/ function(module, exports) { var id = 0 , px = Math.random(); module.exports = function(key){ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; /***/ }, /* 86 */, /* 87 */, /* 88 */, /* 89 */, /* 90 */, /* 91 */, /* 92 */, /* 93 */, /* 94 */, /* 95 */, /* 96 */ /***/ function(module, exports) { module.exports = {}; /***/ }, /* 97 */ /***/ function(module, exports) { module.exports = false; /***/ }, /* 98 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __webpack_require__(399) , enumBugKeys = __webpack_require__(237); module.exports = Object.keys || function keys(O){ return $keys(O, enumBugKeys); }; /***/ }, /* 99 */ /***/ function(module, exports, __webpack_require__) { var redefine = __webpack_require__(38); module.exports = function(target, src, safe){ for(var key in src)redefine(target, key, src[key], safe); return target; }; /***/ }, /* 100 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var global = __webpack_require__(15) , dP = __webpack_require__(19) , DESCRIPTORS = __webpack_require__(24) , SPECIES = __webpack_require__(13)('species'); module.exports = function(KEY){ var C = global[KEY]; if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { configurable: true, get: function(){ return this; } }); }; /***/ }, /* 101 */ /***/ function(module, exports, __webpack_require__) { var def = __webpack_require__(19).f , has = __webpack_require__(28) , TAG = __webpack_require__(13)('toStringTag'); module.exports = function(it, tag, stat){ if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); }; /***/ }, /* 102 */, /* 103 */, /* 104 */, /* 105 */, /* 106 */, /* 107 */, /* 108 */, /* 109 */ /***/ function(module, exports, __webpack_require__) { // 22.1.3.31 Array.prototype[@@unscopables] var UNSCOPABLES = __webpack_require__(13)('unscopables') , ArrayProto = Array.prototype; if(ArrayProto[UNSCOPABLES] == undefined)__webpack_require__(37)(ArrayProto, UNSCOPABLES, {}); module.exports = function(key){ ArrayProto[UNSCOPABLES][key] = true; }; /***/ }, /* 110 */ /***/ function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() var cof = __webpack_require__(52) , TAG = __webpack_require__(13)('toStringTag') // ES3 wrong here , ARG = cof(function(){ return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function(it, key){ try { return it[key]; } catch(e){ /* empty */ } }; module.exports = function(it){ var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; /***/ }, /* 111 */ /***/ function(module, exports, __webpack_require__) { var ctx = __webpack_require__(54) , call = __webpack_require__(392) , isArrayIter = __webpack_require__(242) , anObject = __webpack_require__(6) , toLength = __webpack_require__(29) , getIterFn = __webpack_require__(254) , BREAK = {} , RETURN = {}; var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){ var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable) , f = ctx(fn, that, entries ? 2 : 1) , index = 0 , length, step, iterator, result; if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!'); // fast case for arrays with default iterator if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){ result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); if(result === BREAK || result === RETURN)return result; } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){ result = call(iterator, f, step.value, entries); if(result === BREAK || result === RETURN)return result; } }; exports.BREAK = BREAK; exports.RETURN = RETURN; /***/ }, /* 112 */ /***/ function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = __webpack_require__(52); module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ return cof(it) == 'String' ? it.split('') : Object(it); }; /***/ }, /* 113 */, /* 114 */, /* 115 */, /* 116 */, /* 117 */, /* 118 */, /* 119 */, /* 120 */, /* 121 */, /* 122 */, /* 123 */, /* 124 */, /* 125 */, /* 126 */, /* 127 */, /* 128 */, /* 129 */, /* 130 */, /* 131 */, /* 132 */, /* 133 */, /* 134 */, /* 135 */, /* 136 */, /* 137 */, /* 138 */, /* 139 */, /* 140 */, /* 141 */, /* 142 */, /* 143 */, /* 144 */, /* 145 */, /* 146 */, /* 147 */, /* 148 */, /* 149 */, /* 150 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var global = __webpack_require__(15) , $export = __webpack_require__(2) , redefine = __webpack_require__(38) , redefineAll = __webpack_require__(99) , meta = __webpack_require__(68) , forOf = __webpack_require__(111) , anInstance = __webpack_require__(81) , isObject = __webpack_require__(11) , fails = __webpack_require__(9) , $iterDetect = __webpack_require__(152) , setToStringTag = __webpack_require__(101) , inheritIfRequired = __webpack_require__(241); module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){ var Base = global[NAME] , C = Base , ADDER = IS_MAP ? 'set' : 'add' , proto = C && C.prototype , O = {}; var fixMethod = function(KEY){ var fn = proto[KEY]; redefine(proto, KEY, KEY == 'delete' ? function(a){ return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); } : KEY == 'has' ? function has(a){ return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); } : KEY == 'get' ? function get(a){ return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); } : KEY == 'add' ? function add(a){ fn.call(this, a === 0 ? 0 : a); return this; } : function set(a, b){ fn.call(this, a === 0 ? 0 : a, b); return this; } ); }; if(typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){ new C().entries().next(); }))){ // create collection constructor C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); redefineAll(C.prototype, methods); meta.NEED = true; } else { var instance = new C // early implementations not supports chaining , HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false , THROWS_ON_PRIMITIVES = fails(function(){ instance.has(1); }) // most early implementations doesn't supports iterables, most modern - not close it correctly , ACCEPT_ITERABLES = $iterDetect(function(iter){ new C(iter); }) // eslint-disable-line no-new // for early implementations -0 and +0 not the same , BUGGY_ZERO = !IS_WEAK && fails(function(){ // V8 ~ Chromium 42- fails only with 5+ elements var $instance = new C() , index = 5; while(index--)$instance[ADDER](index, index); return !$instance.has(-0); }); if(!ACCEPT_ITERABLES){ C = wrapper(function(target, iterable){ anInstance(target, C, NAME); var that = inheritIfRequired(new Base, target, C); if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); return that; }); C.prototype = proto; proto.constructor = C; } if(THROWS_ON_PRIMITIVES || BUGGY_ZERO){ fixMethod('delete'); fixMethod('has'); IS_MAP && fixMethod('get'); } if(BUGGY_ZERO || HASNT_CHAINING)fixMethod(ADDER); // weak collections should not contains .clear method if(IS_WEAK && proto.clear)delete proto.clear; } setToStringTag(C, NAME); O[NAME] = C; $export($export.G + $export.W + $export.F * (C != Base), O); if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP); return C; }; /***/ }, /* 151 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var hide = __webpack_require__(37) , redefine = __webpack_require__(38) , fails = __webpack_require__(9) , defined = __webpack_require__(55) , wks = __webpack_require__(13); module.exports = function(KEY, length, exec){ var SYMBOL = wks(KEY) , fns = exec(defined, SYMBOL, ''[KEY]) , strfn = fns[0] , rxfn = fns[1]; if(fails(function(){ var O = {}; O[SYMBOL] = function(){ return 7; }; return ''[KEY](O) != 7; })){ redefine(String.prototype, KEY, strfn); hide(RegExp.prototype, SYMBOL, length == 2 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) // 21.2.5.11 RegExp.prototype[@@split](string, limit) ? function(string, arg){ return rxfn.call(string, this, arg); } // 21.2.5.6 RegExp.prototype[@@match](string) // 21.2.5.9 RegExp.prototype[@@search](string) : function(string){ return rxfn.call(string, this); } ); } }; /***/ }, /* 152 */ /***/ function(module, exports, __webpack_require__) { var ITERATOR = __webpack_require__(13)('iterator') , SAFE_CLOSING = false; try { var riter = [7][ITERATOR](); riter['return'] = function(){ SAFE_CLOSING = true; }; Array.from(riter, function(){ throw 2; }); } catch(e){ /* empty */ } module.exports = function(exec, skipClosing){ if(!skipClosing && !SAFE_CLOSING)return false; var safe = false; try { var arr = [7] , iter = arr[ITERATOR](); iter.next = function(){ return {done: safe = true}; }; arr[ITERATOR] = function(){ return iter; }; exec(arr); } catch(e){ /* empty */ } return safe; }; /***/ }, /* 153 */ /***/ function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }, /* 154 */ /***/ function(module, exports) { exports.f = {}.propertyIsEnumerable; /***/ }, /* 155 */ /***/ function(module, exports, __webpack_require__) { // Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var isObject = __webpack_require__(11) , anObject = __webpack_require__(6); var check = function(O, proto){ anObject(O); if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); }; module.exports = { set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line function(test, buggy, set){ try { set = __webpack_require__(54)(Function.call, __webpack_require__(57).f(Object.prototype, '__proto__').set, 2); set(test, []); buggy = !(test instanceof Array); } catch(e){ buggy = true; } return function setPrototypeOf(O, proto){ check(O, proto); if(buggy)O.__proto__ = proto; else set(O, proto); return O; }; }({}, false) : undefined), check: check }; /***/ }, /* 156 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(15) , SHARED = '__core-js_shared__' , store = global[SHARED] || (global[SHARED] = {}); module.exports = function(key){ return store[key] || (store[key] = {}); }; /***/ }, /* 157 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(2) , defined = __webpack_require__(55) , fails = __webpack_require__(9) , spaces = __webpack_require__(252) , space = '[' + spaces + ']' , non = '\u200b\u0085' , ltrim = RegExp('^' + space + space + '*') , rtrim = RegExp(space + space + '*$'); var exporter = function(KEY, exec, ALIAS){ var exp = {}; var FORCE = fails(function(){ return !!spaces[KEY]() || non[KEY]() != non; }); var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; if(ALIAS)exp[ALIAS] = fn; $export($export.P + $export.F * FORCE, 'String', exp); }; // 1 -> String#trimLeft // 2 -> String#trimRight // 3 -> String#trim var trim = exporter.trim = function(string, TYPE){ string = String(defined(string)); if(TYPE & 1)string = string.replace(ltrim, ''); if(TYPE & 2)string = string.replace(rtrim, ''); return string; }; module.exports = exporter; /***/ }, /* 158 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(15) , hide = __webpack_require__(37) , uid = __webpack_require__(85) , TYPED = uid('typed_array') , VIEW = uid('view') , ABV = !!(global.ArrayBuffer && global.DataView) , CONSTR = ABV , i = 0, l = 9, Typed; var TypedArrayConstructors = ( 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' ).split(','); while(i < l){ if(Typed = global[TypedArrayConstructors[i++]]){ hide(Typed.prototype, TYPED, true); hide(Typed.prototype, VIEW, true); } else CONSTR = false; } module.exports = { ABV: ABV, CONSTR: CONSTR, TYPED: TYPED, VIEW: VIEW }; /***/ }, /* 159 */, /* 160 */, /* 161 */, /* 162 */, /* 163 */, /* 164 */, /* 165 */, /* 166 */, /* 167 */, /* 168 */, /* 169 */, /* 170 */, /* 171 */, /* 172 */, /* 173 */, /* 174 */, /* 175 */, /* 176 */, /* 177 */, /* 178 */, /* 179 */, /* 180 */, /* 181 */, /* 182 */, /* 183 */, /* 184 */, /* 185 */, /* 186 */, /* 187 */, /* 188 */, /* 189 */, /* 190 */, /* 191 */, /* 192 */, /* 193 */, /* 194 */, /* 195 */, /* 196 */, /* 197 */, /* 198 */, /* 199 */, /* 200 */, /* 201 */, /* 202 */, /* 203 */, /* 204 */, /* 205 */, /* 206 */, /* 207 */, /* 208 */, /* 209 */, /* 210 */, /* 211 */, /* 212 */, /* 213 */, /* 214 */, /* 215 */, /* 216 */, /* 217 */, /* 218 */, /* 219 */, /* 220 */, /* 221 */, /* 222 */, /* 223 */, /* 224 */, /* 225 */, /* 226 */, /* 227 */, /* 228 */, /* 229 */, /* 230 */, /* 231 */, /* 232 */, /* 233 */, /* 234 */ /***/ function(module, exports, __webpack_require__) { // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) 'use strict'; var toObject = __webpack_require__(39) , toIndex = __webpack_require__(84) , toLength = __webpack_require__(29); module.exports = function fill(value /*, start = 0, end = @length */){ var O = toObject(this) , length = toLength(O.length) , aLen = arguments.length , index = toIndex(aLen > 1 ? arguments[1] : undefined, length) , end = aLen > 2 ? arguments[2] : undefined , endPos = end === undefined ? length : toIndex(end, length); while(endPos > index)O[index++] = value; return O; }; /***/ }, /* 235 */ /***/ function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(41) , toLength = __webpack_require__(29) , toIndex = __webpack_require__(84); module.exports = function(IS_INCLUDES){ return function($this, el, fromIndex){ var O = toIObject($this) , length = toLength(O.length) , index = toIndex(fromIndex, length) , value; // Array#includes uses SameValueZero equality algorithm if(IS_INCLUDES && el != el)while(length > index){ value = O[index++]; if(value != value)return true; // Array#toIndex ignores holes, Array#includes - not } else for(;length > index; index++)if(IS_INCLUDES || index in O){ if(O[index] === el)return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; /***/ }, /* 236 */ /***/ function(module, exports, __webpack_require__) { var isObject = __webpack_require__(11) , document = __webpack_require__(15).document // in old IE typeof document.createElement is 'object' , is = isObject(document) && isObject(document.createElement); module.exports = function(it){ return is ? document.createElement(it) : {}; }; /***/ }, /* 237 */ /***/ function(module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }, /* 238 */ /***/ function(module, exports, __webpack_require__) { var MATCH = __webpack_require__(13)('match'); module.exports = function(KEY){ var re = /./; try { '/./'[KEY](re); } catch(e){ try { re[MATCH] = false; return !'/./'[KEY](re); } catch(f){ /* empty */ } } return true; }; /***/ }, /* 239 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 21.2.5.3 get RegExp.prototype.flags var anObject = __webpack_require__(6); module.exports = function(){ var that = anObject(this) , result = ''; if(that.global) result += 'g'; if(that.ignoreCase) result += 'i'; if(that.multiline) result += 'm'; if(that.unicode) result += 'u'; if(that.sticky) result += 'y'; return result; }; /***/ }, /* 240 */ /***/ function(module, exports, __webpack_require__) { module.exports = __webpack_require__(15).document && document.documentElement; /***/ }, /* 241 */ /***/ function(module, exports, __webpack_require__) { var isObject = __webpack_require__(11) , setPrototypeOf = __webpack_require__(155).set; module.exports = function(that, target, C){ var P, S = target.constructor; if(S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf){ setPrototypeOf(that, P); } return that; }; /***/ }, /* 242 */ /***/ function(module, exports, __webpack_require__) { // check on default Array iterator var Iterators = __webpack_require__(96) , ITERATOR = __webpack_require__(13)('iterator') , ArrayProto = Array.prototype; module.exports = function(it){ return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; /***/ }, /* 243 */ /***/ function(module, exports, __webpack_require__) { // 7.2.2 IsArray(argument) var cof = __webpack_require__(52); module.exports = Array.isArray || function isArray(arg){ return cof(arg) == 'Array'; }; /***/ }, /* 244 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.3 Number.isInteger(number) var isObject = __webpack_require__(11) , floor = Math.floor; module.exports = function isInteger(it){ return !isObject(it) && isFinite(it) && floor(it) === it; }; /***/ }, /* 245 */ /***/ function(module, exports, __webpack_require__) { // 7.2.8 IsRegExp(argument) var isObject = __webpack_require__(11) , cof = __webpack_require__(52) , MATCH = __webpack_require__(13)('match'); module.exports = function(it){ var isRegExp; return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); }; /***/ }, /* 246 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var LIBRARY = __webpack_require__(97) , $export = __webpack_require__(2) , redefine = __webpack_require__(38) , hide = __webpack_require__(37) , has = __webpack_require__(28) , Iterators = __webpack_require__(96) , $iterCreate = __webpack_require__(393) , setToStringTag = __webpack_require__(101) , getPrototypeOf = __webpack_require__(44) , ITERATOR = __webpack_require__(13)('iterator') , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` , FF_ITERATOR = '@@iterator' , KEYS = 'keys' , VALUES = 'values'; var returnThis = function(){ return this; }; module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ $iterCreate(Constructor, NAME, next); var getMethod = function(kind){ if(!BUGGY && kind in proto)return proto[kind]; switch(kind){ case KEYS: return function keys(){ return new Constructor(this, kind); }; case VALUES: return function values(){ return new Constructor(this, kind); }; } return function entries(){ return new Constructor(this, kind); }; }; var TAG = NAME + ' Iterator' , DEF_VALUES = DEFAULT == VALUES , VALUES_BUG = false , proto = Base.prototype , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] , $default = $native || getMethod(DEFAULT) , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined , $anyNative = NAME == 'Array' ? proto.entries || $native : $native , methods, key, IteratorPrototype; // Fix native if($anyNative){ IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); if(IteratorPrototype !== Object.prototype){ // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF if(DEF_VALUES && $native && $native.name !== VALUES){ VALUES_BUG = true; $default = function values(){ return $native.call(this); }; } // Define iterator if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; Iterators[TAG] = returnThis; if(DEFAULT){ methods = { values: DEF_VALUES ? $default : getMethod(VALUES), keys: IS_SET ? $default : getMethod(KEYS), entries: $entries }; if(FORCED)for(key in methods){ if(!(key in proto))redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; }; /***/ }, /* 247 */ /***/ function(module, exports) { // 20.2.2.14 Math.expm1(x) var $expm1 = Math.expm1; module.exports = (!$expm1 // Old FF bug || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 // Tor Browser bug || $expm1(-2e-17) != -2e-17 ) ? function expm1(x){ return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; } : $expm1; /***/ }, /* 248 */ /***/ function(module, exports) { // 20.2.2.28 Math.sign(x) module.exports = Math.sign || function sign(x){ return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; }; /***/ }, /* 249 */ /***/ function(module, exports, __webpack_require__) { var shared = __webpack_require__(156)('keys') , uid = __webpack_require__(85); module.exports = function(key){ return shared[key] || (shared[key] = uid(key)); }; /***/ }, /* 250 */ /***/ function(module, exports, __webpack_require__) { // 7.3.20 SpeciesConstructor(O, defaultConstructor) var anObject = __webpack_require__(6) , aFunction = __webpack_require__(51) , SPECIES = __webpack_require__(13)('species'); module.exports = function(O, D){ var C = anObject(O).constructor, S; return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); }; /***/ }, /* 251 */ /***/ function(module, exports, __webpack_require__) { // helper for String#{startsWith, endsWith, includes} var isRegExp = __webpack_require__(245) , defined = __webpack_require__(55); module.exports = function(that, searchString, NAME){ if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!"); return String(defined(that)); }; /***/ }, /* 252 */ /***/ function(module, exports) { module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; /***/ }, /* 253 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var global = __webpack_require__(15) , DESCRIPTORS = __webpack_require__(24) , LIBRARY = __webpack_require__(97) , $typed = __webpack_require__(158) , hide = __webpack_require__(37) , redefineAll = __webpack_require__(99) , fails = __webpack_require__(9) , anInstance = __webpack_require__(81) , toInteger = __webpack_require__(70) , toLength = __webpack_require__(29) , gOPN = __webpack_require__(83).f , dP = __webpack_require__(19).f , arrayFill = __webpack_require__(234) , setToStringTag = __webpack_require__(101) , ARRAY_BUFFER = 'ArrayBuffer' , DATA_VIEW = 'DataView' , PROTOTYPE = 'prototype' , WRONG_LENGTH = 'Wrong length!' , WRONG_INDEX = 'Wrong index!' , $ArrayBuffer = global[ARRAY_BUFFER] , $DataView = global[DATA_VIEW] , Math = global.Math , parseInt = global.parseInt , RangeError = global.RangeError , Infinity = global.Infinity , BaseBuffer = $ArrayBuffer , abs = Math.abs , pow = Math.pow , min = Math.min , floor = Math.floor , log = Math.log , LN2 = Math.LN2 , BUFFER = 'buffer' , BYTE_LENGTH = 'byteLength' , BYTE_OFFSET = 'byteOffset' , $BUFFER = DESCRIPTORS ? '_b' : BUFFER , $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH , $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; // IEEE754 conversions based on https://github.com/feross/ieee754 var packIEEE754 = function(value, mLen, nBytes){ var buffer = Array(nBytes) , eLen = nBytes * 8 - mLen - 1 , eMax = (1 << eLen) - 1 , eBias = eMax >> 1 , rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0 , i = 0 , s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0 , e, m, c; value = abs(value) if(value != value || value === Infinity){ m = value != value ? 1 : 0; e = eMax; } else { e = floor(log(value) / LN2); if(value * (c = pow(2, -e)) < 1){ e--; c *= 2; } if(e + eBias >= 1){ value += rt / c; } else { value += rt * pow(2, 1 - eBias); } if(value * c >= 2){ e++; c /= 2; } if(e + eBias >= eMax){ m = 0; e = eMax; } else if(e + eBias >= 1){ m = (value * c - 1) * pow(2, mLen); e = e + eBias; } else { m = value * pow(2, eBias - 1) * pow(2, mLen); e = 0; } } for(; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); e = e << mLen | m; eLen += mLen; for(; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); buffer[--i] |= s * 128; return buffer; }; var unpackIEEE754 = function(buffer, mLen, nBytes){ var eLen = nBytes * 8 - mLen - 1 , eMax = (1 << eLen) - 1 , eBias = eMax >> 1 , nBits = eLen - 7 , i = nBytes - 1 , s = buffer[i--] , e = s & 127 , m; s >>= 7; for(; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); m = e & (1 << -nBits) - 1; e >>= -nBits; nBits += mLen; for(; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); if(e === 0){ e = 1 - eBias; } else if(e === eMax){ return m ? NaN : s ? -Infinity : Infinity; } else { m = m + pow(2, mLen); e = e - eBias; } return (s ? -1 : 1) * m * pow(2, e - mLen); }; var unpackI32 = function(bytes){ return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; }; var packI8 = function(it){ return [it & 0xff]; }; var packI16 = function(it){ return [it & 0xff, it >> 8 & 0xff]; }; var packI32 = function(it){ return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; }; var packF64 = function(it){ return packIEEE754(it, 52, 8); }; var packF32 = function(it){ return packIEEE754(it, 23, 4); }; var addGetter = function(C, key, internal){ dP(C[PROTOTYPE], key, {get: function(){ return this[internal]; }}); }; var get = function(view, bytes, index, isLittleEndian){ var numIndex = +index , intIndex = toInteger(numIndex); if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX); var store = view[$BUFFER]._b , start = intIndex + view[$OFFSET] , pack = store.slice(start, start + bytes); return isLittleEndian ? pack : pack.reverse(); }; var set = function(view, bytes, index, conversion, value, isLittleEndian){ var numIndex = +index , intIndex = toInteger(numIndex); if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX); var store = view[$BUFFER]._b , start = intIndex + view[$OFFSET] , pack = conversion(+value); for(var i = 0; i < bytes; i++)store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; }; var validateArrayBufferArguments = function(that, length){ anInstance(that, $ArrayBuffer, ARRAY_BUFFER); var numberLength = +length , byteLength = toLength(numberLength); if(numberLength != byteLength)throw RangeError(WRONG_LENGTH); return byteLength; }; if(!$typed.ABV){ $ArrayBuffer = function ArrayBuffer(length){ var byteLength = validateArrayBufferArguments(this, length); this._b = arrayFill.call(Array(byteLength), 0); this[$LENGTH] = byteLength; }; $DataView = function DataView(buffer, byteOffset, byteLength){ anInstance(this, $DataView, DATA_VIEW); anInstance(buffer, $ArrayBuffer, DATA_VIEW); var bufferLength = buffer[$LENGTH] , offset = toInteger(byteOffset); if(offset < 0 || offset > bufferLength)throw RangeError('Wrong offset!'); byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); if(offset + byteLength > bufferLength)throw RangeError(WRONG_LENGTH); this[$BUFFER] = buffer; this[$OFFSET] = offset; this[$LENGTH] = byteLength; }; if(DESCRIPTORS){ addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); addGetter($DataView, BUFFER, '_b'); addGetter($DataView, BYTE_LENGTH, '_l'); addGetter($DataView, BYTE_OFFSET, '_o'); } redefineAll($DataView[PROTOTYPE], { getInt8: function getInt8(byteOffset){ return get(this, 1, byteOffset)[0] << 24 >> 24; }, getUint8: function getUint8(byteOffset){ return get(this, 1, byteOffset)[0]; }, getInt16: function getInt16(byteOffset /*, littleEndian */){ var bytes = get(this, 2, byteOffset, arguments[1]); return (bytes[1] << 8 | bytes[0]) << 16 >> 16; }, getUint16: function getUint16(byteOffset /*, littleEndian */){ var bytes = get(this, 2, byteOffset, arguments[1]); return bytes[1] << 8 | bytes[0]; }, getInt32: function getInt32(byteOffset /*, littleEndian */){ return unpackI32(get(this, 4, byteOffset, arguments[1])); }, getUint32: function getUint32(byteOffset /*, littleEndian */){ return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; }, getFloat32: function getFloat32(byteOffset /*, littleEndian */){ return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); }, getFloat64: function getFloat64(byteOffset /*, littleEndian */){ return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); }, setInt8: function setInt8(byteOffset, value){ set(this, 1, byteOffset, packI8, value); }, setUint8: function setUint8(byteOffset, value){ set(this, 1, byteOffset, packI8, value); }, setInt16: function setInt16(byteOffset, value /*, littleEndian */){ set(this, 2, byteOffset, packI16, value, arguments[2]); }, setUint16: function setUint16(byteOffset, value /*, littleEndian */){ set(this, 2, byteOffset, packI16, value, arguments[2]); }, setInt32: function setInt32(byteOffset, value /*, littleEndian */){ set(this, 4, byteOffset, packI32, value, arguments[2]); }, setUint32: function setUint32(byteOffset, value /*, littleEndian */){ set(this, 4, byteOffset, packI32, value, arguments[2]); }, setFloat32: function setFloat32(byteOffset, value /*, littleEndian */){ set(this, 4, byteOffset, packF32, value, arguments[2]); }, setFloat64: function setFloat64(byteOffset, value /*, littleEndian */){ set(this, 8, byteOffset, packF64, value, arguments[2]); } }); } else { if(!fails(function(){ new $ArrayBuffer; // eslint-disable-line no-new }) || !fails(function(){ new $ArrayBuffer(.5); // eslint-disable-line no-new })){ $ArrayBuffer = function ArrayBuffer(length){ return new BaseBuffer(validateArrayBufferArguments(this, length)); }; var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; for(var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ){ if(!((key = keys[j++]) in $ArrayBuffer))hide($ArrayBuffer, key, BaseBuffer[key]); }; if(!LIBRARY)ArrayBufferProto.constructor = $ArrayBuffer; } // iOS Safari 7.x bug var view = new $DataView(new $ArrayBuffer(2)) , $setInt8 = $DataView[PROTOTYPE].setInt8; view.setInt8(0, 2147483648); view.setInt8(1, 2147483649); if(view.getInt8(0) || !view.getInt8(1))redefineAll($DataView[PROTOTYPE], { setInt8: function setInt8(byteOffset, value){ $setInt8.call(this, byteOffset, value << 24 >> 24); }, setUint8: function setUint8(byteOffset, value){ $setInt8.call(this, byteOffset, value << 24 >> 24); } }, true); } setToStringTag($ArrayBuffer, ARRAY_BUFFER); setToStringTag($DataView, DATA_VIEW); hide($DataView[PROTOTYPE], $typed.VIEW, true); exports[ARRAY_BUFFER] = $ArrayBuffer; exports[DATA_VIEW] = $DataView; /***/ }, /* 254 */ /***/ function(module, exports, __webpack_require__) { var classof = __webpack_require__(110) , ITERATOR = __webpack_require__(13)('iterator') , Iterators = __webpack_require__(96); module.exports = __webpack_require__(53).getIteratorMethod = function(it){ if(it != undefined)return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; /***/ }, /* 255 */, /* 256 */, /* 257 */, /* 258 */, /* 259 */ /***/ function(module, exports) { // shim for using process in browser var process = module.exports = {}; var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { if (!draining || !currentQueue) { return; } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } function drainQueue() { if (draining) { return; } var timeout = setTimeout(cleanUpNextTick); draining = true; var len = queue.length; while(len) { currentQueue = queue; queue = []; while (++queueIndex < len) { if (currentQueue) { currentQueue[queueIndex].run(); } } queueIndex = -1; len = queue.length; } currentQueue = null; draining = false; clearTimeout(timeout); } process.nextTick = function (fun) { var args = new Array(arguments.length - 1); if (arguments.length > 1) { for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; } } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { setTimeout(drainQueue, 0); } }; // v8 likes predictible objects function Item(fun, array) { this.fun = fun; this.array = array; } Item.prototype.run = function () { this.fun.apply(null, this.array); }; process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; process.version = ''; // empty string to avoid regexp issues process.versions = {}; function noop() {} process.on = noop; process.addListener = noop; process.once = noop; process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop; process.binding = function (name) { throw new Error('process.binding is not supported'); }; process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; process.umask = function() { return 0; }; /***/ }, /* 260 */, /* 261 */, /* 262 */, /* 263 */, /* 264 */, /* 265 */, /* 266 */, /* 267 */, /* 268 */, /* 269 */, /* 270 */, /* 271 */, /* 272 */, /* 273 */, /* 274 */, /* 275 */, /* 276 */, /* 277 */, /* 278 */, /* 279 */, /* 280 */, /* 281 */, /* 282 */, /* 283 */, /* 284 */, /* 285 */, /* 286 */, /* 287 */, /* 288 */, /* 289 */, /* 290 */, /* 291 */, /* 292 */, /* 293 */, /* 294 */, /* 295 */, /* 296 */, /* 297 */, /* 298 */, /* 299 */, /* 300 */, /* 301 */, /* 302 */, /* 303 */, /* 304 */, /* 305 */, /* 306 */, /* 307 */, /* 308 */, /* 309 */, /* 310 */, /* 311 */, /* 312 */, /* 313 */, /* 314 */, /* 315 */, /* 316 */, /* 317 */, /* 318 */, /* 319 */, /* 320 */, /* 321 */, /* 322 */, /* 323 */, /* 324 */, /* 325 */, /* 326 */, /* 327 */, /* 328 */, /* 329 */, /* 330 */, /* 331 */, /* 332 */, /* 333 */, /* 334 */, /* 335 */, /* 336 */, /* 337 */, /* 338 */, /* 339 */, /* 340 */, /* 341 */, /* 342 */, /* 343 */, /* 344 */, /* 345 */, /* 346 */, /* 347 */, /* 348 */, /* 349 */, /* 350 */, /* 351 */, /* 352 */, /* 353 */, /* 354 */, /* 355 */, /* 356 */, /* 357 */, /* 358 */, /* 359 */, /* 360 */, /* 361 */, /* 362 */, /* 363 */, /* 364 */, /* 365 */, /* 366 */, /* 367 */, /* 368 */, /* 369 */, /* 370 */, /* 371 */, /* 372 */, /* 373 */, /* 374 */, /* 375 */, /* 376 */, /* 377 */, /* 378 */, /* 379 */, /* 380 */, /* 381 */, /* 382 */, /* 383 */ /***/ function(module, exports, __webpack_require__) { var cof = __webpack_require__(52); module.exports = function(it, msg){ if(typeof it != 'number' && cof(it) != 'Number')throw TypeError(msg); return +it; }; /***/ }, /* 384 */ /***/ function(module, exports, __webpack_require__) { // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) 'use strict'; var toObject = __webpack_require__(39) , toIndex = __webpack_require__(84) , toLength = __webpack_require__(29); module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){ var O = toObject(this) , len = toLength(O.length) , to = toIndex(target, len) , from = toIndex(start, len) , end = arguments.length > 2 ? arguments[2] : undefined , count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to) , inc = 1; if(from < to && to < from + count){ inc = -1; from += count - 1; to += count - 1; } while(count-- > 0){ if(from in O)O[to] = O[from]; else delete O[to]; to += inc; from += inc; } return O; }; /***/ }, /* 385 */ /***/ function(module, exports, __webpack_require__) { var aFunction = __webpack_require__(51) , toObject = __webpack_require__(39) , IObject = __webpack_require__(112) , toLength = __webpack_require__(29); module.exports = function(that, callbackfn, aLen, memo, isRight){ aFunction(callbackfn); var O = toObject(that) , self = IObject(O) , length = toLength(O.length) , index = isRight ? length - 1 : 0 , i = isRight ? -1 : 1; if(aLen < 2)for(;;){ if(index in self){ memo = self[index]; index += i; break; } index += i; if(isRight ? index < 0 : length <= index){ throw TypeError('Reduce of empty array with no initial value'); } } for(;isRight ? index >= 0 : length > index; index += i)if(index in self){ memo = callbackfn(memo, self[index], index, O); } return memo; }; /***/ }, /* 386 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var aFunction = __webpack_require__(51) , isObject = __webpack_require__(11) , invoke = __webpack_require__(391) , arraySlice = [].slice , factories = {}; var construct = function(F, len, args){ if(!(len in factories)){ for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']'; factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); } return factories[len](F, args); }; module.exports = Function.bind || function bind(that /*, args... */){ var fn = aFunction(this) , partArgs = arraySlice.call(arguments, 1); var bound = function(/* args... */){ var args = partArgs.concat(arraySlice.call(arguments)); return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); }; if(isObject(fn.prototype))bound.prototype = fn.prototype; return bound; }; /***/ }, /* 387 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var dP = __webpack_require__(19).f , create = __webpack_require__(82) , hide = __webpack_require__(37) , redefineAll = __webpack_require__(99) , ctx = __webpack_require__(54) , anInstance = __webpack_require__(81) , defined = __webpack_require__(55) , forOf = __webpack_require__(111) , $iterDefine = __webpack_require__(246) , step = __webpack_require__(394) , setSpecies = __webpack_require__(100) , DESCRIPTORS = __webpack_require__(24) , fastKey = __webpack_require__(68).fastKey , SIZE = DESCRIPTORS ? '_s' : 'size'; var getEntry = function(that, key){ // fast case var index = fastKey(key), entry; if(index !== 'F')return that._i[index]; // frozen object case for(entry = that._f; entry; entry = entry.n){ if(entry.k == key)return entry; } }; module.exports = { getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ var C = wrapper(function(that, iterable){ anInstance(that, C, NAME, '_i'); that._i = create(null); // index that._f = undefined; // first entry that._l = undefined; // last entry that[SIZE] = 0; // size if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { // 23.1.3.1 Map.prototype.clear() // 23.2.3.2 Set.prototype.clear() clear: function clear(){ for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){ entry.r = true; if(entry.p)entry.p = entry.p.n = undefined; delete data[entry.i]; } that._f = that._l = undefined; that[SIZE] = 0; }, // 23.1.3.3 Map.prototype.delete(key) // 23.2.3.4 Set.prototype.delete(value) 'delete': function(key){ var that = this , entry = getEntry(that, key); if(entry){ var next = entry.n , prev = entry.p; delete that._i[entry.i]; entry.r = true; if(prev)prev.n = next; if(next)next.p = prev; if(that._f == entry)that._f = next; if(that._l == entry)that._l = prev; that[SIZE]--; } return !!entry; }, // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) forEach: function forEach(callbackfn /*, that = undefined */){ anInstance(this, C, 'forEach'); var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3) , entry; while(entry = entry ? entry.n : this._f){ f(entry.v, entry.k, this); // revert to the last existing entry while(entry && entry.r)entry = entry.p; } }, // 23.1.3.7 Map.prototype.has(key) // 23.2.3.7 Set.prototype.has(value) has: function has(key){ return !!getEntry(this, key); } }); if(DESCRIPTORS)dP(C.prototype, 'size', { get: function(){ return defined(this[SIZE]); } }); return C; }, def: function(that, key, value){ var entry = getEntry(that, key) , prev, index; // change existing entry if(entry){ entry.v = value; // create new entry } else { that._l = entry = { i: index = fastKey(key, true), // <- index k: key, // <- key v: value, // <- value p: prev = that._l, // <- previous entry n: undefined, // <- next entry r: false // <- removed }; if(!that._f)that._f = entry; if(prev)prev.n = entry; that[SIZE]++; // add to index if(index !== 'F')that._i[index] = entry; } return that; }, getEntry: getEntry, setStrong: function(C, NAME, IS_MAP){ // add .keys, .values, .entries, [@@iterator] // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 $iterDefine(C, NAME, function(iterated, kind){ this._t = iterated; // target this._k = kind; // kind this._l = undefined; // previous }, function(){ var that = this , kind = that._k , entry = that._l; // revert to the last existing entry while(entry && entry.r)entry = entry.p; // get next entry if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){ // or finish the iteration that._t = undefined; return step(1); } // return step by kind if(kind == 'keys' )return step(0, entry.k); if(kind == 'values')return step(0, entry.v); return step(0, [entry.k, entry.v]); }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true); // add [@@species], 23.1.2.2, 23.2.2.2 setSpecies(NAME); } }; /***/ }, /* 388 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var redefineAll = __webpack_require__(99) , getWeak = __webpack_require__(68).getWeak , anObject = __webpack_require__(6) , isObject = __webpack_require__(11) , anInstance = __webpack_require__(81) , forOf = __webpack_require__(111) , createArrayMethod = __webpack_require__(43) , $has = __webpack_require__(28) , arrayFind = createArrayMethod(5) , arrayFindIndex = createArrayMethod(6) , id = 0; // fallback for uncaught frozen keys var uncaughtFrozenStore = function(that){ return that._l || (that._l = new UncaughtFrozenStore); }; var UncaughtFrozenStore = function(){ this.a = []; }; var findUncaughtFrozen = function(store, key){ return arrayFind(store.a, function(it){ return it[0] === key; }); }; UncaughtFrozenStore.prototype = { get: function(key){ var entry = findUncaughtFrozen(this, key); if(entry)return entry[1]; }, has: function(key){ return !!findUncaughtFrozen(this, key); }, set: function(key, value){ var entry = findUncaughtFrozen(this, key); if(entry)entry[1] = value; else this.a.push([key, value]); }, 'delete': function(key){ var index = arrayFindIndex(this.a, function(it){ return it[0] === key; }); if(~index)this.a.splice(index, 1); return !!~index; } }; module.exports = { getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ var C = wrapper(function(that, iterable){ anInstance(that, C, NAME, '_i'); that._i = id++; // collection id that._l = undefined; // leak store for uncaught frozen objects if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { // 23.3.3.2 WeakMap.prototype.delete(key) // 23.4.3.3 WeakSet.prototype.delete(value) 'delete': function(key){ if(!isObject(key))return false; var data = getWeak(key); if(data === true)return uncaughtFrozenStore(this)['delete'](key); return data && $has(data, this._i) && delete data[this._i]; }, // 23.3.3.4 WeakMap.prototype.has(key) // 23.4.3.4 WeakSet.prototype.has(value) has: function has(key){ if(!isObject(key))return false; var data = getWeak(key); if(data === true)return uncaughtFrozenStore(this).has(key); return data && $has(data, this._i); } }); return C; }, def: function(that, key, value){ var data = getWeak(anObject(key), true); if(data === true)uncaughtFrozenStore(that).set(key, value); else data[that._i] = value; return that; }, ufstore: uncaughtFrozenStore }; /***/ }, /* 389 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $defineProperty = __webpack_require__(19) , createDesc = __webpack_require__(69); module.exports = function(object, index, value){ if(index in object)$defineProperty.f(object, index, createDesc(0, value)); else object[index] = value; }; /***/ }, /* 390 */ /***/ function(module, exports, __webpack_require__) { module.exports = !__webpack_require__(24) && !__webpack_require__(9)(function(){ return Object.defineProperty(__webpack_require__(236)('div'), 'a', {get: function(){ return 7; }}).a != 7; }); /***/ }, /* 391 */ /***/ function(module, exports) { // fast apply, http://jsperf.lnkit.com/fast-apply/5 module.exports = function(fn, args, that){ var un = that === undefined; switch(args.length){ case 0: return un ? fn() : fn.call(that); case 1: return un ? fn(args[0]) : fn.call(that, args[0]); case 2: return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); case 3: return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); case 4: return un ? fn(args[0], args[1], args[2], args[3]) : fn.call(that, args[0], args[1], args[2], args[3]); } return fn.apply(that, args); }; /***/ }, /* 392 */ /***/ function(module, exports, __webpack_require__) { // call something on iterator step with safe closing on error var anObject = __webpack_require__(6); module.exports = function(iterator, fn, value, entries){ try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch(e){ var ret = iterator['return']; if(ret !== undefined)anObject(ret.call(iterator)); throw e; } }; /***/ }, /* 393 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var create = __webpack_require__(82) , descriptor = __webpack_require__(69) , setToStringTag = __webpack_require__(101) , IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() __webpack_require__(37)(IteratorPrototype, __webpack_require__(13)('iterator'), function(){ return this; }); module.exports = function(Constructor, NAME, next){ Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); setToStringTag(Constructor, NAME + ' Iterator'); }; /***/ }, /* 394 */ /***/ function(module, exports) { module.exports = function(done, value){ return {value: value, done: !!done}; }; /***/ }, /* 395 */ /***/ function(module, exports) { // 20.2.2.20 Math.log1p(x) module.exports = Math.log1p || function log1p(x){ return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); }; /***/ }, /* 396 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 19.1.2.1 Object.assign(target, source, ...) var getKeys = __webpack_require__(98) , gOPS = __webpack_require__(153) , pIE = __webpack_require__(154) , toObject = __webpack_require__(39) , IObject = __webpack_require__(112) , $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) module.exports = !$assign || __webpack_require__(9)(function(){ var A = {} , B = {} , S = Symbol() , K = 'abcdefghijklmnopqrst'; A[S] = 7; K.split('').forEach(function(k){ B[k] = k; }); return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; }) ? function assign(target, source){ // eslint-disable-line no-unused-vars var T = toObject(target) , aLen = arguments.length , index = 1 , getSymbols = gOPS.f , isEnum = pIE.f; while(aLen > index){ var S = IObject(arguments[index++]) , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) , length = keys.length , j = 0 , key; while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; } return T; } : $assign; /***/ }, /* 397 */ /***/ function(module, exports, __webpack_require__) { var dP = __webpack_require__(19) , anObject = __webpack_require__(6) , getKeys = __webpack_require__(98); module.exports = __webpack_require__(24) ? Object.defineProperties : function defineProperties(O, Properties){ anObject(O); var keys = getKeys(Properties) , length = keys.length , i = 0 , P; while(length > i)dP.f(O, P = keys[i++], Properties[P]); return O; }; /***/ }, /* 398 */ /***/ function(module, exports, __webpack_require__) { // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window var toIObject = __webpack_require__(41) , gOPN = __webpack_require__(83).f , toString = {}.toString; var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; var getWindowNames = function(it){ try { return gOPN(it); } catch(e){ return windowNames.slice(); } }; module.exports.f = function getOwnPropertyNames(it){ return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); }; /***/ }, /* 399 */ /***/ function(module, exports, __webpack_require__) { var has = __webpack_require__(28) , toIObject = __webpack_require__(41) , arrayIndexOf = __webpack_require__(235)(false) , IE_PROTO = __webpack_require__(249)('IE_PROTO'); module.exports = function(object, names){ var O = toIObject(object) , i = 0 , result = [] , key; for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); // Don't enum bug & hidden keys while(names.length > i)if(has(O, key = names[i++])){ ~arrayIndexOf(result, key) || result.push(key); } return result; }; /***/ }, /* 400 */ /***/ function(module, exports, __webpack_require__) { var $parseFloat = __webpack_require__(15).parseFloat , $trim = __webpack_require__(157).trim; module.exports = 1 / $parseFloat(__webpack_require__(252) + '-0') !== -Infinity ? function parseFloat(str){ var string = $trim(String(str), 3) , result = $parseFloat(string); return result === 0 && string.charAt(0) == '-' ? -0 : result; } : $parseFloat; /***/ }, /* 401 */ /***/ function(module, exports, __webpack_require__) { var $parseInt = __webpack_require__(15).parseInt , $trim = __webpack_require__(157).trim , ws = __webpack_require__(252) , hex = /^[\-+]?0[xX]/; module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix){ var string = $trim(String(str), 3); return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); } : $parseInt; /***/ }, /* 402 */ /***/ function(module, exports) { // 7.2.9 SameValue(x, y) module.exports = Object.is || function is(x, y){ return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; }; /***/ }, /* 403 */ /***/ function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(70) , defined = __webpack_require__(55); // true -> String#at // false -> String#codePointAt module.exports = function(TO_STRING){ return function(that, pos){ var s = String(defined(that)) , i = toInteger(pos) , l = s.length , a, b; if(i < 0 || i >= l)return TO_STRING ? '' : undefined; a = s.charCodeAt(i); return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; }; /***/ }, /* 404 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var toInteger = __webpack_require__(70) , defined = __webpack_require__(55); module.exports = function repeat(count){ var str = String(defined(this)) , res = '' , n = toInteger(count); if(n < 0 || n == Infinity)throw RangeError("Count can't be negative"); for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str; return res; }; /***/ }, /* 405 */ /***/ function(module, exports, __webpack_require__) { var ctx = __webpack_require__(54) , invoke = __webpack_require__(391) , html = __webpack_require__(240) , cel = __webpack_require__(236) , global = __webpack_require__(15) , process = global.process , setTask = global.setImmediate , clearTask = global.clearImmediate , MessageChannel = global.MessageChannel , counter = 0 , queue = {} , ONREADYSTATECHANGE = 'onreadystatechange' , defer, channel, port; var run = function(){ var id = +this; if(queue.hasOwnProperty(id)){ var fn = queue[id]; delete queue[id]; fn(); } }; var listener = function(event){ run.call(event.data); }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise: if(!setTask || !clearTask){ setTask = function setImmediate(fn){ var args = [], i = 1; while(arguments.length > i)args.push(arguments[i++]); queue[++counter] = function(){ invoke(typeof fn == 'function' ? fn : Function(fn), args); }; defer(counter); return counter; }; clearTask = function clearImmediate(id){ delete queue[id]; }; // Node.js 0.8- if(__webpack_require__(52)(process) == 'process'){ defer = function(id){ process.nextTick(ctx(run, id, 1)); }; // Browsers with MessageChannel, includes WebWorkers } else if(MessageChannel){ channel = new MessageChannel; port = channel.port2; channel.port1.onmessage = listener; defer = ctx(port.postMessage, port, 1); // Browsers with postMessage, skip WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){ defer = function(id){ global.postMessage(id + '', '*'); }; global.addEventListener('message', listener, false); // IE8- } else if(ONREADYSTATECHANGE in cel('script')){ defer = function(id){ html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){ html.removeChild(this); run.call(id); }; }; // Rest old browsers } else { defer = function(id){ setTimeout(ctx(run, id, 1), 0); }; } } module.exports = { set: setTask, clear: clearTask }; /***/ }, /* 406 */ /***/ function(module, exports, __webpack_require__) { exports.f = __webpack_require__(13); /***/ }, /* 407 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var addToUnscopables = __webpack_require__(109) , step = __webpack_require__(394) , Iterators = __webpack_require__(96) , toIObject = __webpack_require__(41); // 22.1.3.4 Array.prototype.entries() // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() module.exports = __webpack_require__(246)(Array, 'Array', function(iterated, kind){ this._t = toIObject(iterated); // target this._i = 0; // next index this._k = kind; // kind // 22.1.5.2.1 %ArrayIteratorPrototype%.next() }, function(){ var O = this._t , kind = this._k , index = this._i++; if(!O || index >= O.length){ this._t = undefined; return step(1); } if(kind == 'keys' )return step(0, index); if(kind == 'values')return step(0, O[index]); return step(0, [index, O[index]]); }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) Iterators.Arguments = Iterators.Array; addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); /***/ }, /* 408 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var strong = __webpack_require__(387); // 23.1 Map Objects module.exports = __webpack_require__(150)('Map', function(get){ return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.1.3.6 Map.prototype.get(key) get: function get(key){ var entry = strong.getEntry(this, key); return entry && entry.v; }, // 23.1.3.9 Map.prototype.set(key, value) set: function set(key, value){ return strong.def(this, key === 0 ? 0 : key, value); } }, strong, true); /***/ }, /* 409 */ /***/ function(module, exports, __webpack_require__) { // 21.2.5.3 get RegExp.prototype.flags() if(__webpack_require__(24) && /./g.flags != 'g')__webpack_require__(19).f(RegExp.prototype, 'flags', { configurable: true, get: __webpack_require__(239) }); /***/ }, /* 410 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var strong = __webpack_require__(387); // 23.2 Set Objects module.exports = __webpack_require__(150)('Set', function(get){ return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.2.3.1 Set.prototype.add(value) add: function add(value){ return strong.def(this, value = value === 0 ? 0 : value, value); } }, strong); /***/ }, /* 411 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var each = __webpack_require__(43)(0) , redefine = __webpack_require__(38) , meta = __webpack_require__(68) , assign = __webpack_require__(396) , weak = __webpack_require__(388) , isObject = __webpack_require__(11) , has = __webpack_require__(28) , getWeak = meta.getWeak , isExtensible = Object.isExtensible , uncaughtFrozenStore = weak.ufstore , tmp = {} , InternalMap; var wrapper = function(get){ return function WeakMap(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }; var methods = { // 23.3.3.3 WeakMap.prototype.get(key) get: function get(key){ if(isObject(key)){ var data = getWeak(key); if(data === true)return uncaughtFrozenStore(this).get(key); return data ? data[this._i] : undefined; } }, // 23.3.3.5 WeakMap.prototype.set(key, value) set: function set(key, value){ return weak.def(this, key, value); } }; // 23.3 WeakMap Objects var $WeakMap = module.exports = __webpack_require__(150)('WeakMap', wrapper, methods, weak, true, true); // IE11 WeakMap frozen keys fix if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){ InternalMap = weak.getConstructor(wrapper); assign(InternalMap.prototype, methods); meta.NEED = true; each(['delete', 'has', 'get', 'set'], function(key){ var proto = $WeakMap.prototype , method = proto[key]; redefine(proto, key, function(a, b){ // store frozen objects on internal weakmap shim if(isObject(a) && !isExtensible(a)){ if(!this._f)this._f = new InternalMap; var result = this._f[key](a, b); return key == 'set' ? this : result; // store all the rest on native weakmap } return method.call(this, a, b); }); }); } /***/ }, /* 412 */, /* 413 */, /* 414 */, /* 415 */, /* 416 */, /* 417 */, /* 418 */, /* 419 */, /* 420 */, /* 421 */, /* 422 */, /* 423 */, /* 424 */, /* 425 */, /* 426 */, /* 427 */, /* 428 */, /* 429 */, /* 430 */, /* 431 */, /* 432 */, /* 433 */, /* 434 */, /* 435 */, /* 436 */, /* 437 */, /* 438 */, /* 439 */, /* 440 */, /* 441 */, /* 442 */, /* 443 */, /* 444 */, /* 445 */, /* 446 */, /* 447 */, /* 448 */, /* 449 */, /* 450 */, /* 451 */, /* 452 */, /* 453 */, /* 454 */, /* 455 */, /* 456 */, /* 457 */, /* 458 */, /* 459 */, /* 460 */, /* 461 */, /* 462 */, /* 463 */, /* 464 */, /* 465 */, /* 466 */, /* 467 */, /* 468 */, /* 469 */, /* 470 */, /* 471 */, /* 472 */, /* 473 */, /* 474 */, /* 475 */, /* 476 */, /* 477 */, /* 478 */, /* 479 */, /* 480 */, /* 481 */, /* 482 */, /* 483 */, /* 484 */, /* 485 */, /* 486 */, /* 487 */, /* 488 */, /* 489 */, /* 490 */, /* 491 */, /* 492 */, /* 493 */, /* 494 */, /* 495 */, /* 496 */, /* 497 */, /* 498 */, /* 499 */, /* 500 */, /* 501 */, /* 502 */, /* 503 */, /* 504 */, /* 505 */, /* 506 */, /* 507 */, /* 508 */, /* 509 */, /* 510 */, /* 511 */, /* 512 */, /* 513 */, /* 514 */, /* 515 */, /* 516 */, /* 517 */, /* 518 */, /* 519 */, /* 520 */, /* 521 */, /* 522 */, /* 523 */, /* 524 */, /* 525 */, /* 526 */, /* 527 */, /* 528 */, /* 529 */, /* 530 */, /* 531 */, /* 532 */, /* 533 */, /* 534 */, /* 535 */, /* 536 */, /* 537 */, /* 538 */, /* 539 */, /* 540 */, /* 541 */, /* 542 */, /* 543 */, /* 544 */, /* 545 */, /* 546 */, /* 547 */, /* 548 */, /* 549 */, /* 550 */, /* 551 */, /* 552 */, /* 553 */, /* 554 */, /* 555 */, /* 556 */, /* 557 */, /* 558 */, /* 559 */, /* 560 */, /* 561 */, /* 562 */, /* 563 */, /* 564 */, /* 565 */, /* 566 */, /* 567 */, /* 568 */, /* 569 */, /* 570 */, /* 571 */, /* 572 */, /* 573 */, /* 574 */, /* 575 */, /* 576 */, /* 577 */, /* 578 */, /* 579 */, /* 580 */, /* 581 */, /* 582 */, /* 583 */, /* 584 */, /* 585 */, /* 586 */, /* 587 */, /* 588 */, /* 589 */, /* 590 */, /* 591 */, /* 592 */, /* 593 */, /* 594 */, /* 595 */, /* 596 */, /* 597 */, /* 598 */, /* 599 */, /* 600 */, /* 601 */, /* 602 */, /* 603 */, /* 604 */, /* 605 */, /* 606 */, /* 607 */, /* 608 */, /* 609 */, /* 610 */, /* 611 */, /* 612 */, /* 613 */, /* 614 */, /* 615 */, /* 616 */, /* 617 */, /* 618 */, /* 619 */, /* 620 */, /* 621 */, /* 622 */, /* 623 */, /* 624 */, /* 625 */, /* 626 */, /* 627 */, /* 628 */, /* 629 */, /* 630 */, /* 631 */, /* 632 */, /* 633 */, /* 634 */, /* 635 */, /* 636 */, /* 637 */, /* 638 */, /* 639 */, /* 640 */, /* 641 */, /* 642 */, /* 643 */, /* 644 */, /* 645 */, /* 646 */, /* 647 */, /* 648 */, /* 649 */, /* 650 */, /* 651 */, /* 652 */, /* 653 */, /* 654 */, /* 655 */, /* 656 */, /* 657 */, /* 658 */, /* 659 */, /* 660 */, /* 661 */, /* 662 */, /* 663 */, /* 664 */, /* 665 */, /* 666 */, /* 667 */, /* 668 */, /* 669 */, /* 670 */, /* 671 */, /* 672 */, /* 673 */, /* 674 */, /* 675 */, /* 676 */, /* 677 */, /* 678 */, /* 679 */, /* 680 */, /* 681 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(812); __webpack_require__(751); __webpack_require__(753); __webpack_require__(752); __webpack_require__(755); __webpack_require__(757); __webpack_require__(762); __webpack_require__(756); __webpack_require__(754); __webpack_require__(764); __webpack_require__(763); __webpack_require__(759); __webpack_require__(760); __webpack_require__(758); __webpack_require__(750); __webpack_require__(761); __webpack_require__(765); __webpack_require__(766); __webpack_require__(718); __webpack_require__(720); __webpack_require__(719); __webpack_require__(768); __webpack_require__(767); __webpack_require__(738); __webpack_require__(748); __webpack_require__(749); __webpack_require__(739); __webpack_require__(740); __webpack_require__(741); __webpack_require__(742); __webpack_require__(743); __webpack_require__(744); __webpack_require__(745); __webpack_require__(746); __webpack_require__(747); __webpack_require__(721); __webpack_require__(722); __webpack_require__(723); __webpack_require__(724); __webpack_require__(725); __webpack_require__(726); __webpack_require__(727); __webpack_require__(728); __webpack_require__(729); __webpack_require__(730); __webpack_require__(731); __webpack_require__(732); __webpack_require__(733); __webpack_require__(734); __webpack_require__(735); __webpack_require__(736); __webpack_require__(737); __webpack_require__(799); __webpack_require__(804); __webpack_require__(811); __webpack_require__(802); __webpack_require__(794); __webpack_require__(795); __webpack_require__(800); __webpack_require__(805); __webpack_require__(807); __webpack_require__(790); __webpack_require__(791); __webpack_require__(792); __webpack_require__(793); __webpack_require__(796); __webpack_require__(797); __webpack_require__(798); __webpack_require__(801); __webpack_require__(803); __webpack_require__(806); __webpack_require__(808); __webpack_require__(809); __webpack_require__(810); __webpack_require__(713); __webpack_require__(715); __webpack_require__(714); __webpack_require__(717); __webpack_require__(716); __webpack_require__(702); __webpack_require__(700); __webpack_require__(706); __webpack_require__(703); __webpack_require__(709); __webpack_require__(711); __webpack_require__(699); __webpack_require__(705); __webpack_require__(696); __webpack_require__(710); __webpack_require__(694); __webpack_require__(708); __webpack_require__(707); __webpack_require__(701); __webpack_require__(704); __webpack_require__(693); __webpack_require__(695); __webpack_require__(698); __webpack_require__(697); __webpack_require__(712); __webpack_require__(407); __webpack_require__(784); __webpack_require__(789); __webpack_require__(409); __webpack_require__(785); __webpack_require__(786); __webpack_require__(787); __webpack_require__(788); __webpack_require__(769); __webpack_require__(408); __webpack_require__(410); __webpack_require__(411); __webpack_require__(824); __webpack_require__(813); __webpack_require__(814); __webpack_require__(819); __webpack_require__(822); __webpack_require__(823); __webpack_require__(817); __webpack_require__(820); __webpack_require__(818); __webpack_require__(821); __webpack_require__(815); __webpack_require__(816); __webpack_require__(770); __webpack_require__(771); __webpack_require__(772); __webpack_require__(773); __webpack_require__(774); __webpack_require__(777); __webpack_require__(775); __webpack_require__(776); __webpack_require__(778); __webpack_require__(779); __webpack_require__(780); __webpack_require__(781); __webpack_require__(783); __webpack_require__(782); module.exports = __webpack_require__(53); /***/ }, /* 682 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(825); __webpack_require__(826); __webpack_require__(828); __webpack_require__(827); __webpack_require__(830); __webpack_require__(829); __webpack_require__(831); __webpack_require__(832); __webpack_require__(833); module.exports = __webpack_require__(53).Reflect; /***/ }, /* 683 */ /***/ function(module, exports, __webpack_require__) { var forOf = __webpack_require__(111); module.exports = function(iter, ITERATOR){ var result = []; forOf(iter, false, result.push, result, ITERATOR); return result; }; /***/ }, /* 684 */ /***/ function(module, exports, __webpack_require__) { var isObject = __webpack_require__(11) , isArray = __webpack_require__(243) , SPECIES = __webpack_require__(13)('species'); module.exports = function(original){ var C; if(isArray(original)){ C = original.constructor; // cross-realm fallback if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined; if(isObject(C)){ C = C[SPECIES]; if(C === null)C = undefined; } } return C === undefined ? Array : C; }; /***/ }, /* 685 */ /***/ function(module, exports, __webpack_require__) { // 9.4.2.3 ArraySpeciesCreate(originalArray, length) var speciesConstructor = __webpack_require__(684); module.exports = function(original, length){ return new (speciesConstructor(original))(length); }; /***/ }, /* 686 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var anObject = __webpack_require__(6) , toPrimitive = __webpack_require__(71) , NUMBER = 'number'; module.exports = function(hint){ if(hint !== 'string' && hint !== NUMBER && hint !== 'default')throw TypeError('Incorrect hint'); return toPrimitive(anObject(this), hint != NUMBER); }; /***/ }, /* 687 */ /***/ function(module, exports, __webpack_require__) { // all enumerable object keys, includes symbols var getKeys = __webpack_require__(98) , gOPS = __webpack_require__(153) , pIE = __webpack_require__(154); module.exports = function(it){ var result = getKeys(it) , getSymbols = gOPS.f; if(getSymbols){ var symbols = getSymbols(it) , isEnum = pIE.f , i = 0 , key; while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key); } return result; }; /***/ }, /* 688 */ /***/ function(module, exports, __webpack_require__) { var getKeys = __webpack_require__(98) , toIObject = __webpack_require__(41); module.exports = function(object, el){ var O = toIObject(object) , keys = getKeys(O) , length = keys.length , index = 0 , key; while(length > index)if(O[key = keys[index++]] === el)return key; }; /***/ }, /* 689 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(15) , macrotask = __webpack_require__(405).set , Observer = global.MutationObserver || global.WebKitMutationObserver , process = global.process , Promise = global.Promise , isNode = __webpack_require__(52)(process) == 'process'; module.exports = function(){ var head, last, notify; var flush = function(){ var parent, fn; if(isNode && (parent = process.domain))parent.exit(); while(head){ fn = head.fn; head = head.next; try { fn(); } catch(e){ if(head)notify(); else last = undefined; throw e; } } last = undefined; if(parent)parent.enter(); }; // Node.js if(isNode){ notify = function(){ process.nextTick(flush); }; // browsers with MutationObserver } else if(Observer){ var toggle = true , node = document.createTextNode(''); new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new notify = function(){ node.data = toggle = !toggle; }; // environments with maybe non-completely correct, but existent Promise } else if(Promise && Promise.resolve){ var promise = Promise.resolve(); notify = function(){ promise.then(flush); }; // for other environments - macrotask based on: // - setImmediate // - MessageChannel // - window.postMessag // - onreadystatechange // - setTimeout } else { notify = function(){ // strange IE + webpack dev server bug - use .call(global) macrotask.call(global, flush); }; } return function(fn){ var task = {fn: fn, next: undefined}; if(last)last.next = task; if(!head){ head = task; notify(); } last = task; }; }; /***/ }, /* 690 */ /***/ function(module, exports, __webpack_require__) { // all object keys, includes non-enumerable and symbols var gOPN = __webpack_require__(83) , gOPS = __webpack_require__(153) , anObject = __webpack_require__(6) , Reflect = __webpack_require__(15).Reflect; module.exports = Reflect && Reflect.ownKeys || function ownKeys(it){ var keys = gOPN.f(anObject(it)) , getSymbols = gOPS.f; return getSymbols ? keys.concat(getSymbols(it)) : keys; }; /***/ }, /* 691 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(15) , core = __webpack_require__(53) , LIBRARY = __webpack_require__(97) , wksExt = __webpack_require__(406) , defineProperty = __webpack_require__(19).f; module.exports = function(name){ var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)}); }; /***/ }, /* 692 */ /***/ function(module, exports, __webpack_require__) { var classof = __webpack_require__(110) , ITERATOR = __webpack_require__(13)('iterator') , Iterators = __webpack_require__(96); module.exports = __webpack_require__(53).isIterable = function(it){ var O = Object(it); return O[ITERATOR] !== undefined || '@@iterator' in O || Iterators.hasOwnProperty(classof(O)); }; /***/ }, /* 693 */ /***/ function(module, exports, __webpack_require__) { // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) var $export = __webpack_require__(2); $export($export.P, 'Array', {copyWithin: __webpack_require__(384)}); __webpack_require__(109)('copyWithin'); /***/ }, /* 694 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(2) , $every = __webpack_require__(43)(4); $export($export.P + $export.F * !__webpack_require__(40)([].every, true), 'Array', { // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) every: function every(callbackfn /* , thisArg */){ return $every(this, callbackfn, arguments[1]); } }); /***/ }, /* 695 */ /***/ function(module, exports, __webpack_require__) { // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) var $export = __webpack_require__(2); $export($export.P, 'Array', {fill: __webpack_require__(234)}); __webpack_require__(109)('fill'); /***/ }, /* 696 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(2) , $filter = __webpack_require__(43)(2); $export($export.P + $export.F * !__webpack_require__(40)([].filter, true), 'Array', { // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) filter: function filter(callbackfn /* , thisArg */){ return $filter(this, callbackfn, arguments[1]); } }); /***/ }, /* 697 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) var $export = __webpack_require__(2) , $find = __webpack_require__(43)(6) , KEY = 'findIndex' , forced = true; // Shouldn't skip holes if(KEY in [])Array(1)[KEY](function(){ forced = false; }); $export($export.P + $export.F * forced, 'Array', { findIndex: function findIndex(callbackfn/*, that = undefined */){ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); __webpack_require__(109)(KEY); /***/ }, /* 698 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) var $export = __webpack_require__(2) , $find = __webpack_require__(43)(5) , KEY = 'find' , forced = true; // Shouldn't skip holes if(KEY in [])Array(1)[KEY](function(){ forced = false; }); $export($export.P + $export.F * forced, 'Array', { find: function find(callbackfn/*, that = undefined */){ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); __webpack_require__(109)(KEY); /***/ }, /* 699 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(2) , $forEach = __webpack_require__(43)(0) , STRICT = __webpack_require__(40)([].forEach, true); $export($export.P + $export.F * !STRICT, 'Array', { // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) forEach: function forEach(callbackfn /* , thisArg */){ return $forEach(this, callbackfn, arguments[1]); } }); /***/ }, /* 700 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var ctx = __webpack_require__(54) , $export = __webpack_require__(2) , toObject = __webpack_require__(39) , call = __webpack_require__(392) , isArrayIter = __webpack_require__(242) , toLength = __webpack_require__(29) , createProperty = __webpack_require__(389) , getIterFn = __webpack_require__(254); $export($export.S + $export.F * !__webpack_require__(152)(function(iter){ Array.from(iter); }), 'Array', { // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){ var O = toObject(arrayLike) , C = typeof this == 'function' ? this : Array , aLen = arguments.length , mapfn = aLen > 1 ? arguments[1] : undefined , mapping = mapfn !== undefined , index = 0 , iterFn = getIterFn(O) , length, result, step, iterator; if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); // if object isn't iterable or it's array with default iterator - use simple case if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){ for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){ createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); } } else { length = toLength(O.length); for(result = new C(length); length > index; index++){ createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); } } result.length = index; return result; } }); /***/ }, /* 701 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(2) , $indexOf = __webpack_require__(235)(false) , $native = [].indexOf , NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(40)($native)), 'Array', { // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) indexOf: function indexOf(searchElement /*, fromIndex = 0 */){ return NEGATIVE_ZERO // convert -0 to +0 ? $native.apply(this, arguments) || 0 : $indexOf(this, searchElement, arguments[1]); } }); /***/ }, /* 702 */ /***/ function(module, exports, __webpack_require__) { // 22.1.2.2 / 15.4.3.2 Array.isArray(arg) var $export = __webpack_require__(2); $export($export.S, 'Array', {isArray: __webpack_require__(243)}); /***/ }, /* 703 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 22.1.3.13 Array.prototype.join(separator) var $export = __webpack_require__(2) , toIObject = __webpack_require__(41) , arrayJoin = [].join; // fallback for not array-like strings $export($export.P + $export.F * (__webpack_require__(112) != Object || !__webpack_require__(40)(arrayJoin)), 'Array', { join: function join(separator){ return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); } }); /***/ }, /* 704 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(2) , toIObject = __webpack_require__(41) , toInteger = __webpack_require__(70) , toLength = __webpack_require__(29) , $native = [].lastIndexOf , NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(40)($native)), 'Array', { // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */){ // convert -0 to +0 if(NEGATIVE_ZERO)return $native.apply(this, arguments) || 0; var O = toIObject(this) , length = toLength(O.length) , index = length - 1; if(arguments.length > 1)index = Math.min(index, toInteger(arguments[1])); if(index < 0)index = length + index; for(;index >= 0; index--)if(index in O)if(O[index] === searchElement)return index || 0; return -1; } }); /***/ }, /* 705 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(2) , $map = __webpack_require__(43)(1); $export($export.P + $export.F * !__webpack_require__(40)([].map, true), 'Array', { // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) map: function map(callbackfn /* , thisArg */){ return $map(this, callbackfn, arguments[1]); } }); /***/ }, /* 706 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(2) , createProperty = __webpack_require__(389); // WebKit Array.of isn't generic $export($export.S + $export.F * __webpack_require__(9)(function(){ function F(){} return !(Array.of.call(F) instanceof F); }), 'Array', { // 22.1.2.3 Array.of( ...items) of: function of(/* ...args */){ var index = 0 , aLen = arguments.length , result = new (typeof this == 'function' ? this : Array)(aLen); while(aLen > index)createProperty(result, index, arguments[index++]); result.length = aLen; return result; } }); /***/ }, /* 707 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(2) , $reduce = __webpack_require__(385); $export($export.P + $export.F * !__webpack_require__(40)([].reduceRight, true), 'Array', { // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) reduceRight: function reduceRight(callbackfn /* , initialValue */){ return $reduce(this, callbackfn, arguments.length, arguments[1], true); } }); /***/ }, /* 708 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(2) , $reduce = __webpack_require__(385); $export($export.P + $export.F * !__webpack_require__(40)([].reduce, true), 'Array', { // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) reduce: function reduce(callbackfn /* , initialValue */){ return $reduce(this, callbackfn, arguments.length, arguments[1], false); } }); /***/ }, /* 709 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(2) , html = __webpack_require__(240) , cof = __webpack_require__(52) , toIndex = __webpack_require__(84) , toLength = __webpack_require__(29) , arraySlice = [].slice; // fallback for not array-like ES3 strings and DOM objects $export($export.P + $export.F * __webpack_require__(9)(function(){ if(html)arraySlice.call(html); }), 'Array', { slice: function slice(begin, end){ var len = toLength(this.length) , klass = cof(this); end = end === undefined ? len : end; if(klass == 'Array')return arraySlice.call(this, begin, end); var start = toIndex(begin, len) , upTo = toIndex(end, len) , size = toLength(upTo - start) , cloned = Array(size) , i = 0; for(; i < size; i++)cloned[i] = klass == 'String' ? this.charAt(start + i) : this[start + i]; return cloned; } }); /***/ }, /* 710 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(2) , $some = __webpack_require__(43)(3); $export($export.P + $export.F * !__webpack_require__(40)([].some, true), 'Array', { // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) some: function some(callbackfn /* , thisArg */){ return $some(this, callbackfn, arguments[1]); } }); /***/ }, /* 711 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(2) , aFunction = __webpack_require__(51) , toObject = __webpack_require__(39) , fails = __webpack_require__(9) , $sort = [].sort , test = [1, 2, 3]; $export($export.P + $export.F * (fails(function(){ // IE8- test.sort(undefined); }) || !fails(function(){ // V8 bug test.sort(null); // Old WebKit }) || !__webpack_require__(40)($sort)), 'Array', { // 22.1.3.25 Array.prototype.sort(comparefn) sort: function sort(comparefn){ return comparefn === undefined ? $sort.call(toObject(this)) : $sort.call(toObject(this), aFunction(comparefn)); } }); /***/ }, /* 712 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(100)('Array'); /***/ }, /* 713 */ /***/ function(module, exports, __webpack_require__) { // 20.3.3.1 / 15.9.4.4 Date.now() var $export = __webpack_require__(2); $export($export.S, 'Date', {now: function(){ return new Date().getTime(); }}); /***/ }, /* 714 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() var $export = __webpack_require__(2) , fails = __webpack_require__(9) , getTime = Date.prototype.getTime; var lz = function(num){ return num > 9 ? num : '0' + num; }; // PhantomJS / old WebKit has a broken implementations $export($export.P + $export.F * (fails(function(){ return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z'; }) || !fails(function(){ new Date(NaN).toISOString(); })), 'Date', { toISOString: function toISOString(){ if(!isFinite(getTime.call(this)))throw RangeError('Invalid time value'); var d = this , y = d.getUTCFullYear() , m = d.getUTCMilliseconds() , s = y < 0 ? '-' : y > 9999 ? '+' : ''; return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; } }); /***/ }, /* 715 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(2) , toObject = __webpack_require__(39) , toPrimitive = __webpack_require__(71); $export($export.P + $export.F * __webpack_require__(9)(function(){ return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({toISOString: function(){ return 1; }}) !== 1; }), 'Date', { toJSON: function toJSON(key){ var O = toObject(this) , pv = toPrimitive(O); return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); } }); /***/ }, /* 716 */ /***/ function(module, exports, __webpack_require__) { var TO_PRIMITIVE = __webpack_require__(13)('toPrimitive') , proto = Date.prototype; if(!(TO_PRIMITIVE in proto))__webpack_require__(37)(proto, TO_PRIMITIVE, __webpack_require__(686)); /***/ }, /* 717 */ /***/ function(module, exports, __webpack_require__) { var DateProto = Date.prototype , INVALID_DATE = 'Invalid Date' , TO_STRING = 'toString' , $toString = DateProto[TO_STRING] , getTime = DateProto.getTime; if(new Date(NaN) + '' != INVALID_DATE){ __webpack_require__(38)(DateProto, TO_STRING, function toString(){ var value = getTime.call(this); return value === value ? $toString.call(this) : INVALID_DATE; }); } /***/ }, /* 718 */ /***/ function(module, exports, __webpack_require__) { // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) var $export = __webpack_require__(2); $export($export.P, 'Function', {bind: __webpack_require__(386)}); /***/ }, /* 719 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var isObject = __webpack_require__(11) , getPrototypeOf = __webpack_require__(44) , HAS_INSTANCE = __webpack_require__(13)('hasInstance') , FunctionProto = Function.prototype; // 19.2.3.6 Function.prototype[@@hasInstance](V) if(!(HAS_INSTANCE in FunctionProto))__webpack_require__(19).f(FunctionProto, HAS_INSTANCE, {value: function(O){ if(typeof this != 'function' || !isObject(O))return false; if(!isObject(this.prototype))return O instanceof this; // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: while(O = getPrototypeOf(O))if(this.prototype === O)return true; return false; }}); /***/ }, /* 720 */ /***/ function(module, exports, __webpack_require__) { var dP = __webpack_require__(19).f , createDesc = __webpack_require__(69) , has = __webpack_require__(28) , FProto = Function.prototype , nameRE = /^\s*function ([^ (]*)/ , NAME = 'name'; var isExtensible = Object.isExtensible || function(){ return true; }; // 19.2.4.2 name NAME in FProto || __webpack_require__(24) && dP(FProto, NAME, { configurable: true, get: function(){ try { var that = this , name = ('' + that).match(nameRE)[1]; has(that, NAME) || !isExtensible(that) || dP(that, NAME, createDesc(5, name)); return name; } catch(e){ return ''; } } }); /***/ }, /* 721 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.3 Math.acosh(x) var $export = __webpack_require__(2) , log1p = __webpack_require__(395) , sqrt = Math.sqrt , $acosh = Math.acosh; $export($export.S + $export.F * !($acosh // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 && Math.floor($acosh(Number.MAX_VALUE)) == 710 // Tor Browser bug: Math.acosh(Infinity) -> NaN && $acosh(Infinity) == Infinity ), 'Math', { acosh: function acosh(x){ return (x = +x) < 1 ? NaN : x > 94906265.62425156 ? Math.log(x) + Math.LN2 : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); } }); /***/ }, /* 722 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.5 Math.asinh(x) var $export = __webpack_require__(2) , $asinh = Math.asinh; function asinh(x){ return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); } // Tor Browser bug: Math.asinh(0) -> -0 $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', {asinh: asinh}); /***/ }, /* 723 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.7 Math.atanh(x) var $export = __webpack_require__(2) , $atanh = Math.atanh; // Tor Browser bug: Math.atanh(-0) -> 0 $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { atanh: function atanh(x){ return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; } }); /***/ }, /* 724 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.9 Math.cbrt(x) var $export = __webpack_require__(2) , sign = __webpack_require__(248); $export($export.S, 'Math', { cbrt: function cbrt(x){ return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); } }); /***/ }, /* 725 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.11 Math.clz32(x) var $export = __webpack_require__(2); $export($export.S, 'Math', { clz32: function clz32(x){ return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; } }); /***/ }, /* 726 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.12 Math.cosh(x) var $export = __webpack_require__(2) , exp = Math.exp; $export($export.S, 'Math', { cosh: function cosh(x){ return (exp(x = +x) + exp(-x)) / 2; } }); /***/ }, /* 727 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.14 Math.expm1(x) var $export = __webpack_require__(2) , $expm1 = __webpack_require__(247); $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', {expm1: $expm1}); /***/ }, /* 728 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.16 Math.fround(x) var $export = __webpack_require__(2) , sign = __webpack_require__(248) , pow = Math.pow , EPSILON = pow(2, -52) , EPSILON32 = pow(2, -23) , MAX32 = pow(2, 127) * (2 - EPSILON32) , MIN32 = pow(2, -126); var roundTiesToEven = function(n){ return n + 1 / EPSILON - 1 / EPSILON; }; $export($export.S, 'Math', { fround: function fround(x){ var $abs = Math.abs(x) , $sign = sign(x) , a, result; if($abs < MIN32)return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; a = (1 + EPSILON32 / EPSILON) * $abs; result = a - (a - $abs); if(result > MAX32 || result != result)return $sign * Infinity; return $sign * result; } }); /***/ }, /* 729 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) var $export = __webpack_require__(2) , abs = Math.abs; $export($export.S, 'Math', { hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars var sum = 0 , i = 0 , aLen = arguments.length , larg = 0 , arg, div; while(i < aLen){ arg = abs(arguments[i++]); if(larg < arg){ div = larg / arg; sum = sum * div * div + 1; larg = arg; } else if(arg > 0){ div = arg / larg; sum += div * div; } else sum += arg; } return larg === Infinity ? Infinity : larg * Math.sqrt(sum); } }); /***/ }, /* 730 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.18 Math.imul(x, y) var $export = __webpack_require__(2) , $imul = Math.imul; // some WebKit versions fails with big numbers, some has wrong arity $export($export.S + $export.F * __webpack_require__(9)(function(){ return $imul(0xffffffff, 5) != -5 || $imul.length != 2; }), 'Math', { imul: function imul(x, y){ var UINT16 = 0xffff , xn = +x , yn = +y , xl = UINT16 & xn , yl = UINT16 & yn; return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); } }); /***/ }, /* 731 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.21 Math.log10(x) var $export = __webpack_require__(2); $export($export.S, 'Math', { log10: function log10(x){ return Math.log(x) / Math.LN10; } }); /***/ }, /* 732 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.20 Math.log1p(x) var $export = __webpack_require__(2); $export($export.S, 'Math', {log1p: __webpack_require__(395)}); /***/ }, /* 733 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.22 Math.log2(x) var $export = __webpack_require__(2); $export($export.S, 'Math', { log2: function log2(x){ return Math.log(x) / Math.LN2; } }); /***/ }, /* 734 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.28 Math.sign(x) var $export = __webpack_require__(2); $export($export.S, 'Math', {sign: __webpack_require__(248)}); /***/ }, /* 735 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.30 Math.sinh(x) var $export = __webpack_require__(2) , expm1 = __webpack_require__(247) , exp = Math.exp; // V8 near Chromium 38 has a problem with very small numbers $export($export.S + $export.F * __webpack_require__(9)(function(){ return !Math.sinh(-2e-17) != -2e-17; }), 'Math', { sinh: function sinh(x){ return Math.abs(x = +x) < 1 ? (expm1(x) - expm1(-x)) / 2 : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); } }); /***/ }, /* 736 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.33 Math.tanh(x) var $export = __webpack_require__(2) , expm1 = __webpack_require__(247) , exp = Math.exp; $export($export.S, 'Math', { tanh: function tanh(x){ var a = expm1(x = +x) , b = expm1(-x); return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); } }); /***/ }, /* 737 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.34 Math.trunc(x) var $export = __webpack_require__(2); $export($export.S, 'Math', { trunc: function trunc(it){ return (it > 0 ? Math.floor : Math.ceil)(it); } }); /***/ }, /* 738 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var global = __webpack_require__(15) , has = __webpack_require__(28) , cof = __webpack_require__(52) , inheritIfRequired = __webpack_require__(241) , toPrimitive = __webpack_require__(71) , fails = __webpack_require__(9) , gOPN = __webpack_require__(83).f , gOPD = __webpack_require__(57).f , dP = __webpack_require__(19).f , $trim = __webpack_require__(157).trim , NUMBER = 'Number' , $Number = global[NUMBER] , Base = $Number , proto = $Number.prototype // Opera ~12 has broken Object#toString , BROKEN_COF = cof(__webpack_require__(82)(proto)) == NUMBER , TRIM = 'trim' in String.prototype; // 7.1.3 ToNumber(argument) var toNumber = function(argument){ var it = toPrimitive(argument, false); if(typeof it == 'string' && it.length > 2){ it = TRIM ? it.trim() : $trim(it, 3); var first = it.charCodeAt(0) , third, radix, maxCode; if(first === 43 || first === 45){ third = it.charCodeAt(2); if(third === 88 || third === 120)return NaN; // Number('+0x1') should be NaN, old V8 fix } else if(first === 48){ switch(it.charCodeAt(1)){ case 66 : case 98 : radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i case 79 : case 111 : radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i default : return +it; } for(var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++){ code = digits.charCodeAt(i); // parseInt parses a string to a first unavailable symbol // but ToNumber should return NaN if a string contains unavailable symbols if(code < 48 || code > maxCode)return NaN; } return parseInt(digits, radix); } } return +it; }; if(!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')){ $Number = function Number(value){ var it = arguments.length < 1 ? 0 : value , that = this; return that instanceof $Number // check on 1..constructor(foo) case && (BROKEN_COF ? fails(function(){ proto.valueOf.call(that); }) : cof(that) != NUMBER) ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); }; for(var keys = __webpack_require__(24) ? gOPN(Base) : ( // ES3: 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + // ES6 (in case, if modules with ES6 Number statics required before): 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' ).split(','), j = 0, key; keys.length > j; j++){ if(has(Base, key = keys[j]) && !has($Number, key)){ dP($Number, key, gOPD(Base, key)); } } $Number.prototype = proto; proto.constructor = $Number; __webpack_require__(38)(global, NUMBER, $Number); } /***/ }, /* 739 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.1 Number.EPSILON var $export = __webpack_require__(2); $export($export.S, 'Number', {EPSILON: Math.pow(2, -52)}); /***/ }, /* 740 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.2 Number.isFinite(number) var $export = __webpack_require__(2) , _isFinite = __webpack_require__(15).isFinite; $export($export.S, 'Number', { isFinite: function isFinite(it){ return typeof it == 'number' && _isFinite(it); } }); /***/ }, /* 741 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.3 Number.isInteger(number) var $export = __webpack_require__(2); $export($export.S, 'Number', {isInteger: __webpack_require__(244)}); /***/ }, /* 742 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.4 Number.isNaN(number) var $export = __webpack_require__(2); $export($export.S, 'Number', { isNaN: function isNaN(number){ return number != number; } }); /***/ }, /* 743 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.5 Number.isSafeInteger(number) var $export = __webpack_require__(2) , isInteger = __webpack_require__(244) , abs = Math.abs; $export($export.S, 'Number', { isSafeInteger: function isSafeInteger(number){ return isInteger(number) && abs(number) <= 0x1fffffffffffff; } }); /***/ }, /* 744 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.6 Number.MAX_SAFE_INTEGER var $export = __webpack_require__(2); $export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff}); /***/ }, /* 745 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.10 Number.MIN_SAFE_INTEGER var $export = __webpack_require__(2); $export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff}); /***/ }, /* 746 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(2) , $parseFloat = __webpack_require__(400); // 20.1.2.12 Number.parseFloat(string) $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', {parseFloat: $parseFloat}); /***/ }, /* 747 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(2) , $parseInt = __webpack_require__(401); // 20.1.2.13 Number.parseInt(string, radix) $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', {parseInt: $parseInt}); /***/ }, /* 748 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(2) , anInstance = __webpack_require__(81) , toInteger = __webpack_require__(70) , aNumberValue = __webpack_require__(383) , repeat = __webpack_require__(404) , $toFixed = 1..toFixed , floor = Math.floor , data = [0, 0, 0, 0, 0, 0] , ERROR = 'Number.toFixed: incorrect invocation!' , ZERO = '0'; var multiply = function(n, c){ var i = -1 , c2 = c; while(++i < 6){ c2 += n * data[i]; data[i] = c2 % 1e7; c2 = floor(c2 / 1e7); } }; var divide = function(n){ var i = 6 , c = 0; while(--i >= 0){ c += data[i]; data[i] = floor(c / n); c = (c % n) * 1e7; } }; var numToString = function(){ var i = 6 , s = ''; while(--i >= 0){ if(s !== '' || i === 0 || data[i] !== 0){ var t = String(data[i]); s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; } } return s; }; var pow = function(x, n, acc){ return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); }; var log = function(x){ var n = 0 , x2 = x; while(x2 >= 4096){ n += 12; x2 /= 4096; } while(x2 >= 2){ n += 1; x2 /= 2; } return n; }; $export($export.P + $export.F * (!!$toFixed && ( 0.00008.toFixed(3) !== '0.000' || 0.9.toFixed(0) !== '1' || 1.255.toFixed(2) !== '1.25' || 1000000000000000128..toFixed(0) !== '1000000000000000128' ) || !__webpack_require__(9)(function(){ // V8 ~ Android 4.3- $toFixed.call({}); })), 'Number', { toFixed: function toFixed(fractionDigits){ var x = aNumberValue(this, ERROR) , f = toInteger(fractionDigits) , s = '' , m = ZERO , e, z, j, k; if(f < 0 || f > 20)throw RangeError(ERROR); if(x != x)return 'NaN'; if(x <= -1e21 || x >= 1e21)return String(x); if(x < 0){ s = '-'; x = -x; } if(x > 1e-21){ e = log(x * pow(2, 69, 1)) - 69; z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); z *= 0x10000000000000; e = 52 - e; if(e > 0){ multiply(0, z); j = f; while(j >= 7){ multiply(1e7, 0); j -= 7; } multiply(pow(10, j, 1), 0); j = e - 1; while(j >= 23){ divide(1 << 23); j -= 23; } divide(1 << j); multiply(1, 1); divide(2); m = numToString(); } else { multiply(0, z); multiply(1 << -e, 0); m = numToString() + repeat.call(ZERO, f); } } if(f > 0){ k = m.length; m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); } else { m = s + m; } return m; } }); /***/ }, /* 749 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(2) , $fails = __webpack_require__(9) , aNumberValue = __webpack_require__(383) , $toPrecision = 1..toPrecision; $export($export.P + $export.F * ($fails(function(){ // IE7- return $toPrecision.call(1, undefined) !== '1'; }) || !$fails(function(){ // V8 ~ Android 4.3- $toPrecision.call({}); })), 'Number', { toPrecision: function toPrecision(precision){ var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); } }); /***/ }, /* 750 */ /***/ function(module, exports, __webpack_require__) { // 19.1.3.1 Object.assign(target, source) var $export = __webpack_require__(2); $export($export.S + $export.F, 'Object', {assign: __webpack_require__(396)}); /***/ }, /* 751 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(2) // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) $export($export.S, 'Object', {create: __webpack_require__(82)}); /***/ }, /* 752 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(2); // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) $export($export.S + $export.F * !__webpack_require__(24), 'Object', {defineProperties: __webpack_require__(397)}); /***/ }, /* 753 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(2); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) $export($export.S + $export.F * !__webpack_require__(24), 'Object', {defineProperty: __webpack_require__(19).f}); /***/ }, /* 754 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.5 Object.freeze(O) var isObject = __webpack_require__(11) , meta = __webpack_require__(68).onFreeze; __webpack_require__(45)('freeze', function($freeze){ return function freeze(it){ return $freeze && isObject(it) ? $freeze(meta(it)) : it; }; }); /***/ }, /* 755 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) var toIObject = __webpack_require__(41) , $getOwnPropertyDescriptor = __webpack_require__(57).f; __webpack_require__(45)('getOwnPropertyDescriptor', function(){ return function getOwnPropertyDescriptor(it, key){ return $getOwnPropertyDescriptor(toIObject(it), key); }; }); /***/ }, /* 756 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.7 Object.getOwnPropertyNames(O) __webpack_require__(45)('getOwnPropertyNames', function(){ return __webpack_require__(398).f; }); /***/ }, /* 757 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.9 Object.getPrototypeOf(O) var toObject = __webpack_require__(39) , $getPrototypeOf = __webpack_require__(44); __webpack_require__(45)('getPrototypeOf', function(){ return function getPrototypeOf(it){ return $getPrototypeOf(toObject(it)); }; }); /***/ }, /* 758 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.11 Object.isExtensible(O) var isObject = __webpack_require__(11); __webpack_require__(45)('isExtensible', function($isExtensible){ return function isExtensible(it){ return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; }; }); /***/ }, /* 759 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.12 Object.isFrozen(O) var isObject = __webpack_require__(11); __webpack_require__(45)('isFrozen', function($isFrozen){ return function isFrozen(it){ return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; }; }); /***/ }, /* 760 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.13 Object.isSealed(O) var isObject = __webpack_require__(11); __webpack_require__(45)('isSealed', function($isSealed){ return function isSealed(it){ return isObject(it) ? $isSealed ? $isSealed(it) : false : true; }; }); /***/ }, /* 761 */ /***/ function(module, exports, __webpack_require__) { // 19.1.3.10 Object.is(value1, value2) var $export = __webpack_require__(2); $export($export.S, 'Object', {is: __webpack_require__(402)}); /***/ }, /* 762 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.14 Object.keys(O) var toObject = __webpack_require__(39) , $keys = __webpack_require__(98); __webpack_require__(45)('keys', function(){ return function keys(it){ return $keys(toObject(it)); }; }); /***/ }, /* 763 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.15 Object.preventExtensions(O) var isObject = __webpack_require__(11) , meta = __webpack_require__(68).onFreeze; __webpack_require__(45)('preventExtensions', function($preventExtensions){ return function preventExtensions(it){ return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; }; }); /***/ }, /* 764 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.17 Object.seal(O) var isObject = __webpack_require__(11) , meta = __webpack_require__(68).onFreeze; __webpack_require__(45)('seal', function($seal){ return function seal(it){ return $seal && isObject(it) ? $seal(meta(it)) : it; }; }); /***/ }, /* 765 */ /***/ function(module, exports, __webpack_require__) { // 19.1.3.19 Object.setPrototypeOf(O, proto) var $export = __webpack_require__(2); $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(155).set}); /***/ }, /* 766 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 19.1.3.6 Object.prototype.toString() var classof = __webpack_require__(110) , test = {}; test[__webpack_require__(13)('toStringTag')] = 'z'; if(test + '' != '[object z]'){ __webpack_require__(38)(Object.prototype, 'toString', function toString(){ return '[object ' + classof(this) + ']'; }, true); } /***/ }, /* 767 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(2) , $parseFloat = __webpack_require__(400); // 18.2.4 parseFloat(string) $export($export.G + $export.F * (parseFloat != $parseFloat), {parseFloat: $parseFloat}); /***/ }, /* 768 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(2) , $parseInt = __webpack_require__(401); // 18.2.5 parseInt(string, radix) $export($export.G + $export.F * (parseInt != $parseInt), {parseInt: $parseInt}); /***/ }, /* 769 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var LIBRARY = __webpack_require__(97) , global = __webpack_require__(15) , ctx = __webpack_require__(54) , classof = __webpack_require__(110) , $export = __webpack_require__(2) , isObject = __webpack_require__(11) , anObject = __webpack_require__(6) , aFunction = __webpack_require__(51) , anInstance = __webpack_require__(81) , forOf = __webpack_require__(111) , setProto = __webpack_require__(155).set , speciesConstructor = __webpack_require__(250) , task = __webpack_require__(405).set , microtask = __webpack_require__(689)() , PROMISE = 'Promise' , TypeError = global.TypeError , process = global.process , $Promise = global[PROMISE] , process = global.process , isNode = classof(process) == 'process' , empty = function(){ /* empty */ } , Internal, GenericPromiseCapability, Wrapper; var USE_NATIVE = !!function(){ try { // correct subclassing with @@species support var promise = $Promise.resolve(1) , FakePromise = (promise.constructor = {})[__webpack_require__(13)('species')] = function(exec){ exec(empty, empty); }; // unhandled rejections tracking support, NodeJS Promise without it fails @@species test return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; } catch(e){ /* empty */ } }(); // helpers var sameConstructor = function(a, b){ // with library wrapper special case return a === b || a === $Promise && b === Wrapper; }; var isThenable = function(it){ var then; return isObject(it) && typeof (then = it.then) == 'function' ? then : false; }; var newPromiseCapability = function(C){ return sameConstructor($Promise, C) ? new PromiseCapability(C) : new GenericPromiseCapability(C); }; var PromiseCapability = GenericPromiseCapability = function(C){ var resolve, reject; this.promise = new C(function($$resolve, $$reject){ if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor'); resolve = $$resolve; reject = $$reject; }); this.resolve = aFunction(resolve); this.reject = aFunction(reject); }; var perform = function(exec){ try { exec(); } catch(e){ return {error: e}; } }; var notify = function(promise, isReject){ if(promise._n)return; promise._n = true; var chain = promise._c; microtask(function(){ var value = promise._v , ok = promise._s == 1 , i = 0; var run = function(reaction){ var handler = ok ? reaction.ok : reaction.fail , resolve = reaction.resolve , reject = reaction.reject , domain = reaction.domain , result, then; try { if(handler){ if(!ok){ if(promise._h == 2)onHandleUnhandled(promise); promise._h = 1; } if(handler === true)result = value; else { if(domain)domain.enter(); result = handler(value); if(domain)domain.exit(); } if(result === reaction.promise){ reject(TypeError('Promise-chain cycle')); } else if(then = isThenable(result)){ then.call(result, resolve, reject); } else resolve(result); } else reject(value); } catch(e){ reject(e); } }; while(chain.length > i)run(chain[i++]); // variable length - can't use forEach promise._c = []; promise._n = false; if(isReject && !promise._h)onUnhandled(promise); }); }; var onUnhandled = function(promise){ task.call(global, function(){ var value = promise._v , abrupt, handler, console; if(isUnhandled(promise)){ abrupt = perform(function(){ if(isNode){ process.emit('unhandledRejection', value, promise); } else if(handler = global.onunhandledrejection){ handler({promise: promise, reason: value}); } else if((console = global.console) && console.error){ console.error('Unhandled promise rejection', value); } }); // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should promise._h = isNode || isUnhandled(promise) ? 2 : 1; } promise._a = undefined; if(abrupt)throw abrupt.error; }); }; var isUnhandled = function(promise){ if(promise._h == 1)return false; var chain = promise._a || promise._c , i = 0 , reaction; while(chain.length > i){ reaction = chain[i++]; if(reaction.fail || !isUnhandled(reaction.promise))return false; } return true; }; var onHandleUnhandled = function(promise){ task.call(global, function(){ var handler; if(isNode){ process.emit('rejectionHandled', promise); } else if(handler = global.onrejectionhandled){ handler({promise: promise, reason: promise._v}); } }); }; var $reject = function(value){ var promise = this; if(promise._d)return; promise._d = true; promise = promise._w || promise; // unwrap promise._v = value; promise._s = 2; if(!promise._a)promise._a = promise._c.slice(); notify(promise, true); }; var $resolve = function(value){ var promise = this , then; if(promise._d)return; promise._d = true; promise = promise._w || promise; // unwrap try { if(promise === value)throw TypeError("Promise can't be resolved itself"); if(then = isThenable(value)){ microtask(function(){ var wrapper = {_w: promise, _d: false}; // wrap try { then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); } catch(e){ $reject.call(wrapper, e); } }); } else { promise._v = value; promise._s = 1; notify(promise, false); } } catch(e){ $reject.call({_w: promise, _d: false}, e); // wrap } }; // constructor polyfill if(!USE_NATIVE){ // 25.4.3.1 Promise(executor) $Promise = function Promise(executor){ anInstance(this, $Promise, PROMISE, '_h'); aFunction(executor); Internal.call(this); try { executor(ctx($resolve, this, 1), ctx($reject, this, 1)); } catch(err){ $reject.call(this, err); } }; Internal = function Promise(executor){ this._c = []; // <- awaiting reactions this._a = undefined; // <- checked in isUnhandled reactions this._s = 0; // <- state this._d = false; // <- done this._v = undefined; // <- value this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled this._n = false; // <- notify }; Internal.prototype = __webpack_require__(99)($Promise.prototype, { // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) then: function then(onFulfilled, onRejected){ var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; reaction.fail = typeof onRejected == 'function' && onRejected; reaction.domain = isNode ? process.domain : undefined; this._c.push(reaction); if(this._a)this._a.push(reaction); if(this._s)notify(this, false); return reaction.promise; }, // 25.4.5.1 Promise.prototype.catch(onRejected) 'catch': function(onRejected){ return this.then(undefined, onRejected); } }); PromiseCapability = function(){ var promise = new Internal; this.promise = promise; this.resolve = ctx($resolve, promise, 1); this.reject = ctx($reject, promise, 1); }; } $export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise}); __webpack_require__(101)($Promise, PROMISE); __webpack_require__(100)(PROMISE); Wrapper = __webpack_require__(53)[PROMISE]; // statics $export($export.S + $export.F * !USE_NATIVE, PROMISE, { // 25.4.4.5 Promise.reject(r) reject: function reject(r){ var capability = newPromiseCapability(this) , $$reject = capability.reject; $$reject(r); return capability.promise; } }); $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { // 25.4.4.6 Promise.resolve(x) resolve: function resolve(x){ // instanceof instead of internal slot check because we should fix it without replacement native Promise core if(x instanceof $Promise && sameConstructor(x.constructor, this))return x; var capability = newPromiseCapability(this) , $$resolve = capability.resolve; $$resolve(x); return capability.promise; } }); $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(152)(function(iter){ $Promise.all(iter)['catch'](empty); })), PROMISE, { // 25.4.4.1 Promise.all(iterable) all: function all(iterable){ var C = this , capability = newPromiseCapability(C) , resolve = capability.resolve , reject = capability.reject; var abrupt = perform(function(){ var values = [] , index = 0 , remaining = 1; forOf(iterable, false, function(promise){ var $index = index++ , alreadyCalled = false; values.push(undefined); remaining++; C.resolve(promise).then(function(value){ if(alreadyCalled)return; alreadyCalled = true; values[$index] = value; --remaining || resolve(values); }, reject); }); --remaining || resolve(values); }); if(abrupt)reject(abrupt.error); return capability.promise; }, // 25.4.4.4 Promise.race(iterable) race: function race(iterable){ var C = this , capability = newPromiseCapability(C) , reject = capability.reject; var abrupt = perform(function(){ forOf(iterable, false, function(promise){ C.resolve(promise).then(capability.resolve, reject); }); }); if(abrupt)reject(abrupt.error); return capability.promise; } }); /***/ }, /* 770 */ /***/ function(module, exports, __webpack_require__) { // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) var $export = __webpack_require__(2) , aFunction = __webpack_require__(51) , anObject = __webpack_require__(6) , _apply = Function.apply; $export($export.S, 'Reflect', { apply: function apply(target, thisArgument, argumentsList){ return _apply.call(aFunction(target), thisArgument, anObject(argumentsList)); } }); /***/ }, /* 771 */ /***/ function(module, exports, __webpack_require__) { // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) var $export = __webpack_require__(2) , create = __webpack_require__(82) , aFunction = __webpack_require__(51) , anObject = __webpack_require__(6) , isObject = __webpack_require__(11) , bind = __webpack_require__(386); // MS Edge supports only 2 arguments // FF Nightly sets third argument as `new.target`, but does not create `this` from it $export($export.S + $export.F * __webpack_require__(9)(function(){ function F(){} return !(Reflect.construct(function(){}, [], F) instanceof F); }), 'Reflect', { construct: function construct(Target, args /*, newTarget*/){ aFunction(Target); anObject(args); var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); if(Target == newTarget){ // w/o altered newTarget, optimization for 0-4 arguments switch(args.length){ case 0: return new Target; case 1: return new Target(args[0]); case 2: return new Target(args[0], args[1]); case 3: return new Target(args[0], args[1], args[2]); case 4: return new Target(args[0], args[1], args[2], args[3]); } // w/o altered newTarget, lot of arguments case var $args = [null]; $args.push.apply($args, args); return new (bind.apply(Target, $args)); } // with altered newTarget, not support built-in constructors var proto = newTarget.prototype , instance = create(isObject(proto) ? proto : Object.prototype) , result = Function.apply.call(Target, instance, args); return isObject(result) ? result : instance; } }); /***/ }, /* 772 */ /***/ function(module, exports, __webpack_require__) { // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) var dP = __webpack_require__(19) , $export = __webpack_require__(2) , anObject = __webpack_require__(6) , toPrimitive = __webpack_require__(71); // MS Edge has broken Reflect.defineProperty - throwing instead of returning false $export($export.S + $export.F * __webpack_require__(9)(function(){ Reflect.defineProperty(dP.f({}, 1, {value: 1}), 1, {value: 2}); }), 'Reflect', { defineProperty: function defineProperty(target, propertyKey, attributes){ anObject(target); propertyKey = toPrimitive(propertyKey, true); anObject(attributes); try { dP.f(target, propertyKey, attributes); return true; } catch(e){ return false; } } }); /***/ }, /* 773 */ /***/ function(module, exports, __webpack_require__) { // 26.1.4 Reflect.deleteProperty(target, propertyKey) var $export = __webpack_require__(2) , gOPD = __webpack_require__(57).f , anObject = __webpack_require__(6); $export($export.S, 'Reflect', { deleteProperty: function deleteProperty(target, propertyKey){ var desc = gOPD(anObject(target), propertyKey); return desc && !desc.configurable ? false : delete target[propertyKey]; } }); /***/ }, /* 774 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 26.1.5 Reflect.enumerate(target) var $export = __webpack_require__(2) , anObject = __webpack_require__(6); var Enumerate = function(iterated){ this._t = anObject(iterated); // target this._i = 0; // next index var keys = this._k = [] // keys , key; for(key in iterated)keys.push(key); }; __webpack_require__(393)(Enumerate, 'Object', function(){ var that = this , keys = that._k , key; do { if(that._i >= keys.length)return {value: undefined, done: true}; } while(!((key = keys[that._i++]) in that._t)); return {value: key, done: false}; }); $export($export.S, 'Reflect', { enumerate: function enumerate(target){ return new Enumerate(target); } }); /***/ }, /* 775 */ /***/ function(module, exports, __webpack_require__) { // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) var gOPD = __webpack_require__(57) , $export = __webpack_require__(2) , anObject = __webpack_require__(6); $export($export.S, 'Reflect', { getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){ return gOPD.f(anObject(target), propertyKey); } }); /***/ }, /* 776 */ /***/ function(module, exports, __webpack_require__) { // 26.1.8 Reflect.getPrototypeOf(target) var $export = __webpack_require__(2) , getProto = __webpack_require__(44) , anObject = __webpack_require__(6); $export($export.S, 'Reflect', { getPrototypeOf: function getPrototypeOf(target){ return getProto(anObject(target)); } }); /***/ }, /* 777 */ /***/ function(module, exports, __webpack_require__) { // 26.1.6 Reflect.get(target, propertyKey [, receiver]) var gOPD = __webpack_require__(57) , getPrototypeOf = __webpack_require__(44) , has = __webpack_require__(28) , $export = __webpack_require__(2) , isObject = __webpack_require__(11) , anObject = __webpack_require__(6); function get(target, propertyKey/*, receiver*/){ var receiver = arguments.length < 3 ? target : arguments[2] , desc, proto; if(anObject(target) === receiver)return target[propertyKey]; if(desc = gOPD.f(target, propertyKey))return has(desc, 'value') ? desc.value : desc.get !== undefined ? desc.get.call(receiver) : undefined; if(isObject(proto = getPrototypeOf(target)))return get(proto, propertyKey, receiver); } $export($export.S, 'Reflect', {get: get}); /***/ }, /* 778 */ /***/ function(module, exports, __webpack_require__) { // 26.1.9 Reflect.has(target, propertyKey) var $export = __webpack_require__(2); $export($export.S, 'Reflect', { has: function has(target, propertyKey){ return propertyKey in target; } }); /***/ }, /* 779 */ /***/ function(module, exports, __webpack_require__) { // 26.1.10 Reflect.isExtensible(target) var $export = __webpack_require__(2) , anObject = __webpack_require__(6) , $isExtensible = Object.isExtensible; $export($export.S, 'Reflect', { isExtensible: function isExtensible(target){ anObject(target); return $isExtensible ? $isExtensible(target) : true; } }); /***/ }, /* 780 */ /***/ function(module, exports, __webpack_require__) { // 26.1.11 Reflect.ownKeys(target) var $export = __webpack_require__(2); $export($export.S, 'Reflect', {ownKeys: __webpack_require__(690)}); /***/ }, /* 781 */ /***/ function(module, exports, __webpack_require__) { // 26.1.12 Reflect.preventExtensions(target) var $export = __webpack_require__(2) , anObject = __webpack_require__(6) , $preventExtensions = Object.preventExtensions; $export($export.S, 'Reflect', { preventExtensions: function preventExtensions(target){ anObject(target); try { if($preventExtensions)$preventExtensions(target); return true; } catch(e){ return false; } } }); /***/ }, /* 782 */ /***/ function(module, exports, __webpack_require__) { // 26.1.14 Reflect.setPrototypeOf(target, proto) var $export = __webpack_require__(2) , setProto = __webpack_require__(155); if(setProto)$export($export.S, 'Reflect', { setPrototypeOf: function setPrototypeOf(target, proto){ setProto.check(target, proto); try { setProto.set(target, proto); return true; } catch(e){ return false; } } }); /***/ }, /* 783 */ /***/ function(module, exports, __webpack_require__) { // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) var dP = __webpack_require__(19) , gOPD = __webpack_require__(57) , getPrototypeOf = __webpack_require__(44) , has = __webpack_require__(28) , $export = __webpack_require__(2) , createDesc = __webpack_require__(69) , anObject = __webpack_require__(6) , isObject = __webpack_require__(11); function set(target, propertyKey, V/*, receiver*/){ var receiver = arguments.length < 4 ? target : arguments[3] , ownDesc = gOPD.f(anObject(target), propertyKey) , existingDescriptor, proto; if(!ownDesc){ if(isObject(proto = getPrototypeOf(target))){ return set(proto, propertyKey, V, receiver); } ownDesc = createDesc(0); } if(has(ownDesc, 'value')){ if(ownDesc.writable === false || !isObject(receiver))return false; existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0); existingDescriptor.value = V; dP.f(receiver, propertyKey, existingDescriptor); return true; } return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); } $export($export.S, 'Reflect', {set: set}); /***/ }, /* 784 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(15) , inheritIfRequired = __webpack_require__(241) , dP = __webpack_require__(19).f , gOPN = __webpack_require__(83).f , isRegExp = __webpack_require__(245) , $flags = __webpack_require__(239) , $RegExp = global.RegExp , Base = $RegExp , proto = $RegExp.prototype , re1 = /a/g , re2 = /a/g // "new" creates a new object, old webkit buggy here , CORRECT_NEW = new $RegExp(re1) !== re1; if(__webpack_require__(24) && (!CORRECT_NEW || __webpack_require__(9)(function(){ re2[__webpack_require__(13)('match')] = false; // RegExp constructor can alter flags and IsRegExp works correct with @@match return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; }))){ $RegExp = function RegExp(p, f){ var tiRE = this instanceof $RegExp , piRE = isRegExp(p) , fiU = f === undefined; return !tiRE && piRE && p.constructor === $RegExp && fiU ? p : inheritIfRequired(CORRECT_NEW ? new Base(piRE && !fiU ? p.source : p, f) : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f) , tiRE ? this : proto, $RegExp); }; var proxy = function(key){ key in $RegExp || dP($RegExp, key, { configurable: true, get: function(){ return Base[key]; }, set: function(it){ Base[key] = it; } }); }; for(var keys = gOPN(Base), i = 0; keys.length > i; )proxy(keys[i++]); proto.constructor = $RegExp; $RegExp.prototype = proto; __webpack_require__(38)(global, 'RegExp', $RegExp); } __webpack_require__(100)('RegExp'); /***/ }, /* 785 */ /***/ function(module, exports, __webpack_require__) { // @@match logic __webpack_require__(151)('match', 1, function(defined, MATCH, $match){ // 21.1.3.11 String.prototype.match(regexp) return [function match(regexp){ 'use strict'; var O = defined(this) , fn = regexp == undefined ? undefined : regexp[MATCH]; return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); }, $match]; }); /***/ }, /* 786 */ /***/ function(module, exports, __webpack_require__) { // @@replace logic __webpack_require__(151)('replace', 2, function(defined, REPLACE, $replace){ // 21.1.3.14 String.prototype.replace(searchValue, replaceValue) return [function replace(searchValue, replaceValue){ 'use strict'; var O = defined(this) , fn = searchValue == undefined ? undefined : searchValue[REPLACE]; return fn !== undefined ? fn.call(searchValue, O, replaceValue) : $replace.call(String(O), searchValue, replaceValue); }, $replace]; }); /***/ }, /* 787 */ /***/ function(module, exports, __webpack_require__) { // @@search logic __webpack_require__(151)('search', 1, function(defined, SEARCH, $search){ // 21.1.3.15 String.prototype.search(regexp) return [function search(regexp){ 'use strict'; var O = defined(this) , fn = regexp == undefined ? undefined : regexp[SEARCH]; return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); }, $search]; }); /***/ }, /* 788 */ /***/ function(module, exports, __webpack_require__) { // @@split logic __webpack_require__(151)('split', 2, function(defined, SPLIT, $split){ 'use strict'; var isRegExp = __webpack_require__(245) , _split = $split , $push = [].push , $SPLIT = 'split' , LENGTH = 'length' , LAST_INDEX = 'lastIndex'; if( 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || '.'[$SPLIT](/()()/)[LENGTH] > 1 || ''[$SPLIT](/.?/)[LENGTH] ){ var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group // based on es5-shim implementation, need to rework it $split = function(separator, limit){ var string = String(this); if(separator === undefined && limit === 0)return []; // If `separator` is not a regex, use native split if(!isRegExp(separator))return _split.call(string, separator, limit); var output = []; var flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.unicode ? 'u' : '') + (separator.sticky ? 'y' : ''); var lastLastIndex = 0; var splitLimit = limit === undefined ? 4294967295 : limit >>> 0; // Make `global` and avoid `lastIndex` issues by working with a copy var separatorCopy = new RegExp(separator.source, flags + 'g'); var separator2, match, lastIndex, lastLength, i; // Doesn't need flags gy, but they don't hurt if(!NPCG)separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); while(match = separatorCopy.exec(string)){ // `separatorCopy.lastIndex` is not reliable cross-browser lastIndex = match.index + match[0][LENGTH]; if(lastIndex > lastLastIndex){ output.push(string.slice(lastLastIndex, match.index)); // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG if(!NPCG && match[LENGTH] > 1)match[0].replace(separator2, function(){ for(i = 1; i < arguments[LENGTH] - 2; i++)if(arguments[i] === undefined)match[i] = undefined; }); if(match[LENGTH] > 1 && match.index < string[LENGTH])$push.apply(output, match.slice(1)); lastLength = match[0][LENGTH]; lastLastIndex = lastIndex; if(output[LENGTH] >= splitLimit)break; } if(separatorCopy[LAST_INDEX] === match.index)separatorCopy[LAST_INDEX]++; // Avoid an infinite loop } if(lastLastIndex === string[LENGTH]){ if(lastLength || !separatorCopy.test(''))output.push(''); } else output.push(string.slice(lastLastIndex)); return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; }; // Chakra, V8 } else if('0'[$SPLIT](undefined, 0)[LENGTH]){ $split = function(separator, limit){ return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit); }; } // 21.1.3.17 String.prototype.split(separator, limit) return [function split(separator, limit){ var O = defined(this) , fn = separator == undefined ? undefined : separator[SPLIT]; return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit); }, $split]; }); /***/ }, /* 789 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; __webpack_require__(409); var anObject = __webpack_require__(6) , $flags = __webpack_require__(239) , DESCRIPTORS = __webpack_require__(24) , TO_STRING = 'toString' , $toString = /./[TO_STRING]; var define = function(fn){ __webpack_require__(38)(RegExp.prototype, TO_STRING, fn, true); }; // 21.2.5.14 RegExp.prototype.toString() if(__webpack_require__(9)(function(){ return $toString.call({source: 'a', flags: 'b'}) != '/a/b'; })){ define(function toString(){ var R = anObject(this); return '/'.concat(R.source, '/', 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); }); // FF44- RegExp#toString has a wrong name } else if($toString.name != TO_STRING){ define(function toString(){ return $toString.call(this); }); } /***/ }, /* 790 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.2 String.prototype.anchor(name) __webpack_require__(31)('anchor', function(createHTML){ return function anchor(name){ return createHTML(this, 'a', 'name', name); } }); /***/ }, /* 791 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.3 String.prototype.big() __webpack_require__(31)('big', function(createHTML){ return function big(){ return createHTML(this, 'big', '', ''); } }); /***/ }, /* 792 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.4 String.prototype.blink() __webpack_require__(31)('blink', function(createHTML){ return function blink(){ return createHTML(this, 'blink', '', ''); } }); /***/ }, /* 793 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.5 String.prototype.bold() __webpack_require__(31)('bold', function(createHTML){ return function bold(){ return createHTML(this, 'b', '', ''); } }); /***/ }, /* 794 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(2) , $at = __webpack_require__(403)(false); $export($export.P, 'String', { // 21.1.3.3 String.prototype.codePointAt(pos) codePointAt: function codePointAt(pos){ return $at(this, pos); } }); /***/ }, /* 795 */ /***/ function(module, exports, __webpack_require__) { // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) 'use strict'; var $export = __webpack_require__(2) , toLength = __webpack_require__(29) , context = __webpack_require__(251) , ENDS_WITH = 'endsWith' , $endsWith = ''[ENDS_WITH]; $export($export.P + $export.F * __webpack_require__(238)(ENDS_WITH), 'String', { endsWith: function endsWith(searchString /*, endPosition = @length */){ var that = context(this, searchString, ENDS_WITH) , endPosition = arguments.length > 1 ? arguments[1] : undefined , len = toLength(that.length) , end = endPosition === undefined ? len : Math.min(toLength(endPosition), len) , search = String(searchString); return $endsWith ? $endsWith.call(that, search, end) : that.slice(end - search.length, end) === search; } }); /***/ }, /* 796 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.6 String.prototype.fixed() __webpack_require__(31)('fixed', function(createHTML){ return function fixed(){ return createHTML(this, 'tt', '', ''); } }); /***/ }, /* 797 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.7 String.prototype.fontcolor(color) __webpack_require__(31)('fontcolor', function(createHTML){ return function fontcolor(color){ return createHTML(this, 'font', 'color', color); } }); /***/ }, /* 798 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.8 String.prototype.fontsize(size) __webpack_require__(31)('fontsize', function(createHTML){ return function fontsize(size){ return createHTML(this, 'font', 'size', size); } }); /***/ }, /* 799 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(2) , toIndex = __webpack_require__(84) , fromCharCode = String.fromCharCode , $fromCodePoint = String.fromCodePoint; // length should be 1, old FF problem $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { // 21.1.2.2 String.fromCodePoint(...codePoints) fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars var res = [] , aLen = arguments.length , i = 0 , code; while(aLen > i){ code = +arguments[i++]; if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point'); res.push(code < 0x10000 ? fromCharCode(code) : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) ); } return res.join(''); } }); /***/ }, /* 800 */ /***/ function(module, exports, __webpack_require__) { // 21.1.3.7 String.prototype.includes(searchString, position = 0) 'use strict'; var $export = __webpack_require__(2) , context = __webpack_require__(251) , INCLUDES = 'includes'; $export($export.P + $export.F * __webpack_require__(238)(INCLUDES), 'String', { includes: function includes(searchString /*, position = 0 */){ return !!~context(this, searchString, INCLUDES) .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); } }); /***/ }, /* 801 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.9 String.prototype.italics() __webpack_require__(31)('italics', function(createHTML){ return function italics(){ return createHTML(this, 'i', '', ''); } }); /***/ }, /* 802 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $at = __webpack_require__(403)(true); // 21.1.3.27 String.prototype[@@iterator]() __webpack_require__(246)(String, 'String', function(iterated){ this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function(){ var O = this._t , index = this._i , point; if(index >= O.length)return {value: undefined, done: true}; point = $at(O, index); this._i += point.length; return {value: point, done: false}; }); /***/ }, /* 803 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.10 String.prototype.link(url) __webpack_require__(31)('link', function(createHTML){ return function link(url){ return createHTML(this, 'a', 'href', url); } }); /***/ }, /* 804 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(2) , toIObject = __webpack_require__(41) , toLength = __webpack_require__(29); $export($export.S, 'String', { // 21.1.2.4 String.raw(callSite, ...substitutions) raw: function raw(callSite){ var tpl = toIObject(callSite.raw) , len = toLength(tpl.length) , aLen = arguments.length , res = [] , i = 0; while(len > i){ res.push(String(tpl[i++])); if(i < aLen)res.push(String(arguments[i])); } return res.join(''); } }); /***/ }, /* 805 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(2); $export($export.P, 'String', { // 21.1.3.13 String.prototype.repeat(count) repeat: __webpack_require__(404) }); /***/ }, /* 806 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.11 String.prototype.small() __webpack_require__(31)('small', function(createHTML){ return function small(){ return createHTML(this, 'small', '', ''); } }); /***/ }, /* 807 */ /***/ function(module, exports, __webpack_require__) { // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) 'use strict'; var $export = __webpack_require__(2) , toLength = __webpack_require__(29) , context = __webpack_require__(251) , STARTS_WITH = 'startsWith' , $startsWith = ''[STARTS_WITH]; $export($export.P + $export.F * __webpack_require__(238)(STARTS_WITH), 'String', { startsWith: function startsWith(searchString /*, position = 0 */){ var that = context(this, searchString, STARTS_WITH) , index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)) , search = String(searchString); return $startsWith ? $startsWith.call(that, search, index) : that.slice(index, index + search.length) === search; } }); /***/ }, /* 808 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.12 String.prototype.strike() __webpack_require__(31)('strike', function(createHTML){ return function strike(){ return createHTML(this, 'strike', '', ''); } }); /***/ }, /* 809 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.13 String.prototype.sub() __webpack_require__(31)('sub', function(createHTML){ return function sub(){ return createHTML(this, 'sub', '', ''); } }); /***/ }, /* 810 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.14 String.prototype.sup() __webpack_require__(31)('sup', function(createHTML){ return function sup(){ return createHTML(this, 'sup', '', ''); } }); /***/ }, /* 811 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 21.1.3.25 String.prototype.trim() __webpack_require__(157)('trim', function($trim){ return function trim(){ return $trim(this, 3); }; }); /***/ }, /* 812 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // ECMAScript 6 symbols shim var global = __webpack_require__(15) , has = __webpack_require__(28) , DESCRIPTORS = __webpack_require__(24) , $export = __webpack_require__(2) , redefine = __webpack_require__(38) , META = __webpack_require__(68).KEY , $fails = __webpack_require__(9) , shared = __webpack_require__(156) , setToStringTag = __webpack_require__(101) , uid = __webpack_require__(85) , wks = __webpack_require__(13) , wksExt = __webpack_require__(406) , wksDefine = __webpack_require__(691) , keyOf = __webpack_require__(688) , enumKeys = __webpack_require__(687) , isArray = __webpack_require__(243) , anObject = __webpack_require__(6) , toIObject = __webpack_require__(41) , toPrimitive = __webpack_require__(71) , createDesc = __webpack_require__(69) , _create = __webpack_require__(82) , gOPNExt = __webpack_require__(398) , $GOPD = __webpack_require__(57) , $DP = __webpack_require__(19) , $keys = __webpack_require__(98) , gOPD = $GOPD.f , dP = $DP.f , gOPN = gOPNExt.f , $Symbol = global.Symbol , $JSON = global.JSON , _stringify = $JSON && $JSON.stringify , PROTOTYPE = 'prototype' , HIDDEN = wks('_hidden') , TO_PRIMITIVE = wks('toPrimitive') , isEnum = {}.propertyIsEnumerable , SymbolRegistry = shared('symbol-registry') , AllSymbols = shared('symbols') , OPSymbols = shared('op-symbols') , ObjectProto = Object[PROTOTYPE] , USE_NATIVE = typeof $Symbol == 'function' , QObject = global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 var setSymbolDesc = DESCRIPTORS && $fails(function(){ return _create(dP({}, 'a', { get: function(){ return dP(this, 'a', {value: 7}).a; } })).a != 7; }) ? function(it, key, D){ var protoDesc = gOPD(ObjectProto, key); if(protoDesc)delete ObjectProto[key]; dP(it, key, D); if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc); } : dP; var wrap = function(tag){ var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); sym._k = tag; return sym; }; var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){ return typeof it == 'symbol'; } : function(it){ return it instanceof $Symbol; }; var $defineProperty = function defineProperty(it, key, D){ if(it === ObjectProto)$defineProperty(OPSymbols, key, D); anObject(it); key = toPrimitive(key, true); anObject(D); if(has(AllSymbols, key)){ if(!D.enumerable){ if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {})); it[HIDDEN][key] = true; } else { if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; D = _create(D, {enumerable: createDesc(0, false)}); } return setSymbolDesc(it, key, D); } return dP(it, key, D); }; var $defineProperties = function defineProperties(it, P){ anObject(it); var keys = enumKeys(P = toIObject(P)) , i = 0 , l = keys.length , key; while(l > i)$defineProperty(it, key = keys[i++], P[key]); return it; }; var $create = function create(it, P){ return P === undefined ? _create(it) : $defineProperties(_create(it), P); }; var $propertyIsEnumerable = function propertyIsEnumerable(key){ var E = isEnum.call(this, key = toPrimitive(key, true)); if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false; return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; }; var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ it = toIObject(it); key = toPrimitive(key, true); if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return; var D = gOPD(it, key); if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; return D; }; var $getOwnPropertyNames = function getOwnPropertyNames(it){ var names = gOPN(toIObject(it)) , result = [] , i = 0 , key; while(names.length > i){ if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key); } return result; }; var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ var IS_OP = it === ObjectProto , names = gOPN(IS_OP ? OPSymbols : toIObject(it)) , result = [] , i = 0 , key; while(names.length > i){ if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]); } return result; }; // 19.4.1.1 Symbol([description]) if(!USE_NATIVE){ $Symbol = function Symbol(){ if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!'); var tag = uid(arguments.length > 0 ? arguments[0] : undefined); var $set = function(value){ if(this === ObjectProto)$set.call(OPSymbols, value); if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; setSymbolDesc(this, tag, createDesc(1, value)); }; if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set}); return wrap(tag); }; redefine($Symbol[PROTOTYPE], 'toString', function toString(){ return this._k; }); $GOPD.f = $getOwnPropertyDescriptor; $DP.f = $defineProperty; __webpack_require__(83).f = gOPNExt.f = $getOwnPropertyNames; __webpack_require__(154).f = $propertyIsEnumerable; __webpack_require__(153).f = $getOwnPropertySymbols; if(DESCRIPTORS && !__webpack_require__(97)){ redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } wksExt.f = function(name){ return wrap(wks(name)); } } $export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol}); for(var symbols = ( // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' ).split(','), i = 0; symbols.length > i; )wks(symbols[i++]); for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]); $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { // 19.4.2.1 Symbol.for(key) 'for': function(key){ return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key); }, // 19.4.2.5 Symbol.keyFor(sym) keyFor: function keyFor(key){ if(isSymbol(key))return keyOf(SymbolRegistry, key); throw TypeError(key + ' is not a symbol!'); }, useSetter: function(){ setter = true; }, useSimple: function(){ setter = false; } }); $export($export.S + $export.F * !USE_NATIVE, 'Object', { // 19.1.2.2 Object.create(O [, Properties]) create: $create, // 19.1.2.4 Object.defineProperty(O, P, Attributes) defineProperty: $defineProperty, // 19.1.2.3 Object.defineProperties(O, Properties) defineProperties: $defineProperties, // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) getOwnPropertyDescriptor: $getOwnPropertyDescriptor, // 19.1.2.7 Object.getOwnPropertyNames(O) getOwnPropertyNames: $getOwnPropertyNames, // 19.1.2.8 Object.getOwnPropertySymbols(O) getOwnPropertySymbols: $getOwnPropertySymbols }); // 24.3.2 JSON.stringify(value [, replacer [, space]]) $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){ var S = $Symbol(); // MS Edge converts symbol values to JSON as {} // WebKit converts symbol values to JSON as null // V8 throws on boxed symbols return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; })), 'JSON', { stringify: function stringify(it){ if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined var args = [it] , i = 1 , replacer, $replacer; while(arguments.length > i)args.push(arguments[i++]); replacer = args[1]; if(typeof replacer == 'function')$replacer = replacer; if($replacer || !isArray(replacer))replacer = function(key, value){ if($replacer)value = $replacer.call(this, key, value); if(!isSymbol(value))return value; }; args[1] = replacer; return _stringify.apply($JSON, args); } }); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(37)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag] setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag] setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag] setToStringTag(global.JSON, 'JSON', true); /***/ }, /* 813 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(2) , $typed = __webpack_require__(158) , buffer = __webpack_require__(253) , anObject = __webpack_require__(6) , toIndex = __webpack_require__(84) , toLength = __webpack_require__(29) , isObject = __webpack_require__(11) , TYPED_ARRAY = __webpack_require__(13)('typed_array') , ArrayBuffer = __webpack_require__(15).ArrayBuffer , speciesConstructor = __webpack_require__(250) , $ArrayBuffer = buffer.ArrayBuffer , $DataView = buffer.DataView , $isView = $typed.ABV && ArrayBuffer.isView , $slice = $ArrayBuffer.prototype.slice , VIEW = $typed.VIEW , ARRAY_BUFFER = 'ArrayBuffer'; $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), {ArrayBuffer: $ArrayBuffer}); $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { // 24.1.3.1 ArrayBuffer.isView(arg) isView: function isView(it){ return $isView && $isView(it) || isObject(it) && VIEW in it; } }); $export($export.P + $export.U + $export.F * __webpack_require__(9)(function(){ return !new $ArrayBuffer(2).slice(1, undefined).byteLength; }), ARRAY_BUFFER, { // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) slice: function slice(start, end){ if($slice !== undefined && end === undefined)return $slice.call(anObject(this), start); // FF fix var len = anObject(this).byteLength , first = toIndex(start, len) , final = toIndex(end === undefined ? len : end, len) , result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first)) , viewS = new $DataView(this) , viewT = new $DataView(result) , index = 0; while(first < final){ viewT.setUint8(index++, viewS.getUint8(first++)); } return result; } }); __webpack_require__(100)(ARRAY_BUFFER); /***/ }, /* 814 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(2); $export($export.G + $export.W + $export.F * !__webpack_require__(158).ABV, { DataView: __webpack_require__(253).DataView }); /***/ }, /* 815 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(58)('Float32', 4, function(init){ return function Float32Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 816 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(58)('Float64', 8, function(init){ return function Float64Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 817 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(58)('Int16', 2, function(init){ return function Int16Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 818 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(58)('Int32', 4, function(init){ return function Int32Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 819 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(58)('Int8', 1, function(init){ return function Int8Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 820 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(58)('Uint16', 2, function(init){ return function Uint16Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 821 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(58)('Uint32', 4, function(init){ return function Uint32Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 822 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(58)('Uint8', 1, function(init){ return function Uint8Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 823 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(58)('Uint8', 1, function(init){ return function Uint8ClampedArray(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }, true); /***/ }, /* 824 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var weak = __webpack_require__(388); // 23.4 WeakSet Objects __webpack_require__(150)('WeakSet', function(get){ return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.4.3.1 WeakSet.prototype.add(value) add: function add(value){ return weak.def(this, value, true); } }, weak, false, true); /***/ }, /* 825 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(56) , anObject = __webpack_require__(6) , toMetaKey = metadata.key , ordinaryDefineOwnMetadata = metadata.set; metadata.exp({defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey){ ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); }}); /***/ }, /* 826 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(56) , anObject = __webpack_require__(6) , toMetaKey = metadata.key , getOrCreateMetadataMap = metadata.map , store = metadata.store; metadata.exp({deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */){ var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]) , metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); if(metadataMap === undefined || !metadataMap['delete'](metadataKey))return false; if(metadataMap.size)return true; var targetMetadata = store.get(target); targetMetadata['delete'](targetKey); return !!targetMetadata.size || store['delete'](target); }}); /***/ }, /* 827 */ /***/ function(module, exports, __webpack_require__) { var Set = __webpack_require__(410) , from = __webpack_require__(683) , metadata = __webpack_require__(56) , anObject = __webpack_require__(6) , getPrototypeOf = __webpack_require__(44) , ordinaryOwnMetadataKeys = metadata.keys , toMetaKey = metadata.key; var ordinaryMetadataKeys = function(O, P){ var oKeys = ordinaryOwnMetadataKeys(O, P) , parent = getPrototypeOf(O); if(parent === null)return oKeys; var pKeys = ordinaryMetadataKeys(parent, P); return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; }; metadata.exp({getMetadataKeys: function getMetadataKeys(target /*, targetKey */){ return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); }}); /***/ }, /* 828 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(56) , anObject = __webpack_require__(6) , getPrototypeOf = __webpack_require__(44) , ordinaryHasOwnMetadata = metadata.has , ordinaryGetOwnMetadata = metadata.get , toMetaKey = metadata.key; var ordinaryGetMetadata = function(MetadataKey, O, P){ var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); if(hasOwn)return ordinaryGetOwnMetadata(MetadataKey, O, P); var parent = getPrototypeOf(O); return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; }; metadata.exp({getMetadata: function getMetadata(metadataKey, target /*, targetKey */){ return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }}); /***/ }, /* 829 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(56) , anObject = __webpack_require__(6) , ordinaryOwnMetadataKeys = metadata.keys , toMetaKey = metadata.key; metadata.exp({getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */){ return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); }}); /***/ }, /* 830 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(56) , anObject = __webpack_require__(6) , ordinaryGetOwnMetadata = metadata.get , toMetaKey = metadata.key; metadata.exp({getOwnMetadata: function getOwnMetadata(metadataKey, target /*, targetKey */){ return ordinaryGetOwnMetadata(metadataKey, anObject(target) , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }}); /***/ }, /* 831 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(56) , anObject = __webpack_require__(6) , getPrototypeOf = __webpack_require__(44) , ordinaryHasOwnMetadata = metadata.has , toMetaKey = metadata.key; var ordinaryHasMetadata = function(MetadataKey, O, P){ var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); if(hasOwn)return true; var parent = getPrototypeOf(O); return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; }; metadata.exp({hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */){ return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }}); /***/ }, /* 832 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(56) , anObject = __webpack_require__(6) , ordinaryHasOwnMetadata = metadata.has , toMetaKey = metadata.key; metadata.exp({hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, targetKey */){ return ordinaryHasOwnMetadata(metadataKey, anObject(target) , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }}); /***/ }, /* 833 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(56) , anObject = __webpack_require__(6) , aFunction = __webpack_require__(51) , toMetaKey = metadata.key , ordinaryDefineOwnMetadata = metadata.set; metadata.exp({metadata: function metadata(metadataKey, metadataValue){ return function decorator(target, targetKey){ ordinaryDefineOwnMetadata( metadataKey, metadataValue, (targetKey !== undefined ? anObject : aFunction)(target), toMetaKey(targetKey) ); }; }}); /***/ }, /* 834 */, /* 835 */, /* 836 */, /* 837 */, /* 838 */, /* 839 */, /* 840 */, /* 841 */, /* 842 */, /* 843 */, /* 844 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {function __assignFn(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; } function __extendsFn(d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } function __decorateFn(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } function __metadataFn(k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); } function __paramFn(paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); }; } function __awaiterFn(thisArg, _arguments, P, generator) { return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments)).next()); }); } // hook global helpers (function (__global) { __global.__assign = (__global && __global.__assign) || Object.assign || __assignFn; __global.__extends = (__global && __global.__extends) || __extendsFn; __global.__decorate = (__global && __global.__decorate) || __decorateFn; __global.__metadata = (__global && __global.__metadata) || __metadataFn; __global.__param = (__global && __global.__param) || __paramFn; __global.__awaiter = (__global && __global.__awaiter) || __awaiterFn; })(typeof window !== "undefined" ? window : typeof WorkerGlobalScope !== "undefined" ? self : typeof global !== "undefined" ? global : Function("return this;")()); /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, /* 845 */ /***/ function(module, exports) { /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ function(module, exports) { 'use strict'; (function () { var NEWLINE = '\n'; var SEP = ' ------------- '; var IGNORE_FRAMES = []; var creationTrace = '__creationTrace__'; var LongStackTrace = (function () { function LongStackTrace() { this.error = getStacktrace(); this.timestamp = new Date(); } return LongStackTrace; }()); function getStacktraceWithUncaughtError() { return new Error('STACKTRACE TRACKING'); } function getStacktraceWithCaughtError() { try { throw getStacktraceWithUncaughtError(); } catch (e) { return e; } } // Some implementations of exception handling don't create a stack trace if the exception // isn't thrown, however it's faster not to actually throw the exception. var error = getStacktraceWithUncaughtError(); var coughtError = getStacktraceWithCaughtError(); var getStacktrace = error.stack ? getStacktraceWithUncaughtError : (coughtError.stack ? getStacktraceWithCaughtError : getStacktraceWithUncaughtError); function getFrames(error) { return error.stack ? error.stack.split(NEWLINE) : []; } function addErrorStack(lines, error) { var trace = getFrames(error); for (var i = 0; i < trace.length; i++) { var frame = trace[i]; // Filter out the Frames which are part of stack capturing. if (!(i < IGNORE_FRAMES.length && IGNORE_FRAMES[i] === frame)) { lines.push(trace[i]); } } } function renderLongStackTrace(frames, stack) { var longTrace = [stack]; if (frames) { var timestamp = new Date().getTime(); for (var i = 0; i < frames.length; i++) { var traceFrames = frames[i]; var lastTime = traceFrames.timestamp; longTrace.push(SEP + " Elapsed: " + (timestamp - lastTime.getTime()) + " ms; At: " + lastTime + " " + SEP); addErrorStack(longTrace, traceFrames.error); timestamp = lastTime.getTime(); } } return longTrace.join(NEWLINE); } Zone['longStackTraceZoneSpec'] = { name: 'long-stack-trace', longStackTraceLimit: 10, onScheduleTask: function (parentZoneDelegate, currentZone, targetZone, task) { var currentTask = Zone.currentTask; var trace = currentTask && currentTask.data && currentTask.data[creationTrace] || []; trace = [new LongStackTrace()].concat(trace); if (trace.length > this.longStackTraceLimit) { trace.length = this.longStackTraceLimit; } if (!task.data) task.data = {}; task.data[creationTrace] = trace; return parentZoneDelegate.scheduleTask(targetZone, task); }, onHandleError: function (parentZoneDelegate, currentZone, targetZone, error) { var parentTask = Zone.currentTask; if (error instanceof Error && parentTask) { var descriptor = Object.getOwnPropertyDescriptor(error, 'stack'); if (descriptor) { var delegateGet_1 = descriptor.get; var value_1 = descriptor.value; descriptor = { get: function () { return renderLongStackTrace(parentTask.data && parentTask.data[creationTrace], delegateGet_1 ? delegateGet_1.apply(this) : value_1); } }; Object.defineProperty(error, 'stack', descriptor); } else { error.stack = renderLongStackTrace(parentTask.data && parentTask.data[creationTrace], error.stack); } } return parentZoneDelegate.handleError(targetZone, error); } }; function captureStackTraces(stackTraces, count) { if (count > 0) { stackTraces.push(getFrames((new LongStackTrace()).error)); captureStackTraces(stackTraces, count - 1); } } function computeIgnoreFrames() { var frames = []; captureStackTraces(frames, 2); var frames1 = frames[0]; var frames2 = frames[1]; for (var i = 0; i < frames1.length; i++) { var frame1 = frames1[i]; var frame2 = frames2[i]; if (frame1 === frame2) { IGNORE_FRAMES.push(frame1); } else { break; } } } computeIgnoreFrames(); })(); /***/ } /******/ ]); /***/ }, /* 846 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {"use strict"; __webpack_require__(1); var event_target_1 = __webpack_require__(2); var define_property_1 = __webpack_require__(4); var register_element_1 = __webpack_require__(5); var property_descriptor_1 = __webpack_require__(6); var timers_1 = __webpack_require__(8); var utils_1 = __webpack_require__(3); var set = 'set'; var clear = 'clear'; var blockingMethods = ['alert', 'prompt', 'confirm']; var _global = typeof window == 'undefined' ? global : window; timers_1.patchTimer(_global, set, clear, 'Timeout'); timers_1.patchTimer(_global, set, clear, 'Interval'); timers_1.patchTimer(_global, set, clear, 'Immediate'); timers_1.patchTimer(_global, 'request', 'cancelMacroTask', 'AnimationFrame'); timers_1.patchTimer(_global, 'mozRequest', 'mozCancel', 'AnimationFrame'); timers_1.patchTimer(_global, 'webkitRequest', 'webkitCancel', 'AnimationFrame'); for (var i = 0; i < blockingMethods.length; i++) { var name = blockingMethods[i]; utils_1.patchMethod(_global, name, function (delegate, symbol, name) { return function (s, args) { return Zone.current.run(delegate, _global, args, name); }; }); } event_target_1.eventTargetPatch(_global); property_descriptor_1.propertyDescriptorPatch(_global); utils_1.patchClass('MutationObserver'); utils_1.patchClass('WebKitMutationObserver'); utils_1.patchClass('FileReader'); define_property_1.propertyPatch(); register_element_1.registerElementPatch(_global); // Treat XMLHTTPRequest as a macrotask. patchXHR(_global); var XHR_TASK = utils_1.zoneSymbol('xhrTask'); function patchXHR(window) { function findPendingTask(target) { var pendingTask = target[XHR_TASK]; return pendingTask; } function scheduleTask(task) { var data = task.data; data.target.addEventListener('readystatechange', function () { if (data.target.readyState === XMLHttpRequest.DONE) { if (!data.aborted) { task.invoke(); } } }); var storedTask = data.target[XHR_TASK]; if (!storedTask) { data.target[XHR_TASK] = task; } setNative.apply(data.target, data.args); return task; } function placeholderCallback() { } function clearTask(task) { var data = task.data; // Note - ideally, we would call data.target.removeEventListener here, but it's too late // to prevent it from firing. So instead, we store info for the event listener. data.aborted = true; return clearNative.apply(data.target, data.args); } var setNative = utils_1.patchMethod(window.XMLHttpRequest.prototype, 'send', function () { return function (self, args) { var zone = Zone.current; var options = { target: self, isPeriodic: false, delay: null, args: args, aborted: false }; return zone.scheduleMacroTask('XMLHttpRequest.send', placeholderCallback, options, scheduleTask, clearTask); }; }); var clearNative = utils_1.patchMethod(window.XMLHttpRequest.prototype, 'abort', function (delegate) { return function (self, args) { var task = findPendingTask(self); if (task && typeof task.type == 'string') { // If the XHR has already completed, do nothing. if (task.cancelFn == null) { return; } task.zone.cancelTask(task); } // Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no task to cancel. Do nothing. }; }); } /// GEO_LOCATION if (_global['navigator'] && _global['navigator'].geolocation) { utils_1.patchPrototype(_global['navigator'].geolocation, [ 'getCurrentPosition', 'watchPosition' ]); } /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, /* 1 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {; ; var Zone = (function (global) { var Zone = (function () { function Zone(parent, zoneSpec) { this._properties = null; this._parent = parent; this._name = zoneSpec ? zoneSpec.name || 'unnamed' : '<root>'; this._properties = zoneSpec && zoneSpec.properties || {}; this._zoneDelegate = new ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec); } Object.defineProperty(Zone, "current", { get: function () { return _currentZone; }, enumerable: true, configurable: true }); ; Object.defineProperty(Zone, "currentTask", { get: function () { return _currentTask; }, enumerable: true, configurable: true }); ; Object.defineProperty(Zone.prototype, "parent", { get: function () { return this._parent; }, enumerable: true, configurable: true }); ; Object.defineProperty(Zone.prototype, "name", { get: function () { return this._name; }, enumerable: true, configurable: true }); ; Zone.prototype.get = function (key) { var current = this; while (current) { if (current._properties.hasOwnProperty(key)) { return current._properties[key]; } current = current._parent; } }; Zone.prototype.fork = function (zoneSpec) { if (!zoneSpec) throw new Error('ZoneSpec required!'); return this._zoneDelegate.fork(this, zoneSpec); }; Zone.prototype.wrap = function (callback, source) { if (typeof callback !== 'function') { throw new Error('Expecting function got: ' + callback); } var _callback = this._zoneDelegate.intercept(this, callback, source); var zone = this; return function () { return zone.runGuarded(_callback, this, arguments, source); }; }; Zone.prototype.run = function (callback, applyThis, applyArgs, source) { if (applyThis === void 0) { applyThis = null; } if (applyArgs === void 0) { applyArgs = null; } if (source === void 0) { source = null; } var oldZone = _currentZone; _currentZone = this; try { return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source); } finally { _currentZone = oldZone; } }; Zone.prototype.runGuarded = function (callback, applyThis, applyArgs, source) { if (applyThis === void 0) { applyThis = null; } if (applyArgs === void 0) { applyArgs = null; } if (source === void 0) { source = null; } var oldZone = _currentZone; _currentZone = this; try { try { return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source); } catch (error) { if (this._zoneDelegate.handleError(this, error)) { throw error; } } } finally { _currentZone = oldZone; } }; Zone.prototype.runTask = function (task, applyThis, applyArgs) { task.runCount++; if (task.zone != this) throw new Error('A task can only be run in the zone which created it! (Creation: ' + task.zone.name + '; Execution: ' + this.name + ')'); var previousTask = _currentTask; _currentTask = task; var oldZone = _currentZone; _currentZone = this; try { if (task.type == 'macroTask' && task.data && !task.data.isPeriodic) { task.cancelFn = null; } try { return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs); } catch (error) { if (this._zoneDelegate.handleError(this, error)) { throw error; } } } finally { _currentZone = oldZone; _currentTask = previousTask; } }; Zone.prototype.scheduleMicroTask = function (source, callback, data, customSchedule) { return this._zoneDelegate.scheduleTask(this, new ZoneTask('microTask', this, source, callback, data, customSchedule, null)); }; Zone.prototype.scheduleMacroTask = function (source, callback, data, customSchedule, customCancel) { return this._zoneDelegate.scheduleTask(this, new ZoneTask('macroTask', this, source, callback, data, customSchedule, customCancel)); }; Zone.prototype.scheduleEventTask = function (source, callback, data, customSchedule, customCancel) { return this._zoneDelegate.scheduleTask(this, new ZoneTask('eventTask', this, source, callback, data, customSchedule, customCancel)); }; Zone.prototype.cancelTask = function (task) { var value = this._zoneDelegate.cancelTask(this, task); task.runCount = -1; task.cancelFn = null; return value; }; Zone.__symbol__ = __symbol__; return Zone; }()); ; var ZoneDelegate = (function () { function ZoneDelegate(zone, parentDelegate, zoneSpec) { this._taskCounts = { microTask: 0, macroTask: 0, eventTask: 0 }; this.zone = zone; this._parentDelegate = parentDelegate; this._forkZS = zoneSpec && (zoneSpec && zoneSpec.onFork ? zoneSpec : parentDelegate._forkZS); this._forkDlgt = zoneSpec && (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt); this._interceptZS = zoneSpec && (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS); this._interceptDlgt = zoneSpec && (zoneSpec.onIntercept ? parentDelegate : parentDelegate._interceptDlgt); this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS); this._invokeDlgt = zoneSpec && (zoneSpec.onInvoke ? parentDelegate : parentDelegate._invokeDlgt); this._handleErrorZS = zoneSpec && (zoneSpec.onHandleError ? zoneSpec : parentDelegate._handleErrorZS); this._handleErrorDlgt = zoneSpec && (zoneSpec.onHandleError ? parentDelegate : parentDelegate._handleErrorDlgt); this._scheduleTaskZS = zoneSpec && (zoneSpec.onScheduleTask ? zoneSpec : parentDelegate._scheduleTaskZS); this._scheduleTaskDlgt = zoneSpec && (zoneSpec.onScheduleTask ? parentDelegate : parentDelegate._scheduleTaskDlgt); this._invokeTaskZS = zoneSpec && (zoneSpec.onInvokeTask ? zoneSpec : parentDelegate._invokeTaskZS); this._invokeTaskDlgt = zoneSpec && (zoneSpec.onInvokeTask ? parentDelegate : parentDelegate._invokeTaskDlgt); this._cancelTaskZS = zoneSpec && (zoneSpec.onCancelTask ? zoneSpec : parentDelegate._cancelTaskZS); this._cancelTaskDlgt = zoneSpec && (zoneSpec.onCancelTask ? parentDelegate : parentDelegate._cancelTaskDlgt); this._hasTaskZS = zoneSpec && (zoneSpec.onHasTask ? zoneSpec : parentDelegate._hasTaskZS); this._hasTaskDlgt = zoneSpec && (zoneSpec.onHasTask ? parentDelegate : parentDelegate._hasTaskDlgt); } ZoneDelegate.prototype.fork = function (targetZone, zoneSpec) { return this._forkZS ? this._forkZS.onFork(this._forkDlgt, this.zone, targetZone, zoneSpec) : new Zone(targetZone, zoneSpec); }; ZoneDelegate.prototype.intercept = function (targetZone, callback, source) { return this._interceptZS ? this._interceptZS.onIntercept(this._interceptDlgt, this.zone, targetZone, callback, source) : callback; }; ZoneDelegate.prototype.invoke = function (targetZone, callback, applyThis, applyArgs, source) { return this._invokeZS ? this._invokeZS.onInvoke(this._invokeDlgt, this.zone, targetZone, callback, applyThis, applyArgs, source) : callback.apply(applyThis, applyArgs); }; ZoneDelegate.prototype.handleError = function (targetZone, error) { return this._handleErrorZS ? this._handleErrorZS.onHandleError(this._handleErrorDlgt, this.zone, targetZone, error) : true; }; ZoneDelegate.prototype.scheduleTask = function (targetZone, task) { try { if (this._scheduleTaskZS) { return this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this.zone, targetZone, task); } else if (task.scheduleFn) { task.scheduleFn(task); } else if (task.type == 'microTask') { scheduleMicroTask(task); } else { throw new Error('Task is missing scheduleFn.'); } return task; } finally { if (targetZone == this.zone) { this._updateTaskCount(task.type, 1); } } }; ZoneDelegate.prototype.invokeTask = function (targetZone, task, applyThis, applyArgs) { try { return this._invokeTaskZS ? this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this.zone, targetZone, task, applyThis, applyArgs) : task.callback.apply(applyThis, applyArgs); } finally { if (targetZone == this.zone && (task.type != 'eventTask') && !(task.data && task.data.isPeriodic)) { this._updateTaskCount(task.type, -1); } } }; ZoneDelegate.prototype.cancelTask = function (targetZone, task) { var value; if (this._cancelTaskZS) { value = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this.zone, targetZone, task); } else if (!task.cancelFn) { throw new Error('Task does not support cancellation, or is already canceled.'); } else { value = task.cancelFn(task); } if (targetZone == this.zone) { // this should not be in the finally block, because exceptions assume not canceled. this._updateTaskCount(task.type, -1); } return value; }; ZoneDelegate.prototype.hasTask = function (targetZone, isEmpty) { return this._hasTaskZS && this._hasTaskZS.onHasTask(this._hasTaskDlgt, this.zone, targetZone, isEmpty); }; ZoneDelegate.prototype._updateTaskCount = function (type, count) { var counts = this._taskCounts; var prev = counts[type]; var next = counts[type] = prev + count; if (next < 0) { throw new Error('More tasks executed then were scheduled.'); } if (prev == 0 || next == 0) { var isEmpty = { microTask: counts.microTask > 0, macroTask: counts.macroTask > 0, eventTask: counts.eventTask > 0, change: type }; try { this.hasTask(this.zone, isEmpty); } finally { if (this._parentDelegate) { this._parentDelegate._updateTaskCount(type, count); } } } }; return ZoneDelegate; }()); var ZoneTask = (function () { function ZoneTask(type, zone, source, callback, options, scheduleFn, cancelFn) { this.runCount = 0; this.type = type; this.zone = zone; this.source = source; this.data = options; this.scheduleFn = scheduleFn; this.cancelFn = cancelFn; this.callback = callback; var self = this; this.invoke = function () { try { return zone.runTask(self, this, arguments); } finally { drainMicroTaskQueue(); } }; } return ZoneTask; }()); function __symbol__(name) { return '__zone_symbol__' + name; } ; var symbolSetTimeout = __symbol__('setTimeout'); var symbolPromise = __symbol__('Promise'); var symbolThen = __symbol__('then'); var _currentZone = new Zone(null, null); var _currentTask = null; var _microTaskQueue = []; var _isDrainingMicrotaskQueue = false; var _uncaughtPromiseErrors = []; var _drainScheduled = false; function scheduleQueueDrain() { if (!_drainScheduled && !_currentTask && _microTaskQueue.length == 0) { // We are not running in Task, so we need to kickstart the microtask queue. if (global[symbolPromise]) { global[symbolPromise].resolve(0)[symbolThen](drainMicroTaskQueue); } else { global[symbolSetTimeout](drainMicroTaskQueue, 0); } } } function scheduleMicroTask(task) { scheduleQueueDrain(); _microTaskQueue.push(task); } function consoleError(e) { var rejection = e && e.rejection; if (rejection) { console.error('Unhandled Promise rejection:', rejection instanceof Error ? rejection.message : rejection, '; Zone:', e.zone.name, '; Task:', e.task && e.task.source, '; Value:', rejection); } console.error(e); } function drainMicroTaskQueue() { if (!_isDrainingMicrotaskQueue) { _isDrainingMicrotaskQueue = true; while (_microTaskQueue.length) { var queue = _microTaskQueue; _microTaskQueue = []; for (var i = 0; i < queue.length; i++) { var task = queue[i]; try { task.zone.runTask(task, null, null); } catch (e) { consoleError(e); } } } while (_uncaughtPromiseErrors.length) { var uncaughtPromiseErrors = _uncaughtPromiseErrors; _uncaughtPromiseErrors = []; var _loop_1 = function(i) { var uncaughtPromiseError = uncaughtPromiseErrors[i]; try { uncaughtPromiseError.zone.runGuarded(function () { throw uncaughtPromiseError; }); } catch (e) { consoleError(e); } }; for (var i = 0; i < uncaughtPromiseErrors.length; i++) { _loop_1(i); } } _isDrainingMicrotaskQueue = false; _drainScheduled = false; } } function isThenable(value) { return value && value.then; } function forwardResolution(value) { return value; } function forwardRejection(rejection) { return ZoneAwarePromise.reject(rejection); } var symbolState = __symbol__('state'); var symbolValue = __symbol__('value'); var source = 'Promise.then'; var UNRESOLVED = null; var RESOLVED = true; var REJECTED = false; var REJECTED_NO_CATCH = 0; function makeResolver(promise, state) { return function (v) { resolvePromise(promise, state, v); // Do not return value or you will break the Promise spec. }; } function resolvePromise(promise, state, value) { if (promise[symbolState] === UNRESOLVED) { if (value instanceof ZoneAwarePromise && value[symbolState] !== UNRESOLVED) { clearRejectedNoCatch(value); resolvePromise(promise, value[symbolState], value[symbolValue]); } else if (isThenable(value)) { value.then(makeResolver(promise, state), makeResolver(promise, false)); } else { promise[symbolState] = state; var queue = promise[symbolValue]; promise[symbolValue] = value; for (var i = 0; i < queue.length;) { scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]); } if (queue.length == 0 && state == REJECTED) { promise[symbolState] = REJECTED_NO_CATCH; try { throw new Error("Uncaught (in promise): " + value); } catch (e) { var error = e; error.rejection = value; error.promise = promise; error.zone = Zone.current; error.task = Zone.currentTask; _uncaughtPromiseErrors.push(error); scheduleQueueDrain(); } } } } // Resolving an already resolved promise is a noop. return promise; } function clearRejectedNoCatch(promise) { if (promise[symbolState] === REJECTED_NO_CATCH) { promise[symbolState] = REJECTED; for (var i = 0; i < _uncaughtPromiseErrors.length; i++) { if (promise === _uncaughtPromiseErrors[i].promise) { _uncaughtPromiseErrors.splice(i, 1); break; } } } } function scheduleResolveOrReject(promise, zone, chainPromise, onFulfilled, onRejected) { clearRejectedNoCatch(promise); var delegate = promise[symbolState] ? onFulfilled || forwardResolution : onRejected || forwardRejection; zone.scheduleMicroTask(source, function () { try { resolvePromise(chainPromise, true, zone.run(delegate, null, [promise[symbolValue]])); } catch (error) { resolvePromise(chainPromise, false, error); } }); } var ZoneAwarePromise = (function () { function ZoneAwarePromise(executor) { var promise = this; promise[symbolState] = UNRESOLVED; promise[symbolValue] = []; // queue; try { executor && executor(makeResolver(promise, RESOLVED), makeResolver(promise, REJECTED)); } catch (e) { resolvePromise(promise, false, e); } } ZoneAwarePromise.resolve = function (value) { return resolvePromise(new this(null), RESOLVED, value); }; ZoneAwarePromise.reject = function (error) { return resolvePromise(new this(null), REJECTED, error); }; ZoneAwarePromise.race = function (values) { var resolve; var reject; var promise = new this(function (res, rej) { resolve = res; reject = rej; }); function onResolve(value) { promise && (promise = null || resolve(value)); } function onReject(error) { promise && (promise = null || reject(error)); } for (var _i = 0, values_1 = values; _i < values_1.length; _i++) { var value = values_1[_i]; if (!isThenable(value)) { value = this.resolve(value); } value.then(onResolve, onReject); } return promise; }; ZoneAwarePromise.all = function (values) { var resolve; var reject; var promise = new this(function (res, rej) { resolve = res; reject = rej; }); var count = 0; var resolvedValues = []; function onReject(error) { promise && reject(error); promise = null; } for (var _i = 0, values_2 = values; _i < values_2.length; _i++) { var value = values_2[_i]; if (!isThenable(value)) { value = this.resolve(value); } value.then((function (index) { return function (value) { resolvedValues[index] = value; count--; if (promise && !count) { resolve(resolvedValues); } promise == null; }; })(count), onReject); count++; } if (!count) resolve(resolvedValues); return promise; }; ZoneAwarePromise.prototype.then = function (onFulfilled, onRejected) { var chainPromise = new ZoneAwarePromise(null); var zone = Zone.current; if (this[symbolState] == UNRESOLVED) { this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected); } else { scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected); } return chainPromise; }; ZoneAwarePromise.prototype.catch = function (onRejected) { return this.then(null, onRejected); }; return ZoneAwarePromise; }()); var NativePromise = global[__symbol__('Promise')] = global.Promise; global.Promise = ZoneAwarePromise; if (NativePromise) { var NativePromiseProtototype = NativePromise.prototype; var NativePromiseThen_1 = NativePromiseProtototype[__symbol__('then')] = NativePromiseProtototype.then; NativePromiseProtototype.then = function (onResolve, onReject) { var nativePromise = this; return new ZoneAwarePromise(function (resolve, reject) { NativePromiseThen_1.call(nativePromise, resolve, reject); }).then(onResolve, onReject); }; } return global.Zone = Zone; })(typeof window === 'undefined' ? global : window); /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, /* 2 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var utils_1 = __webpack_require__(3); var WTF_ISSUE_555 = 'Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video'; var NO_EVENT_TARGET = 'ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex'.split(','); var EVENT_TARGET = 'EventTarget'; function eventTargetPatch(_global) { var apis = []; var isWtf = _global['wtf']; if (isWtf) { // Workaround for: https://github.com/google/tracing-framework/issues/555 apis = WTF_ISSUE_555.split(',').map(function (v) { return 'HTML' + v + 'Element'; }).concat(NO_EVENT_TARGET); } else if (_global[EVENT_TARGET]) { apis.push(EVENT_TARGET); } else { // Note: EventTarget is not available in all browsers, // if it's not available, we instead patch the APIs in the IDL that inherit from EventTarget apis = NO_EVENT_TARGET; } for (var i = 0; i < apis.length; i++) { var type = _global[apis[i]]; utils_1.patchEventTargetMethods(type && type.prototype); } } exports.eventTargetPatch = eventTargetPatch; /***/ }, /* 3 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {/** * Suppress closure compiler errors about unknown 'process' variable * @fileoverview * @suppress {undefinedVars} */ "use strict"; exports.zoneSymbol = Zone['__symbol__']; var _global = typeof window == 'undefined' ? global : window; function bindArguments(args, source) { for (var i = args.length - 1; i >= 0; i--) { if (typeof args[i] === 'function') { args[i] = Zone.current.wrap(args[i], source + '_' + i); } } return args; } exports.bindArguments = bindArguments; ; function patchPrototype(prototype, fnNames) { var source = prototype.constructor['name']; var _loop_1 = function(i) { var name_1 = fnNames[i]; var delegate = prototype[name_1]; if (delegate) { prototype[name_1] = (function (delegate) { return function () { return delegate.apply(this, bindArguments(arguments, source + '.' + name_1)); }; })(delegate); } }; for (var i = 0; i < fnNames.length; i++) { _loop_1(i); } } exports.patchPrototype = patchPrototype; ; exports.isWebWorker = (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope); exports.isNode = (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'); exports.isBrowser = !exports.isNode && !exports.isWebWorker && !!(typeof window !== 'undefined' && window['HTMLElement']); function patchProperty(obj, prop) { var desc = Object.getOwnPropertyDescriptor(obj, prop) || { enumerable: true, configurable: true }; // A property descriptor cannot have getter/setter and be writable // deleting the writable and value properties avoids this error: // // TypeError: property descriptors must not specify a value or be writable when a // getter or setter has been specified delete desc.writable; delete desc.value; // substr(2) cuz 'onclick' -> 'click', etc var eventName = prop.substr(2); var _prop = '_' + prop; desc.set = function (fn) { if (this[_prop]) { this.removeEventListener(eventName, this[_prop]); } if (typeof fn === 'function') { var wrapFn = function (event) { var result; result = fn.apply(this, arguments); if (result != undefined && !result) event.preventDefault(); }; this[_prop] = wrapFn; this.addEventListener(eventName, wrapFn, false); } else { this[_prop] = null; } }; desc.get = function () { return this[_prop]; }; Object.defineProperty(obj, prop, desc); } exports.patchProperty = patchProperty; ; function patchOnProperties(obj, properties) { var onProperties = []; for (var prop in obj) { if (prop.substr(0, 2) == 'on') { onProperties.push(prop); } } for (var j = 0; j < onProperties.length; j++) { patchProperty(obj, onProperties[j]); } if (properties) { for (var i = 0; i < properties.length; i++) { patchProperty(obj, 'on' + properties[i]); } } } exports.patchOnProperties = patchOnProperties; ; var EVENT_TASKS = exports.zoneSymbol('eventTasks'); var ADD_EVENT_LISTENER = 'addEventListener'; var REMOVE_EVENT_LISTENER = 'removeEventListener'; var SYMBOL_ADD_EVENT_LISTENER = exports.zoneSymbol(ADD_EVENT_LISTENER); var SYMBOL_REMOVE_EVENT_LISTENER = exports.zoneSymbol(REMOVE_EVENT_LISTENER); function findExistingRegisteredTask(target, handler, name, capture, remove) { var eventTasks = target[EVENT_TASKS]; if (eventTasks) { for (var i = 0; i < eventTasks.length; i++) { var eventTask = eventTasks[i]; var data = eventTask.data; if (data.handler === handler && data.useCapturing === capture && data.eventName === name) { if (remove) { eventTasks.splice(i, 1); } return eventTask; } } } return null; } function attachRegisteredEvent(target, eventTask) { var eventTasks = target[EVENT_TASKS]; if (!eventTasks) { eventTasks = target[EVENT_TASKS] = []; } eventTasks.push(eventTask); } function scheduleEventListener(eventTask) { var meta = eventTask.data; attachRegisteredEvent(meta.target, eventTask); return meta.target[SYMBOL_ADD_EVENT_LISTENER](meta.eventName, eventTask.invoke, meta.useCapturing); } function cancelEventListener(eventTask) { var meta = eventTask.data; findExistingRegisteredTask(meta.target, eventTask.invoke, meta.eventName, meta.useCapturing, true); meta.target[SYMBOL_REMOVE_EVENT_LISTENER](meta.eventName, eventTask.invoke, meta.useCapturing); } function zoneAwareAddEventListener(self, args) { var eventName = args[0]; var handler = args[1]; var useCapturing = args[2] || false; // - Inside a Web Worker, `this` is undefined, the context is `global` // - When `addEventListener` is called on the global context in strict mode, `this` is undefined // see https://github.com/angular/zone.js/issues/190 var target = self || _global; var delegate = null; if (typeof handler == 'function') { delegate = handler; } else if (handler && handler.handleEvent) { delegate = function (event) { return handler.handleEvent(event); }; } var validZoneHandler = false; try { // In cross site contexts (such as WebDriver frameworks like Selenium), // accessing the handler object here will cause an exception to be thrown which // will fail tests prematurely. validZoneHandler = handler && handler.toString() === "[object FunctionWrapper]"; } catch (e) { // Returning nothing here is fine, because objects in a cross-site context are unusable return; } // Ignore special listeners of IE11 & Edge dev tools, see https://github.com/angular/zone.js/issues/150 if (!delegate || validZoneHandler) { return target[SYMBOL_ADD_EVENT_LISTENER](eventName, handler, useCapturing); } var eventTask = findExistingRegisteredTask(target, handler, eventName, useCapturing, false); if (eventTask) { // we already registered, so this will have noop. return target[SYMBOL_ADD_EVENT_LISTENER](eventName, eventTask.invoke, useCapturing); } var zone = Zone.current; var source = target.constructor['name'] + '.addEventListener:' + eventName; var data = { target: target, eventName: eventName, name: eventName, useCapturing: useCapturing, handler: handler }; zone.scheduleEventTask(source, delegate, data, scheduleEventListener, cancelEventListener); } function zoneAwareRemoveEventListener(self, args) { var eventName = args[0]; var handler = args[1]; var useCapturing = args[2] || false; // - Inside a Web Worker, `this` is undefined, the context is `global` // - When `addEventListener` is called on the global context in strict mode, `this` is undefined // see https://github.com/angular/zone.js/issues/190 var target = self || _global; var eventTask = findExistingRegisteredTask(target, handler, eventName, useCapturing, true); if (eventTask) { eventTask.zone.cancelTask(eventTask); } else { target[SYMBOL_REMOVE_EVENT_LISTENER](eventName, handler, useCapturing); } } function patchEventTargetMethods(obj) { if (obj && obj.addEventListener) { patchMethod(obj, ADD_EVENT_LISTENER, function () { return zoneAwareAddEventListener; }); patchMethod(obj, REMOVE_EVENT_LISTENER, function () { return zoneAwareRemoveEventListener; }); return true; } else { return false; } } exports.patchEventTargetMethods = patchEventTargetMethods; ; var originalInstanceKey = exports.zoneSymbol('originalInstance'); // wrap some native API on `window` function patchClass(className) { var OriginalClass = _global[className]; if (!OriginalClass) return; _global[className] = function () { var a = bindArguments(arguments, className); switch (a.length) { case 0: this[originalInstanceKey] = new OriginalClass(); break; case 1: this[originalInstanceKey] = new OriginalClass(a[0]); break; case 2: this[originalInstanceKey] = new OriginalClass(a[0], a[1]); break; case 3: this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]); break; case 4: this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]); break; default: throw new Error('Arg list too long.'); } }; var instance = new OriginalClass(function () { }); var prop; for (prop in instance) { (function (prop) { if (typeof instance[prop] === 'function') { _global[className].prototype[prop] = function () { return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments); }; } else { Object.defineProperty(_global[className].prototype, prop, { set: function (fn) { if (typeof fn === 'function') { this[originalInstanceKey][prop] = Zone.current.wrap(fn, className + '.' + prop); } else { this[originalInstanceKey][prop] = fn; } }, get: function () { return this[originalInstanceKey][prop]; } }); } }(prop)); } for (prop in OriginalClass) { if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) { _global[className][prop] = OriginalClass[prop]; } } } exports.patchClass = patchClass; ; function createNamedFn(name, delegate) { try { return (Function('f', "return function " + name + "(){return f(this, arguments)}"))(delegate); } catch (e) { // if we fail, we must be CSP, just return delegate. return function () { return delegate(this, arguments); }; } } exports.createNamedFn = createNamedFn; function patchMethod(target, name, patchFn) { var proto = target; while (proto && !proto.hasOwnProperty(name)) { proto = Object.getPrototypeOf(proto); } if (!proto && target[name]) { // somehow we did not find it, but we can see it. This happens on IE for Window properties. proto = target; } var delegateName = exports.zoneSymbol(name); var delegate; if (proto && !(delegate = proto[delegateName])) { delegate = proto[delegateName] = proto[name]; proto[name] = createNamedFn(name, patchFn(delegate, delegateName, name)); } return delegate; } exports.patchMethod = patchMethod; /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, /* 4 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var utils_1 = __webpack_require__(3); /* * This is necessary for Chrome and Chrome mobile, to enable * things like redefining `createdCallback` on an element. */ var _defineProperty = Object.defineProperty; var _getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var _create = Object.create; var unconfigurablesKey = utils_1.zoneSymbol('unconfigurables'); function propertyPatch() { Object.defineProperty = function (obj, prop, desc) { if (isUnconfigurable(obj, prop)) { throw new TypeError('Cannot assign to read only property \'' + prop + '\' of ' + obj); } if (prop !== 'prototype') { desc = rewriteDescriptor(obj, prop, desc); } return _defineProperty(obj, prop, desc); }; Object.defineProperties = function (obj, props) { Object.keys(props).forEach(function (prop) { Object.defineProperty(obj, prop, props[prop]); }); return obj; }; Object.create = function (obj, proto) { if (typeof proto === 'object') { Object.keys(proto).forEach(function (prop) { proto[prop] = rewriteDescriptor(obj, prop, proto[prop]); }); } return _create(obj, proto); }; Object.getOwnPropertyDescriptor = function (obj, prop) { var desc = _getOwnPropertyDescriptor(obj, prop); if (isUnconfigurable(obj, prop)) { desc.configurable = false; } return desc; }; } exports.propertyPatch = propertyPatch; ; function _redefineProperty(obj, prop, desc) { desc = rewriteDescriptor(obj, prop, desc); return _defineProperty(obj, prop, desc); } exports._redefineProperty = _redefineProperty; ; function isUnconfigurable(obj, prop) { return obj && obj[unconfigurablesKey] && obj[unconfigurablesKey][prop]; } function rewriteDescriptor(obj, prop, desc) { desc.configurable = true; if (!desc.configurable) { if (!obj[unconfigurablesKey]) { _defineProperty(obj, unconfigurablesKey, { writable: true, value: {} }); } obj[unconfigurablesKey][prop] = true; } return desc; } /***/ }, /* 5 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var define_property_1 = __webpack_require__(4); var utils_1 = __webpack_require__(3); function registerElementPatch(_global) { if (!utils_1.isBrowser || !('registerElement' in _global.document)) { return; } var _registerElement = document.registerElement; var callbacks = [ 'createdCallback', 'attachedCallback', 'detachedCallback', 'attributeChangedCallback' ]; document.registerElement = function (name, opts) { if (opts && opts.prototype) { callbacks.forEach(function (callback) { var source = 'Document.registerElement::' + callback; if (opts.prototype.hasOwnProperty(callback)) { var descriptor = Object.getOwnPropertyDescriptor(opts.prototype, callback); if (descriptor && descriptor.value) { descriptor.value = Zone.current.wrap(descriptor.value, source); define_property_1._redefineProperty(opts.prototype, callback, descriptor); } else { opts.prototype[callback] = Zone.current.wrap(opts.prototype[callback], source); } } else if (opts.prototype[callback]) { opts.prototype[callback] = Zone.current.wrap(opts.prototype[callback], source); } }); } return _registerElement.apply(document, [name, opts]); }; } exports.registerElementPatch = registerElementPatch; /***/ }, /* 6 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var webSocketPatch = __webpack_require__(7); var utils_1 = __webpack_require__(3); var eventNames = 'copy cut paste abort blur focus canplay canplaythrough change click contextmenu dblclick drag dragend dragenter dragleave dragover dragstart drop durationchange emptied ended input invalid keydown keypress keyup load loadeddata loadedmetadata loadstart message mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup pause play playing progress ratechange reset scroll seeked seeking select show stalled submit suspend timeupdate volumechange waiting mozfullscreenchange mozfullscreenerror mozpointerlockchange mozpointerlockerror error webglcontextrestored webglcontextlost webglcontextcreationerror'.split(' '); function propertyDescriptorPatch(_global) { if (utils_1.isNode) { return; } var supportsWebSocket = typeof WebSocket !== 'undefined'; if (canPatchViaPropertyDescriptor()) { // for browsers that we can patch the descriptor: Chrome & Firefox if (utils_1.isBrowser) { utils_1.patchOnProperties(HTMLElement.prototype, eventNames); } utils_1.patchOnProperties(XMLHttpRequest.prototype, null); if (typeof IDBIndex !== 'undefined') { utils_1.patchOnProperties(IDBIndex.prototype, null); utils_1.patchOnProperties(IDBRequest.prototype, null); utils_1.patchOnProperties(IDBOpenDBRequest.prototype, null); utils_1.patchOnProperties(IDBDatabase.prototype, null); utils_1.patchOnProperties(IDBTransaction.prototype, null); utils_1.patchOnProperties(IDBCursor.prototype, null); } if (supportsWebSocket) { utils_1.patchOnProperties(WebSocket.prototype, null); } } else { // Safari, Android browsers (Jelly Bean) patchViaCapturingAllTheEvents(); utils_1.patchClass('XMLHttpRequest'); if (supportsWebSocket) { webSocketPatch.apply(_global); } } } exports.propertyDescriptorPatch = propertyDescriptorPatch; function canPatchViaPropertyDescriptor() { if (utils_1.isBrowser && !Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'onclick') && typeof Element !== 'undefined') { // WebKit https://bugs.webkit.org/show_bug.cgi?id=134364 // IDL interface attributes are not configurable var desc = Object.getOwnPropertyDescriptor(Element.prototype, 'onclick'); if (desc && !desc.configurable) return false; } Object.defineProperty(XMLHttpRequest.prototype, 'onreadystatechange', { get: function () { return true; } }); var req = new XMLHttpRequest(); var result = !!req.onreadystatechange; Object.defineProperty(XMLHttpRequest.prototype, 'onreadystatechange', {}); return result; } ; var unboundKey = utils_1.zoneSymbol('unbound'); // Whenever any eventListener fires, we check the eventListener target and all parents // for `onwhatever` properties and replace them with zone-bound functions // - Chrome (for now) function patchViaCapturingAllTheEvents() { var _loop_1 = function(i) { var property = eventNames[i]; var onproperty = 'on' + property; document.addEventListener(property, function (event) { var elt = event.target, bound, source; if (elt) { source = elt.constructor['name'] + '.' + onproperty; } else { source = 'unknown.' + onproperty; } while (elt) { if (elt[onproperty] && !elt[onproperty][unboundKey]) { bound = Zone.current.wrap(elt[onproperty], source); bound[unboundKey] = elt[onproperty]; elt[onproperty] = bound; } elt = elt.parentElement; } }, true); }; for (var i = 0; i < eventNames.length; i++) { _loop_1(i); } ; } ; /***/ }, /* 7 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var utils_1 = __webpack_require__(3); // we have to patch the instance since the proto is non-configurable function apply(_global) { var WS = _global.WebSocket; // On Safari window.EventTarget doesn't exist so need to patch WS add/removeEventListener // On older Chrome, no need since EventTarget was already patched if (!_global.EventTarget) { utils_1.patchEventTargetMethods(WS.prototype); } _global.WebSocket = function (a, b) { var socket = arguments.length > 1 ? new WS(a, b) : new WS(a); var proxySocket; // Safari 7.0 has non-configurable own 'onmessage' and friends properties on the socket instance var onmessageDesc = Object.getOwnPropertyDescriptor(socket, 'onmessage'); if (onmessageDesc && onmessageDesc.configurable === false) { proxySocket = Object.create(socket); ['addEventListener', 'removeEventListener', 'send', 'close'].forEach(function (propName) { proxySocket[propName] = function () { return socket[propName].apply(socket, arguments); }; }); } else { // we can patch the real socket proxySocket = socket; } utils_1.patchOnProperties(proxySocket, ['close', 'error', 'message', 'open']); return proxySocket; }; for (var prop in WS) { _global.WebSocket[prop] = WS[prop]; } } exports.apply = apply; /***/ }, /* 8 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var utils_1 = __webpack_require__(3); function patchTimer(window, setName, cancelName, nameSuffix) { var setNative = null; var clearNative = null; setName += nameSuffix; cancelName += nameSuffix; function scheduleTask(task) { var data = task.data; data.args[0] = task.invoke; data.handleId = setNative.apply(window, data.args); return task; } function clearTask(task) { return clearNative(task.data.handleId); } setNative = utils_1.patchMethod(window, setName, function (delegate) { return function (self, args) { if (typeof args[0] === 'function') { var zone = Zone.current; var options = { handleId: null, isPeriodic: nameSuffix === 'Interval', delay: (nameSuffix === 'Timeout' || nameSuffix === 'Interval') ? args[1] || 0 : null, args: args }; return zone.scheduleMacroTask(setName, args[0], options, scheduleTask, clearTask); } else { // cause an error by calling it directly. return delegate.apply(window, args); } }; }); clearNative = utils_1.patchMethod(window, cancelName, function (delegate) { return function (self, args) { var task = args[0]; if (task && typeof task.type === 'string') { if (task.cancelFn && task.data.isPeriodic || task.runCount === 0) { // Do not cancel already canceled functions task.zone.cancelTask(task); } } else { // cause an error by calling it directly. delegate.apply(window, args); } }; }); } exports.patchTimer = patchTimer; /***/ } /******/ ]); /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(259))) /***/ } /******/ ]); //# sourceMappingURL=polyfills.map
nawalgupta/angular2-shop
dist/polyfills.bundle.js
JavaScript
mit
303,126
[ 30522, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1013, 1006, 3853, 1006, 14184, 1007, 1063, 1013, 1013, 4773, 23947, 27927, 20528, 2361, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1013, 1013, 1013, 16500, 1037, 1046, 3385, 2361, 2655, 5963, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#include <iostream> #include <locale> #include <sstream> #include "hash.h" #include "bloomierHasher.h" using namespace std; namespace bloomier { void BloomierHasher::getNeighborhood(string key, unsigned char result[]) { Hash::getHash(key, hashSeed, m, k, result); // for (int i = 0; i < k; i++) // { // cout << result[i] << endl; // } } void BloomierHasher::getM(string key, unsigned char array[], int byteSize) { locale loc; const collate<char>& coll = use_facet<collate<char> >(loc); int seed = coll.hash(key.data(),key.data()+key.length()); srand (seed); for (int i = 0; i < byteSize; i++) array[i] = rand() % 255; } }
CSNoyes/BitAV
ScanningEngine/Cpp/libs/bloomierFilter/core/bloomierHasher.cpp
C++
gpl-2.0
677
[ 30522, 1001, 2421, 1026, 16380, 25379, 1028, 1001, 2421, 1026, 2334, 2063, 1028, 1001, 2421, 1026, 7020, 25379, 1028, 1001, 2421, 1000, 23325, 1012, 1044, 1000, 1001, 2421, 1000, 13426, 3771, 14949, 5886, 1012, 1044, 1000, 2478, 3415, 15327...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// // DO NOT MODIFY! THIS IS AUTOGENERATED FILE! // namespace Xilium.CefGlue { using System; using System.Collections.Generic; using System.Diagnostics; using System.Runtime.InteropServices; using Xilium.CefGlue.Interop; // Role: PROXY public sealed unsafe partial class CefV8Value : IDisposable { internal static CefV8Value FromNative(cef_v8value_t* ptr) { return new CefV8Value(ptr); } internal static CefV8Value FromNativeOrNull(cef_v8value_t* ptr) { if (ptr == null) return null; return new CefV8Value(ptr); } private cef_v8value_t* _self; private CefV8Value(cef_v8value_t* ptr) { if (ptr == null) throw new ArgumentNullException("ptr"); _self = ptr; } ~CefV8Value() { if (_self != null) { Release(); _self = null; } } public void Dispose() { if (_self != null) { Release(); _self = null; } GC.SuppressFinalize(this); } internal void AddRef() { cef_v8value_t.add_ref(_self); } internal bool Release() { return cef_v8value_t.release(_self) != 0; } internal bool HasOneRef { get { return cef_v8value_t.has_one_ref(_self) != 0; } } internal cef_v8value_t* ToNative() { AddRef(); return _self; } } }
mindthegab/SFE-Minuet-DesktopClient
minuet/CefGlue/Classes.g/CefV8Value.g.cs
C#
apache-2.0
1,717
[ 30522, 1013, 1013, 1013, 1013, 2079, 2025, 19933, 999, 2023, 2003, 8285, 6914, 16848, 5371, 999, 1013, 1013, 3415, 15327, 8418, 21816, 1012, 8292, 2546, 23296, 5657, 1063, 2478, 2291, 1025, 2478, 2291, 1012, 6407, 1012, 12391, 1025, 2478, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php /** * The template for displaying paged pages. * * Learn more: http://codex.wordpress.org/Template_Hierarchy * * @package WordPress * @subpackage <%= NombreTema %> * @since <%= VersionTema %> */
xDae/generator-wptheme
app/templates/Base-Hierarchy/_paged.php
PHP
mit
210
[ 30522, 1026, 1029, 25718, 1013, 1008, 1008, 1008, 1996, 23561, 2005, 14962, 3931, 2094, 5530, 1012, 1008, 1008, 4553, 2062, 1024, 8299, 1024, 1013, 1013, 15763, 1012, 2773, 20110, 1012, 8917, 1013, 23561, 1035, 12571, 1008, 1008, 1030, 7427...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# 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. import urllib.parse from openstack import exceptions from openstack import resource class Resource(resource.Resource): @classmethod def find(cls, session, name_or_id, ignore_missing=True, **params): """Find a resource by its name or id. :param session: The session to use for making this request. :type session: :class:`~keystoneauth1.adapter.Adapter` :param name_or_id: This resource's identifier, if needed by the request. The default is ``None``. :param bool ignore_missing: When set to ``False`` :class:`~openstack.exceptions.ResourceNotFound` will be raised when the resource does not exist. When set to ``True``, None will be returned when attempting to find a nonexistent resource. :param dict params: Any additional parameters to be passed into underlying methods, such as to :meth:`~openstack.resource.Resource.existing` in order to pass on URI parameters. :return: The :class:`Resource` object matching the given name or id or None if nothing matches. :raises: :class:`openstack.exceptions.DuplicateResource` if more than one resource is found for this request. :raises: :class:`openstack.exceptions.ResourceNotFound` if nothing is found and ignore_missing is ``False``. """ session = cls._get_session(session) # Try to short-circuit by looking directly for a matching ID. try: match = cls.existing( id=name_or_id, connection=session._get_connection(), **params) return match.fetch(session) except exceptions.SDKException: # DNS may return 400 when we try to do GET with name pass if ('name' in cls._query_mapping._mapping.keys() and 'name' not in params): params['name'] = name_or_id data = cls.list(session, **params) result = cls._get_one_match(name_or_id, data) if result is not None: return result if ignore_missing: return None raise exceptions.ResourceNotFound( "No %s found for %s" % (cls.__name__, name_or_id)) @classmethod def _get_next_link(cls, uri, response, data, marker, limit, total_yielded): next_link = None params = {} if isinstance(data, dict): links = data.get('links') if links: next_link = links.get('next') total = data.get('metadata', {}).get('total_count') if total: # We have a kill switch total_count = int(total) if total_count <= total_yielded: return None, params # Parse params from Link (next page URL) into params. # This prevents duplication of query parameters that with large # number of pages result in HTTP 414 error eventually. if next_link: parts = urllib.parse.urlparse(next_link) query_params = urllib.parse.parse_qs(parts.query) params.update(query_params) next_link = urllib.parse.urljoin(next_link, parts.path) # If we still have no link, and limit was given and is non-zero, # and the number of records yielded equals the limit, then the user # is playing pagination ball so we should go ahead and try once more. if not next_link and limit: next_link = uri params['marker'] = marker params['limit'] = limit return next_link, params
stackforge/python-openstacksdk
openstack/dns/v2/_base.py
Python
apache-2.0
4,338
[ 30522, 1001, 7000, 2104, 1996, 15895, 6105, 1010, 2544, 1016, 1012, 1014, 1006, 1996, 1000, 6105, 1000, 1007, 1025, 2017, 2089, 1001, 2025, 2224, 2023, 5371, 3272, 1999, 12646, 2007, 1996, 6105, 1012, 2017, 2089, 6855, 1001, 1037, 6100, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
--- title: The Little Eye Blog # View. # 1 = List # 2 = Compact # 3 = Card view: 3 aliases: ["/the-little-eye/"] # Optional header image (relative to `static/img/` folder). header: caption: "" image: "" --- ### A Point of View on Microscopy Research, the History of the Microscope and a hint of Interdisciplinary Academia My aim with this blog is to share with others some of my interests, mainly in microscopy and bioimaging. You can expect to see a few different styles of posts as detailed in  [Welcome to The Little Eye]({{< relref "20170619_intro" >}}). ### Why “The Little Eye”? I’ve taken the name The Little Eye from Galileo Galilei who coined his early compound microscopes: "Occhiolino", Italian for "little eye". The term "microscope" was coined by Giovanni Faber, a contempory of Galileo, and comes from the Greek words for "small" and "to look at", intended to be analogous to "telescope" (see [Welcome to The Little Eye]({{< relref "20170619_intro" >}})).
ChasNelson1990/chasnelson.co.uk
content/posts/the-little-eye/_index.md
Markdown
mit
994
[ 30522, 1011, 1011, 1011, 2516, 1024, 1996, 2210, 3239, 9927, 1001, 3193, 1012, 1001, 1015, 1027, 2862, 1001, 1016, 1027, 9233, 1001, 1017, 1027, 4003, 3193, 1024, 1017, 14593, 2229, 1024, 1031, 1000, 1013, 1996, 1011, 2210, 1011, 3239, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/***************************************************************** * $Id: std_comptype.h 0001 2016-07-13T15:39:19 rutger $ * * Copyright (C) 2016 Red-Bag. All rights reserved. * This file is part of the Biluna STD project. * * See http://www.biluna.com for further details. *****************************************************************/ #ifndef STD_COMPTYPE_H #define STD_COMPTYPE_H #include "rb_objectcontainer.h" /** * Component type such as flange type as defined * in the parent dimension standard */ class STD_CompType : public RB_ObjectContainer { public: STD_CompType(const QString& id = "", RB_ObjectBase* p = NULL, const QString& n = "STD_CompType", RB_ObjectFactory* f = NULL); STD_CompType(STD_CompType* obj); virtual ~STD_CompType(); private: void createMembers(); }; #endif /*STD_COMPTYPE_H*/
biluna/biluna
pcalc/src/model/std_comptype.h
C
gpl-2.0
873
[ 30522, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package org.springframework.security.config.annotation.web.socket; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.beans.factory.SmartInitializingSingleton; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.core.Ordered; import org.springframework.core.annotation.Order; import org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver; import org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler; import org.springframework.messaging.simp.config.ChannelRegistration; import org.springframework.security.access.AccessDecisionVoter; import org.springframework.security.access.vote.AffirmativeBased; import org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry; import org.springframework.security.messaging.access.expression.MessageExpressionVoter; import org.springframework.security.messaging.access.intercept.ChannelSecurityInterceptor; import org.springframework.security.messaging.access.intercept.MessageSecurityMetadataSource; import org.springframework.security.messaging.context.AuthenticationPrincipalArgumentResolver; import org.springframework.security.messaging.context.SecurityContextChannelInterceptor; import org.springframework.security.messaging.web.csrf.CsrfChannelInterceptor; import org.springframework.security.messaging.web.socket.server.CsrfTokenHandshakeInterceptor; import org.springframework.util.AntPathMatcher; import org.springframework.util.PathMatcher; import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping; import org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer; import org.springframework.web.socket.config.annotation.StompEndpointRegistry; import org.springframework.web.socket.server.HandshakeInterceptor; import org.springframework.web.socket.server.support.WebSocketHttpRequestHandler; import org.springframework.web.socket.sockjs.SockJsService; import org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler; import org.springframework.web.socket.sockjs.transport.TransportHandlingSockJsService; /** * Allows configuring WebSocket Authorization. * * <p> * For example: * </p> * * <pre> * &#064;Configuration * public class WebSocketSecurityConfig extends * AbstractSecurityWebSocketMessageBrokerConfigurer { * * &#064;Override * protected void configureInbound(MessageSecurityMetadataSourceRegistry messages) { * messages.simpDestMatchers(&quot;/user/queue/errors&quot;).permitAll() * .simpDestMatchers(&quot;/admin/**&quot;).hasRole(&quot;ADMIN&quot;).anyMessage() * .authenticated(); * } * } * </pre> * * * @since 4.0 * @author Rob Winch */ @Order(Ordered.HIGHEST_PRECEDENCE + 100) public abstract class AbstractSecurityWebSocketMessageBrokerConfigurer extends AbstractWebSocketMessageBrokerConfigurer implements SmartInitializingSingleton { private final WebSocketMessageSecurityMetadataSourceRegistry inboundRegistry = new WebSocketMessageSecurityMetadataSourceRegistry(); private ApplicationContext context; public void registerStompEndpoints(StompEndpointRegistry registry) { } @Override public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) { argumentResolvers.add(new AuthenticationPrincipalArgumentResolver()); } @Override public final void configureClientInboundChannel(ChannelRegistration registration) { ChannelSecurityInterceptor inboundChannelSecurity = inboundChannelSecurity(); registration.setInterceptors(securityContextChannelInterceptor()); if (!sameOriginDisabled()) { registration.setInterceptors(csrfChannelInterceptor()); } if (inboundRegistry.containsMapping()) { registration.setInterceptors(inboundChannelSecurity); } customizeClientInboundChannel(registration); } private PathMatcher getDefaultPathMatcher() { try { return context.getBean(SimpAnnotationMethodMessageHandler.class).getPathMatcher(); } catch(NoSuchBeanDefinitionException e) { return new AntPathMatcher(); } } /** * <p> * Determines if a CSRF token is required for connecting. This protects against remote * sites from connecting to the application and being able to read/write data over the * connection. The default is false (the token is required). * </p> * <p> * Subclasses can override this method to disable CSRF protection * </p> * * @return false if a CSRF token is required for connecting, else true */ protected boolean sameOriginDisabled() { return false; } /** * Allows subclasses to customize the configuration of the {@link ChannelRegistration} * . * * @param registration the {@link ChannelRegistration} to customize */ protected void customizeClientInboundChannel(ChannelRegistration registration) { } @Bean public CsrfChannelInterceptor csrfChannelInterceptor() { return new CsrfChannelInterceptor(); } @Bean public ChannelSecurityInterceptor inboundChannelSecurity() { ChannelSecurityInterceptor channelSecurityInterceptor = new ChannelSecurityInterceptor( inboundMessageSecurityMetadataSource()); List<AccessDecisionVoter<? extends Object>> voters = new ArrayList<AccessDecisionVoter<? extends Object>>(); voters.add(new MessageExpressionVoter<Object>()); AffirmativeBased manager = new AffirmativeBased(voters); channelSecurityInterceptor.setAccessDecisionManager(manager); return channelSecurityInterceptor; } @Bean public SecurityContextChannelInterceptor securityContextChannelInterceptor() { return new SecurityContextChannelInterceptor(); } @Bean public MessageSecurityMetadataSource inboundMessageSecurityMetadataSource() { configureInbound(inboundRegistry); return inboundRegistry.createMetadataSource(); } /** * * @param messages */ protected void configureInbound(MessageSecurityMetadataSourceRegistry messages) { } private static class WebSocketMessageSecurityMetadataSourceRegistry extends MessageSecurityMetadataSourceRegistry { @Override public MessageSecurityMetadataSource createMetadataSource() { return super.createMetadataSource(); } @Override protected boolean containsMapping() { return super.containsMapping(); } @Override protected boolean isSimpDestPathMatcherConfigured() { return super.isSimpDestPathMatcherConfigured(); } } @Autowired public void setApplicationContext(ApplicationContext context) { this.context = context; } public void afterSingletonsInstantiated() { if (sameOriginDisabled()) { return; } String beanName = "stompWebSocketHandlerMapping"; SimpleUrlHandlerMapping mapping = context.getBean(beanName, SimpleUrlHandlerMapping.class); Map<String, Object> mappings = mapping.getHandlerMap(); for (Object object : mappings.values()) { if (object instanceof SockJsHttpRequestHandler) { SockJsHttpRequestHandler sockjsHandler = (SockJsHttpRequestHandler) object; SockJsService sockJsService = sockjsHandler.getSockJsService(); if (!(sockJsService instanceof TransportHandlingSockJsService)) { throw new IllegalStateException( "sockJsService must be instance of TransportHandlingSockJsService got " + sockJsService); } TransportHandlingSockJsService transportHandlingSockJsService = (TransportHandlingSockJsService) sockJsService; List<HandshakeInterceptor> handshakeInterceptors = transportHandlingSockJsService .getHandshakeInterceptors(); List<HandshakeInterceptor> interceptorsToSet = new ArrayList<HandshakeInterceptor>( handshakeInterceptors.size() + 1); interceptorsToSet.add(new CsrfTokenHandshakeInterceptor()); interceptorsToSet.addAll(handshakeInterceptors); transportHandlingSockJsService .setHandshakeInterceptors(interceptorsToSet); } else if (object instanceof WebSocketHttpRequestHandler) { WebSocketHttpRequestHandler handler = (WebSocketHttpRequestHandler) object; List<HandshakeInterceptor> handshakeInterceptors = handler .getHandshakeInterceptors(); List<HandshakeInterceptor> interceptorsToSet = new ArrayList<HandshakeInterceptor>( handshakeInterceptors.size() + 1); interceptorsToSet.add(new CsrfTokenHandshakeInterceptor()); interceptorsToSet.addAll(handshakeInterceptors); handler.setHandshakeInterceptors(interceptorsToSet); } else { throw new IllegalStateException( "Bean " + beanName + " is expected to contain mappings to either a SockJsHttpRequestHandler or a WebSocketHttpRequestHandler but got " + object); } } if (inboundRegistry.containsMapping() && !inboundRegistry.isSimpDestPathMatcherConfigured()) { PathMatcher pathMatcher = getDefaultPathMatcher(); inboundRegistry.simpDestPathMatcher(pathMatcher); } } }
jmnarloch/spring-security
config/src/main/java/org/springframework/security/config/annotation/web/socket/AbstractSecurityWebSocketMessageBrokerConfigurer.java
Java
apache-2.0
9,662
[ 30522, 1013, 1008, 1008, 9385, 2526, 1011, 2297, 1996, 2434, 3166, 2030, 6048, 1012, 1008, 1008, 7000, 2104, 1996, 15895, 6105, 1010, 2544, 1016, 1012, 1014, 1006, 1996, 1000, 6105, 1000, 1007, 1025, 2017, 2089, 2025, 1008, 2224, 2023, 53...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<? // DATABASE define("DB_SERVER", "localhost"); //the mysql server address - often, localhost define("DB_USERNAME", "root"); //the mysql username define("DB_PASSWORD", "11913431"); //the mysql password define("DB_NAME", "draygon"); //the name of the mysql database // CLIENT define("CLIENT_NAME", "me"); //the name of the client company define("CLIENT_EMAIL", "deankinns@gmail.com"); //the email address that the contact form will go to // WEBSITE define("WEBSITE_URL", $_SERVER['HTTP_HOST']); //the website URL, without the http:// // WEBSITE FRONT END CONFIGURATION define("TITLE_APPEND", " - " . CLIENT_NAME); //the value entered here will be appended to all page titles (can be blank) // - will be overwritten by SEO title define("DEFAULT_TITLE", "Security Fencing Contractor Services - Taunton, Somerset, Devon, Dorset, Cornwall"); //the default page title, used if no title set by CMS and for the Home Page define("META_KEYWORDS", "taunton fencing contractor, south west fencing contractor, taunton fencing services, high security fencing contractors, security gate installation somerset, , close board fencing installation, wooden fencing taunton, automatic driveway gates, security barrier installation somerset, building site security fencing somerset and devon, site hording installation somerset, electrical fence installation somerset, , residential railings contractor taunton, commercial fencing fitter devon and cornwall, jackson expert installer"); //comma separated list of keywords - used when no keywords set in the CMS define("META_DESCRIPTION", ""); //default META Description - used when no description set in the CMS
snider/draygonknights
server/app/classes/config.php
PHP
mit
1,743
[ 30522, 1026, 1029, 1013, 1013, 7809, 9375, 1006, 1000, 16962, 1035, 8241, 1000, 1010, 1000, 2334, 15006, 2102, 1000, 1007, 1025, 1013, 1013, 1996, 2026, 2015, 4160, 2140, 8241, 4769, 1011, 2411, 1010, 2334, 15006, 2102, 9375, 1006, 1000, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
assume cs:code_seg, ds:data_seg, ss:stack_seg stack_seg segment dw 16 dup(0) stack_seg ends data_seg segment db ' Welcome to Assembly World!! ' ; 32 byte db 02h, 24h, 71h ; color attr for 3 line data_seg ends code_seg segment start: mov ax, stack_seg ; stack mov ss, ax mov sp, 10h mov ax, data_seg ; source data mov ds, ax mov ax, 0b800h ; for des of video memory mov es, ax mov ax, 0 mov cx, 3 ; outside loop times for lines mov di, 11*160+30h ; center of 12th line offset mov bx, 20h ; for color attr offset line_lp: mov si, 0 ; src index mov ah, ds:[bx] ; read attr push di ; prepare for next line add header addr push cx mov cx, 20h ; resue cx as inside loops char_lp: mov al, ds:[si] ; read char mov es:[di], ax ; write char and attr inc si add di, 2 loop char_lp inc bx ; for next attr read pop cx pop di add di, 0a0h ; for next line char display loop line_lp mov ax, 4c00h int 21h code_seg ends end start
jungle85gopy/masm5
chap9/ex9.asm
Assembly
gpl-2.0
1,112
[ 30522, 7868, 20116, 1024, 3642, 1035, 7367, 2290, 1010, 16233, 1024, 2951, 1035, 7367, 2290, 1010, 7020, 1024, 9991, 1035, 7367, 2290, 9991, 1035, 7367, 2290, 6903, 1040, 2860, 2385, 4241, 2361, 1006, 1014, 1007, 9991, 1035, 7367, 2290, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <h4 class="modal-title">全部留言</h4> </div> <div class="modal-body"> <div> <p> <input type="text" id="content" class="board-input" /> <button class="btn btn-primary btn-post">发留言</button></p> </div> <div class="share-act-zone"> <p id="searchArea"><input type="text" value="搜索留言" data-def="搜索留言" data-type="" class="search-input" /><i class="search-btn"></i></p> <div> </div> </div> <div class="board-list"> <ul id="boardList"> <li></li> </ul> <div class="page-zone"> 没有更多的留言了. </div> </div> <div class="clear"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button> </div>
CodeWall-EStudio/XZone
web/tmpl/board.all.html
HTML
mit
958
[ 30522, 1026, 4487, 2615, 2465, 1027, 1000, 16913, 2389, 1011, 20346, 1000, 1028, 1026, 6462, 2828, 1027, 1000, 6462, 1000, 2465, 1027, 1000, 2485, 1000, 2951, 1011, 19776, 1027, 1000, 16913, 2389, 1000, 9342, 1011, 5023, 1027, 1000, 2995, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
--- id: version-v4.0.0-mutations title: Mutations original_id: mutations --- Table of Contents: - [`commitMutation`](#commitmutation) - [Simple Example](#simple-example) - [Optimistic Updates](#optimistic-updates) - [Updater Configs](#updater-configs) - [Using updater and optimisticUpdater](#using-updater-and-optimisticupdater) - [Committing Local Updates](#committing-local-updates) ## `commitMutation` Use `commitMutation` to create and execute mutations. `commitMutation` has the following signature: ```javascript commitMutation( environment: Environment, config: { mutation: GraphQLTaggedNode, variables: {[name: string]: any}, onCompleted?: ?(response: ?Object, errors: ?Array<Error>) => void, onError?: ?(error: Error) => void, optimisticResponse?: Object, optimisticUpdater?: ?(store: RecordSourceSelectorProxy) => void, updater?: ?(store: RecordSourceSelectorProxy, data: SelectorData) => void, configs?: Array<DeclarativeMutationConfig>, }, ); ``` ### Arguments * `environment`: The [Relay Environment](./relay-environment.html). **Note:** To ensure the mutation is performed on the correct `environment`, it's recommended to use the environment available within components (from `this.props.relay.environment`), instead of referencing a global environment. * `config`: * `mutation`: The `graphql` tagged mutation query. * `variables`: Object containing the variables needed for the mutation. For example, if the mutation defines an `$input` variable, this object should contain an `input` key, whose shape must match the shape of the data expected by the mutation as defined by the GraphQL schema. * `onCompleted`: Callback function executed when the request is completed and the in-memory Relay store is updated with the `updater` function. Takes a `response` object, which is the "raw" server response, and `errors`, an array containing any errors from the server. . * `onError`: Callback function executed if Relay encounters an error during the request. * `optimisticResponse`: Object containing the data to optimistically update the local in-memory store, i.e. immediately, before the mutation request has completed. This object must have the same shape as the mutation's response type, as defined by the GraphQL schema. If provided, Relay will use the `optimisticResponse` data to update the fields on the relevant records in the local data store, *before* `optimisticUpdater` is executed. If an error occurs during the mutation request, the optimistic update will be rolled back. * `optimisticUpdater`: Function used to optimistically update the local in-memory store, i.e. immediately, before the mutation request has completed. If an error occurs during the mutation request, the optimistic update will be rolled back. This function takes a `store`, which is a proxy of the in-memory [Relay Store](./relay-store.html). In this function, the client defines 'how to' update the local data via the `store` instance. For details on how to use the `store`, please refer to our [Relay Store API Reference](./relay-store.html). **Please note:** * It is usually preferable to just pass an `optimisticResponse` option instead of an `optimisticUpdater`, unless you need to perform updates on the local records that are more complicated than just updating fields (e.g. deleting records or adding items to collections). * If you do decide to use an `optimisticUpdater`, often times it can be the same function as `updater`. * `updater`: Function used to update the local in-memory store based on the **real** server response from the mutation. If `updater` is not provided, by default, Relay will know to automatically update the fields on the records referenced in the mutation response; however, you should pass an `updater` if you need to make more complicated updates than just updating fields (e.g. deleting records or adding items to collections). When the server response comes back, Relay first reverts any changes introduced by `optimisticUpdater` or `optimisticResponse` and will then execute `updater`. This function takes a `store`, which is a proxy of the in-memory [Relay Store](./relay-store.html). In this function, the client defines 'how to' update the local data based on the server response via the `store` instance. For details on how to use the `store`, please refer to our [Relay Store API Reference](./relay-store.html). * `configs`: Array containing objects describing `optimisticUpdater`/`updater` configurations. `configs` provides a convenient way to specify the `updater` behavior without having to write an `updater` function. See our section on [Updater Configs](#updater-configs) for more details. ## Simple Example Example of a simple mutation: ```javascript import {commitMutation, graphql} from 'react-relay'; const mutation = graphql` mutation MarkReadNotificationMutation( $input: MarkReadNotificationInput! ) { markReadNotification(data: $input) { notification { seenState } } } `; function markNotificationAsRead(environment, source, storyID) { const variables = { input: { source, storyID, }, }; commitMutation( environment, { mutation, variables, onCompleted: (response, errors) => { console.log('Response received from server.') }, onError: err => console.error(err), }, ); } ``` ## Optimistic Updates To improve perceived responsiveness, you may wish to perform an "optimistic update", in which the client immediately updates to reflect the anticipated new value even before the response from the server has come back. The simplest way to do this is by providing an `optimisticResponse` and adding it to the `config` that we pass into `commitMutation`: ```javascript const mutation = graphql` mutation MarkReadNotificationMutation( $input: MarkReadNotificationInput! ) { markReadNotification(data: $input) { notification { seenState } } } `; const optimisticResponse = { markReadNotification: { notification: { seenState: SEEN, }, }, }; commitMutation( environment, { mutation, optimisticResponse, variables, }, ); ``` Another way to enable optimistic updates is via the `optimisticUpdater`, which can be used for more complicated update scenarios. Using `optimisticUpdater` is covered in the section [below](#using-updater-and-optimisticupdater). ## Updater Configs We can give Relay instructions in the form of a `configs` array on how to use the response from each mutation to update the client-side store. We do this by configuring the mutation with one or more of the following config types: ### NODE_DELETE Given a deletedIDFieldName, Relay will remove the node(s) from the store. **Note**: this will not remove it from any connection it might be in. If you want to remove a node from a connection, take a look at [RANGE_DELETE](#RANGE_DELETE). #### Arguments * `deletedIDFieldName: string`: The field name in the response that contains the DataID or DataIDs of the deleted node or nodes #### Example ```javascript const mutation = graphql` mutation DestroyShipMutation($input: DestroyShipInput!) { destroyShip(input: $input) { destroyedShipId faction { ships { id } } } } `; const configs = [{ type: 'NODE_DELETE', deletedIDFieldName: 'destroyedShipId', }]; ``` ### RANGE_ADD Given a parent, information about the connection, and the name of the newly created edge in the response payload Relay will add the node to the store and attach it to the connection according to the range behavior(s) specified in the connectionInfo. #### Arguments * `parentID: string`: The DataID of the parent node that contains the connection. * `connectionInfo: Array<{key: string, filters?: Variables, rangeBehavior: string}>`: An array of objects containing a connection key, an object containing optional filters, and a range behavior depending on what behavior we expect (append, prepend, or ignore). * `filters`: An object containing GraphQL calls e.g. `const filters = {'orderby': 'chronological'};`. * `edgeName: string`: The field name in the response that represents the newly created edge #### Example ```javascript const mutation = graphql` mutation AddShipMutation($input: AddShipInput!) { addShip(input: $input) { shipEdge { node { name } } } } `; function commit(environment, factionId, name) { return commitMutation(environment, { mutation, variables: { input: { factionId, name }, }, configs: [{ type: 'RANGE_ADD', parentID: factionId, connectionInfo: [{ key: 'AddShip_ships', rangeBehavior: 'append', }], edgeName: 'shipEdge', }], }); } ``` ### RANGE_DELETE Given a parent, connectionKeys, one or more DataIDs in the response payload, and a path between the parent and the connection, Relay will remove the node(s) from the connection but leave the associated record(s) in the store. #### Arguments * `parentID: string`: The DataID of the parent node that contains the connection. * `connectionKeys: Array<{key: string, filters?: Variables}>`: An array of objects containing a connection key and optionally filters. * `filters`: An object containing GraphQL calls e.g. `const filters = {'orderby': 'chronological'};`. * `pathToConnection: Array<string>`: An array containing the field names between the parent and the connection, including the parent and the connection. * `deletedIDFieldName: string | Array<string>`: The field name in the response that contains the DataID or DataIDs of the removed node or nodes, or the path to the node or nodes removed from the connection #### Example ```javascript const mutation = graphql` mutation RemoveTagMutation($input: RemoveTagInput!) { removeTag(input: $input) { removedTagId } } `; function commit(environment, todoId, tagId) { return commitMutation(environment, { mutation, variables: { input: { todoId, tagId }, }, configs: [{ type: 'RANGE_DELETE', parentID: todoId, connectionKeys: [{ key: 'RemoveTags_tags', }], pathToConnection: ['todo', 'tags'], deletedIDFieldName: 'removedTagId', }], }); } ``` ## Using updater and optimisticUpdater `updater` and `optimisticUpdater` are functions that you can pass to a `commitMutation` call when you need full control over how to update the local data store, either optimistically, or based on a server response. Often times, both of these can be the same function. When you provide these functions, this is roughly what happens during the mutation request: - If `optimisticResponse` is provided, Relay will use it to update the fields under the records as specified by the ids in the `optimisticResponse`. - If `optimisticUpdater` is provided, Relay will execute it and update the store accordingly. - After the network comes back, if any optimistic update was applied, it will be rolled back. - Relay will then automatically update the fields under the record corresponding to the ids in the response payload. - If an `updater` was provided, Relay will execute it and update the store accordingly. The server payload will be available to the `updater` as a root field in the store. Here are a quick example of adding a todo item to a Todo list using this [example schema](https://github.com/relayjs/relay-examples/blob/master/todo/data/schema.graphql#L36): ```javascript // AddTodoMutation.js import {commitMutation, graphql} from 'react-relay'; import {ConnectionHandler} from 'relay-runtime'; const mutation = graphql` mutation AddTodoMutation($input: AddTodoInput!) { addTodo(input: $input) { todoEdge { cursor node { complete id text } } viewer { id totalCount } } } `; function sharedUpdater(store, user, newEdge) { // Get the current user record from the store const userProxy = store.get(user.id); // Get the user's Todo List using ConnectionHandler helper const conn = ConnectionHandler.getConnection( userProxy, 'TodoList_todos', // This is the connection identifier, defined here // https://github.com/relayjs/relay-examples/blob/master/todo/js/components/TodoList.js#L76 ); // Insert the new todo into the Todo List connection ConnectionHandler.insertEdgeAfter(conn, newEdge); } let tempID = 0; function commit(environment, text, user) { return commitMutation(environment, { mutation, variables: { input: { text, clientMutationId: tempID++, }, }, updater: (store) => { // Get the payload returned from the server const payload = store.getRootField('addTodo'); // Get the edge of the newly created Todo record const newEdge = payload.getLinkedRecord('todoEdge'); // Add it to the user's todo list sharedUpdater(store, user, newEdge); }, optimisticUpdater: (store) => { // Create a Todo record in our store with a temporary ID const id = 'client:newTodo:' + tempID++; const node = store.create(id, 'Todo'); node.setValue(text, 'text'); node.setValue(id, 'id'); // Create a new edge that contains the newly created Todo record const newEdge = store.create( 'client:newEdge:' + tempID++, 'TodoEdge', ); newEdge.setLinkedRecord(node, 'node'); // Add it to the user's todo list sharedUpdater(store, user, newEdge); // Given that we don't have a server response here, // we also need to update the todo item count on the user const userRecord = store.get(user.id); userRecord.setValue( userRecord.getValue('totalCount') + 1, 'totalCount', ); }, }); } ``` For details on how to interact with the Relay Store, please refer to our Relay Store [docs](./relay-store). ## Committing Local Updates Use `commitLocalUpdate` when you need to update the local store without necessarily executing a mutation (such as in the case of debounced operations). The function takes in a Relay `environment` and an `updater` function.
iamchenxin/relay
website/versioned_docs/version-v4.0.0/Modern-Mutations.md
Markdown
mit
14,321
[ 30522, 1011, 1011, 1011, 8909, 1024, 2544, 1011, 1058, 2549, 1012, 1014, 1012, 1014, 1011, 14494, 2516, 1024, 14494, 2434, 1035, 8909, 1024, 14494, 1011, 1011, 1011, 2795, 1997, 8417, 1024, 1011, 1031, 1036, 10797, 28120, 3370, 1036, 1033, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package org.apache.geode.internal.cache; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.logging.log4j.Logger; import org.apache.geode.DataSerializable; import org.apache.geode.cache.Cache; import org.apache.geode.cache.CacheFactory; import org.apache.geode.cache.CacheTransactionManager; import org.apache.geode.cache.TransactionDataNodeHasDepartedException; import org.apache.geode.cache.TransactionId; import org.apache.geode.cache.execute.Execution; import org.apache.geode.cache.execute.Function; import org.apache.geode.cache.execute.FunctionContext; import org.apache.geode.cache.execute.FunctionException; import org.apache.geode.cache.execute.FunctionService; import org.apache.geode.distributed.DistributedMember; import org.apache.geode.internal.cache.TXId; import org.apache.geode.internal.logging.LogService; /** * This function can be used by GemFire clients and peers to rollback an existing transaction. A * {@link TransactionId} corresponding to the transaction to be rolledback must be provided as an * argument while invoking this function.<br /> * * This function should execute only on one server. If the transaction is not hosted on the server * where the function is invoked then this function decides to invoke a * {@link NestedTransactionFunction} which executes on the member where transaction is hosted.<br /> * * This function returns a single Boolean as result, whose value is <code>Boolean.TRUE</code> if the * transaction rolled back successfully otherwise the return value is * <code>Boolean.FALSE</code>.<br /> * * To execute this function, it is recommended to use the {@link Execution} obtained by using * TransactionFunctionService. <br /> * * To summarize, this function should be used as follows: * * <pre> * Execution exe = TransactionFunctionService.onTransaction(txId); * List l = (List) exe.execute(rollbackFunction).getResult(); * Boolean result = (Boolean) l.get(0); * </pre> * * This function is <b>not</b> registered on the cache servers by default, and it is the user's * responsibility to register this function. see {@link FunctionService#registerFunction(Function)} * * @since GemFire 6.6.1 */ public class RollbackFunction implements Function, DataSerializable { private static final Logger logger = LogService.getLogger(); private static final long serialVersionUID = 1377183180063184795L; public RollbackFunction() {} public boolean hasResult() { return true; } public void execute(FunctionContext context) { Cache cache = CacheFactory.getAnyInstance(); TXId txId = null; try { txId = (TXId) context.getArguments(); } catch (ClassCastException e) { logger.info( "RollbackFunction should be invoked with a TransactionId as an argument i.e. setArguments(txId).execute(function)"); throw e; } DistributedMember member = txId.getMemberId(); Boolean result = false; final boolean isDebugEnabled = logger.isDebugEnabled(); if (cache.getDistributedSystem().getDistributedMember().equals(member)) { if (isDebugEnabled) { logger.debug("RollbackFunction: for transaction: {} rolling back locally", txId); } CacheTransactionManager txMgr = cache.getCacheTransactionManager(); if (txMgr.tryResume(txId)) { if (isDebugEnabled) { logger.debug("RollbackFunction: resumed transaction: {}", txId); } txMgr.rollback(); result = true; } } else { ArrayList args = new ArrayList(); args.add(txId); args.add(NestedTransactionFunction.ROLLBACK); Execution ex = FunctionService.onMember(member).setArguments(args); if (isDebugEnabled) { logger.debug( "RollbackFunction: for transaction: {} executing NestedTransactionFunction on member: {}", txId, member); } try { List list = (List) ex.execute(new NestedTransactionFunction()).getResult(); result = (Boolean) list.get(0); } catch (FunctionException fe) { throw new TransactionDataNodeHasDepartedException("Could not Rollback on member:" + member); } } if (isDebugEnabled) { logger.debug("RollbackFunction: for transaction: {} returning result: {}", txId, result); } context.getResultSender().lastResult(result); } public String getId() { return getClass().getName(); } public boolean optimizeForWrite() { return true; } public boolean isHA() { // GEM-207 return true; } @Override public void toData(DataOutput out) throws IOException { } @Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { } }
smanvi-pivotal/geode
geode-core/src/test/java/org/apache/geode/internal/cache/RollbackFunction.java
Java
apache-2.0
5,585
[ 30522, 1013, 1008, 1008, 7000, 2000, 1996, 15895, 4007, 3192, 1006, 2004, 2546, 1007, 2104, 2028, 2030, 2062, 12130, 6105, 1008, 10540, 1012, 2156, 1996, 5060, 5371, 5500, 2007, 2023, 2147, 2005, 3176, 2592, 4953, 1008, 9385, 6095, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package net.emaze.dysfunctional.dispatching.spying; import java.util.concurrent.atomic.AtomicLong; import net.emaze.dysfunctional.contracts.dbc; import net.emaze.dysfunctional.dispatching.delegates.TriFunction; /** * Proxies a ternary function monitoring its calls. * * @author rferranti * @param <T1> the first parameter type * @param <T2> the second parameter type * @param <T3> the third parameter type * @param <R> the result type */ public class TernaryMonitoringFunction<T1, T2, T3, R> implements TriFunction<T1, T2, T3, R> { private final TriFunction<T1, T2, T3, R> nested; private final AtomicLong calls; public TernaryMonitoringFunction(TriFunction<T1, T2, T3, R> nested, AtomicLong calls) { dbc.precondition(nested != null, "cannot monitor a null function"); dbc.precondition(calls != null, "cannot monitor with a null AtomicLong"); this.nested = nested; this.calls = calls; } @Override public R apply(T1 first, T2 second, T3 third) { calls.incrementAndGet(); return nested.apply(first, second, third); } }
emaze/emaze-dysfunctional
src/main/java/net/emaze/dysfunctional/dispatching/spying/TernaryMonitoringFunction.java
Java
bsd-3-clause
1,106
[ 30522, 7427, 5658, 1012, 7861, 10936, 2063, 1012, 28466, 2389, 1012, 18365, 2075, 30524, 16483, 1012, 9593, 1012, 9593, 10052, 1025, 12324, 5658, 1012, 7861, 10936, 2063, 1012, 28466, 2389, 1012, 8311, 1012, 16962, 2278, 1025, 12324, 5658, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ /*** This file is part of systemd. Copyright 2013 Lennart Poettering systemd is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ #include <getopt.h> #include "sd-bus.h" #include "bus-dump.h" #include "bus-internal.h" #include "bus-signature.h" #include "bus-type.h" #include "bus-util.h" #include "busctl-introspect.h" #include "log.h" #include "pager.h" #include "path-util.h" #include "set.h" #include "strv.h" #include "terminal-util.h" #include "util.h" static bool arg_no_pager = false; static bool arg_legend = true; static char *arg_address = NULL; static bool arg_unique = false; static bool arg_acquired = false; static bool arg_activatable = false; static bool arg_show_machine = false; static char **arg_matches = NULL; static BusTransport arg_transport = BUS_TRANSPORT_LOCAL; static char *arg_host = NULL; static bool arg_user = false; static size_t arg_snaplen = 4096; static bool arg_list = false; static bool arg_quiet = false; static bool arg_verbose = false; static bool arg_expect_reply = true; static bool arg_auto_start = true; static bool arg_allow_interactive_authorization = true; static bool arg_augment_creds = true; static usec_t arg_timeout = 0; static void pager_open_if_enabled(void) { /* Cache result before we open the pager */ if (arg_no_pager) return; pager_open(false); } #define NAME_IS_ACQUIRED INT_TO_PTR(1) #define NAME_IS_ACTIVATABLE INT_TO_PTR(2) static int list_bus_names(sd_bus *bus, char **argv) { _cleanup_strv_free_ char **acquired = NULL, **activatable = NULL; _cleanup_free_ char **merged = NULL; _cleanup_hashmap_free_ Hashmap *names = NULL; char **i; int r; size_t max_i = 0; unsigned n = 0; void *v; char *k; Iterator iterator; assert(bus); if (!arg_unique && !arg_acquired && !arg_activatable) arg_unique = arg_acquired = arg_activatable = true; r = sd_bus_list_names(bus, (arg_acquired || arg_unique) ? &acquired : NULL, arg_activatable ? &activatable : NULL); if (r < 0) return log_error_errno(r, "Failed to list names: %m"); pager_open_if_enabled(); names = hashmap_new(&string_hash_ops); if (!names) return log_oom(); STRV_FOREACH(i, acquired) { max_i = MAX(max_i, strlen(*i)); r = hashmap_put(names, *i, NAME_IS_ACQUIRED); if (r < 0) return log_error_errno(r, "Failed to add to hashmap: %m"); } STRV_FOREACH(i, activatable) { max_i = MAX(max_i, strlen(*i)); r = hashmap_put(names, *i, NAME_IS_ACTIVATABLE); if (r < 0 && r != -EEXIST) return log_error_errno(r, "Failed to add to hashmap: %m"); } merged = new(char*, hashmap_size(names) + 1); HASHMAP_FOREACH_KEY(v, k, names, iterator) merged[n++] = k; merged[n] = NULL; strv_sort(merged); if (arg_legend) { printf("%-*s %*s %-*s %-*s %-*s %-*s %-*s %-*s", (int) max_i, "NAME", 10, "PID", 15, "PROCESS", 16, "USER", 13, "CONNECTION", 25, "UNIT", 10, "SESSION", 19, "DESCRIPTION"); if (arg_show_machine) puts(" MACHINE"); else putchar('\n'); } STRV_FOREACH(i, merged) { _cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL; sd_id128_t mid; if (hashmap_get(names, *i) == NAME_IS_ACTIVATABLE) { /* Activatable */ printf("%-*s", (int) max_i, *i); printf(" - - - (activatable) - - "); if (arg_show_machine) puts(" -"); else putchar('\n'); continue; } if (!arg_unique && (*i)[0] == ':') continue; if (!arg_acquired && (*i)[0] != ':') continue; printf("%-*s", (int) max_i, *i); r = sd_bus_get_name_creds( bus, *i, (arg_augment_creds ? SD_BUS_CREDS_AUGMENT : 0) | SD_BUS_CREDS_EUID|SD_BUS_CREDS_PID|SD_BUS_CREDS_COMM| SD_BUS_CREDS_UNIQUE_NAME|SD_BUS_CREDS_UNIT|SD_BUS_CREDS_SESSION| SD_BUS_CREDS_DESCRIPTION, &creds); if (r >= 0) { const char *unique, *session, *unit, *cn; pid_t pid; uid_t uid; r = sd_bus_creds_get_pid(creds, &pid); if (r >= 0) { const char *comm = NULL; sd_bus_creds_get_comm(creds, &comm); printf(" %10lu %-15s", (unsigned long) pid, strna(comm)); } else fputs(" - - ", stdout); r = sd_bus_creds_get_euid(creds, &uid); if (r >= 0) { _cleanup_free_ char *u = NULL; u = uid_to_name(uid); if (!u) return log_oom(); if (strlen(u) > 16) u[16] = 0; printf(" %-16s", u); } else fputs(" - ", stdout); r = sd_bus_creds_get_unique_name(creds, &unique); if (r >= 0) printf(" %-13s", unique); else fputs(" - ", stdout); r = sd_bus_creds_get_unit(creds, &unit); if (r >= 0) { _cleanup_free_ char *e; e = ellipsize(unit, 25, 100); if (!e) return log_oom(); printf(" %-25s", e); } else fputs(" - ", stdout); r = sd_bus_creds_get_session(creds, &session); if (r >= 0) printf(" %-10s", session); else fputs(" - ", stdout); r = sd_bus_creds_get_description(creds, &cn); if (r >= 0) printf(" %-19s", cn); else fputs(" - ", stdout); } else printf(" - - - - - - - "); if (arg_show_machine) { r = sd_bus_get_name_machine_id(bus, *i, &mid); if (r >= 0) { char m[SD_ID128_STRING_MAX]; printf(" %s\n", sd_id128_to_string(mid, m)); } else puts(" -"); } else putchar('\n'); } return 0; } static void print_subtree(const char *prefix, const char *path, char **l) { const char *vertical, *space; char **n; /* We assume the list is sorted. Let's first skip over the * entry we are looking at. */ for (;;) { if (!*l) return; if (!streq(*l, path)) break; l++; } vertical = strjoina(prefix, draw_special_char(DRAW_TREE_VERTICAL)); space = strjoina(prefix, draw_special_char(DRAW_TREE_SPACE)); for (;;) { bool has_more = false; if (!*l || !path_startswith(*l, path)) break; n = l + 1; for (;;) { if (!*n || !path_startswith(*n, path)) break; if (!path_startswith(*n, *l)) { has_more = true; break; } n++; } printf("%s%s%s\n", prefix, draw_special_char(has_more ? DRAW_TREE_BRANCH : DRAW_TREE_RIGHT), *l); print_subtree(has_more ? vertical : space, *l, l); l = n; } } static void print_tree(const char *prefix, char **l) { pager_open_if_enabled(); prefix = strempty(prefix); if (arg_list) { char **i; STRV_FOREACH(i, l) printf("%s%s\n", prefix, *i); return; } if (strv_isempty(l)) { printf("No objects discovered.\n"); return; } if (streq(l[0], "/") && !l[1]) { printf("Only root object discovered.\n"); return; } print_subtree(prefix, "/", l); } static int on_path(const char *path, void *userdata) { Set *paths = userdata; int r; assert(paths); r = set_put_strdup(paths, path); if (r < 0) return log_oom(); return 0; } static int find_nodes(sd_bus *bus, const char *service, const char *path, Set *paths, bool many) { static const XMLIntrospectOps ops = { .on_path = on_path, }; _cleanup_bus_message_unref_ sd_bus_message *reply = NULL; _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; const char *xml; int r; r = sd_bus_call_method(bus, service, path, "org.freedesktop.DBus.Introspectable", "Introspect", &error, &reply, ""); if (r < 0) { if (many) printf("Failed to introspect object %s of service %s: %s\n", path, service, bus_error_message(&error, r)); else log_error("Failed to introspect object %s of service %s: %s", path, service, bus_error_message(&error, r)); return r; } r = sd_bus_message_read(reply, "s", &xml); if (r < 0) return bus_log_parse_error(r); return parse_xml_introspect(path, xml, &ops, paths); } static int tree_one(sd_bus *bus, const char *service, const char *prefix, bool many) { _cleanup_set_free_free_ Set *paths = NULL, *done = NULL, *failed = NULL; _cleanup_free_ char **l = NULL; char *m; int r; paths = set_new(&string_hash_ops); if (!paths) return log_oom(); done = set_new(&string_hash_ops); if (!done) return log_oom(); failed = set_new(&string_hash_ops); if (!failed) return log_oom(); m = strdup("/"); if (!m) return log_oom(); r = set_put(paths, m); if (r < 0) { free(m); return log_oom(); } for (;;) { _cleanup_free_ char *p = NULL; int q; p = set_steal_first(paths); if (!p) break; if (set_contains(done, p) || set_contains(failed, p)) continue; q = find_nodes(bus, service, p, paths, many); if (q < 0) { if (r >= 0) r = q; q = set_put(failed, p); } else q = set_put(done, p); if (q < 0) return log_oom(); assert(q != 0); p = NULL; } pager_open_if_enabled(); l = set_get_strv(done); if (!l) return log_oom(); strv_sort(l); print_tree(prefix, l); fflush(stdout); return r; } static int tree(sd_bus *bus, char **argv) { char **i; int r = 0; if (!arg_unique && !arg_acquired) arg_acquired = true; if (strv_length(argv) <= 1) { _cleanup_strv_free_ char **names = NULL; bool not_first = false; r = sd_bus_list_names(bus, &names, NULL); if (r < 0) return log_error_errno(r, "Failed to get name list: %m"); pager_open_if_enabled(); STRV_FOREACH(i, names) { int q; if (!arg_unique && (*i)[0] == ':') continue; if (!arg_acquired && (*i)[0] == ':') continue; if (not_first) printf("\n"); printf("Service %s%s%s:\n", ansi_highlight(), *i, ansi_normal()); q = tree_one(bus, *i, NULL, true); if (q < 0 && r >= 0) r = q; not_first = true; } } else { STRV_FOREACH(i, argv+1) { int q; if (i > argv+1) printf("\n"); if (argv[2]) { pager_open_if_enabled(); printf("Service %s%s%s:\n", ansi_highlight(), *i, ansi_normal()); } q = tree_one(bus, *i, NULL, !!argv[2]); if (q < 0 && r >= 0) r = q; } } return r; } static int format_cmdline(sd_bus_message *m, FILE *f, bool needs_space) { int r; for (;;) { const char *contents = NULL; char type; union { uint8_t u8; uint16_t u16; int16_t s16; uint32_t u32; int32_t s32; uint64_t u64; int64_t s64; double d64; const char *string; int i; } basic; r = sd_bus_message_peek_type(m, &type, &contents); if (r <= 0) return r; if (bus_type_is_container(type) > 0) { r = sd_bus_message_enter_container(m, type, contents); if (r < 0) return r; if (type == SD_BUS_TYPE_ARRAY) { unsigned n = 0; /* count array entries */ for (;;) { r = sd_bus_message_skip(m, contents); if (r < 0) return r; if (r == 0) break; n++; } r = sd_bus_message_rewind(m, false); if (r < 0) return r; if (needs_space) fputc(' ', f); fprintf(f, "%u", n); } else if (type == SD_BUS_TYPE_VARIANT) { if (needs_space) fputc(' ', f); fprintf(f, "%s", contents); } r = format_cmdline(m, f, needs_space || IN_SET(type, SD_BUS_TYPE_ARRAY, SD_BUS_TYPE_VARIANT)); if (r < 0) return r; r = sd_bus_message_exit_container(m); if (r < 0) return r; continue; } r = sd_bus_message_read_basic(m, type, &basic); if (r < 0) return r; if (needs_space) fputc(' ', f); switch (type) { case SD_BUS_TYPE_BYTE: fprintf(f, "%u", basic.u8); break; case SD_BUS_TYPE_BOOLEAN: fputs(true_false(basic.i), f); break; case SD_BUS_TYPE_INT16: fprintf(f, "%i", basic.s16); break; case SD_BUS_TYPE_UINT16: fprintf(f, "%u", basic.u16); break; case SD_BUS_TYPE_INT32: fprintf(f, "%i", basic.s32); break; case SD_BUS_TYPE_UINT32: fprintf(f, "%u", basic.u32); break; case SD_BUS_TYPE_INT64: fprintf(f, "%" PRIi64, basic.s64); break; case SD_BUS_TYPE_UINT64: fprintf(f, "%" PRIu64, basic.u64); break; case SD_BUS_TYPE_DOUBLE: fprintf(f, "%g", basic.d64); break; case SD_BUS_TYPE_STRING: case SD_BUS_TYPE_OBJECT_PATH: case SD_BUS_TYPE_SIGNATURE: { _cleanup_free_ char *b = NULL; b = cescape(basic.string); if (!b) return -ENOMEM; fprintf(f, "\"%s\"", b); break; } case SD_BUS_TYPE_UNIX_FD: fprintf(f, "%i", basic.i); break; default: assert_not_reached("Unknown basic type."); } needs_space = true; } } typedef struct Member { const char *type; char *interface; char *name; char *signature; char *result; char *value; bool writable; uint64_t flags; } Member; static unsigned long member_hash_func(const void *p, const uint8_t hash_key[]) { const Member *m = p; unsigned long ul; assert(m); assert(m->type); ul = string_hash_func(m->type, hash_key); if (m->name) ul ^= string_hash_func(m->name, hash_key); if (m->interface) ul ^= string_hash_func(m->interface, hash_key); return ul; } static int member_compare_func(const void *a, const void *b) { const Member *x = a, *y = b; int d; assert(x); assert(y); assert(x->type); assert(y->type); d = strcmp_ptr(x->interface, y->interface); if (d != 0) return d; d = strcmp(x->type, y->type); if (d != 0) return d; return strcmp_ptr(x->name, y->name); } static int member_compare_funcp(const void *a, const void *b) { const Member *const * x = (const Member *const *) a, * const *y = (const Member *const *) b; return member_compare_func(*x, *y); } static void member_free(Member *m) { if (!m) return; free(m->interface); free(m->name); free(m->signature); free(m->result); free(m->value); free(m); } DEFINE_TRIVIAL_CLEANUP_FUNC(Member*, member_free); static void member_set_free(Set *s) { Member *m; while ((m = set_steal_first(s))) member_free(m); set_free(s); } DEFINE_TRIVIAL_CLEANUP_FUNC(Set*, member_set_free); static int on_interface(const char *interface, uint64_t flags, void *userdata) { _cleanup_(member_freep) Member *m; Set *members = userdata; int r; assert(interface); assert(members); m = new0(Member, 1); if (!m) return log_oom(); m->type = "interface"; m->flags = flags; r = free_and_strdup(&m->interface, interface); if (r < 0) return log_oom(); r = set_put(members, m); if (r <= 0) { log_error("Duplicate interface"); return -EINVAL; } m = NULL; return 0; } static int on_method(const char *interface, const char *name, const char *signature, const char *result, uint64_t flags, void *userdata) { _cleanup_(member_freep) Member *m; Set *members = userdata; int r; assert(interface); assert(name); m = new0(Member, 1); if (!m) return log_oom(); m->type = "method"; m->flags = flags; r = free_and_strdup(&m->interface, interface); if (r < 0) return log_oom(); r = free_and_strdup(&m->name, name); if (r < 0) return log_oom(); r = free_and_strdup(&m->signature, signature); if (r < 0) return log_oom(); r = free_and_strdup(&m->result, result); if (r < 0) return log_oom(); r = set_put(members, m); if (r <= 0) { log_error("Duplicate method"); return -EINVAL; } m = NULL; return 0; } static int on_signal(const char *interface, const char *name, const char *signature, uint64_t flags, void *userdata) { _cleanup_(member_freep) Member *m; Set *members = userdata; int r; assert(interface); assert(name); m = new0(Member, 1); if (!m) return log_oom(); m->type = "signal"; m->flags = flags; r = free_and_strdup(&m->interface, interface); if (r < 0) return log_oom(); r = free_and_strdup(&m->name, name); if (r < 0) return log_oom(); r = free_and_strdup(&m->signature, signature); if (r < 0) return log_oom(); r = set_put(members, m); if (r <= 0) { log_error("Duplicate signal"); return -EINVAL; } m = NULL; return 0; } static int on_property(const char *interface, const char *name, const char *signature, bool writable, uint64_t flags, void *userdata) { _cleanup_(member_freep) Member *m; Set *members = userdata; int r; assert(interface); assert(name); m = new0(Member, 1); if (!m) return log_oom(); m->type = "property"; m->flags = flags; m->writable = writable; r = free_and_strdup(&m->interface, interface); if (r < 0) return log_oom(); r = free_and_strdup(&m->name, name); if (r < 0) return log_oom(); r = free_and_strdup(&m->signature, signature); if (r < 0) return log_oom(); r = set_put(members, m); if (r <= 0) { log_error("Duplicate property"); return -EINVAL; } m = NULL; return 0; } static const char *strdash(const char *x) { return isempty(x) ? "-" : x; } static int introspect(sd_bus *bus, char **argv) { static const struct hash_ops member_hash_ops = { .hash = member_hash_func, .compare = member_compare_func, }; static const XMLIntrospectOps ops = { .on_interface = on_interface, .on_method = on_method, .on_signal = on_signal, .on_property = on_property, }; _cleanup_bus_message_unref_ sd_bus_message *reply = NULL; _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; _cleanup_(member_set_freep) Set *members = NULL; Iterator i; Member *m; const char *xml; int r; unsigned name_width, type_width, signature_width, result_width; Member **sorted = NULL; unsigned k = 0, j, n_args; n_args = strv_length(argv); if (n_args < 3) { log_error("Requires service and object path argument."); return -EINVAL; } if (n_args > 4) { log_error("Too many arguments."); return -EINVAL; } members = set_new(&member_hash_ops); if (!members) return log_oom(); r = sd_bus_call_method(bus, argv[1], argv[2], "org.freedesktop.DBus.Introspectable", "Introspect", &error, &reply, ""); if (r < 0) { log_error("Failed to introspect object %s of service %s: %s", argv[2], argv[1], bus_error_message(&error, r)); return r; } r = sd_bus_message_read(reply, "s", &xml); if (r < 0) return bus_log_parse_error(r); /* First, get list of all properties */ r = parse_xml_introspect(argv[2], xml, &ops, members); if (r < 0) return r; /* Second, find the current values for them */ SET_FOREACH(m, members, i) { if (!streq(m->type, "property")) continue; if (m->value) continue; if (argv[3] && !streq(argv[3], m->interface)) continue; r = sd_bus_call_method(bus, argv[1], argv[2], "org.freedesktop.DBus.Properties", "GetAll", &error, &reply, "s", m->interface); if (r < 0) { log_error("%s", bus_error_message(&error, r)); return r; } r = sd_bus_message_enter_container(reply, 'a', "{sv}"); if (r < 0) return bus_log_parse_error(r); for (;;) { Member *z; _cleanup_free_ char *buf = NULL; _cleanup_fclose_ FILE *mf = NULL; size_t sz = 0; const char *name; r = sd_bus_message_enter_container(reply, 'e', "sv"); if (r < 0) return bus_log_parse_error(r); if (r == 0) break; r = sd_bus_message_read(reply, "s", &name); if (r < 0) return bus_log_parse_error(r); r = sd_bus_message_enter_container(reply, 'v', NULL); if (r < 0) return bus_log_parse_error(r); mf = open_memstream(&buf, &sz); if (!mf) return log_oom(); r = format_cmdline(reply, mf, false); if (r < 0) return bus_log_parse_error(r); fclose(mf); mf = NULL; z = set_get(members, &((Member) { .type = "property", .interface = m->interface, .name = (char*) name })); if (z) { free(z->value); z->value = buf; buf = NULL; } r = sd_bus_message_exit_container(reply); if (r < 0) return bus_log_parse_error(r); r = sd_bus_message_exit_container(reply); if (r < 0) return bus_log_parse_error(r); } r = sd_bus_message_exit_container(reply); if (r < 0) return bus_log_parse_error(r); } pager_open_if_enabled(); name_width = strlen("NAME"); type_width = strlen("TYPE"); signature_width = strlen("SIGNATURE"); result_width = strlen("RESULT/VALUE"); sorted = newa(Member*, set_size(members)); SET_FOREACH(m, members, i) { if (argv[3] && !streq(argv[3], m->interface)) continue; if (m->interface) name_width = MAX(name_width, strlen(m->interface)); if (m->name) name_width = MAX(name_width, strlen(m->name) + 1); if (m->type) type_width = MAX(type_width, strlen(m->type)); if (m->signature) signature_width = MAX(signature_width, strlen(m->signature)); if (m->result) result_width = MAX(result_width, strlen(m->result)); if (m->value) result_width = MAX(result_width, strlen(m->value)); sorted[k++] = m; } if (result_width > 40) result_width = 40; qsort(sorted, k, sizeof(Member*), member_compare_funcp); if (arg_legend) { printf("%-*s %-*s %-*s %-*s %s\n", (int) name_width, "NAME", (int) type_width, "TYPE", (int) signature_width, "SIGNATURE", (int) result_width, "RESULT/VALUE", "FLAGS"); } for (j = 0; j < k; j++) { _cleanup_free_ char *ellipsized = NULL; const char *rv; bool is_interface; m = sorted[j]; if (argv[3] && !streq(argv[3], m->interface)) continue; is_interface = streq(m->type, "interface"); if (argv[3] && is_interface) continue; if (m->value) { ellipsized = ellipsize(m->value, result_width, 100); if (!ellipsized) return log_oom(); rv = ellipsized; } else rv = strdash(m->result); printf("%s%s%-*s%s %-*s %-*s %-*s%s%s%s%s%s%s\n", is_interface ? ansi_highlight() : "", is_interface ? "" : ".", - !is_interface + (int) name_width, strdash(streq_ptr(m->type, "interface") ? m->interface : m->name), is_interface ? ansi_normal() : "", (int) type_width, strdash(m->type), (int) signature_width, strdash(m->signature), (int) result_width, rv, (m->flags & SD_BUS_VTABLE_DEPRECATED) ? " deprecated" : (m->flags || m->writable ? "" : " -"), (m->flags & SD_BUS_VTABLE_METHOD_NO_REPLY) ? " no-reply" : "", (m->flags & SD_BUS_VTABLE_PROPERTY_CONST) ? " const" : "", (m->flags & SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE) ? " emits-change" : "", (m->flags & SD_BUS_VTABLE_PROPERTY_EMITS_INVALIDATION) ? " emits-invalidation" : "", m->writable ? " writable" : ""); } return 0; } static int message_dump(sd_bus_message *m, FILE *f) { return bus_message_dump(m, f, BUS_MESSAGE_DUMP_WITH_HEADER); } static int message_pcap(sd_bus_message *m, FILE *f) { return bus_message_pcap_frame(m, arg_snaplen, f); } static int monitor(sd_bus *bus, char *argv[], int (*dump)(sd_bus_message *m, FILE *f)) { bool added_something = false; char **i; int r; STRV_FOREACH(i, argv+1) { _cleanup_free_ char *m = NULL; if (!service_name_is_valid(*i)) { log_error("Invalid service name '%s'", *i); return -EINVAL; } m = strjoin("sender='", *i, "'", NULL); if (!m) return log_oom(); r = sd_bus_add_match(bus, NULL, m, NULL, NULL); if (r < 0) return log_error_errno(r, "Failed to add match: %m"); free(m); m = strjoin("destination='", *i, "'", NULL); if (!m) return log_oom(); r = sd_bus_add_match(bus, NULL, m, NULL, NULL); if (r < 0) return log_error_errno(r, "Failed to add match: %m"); added_something = true; } STRV_FOREACH(i, arg_matches) { r = sd_bus_add_match(bus, NULL, *i, NULL, NULL); if (r < 0) return log_error_errno(r, "Failed to add match: %m"); added_something = true; } if (!added_something) { r = sd_bus_add_match(bus, NULL, "", NULL, NULL); if (r < 0) return log_error_errno(r, "Failed to add match: %m"); } log_info("Monitoring bus message stream."); for (;;) { _cleanup_bus_message_unref_ sd_bus_message *m = NULL; r = sd_bus_process(bus, &m); if (r < 0) return log_error_errno(r, "Failed to process bus: %m"); if (m) { dump(m, stdout); fflush(stdout); if (sd_bus_message_is_signal(m, "org.freedesktop.DBus.Local", "Disconnected") > 0) { log_info("Connection terminated, exiting."); return 0; } continue; } if (r > 0) continue; r = sd_bus_wait(bus, (uint64_t) -1); if (r < 0) return log_error_errno(r, "Failed to wait for bus: %m"); } } static int capture(sd_bus *bus, char *argv[]) { int r; if (isatty(fileno(stdout)) > 0) { log_error("Refusing to write message data to console, please redirect output to a file."); return -EINVAL; } bus_pcap_header(arg_snaplen, stdout); r = monitor(bus, argv, message_pcap); if (r < 0) return r; if (ferror(stdout)) { log_error("Couldn't write capture file."); return -EIO; } return r; } static int status(sd_bus *bus, char *argv[]) { _cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL; pid_t pid; int r; assert(bus); if (strv_length(argv) > 2) { log_error("Expects no or one argument."); return -EINVAL; } if (argv[1]) { r = parse_pid(argv[1], &pid); if (r < 0) r = sd_bus_get_name_creds( bus, argv[1], (arg_augment_creds ? SD_BUS_CREDS_AUGMENT : 0) | _SD_BUS_CREDS_ALL, &creds); else r = sd_bus_creds_new_from_pid( &creds, pid, _SD_BUS_CREDS_ALL); } else { const char *scope, *address; sd_id128_t bus_id; r = sd_bus_get_address(bus, &address); if (r >= 0) printf("BusAddress=%s%s%s\n", ansi_highlight(), address, ansi_normal()); r = sd_bus_get_scope(bus, &scope); if (r >= 0) printf("BusScope=%s%s%s\n", ansi_highlight(), scope, ansi_normal()); r = sd_bus_get_bus_id(bus, &bus_id); if (r >= 0) printf("BusID=%s" SD_ID128_FORMAT_STR "%s\n", ansi_highlight(), SD_ID128_FORMAT_VAL(bus_id), ansi_normal()); r = sd_bus_get_owner_creds( bus, (arg_augment_creds ? SD_BUS_CREDS_AUGMENT : 0) | _SD_BUS_CREDS_ALL, &creds); } if (r < 0) return log_error_errno(r, "Failed to get credentials: %m"); bus_creds_dump(creds, NULL, false); return 0; } static int message_append_cmdline(sd_bus_message *m, const char *signature, char ***x) { char **p; int r; assert(m); assert(signature); assert(x); p = *x; for (;;) { const char *v; char t; t = *signature; v = *p; if (t == 0) break; if (!v) { log_error("Too few parameters for signature."); return -EINVAL; } signature++; p++; switch (t) { case SD_BUS_TYPE_BOOLEAN: r = parse_boolean(v); if (r < 0) { log_error("Failed to parse as boolean: %s", v); return r; } r = sd_bus_message_append_basic(m, t, &r); break; case SD_BUS_TYPE_BYTE: { uint8_t z; r = safe_atou8(v, &z); if (r < 0) { log_error("Failed to parse as byte (unsigned 8bit integer): %s", v); return r; } r = sd_bus_message_append_basic(m, t, &z); break; } case SD_BUS_TYPE_INT16: { int16_t z; r = safe_atoi16(v, &z); if (r < 0) { log_error("Failed to parse as signed 16bit integer: %s", v); return r; } r = sd_bus_message_append_basic(m, t, &z); break; } case SD_BUS_TYPE_UINT16: { uint16_t z; r = safe_atou16(v, &z); if (r < 0) { log_error("Failed to parse as unsigned 16bit integer: %s", v); return r; } r = sd_bus_message_append_basic(m, t, &z); break; } case SD_BUS_TYPE_INT32: { int32_t z; r = safe_atoi32(v, &z); if (r < 0) { log_error("Failed to parse as signed 32bit integer: %s", v); return r; } r = sd_bus_message_append_basic(m, t, &z); break; } case SD_BUS_TYPE_UINT32: { uint32_t z; r = safe_atou32(v, &z); if (r < 0) { log_error("Failed to parse as unsigned 32bit integer: %s", v); return r; } r = sd_bus_message_append_basic(m, t, &z); break; } case SD_BUS_TYPE_INT64: { int64_t z; r = safe_atoi64(v, &z); if (r < 0) { log_error("Failed to parse as signed 64bit integer: %s", v); return r; } r = sd_bus_message_append_basic(m, t, &z); break; } case SD_BUS_TYPE_UINT64: { uint64_t z; r = safe_atou64(v, &z); if (r < 0) { log_error("Failed to parse as unsigned 64bit integer: %s", v); return r; } r = sd_bus_message_append_basic(m, t, &z); break; } case SD_BUS_TYPE_DOUBLE: { double z; r = safe_atod(v, &z); if (r < 0) { log_error("Failed to parse as double precision floating point: %s", v); return r; } r = sd_bus_message_append_basic(m, t, &z); break; } case SD_BUS_TYPE_STRING: case SD_BUS_TYPE_OBJECT_PATH: case SD_BUS_TYPE_SIGNATURE: r = sd_bus_message_append_basic(m, t, v); break; case SD_BUS_TYPE_ARRAY: { uint32_t n; size_t k; r = safe_atou32(v, &n); if (r < 0) { log_error("Failed to parse number of array entries: %s", v); return r; } r = signature_element_length(signature, &k); if (r < 0) { log_error("Invalid array signature."); return r; } { unsigned i; char s[k + 1]; memcpy(s, signature, k); s[k] = 0; r = sd_bus_message_open_container(m, SD_BUS_TYPE_ARRAY, s); if (r < 0) return bus_log_create_error(r); for (i = 0; i < n; i++) { r = message_append_cmdline(m, s, &p); if (r < 0) return r; } } signature += k; r = sd_bus_message_close_container(m); break; } case SD_BUS_TYPE_VARIANT: r = sd_bus_message_open_container(m, SD_BUS_TYPE_VARIANT, v); if (r < 0) return bus_log_create_error(r); r = message_append_cmdline(m, v, &p); if (r < 0) return r; r = sd_bus_message_close_container(m); break; case SD_BUS_TYPE_STRUCT_BEGIN: case SD_BUS_TYPE_DICT_ENTRY_BEGIN: { size_t k; signature--; p--; r = signature_element_length(signature, &k); if (r < 0) { log_error("Invalid struct/dict entry signature."); return r; } { char s[k-1]; memcpy(s, signature + 1, k - 2); s[k - 2] = 0; r = sd_bus_message_open_container(m, t == SD_BUS_TYPE_STRUCT_BEGIN ? SD_BUS_TYPE_STRUCT : SD_BUS_TYPE_DICT_ENTRY, s); if (r < 0) return bus_log_create_error(r); r = message_append_cmdline(m, s, &p); if (r < 0) return r; } signature += k; r = sd_bus_message_close_container(m); break; } case SD_BUS_TYPE_UNIX_FD: log_error("UNIX file descriptor not supported as type."); return -EINVAL; default: log_error("Unknown signature type %c.", t); return -EINVAL; } if (r < 0) return bus_log_create_error(r); } *x = p; return 0; } static int call(sd_bus *bus, char *argv[]) { _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; _cleanup_bus_message_unref_ sd_bus_message *m = NULL, *reply = NULL; int r; assert(bus); if (strv_length(argv) < 5) { log_error("Expects at least four arguments."); return -EINVAL; } r = sd_bus_message_new_method_call(bus, &m, argv[1], argv[2], argv[3], argv[4]); if (r < 0) return bus_log_create_error(r); r = sd_bus_message_set_expect_reply(m, arg_expect_reply); if (r < 0) return bus_log_create_error(r); r = sd_bus_message_set_auto_start(m, arg_auto_start); if (r < 0) return bus_log_create_error(r); r = sd_bus_message_set_allow_interactive_authorization(m, arg_allow_interactive_authorization); if (r < 0) return bus_log_create_error(r); if (!isempty(argv[5])) { char **p; p = argv+6; r = message_append_cmdline(m, argv[5], &p); if (r < 0) return r; if (*p) { log_error("Too many parameters for signature."); return -EINVAL; } } if (!arg_expect_reply) { r = sd_bus_send(bus, m, NULL); if (r < 0) { log_error("Failed to send message."); return r; } return 0; } r = sd_bus_call(bus, m, arg_timeout, &error, &reply); if (r < 0) { log_error("%s", bus_error_message(&error, r)); return r; } r = sd_bus_message_is_empty(reply); if (r < 0) return bus_log_parse_error(r); if (r == 0 && !arg_quiet) { if (arg_verbose) { pager_open_if_enabled(); r = bus_message_dump(reply, stdout, 0); if (r < 0) return r; } else { fputs(sd_bus_message_get_signature(reply, true), stdout); fputc(' ', stdout); r = format_cmdline(reply, stdout, false); if (r < 0) return bus_log_parse_error(r); fputc('\n', stdout); } } return 0; } static int get_property(sd_bus *bus, char *argv[]) { _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; unsigned n; char **i; int r; assert(bus); n = strv_length(argv); if (n < 5) { log_error("Expects at least four arguments."); return -EINVAL; } STRV_FOREACH(i, argv + 4) { _cleanup_bus_message_unref_ sd_bus_message *reply = NULL; const char *contents = NULL; char type; r = sd_bus_call_method(bus, argv[1], argv[2], "org.freedesktop.DBus.Properties", "Get", &error, &reply, "ss", argv[3], *i); if (r < 0) { log_error("%s", bus_error_message(&error, r)); return r; } r = sd_bus_message_peek_type(reply, &type, &contents); if (r < 0) return bus_log_parse_error(r); r = sd_bus_message_enter_container(reply, 'v', contents); if (r < 0) return bus_log_parse_error(r); if (arg_verbose) { pager_open_if_enabled(); r = bus_message_dump(reply, stdout, BUS_MESSAGE_DUMP_SUBTREE_ONLY); if (r < 0) return r; } else { fputs(contents, stdout); fputc(' ', stdout); r = format_cmdline(reply, stdout, false); if (r < 0) return bus_log_parse_error(r); fputc('\n', stdout); } r = sd_bus_message_exit_container(reply); if (r < 0) return bus_log_parse_error(r); } return 0; } static int set_property(sd_bus *bus, char *argv[]) { _cleanup_bus_message_unref_ sd_bus_message *m = NULL; _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; unsigned n; char **p; int r; assert(bus); n = strv_length(argv); if (n < 6) { log_error("Expects at least five arguments."); return -EINVAL; } r = sd_bus_message_new_method_call(bus, &m, argv[1], argv[2], "org.freedesktop.DBus.Properties", "Set"); if (r < 0) return bus_log_create_error(r); r = sd_bus_message_append(m, "ss", argv[3], argv[4]); if (r < 0) return bus_log_create_error(r); r = sd_bus_message_open_container(m, 'v', argv[5]); if (r < 0) return bus_log_create_error(r); p = argv+6; r = message_append_cmdline(m, argv[5], &p); if (r < 0) return r; r = sd_bus_message_close_container(m); if (r < 0) return bus_log_create_error(r); if (*p) { log_error("Too many parameters for signature."); return -EINVAL; } r = sd_bus_call(bus, m, arg_timeout, &error, NULL); if (r < 0) { log_error("%s", bus_error_message(&error, r)); return r; } return 0; } static int help(void) { printf("%s [OPTIONS...] {COMMAND} ...\n\n" "Introspect the bus.\n\n" " -h --help Show this help\n" " --version Show package version\n" " --no-pager Do not pipe output into a pager\n" " --no-legend Do not show the headers and footers\n" " --system Connect to system bus\n" " --user Connect to user bus\n" " -H --host=[USER@]HOST Operate on remote host\n" " -M --machine=CONTAINER Operate on local container\n" " --address=ADDRESS Connect to bus specified by address\n" " --show-machine Show machine ID column in list\n" " --unique Only show unique names\n" " --acquired Only show acquired names\n" " --activatable Only show activatable names\n" " --match=MATCH Only show matching messages\n" " --size=SIZE Maximum length of captured packet\n" " --list Don't show tree, but simple object path list\n" " --quiet Don't show method call reply\n" " --verbose Show result values in long format\n" " --expect-reply=BOOL Expect a method call reply\n" " --auto-start=BOOL Auto-start destination service\n" " --allow-interactive-authorization=BOOL\n" " Allow interactive authorization for operation\n" " --timeout=SECS Maximum time to wait for method call completion\n" " --augment-creds=BOOL Extend credential data with data read from /proc/$PID\n\n" "Commands:\n" " list List bus names\n" " status [SERVICE] Show bus service, process or bus owner credentials\n" " monitor [SERVICE...] Show bus traffic\n" " capture [SERVICE...] Capture bus traffic as pcap\n" " tree [SERVICE...] Show object tree of service\n" " introspect SERVICE OBJECT [INTERFACE]\n" " call SERVICE OBJECT INTERFACE METHOD [SIGNATURE [ARGUMENT...]]\n" " Call a method\n" " get-property SERVICE OBJECT INTERFACE PROPERTY...\n" " Get property value\n" " set-property SERVICE OBJECT INTERFACE PROPERTY SIGNATURE ARGUMENT...\n" " Set property value\n" " help Show this help\n" , program_invocation_short_name); return 0; } static int parse_argv(int argc, char *argv[]) { enum { ARG_VERSION = 0x100, ARG_NO_PAGER, ARG_NO_LEGEND, ARG_SYSTEM, ARG_USER, ARG_ADDRESS, ARG_MATCH, ARG_SHOW_MACHINE, ARG_UNIQUE, ARG_ACQUIRED, ARG_ACTIVATABLE, ARG_SIZE, ARG_LIST, ARG_VERBOSE, ARG_EXPECT_REPLY, ARG_AUTO_START, ARG_ALLOW_INTERACTIVE_AUTHORIZATION, ARG_TIMEOUT, ARG_AUGMENT_CREDS, }; static const struct option options[] = { { "help", no_argument, NULL, 'h' }, { "version", no_argument, NULL, ARG_VERSION }, { "no-pager", no_argument, NULL, ARG_NO_PAGER }, { "no-legend", no_argument, NULL, ARG_NO_LEGEND }, { "system", no_argument, NULL, ARG_SYSTEM }, { "user", no_argument, NULL, ARG_USER }, { "address", required_argument, NULL, ARG_ADDRESS }, { "show-machine", no_argument, NULL, ARG_SHOW_MACHINE }, { "unique", no_argument, NULL, ARG_UNIQUE }, { "acquired", no_argument, NULL, ARG_ACQUIRED }, { "activatable", no_argument, NULL, ARG_ACTIVATABLE }, { "match", required_argument, NULL, ARG_MATCH }, { "host", required_argument, NULL, 'H' }, { "machine", required_argument, NULL, 'M' }, { "size", required_argument, NULL, ARG_SIZE }, { "list", no_argument, NULL, ARG_LIST }, { "quiet", no_argument, NULL, 'q' }, { "verbose", no_argument, NULL, ARG_VERBOSE }, { "expect-reply", required_argument, NULL, ARG_EXPECT_REPLY }, { "auto-start", required_argument, NULL, ARG_AUTO_START }, { "allow-interactive-authorization", required_argument, NULL, ARG_ALLOW_INTERACTIVE_AUTHORIZATION }, { "timeout", required_argument, NULL, ARG_TIMEOUT }, { "augment-creds",required_argument, NULL, ARG_AUGMENT_CREDS}, {}, }; int c, r; assert(argc >= 0); assert(argv); while ((c = getopt_long(argc, argv, "hH:M:q", options, NULL)) >= 0) switch (c) { case 'h': return help(); case ARG_VERSION: return version(); case ARG_NO_PAGER: arg_no_pager = true; break; case ARG_NO_LEGEND: arg_legend = false; break; case ARG_USER: arg_user = true; break; case ARG_SYSTEM: arg_user = false; break; case ARG_ADDRESS: arg_address = optarg; break; case ARG_SHOW_MACHINE: arg_show_machine = true; break; case ARG_UNIQUE: arg_unique = true; break; case ARG_ACQUIRED: arg_acquired = true; break; case ARG_ACTIVATABLE: arg_activatable = true; break; case ARG_MATCH: if (strv_extend(&arg_matches, optarg) < 0) return log_oom(); break; case ARG_SIZE: { uint64_t sz; r = parse_size(optarg, 1024, &sz); if (r < 0) { log_error("Failed to parse size: %s", optarg); return r; } if ((uint64_t) (size_t) sz != sz) { log_error("Size out of range."); return -E2BIG; } arg_snaplen = (size_t) sz; break; } case ARG_LIST: arg_list = true; break; case 'H': arg_transport = BUS_TRANSPORT_REMOTE; arg_host = optarg; break; case 'M': arg_transport = BUS_TRANSPORT_MACHINE; arg_host = optarg; break; case 'q': arg_quiet = true; break; case ARG_VERBOSE: arg_verbose = true; break; case ARG_EXPECT_REPLY: r = parse_boolean(optarg); if (r < 0) { log_error("Failed to parse --expect-reply= parameter."); return r; } arg_expect_reply = !!r; break; case ARG_AUTO_START: r = parse_boolean(optarg); if (r < 0) { log_error("Failed to parse --auto-start= parameter."); return r; } arg_auto_start = !!r; break; case ARG_ALLOW_INTERACTIVE_AUTHORIZATION: r = parse_boolean(optarg); if (r < 0) { log_error("Failed to parse --allow-interactive-authorization= parameter."); return r; } arg_allow_interactive_authorization = !!r; break; case ARG_TIMEOUT: r = parse_sec(optarg, &arg_timeout); if (r < 0) { log_error("Failed to parse --timeout= parameter."); return r; } break; case ARG_AUGMENT_CREDS: r = parse_boolean(optarg); if (r < 0) { log_error("Failed to parse --augment-creds= parameter."); return r; } arg_augment_creds = !!r; break; case '?': return -EINVAL; default: assert_not_reached("Unhandled option"); } return 1; } static int busctl_main(sd_bus *bus, int argc, char *argv[]) { assert(bus); if (optind >= argc || streq(argv[optind], "list")) return list_bus_names(bus, argv + optind); if (streq(argv[optind], "monitor")) return monitor(bus, argv + optind, message_dump); if (streq(argv[optind], "capture")) return capture(bus, argv + optind); if (streq(argv[optind], "status")) return status(bus, argv + optind); if (streq(argv[optind], "tree")) return tree(bus, argv + optind); if (streq(argv[optind], "introspect")) return introspect(bus, argv + optind); if (streq(argv[optind], "call")) return call(bus, argv + optind); if (streq(argv[optind], "get-property")) return get_property(bus, argv + optind); if (streq(argv[optind], "set-property")) return set_property(bus, argv + optind); if (streq(argv[optind], "help")) return help(); log_error("Unknown command '%s'", argv[optind]); return -EINVAL; } int main(int argc, char *argv[]) { _cleanup_bus_flush_close_unref_ sd_bus *bus = NULL; int r; log_parse_environment(); log_open(); r = parse_argv(argc, argv); if (r <= 0) goto finish; r = sd_bus_new(&bus); if (r < 0) { log_error_errno(r, "Failed to allocate bus: %m"); goto finish; } if (streq_ptr(argv[optind], "monitor") || streq_ptr(argv[optind], "capture")) { r = sd_bus_set_monitor(bus, true); if (r < 0) { log_error_errno(r, "Failed to set monitor mode: %m"); goto finish; } r = sd_bus_negotiate_creds(bus, true, _SD_BUS_CREDS_ALL); if (r < 0) { log_error_errno(r, "Failed to enable credentials: %m"); goto finish; } r = sd_bus_negotiate_timestamp(bus, true); if (r < 0) { log_error_errno(r, "Failed to enable timestamps: %m"); goto finish; } r = sd_bus_negotiate_fds(bus, true); if (r < 0) { log_error_errno(r, "Failed to enable fds: %m"); goto finish; } } r = sd_bus_set_bus_client(bus, true); if (r < 0) { log_error_errno(r, "Failed to set bus client: %m"); goto finish; } if (arg_address) r = sd_bus_set_address(bus, arg_address); else { switch (arg_transport) { case BUS_TRANSPORT_LOCAL: if (arg_user) { bus->is_user = true; r = bus_set_address_user(bus); } else { bus->is_system = true; r = bus_set_address_system(bus); } break; case BUS_TRANSPORT_REMOTE: r = bus_set_address_system_remote(bus, arg_host); break; case BUS_TRANSPORT_MACHINE: r = bus_set_address_system_machine(bus, arg_host); break; default: assert_not_reached("Hmm, unknown transport type."); } } if (r < 0) { log_error_errno(r, "Failed to set address: %m"); goto finish; } r = sd_bus_start(bus); if (r < 0) { log_error_errno(r, "Failed to connect to bus: %m"); goto finish; } r = busctl_main(bus, argc, argv); finish: pager_close(); strv_free(arg_matches); return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; }
mcanthony/systemd
src/libsystemd/sd-bus/busctl.c
C
gpl-2.0
67,521
[ 30522, 1013, 1008, 1011, 1008, 1011, 5549, 1024, 1039, 1025, 1039, 1011, 3937, 1011, 16396, 1024, 1022, 1025, 27427, 4765, 1011, 21628, 2015, 1011, 5549, 1024, 9152, 2140, 1011, 1008, 1011, 1008, 1013, 1013, 1008, 1008, 1008, 2023, 5371, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
;(function($){ /** * jqGrid extension for manipulating Grid Data * Tony Tomov tony@trirand.com * http://trirand.com/blog/ * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl-2.0.html **/ //jsHint options /*global alert, $, jQuery */ "use strict"; $.jgrid.inlineEdit = $.jgrid.inlineEdit || {}; $.jgrid.extend({ //Editing editRow : function(rowid,keys,oneditfunc,successfunc, url, extraparam, aftersavefunc,errorfunc, afterrestorefunc) { // Compatible mode old versions var o={}, args = $.makeArray(arguments).slice(1); if( $.type(args[0]) === "object" ) { o = args[0]; } else { if (typeof keys !== "undefined") { o.keys = keys; } if ($.isFunction(oneditfunc)) { o.oneditfunc = oneditfunc; } if ($.isFunction(successfunc)) { o.successfunc = successfunc; } if (typeof url !== "undefined") { o.url = url; } if (typeof extraparam !== "undefined") { o.extraparam = extraparam; } if ($.isFunction(aftersavefunc)) { o.aftersavefunc = aftersavefunc; } if ($.isFunction(errorfunc)) { o.errorfunc = errorfunc; } if ($.isFunction(afterrestorefunc)) { o.afterrestorefunc = afterrestorefunc; } // last two not as param, but as object (sorry) //if (typeof restoreAfterError !== "undefined") { o.restoreAfterError = restoreAfterError; } //if (typeof mtype !== "undefined") { o.mtype = mtype || "POST"; } } o = $.extend(true, { keys : false, oneditfunc: null, successfunc: null, url: null, extraparam: {}, aftersavefunc: null, errorfunc: null, afterrestorefunc: null, restoreAfterError: true, mtype: "POST" }, $.jgrid.inlineEdit, o ); // End compatible return this.each(function(){ var $t = this, nm, tmp, editable, cnt=0, focus=null, svr={}, ind,cm; if (!$t.grid ) { return; } ind = $($t).jqGrid("getInd",rowid,true); if( ind === false ) {return;} editable = $(ind).attr("editable") || "0"; if (editable == "0" && !$(ind).hasClass("not-editable-row")) { cm = $t.p.colModel; $('td[role="gridcell"]',ind).each( function(i) { nm = cm[i].name; var treeg = $t.p.treeGrid===true && nm == $t.p.ExpandColumn; if(treeg) { tmp = $("span:first",this).html();} else { try { tmp = $.unformat.call($t,this,{rowId:rowid, colModel:cm[i]},i); } catch (_) { tmp = ( cm[i].edittype && cm[i].edittype == 'textarea' ) ? $(this).text() : $(this).html(); } } if ( nm != 'cb' && nm != 'subgrid' && nm != 'rn') { if($t.p.autoencode) { tmp = $.jgrid.htmlDecode(tmp); } svr[nm]=tmp; if(cm[i].editable===true) { if(focus===null) { focus = i; } if (treeg) { $("span:first",this).html(""); } else { $(this).html(""); } var opt = $.extend({},cm[i].editoptions || {},{id:rowid+"_"+nm,name:nm}); if(!cm[i].edittype) { cm[i].edittype = "text"; } if(tmp == "&nbsp;" || tmp == "&#160;" || (tmp.length==1 && tmp.charCodeAt(0)==160) ) {tmp='';} var elc = $.jgrid.createEl.call($t,cm[i].edittype,opt,tmp,true,$.extend({},$.jgrid.ajaxOptions,$t.p.ajaxSelectOptions || {})); $(elc).addClass("editable"); if(treeg) { $("span:first",this).append(elc); } else { $(this).append(elc); } //Again IE if(cm[i].edittype == "select" && typeof(cm[i].editoptions)!=="undefined" && cm[i].editoptions.multiple===true && typeof(cm[i].editoptions.dataUrl)==="undefined" && $.browser.msie) { $(elc).width($(elc).width()); } cnt++; } } }); if(cnt > 0) { svr.id = rowid; $t.p.savedRow.push(svr); $(ind).attr("editable","1"); $("td:eq("+focus+") input",ind).focus(); if(o.keys===true) { $(ind).bind("keydown",function(e) { if (e.keyCode === 27) { $($t).jqGrid("restoreRow",rowid, o.afterrestorefunc); if($t.p._inlinenav) { try { $($t).jqGrid('showAddEditButtons'); } catch (eer1) {} } return false; } if (e.keyCode === 13) { var ta = e.target; if(ta.tagName == 'TEXTAREA') { return true; } if( $($t).jqGrid("saveRow", rowid, o ) ) { if($t.p._inlinenav) { try { $($t).jqGrid('showAddEditButtons'); } catch (eer2) {} } } return false; } }); } $($t).triggerHandler("jqGridInlineEditRow", [rowid, o]); if( $.isFunction(o.oneditfunc)) { o.oneditfunc.call($t, rowid); } } } }); }, saveRow : function(rowid, successfunc, url, extraparam, aftersavefunc,errorfunc, afterrestorefunc) { // Compatible mode old versions var args = $.makeArray(arguments).slice(1), o = {}; if( $.type(args[0]) === "object" ) { o = args[0]; } else { if ($.isFunction(successfunc)) { o.successfunc = successfunc; } if (typeof url !== "undefined") { o.url = url; } if (typeof extraparam !== "undefined") { o.extraparam = extraparam; } if ($.isFunction(aftersavefunc)) { o.aftersavefunc = aftersavefunc; } if ($.isFunction(errorfunc)) { o.errorfunc = errorfunc; } if ($.isFunction(afterrestorefunc)) { o.afterrestorefunc = afterrestorefunc; } } o = $.extend(true, { successfunc: null, url: null, extraparam: {}, aftersavefunc: null, errorfunc: null, afterrestorefunc: null, restoreAfterError: true, mtype: "POST" }, $.jgrid.inlineEdit, o ); // End compatible var success = false; var $t = this[0], nm, tmp={}, tmp2={}, tmp3= {}, editable, fr, cv, ind; if (!$t.grid ) { return success; } ind = $($t).jqGrid("getInd",rowid,true); if(ind === false) {return success;} editable = $(ind).attr("editable"); o.url = o.url ? o.url : $t.p.editurl; if (editable==="1") { var cm; $('td[role="gridcell"]',ind).each(function(i) { cm = $t.p.colModel[i]; nm = cm.name; if ( nm != 'cb' && nm != 'subgrid' && cm.editable===true && nm != 'rn' && !$(this).hasClass('not-editable-cell')) { switch (cm.edittype) { case "checkbox": var cbv = ["Yes","No"]; if(cm.editoptions ) { cbv = cm.editoptions.value.split(":"); } tmp[nm]= $("input",this).is(":checked") ? cbv[0] : cbv[1]; break; case 'text': case 'password': case 'textarea': case "button" : tmp[nm]=$("input, textarea",this).val(); break; case 'select': if(!cm.editoptions.multiple) { tmp[nm] = $("select option:selected",this).val(); tmp2[nm] = $("select option:selected", this).text(); } else { var sel = $("select",this), selectedText = []; tmp[nm] = $(sel).val(); if(tmp[nm]) { tmp[nm]= tmp[nm].join(","); } else { tmp[nm] =""; } $("select option:selected",this).each( function(i,selected){ selectedText[i] = $(selected).text(); } ); tmp2[nm] = selectedText.join(","); } if(cm.formatter && cm.formatter == 'select') { tmp2={}; } break; case 'custom' : try { if(cm.editoptions && $.isFunction(cm.editoptions.custom_value)) { tmp[nm] = cm.editoptions.custom_value.call($t, $(".customelement",this),'get'); if (tmp[nm] === undefined) { throw "e2"; } } else { throw "e1"; } } catch (e) { if (e=="e1") { $.jgrid.info_dialog($.jgrid.errors.errcap,"function 'custom_value' "+$.jgrid.edit.msg.nodefined,$.jgrid.edit.bClose); } if (e=="e2") { $.jgrid.info_dialog($.jgrid.errors.errcap,"function 'custom_value' "+$.jgrid.edit.msg.novalue,$.jgrid.edit.bClose); } else { $.jgrid.info_dialog($.jgrid.errors.errcap,e.message,$.jgrid.edit.bClose); } } break; } cv = $.jgrid.checkValues(tmp[nm],i,$t); if(cv[0] === false) { cv[1] = tmp[nm] + " " + cv[1]; return false; } if($t.p.autoencode) { tmp[nm] = $.jgrid.htmlEncode(tmp[nm]); } if(o.url !== 'clientArray' && cm.editoptions && cm.editoptions.NullIfEmpty === true) { if(tmp[nm] === "") { tmp3[nm] = 'null'; } } } }); if (cv[0] === false){ try { var positions = $.jgrid.findPos($("#"+$.jgrid.jqID(rowid), $t.grid.bDiv)[0]); $.jgrid.info_dialog($.jgrid.errors.errcap,cv[1],$.jgrid.edit.bClose,{left:positions[0],top:positions[1]}); } catch (e) { alert(cv[1]); } return success; } var idname, opers, oper; opers = $t.p.prmNames; oper = opers.oper; idname = opers.id; if(tmp) { tmp[oper] = opers.editoper; tmp[idname] = rowid; if(typeof($t.p.inlineData) == 'undefined') { $t.p.inlineData ={}; } tmp = $.extend({},tmp,$t.p.inlineData,o.extraparam); } if (o.url == 'clientArray') { tmp = $.extend({},tmp, tmp2); if($t.p.autoencode) { $.each(tmp,function(n,v){ tmp[n] = $.jgrid.htmlDecode(v); }); } var resp = $($t).jqGrid("setRowData",rowid,tmp); $(ind).attr("editable","0"); for( var k=0;k<$t.p.savedRow.length;k++) { if( $t.p.savedRow[k].id == rowid) {fr = k; break;} } if(fr >= 0) { $t.p.savedRow.splice(fr,1); } $($t).triggerHandler("jqGridInlineAfterSaveRow", [rowid, resp, tmp, o]); if( $.isFunction(o.aftersavefunc) ) { o.aftersavefunc.call($t, rowid,resp, o); } success = true; $(ind).unbind("keydown"); } else { $("#lui_"+$.jgrid.jqID($t.p.id)).show(); tmp3 = $.extend({},tmp,tmp3); tmp3[idname] = $.jgrid.stripPref($t.p.idPrefix, tmp3[idname]); $.ajax($.extend({ url:o.url, data: $.isFunction($t.p.serializeRowData) ? $t.p.serializeRowData.call($t, tmp3) : tmp3, type: o.mtype, async : false, //?!? complete: function(res,stat){ $("#lui_"+$.jgrid.jqID($t.p.id)).hide(); if (stat === "success"){ var ret = true, sucret; sucret = $($t).triggerHandler("jqGridInlineSuccessSaveRow", [res, rowid, o]); if (!$.isArray(sucret)) {sucret = [true, tmp];} if (sucret[0] && $.isFunction(o.successfunc)) {sucret = o.successfunc.call($t, res);} if($.isArray(sucret)) { // expect array - status, data, rowid ret = sucret[0]; tmp = sucret[1] ? sucret[1] : tmp; } else { ret = sucret; } if (ret===true) { if($t.p.autoencode) { $.each(tmp,function(n,v){ tmp[n] = $.jgrid.htmlDecode(v); }); } tmp = $.extend({},tmp, tmp2); $($t).jqGrid("setRowData",rowid,tmp); $(ind).attr("editable","0"); for( var k=0;k<$t.p.savedRow.length;k++) { if( $t.p.savedRow[k].id == rowid) {fr = k; break;} } if(fr >= 0) { $t.p.savedRow.splice(fr,1); } $($t).triggerHandler("jqGridInlineAfterSaveRow", [rowid, res, tmp, o]); if( $.isFunction(o.aftersavefunc) ) { o.aftersavefunc.call($t, rowid,res); } success = true; $(ind).unbind("keydown"); } else { $($t).triggerHandler("jqGridInlineErrorSaveRow", [rowid, res, stat, null, o]); if($.isFunction(o.errorfunc) ) { o.errorfunc.call($t, rowid, res, stat, null); } if(o.restoreAfterError === true) { $($t).jqGrid("restoreRow",rowid, o.afterrestorefunc); } } } }, error:function(res,stat,err){ $("#lui_"+$.jgrid.jqID($t.p.id)).hide(); $($t).triggerHandler("jqGridInlineErrorSaveRow", [rowid, res, stat, err, o]); if($.isFunction(o.errorfunc) ) { o.errorfunc.call($t, rowid, res, stat, err); } else { var rT = res.responseText || res.statusText; try { $.jgrid.info_dialog($.jgrid.errors.errcap,'<div class="ui-state-error">'+ rT +'</div>', $.jgrid.edit.bClose,{buttonalign:'right'}); } catch(e) { alert(rT); } } if(o.restoreAfterError === true) { $($t).jqGrid("restoreRow",rowid, o.afterrestorefunc); } } }, $.jgrid.ajaxOptions, $t.p.ajaxRowOptions || {})); } } return success; }, restoreRow : function(rowid, afterrestorefunc) { // Compatible mode old versions var args = $.makeArray(arguments).slice(1), o={}; if( $.type(args[0]) === "object" ) { o = args[0]; } else { if ($.isFunction(afterrestorefunc)) { o.afterrestorefunc = afterrestorefunc; } } o = $.extend(true, $.jgrid.inlineEdit, o ); // End compatible return this.each(function(){ var $t= this, fr, ind, ares={}; if (!$t.grid ) { return; } ind = $($t).jqGrid("getInd",rowid,true); if(ind === false) {return;} for( var k=0;k<$t.p.savedRow.length;k++) { if( $t.p.savedRow[k].id == rowid) {fr = k; break;} } if(fr >= 0) { if($.isFunction($.fn.datepicker)) { try { $("input.hasDatepicker","#"+$.jgrid.jqID(ind.id)).datepicker('hide'); } catch (e) {} } $.each($t.p.colModel, function(){ if(this.editable === true && this.name in $t.p.savedRow[fr] ) { ares[this.name] = $t.p.savedRow[fr][this.name]; } }); $($t).jqGrid("setRowData",rowid,ares); $(ind).attr("editable","0").unbind("keydown"); $t.p.savedRow.splice(fr,1); if($("#"+$.jgrid.jqID(rowid), "#"+$.jgrid.jqID($t.p.id)).hasClass("jqgrid-new-row")){ setTimeout(function(){$($t).jqGrid("delRowData",rowid);},0); } } $($t).triggerHandler("jqGridInlineAfterRestoreRow", [rowid]); if ($.isFunction(o.afterrestorefunc)) { o.afterrestorefunc.call($t, rowid); } }); }, addRow : function ( p ) { p = $.extend(true, { rowID : "new_row", initdata : {}, position :"first", useDefValues : true, useFormatter : false, addRowParams : {extraparam:{}} },p || {}); return this.each(function(){ if (!this.grid ) { return; } var $t = this; if(p.useDefValues === true) { $($t.p.colModel).each(function(){ if( this.editoptions && this.editoptions.defaultValue ) { var opt = this.editoptions.defaultValue, tmp = $.isFunction(opt) ? opt.call($t) : opt; p.initdata[this.name] = tmp; } }); } $($t).jqGrid('addRowData', p.rowID, p.initdata, p.position); p.rowID = $t.p.idPrefix + p.rowID; $("#"+$.jgrid.jqID(p.rowID), "#"+$.jgrid.jqID($t.p.id)).addClass("jqgrid-new-row"); if(p.useFormatter) { $("#"+$.jgrid.jqID(p.rowID)+" .ui-inline-edit", "#"+$.jgrid.jqID($t.p.id)).click(); } else { var opers = $t.p.prmNames, oper = opers.oper; p.addRowParams.extraparam[oper] = opers.addoper; $($t).jqGrid('editRow', p.rowID, p.addRowParams); $($t).jqGrid('setSelection', p.rowID); } }); }, inlineNav : function (elem, o) { o = $.extend({ edit: true, editicon: "ui-icon-pencil", add: true, addicon:"ui-icon-plus", save: true, saveicon:"ui-icon-disk", cancel: true, cancelicon:"ui-icon-cancel", addParams : {useFormatter : false,rowID : "new_row"}, editParams : {}, restoreAfterSelect : true }, $.jgrid.nav, o ||{}); return this.each(function(){ if (!this.grid ) { return; } var $t = this, onSelect, gID = $.jgrid.jqID($t.p.id); $t.p._inlinenav = true; // detect the formatactions column if(o.addParams.useFormatter === true) { var cm = $t.p.colModel,i; for (i = 0; i<cm.length; i++) { if(cm[i].formatter && cm[i].formatter === "actions" ) { if(cm[i].formatoptions) { var defaults = { keys:false, onEdit : null, onSuccess: null, afterSave:null, onError: null, afterRestore: null, extraparam: {}, url: null }, ap = $.extend( defaults, cm[i].formatoptions ); o.addParams.addRowParams = { "keys" : ap.keys, "oneditfunc" : ap.onEdit, "successfunc" : ap.onSuccess, "url" : ap.url, "extraparam" : ap.extraparam, "aftersavefunc" : ap.afterSavef, "errorfunc": ap.onError, "afterrestorefunc" : ap.afterRestore }; } break; } } } if(o.add) { $($t).jqGrid('navButtonAdd', elem,{ caption : o.addtext, title : o.addtitle, buttonicon : o.addicon, id : $t.p.id+"_iladd", onClickButton : function () { $($t).jqGrid('addRow', o.addParams); if(!o.addParams.useFormatter) { $("#"+gID+"_ilsave").removeClass('ui-state-disabled'); $("#"+gID+"_ilcancel").removeClass('ui-state-disabled'); $("#"+gID+"_iladd").addClass('ui-state-disabled'); $("#"+gID+"_iledit").addClass('ui-state-disabled'); } } }); } if(o.edit) { $($t).jqGrid('navButtonAdd', elem,{ caption : o.edittext, title : o.edittitle, buttonicon : o.editicon, id : $t.p.id+"_iledit", onClickButton : function () { var sr = $($t).jqGrid('getGridParam','selrow'); if(sr) { $($t).jqGrid('editRow', sr, o.editParams); $("#"+gID+"_ilsave").removeClass('ui-state-disabled'); $("#"+gID+"_ilcancel").removeClass('ui-state-disabled'); $("#"+gID+"_iladd").addClass('ui-state-disabled'); $("#"+gID+"_iledit").addClass('ui-state-disabled'); } else { $.jgrid.viewModal("#alertmod",{gbox:"#gbox_"+gID,jqm:true});$("#jqg_alrt").focus(); } } }); } if(o.save) { $($t).jqGrid('navButtonAdd', elem,{ caption : o.savetext || '', title : o.savetitle || 'Save row', buttonicon : o.saveicon, id : $t.p.id+"_ilsave", onClickButton : function () { var sr = $t.p.savedRow[0].id; if(sr) { var opers = $t.p.prmNames, oper = opers.oper; if(!o.editParams.extraparam) { o.editParams.extraparam = {}; } if($("#"+$.jgrid.jqID(sr), "#"+gID ).hasClass("jqgrid-new-row")) { o.editParams.extraparam[oper] = opers.addoper; } else { o.editParams.extraparam[oper] = opers.editoper; } if( $($t).jqGrid('saveRow', sr, o.editParams) ) { $($t).jqGrid('showAddEditButtons'); } } else { $.jgrid.viewModal("#alertmod",{gbox:"#gbox_"+gID,jqm:true});$("#jqg_alrt").focus(); } } }); $("#"+gID+"_ilsave").addClass('ui-state-disabled'); } if(o.cancel) { $($t).jqGrid('navButtonAdd', elem,{ caption : o.canceltext || '', title : o.canceltitle || 'Cancel row editing', buttonicon : o.cancelicon, id : $t.p.id+"_ilcancel", onClickButton : function () { var sr = $t.p.savedRow[0].id; if(sr) { $($t).jqGrid('restoreRow', sr, o.editParams); $($t).jqGrid('showAddEditButtons'); } else { $.jgrid.viewModal("#alertmod",{gbox:"#gbox_"+gID,jqm:true});$("#jqg_alrt").focus(); } } }); $("#"+gID+"_ilcancel").addClass('ui-state-disabled'); } if(o.restoreAfterSelect === true) { if($.isFunction($t.p.beforeSelectRow)) { onSelect = $t.p.beforeSelectRow; } else { onSelect = false; } $t.p.beforeSelectRow = function(id, stat) { var ret = true; if($t.p.savedRow.length > 0 && $t.p._inlinenav===true && ( id !== $t.p.selrow && $t.p.selrow !==null) ) { if($t.p.selrow == o.addParams.rowID ) { $($t).jqGrid('delRowData', $t.p.selrow); } else { $($t).jqGrid('restoreRow', $t.p.selrow, o.editParams); } $($t).jqGrid('showAddEditButtons'); } if(onSelect) { ret = onSelect.call($t, id, stat); } return ret; }; } }); }, showAddEditButtons : function() { return this.each(function(){ if (!this.grid ) { return; } var gID = $.jgrid.jqID(this.p.id); $("#"+gID+"_ilsave").addClass('ui-state-disabled'); $("#"+gID+"_ilcancel").addClass('ui-state-disabled'); $("#"+gID+"_iladd").removeClass('ui-state-disabled'); $("#"+gID+"_iledit").removeClass('ui-state-disabled'); }); } //end inline edit }); })(jQuery);
fdcmessenger/framework
sampleWebApp/src/main/webapp/scripts/jqgrid/src/grid.inlinedit.js
JavaScript
apache-2.0
19,833
[ 30522, 1025, 1006, 3853, 1006, 1002, 1007, 1063, 1013, 1008, 1008, 1008, 1046, 4160, 16523, 3593, 5331, 2005, 26242, 8370, 2951, 1008, 4116, 3419, 4492, 4116, 1030, 13012, 13033, 1012, 4012, 1008, 8299, 1024, 1013, 1013, 13012, 13033, 1012,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * OpenRISC Linux * * Linux architectural port borrowing liberally from similar works of * others. All original copyrights apply as per the original source * declaration. * * OpenRISC implementation: * Copyright (C) 2003 Matjaz Breskvar <phoenix@bsemi.com> * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se> * et al. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #ifndef __ASM_OPENRISC_LINKAGE_H #define __ASM_OPENRISC_LINKAGE_H #define __ALIGN .align 0 #define __ALIGN_STR ".align 0" #endif
jameshilliard/m8-3.4.0-gb1fa77f
arch/openrisc/include/asm/linkage.h
C
gpl-2.0
734
[ 30522, 1013, 1008, 1008, 2330, 6935, 2278, 11603, 1008, 1008, 11603, 6549, 3417, 23733, 4314, 2135, 2013, 2714, 2573, 1997, 1008, 2500, 1012, 2035, 2434, 9385, 2015, 6611, 2004, 2566, 1996, 2434, 3120, 1008, 8170, 1012, 1008, 1008, 2330, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#include "Shape.h" #include "DynBase.h" //#include <iostream> using std::cout; using std::endl; Shape::~Shape() { cout << "~Shape ..." << endl; } void Circle::Draw() { cout << "Circle::Draw() ..." << endl; } Circle::~Circle() { cout << "~Circle ..." << endl; } void Square::Draw() { cout << "Square::Draw() ..." << endl; } Square::~Square() { cout << "~Square ..." << endl; } void Rectangle::Draw() { cout << "Rectangle::Draw() ..." << endl; } Rectangle::~Rectangle() { cout << "~Rectangle ..." << endl; } REGISTER_CLASS(Circle); REGISTER_CLASS(Square); REGISTER_CLASS(Rectangle); /*class CircleRegister { public: static void* NewInstance() { return new Rectangle; } private: static Register reg_; }; Register CircleRegister::reg_("Circle", CircleRegister::NewInstance);*/
lixinyancici/code-for-learning-cpp
cppbasic/Shape.cpp
C++
bsd-3-clause
796
[ 30522, 1001, 2421, 1000, 4338, 1012, 1044, 1000, 1001, 2421, 1000, 1040, 6038, 15058, 1012, 1044, 1000, 1013, 1013, 1001, 2421, 1026, 16380, 25379, 1028, 2478, 2358, 2094, 1024, 1024, 2522, 4904, 1025, 2478, 2358, 2094, 1024, 1024, 2203, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# vakata\authentication\password\PasswordDatabaseAdvanced A class for advanced password authentication - user/pass combinations are looked up in a database. ## Methods | Name | Description | |------|-------------| |[__construct](#vakata\authentication\password\passworddatabaseadvanced__construct)|Create an instance.| |[changePassword](#vakata\authentication\password\passworddatabaseadvancedchangepassword)|Change a user's password| |[authenticate](#vakata\authentication\password\passworddatabaseadvancedauthenticate)|Authenticate using the supplied creadentials.| |[supports](#vakata\authentication\password\passworddatabaseadvancedsupports)|Does the auth class support this input| --- ### vakata\authentication\password\PasswordDatabaseAdvanced::__construct Create an instance. Requires a users table with `username` and `password` columns. Requires a log table with `username`, `created`, `action`, `data` and `ip` columns. The rules array may contain: * `minLength` - the minimum password length - defaults to `3` * `minStrength` - the minimum password strength - defaults to `2` (max is `5`) * `changeEvery` - should a password change be enforced (a strtotime expression) - defaults to `30 days` * `errorTimeout` - timeout in seconds between login attempts after errorTimeoutThreshold - defaults to `3` * `errorTimeoutThreshold` - the number of wrong attempts before enforcing a timeout - defaults to `3` * `errorLongTimeout` - a second timeout between login attempts after another threshold - defaults to `10` * `errorLongTimeoutThreshold` - the number of wrong attempts before enforcing a long timeout - defaults to `10` * `ipChecks` - should the above timeouts be enforced on IP level too - defaults to `true` * `uniquePasswordCount` - do not allow reusing the last X passwords - defaults to `3` ```php public function __construct ( \DatabaseInterface $db, string $table, string $logTable, array $rules ) ``` | | Type | Description | |-----|-----|-----| | `$db` | `\DatabaseInterface` | a database object | | `$table` | `string` | the table to use (defaults to `users_password`) | | `$logTable` | `string` | the log table to use (defaults to `users_password_log`) | | `$rules` | `array` | optional rules for the class that will override the defaults | --- ### vakata\authentication\password\PasswordDatabaseAdvanced::changePassword Change a user's password ```php public function changePassword ( string $username, string $password ) ``` | | Type | Description | |-----|-----|-----| | `$username` | `string` | the username whose password is being changed | | `$password` | `string` | the new password | --- ### vakata\authentication\password\PasswordDatabaseAdvanced::authenticate Authenticate using the supplied creadentials. Returns a JWT token or throws an AuthenticationException or a PasswordChangeException. The data may contain `password1` and `password2` fields for password changing. ```php public function authenticate ( array $data ) : \vakata\authentication\Credentials ``` | | Type | Description | |-----|-----|-----| | `$data` | `array` | the auth input (should contain `username` and `password` keys) | | | | | | `return` | `\vakata\authentication\Credentials` | | --- ### vakata\authentication\password\PasswordDatabaseAdvanced::supports Does the auth class support this input ```php public function supports ( array $data ) : boolean ``` | | Type | Description | |-----|-----|-----| | `$data` | `array` | the auth input | | | | | | `return` | `boolean` | is this input supported by the class | ---
vakata/authentication
docs/password/PasswordDatabaseAdvanced.md
Markdown
mit
3,666
[ 30522, 1001, 12436, 29123, 1032, 27280, 1032, 20786, 1032, 20786, 2850, 2696, 15058, 4215, 21789, 2094, 1037, 2465, 2005, 3935, 20786, 27280, 1011, 5310, 1013, 3413, 14930, 2024, 2246, 2039, 1999, 1037, 7809, 1012, 1001, 1001, 4725, 1064, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
;(function($){ var objects = {}; $.editlive.sync = function() { $('editlive').each(function(){ var el = $(this); if (el.attr('app-label') && el.attr('module-name') && el.attr('field-name') && el.attr('object-id')) { var model = el.attr('app-label') +'.'+ el.attr('module-name'); if (!objects[model]) objects[model] = []; objects[model].push({ app_label: el.attr('app-label'), field_name: el.attr('field-name'), //field_type: el.data('type'), rendered_value: el.attr('rendered-value'), object_id: el.attr('object-id'), template_filters: el.attr('template_filters'), module_name: el.attr('module-name'), formset: el.attr('formset'), value: $('#'+ el.data('field-id')).val() //data: el.data() }); } }); }; var synched = function(data) { console.log(data); } $.editlive.do_sync = function() { Dajaxice.editlive.sync(synched, objects); }; $(function(){ $.editlive.sync(); }); })(jQuery);
h3/django-editlive
editlive/static/editlive/js/jquery.editlive.sync.js
JavaScript
bsd-3-clause
1,264
[ 30522, 1025, 1006, 3853, 1006, 1002, 1007, 1063, 13075, 5200, 1027, 1063, 1065, 1025, 1002, 1012, 10086, 3669, 3726, 1012, 26351, 1027, 3853, 1006, 1007, 1063, 1002, 1006, 1005, 10086, 3669, 3726, 1005, 1007, 1012, 2169, 1006, 3853, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* Copyright 2022 Rancher Labs, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by main. DO NOT EDIT. package v3 import ( "context" "time" "github.com/rancher/lasso/pkg/client" "github.com/rancher/lasso/pkg/controller" v3 "github.com/rancher/rancher/pkg/apis/management.cattle.io/v3" "github.com/rancher/wrangler/pkg/generic" "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/tools/cache" ) type PodSecurityPolicyTemplateHandler func(string, *v3.PodSecurityPolicyTemplate) (*v3.PodSecurityPolicyTemplate, error) type PodSecurityPolicyTemplateController interface { generic.ControllerMeta PodSecurityPolicyTemplateClient OnChange(ctx context.Context, name string, sync PodSecurityPolicyTemplateHandler) OnRemove(ctx context.Context, name string, sync PodSecurityPolicyTemplateHandler) Enqueue(name string) EnqueueAfter(name string, duration time.Duration) Cache() PodSecurityPolicyTemplateCache } type PodSecurityPolicyTemplateClient interface { Create(*v3.PodSecurityPolicyTemplate) (*v3.PodSecurityPolicyTemplate, error) Update(*v3.PodSecurityPolicyTemplate) (*v3.PodSecurityPolicyTemplate, error) Delete(name string, options *metav1.DeleteOptions) error Get(name string, options metav1.GetOptions) (*v3.PodSecurityPolicyTemplate, error) List(opts metav1.ListOptions) (*v3.PodSecurityPolicyTemplateList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v3.PodSecurityPolicyTemplate, err error) } type PodSecurityPolicyTemplateCache interface { Get(name string) (*v3.PodSecurityPolicyTemplate, error) List(selector labels.Selector) ([]*v3.PodSecurityPolicyTemplate, error) AddIndexer(indexName string, indexer PodSecurityPolicyTemplateIndexer) GetByIndex(indexName, key string) ([]*v3.PodSecurityPolicyTemplate, error) } type PodSecurityPolicyTemplateIndexer func(obj *v3.PodSecurityPolicyTemplate) ([]string, error) type podSecurityPolicyTemplateController struct { controller controller.SharedController client *client.Client gvk schema.GroupVersionKind groupResource schema.GroupResource } func NewPodSecurityPolicyTemplateController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) PodSecurityPolicyTemplateController { c := controller.ForResourceKind(gvk.GroupVersion().WithResource(resource), gvk.Kind, namespaced) return &podSecurityPolicyTemplateController{ controller: c, client: c.Client(), gvk: gvk, groupResource: schema.GroupResource{ Group: gvk.Group, Resource: resource, }, } } func FromPodSecurityPolicyTemplateHandlerToHandler(sync PodSecurityPolicyTemplateHandler) generic.Handler { return func(key string, obj runtime.Object) (ret runtime.Object, err error) { var v *v3.PodSecurityPolicyTemplate if obj == nil { v, err = sync(key, nil) } else { v, err = sync(key, obj.(*v3.PodSecurityPolicyTemplate)) } if v == nil { return nil, err } return v, err } } func (c *podSecurityPolicyTemplateController) Updater() generic.Updater { return func(obj runtime.Object) (runtime.Object, error) { newObj, err := c.Update(obj.(*v3.PodSecurityPolicyTemplate)) if newObj == nil { return nil, err } return newObj, err } } func UpdatePodSecurityPolicyTemplateDeepCopyOnChange(client PodSecurityPolicyTemplateClient, obj *v3.PodSecurityPolicyTemplate, handler func(obj *v3.PodSecurityPolicyTemplate) (*v3.PodSecurityPolicyTemplate, error)) (*v3.PodSecurityPolicyTemplate, error) { if obj == nil { return obj, nil } copyObj := obj.DeepCopy() newObj, err := handler(copyObj) if newObj != nil { copyObj = newObj } if obj.ResourceVersion == copyObj.ResourceVersion && !equality.Semantic.DeepEqual(obj, copyObj) { return client.Update(copyObj) } return copyObj, err } func (c *podSecurityPolicyTemplateController) AddGenericHandler(ctx context.Context, name string, handler generic.Handler) { c.controller.RegisterHandler(ctx, name, controller.SharedControllerHandlerFunc(handler)) } func (c *podSecurityPolicyTemplateController) AddGenericRemoveHandler(ctx context.Context, name string, handler generic.Handler) { c.AddGenericHandler(ctx, name, generic.NewRemoveHandler(name, c.Updater(), handler)) } func (c *podSecurityPolicyTemplateController) OnChange(ctx context.Context, name string, sync PodSecurityPolicyTemplateHandler) { c.AddGenericHandler(ctx, name, FromPodSecurityPolicyTemplateHandlerToHandler(sync)) } func (c *podSecurityPolicyTemplateController) OnRemove(ctx context.Context, name string, sync PodSecurityPolicyTemplateHandler) { c.AddGenericHandler(ctx, name, generic.NewRemoveHandler(name, c.Updater(), FromPodSecurityPolicyTemplateHandlerToHandler(sync))) } func (c *podSecurityPolicyTemplateController) Enqueue(name string) { c.controller.Enqueue("", name) } func (c *podSecurityPolicyTemplateController) EnqueueAfter(name string, duration time.Duration) { c.controller.EnqueueAfter("", name, duration) } func (c *podSecurityPolicyTemplateController) Informer() cache.SharedIndexInformer { return c.controller.Informer() } func (c *podSecurityPolicyTemplateController) GroupVersionKind() schema.GroupVersionKind { return c.gvk } func (c *podSecurityPolicyTemplateController) Cache() PodSecurityPolicyTemplateCache { return &podSecurityPolicyTemplateCache{ indexer: c.Informer().GetIndexer(), resource: c.groupResource, } } func (c *podSecurityPolicyTemplateController) Create(obj *v3.PodSecurityPolicyTemplate) (*v3.PodSecurityPolicyTemplate, error) { result := &v3.PodSecurityPolicyTemplate{} return result, c.client.Create(context.TODO(), "", obj, result, metav1.CreateOptions{}) } func (c *podSecurityPolicyTemplateController) Update(obj *v3.PodSecurityPolicyTemplate) (*v3.PodSecurityPolicyTemplate, error) { result := &v3.PodSecurityPolicyTemplate{} return result, c.client.Update(context.TODO(), "", obj, result, metav1.UpdateOptions{}) } func (c *podSecurityPolicyTemplateController) Delete(name string, options *metav1.DeleteOptions) error { if options == nil { options = &metav1.DeleteOptions{} } return c.client.Delete(context.TODO(), "", name, *options) } func (c *podSecurityPolicyTemplateController) Get(name string, options metav1.GetOptions) (*v3.PodSecurityPolicyTemplate, error) { result := &v3.PodSecurityPolicyTemplate{} return result, c.client.Get(context.TODO(), "", name, result, options) } func (c *podSecurityPolicyTemplateController) List(opts metav1.ListOptions) (*v3.PodSecurityPolicyTemplateList, error) { result := &v3.PodSecurityPolicyTemplateList{} return result, c.client.List(context.TODO(), "", result, opts) } func (c *podSecurityPolicyTemplateController) Watch(opts metav1.ListOptions) (watch.Interface, error) { return c.client.Watch(context.TODO(), "", opts) } func (c *podSecurityPolicyTemplateController) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v3.PodSecurityPolicyTemplate, error) { result := &v3.PodSecurityPolicyTemplate{} return result, c.client.Patch(context.TODO(), "", name, pt, data, result, metav1.PatchOptions{}, subresources...) } type podSecurityPolicyTemplateCache struct { indexer cache.Indexer resource schema.GroupResource } func (c *podSecurityPolicyTemplateCache) Get(name string) (*v3.PodSecurityPolicyTemplate, error) { obj, exists, err := c.indexer.GetByKey(name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(c.resource, name) } return obj.(*v3.PodSecurityPolicyTemplate), nil } func (c *podSecurityPolicyTemplateCache) List(selector labels.Selector) (ret []*v3.PodSecurityPolicyTemplate, err error) { err = cache.ListAll(c.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v3.PodSecurityPolicyTemplate)) }) return ret, err } func (c *podSecurityPolicyTemplateCache) AddIndexer(indexName string, indexer PodSecurityPolicyTemplateIndexer) { utilruntime.Must(c.indexer.AddIndexers(map[string]cache.IndexFunc{ indexName: func(obj interface{}) (strings []string, e error) { return indexer(obj.(*v3.PodSecurityPolicyTemplate)) }, })) } func (c *podSecurityPolicyTemplateCache) GetByIndex(indexName, key string) (result []*v3.PodSecurityPolicyTemplate, err error) { objs, err := c.indexer.ByIndex(indexName, key) if err != nil { return nil, err } result = make([]*v3.PodSecurityPolicyTemplate, 0, len(objs)) for _, obj := range objs { result = append(result, obj.(*v3.PodSecurityPolicyTemplate)) } return result, nil }
rancher/rancher
pkg/generated/controllers/management.cattle.io/v3/podsecuritypolicytemplate.go
GO
apache-2.0
9,408
[ 30522, 1013, 1008, 9385, 16798, 2475, 8086, 2121, 13625, 1010, 4297, 1012, 7000, 2104, 1996, 15895, 6105, 1010, 2544, 1016, 1012, 1014, 1006, 1996, 1000, 6105, 1000, 1007, 1025, 2017, 2089, 2025, 2224, 2023, 5371, 3272, 1999, 12646, 2007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package dev.jeka.core.api.depmanagement; import dev.jeka.core.api.utils.JkUtilsIterable; import dev.jeka.core.api.utils.JkUtilsPath; import java.nio.file.Path; import java.util.Collections; import java.util.LinkedList; import java.util.List; /** * A dependency on files located on file system. */ public final class JkFileSystemDependency implements JkFileDependency { private final Path ideProjectDir; private JkFileSystemDependency(Iterable<Path> files, Path ideProjectDir) { this.files = Collections.unmodifiableList(JkUtilsIterable.listWithoutDuplicateOf(files)); this.ideProjectDir = ideProjectDir; } /** * Creates a {@link JkFileSystemDependency} on the specified files. */ public static JkFileSystemDependency of(Iterable<Path> files) { final Iterable<Path> trueFiles = JkUtilsPath.disambiguate(files); return new JkFileSystemDependency(trueFiles, null); } private final List<Path> files; @Override public final List<Path> getFiles() { return files; } public JkFileSystemDependency minusFile(Path file) { List<Path> result = new LinkedList<>(files); result.remove(file); return new JkFileSystemDependency(result, ideProjectDir); } @Override public String toString() { return "Files=" + files.toString(); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final JkFileSystemDependency that = (JkFileSystemDependency) o; return files.equals(that.files); } @Override public int hashCode() { return files.hashCode(); } @Override public Path getIdeProjectDir() { return ideProjectDir; } @Override public JkFileSystemDependency withIdeProjectDir(Path path) { return new JkFileSystemDependency(files, path); } }
jerkar/jerkar
dev.jeka.core/src/main/java/dev/jeka/core/api/depmanagement/JkFileSystemDependency.java
Java
apache-2.0
2,003
[ 30522, 7427, 16475, 1012, 15333, 2912, 1012, 4563, 1012, 17928, 1012, 2139, 9737, 5162, 20511, 1025, 12324, 16475, 1012, 15333, 2912, 1012, 4563, 1012, 17928, 1012, 21183, 12146, 1012, 1046, 5283, 3775, 4877, 21646, 3085, 1025, 12324, 16475, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
const isObjectId = objectId => objectId && /^[0-9a-fA-F]{24}$/.test(objectId) const isEmail = email => email && /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/.test(email.trim()) const isNick = nick => nick && /^[\u4E00-\u9FA5\uF900-\uFA2DA-Za-z0-9\-\_]{2,40}$/.test(nick.trim()) const isUrl = url => url && /^(http(?:|s)\:)*\/\/([^\/]+)/.test(url.trim()) export { isObjectId, isEmail, isNick, isUrl }
S-mohan/mblog
src/utils/validate.js
JavaScript
mit
406
[ 30522, 9530, 3367, 11163, 2497, 20614, 3593, 1027, 4874, 3593, 1027, 1028, 4874, 3593, 1004, 1004, 1013, 1034, 1031, 1014, 1011, 1023, 2050, 1011, 6904, 1011, 1042, 1033, 1063, 2484, 1065, 1002, 1013, 1012, 3231, 1006, 4874, 3593, 1007, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/*************************************************************************** * Copyright (C) 2010 by Gregor Kališnik <gregor@unimatrix-one.org> * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License version 3 * * as published by the Free Software Foundation. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * ***************************************************************************/ #include "explosions.h" #include <ctime> #include <QtCore/QTimer> #include "canvas.h" #include "explosion.h" Explosions::Explosions(QObject *parent) : QObject(parent) { qsrand(time(0l)); m_timer = new QTimer(this); connect(m_timer, SIGNAL(timeout()), SLOT(ignite())); ignite(); } void Explosions::ignite() { Explosion *explosion = new Explosion(Vector3f(qrand() % 100 - 50, qrand() % 100 - 50, qrand() % 100 - 50)); BGE::Canvas::canvas()->addSceneObject(explosion); m_timer->start(qrand() % 1000); }
MasterMind2k/ufb
bge/test/particle/explosions.cpp
C++
gpl-3.0
1,451
[ 30522, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/******************************************************************************* * Copyright 2014, 2016 gwt-ol3 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *******************************************************************************/ package ol; import jsinterop.annotations.JsProperty; import jsinterop.annotations.JsType; import ol.events.Event; /** * Events emitted as map events are instances of this type. See {@link ol.Map} * for which events trigger a map event. * * @author sbaumhekel */ @JsType(isNative = true) public interface MapEvent extends Event { /** * The map where the event occurred. * * @return {@link ol.Map} */ @JsProperty Map getMap(); }
mazlixek/gwt-ol3
gwt-ol3-client/src/main/java/ol/MapEvent.java
Java
apache-2.0
1,225
[ 30522, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* Copyright (C) 2012 Motorola Mobility Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the distribution. * 3. Neither the name of Motorola Mobility Inc. nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef CSSSupportsRule_h #define CSSSupportsRule_h #include "core/css/CSSGroupingRule.h" namespace blink { class CSSRule; class StyleRuleSupports; class CSSSupportsRule FINAL : public CSSGroupingRule { public: static PassRefPtrWillBeRawPtr<CSSSupportsRule> create(StyleRuleSupports* rule, CSSStyleSheet* sheet) { return adoptRefWillBeNoop(new CSSSupportsRule(rule, sheet)); } virtual ~CSSSupportsRule() { } virtual CSSRule::Type type() const OVERRIDE { return SUPPORTS_RULE; } virtual String cssText() const OVERRIDE; String conditionText() const; virtual void trace(Visitor* visitor) OVERRIDE { CSSGroupingRule::trace(visitor); } private: CSSSupportsRule(StyleRuleSupports*, CSSStyleSheet*); }; DEFINE_CSS_RULE_TYPE_CASTS(CSSSupportsRule, SUPPORTS_RULE); } // namespace blink #endif // CSSSupportsRule_h
xin3liang/platform_external_chromium_org_third_party_WebKit
Source/core/css/CSSSupportsRule.h
C
bsd-3-clause
2,448
[ 30522, 1013, 1008, 9385, 1006, 1039, 1007, 2262, 29583, 12969, 4297, 1012, 2035, 2916, 9235, 1012, 1008, 1008, 25707, 1998, 2224, 1999, 3120, 1998, 12441, 3596, 1010, 2007, 2030, 2302, 1008, 14080, 1010, 2024, 7936, 3024, 2008, 1996, 2206, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php /** * @package Mautic * @copyright 2014 Mautic Contributors. All rights reserved. * @author Mautic * @link http://mautic.org * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ namespace Mautic\CoreBundle\Helper; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; /** * Class TrackingPixelHelper */ class TrackingPixelHelper { /** * @param Request $request * * @return Response */ public static function getResponse(Request $request) { ignore_user_abort(true); //turn off gzip compression if (function_exists('apache_setenv')) { apache_setenv('no-gzip', 1); } ini_set('zlib.output_compression', 0); $response = new Response(); //removing any content encoding like gzip etc. $response->headers->set('Content-encoding', 'none'); //check to ses if request is a POST if ($request->getMethod() == 'GET') { //return 1x1 pixel transparent gif $response->headers->set('Content-type', 'image/gif'); //avoid cache time on browser side $response->headers->set('Content-Length', '42'); $response->headers->set('Cache-Control', 'private, no-cache, no-cache=Set-Cookie, proxy-revalidate'); $response->headers->set('Expires', 'Wed, 11 Jan 2000 12:59:00 GMT'); $response->headers->set('Last-Modified', 'Wed, 11 Jan 2006 12:59:00 GMT'); $response->headers->set('Pragma', 'no-cache'); $response->setContent(self::getImage()); } else { $response->setContent(' '); } return $response; } /** * @return string */ public static function getImage() { return sprintf('%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%',71,73,70,56,57,97,1,0,1,0,128,255,0,192,192,192,0,0,0,33,249,4,1,0,0,0,0,44,0,0,0,0,1,0,1,0,0,2,2,68,1,0,59); } }
MAT978/mautic
app/bundles/CoreBundle/Helper/TrackingPixelHelper.php
PHP
gpl-3.0
2,052
[ 30522, 1026, 1029, 25718, 1013, 1008, 1008, 1008, 1030, 7427, 5003, 21823, 2278, 1008, 1030, 9385, 2297, 5003, 21823, 2278, 16884, 1012, 2035, 2916, 9235, 1012, 1008, 1030, 3166, 5003, 21823, 2278, 1008, 1030, 4957, 8299, 1024, 1013, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php foreach ($content as $key => $value): ?> <div class="product-item-viewed product-node-id-<?php print $key; ?>"> <?php print l($value['title'], $value['path']); ?> <?php if (isset($value['image'])): ?> <div class='image-viewed'><img src='<?php print $value['image']; ?>' /></div> <?php endif; ?> </div> <?php endforeach; ?>
Fant0m771/commerce
sites/all/modules/custom/last_viewed_products/templates/last_viewed_products.tpl.php
PHP
gpl-2.0
363
[ 30522, 1026, 1029, 25718, 18921, 6776, 1006, 1002, 4180, 2004, 1002, 3145, 1027, 1028, 1002, 3643, 1007, 1024, 1029, 1028, 1026, 4487, 2615, 2465, 1027, 1000, 4031, 1011, 8875, 1011, 7021, 4031, 1011, 13045, 1011, 8909, 1011, 1026, 1029, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
import { expect, fixture, fixtureCleanup, fixtureSync } from '@open-wc/testing'; import sinon from 'sinon'; import volumesProvider from '../../../../src/BookNavigator/volumes/volumes-provider'; const brOptions = { "options": { "enableMultipleBooks": true, "multipleBooksList": { "by_subprefix": { "/details/SubBookTest": { "url_path": "/details/SubBookTest", "file_subprefix": "book1/GPORFP", "orig_sort": 1, "title": "book1/GPORFP.pdf", "file_source": "/book1/GPORFP_jp2.zip" }, "/details/SubBookTest/subdir/book2/brewster_kahle_internet_archive": { "url_path": "/details/SubBookTest/subdir/book2/brewster_kahle_internet_archive", "file_subprefix": "subdir/book2/brewster_kahle_internet_archive", "orig_sort": 2, "title": "subdir/book2/brewster_kahle_internet_archive.pdf", "file_source": "/subdir/book2/brewster_kahle_internet_archive_jp2.zip" }, "/details/SubBookTest/subdir/subsubdir/book3/Rfp008011ResponseInternetArchive-without-resume": { "url_path": "/details/SubBookTest/subdir/subsubdir/book3/Rfp008011ResponseInternetArchive-without-resume", "file_subprefix": "subdir/subsubdir/book3/Rfp008011ResponseInternetArchive-without-resume", "orig_sort": 3, "title": "subdir/subsubdir/book3/Rfp008011ResponseInternetArchive-without-resume.pdf", "file_source": "/subdir/subsubdir/book3/Rfp008011ResponseInternetArchive-without-resume_jp2.zip" } } } } }; afterEach(() => { sinon.restore(); fixtureCleanup(); }); describe('Volumes Provider', () => { it('constructor', () => { const onProviderChange = sinon.fake(); const baseHost = "https://archive.org"; const provider = new volumesProvider({ baseHost, bookreader: brOptions, onProviderChange }); const files = brOptions.options.multipleBooksList.by_subprefix; const volumeCount = Object.keys(files).length; expect(provider.onProviderChange).to.equal(onProviderChange); expect(provider.id).to.equal('volumes'); expect(provider.icon).to.exist; expect(fixtureSync(provider.icon).tagName).to.equal('svg'); expect(provider.label).to.equal(`Viewable files (${volumeCount})`); expect(provider.viewableFiles).to.exist; expect(provider.viewableFiles.length).to.equal(3); expect(provider.component.hostUrl).to.exist; expect(provider.component.hostUrl).to.equal(baseHost); expect(provider.component).to.exist; }); it('sorting cycles - render sort actionButton', async () => { const onProviderChange = sinon.fake(); const baseHost = "https://archive.org"; const provider = new volumesProvider({ baseHost, bookreader: brOptions, onProviderChange }); expect(provider.sortOrderBy).to.equal("default"); provider.sortVolumes("title_asc"); expect(provider.sortOrderBy).to.equal("title_asc"); expect(fixtureSync(provider.sortButton).outerHTML).includes("sort-by asc-icon"); provider.sortVolumes("title_desc"); expect(provider.sortOrderBy).to.equal("title_desc"); expect(fixtureSync(provider.sortButton).outerHTML).includes("sort-by desc-icon"); provider.sortVolumes("default"); expect(provider.sortOrderBy).to.equal("default"); expect(fixtureSync(provider.sortButton).outerHTML).includes("sort-by neutral-icon"); }); it('sort volumes in initial order', async () => { const onProviderChange = sinon.fake(); const baseHost = "https://archive.org"; const provider = new volumesProvider({ baseHost, bookreader: brOptions, onProviderChange }); const parsedFiles = brOptions.options.multipleBooksList.by_subprefix; const files = Object.keys(parsedFiles).map(item => parsedFiles[item]).sort((a, b) => a.orig_sort - b.orig_sort); const origSortTitles = files.map(item => item.title); provider.sortVolumes("default"); expect(provider.sortOrderBy).to.equal("default"); expect(provider.actionButton).to.exist; const providerFileTitles = provider.viewableFiles.map(item => item.title); // use `.eql` for "lose equality" in order to deeply compare values. expect(providerFileTitles).to.eql([...origSortTitles]); }); it('sort volumes in ascending title order', async () => { const onProviderChange = sinon.fake(); const baseHost = "https://archive.org"; const provider = new volumesProvider({ baseHost, bookreader: brOptions, onProviderChange }); const parsedFiles = brOptions.options.multipleBooksList.by_subprefix; const files = Object.keys(parsedFiles).map(item => parsedFiles[item]); const ascendingTitles = files.map(item => item.title).sort((a, b) => a.localeCompare(b)); provider.sortVolumes("title_asc"); expect(provider.sortOrderBy).to.equal("title_asc"); expect(provider.actionButton).to.exist; const providerFileTitles = provider.viewableFiles.map(item => item.title); // use `.eql` for "lose equality" in order to deeply compare values. expect(providerFileTitles).to.eql([...ascendingTitles]); }); it('sort volumes in descending title order', async () => { const onProviderChange = sinon.fake(); const baseHost = "https://archive.org"; const provider = new volumesProvider({ baseHost, bookreader: brOptions, onProviderChange }); provider.isSortAscending = false; const parsedFiles = brOptions.options.multipleBooksList.by_subprefix; const files = Object.keys(parsedFiles).map(item => parsedFiles[item]); const descendingTitles = files.map(item => item.title).sort((a, b) => b.localeCompare(a)); provider.sortVolumes("title_desc"); expect(provider.sortOrderBy).to.equals("title_desc"); expect(provider.actionButton).to.exist; const providerFileTitles = provider.viewableFiles.map(item => item.title); // use `.eql` for "lose equality" in order to deeply compare values. expect(providerFileTitles).to.eql([...descendingTitles]); }); describe('Sorting icons', () => { it('has 3 icons', async () => { const onProviderChange = sinon.fake(); const baseHost = "https://archive.org"; const provider = new volumesProvider({ baseHost, bookreader: brOptions, onProviderChange }); provider.sortOrderBy = 'default'; const origSortButton = await fixture(provider.sortButton); expect(origSortButton.classList.contains('neutral-icon')).to.be.true; provider.sortOrderBy = 'title_asc'; const ascButton = await fixture(provider.sortButton); expect(ascButton.classList.contains('asc-icon')).to.be.true; provider.sortOrderBy = 'title_desc'; const descButton = await fixture(provider.sortButton); expect(descButton.classList.contains('desc-icon')).to.be.true; }); }); });
internetarchive/bookreader
tests/karma/BookNavigator/volumes/volumes-provider.test.js
JavaScript
agpl-3.0
6,945
[ 30522, 12324, 1063, 5987, 1010, 15083, 1010, 15083, 14321, 24076, 2361, 1010, 17407, 6038, 2278, 1065, 2013, 1005, 1030, 2330, 1011, 15868, 1013, 5604, 1005, 1025, 12324, 19432, 2078, 2013, 1005, 19432, 2078, 1005, 1025, 12324, 6702, 21572, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php return [ /* |-------------------------------------------------------------------------- | Application Debug Mode |-------------------------------------------------------------------------- | | When your application is in debug mode, detailed error messages with | stack traces will be shown on every error that occurs within your | application. If disabled, a simple generic error page is shown. | */ 'debug' => env('APP_DEBUG'), /* |-------------------------------------------------------------------------- | Application URL |-------------------------------------------------------------------------- | | This URL is used by the console to properly generate URLs when using | the Artisan command line tool. You should set this to the root of | your application so that it is used when running Artisan tasks. | */ 'url' => 'http://localhost', /* |-------------------------------------------------------------------------- | Application Timezone |-------------------------------------------------------------------------- | | Here you may specify the default timezone for your application, which | will be used by the PHP date and date-time functions. We have gone | ahead and set this to a sensible default for you out of the box. | */ 'timezone' => 'UTC', /* |-------------------------------------------------------------------------- | Application Locale Configuration |-------------------------------------------------------------------------- | | The application locale determines the default locale that will be used | by the translation service provider. You are free to set this value | to any of the locales which will be supported by the application. | */ 'locale' => 'en', /* |-------------------------------------------------------------------------- | Application Fallback Locale |-------------------------------------------------------------------------- | | The fallback locale determines the locale to use when the current one | is not available. You may change the value to correspond to any of | the language folders that are provided through your application. | */ 'fallback_locale' => 'en', /* |-------------------------------------------------------------------------- | Encryption Key |-------------------------------------------------------------------------- | | This key is used by the Illuminate encrypter service and should be set | to a random, 32 character string, otherwise these encrypted strings | will not be safe. Please do this before deploying an application! | */ 'key' => env('APP_KEY', 'SomeRandomString'), 'cipher' => MCRYPT_RIJNDAEL_128, /* |-------------------------------------------------------------------------- | Logging Configuration |-------------------------------------------------------------------------- | | Here you may configure the log settings for your application. Out of | the box, Laravel uses the Monolog PHP logging library. This gives | you a variety of powerful log handlers / formatters to utilize. | | Available Settings: "single", "daily", "syslog" | */ 'log' => 'daily', /* |-------------------------------------------------------------------------- | Autoloaded Service Providers |-------------------------------------------------------------------------- | | The service providers listed here will be automatically loaded on the | request to your application. Feel free to add your own services to | this array to grant expanded functionality to your applications. | */ 'providers' => [ /* * Laravel Framework Service Providers... */ 'Illuminate\Foundation\Providers\ArtisanServiceProvider', 'Illuminate\Auth\AuthServiceProvider', 'Illuminate\Bus\BusServiceProvider', 'Illuminate\Cache\CacheServiceProvider', 'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider', 'Illuminate\Routing\ControllerServiceProvider', 'Illuminate\Cookie\CookieServiceProvider', 'Illuminate\Database\DatabaseServiceProvider', 'Illuminate\Encryption\EncryptionServiceProvider', 'Illuminate\Filesystem\FilesystemServiceProvider', 'Illuminate\Foundation\Providers\FoundationServiceProvider', 'Illuminate\Hashing\HashServiceProvider', 'Illuminate\Mail\MailServiceProvider', 'Illuminate\Pagination\PaginationServiceProvider', 'Illuminate\Pipeline\PipelineServiceProvider', 'Illuminate\Queue\QueueServiceProvider', 'Illuminate\Redis\RedisServiceProvider', 'Illuminate\Auth\Passwords\PasswordResetServiceProvider', 'Illuminate\Session\SessionServiceProvider', 'Illuminate\Translation\TranslationServiceProvider', 'Illuminate\Validation\ValidationServiceProvider', 'Illuminate\View\ViewServiceProvider', /* * Application Service Providers... */ 'App\Providers\AppServiceProvider', 'App\Providers\BusServiceProvider', 'App\Providers\ConfigServiceProvider', 'App\Providers\EventServiceProvider', 'App\Providers\RouteServiceProvider', ], /* |-------------------------------------------------------------------------- | Class Aliases |-------------------------------------------------------------------------- | | This array of class aliases will be registered when this application | is started. However, feel free to register as many as you wish as | the aliases are "lazy" loaded so they don't hinder performance. | */ 'aliases' => [ 'App' => 'Illuminate\Support\Facades\App', 'Artisan' => 'Illuminate\Support\Facades\Artisan', 'Auth' => 'Illuminate\Support\Facades\Auth', 'Blade' => 'Illuminate\Support\Facades\Blade', 'Cache' => 'Illuminate\Support\Facades\Cache', 'Config' => 'Illuminate\Support\Facades\Config', 'Cookie' => 'Illuminate\Support\Facades\Cookie', 'Crypt' => 'Illuminate\Support\Facades\Crypt', 'DB' => 'Illuminate\Support\Facades\DB', 'Event' => 'Illuminate\Support\Facades\Event', 'File' => 'Illuminate\Support\Facades\File', 'Hash' => 'Illuminate\Support\Facades\Hash', 'Input' => 'Illuminate\Support\Facades\Input', 'Inspiring' => 'Illuminate\Foundation\Inspiring', 'Lang' => 'Illuminate\Support\Facades\Lang', 'Log' => 'Illuminate\Support\Facades\Log', 'Mail' => 'Illuminate\Support\Facades\Mail', 'Paginator' => 'Illuminate\Support\Facades\Paginator', 'Password' => 'Illuminate\Support\Facades\Password', 'Queue' => 'Illuminate\Support\Facades\Queue', 'Redirect' => 'Illuminate\Support\Facades\Redirect', 'Redis' => 'Illuminate\Support\Facades\Redis', 'Request' => 'Illuminate\Support\Facades\Request', 'Response' => 'Illuminate\Support\Facades\Response', 'Route' => 'Illuminate\Support\Facades\Route', 'Schema' => 'Illuminate\Support\Facades\Schema', 'Session' => 'Illuminate\Support\Facades\Session', 'URL' => 'Illuminate\Support\Facades\URL', 'Validator' => 'Illuminate\Support\Facades\Validator', 'View' => 'Illuminate\Support\Facades\View', ], ];
WebDevSummit/DatCMS
config/app.php
PHP
mit
6,994
[ 30522, 1026, 1029, 25718, 2709, 1031, 1013, 1008, 1064, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 30524, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Copyright (c) 2012-2017 Red Hat, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Red Hat, Inc. - initial API and implementation */ package org.eclipse.che.api.deploy; import com.google.inject.AbstractModule; import com.google.inject.name.Names; import javax.sql.DataSource; import org.eclipse.che.api.user.server.jpa.JpaPreferenceDao; import org.eclipse.che.api.user.server.jpa.JpaUserDao; import org.eclipse.che.api.user.server.spi.PreferenceDao; import org.eclipse.che.api.user.server.spi.UserDao; import org.eclipse.che.inject.DynaModule; import org.eclipse.che.mail.template.ST.STTemplateProcessorImpl; import org.eclipse.che.mail.template.TemplateProcessor; import org.eclipse.che.multiuser.api.permission.server.AdminPermissionInitializer; import org.eclipse.che.multiuser.api.permission.server.PermissionChecker; import org.eclipse.che.multiuser.api.permission.server.PermissionCheckerImpl; import org.eclipse.che.multiuser.keycloak.server.deploy.KeycloakModule; import org.eclipse.che.multiuser.organization.api.OrganizationApiModule; import org.eclipse.che.multiuser.organization.api.OrganizationJpaModule; import org.eclipse.che.multiuser.resource.api.ResourceModule; import org.eclipse.che.security.PBKDF2PasswordEncryptor; import org.eclipse.che.security.PasswordEncryptor; @DynaModule public class MultiUserCheWsMasterModule extends AbstractModule { @Override protected void configure() { bind(TemplateProcessor.class).to(STTemplateProcessorImpl.class); bind(DataSource.class).toProvider(org.eclipse.che.core.db.JndiDataSourceProvider.class); install(new org.eclipse.che.multiuser.api.permission.server.jpa.SystemPermissionsJpaModule()); install(new org.eclipse.che.multiuser.api.permission.server.PermissionsModule()); install( new org.eclipse.che.multiuser.permission.workspace.server.WorkspaceApiPermissionsModule()); install( new org.eclipse.che.multiuser.permission.workspace.server.jpa .MultiuserWorkspaceJpaModule()); //Permission filters bind(org.eclipse.che.multiuser.permission.system.SystemServicePermissionsFilter.class); bind(org.eclipse.che.multiuser.permission.user.UserProfileServicePermissionsFilter.class); bind(org.eclipse.che.multiuser.permission.user.UserServicePermissionsFilter.class); bind(org.eclipse.che.multiuser.permission.factory.FactoryPermissionsFilter.class); bind(org.eclipse.che.plugin.activity.ActivityPermissionsFilter.class); bind(AdminPermissionInitializer.class).asEagerSingleton(); bind( org.eclipse.che.multiuser.permission.resource.filters.ResourceUsageServicePermissionsFilter .class); bind( org.eclipse.che.multiuser.permission.resource.filters .FreeResourcesLimitServicePermissionsFilter.class); install(new ResourceModule()); install(new OrganizationApiModule()); install(new OrganizationJpaModule()); install(new KeycloakModule()); //User and profile - use profile from keycloak and other stuff is JPA bind(PasswordEncryptor.class).to(PBKDF2PasswordEncryptor.class); bind(UserDao.class).to(JpaUserDao.class); bind(PreferenceDao.class).to(JpaPreferenceDao.class); bind(PermissionChecker.class).to(PermissionCheckerImpl.class); bindConstant() .annotatedWith(Names.named("machine.terminal_agent.run_command")) .to( "$HOME/che/terminal/che-websocket-terminal " + "-addr :4411 " + "-cmd ${SHELL_INTERPRETER} " + "-enable-auth " + "-enable-activity-tracking"); bindConstant() .annotatedWith(Names.named("machine.exec_agent.run_command")) .to( "$HOME/che/exec-agent/che-exec-agent " + "-addr :4412 " + "-cmd ${SHELL_INTERPRETER} " + "-enable-auth " + "-logs-dir $HOME/che/exec-agent/logs"); } }
TypeFox/che
assembly-multiuser/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/MultiUserCheWsMasterModule.java
Java
epl-1.0
4,154
[ 30522, 1013, 1008, 1008, 9385, 1006, 1039, 1007, 2262, 1011, 2418, 2417, 6045, 1010, 4297, 1012, 1008, 2035, 2916, 9235, 1012, 2023, 2565, 1998, 1996, 10860, 4475, 1008, 2024, 2081, 2800, 2104, 1996, 3408, 1997, 1996, 13232, 2270, 6105, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<h4 style="font-family:'΢ÈíÑźÚ'"><span>ÔõÑùʵÏÖÁ÷³ÌµÄÌø×ª£¬ÀýÈ磺´ÓµÚÒ»²½µ½µÚ¶þ²½»òÊǵÚËIJ½£¿</span></h4> <hr> <h5><span>½â¾ö·½·¨:</span></h5> <p style="font-size:1.1em;line-height:22px;"> Á÷³ÌÉè¼ÆÆ÷ÖУ¬µÚÒ»²½µÄ¡°»ù±¾ÊôÐÔ¡±µÄ¡°ÏÂÒ»²½Ö衱ÉèΪµÚ¶þ²½»òµÚËIJ½¾Í¿ÉÒÔÁË¡£ </p>
Himkwok/TaxEasy
Aptana Jaxer/public/demo/Oa/static/help/skill/workflow/guide/019.html
HTML
apache-2.0
273
[ 30522, 1026, 1044, 2549, 2806, 1027, 1000, 15489, 1011, 2155, 1024, 1005, 1045, 29645, 12377, 2050, 29662, 2226, 1005, 1000, 1028, 1026, 8487, 1028, 1051, 2239, 5657, 29659, 3695, 2050, 29669, 18107, 2072, 29659, 4886, 16415, 26306, 29653, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# syn-bomb Automated SYN flooding tool. # Usage sudo syn-bomb TARGET_IP PORT NETWORK_INTERFACE # Dependencies <ul> <li>hping</li> <li>macchanger</li> <li>ifconfig</li> <li>dhcpcd</li> </ul> # Quotes > "Windows Server 2008, you shall reboot now" <br> ~Anonymous # Preview ![syn-bomb](/pic0.png?raw=true "syn-bomb") # License This is free (as in freedom) Software under GPLv3!
MrFlyingToasterman/syn-bomb
README.md
Markdown
gpl-3.0
388
[ 30522, 1001, 19962, 1011, 5968, 12978, 19962, 9451, 6994, 1012, 1001, 8192, 19219, 2080, 19962, 1011, 5968, 4539, 1035, 12997, 3417, 2897, 1035, 8278, 1001, 12530, 15266, 1026, 17359, 1028, 1026, 5622, 1028, 6522, 2075, 1026, 1013, 5622, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/////////////////////////////////////////////////////////////////////////////// // Name: src/common/textbuf.cpp // Purpose: implementation of wxTextBuffer class // Created: 14.11.01 // Author: Morten Hanssen, Vadim Zeitlin // Copyright: (c) 1998-2001 wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // ============================================================================ // headers // ============================================================================ #include "wx/wxprec.h" #ifndef WX_PRECOMP #include "wx/string.h" #include "wx/intl.h" #include "wx/log.h" #endif #include "wx/textbuf.h" // ============================================================================ // wxTextBuffer class implementation // ============================================================================ // ---------------------------------------------------------------------------- // static methods (always compiled in) // ---------------------------------------------------------------------------- // default type is the native one const wxTextFileType wxTextBuffer::typeDefault = #if defined(__WINDOWS__) wxTextFileType_Dos; #elif defined(__UNIX__) wxTextFileType_Unix; #else wxTextFileType_None; #error "wxTextBuffer: unsupported platform." #endif const wxChar *wxTextBuffer::GetEOL(wxTextFileType type) { switch ( type ) { default: wxFAIL_MSG(wxT("bad buffer type in wxTextBuffer::GetEOL.")); wxFALLTHROUGH; // fall through nevertheless - we must return something... case wxTextFileType_None: return wxEmptyString; case wxTextFileType_Unix: return wxT("\n"); case wxTextFileType_Dos: return wxT("\r\n"); case wxTextFileType_Mac: return wxT("\r"); } } wxString wxTextBuffer::Translate(const wxString& text, wxTextFileType type) { // don't do anything if there is nothing to do if ( type == wxTextFileType_None ) return text; // nor if it is empty if ( text.empty() ) return text; wxString eol = GetEOL(type), result; // optimization: we know that the length of the new string will be about // the same as the length of the old one, so prealloc memory to avoid // unnecessary relocations result.Alloc(text.Len()); wxChar chLast = 0; for ( wxString::const_iterator i = text.begin(); i != text.end(); ++i ) { wxChar ch = *i; switch ( ch ) { case wxT('\n'): // Dos/Unix line termination result += eol; chLast = 0; break; case wxT('\r'): if ( chLast == wxT('\r') ) { // Mac empty line result += eol; } else { // just remember it: we don't know whether it is just "\r" // or "\r\n" yet chLast = wxT('\r'); } break; default: if ( chLast == wxT('\r') ) { // Mac line termination result += eol; // reset chLast to avoid inserting another eol before the // next character chLast = 0; } // add to the current line result += ch; } } if ( chLast ) { // trailing '\r' result += eol; } return result; } #if wxUSE_TEXTBUFFER wxString wxTextBuffer::ms_eof; // ---------------------------------------------------------------------------- // ctors & dtor // ---------------------------------------------------------------------------- wxTextBuffer::wxTextBuffer(const wxString& strBufferName) : m_strBufferName(strBufferName) { m_nCurLine = 0; m_isOpened = false; } wxTextBuffer::~wxTextBuffer() { // required here for Darwin } // ---------------------------------------------------------------------------- // buffer operations // ---------------------------------------------------------------------------- bool wxTextBuffer::Exists() const { return OnExists(); } bool wxTextBuffer::Create(const wxString& strBufferName) { m_strBufferName = strBufferName; return Create(); } bool wxTextBuffer::Create() { // buffer name must be either given in ctor or in Create(const wxString&) wxASSERT( !m_strBufferName.empty() ); // if the buffer already exists do nothing if ( Exists() ) return false; if ( !OnOpen(m_strBufferName, WriteAccess) ) return false; OnClose(); return true; } bool wxTextBuffer::Open(const wxString& strBufferName, const wxMBConv& conv) { m_strBufferName = strBufferName; return Open(conv); } bool wxTextBuffer::Open(const wxMBConv& conv) { // buffer name must be either given in ctor or in Open(const wxString&) wxASSERT( !m_strBufferName.empty() ); // open buffer in read-only mode if ( !OnOpen(m_strBufferName, ReadAccess) ) return false; // read buffer into memory m_isOpened = OnRead(conv); OnClose(); return m_isOpened; } // analyse some lines of the buffer trying to guess it's type. // if it fails, it assumes the native type for our platform. wxTextFileType wxTextBuffer::GuessType() const { wxASSERT( IsOpened() ); // scan the buffer lines size_t nUnix = 0, // number of '\n's alone nDos = 0, // number of '\r\n' nMac = 0; // number of '\r's // we take MAX_LINES_SCAN in the beginning, middle and the end of buffer #define MAX_LINES_SCAN (10) size_t nCount = m_aLines.GetCount() / 3, nScan = nCount > 3*MAX_LINES_SCAN ? MAX_LINES_SCAN : nCount / 3; #define AnalyseLine(n) \ switch ( m_aTypes[n] ) { \ case wxTextFileType_Unix: nUnix++; break; \ case wxTextFileType_Dos: nDos++; break; \ case wxTextFileType_Mac: nMac++; break; \ default: wxFAIL_MSG(wxT("unknown line terminator")); \ } size_t n; for ( n = 0; n < nScan; n++ ) // the beginning AnalyseLine(n); for ( n = (nCount - nScan)/2; n < (nCount + nScan)/2; n++ ) AnalyseLine(n); for ( n = nCount - nScan; n < nCount; n++ ) AnalyseLine(n); #undef AnalyseLine // interpret the results (FIXME far from being even 50% fool proof) if ( nScan > 0 && nDos + nUnix + nMac == 0 ) { // no newlines at all wxLogWarning(_("'%s' is probably a binary buffer."), m_strBufferName.c_str()); } else { #define GREATER_OF(t1, t2) n##t1 == n##t2 ? typeDefault \ : n##t1 > n##t2 \ ? wxTextFileType_##t1 \ : wxTextFileType_##t2 if ( nDos > nUnix ) return GREATER_OF(Dos, Mac); else if ( nDos < nUnix ) return GREATER_OF(Unix, Mac); else { // nDos == nUnix return nMac > nDos ? wxTextFileType_Mac : typeDefault; } #undef GREATER_OF } return typeDefault; } bool wxTextBuffer::Close() { Clear(); m_isOpened = false; return true; } bool wxTextBuffer::Write(wxTextFileType typeNew, const wxMBConv& conv) { return OnWrite(typeNew, conv); } #endif // wxUSE_TEXTBUFFER
ric2b/Vivaldi-browser
update_notifier/thirdparty/wxWidgets/src/common/textbuf.cpp
C++
bsd-3-clause
7,614
[ 30522, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.intel.analytics.bigdl.nn import com.intel.analytics.bigdl.tensor.Tensor import org.scalatest.{Matchers, FlatSpec} import com.intel.analytics.bigdl.numeric.NumericFloat @com.intel.analytics.bigdl.tags.Parallel class DenseToSparseSpec extends FlatSpec with Matchers { "A DenseToSparse forward" should "generate correct output" in { val dts = DenseToSparse() val denseTensor = Tensor.range(1, 12, 1) val output = dts.forward(denseTensor) val exceptedOutput = Tensor.sparse(Array(Array.range(0, 12)), Array.range(1, 13).map(_.toFloat), Array(12)) output should be (exceptedOutput) } "A DenseToSparse backward" should "generate correct output" in { val dts = DenseToSparse() val input = Tensor.range(1, 12, 1) val sparseTensor = Tensor.sparse(Array(Array.range(0, 12)), Array.range(1, 13).map(_.toFloat), Array(12)) val output = dts.backward(input, sparseTensor) val exceptedOutput = Tensor.range(1, 12, 1) output should be (exceptedOutput) } }
jenniew/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/nn/DenseToSparseSpec.scala
Scala
apache-2.0
1,623
[ 30522, 1013, 1008, 1008, 9385, 2355, 1996, 2502, 19422, 6048, 1012, 1008, 1008, 7000, 2104, 1996, 15895, 6105, 1010, 2544, 1016, 1012, 1014, 1006, 1996, 1000, 6105, 1000, 1007, 1025, 1008, 2017, 2089, 2025, 2224, 2023, 5371, 3272, 1999, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * This is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this software. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #define TARGET_BOARD_IDENTIFIER "PYRO" #define USBD_PRODUCT_STRING "PYRODRONEF4" #define LED0_PIN PB4 #define BEEPER PB5 #define BEEPER_INVERTED #define INVERTER_PIN_UART1 PC3 // PC3 used as sBUS inverter select GPIO #define CAMERA_CONTROL_PIN PB9 // define dedicated camera_osd_control pin #define USE_EXTI #define MPU_INT_EXTI PC4 #define USE_MPU_DATA_READY_SIGNAL // DEFINE SPI USAGE #define USE_SPI #define USE_SPI_DEVICE_1 // MPU 6000 #define MPU6000_CS_PIN PA4 #define MPU6000_SPI_INSTANCE SPI1 #define USE_ACC #define USE_ACC_SPI_MPU6000 #define USE_GYRO #define USE_GYRO_SPI_MPU6000 #define GYRO_MPU6000_ALIGN CW0_DEG #define ACC_MPU6000_ALIGN CW0_DEG // DEFINE OSD #define USE_SPI_DEVICE_2 #define SPI2_NSS_PIN PB12 #define SPI2_SCK_PIN PB13 #define SPI2_MISO_PIN PB14 #define SPI2_MOSI_PIN PB15 #define USE_MAX7456 #define MAX7456_SPI_INSTANCE SPI2 #define MAX7456_SPI_CS_PIN PB12 #define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz #define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST) // DEFINE UART AND VCP #define USE_VCP #define USE_UART1 #define UART1_RX_PIN PA10 #define UART1_TX_PIN PA9 #define UART1_AHB1_PERIPHERALS RCC_AHB1Periph_DMA2 #define USE_UART2 #define UART2_RX_PIN PA3 #define UART2_TX_PIN PA2 #define USE_UART3 #define UART3_RX_PIN PB11 #define UART3_TX_PIN PB10 #define USE_UART4 #define UART4_RX_PIN PA1 #define UART4_TX_PIN PA0 #define USE_UART5 #define UART5_RX_PIN PD2 #define UART5_TX_PIN PC12 #define USE_UART6 #define UART6_RX_PIN PC7 #define UART6_TX_PIN PC6 #define SERIAL_PORT_COUNT 7 //VCP, USART1, USART2,USART3,USART4, USART5,USART6 #define USE_ESCSERIAL #define ESCSERIAL_TIMER_TX_PIN PB9 // (HARDARE=0,PPM) //DEFINE BATTERY METER #define USE_ADC #define CURRENT_METER_ADC_PIN PC1 #define VBAT_ADC_PIN PC2 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_NONE #define USE_TRANSPONDER // DEFINE DEFAULT FEATURE #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL #define DEFAULT_FEATURES FEATURE_OSD #define USE_SERIAL_4WAY_BLHELI_INTERFACE #define TARGET_IO_PORTA (0xffff & ~(BIT(14)|BIT(13))) #define TARGET_IO_PORTB (0xffff & ~(BIT(2))) #define TARGET_IO_PORTC (0xffff & ~(BIT(15)|BIT(14)|BIT(13))) #define TARGET_IO_PORTD BIT(2) // DEFINE TIMERS #define USABLE_TIMER_CHANNEL_COUNT 6 #define USED_TIMERS ( TIM_N(1) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(11))
miskol/betaflight
src/main/target/PYRODRONEF4/target.h
C
gpl-3.0
3,380
[ 30522, 1013, 1008, 1008, 2023, 2003, 2489, 4007, 1024, 2017, 2064, 2417, 2923, 3089, 8569, 2618, 2009, 1998, 1013, 2030, 19933, 1008, 2009, 2104, 30524, 2022, 6179, 1010, 1008, 2021, 2302, 2151, 10943, 2100, 1025, 2302, 2130, 1996, 13339, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!-- saved from url=(0014)about:internet --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> <html> <!-- Standard Head Part --> <head> <title>NUnit - MultiAssembly</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta http-equiv="Content-Language" content="en-US"> <meta name="norton-safeweb-site-verification" content="tb6xj01p4hgo5x-8wscsmq633y11-e6nhk-bnb5d987bseanyp6p0uew-pec8j963qlzj32k5x9h3r2q7wh-vmy8bbhek5lnpp5w4p8hocouuq39e09jrkihdtaeknua" /> <link rel="stylesheet" type="text/css" href="nunit.css"> <link rel="shortcut icon" href="favicon.ico"> </head> <!-- End Standard Head Part --> <body> <!-- Standard Header for NUnit.org --> <div id="header"> <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a> <div id="nav"> <a href="http://www.nunit.org">NUnit</a> <a class="active" href="index.html">Documentation</a> </div> </div> <!-- End of Header --> <div id="content"> <h2>Multiple-Assembly Support</h2> <p>Since version 2.1, NUnit has allowed loading suites of tests from multiple assemblies in both the console and GUI runners. This may be done on an adhoc basis or by creating NUnit test projects saved as files of type '.nunit'. In either case, a top-level suite is constructed, which contains the root suite for each assembly. Tests are run and reported just as for a single assembly.</p> <h3>Adhoc Usage</h3> <p>Using the console runner, multiple assemblies may be run simply by specifying their names on the command line. See <a href="consoleCommandLine.html">NUnit-Console Command Line Options</a> for an example of this usage.</p> <p>The gui runner does not support specifying multiple assemblies on the command-line. However, you can load a single assembly and then use the Project menu to add additional assemblies. Additionally, you can drag multiple assemblies to the tree view pane, in which case they will replace any assemblies already loaded.</p> <h3>NUnit Test Projects</h3> <p>Running tests from multiple assemblies is facilitated by the use of NUnit test projects. These are files with the extension .nunit containing information about the assemblies to be loaded. The following is an example of a hypothetical test project file:</p> <div class="code"> <pre>&lt;NUnitProject&gt; &lt;Settings activeconfig="Debug"/&gt; &lt;Config name="Debug"&gt; &lt;assembly path="LibraryCore\bin\Debug\Library.dll"/&gt; &lt;assembly path="LibraryUI\bin\Debug\LibraryUI.dll"/&gt; &lt;/Config&gt; &lt;Config name="Release"&gt; &lt;assembly path="LibraryCore\bin\Release\Library.dll"/&gt; &lt;assembly path="LibraryUI\bin\Release\LibraryUI.dll"/&gt; &lt;/Config&gt; &lt;/NUnitProject&gt;</pre> </div> <p>This project contains two configurations, each of which contains two assemblies. The Debug configuration is currently active. By default, the assemblies will be loaded using the directory containing this file as the ApplicationBase. The PrivateBinPath will be set automatically to <code>LibraryCore\bin\Debug;LibraryUI\bin\Debug</code> or to the corresonding release path. XML attributes are used to specify non-default values for the ApplicationBase, Configuration File and PrivateBinPath. The <a href="projectEditor.html">Project Editor</a> may be used to create or modify NUnit projects.</p> <p>Even when you are running a single test assembly, NUnit creates an internal project to contain that assembly. If you are using the gui, you can save this project, edit it, add additional assemblies, etc. Note that the gui does not display the internal project unless you add assemblies or modify it in some other way. <p>If you use <a href="vsSupport.html">Visual Studio Support</a> to load Visual Studio .Net project or solution files, NUnit converts them to Test projects internally. As with other internal projects, these test projects are not saved automatically but may be saved by use of the File menu.</p> <h3>Loading and Running</h3> <p>In the past, test writers have been able to rely on the current directory being set to the directory containing the single loaded assembly. For the purpose of compatibility, NUnit continues to set the current directory to the directory containing each assembly whenever any test from that assembly is run.</p> <p>Additionally, because some assemblies may rely on unmanaged dlls in the same directory, the current directory is also set to that of the assembly at the time the assembly is loaded. However, in cases where multiple assemblies reference the same unmanaged assembly, this may not be sufficient and the user may need to place the directory containing the unmanaged dll on the path.</p> </div> <!-- Submenu --> <div id="subnav"> <ul> <li><a href="index.html">NUnit 2.6</a></li> <ul> <li><a href="getStarted.html">Getting&nbsp;Started</a></li> <li><a href="writingTests.html">Writing&nbsp;Tests</a></li> <li><a href="runningTests.html">Running&nbsp;Tests</a></li> <ul> <li><a href="nunit-console.html">Console&nbsp;Runner</a></li> <li><a href="nunit-gui.html">Gui&nbsp;Runner</a></li> <li><a href="pnunit.html">PNUnit&nbsp;Runner</a></li> <li><a href="nunit-agent.html">NUnit&nbsp;Agent</a></li> <li><a href="projectEditor.html">Project&nbsp;Editor</a></li> <li><a href="runtimeSelection.html">Runtime&nbsp;Selection</a></li> <li><a href="assemblyIsolation.html">Assembly&nbsp;Isolation</a></li> <li><a href="configFiles.html">Configuration&nbsp;Files</a></li> <li id="current"><a href="multiAssembly.html">Multiple&nbsp;Assemblies</a></li> <li><a href="vsSupport.html">Visual&nbsp;Studio&nbsp;Support</a></li> </ul> <li><a href="extensibility.html">Extensibility</a></li> <li><a href="releaseNotes.html">Release&nbsp;Notes</a></li> <li><a href="samples.html">Samples</a></li> <li><a href="license.html">License</a></li> </ul> <li><a href="vsTestAdapter.html">NUnit&nbsp;Test&nbsp;Adapter&nbsp;0.90</a></li> <ul> <li><a href="vsTestAdapterLicense.html">License</a></li> </ul> <li><a href="&r=2.6.html"></a></li> <li><a href="&r=2.6.html"></a></li> </ul> </div> <!-- End of Submenu --> <!-- Standard Footer for NUnit.org --> <div id="footer"> Copyright &copy; 2012 Charlie Poole. All Rights Reserved. </div> <!-- End of Footer --> </body> </html>
dodecaphonic/fixturizer
vendor/nunit-2.6/doc/multiAssembly.html
HTML
mit
6,413
[ 30522, 1026, 999, 1011, 1011, 5552, 2013, 24471, 2140, 1027, 1006, 25604, 2549, 1007, 2055, 1024, 4274, 30524, 2509, 2278, 1013, 1013, 26718, 2094, 16129, 1018, 1012, 1014, 1013, 1013, 4372, 1000, 1028, 1026, 16129, 1028, 1026, 999, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// Copyright 2011-2016 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.security.zynamics.binnavi.config; import com.google.security.zynamics.common.config.AbstractConfigItem; import com.google.security.zynamics.common.config.TypedPropertiesWrapper; import java.awt.Color; public class DebugColorsConfigItem extends AbstractConfigItem { private static final String BREAKPOINT_ACTIVE_COLOR = "BreakpointActive"; private static final Color BREAKPOINT_ACTIVE_COLOR_DEFAULT = new Color(-16740608); private Color breakpointActive = BREAKPOINT_ACTIVE_COLOR_DEFAULT; private static final String BREAKPOINT_INACTIVE_COLOR = "BreakpointInactive"; private static final Color BREAKPOINT_INACTIVE_COLOR_DEFAULT = new Color(-16763956); private Color breakpointInactive = BREAKPOINT_INACTIVE_COLOR_DEFAULT; private static final String BREAKPOINT_DISABLED_COLOR = "BreakpointDisabled"; private static final Color BREAKPOINT_DISABLED_COLOR_DEFAULT = new Color(-5592663); private Color breakpointDisabled = BREAKPOINT_DISABLED_COLOR_DEFAULT; private static final String BREAKPOINT_HIT_COLOR = "BreakpointHit"; private static final Color BREAKPOINT_HIT_COLOR_DEFAULT = new Color(-5046272); private Color breakpointHit = BREAKPOINT_HIT_COLOR_DEFAULT; private static final String BREAKPOINT_ENABLED_COLOR = "BreakpointEnabled"; private static final Color BREAKPOINT_ENABLED_COLOR_DEFAULT = new Color(-16740608); private Color breakpointEnabled = BREAKPOINT_ENABLED_COLOR_DEFAULT; private static final String BREAKPOINT_INVALID_COLOR = "BreakpointInvalid"; private static final Color BREAKPOINT_INVALID_COLOR_DEFAULT = new Color(-16777216); private Color breakpointInvalid = BREAKPOINT_INVALID_COLOR_DEFAULT; private static final String BREAKPOINT_DELETING_COLOR = "BreakpointDeleting"; private static final Color BREAKPOINT_DELETING_COLOR_DEFAULT = new Color(-3328); private Color breakpointDeleting = BREAKPOINT_DELETING_COLOR_DEFAULT; private static final String ACTIVE_LINE_COLOR = "ActiveLine"; private static final Color ACTIVE_LINE_COLOR_DEFAULT = new Color(-65536); private Color activeLine = ACTIVE_LINE_COLOR_DEFAULT; @Override public void load(final TypedPropertiesWrapper properties) { breakpointActive = properties.getColor(BREAKPOINT_ACTIVE_COLOR, BREAKPOINT_ACTIVE_COLOR_DEFAULT); breakpointInactive = properties.getColor(BREAKPOINT_INACTIVE_COLOR, BREAKPOINT_INACTIVE_COLOR_DEFAULT); breakpointDisabled = properties.getColor(BREAKPOINT_DISABLED_COLOR, BREAKPOINT_DISABLED_COLOR_DEFAULT); breakpointHit = properties.getColor(BREAKPOINT_HIT_COLOR, BREAKPOINT_HIT_COLOR_DEFAULT); breakpointEnabled = properties.getColor(BREAKPOINT_ENABLED_COLOR, BREAKPOINT_ENABLED_COLOR_DEFAULT); breakpointInvalid = properties.getColor(BREAKPOINT_INVALID_COLOR, BREAKPOINT_INVALID_COLOR_DEFAULT); breakpointDeleting = properties.getColor(BREAKPOINT_DELETING_COLOR, BREAKPOINT_DELETING_COLOR_DEFAULT); activeLine = properties.getColor(ACTIVE_LINE_COLOR, ACTIVE_LINE_COLOR_DEFAULT); } @Override public void store(final TypedPropertiesWrapper properties) { properties.setColor(BREAKPOINT_ACTIVE_COLOR, breakpointActive); properties.setColor(BREAKPOINT_INACTIVE_COLOR, breakpointInactive); properties.setColor(BREAKPOINT_DISABLED_COLOR, breakpointDisabled); properties.setColor(BREAKPOINT_HIT_COLOR, breakpointHit); properties.setColor(BREAKPOINT_ENABLED_COLOR, breakpointEnabled); properties.setColor(BREAKPOINT_INVALID_COLOR, breakpointInvalid); properties.setColor(BREAKPOINT_DELETING_COLOR, breakpointDeleting); properties.setColor(ACTIVE_LINE_COLOR, activeLine); } public Color getBreakpointActive() { return breakpointActive; } public void setBreakpointActive(final Color value) { this.breakpointActive = value; } public Color getBreakpointInactive() { return breakpointInactive; } public void setBreakpointInactive(final Color value) { this.breakpointInactive = value; } public Color getBreakpointDisabled() { return breakpointDisabled; } public void setBreakpointDisabled(final Color value) { this.breakpointDisabled = value; } public Color getBreakpointHit() { return breakpointHit; } public void setBreakpointHit(final Color value) { this.breakpointHit = value; } public Color getBreakpointEnabled() { return breakpointEnabled; } public void setBreakpointEnabled(final Color value) { this.breakpointEnabled = value; } public Color getBreakpointInvalid() { return breakpointInvalid; } public void setBreakpointInvalid(final Color value) { this.breakpointInvalid = value; } public Color getBreakpointDeleting() { return breakpointDeleting; } public void setBreakpointDeleting(final Color value) { this.breakpointDeleting = value; } public Color getActiveLine() { return activeLine; } public void setActiveLine(final Color value) { this.activeLine = value; } }
google/binnavi
src/main/java/com/google/security/zynamics/binnavi/config/DebugColorsConfigItem.java
Java
apache-2.0
5,605
[ 30522, 1013, 1013, 9385, 2249, 1011, 2355, 8224, 11775, 1013, 1013, 1013, 1013, 7000, 2104, 1996, 15895, 6105, 1010, 2544, 1016, 1012, 1014, 1006, 1996, 1000, 6105, 1000, 1007, 1025, 1013, 1013, 2017, 2089, 2025, 2224, 2023, 5371, 3272, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#include<stdio.h> #define MOD 1000000007 int main(){ int t; long long int n1, n2, n3, i, j, k, count=0; scanf("%d", &t); while(t--){ scanf("%lld%lld%lld", &n1, &n2, &n3); for(i=1;i<=n1;i++){ for(j=1;j<=n2;j++){ if(j==i){ continue; } for(k=1;k<=n3;k++){ if(k==j||k==i){ continue; } count++; } } } printf("%lld\n", count%MOD); count=0; } }
stalin18/C-and-CPlusPlus-Programs
CodeChef/THREEDIF.c
C
mit
646
[ 30522, 1001, 2421, 1026, 2358, 20617, 1012, 1044, 1028, 1001, 9375, 16913, 6694, 8889, 8889, 2692, 2581, 20014, 2364, 1006, 1007, 1063, 20014, 1056, 1025, 2146, 2146, 20014, 1050, 2487, 1010, 1050, 2475, 1010, 1050, 2509, 1010, 1045, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php /* * Copyright (C) 2020 Frank Wall * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ namespace OPNsense\AcmeClient\LeValidation; use OPNsense\AcmeClient\LeValidationInterface; use OPNsense\Core\Config; /** * Kinghost DNS API * @package OPNsense\AcmeClient */ class DnsKinghost extends Base implements LeValidationInterface { public function prepare() { $this->acme_env['KINGHOST_username'] = (string)$this->config->dns_kinghost_username; $this->acme_env['KINGHOST_Password'] = (string)$this->config->dns_kinghost_password; } }
fraenki/plugins
security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeValidation/DnsKinghost.php
PHP
bsd-2-clause
1,786
[ 30522, 1026, 1029, 25718, 1013, 1008, 1008, 9385, 1006, 1039, 1007, 12609, 3581, 2813, 1008, 2035, 2916, 9235, 1012, 1008, 1008, 25707, 1998, 2224, 1999, 3120, 1998, 12441, 3596, 1010, 2007, 2030, 2302, 1008, 14080, 1010, 2024, 7936, 3024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...