content_type
stringclasses
8 values
main_lang
stringclasses
7 values
message
stringlengths
1
50
sha
stringlengths
40
40
patch
stringlengths
52
962k
file_count
int64
1
300
Javascript
Javascript
increase priority of pureexpressiondependency
38304f95ccafaae41dc80a51c9c3192af872a016
<ide><path>lib/DependenciesBlock.js <ide> class DependenciesBlock { <ide> /** <ide> * @param {Dependency} dependency dependency being tied to block. <ide> * This is an "edge" pointing to another "node" on module graph. <add> * @param {number=} i index to insert <ide> * @returns {void} <ide> */ <del> addDependency(dependency) { <add> addDependency(dependency, i = this.dependencies.length) { <ide> this.dependencies.push(dependency); <add> <add> if (i < this.dependencies.length - 1) { <add> let tmp1 = this.dependencies[i]; <add> this.dependencies[i] = dependency; <add> let j = i; <add> <add> while (++j < this.dependencies.length) { <add> let tmp2 = this.dependencies[j]; <add> this.dependencies[j] = tmp1; <add> tmp1 = tmp2; <add> } <add> } <ide> } <ide> <ide> /** <ide><path>lib/optimize/InnerGraphPlugin.js <ide> class InnerGraphPlugin { <ide> default: { <ide> const decl = statement.declaration; <ide> const dep = new PureExpressionDependency(decl.range); <del> dep.loc = decl.loc; <add> dep.loc = statement.loc; <ide> dep.usedByExports = usedByExports; <del> parser.state.module.addDependency(dep); <add> parser.state.module.addDependency(dep, 0); <ide> break; <ide> } <ide> }
2
Python
Python
relax routes cli match order
ab6a8b0330845c80d661a748314691302ea7d8f7
<ide><path>tests/test_cli.py <ide> def create_app(): <ide> <ide> class TestRoutes: <ide> @pytest.fixture <del> def invoke(self, runner): <del> def create_app(): <del> app = Flask(__name__) <del> app.testing = True <add> def app(self): <add> app = Flask(__name__) <add> app.testing = True <ide> <del> @app.route("/get_post/<int:x>/<int:y>", methods=["GET", "POST"]) <del> def yyy_get_post(x, y): <del> pass <add> @app.route("/get_post/<int:x>/<int:y>", methods=["GET", "POST"]) <add> def yyy_get_post(x, y): <add> pass <ide> <del> @app.route("/zzz_post", methods=["POST"]) <del> def aaa_post(): <del> pass <add> @app.route("/zzz_post", methods=["POST"]) <add> def aaa_post(): <add> pass <ide> <del> return app <add> return app <ide> <del> cli = FlaskGroup(create_app=create_app) <add> @pytest.fixture <add> def invoke(self, app, runner): <add> cli = FlaskGroup(create_app=lambda: app) <ide> return partial(runner.invoke, cli) <ide> <ide> @pytest.fixture <ide> def test_simple(self, invoke): <ide> assert result.exit_code == 0 <ide> self.expect_order(["aaa_post", "static", "yyy_get_post"], result.output) <ide> <del> def test_sort(self, invoke): <add> def test_sort(self, app, invoke): <ide> default_output = invoke(["routes"]).output <ide> endpoint_output = invoke(["routes", "-s", "endpoint"]).output <ide> assert default_output == endpoint_output <ide> def test_sort(self, invoke): <ide> ["yyy_get_post", "static", "aaa_post"], <ide> invoke(["routes", "-s", "rule"]).output, <ide> ) <del> self.expect_order( <del> ["aaa_post", "yyy_get_post", "static"], <del> invoke(["routes", "-s", "match"]).output, <del> ) <add> match_order = [r.endpoint for r in app.url_map.iter_rules()] <add> self.expect_order(match_order, invoke(["routes", "-s", "match"]).output) <ide> <ide> def test_all_methods(self, invoke): <ide> output = invoke(["routes"]).output
1
Python
Python
add support for aliases for fortran compilers
3bbfa8af671843476dacf27f5f42006d9fd462fa
<ide><path>numpy/distutils/fcompiler/__init__.py <ide> class FCompiler(CCompiler): <ide> } <ide> language_order = ['f90','f77'] <ide> <add> <add> # These will be set by the subclass <add> <add> compiler_type = None <add> compiler_aliases = () <ide> version_pattern = None <ide> <ide> possible_executables = [] <ide> class FCompiler(CCompiler): <ide> 'ranlib' : None, <ide> } <ide> <add> # If compiler does not support compiling Fortran 90 then it can <add> # suggest using another compiler. For example, gnu would suggest <add> # gnu95 compiler type when there are F90 sources. <add> suggested_f90_compiler = None <add> <ide> compile_switch = "-c" <ide> object_switch = "-o " # Ending space matters! It will be stripped <ide> # but if it is missing then object_switch <ide> class FCompiler(CCompiler): <ide> shared_lib_format = "%s%s" <ide> exe_extension = "" <ide> <del> # If compiler does not support compiling Fortran 90 then it can <del> # suggest using another compiler. For example, gnu would suggest <del> # gnu95 compiler type when there are F90 sources. <del> suggested_f90_compiler = None <del> <ide> _exe_cache = {} <ide> <ide> _executable_keys = ['version_cmd', 'compiler_f77', 'compiler_f90', <ide> def _environment_hook(self, name, hook_name): <ide> ) <ide> <ide> fcompiler_class = None <add>fcompiler_aliases = None <ide> <ide> def load_all_fcompiler_classes(): <ide> """Cache all the FCompiler classes found in modules in the <ide> numpy.distutils.fcompiler package. <ide> """ <ide> from glob import glob <del> global fcompiler_class <add> global fcompiler_class, fcompiler_aliases <ide> if fcompiler_class is not None: <ide> return <ide> pys = os.path.join(os.path.dirname(__file__), '*.py') <ide> fcompiler_class = {} <add> fcompiler_aliases = {} <ide> for fname in glob(pys): <ide> module_name, ext = os.path.splitext(os.path.basename(fname)) <ide> module_name = 'numpy.distutils.fcompiler.' + module_name <ide> def load_all_fcompiler_classes(): <ide> if hasattr(module, 'compilers'): <ide> for cname in module.compilers: <ide> klass = getattr(module, cname) <del> fcompiler_class[klass.compiler_type] = (klass.compiler_type, <del> klass, <del> klass.description) <add> desc = (klass.compiler_type, klass, klass.description) <add> fcompiler_class[klass.compiler_type] = desc <add> for alias in klass.compiler_aliases: <add> fcompiler_aliases[alias] = desc <ide> <ide> def _find_existing_fcompiler(compiler_types, <ide> osname=None, platform=None, <ide> def new_fcompiler(plat=None, <ide> plat = os.name <ide> if compiler is None: <ide> compiler = get_default_fcompiler(plat, requiref90=requiref90) <del> try: <add> if compiler in fcompiler_class: <ide> module_name, klass, long_description = fcompiler_class[compiler] <del> except KeyError: <add> elif compiler in fcompiler_aliases: <add> module_name, klass, long_description = fcompiler_aliases[compiler] <add> else: <ide> msg = "don't know how to compile Fortran code on platform '%s'" % plat <ide> if compiler is not None: <ide> msg = msg + " with '%s' compiler." % compiler <ide><path>numpy/distutils/fcompiler/gnu.py <ide> <ide> class GnuFCompiler(FCompiler): <ide> compiler_type = 'gnu' <add> compiler_aliases = ('g77',) <ide> description = 'GNU Fortran 77 compiler' <ide> <ide> def gnu_version_match(self, version_string): <ide> def get_flags_arch(self): <ide> <ide> class Gnu95FCompiler(GnuFCompiler): <ide> compiler_type = 'gnu95' <add> compiler_aliases = ('gfortran',) <ide> description = 'GNU Fortran 95 compiler' <ide> <ide> def version_match(self, version_string): <ide><path>numpy/distutils/fcompiler/intel.py <ide> def update_executables(self): <ide> class IntelFCompiler(BaseIntelFCompiler): <ide> <ide> compiler_type = 'intel' <add> compiler_aliases = ('ifort',) <ide> description = 'Intel Fortran Compiler for 32-bit apps' <ide> version_match = intel_version_match('32-bit|IA-32') <ide> <ide> def get_flags_linker_so(self): <ide> <ide> class IntelItaniumFCompiler(IntelFCompiler): <ide> compiler_type = 'intele' <add> compiler_aliases = () <ide> description = 'Intel Fortran Compiler for Itanium apps' <ide> <ide> version_match = intel_version_match('Itanium') <ide> class IntelItaniumFCompiler(IntelFCompiler): <ide> <ide> class IntelEM64TFCompiler(IntelFCompiler): <ide> compiler_type = 'intelem' <add> compiler_aliases = () <ide> description = 'Intel Fortran Compiler for EM64T-based apps' <ide> <ide> version_match = intel_version_match('EM64T-based')
3
PHP
PHP
add missing fixtures namespace.
ae9d41b5258ec8b6bf901b2914b16be4d5c0caff
<ide><path>tests/Support/DateFacadeTest.php <ide> <ide> use Carbon\CarbonImmutable; <ide> use Carbon\Factory; <del>use CustomDateClass; <ide> use DateTime; <ide> use Illuminate\Support\Carbon; <ide> use Illuminate\Support\DateFactory; <ide> use Illuminate\Support\Facades\Date; <add>use Illuminate\Tests\Support\Fixtures\CustomDateClass; <ide> use InvalidArgumentException; <ide> use PHPUnit\Framework\TestCase; <ide> <ide> public function testCarbonImmutable() <ide> $this->assertSame('fr', Date::now()->locale); <ide> DateFactory::use(Carbon::class); <ide> $this->assertSame('en', Date::now()->locale); <del> include_once __DIR__.'/fixtures/CustomDateClass.php'; <add> include_once __DIR__.'/Fixtures/CustomDateClass.php'; <ide> DateFactory::use(CustomDateClass::class); <ide> $this->assertInstanceOf(CustomDateClass::class, Date::now()); <ide> $this->assertInstanceOf(Carbon::class, Date::now()->getOriginal()); <add><path>tests/Support/Fixtures/CustomDateClass.php <del><path>tests/Support/fixtures/CustomDateClass.php <ide> <?php <ide> <add>namespace Illuminate\Tests\Support\Fixtures; <add> <ide> class CustomDateClass <ide> { <ide> protected $original;
2
PHP
PHP
apply fixes from styleci
d1a4f3fc7951c04ff91855511ed8c73b1a98e533
<ide><path>src/Illuminate/Auth/SessionGuard.php <ide> use RuntimeException; <ide> use Illuminate\Support\Str; <ide> use Illuminate\Http\Response; <del>use Illuminate\Contracts\Events\Dispatcher; <ide> use Illuminate\Contracts\Auth\UserProvider; <add>use Illuminate\Contracts\Events\Dispatcher; <ide> use Illuminate\Contracts\Auth\StatefulGuard; <ide> use Symfony\Component\HttpFoundation\Request; <ide> use Illuminate\Contracts\Auth\SupportsBasicAuth; <ide><path>src/Illuminate/Broadcasting/BroadcastManager.php <ide> use Illuminate\Support\Arr; <ide> use InvalidArgumentException; <ide> use Illuminate\Broadcasting\Broadcasters\LogBroadcaster; <del>use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow; <ide> use Illuminate\Broadcasting\Broadcasters\NullBroadcaster; <add>use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow; <ide> use Illuminate\Broadcasting\Broadcasters\RedisBroadcaster; <ide> use Illuminate\Broadcasting\Broadcasters\PusherBroadcaster; <ide> use Illuminate\Contracts\Broadcasting\Factory as FactoryContract; <ide><path>src/Illuminate/Cache/FileStore.php <ide> use Exception; <ide> use Carbon\Carbon; <ide> use Illuminate\Support\Arr; <del>use Illuminate\Filesystem\Filesystem; <ide> use Illuminate\Contracts\Cache\Store; <add>use Illuminate\Filesystem\Filesystem; <ide> <ide> class FileStore implements Store <ide> { <ide><path>src/Illuminate/Cache/MemcachedStore.php <ide> <ide> use Memcached; <ide> use Carbon\Carbon; <del>use Illuminate\Contracts\Cache\Store; <ide> use ReflectionMethod; <add>use Illuminate\Contracts\Cache\Store; <ide> <ide> class MemcachedStore extends TaggableStore implements Store <ide> { <ide><path>src/Illuminate/Database/Connection.php <ide> use Illuminate\Support\Arr; <ide> use Illuminate\Database\Query\Expression; <ide> use Illuminate\Contracts\Events\Dispatcher; <del>use Illuminate\Database\Query\Processors\Processor; <ide> use Doctrine\DBAL\Connection as DoctrineConnection; <add>use Illuminate\Database\Query\Processors\Processor; <ide> use Illuminate\Database\Query\Builder as QueryBuilder; <ide> use Illuminate\Database\Schema\Builder as SchemaBuilder; <ide> use Illuminate\Database\Query\Grammars\Grammar as QueryGrammar; <ide><path>src/Illuminate/Database/DatabaseServiceProvider.php <ide> use Faker\Generator as FakerGenerator; <ide> use Illuminate\Database\Eloquent\Model; <ide> use Illuminate\Support\ServiceProvider; <del>use Illuminate\Database\Eloquent\QueueEntityResolver; <ide> use Illuminate\Database\Connectors\ConnectionFactory; <add>use Illuminate\Database\Eloquent\QueueEntityResolver; <ide> use Illuminate\Database\Eloquent\Factory as EloquentFactory; <ide> <ide> class DatabaseServiceProvider extends ServiceProvider <ide><path>src/Illuminate/Database/Eloquent/Model.php <ide> use Illuminate\Database\Eloquent\Relations\HasOne; <ide> use Illuminate\Database\Eloquent\Relations\HasMany; <ide> use Illuminate\Database\Eloquent\Relations\MorphTo; <del>use Illuminate\Database\Eloquent\Relations\Relation; <ide> use Illuminate\Database\Eloquent\Relations\MorphOne; <add>use Illuminate\Database\Eloquent\Relations\Relation; <ide> use Illuminate\Support\Collection as BaseCollection; <del>use Illuminate\Database\Eloquent\Relations\MorphMany; <ide> use Illuminate\Database\Eloquent\Relations\BelongsTo; <add>use Illuminate\Database\Eloquent\Relations\MorphMany; <ide> use Illuminate\Database\Query\Builder as QueryBuilder; <ide> use Illuminate\Database\Eloquent\Relations\MorphToMany; <ide> use Illuminate\Database\Eloquent\Relations\BelongsToMany; <ide><path>src/Illuminate/Filesystem/FilesystemAdapter.php <ide> use League\Flysystem\AwsS3v3\AwsS3Adapter; <ide> use League\Flysystem\FileNotFoundException; <ide> use League\Flysystem\Adapter\Local as LocalAdapter; <del>use Illuminate\Contracts\Filesystem\Filesystem as FilesystemContract; <ide> use Illuminate\Contracts\Filesystem\Cloud as CloudFilesystemContract; <add>use Illuminate\Contracts\Filesystem\Filesystem as FilesystemContract; <ide> use Illuminate\Contracts\Filesystem\FileNotFoundException as ContractFileNotFoundException; <ide> <ide> class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract <ide><path>src/Illuminate/Foundation/Bootstrap/RegisterFacades.php <ide> <ide> namespace Illuminate\Foundation\Bootstrap; <ide> <del>use Illuminate\Support\Facades\Facade; <ide> use Illuminate\Foundation\AliasLoader; <add>use Illuminate\Support\Facades\Facade; <ide> use Illuminate\Contracts\Foundation\Application; <ide> <ide> class RegisterFacades <ide><path>src/Illuminate/Foundation/Console/Kernel.php <ide> use Closure; <ide> use Exception; <ide> use Throwable; <del>use Illuminate\Contracts\Events\Dispatcher; <ide> use Illuminate\Console\Scheduling\Schedule; <add>use Illuminate\Contracts\Events\Dispatcher; <ide> use Illuminate\Console\Application as Artisan; <ide> use Illuminate\Contracts\Foundation\Application; <ide> use Illuminate\Contracts\Console\Kernel as KernelContract; <ide><path>src/Illuminate/Foundation/Http/FormRequest.php <ide> use Illuminate\Http\JsonResponse; <ide> use Illuminate\Routing\Redirector; <ide> use Illuminate\Container\Container; <del>use Illuminate\Validation\ValidationException; <ide> use Illuminate\Contracts\Validation\Validator; <add>use Illuminate\Validation\ValidationException; <ide> use Illuminate\Http\Exception\HttpResponseException; <ide> use Illuminate\Validation\ValidatesWhenResolvedTrait; <ide> use Illuminate\Contracts\Validation\ValidatesWhenResolved; <ide><path>src/Illuminate/Foundation/Http/Kernel.php <ide> use Illuminate\Routing\Router; <ide> use Illuminate\Routing\Pipeline; <ide> use Illuminate\Support\Facades\Facade; <del>use Illuminate\Contracts\Foundation\Application; <ide> use Illuminate\Contracts\Debug\ExceptionHandler; <add>use Illuminate\Contracts\Foundation\Application; <ide> use Illuminate\Contracts\Http\Kernel as KernelContract; <ide> use Symfony\Component\Debug\Exception\FatalThrowableError; <ide> <ide><path>src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php <ide> use Illuminate\Foundation\Console\UpCommand; <ide> use Illuminate\Foundation\Console\DownCommand; <ide> use Illuminate\Auth\Console\ClearResetsCommand; <del>use Illuminate\Foundation\Console\ServeCommand; <ide> use Illuminate\Cache\Console\CacheTableCommand; <del>use Illuminate\Queue\Console\FailedTableCommand; <add>use Illuminate\Foundation\Console\ServeCommand; <ide> use Illuminate\Foundation\Console\TinkerCommand; <del>use Illuminate\Foundation\Console\JobMakeCommand; <add>use Illuminate\Queue\Console\FailedTableCommand; <ide> use Illuminate\Foundation\Console\AppNameCommand; <add>use Illuminate\Foundation\Console\JobMakeCommand; <add>use Illuminate\Foundation\Console\MailMakeCommand; <ide> use Illuminate\Foundation\Console\OptimizeCommand; <ide> use Illuminate\Foundation\Console\TestMakeCommand; <del>use Illuminate\Foundation\Console\MailMakeCommand; <del>use Illuminate\Foundation\Console\RouteListCommand; <ide> use Illuminate\Foundation\Console\EventMakeCommand; <ide> use Illuminate\Foundation\Console\ModelMakeCommand; <add>use Illuminate\Foundation\Console\RouteListCommand; <ide> use Illuminate\Foundation\Console\ViewClearCommand; <ide> use Illuminate\Session\Console\SessionTableCommand; <ide> use Illuminate\Foundation\Console\PolicyMakeCommand; <ide> use Illuminate\Foundation\Console\RouteCacheCommand; <ide> use Illuminate\Foundation\Console\RouteClearCommand; <del>use Illuminate\Foundation\Console\StorageLinkCommand; <del>use Illuminate\Routing\Console\ControllerMakeCommand; <del>use Illuminate\Routing\Console\MiddlewareMakeCommand; <ide> use Illuminate\Foundation\Console\ConfigCacheCommand; <ide> use Illuminate\Foundation\Console\ConfigClearCommand; <ide> use Illuminate\Foundation\Console\ConsoleMakeCommand; <ide> use Illuminate\Foundation\Console\EnvironmentCommand; <ide> use Illuminate\Foundation\Console\KeyGenerateCommand; <ide> use Illuminate\Foundation\Console\RequestMakeCommand; <add>use Illuminate\Foundation\Console\StorageLinkCommand; <add>use Illuminate\Routing\Console\ControllerMakeCommand; <add>use Illuminate\Routing\Console\MiddlewareMakeCommand; <ide> use Illuminate\Foundation\Console\ListenerMakeCommand; <ide> use Illuminate\Foundation\Console\ProviderMakeCommand; <ide> use Illuminate\Foundation\Console\ClearCompiledCommand; <ide><path>src/Illuminate/Foundation/Testing/Concerns/InteractsWithPages.php <ide> use Symfony\Component\DomCrawler\Form; <ide> use Symfony\Component\DomCrawler\Crawler; <ide> use Illuminate\Foundation\Testing\HttpException; <del>use Illuminate\Foundation\Testing\Constraints\HasText; <ide> use Illuminate\Foundation\Testing\Constraints\HasLink; <add>use Illuminate\Foundation\Testing\Constraints\HasText; <ide> use Illuminate\Foundation\Testing\Constraints\HasValue; <ide> use Illuminate\Foundation\Testing\Constraints\HasSource; <ide> use Illuminate\Foundation\Testing\Constraints\IsChecked; <ide><path>src/Illuminate/Log/Writer.php <ide> use Closure; <ide> use RuntimeException; <ide> use InvalidArgumentException; <del>use Monolog\Handler\SyslogHandler; <ide> use Monolog\Handler\StreamHandler; <del>use Monolog\Logger as MonologLogger; <add>use Monolog\Handler\SyslogHandler; <ide> use Monolog\Formatter\LineFormatter; <ide> use Monolog\Handler\ErrorLogHandler; <add>use Monolog\Logger as MonologLogger; <ide> use Monolog\Handler\RotatingFileHandler; <ide> use Illuminate\Contracts\Support\Jsonable; <ide> use Illuminate\Contracts\Events\Dispatcher; <ide><path>src/Illuminate/Mail/TransportManager.php <ide> use Illuminate\Support\Arr; <ide> use Illuminate\Support\Manager; <ide> use GuzzleHttp\Client as HttpClient; <del>use Swift_SmtpTransport as SmtpTransport; <ide> use Swift_MailTransport as MailTransport; <add>use Swift_SmtpTransport as SmtpTransport; <ide> use Illuminate\Mail\Transport\LogTransport; <ide> use Illuminate\Mail\Transport\SesTransport; <ide> use Illuminate\Mail\Transport\MailgunTransport; <ide><path>src/Illuminate/Pagination/Paginator.php <ide> use ArrayAccess; <ide> use JsonSerializable; <ide> use IteratorAggregate; <del>use Illuminate\Support\HtmlString; <ide> use Illuminate\Support\Collection; <add>use Illuminate\Support\HtmlString; <ide> use Illuminate\Contracts\Support\Jsonable; <ide> use Illuminate\Contracts\Support\Arrayable; <ide> use Illuminate\Contracts\Pagination\Paginator as PaginatorContract; <ide><path>src/Illuminate/Queue/Console/WorkCommand.php <ide> use Carbon\Carbon; <ide> use Illuminate\Queue\Worker; <ide> use Illuminate\Console\Command; <del>use Illuminate\Queue\WorkerOptions; <ide> use Illuminate\Contracts\Queue\Job; <add>use Illuminate\Queue\WorkerOptions; <ide> use Illuminate\Queue\Events\JobFailed; <ide> use Illuminate\Queue\Events\JobProcessed; <ide> <ide><path>src/Illuminate/Queue/Jobs/DatabaseJob.php <ide> <ide> namespace Illuminate\Queue\Jobs; <ide> <del>use Illuminate\Queue\DatabaseQueue; <ide> use Illuminate\Container\Container; <add>use Illuminate\Queue\DatabaseQueue; <ide> use Illuminate\Contracts\Queue\Job as JobContract; <ide> <ide> class DatabaseJob extends Job implements JobContract <ide><path>src/Illuminate/Queue/QueueServiceProvider.php <ide> use Illuminate\Queue\Connectors\NullConnector; <ide> use Illuminate\Queue\Connectors\SyncConnector; <ide> use Illuminate\Queue\Connectors\RedisConnector; <del>use Illuminate\Queue\Failed\NullFailedJobProvider; <ide> use Illuminate\Queue\Connectors\DatabaseConnector; <add>use Illuminate\Queue\Failed\NullFailedJobProvider; <ide> use Illuminate\Queue\Connectors\BeanstalkdConnector; <ide> use Illuminate\Queue\Failed\DatabaseFailedJobProvider; <ide> <ide><path>src/Illuminate/Routing/Pipeline.php <ide> namespace Illuminate\Routing; <ide> <ide> use Closure; <del>use Throwable; <ide> use Exception; <add>use Throwable; <ide> use Illuminate\Http\Request; <ide> use Illuminate\Contracts\Debug\ExceptionHandler; <ide> use Illuminate\Pipeline\Pipeline as BasePipeline; <ide><path>src/Illuminate/Routing/Route.php <ide> use Illuminate\Routing\Matching\HostValidator; <ide> use Illuminate\Routing\Matching\MethodValidator; <ide> use Illuminate\Routing\Matching\SchemeValidator; <del>use Symfony\Component\Routing\Route as SymfonyRoute; <ide> use Illuminate\Http\Exception\HttpResponseException; <add>use Symfony\Component\Routing\Route as SymfonyRoute; <ide> <ide> class Route <ide> { <ide><path>src/Illuminate/Routing/Router.php <ide> use Illuminate\Contracts\Events\Dispatcher; <ide> use Illuminate\Database\Eloquent\ModelNotFoundException; <ide> use Psr\Http\Message\ResponseInterface as PsrResponseInterface; <del>use Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory; <ide> use Illuminate\Contracts\Routing\Registrar as RegistrarContract; <add>use Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory; <ide> use Symfony\Component\HttpFoundation\Response as SymfonyResponse; <ide> <ide> class Router implements RegistrarContract <ide><path>src/Illuminate/Session/Middleware/StartSession.php <ide> use Illuminate\Http\Request; <ide> use Illuminate\Session\SessionManager; <ide> use Illuminate\Session\SessionInterface; <del>use Symfony\Component\HttpFoundation\Cookie; <ide> use Illuminate\Session\CookieSessionHandler; <add>use Symfony\Component\HttpFoundation\Cookie; <ide> use Symfony\Component\HttpFoundation\Response; <ide> <ide> class StartSession <ide><path>src/Illuminate/Support/Debug/Dumper.php <ide> <ide> namespace Illuminate\Support\Debug; <ide> <del>use Symfony\Component\VarDumper\Dumper\CliDumper; <ide> use Symfony\Component\VarDumper\Cloner\VarCloner; <add>use Symfony\Component\VarDumper\Dumper\CliDumper; <ide> <ide> class Dumper <ide> { <ide><path>src/Illuminate/Validation/Validator.php <ide> use DateTimeZone; <ide> use RuntimeException; <ide> use DateTimeInterface; <add>use BadMethodCallException; <ide> use Illuminate\Support\Arr; <ide> use Illuminate\Support\Str; <del>use BadMethodCallException; <ide> use InvalidArgumentException; <ide> use Illuminate\Support\Fluent; <ide> use Illuminate\Support\MessageBag; <ide><path>src/Illuminate/View/Factory.php <ide> use Illuminate\Support\Arr; <ide> use Illuminate\Support\Str; <ide> use InvalidArgumentException; <add>use Illuminate\Contracts\Events\Dispatcher; <ide> use Illuminate\Contracts\Support\Arrayable; <ide> use Illuminate\View\Engines\EngineResolver; <del>use Illuminate\Contracts\Events\Dispatcher; <ide> use Illuminate\Contracts\Container\Container; <ide> use Illuminate\Contracts\View\View as ViewContract; <ide> use Illuminate\Contracts\View\Factory as FactoryContract; <ide><path>src/Illuminate/View/View.php <ide> use Illuminate\Support\Str; <ide> use Illuminate\Support\MessageBag; <ide> use Illuminate\Contracts\Support\Arrayable; <del>use Illuminate\View\Engines\EngineInterface; <ide> use Illuminate\Contracts\Support\Renderable; <add>use Illuminate\View\Engines\EngineInterface; <ide> use Illuminate\Contracts\Support\MessageProvider; <ide> use Illuminate\Contracts\View\View as ViewContract; <ide> <ide><path>tests/Auth/AuthGuardTest.php <ide> <?php <ide> <del>use Illuminate\Auth\Events\Authenticated; <ide> use Mockery as m; <ide> use Illuminate\Auth\Events\Failed; <ide> use Illuminate\Auth\Events\Attempting; <add>use Illuminate\Auth\Events\Authenticated; <ide> use Symfony\Component\HttpFoundation\Request; <ide> <ide> class AuthGuardTest extends PHPUnit_Framework_TestCase <ide><path>tests/Auth/AuthenticateMiddlewareTest.php <ide> use Illuminate\Auth\RequestGuard; <ide> use Illuminate\Container\Container; <ide> use Illuminate\Config\Repository as Config; <del>use Illuminate\Auth\Middleware\Authenticate; <ide> use Illuminate\Auth\AuthenticationException; <add>use Illuminate\Auth\Middleware\Authenticate; <ide> <ide> class AuthenticateMiddlewareTest extends PHPUnit_Framework_TestCase <ide> { <ide><path>tests/Cookie/Middleware/EncryptCookiesTest.php <ide> <?php <ide> <del>use Illuminate\Http\Response; <ide> use Illuminate\Http\Request; <add>use Illuminate\Http\Response; <ide> use Illuminate\Routing\Router; <ide> use Illuminate\Cookie\CookieJar; <ide> use Illuminate\Events\Dispatcher; <ide><path>tests/Database/DatabaseEloquentHasManyThroughTest.php <ide> <ide> use Mockery as m; <ide> use Illuminate\Database\Eloquent\Collection; <del>use Illuminate\Database\Eloquent\Relations\HasManyThrough; <ide> use Illuminate\Database\Eloquent\SoftDeletes; <add>use Illuminate\Database\Eloquent\Relations\HasManyThrough; <ide> <ide> class DatabaseEloquentHasManyThroughTest extends PHPUnit_Framework_TestCase <ide> { <ide><path>tests/Database/DatabaseEloquentModelTest.php <ide> public function testFillingJSONAttributes() <ide> $model->toArray() <ide> ); <ide> <del> <ide> $model = new EloquentModelStub(['meta' => json_encode(['name' => 'Taylor'])]); <ide> $model->fillable(['meta->name', 'meta->price', 'meta->size->width']); <ide> $model->fill(['meta->name' => 'foo', 'meta->price' => 'bar', 'meta->size->width' => 'baz']); <ide><path>tests/Database/DatabaseEloquentSoftDeletesIntegrationTest.php <ide> use Illuminate\Database\Query\Builder; <ide> use Illuminate\Database\Eloquent\SoftDeletes; <ide> use Illuminate\Database\Capsule\Manager as DB; <del>use Illuminate\Database\Eloquent\SoftDeletingScope; <ide> use Illuminate\Database\Eloquent\Model as Eloquent; <add>use Illuminate\Database\Eloquent\SoftDeletingScope; <ide> <ide> class DatabaseEloquentSoftDeletesIntegrationTest extends PHPUnit_Framework_TestCase <ide> { <ide><path>tests/Database/DatabaseQueryBuilderTest.php <ide> <?php <ide> <del>use Illuminate\Pagination\LengthAwarePaginator; <ide> use Mockery as m; <ide> use Illuminate\Database\Query\Builder; <add>use Illuminate\Pagination\LengthAwarePaginator; <ide> use Illuminate\Database\Query\Expression as Raw; <ide> use Illuminate\Pagination\AbstractPaginator as Paginator; <ide> <ide><path>tests/Mail/MailSesTransportTest.php <ide> <?php <ide> <ide> use Aws\Ses\SesClient; <del>use Illuminate\Foundation\Application; <add>use Illuminate\Support\Collection; <ide> use Illuminate\Mail\TransportManager; <add>use Illuminate\Foundation\Application; <ide> use Illuminate\Mail\Transport\SesTransport; <del>use Illuminate\Support\Collection; <ide> <ide> class MailSesTransportTest extends PHPUnit_Framework_TestCase <ide> { <ide><path>tests/Notifications/NotificationMailChannelTest.php <ide> <?php <ide> <del>use Illuminate\Notifications\Messages\MailMessage; <ide> use Illuminate\Notifications\Notification; <add>use Illuminate\Notifications\Messages\MailMessage; <ide> <ide> class NotificationMailChannelTest extends PHPUnit_Framework_TestCase <ide> { <ide><path>tests/Queue/QueueDatabaseQueueIntegrationTest.php <ide> <?php <ide> <del>use Illuminate\Database\Capsule\Manager as DB; <del>use Illuminate\Database\Schema\Blueprint; <del>use Illuminate\Database\Eloquent\Model as Eloquent; <del>use \Illuminate\Queue\DatabaseQueue; <ide> use Carbon\Carbon; <ide> use Illuminate\Container\Container; <add>use \Illuminate\Queue\DatabaseQueue; <add>use Illuminate\Database\Schema\Blueprint; <add>use Illuminate\Database\Capsule\Manager as DB; <add>use Illuminate\Database\Eloquent\Model as Eloquent; <ide> <ide> class QueueDatabaseQueueIntegrationTest extends PHPUnit_Framework_TestCase <ide> { <ide><path>tests/Session/SessionTableCommandTest.php <ide> <?php <ide> <del>use Illuminate\Session\Console\SessionTableCommand; <del>use Illuminate\Foundation\Application; <ide> use Mockery as m; <add>use Illuminate\Foundation\Application; <add>use Illuminate\Session\Console\SessionTableCommand; <ide> <ide> class SessionTableCommandTest extends PHPUnit_Framework_TestCase <ide> { <ide><path>tests/Support/SupportMessageBagTest.php <ide> <?php <ide> <del>use Illuminate\Support\MessageBag; <ide> use Mockery as m; <add>use Illuminate\Support\MessageBag; <ide> <ide> class SupportMessageBagTest extends PHPUnit_Framework_TestCase <ide> { <ide><path>tests/Support/SupportServiceProviderTest.php <ide> <?php <ide> <del>use Illuminate\Support\ServiceProvider; <ide> use Mockery as m; <add>use Illuminate\Support\ServiceProvider; <ide> <ide> class SupportServiceProviderTest extends PHPUnit_Framework_TestCase <ide> { <ide><path>tests/Validation/ValidationValidatorTest.php <ide> use Mockery as m; <ide> use Carbon\Carbon; <ide> use Illuminate\Validation\Validator; <del>use Illuminate\Validation\Rules\Unique; <ide> use Illuminate\Validation\Rules\Exists; <add>use Illuminate\Validation\Rules\Unique; <ide> use Symfony\Component\HttpFoundation\File\File; <ide> <ide> class ValidationValidatorTest extends PHPUnit_Framework_TestCase
42
Text
Text
keep code consistent with previous code blocks
723c3881b9d77e3dd14b17d8b3403cd9b578e063
<ide><path>guides/source/getting_started.md <ide> So first, we'll wire up the Post show template <ide> </p> <ide> <% end %> <ide> <del><%= link_to 'Edit Post', edit_post_path(@post) %> | <del><%= link_to 'Back to Posts', posts_path %> <add><%= link_to 'Back', posts_path %> <add>| <%= link_to 'Edit', edit_post_path(@post) %> <ide> ``` <ide> <ide> This adds a form on the `Post` show page that creates a new comment by
1
PHP
PHP
use uuid for generating file names
2d301e31203eb6fa2364b3857d2fd4f4a0e85ea1
<ide><path>src/Illuminate/Http/FileHelpers.php <ide> public function hashName($path = null) <ide> $path = rtrim($path, '/').'/'; <ide> } <ide> <del> return $path.md5_file($this->getRealPath()).'.'.$this->guessExtension(); <add> return $path.Uuid::uuid4()->toString().'.'.$this->guessExtension(); <ide> } <ide> }
1
Python
Python
remove redundant torch.jit.trace in tests
12726f8556152dbc6c115327646ebb33ccb2bc4f
<ide><path>transformers/tests/modeling_common_test.py <ide> def _create_and_check_torchscript(self, config, inputs_dict): <ide> inputs = inputs_dict['input_ids'] # Let's keep only input_ids <ide> <ide> try: <del> torch.jit.trace(model, inputs) <add> traced_gpt2 = torch.jit.trace(model, inputs) <ide> except RuntimeError: <ide> self.fail("Couldn't trace module.") <ide> <ide> try: <del> traced_gpt2 = torch.jit.trace(model, inputs) <ide> torch.jit.save(traced_gpt2, "traced_model.pt") <ide> except RuntimeError: <ide> self.fail("Couldn't save module.")
1
Python
Python
add basic usage docstring for dtype
0863e654ae4ef065ee390a41d19849929d3a9c5c
<ide><path>numpy/add_newdocs.py <ide> # docstrings without requiring a re-compile. <ide> from lib import add_newdoc <ide> <add>add_newdoc('numpy.core', 'dtype', <add>"""Create a data type. <add> <add>A numpy array is homogeneous, and contains elements described by a <add>dtype. A dtype can be constructed from different combinations of <add>fundamental numeric types, as illustrated below. <add> <add>Examples <add>-------- <add> <add>Using array-scalar type: <add>>>> dtype(int16) <add>dtype('int16') <add> <add>Record, one field name 'f1', containing int16: <add>>>> dtype([('f1', int16)]) <add>dtype([('f1', '<i2')]) <add> <add>Record, one field named 'f1', in itself containing a record with one field: <add>>>> dtype([('f1', [('f1', int16)])]) <add>dtype([('f1', [('f1', '<i2')])]) <add> <add>Record, two fields: the first field contains an unsigned int, the <add>second an int32: <add>>>> dtype([('f1', uint), ('f2', int32)]) <add>dtype([('f1', '<u4'), ('f2', '<i4')]) <add> <add>Using array-protocol type strings: <add>>>> dtype([('a','f8'),('b','S10')]) <add>dtype([('a', '<f8'), ('b', '|S10')]) <add> <add>Using comma-separated field formats. The shape is (2,3): <add>>>> dtype("i4, (2,3)f8") <add>dtype([('f0', '<i4'), ('f1', '<f8', (2, 3))]) <add> <add>Using tuples. ``int`` is a fixed type, 3 the field's shape. ``void`` <add>is a flexible type, here of size 10: <add>>>> dtype([('hello',(int,3)),('world',void,10)]) <add>dtype([('hello', '<i4', 3), ('world', '|V10')]) <add> <add>Subdivide ``int16`` into 2 ``int8``'s, called x and y. 0 and 1 are <add>the offsets in bytes: <add>>>> dtype((int16, {'x':(int8,0), 'y':(int8,1)})) <add>dtype(('<i2', [('x', '|i1'), ('y', '|i1')])) <add> <add>Using dictionaries. Two fields named 'gender' and 'age': <add>>>> dtype({'names':['gender','age'], 'formats':['S1',uint8]}) <add>dtype([('gender', '|S1'), ('age', '|u1')]) <add> <add>Offsets in bytes, here 0 and 25: <add>>>> dtype({'surname':('S25',0),'age':(uint8,25)}) <add>dtype([('surname', '|S25'), ('age', '|u1')]) <add> <add>""") <add> <ide> add_newdoc('numpy.core','dtype', <ide> [('fields', "Fields of the data-type or None if no fields"), <ide> ('names', "Names of fields or None if no fields"),
1
Go
Go
add testruncapaddchown test case
230179c8dc120b4b1a181e24de055bdca7963491
<ide><path>integration-cli/docker_cli_run_test.go <ide> func (s *DockerSuite) TestRunContainerNetModeWithExposePort(c *check.C) { <ide> } <ide> <ide> } <add> <add>func (s *DockerSuite) TestRunCapAddCHOWN(c *check.C) { <add> cmd := exec.Command(dockerBinary, "run", "--cap-drop=ALL", "--cap-add=CHOWN", "busybox", "sh", "-c", "adduser -D -H newuser && chown newuser /home && echo ok") <add> out, _, err := runCommandWithOutput(cmd) <add> if err != nil { <add> c.Fatal(err, out) <add> } <add> <add> if actual := strings.Trim(out, "\r\n"); actual != "ok" { <add> c.Fatalf("expected output ok received %s", actual) <add> } <add>}
1
Python
Python
add a break statement, just in case
aee8542ec06294f65b98a582ec159dccbea78aaf
<ide><path>test/test.py <ide> def makeBrowserCommand(browser): <ide> if (name and name.find(key) > -1) or path.find(key) > -1: <ide> command = types[key](browser) <ide> command.name = command.name or key <add> break <ide> <ide> if command is None: <ide> raise Exception("Unrecognized browser: %s" % browser)
1
PHP
PHP
fix linting issues
faa26d25017f86eee58daf9de586774374bc8ec2
<ide><path>src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php <ide> public function compileDropAllTables() <ide> public function compileDropColumn(Blueprint $blueprint, Fluent $command) <ide> { <ide> $columns = $this->wrapArray($command->columns); <del> $dropExistingConstraintsSql = $this->compileDropDefaultConstraint($blueprint, $command).';'; <add> $dropExistingConstraintsSql = $this->compileDropDefaultConstraint($blueprint, $command).';'; <ide> <ide> return $dropExistingConstraintsSql.'alter table '.$this->wrapTable($blueprint).' drop column '.implode(', ', $columns); <ide> } <del> <add> <ide> /** <ide> * Compile a drop default constraint command. <ide> * <ide> * @param \Illuminate\Database\Schema\Blueprint $blueprint <ide> * @param \Illuminate\Support\Fluent $command <ide> * @return string <ide> */ <del> public function compileDropDefaultConstraint(Blueprint $blueprint, Fluent $command) <add> public function compileDropDefaultConstraint(Blueprint $blueprint, Fluent $command) <ide> { <ide> $tableName = $blueprint->getTable(); <del> $columnSql = "'" . implode("','", $command->columns) . "'"; <add> $columnSql = "'".implode("','", $command->columns)."'"; <ide> $sql = "DECLARE @sql NVARCHAR(MAX) = '';"; <ide> $sql .= "SELECT @sql += 'ALTER TABLE [dbo].[$tableName] DROP CONSTRAINT ' + OBJECT_NAME([default_object_id]) + ';' "; <ide> $sql .= 'FROM SYS.COLUMNS ';
1
Python
Python
add tests for new download module
2a0fcf1354b62af022f8cca7d95b199e74fecde9
<ide><path>spacy/tests/test_download.py <add># coding: utf-8 <add>from __future__ import unicode_literals <add> <add>from ..download import download, get_compatibility, get_version, check_error_depr <add>import pytest <add> <add> <add>def test_download_fetch_compatibility(): <add> compatibility = get_compatibility() <add> assert type(compatibility) == dict <add> <add> <add>@pytest.mark.slow <add>@pytest.mark.parametrize('model', ['en_core_web_md-1.2.0']) <add>def test_download_direct_download(model): <add> download(model, direct=True) <add> <add> <add>@pytest.mark.parametrize('model', ['en_core_web_md']) <add>def test_download_get_matching_version_succeeds(model): <add> comp = { model: ['1.7.0', '0.100.0'] } <add> assert get_version(model, comp) <add> <add> <add>@pytest.mark.parametrize('model', ['en_core_web_md']) <add>def test_download_get_matching_version_fails(model): <add> diff_model = 'test_' + model <add> comp = { diff_model: ['1.7.0', '0.100.0'] } <add> with pytest.raises(SystemExit): <add> assert get_version(model, comp) <add> <add> <add>@pytest.mark.parametrize('model', [False, None, '', 'all']) <add>def test_download_no_model_depr_error(model): <add> with pytest.raises(SystemExit): <add> check_error_depr(model)
1
Ruby
Ruby
demote fixme to a normal comment
df25be78b58a94506985ca812971e41da879239e
<ide><path>Library/Homebrew/download_strategy.rb <ide> def hgpath <ide> <ide> class BazaarDownloadStrategy < VCSDownloadStrategy <ide> def stage <del> # FIXME: The export command doesn't work on checkouts <add> # The export command doesn't work on checkouts <ide> # See https://bugs.launchpad.net/bzr/+bug/897511 <ide> FileUtils.cp_r Dir[@clone+"{.}"], Dir.pwd <ide> FileUtils.rm_r ".bzr"
1
Java
Java
update copyright to 'rxjava contributors'
d3455d0c9d57d522c31b5c25af83e8f2b8df12b6
<ide><path>src/main/java/io/reactivex/BackpressureOverflowStrategy.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); <ide> * you may not use this file except in compliance with the License. <ide><path>src/main/java/io/reactivex/BackpressureStrategy.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/Completable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/CompletableEmitter.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/CompletableObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/CompletableOnSubscribe.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/CompletableOperator.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/CompletableSource.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/CompletableTransformer.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/Emitter.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/Flowable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/FlowableEmitter.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/FlowableOnSubscribe.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/FlowableOperator.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/FlowableTransformer.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/Maybe.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/MaybeEmitter.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/MaybeObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/MaybeOnSubscribe.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/MaybeOperator.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/MaybeSource.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/MaybeTransformer.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/Notification.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/Observable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/ObservableEmitter.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/ObservableOnSubscribe.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/ObservableOperator.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/ObservableSource.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/ObservableTransformer.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/Observer.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/Scheduler.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/Single.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/SingleEmitter.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/SingleObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/SingleOnSubscribe.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/SingleOperator.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/SingleSource.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/SingleTransformer.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/annotations/BackpressureKind.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/annotations/BackpressureSupport.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/annotations/Beta.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/annotations/CheckReturnValue.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/annotations/Experimental.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/annotations/SchedulerSupport.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/annotations/package-info.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); <ide> * you may not use this file except in compliance with the License. <ide><path>src/main/java/io/reactivex/disposables/ActionDisposable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/disposables/CompositeDisposable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/disposables/Disposable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/disposables/Disposables.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/disposables/FutureDisposable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/disposables/ReferenceDisposable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/disposables/RunnableDisposable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/disposables/SerialDisposable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/disposables/SubscriptionDisposable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/disposables/package-info.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); <ide> * you may not use this file except in compliance with the License. <ide><path>src/main/java/io/reactivex/exceptions/CompositeException.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); <ide> * you may not use this file except in compliance with the License. <ide><path>src/main/java/io/reactivex/exceptions/Exceptions.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/exceptions/MissingBackpressureException.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/exceptions/package-info.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); <ide> * you may not use this file except in compliance with the License. <ide><path>src/main/java/io/reactivex/flowables/ConnectableFlowable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/flowables/GroupedFlowable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/flowables/package-info.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); <ide> * you may not use this file except in compliance with the License. <ide><path>src/main/java/io/reactivex/functions/Action.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/functions/BiConsumer.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/functions/BiFunction.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/functions/BiPredicate.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/functions/BooleanSupplier.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/functions/Cancellable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/functions/Consumer.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/functions/Function.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/functions/Function3.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/functions/Function4.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/functions/Function5.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/functions/Function6.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/functions/Function7.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/functions/Function8.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/functions/Function9.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/functions/IntFunction.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/functions/LongConsumer.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/functions/Predicate.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/functions/package-info.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); <ide> * you may not use this file except in compliance with the License. <ide><path>src/main/java/io/reactivex/internal/disposables/ArrayCompositeDisposable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/disposables/CancellableDisposable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/disposables/DisposableContainer.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/disposables/DisposableHelper.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/disposables/EmptyDisposable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/disposables/ListCompositeDisposable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/disposables/ObserverFullArbiter.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/disposables/SequentialDisposable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/functions/Functions.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/functions/ObjectHelper.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/fuseable/ConditionalSubscriber.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/fuseable/FuseToFlowable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/fuseable/FuseToMaybe.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/fuseable/FuseToObservable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/fuseable/HasUpstreamCompletableSource.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/fuseable/HasUpstreamMaybeSource.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/fuseable/HasUpstreamObservableSource.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/fuseable/HasUpstreamPublisher.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/fuseable/HasUpstreamSingleSource.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/fuseable/QueueDisposable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/fuseable/QueueFuseable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/fuseable/QueueSubscription.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/fuseable/ScalarCallable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/fuseable/SimplePlainQueue.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/fuseable/SimpleQueue.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/fuseable/package-info.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/BasicFuseableObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/BasicIntQueueDisposable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/BasicQueueDisposable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/BiConsumerSingleObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/BlockingBaseObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/BlockingFirstObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/BlockingLastObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/BlockingMultiObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/BlockingObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/CallbackCompletableObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/ConsumerSingleObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/DeferredScalarDisposable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/DeferredScalarObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/DisposableLambdaObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/EmptyCompletableObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/ForEachWhileObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/FullArbiterObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/FutureObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/FutureSingleObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/InnerQueuedObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/InnerQueuedObserverSupport.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/LambdaObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/QueueDrainObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/ResumeSingleObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/observers/SubscriberCompletableObserver.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableAmb.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableCache.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableConcat.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableConcatArray.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableConcatIterable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableCreate.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableDefer.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableDelay.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableDisposeOn.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableDoFinally.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableDoOnEvent.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableEmpty.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableError.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableErrorSupplier.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableFromAction.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableFromCallable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableFromObservable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableFromPublisher.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableFromRunnable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableFromSingle.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableFromUnsafeSource.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableHide.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableLift.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableMerge.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableMergeArray.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableMergeDelayErrorArray.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableMergeDelayErrorIterable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableMergeIterable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableNever.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableObserveOn.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableOnErrorComplete.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletablePeek.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableResumeNext.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableSubscribeOn.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableTimeout.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableTimer.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableToFlowable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableToObservable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableToSingle.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/completable/CompletableUsing.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/AbstractFlowableWithUpstream.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/BlockingFlowableIterable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/BlockingFlowableLatest.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/BlockingFlowableMostRecent.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/BlockingFlowableNext.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableAll.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableAllSingle.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableAmb.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableAny.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableAnySingle.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableAutoConnect.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableBlockingSubscribe.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableBuffer.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableBufferBoundary.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableBufferBoundarySupplier.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableBufferExactBoundary.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableBufferTimed.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableCache.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableCollect.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableCollectSingle.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableCombineLatest.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableConcatArray.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableConcatMap.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableConcatMapEager.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableCount.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableCountSingle.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableCreate.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableDebounce.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableDebounceTimed.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableDefer.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableDelay.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableDelaySubscriptionOther.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableDematerialize.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableDetach.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableDistinct.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableDistinctUntilChanged.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableDoAfterNext.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableDoFinally.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableDoOnEach.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableDoOnLifecycle.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableElementAt.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableElementAtMaybe.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableElementAtSingle.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableEmpty.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableError.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableFilter.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableFlatMap.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableFlatMapCompletable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableFlatMapCompletableCompletable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableFlatMapMaybe.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableFlatMapSingle.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableFlattenIterable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableFromArray.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableFromCallable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableFromFuture.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableFromIterable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableFromObservable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableFromPublisher.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableGenerate.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableGroupBy.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableGroupJoin.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); <ide> * you may not use this file except in compliance with the License. <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableHide.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableIgnoreElements.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableIgnoreElementsCompletable.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableInternalHelper.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableInterval.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableIntervalRange.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableJoin.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableJust.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableLastMaybe.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableLastSingle.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableLift.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableMap.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableMapNotification.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableMaterialize.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableNever.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableObserveOn.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableOnBackpressureBuffer.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableOnBackpressureBufferStrategy.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableOnBackpressureDrop.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableOnBackpressureError.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <p> <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableOnBackpressureLatest.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableOnErrorNext.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableOnErrorReturn.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowablePublish.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowablePublishMulticast.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); <ide> * you may not use this file except in compliance with the License. <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableRange.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableRangeLong.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableReduce.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableReduceMaybe.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableReduceSeedSingle.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableReduceWithSingle.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableRefCount.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableRepeat.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableRepeatUntil.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableRepeatWhen.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableReplay.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableRetryBiPredicate.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableRetryPredicate.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableRetryWhen.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableSamplePublisher.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableSampleTimed.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableScalarXMap.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableScan.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableScanSeed.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableSequenceEqual.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableSequenceEqualSingle.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableSerialized.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableSingle.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableSingleMaybe.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableSingleSingle.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableSkip.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableSkipLast.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableSkipLastTimed.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableSkipUntil.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableSkipWhile.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableStrict.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableSubscribeOn.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableSwitchIfEmpty.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableSwitchMap.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableTake.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableTakeLast.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableTakeLastOne.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableTakeLastTimed.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableTakeUntil.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableTakeUntilPredicate.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableTakeWhile.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at <ide><path>src/main/java/io/reactivex/internal/operators/flowable/FlowableThrottleFirstTimed.java <ide> /** <del> * Copyright 2016 Netflix, Inc. <add> * Copyright (c) 2016-present, RxJava Contributors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in <ide> * compliance with the License. You may obtain a copy of the License at
300
Javascript
Javascript
improve assert message
242d07890fbb17c9d7e9c8cd2090b069b37afa1b
<ide><path>test/parallel/test-net-pipe-connect-errors.js <ide> var notSocketClient = net.createConnection(emptyTxt, function() { <ide> }); <ide> <ide> notSocketClient.on('error', function(err) { <del> assert(err.code === 'ENOTSOCK' || err.code === 'ECONNREFUSED'); <add> assert(err.code === 'ENOTSOCK' || err.code === 'ECONNREFUSED', <add> `received ${err.code} instead of ENOTSOCK or ECONNREFUSED`); <ide> notSocketErrorFired = true; <ide> }); <ide>
1
Mixed
Javascript
implement routing of defaults
f3cfeb84205385655e8d492f3e6ceb4c24026874
<ide><path>docs/docs/configuration/elements.md <ide> Global point options: `Chart.defaults.elements.point`. <ide> | Name | Type | Default | Description <ide> | ---- | ---- | ------- | ----------- <ide> | `radius` | `number` | `3` | Point radius. <del>| [`pointStyle`](#point-styles) | <code>string&#124;Image</code> | `'circle'` | Point style. <add>| [`pointStyle`](#point-styles) | `string`\|`Image` | `'circle'` | Point style. <ide> | `rotation` | `number` | `0` | Point rotation (in degrees). <del>| `backgroundColor` | `Color` | `'rgba(0, 0, 0, 0.1)'` | Point fill color. <add>| `backgroundColor` | `Color` | `Chart.defaults.color` | Point fill color. <ide> | `borderWidth` | `number` | `1` | Point stroke width. <del>| `borderColor` | `Color` | `'rgba(0, 0, 0, 0.1)'` | Point stroke color. <add>| `borderColor` | `Color` | `Chart.defaults.color` | Point stroke color. <ide> | `hitRadius` | `number` | `1` | Extra radius added to point radius for hit detection. <ide> | `hoverRadius` | `number` | `4` | Point radius when hovered. <ide> | `hoverBorderWidth` | `number` | `1` | Stroke width when hovered. <ide> Global line options: `Chart.defaults.elements.line`. <ide> | Name | Type | Default | Description <ide> | ---- | ---- | ------- | ----------- <ide> | `tension` | `number` | `0.4` | Bézier curve tension (`0` for no Bézier curves). <del>| `backgroundColor` | `Color` | `'rgba(0, 0, 0, 0.1)'` | Line fill color. <add>| `backgroundColor` | `Color` | `Chart.defaults.color` | Line fill color. <ide> | `borderWidth` | `number` | `3` | Line stroke width. <del>| `borderColor` | `Color` | `'rgba(0, 0, 0, 0.1)'` | Line stroke color. <add>| `borderColor` | `Color` | `Chart.defaults.color` | Line stroke color. <ide> | `borderCapStyle` | `string` | `'butt'` | Line cap style. See [MDN](https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineCap). <ide> | `borderDash` | `number[]` | `[]` | Line dash. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash). <ide> | `borderDashOffset` | `number` | `0.0` | Line dash offset. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineDashOffset). <ide> | `borderJoinStyle` | `string` | `'miter'` | Line join style. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineJoin). <ide> | `capBezierPoints` | `boolean` | `true` | `true` to keep Bézier control inside the chart, `false` for no restriction. <ide> | `cubicInterpolationMode` | `string` | `'default'` | Interpolation mode to apply. [See more...](../charts/line.md#cubicinterpolationmode) <del>| `fill` | <code>boolean&#124;string</code> | `true` | How to fill the area under the line. See [area charts](../charts/area.md#filling-modes). <add>| `fill` | `boolean`\|`string` | `true` | How to fill the area under the line. See [area charts](../charts/area.md#filling-modes). <ide> | `stepped` | `boolean` | `false` | `true` to show the line as a stepped line (`tension` will be ignored). <ide> <ide> ## Rectangle Configuration <ide> Global rectangle options: `Chart.defaults.elements.rectangle`. <ide> <ide> | Name | Type | Default | Description <ide> | ---- | ---- | ------- | ----------- <del>| `backgroundColor` | `Color` | `'rgba(0, 0, 0, 0.1)'` | Bar fill color. <add>| `backgroundColor` | `Color` | `Chart.defaults.color` | Bar fill color. <ide> | `borderWidth` | `number` | `0` | Bar stroke width. <del>| `borderColor` | `Color` | `'rgba(0, 0, 0, 0.1)'` | Bar stroke color. <add>| `borderColor` | `Color` | `Chart.defaults.color` | Bar stroke color. <ide> | `borderSkipped` | `string` | `'bottom'` | Skipped (excluded) border: `'bottom'`, `'left'`, `'top'` or `'right'`. <ide> <ide> ## Arc Configuration <ide> Global arc options: `Chart.defaults.elements.arc`. <ide> | Name | Type | Default | Description <ide> | ---- | ---- | ------- | ----------- <ide> | `angle` - for polar only | `number` | `circumference / (arc count)` | Arc angle to cover. <del>| `backgroundColor` | `Color` | `'rgba(0, 0, 0, 0.1)'` | Arc fill color. <add>| `backgroundColor` | `Color` | `Chart.defaults.color` | Arc fill color. <ide> | `borderAlign` | `string` | `'center'` | Arc stroke alignment. <ide> | `borderColor` | `Color` | `'#fff'` | Arc stroke color. <ide> | `borderWidth`| `number` | `2` | Arc stroke width. <ide><path>src/core/core.defaults.js <del>import {merge} from '../helpers/helpers.core'; <add>import {merge, isArray, valueOrDefault} from '../helpers/helpers.core'; <add> <add>/** <add> * @param {object} node <add> * @param {string} key <add> * @return {object} <add> */ <add>function getScope(node, key) { <add> if (!key) { <add> return node; <add> } <add> const keys = key.split('.'); <add> for (let i = 0, n = keys.length; i < n; ++i) { <add> const k = keys[i]; <add> node = node[k] || (node[k] = {}); <add> } <add> return node; <add>} <ide> <ide> /** <ide> * Please use the module's default export which provides a singleton instance <add> * Note: class is exported for typedoc <ide> */ <ide> export class Defaults { <ide> constructor() { <ide> export class Defaults { <ide> this.title = undefined; <ide> this.tooltips = undefined; <ide> this.doughnut = undefined; <add> this._routes = {}; <ide> } <ide> /** <ide> * @param {string} scope <ide> * @param {*} values <ide> */ <ide> set(scope, values) { <del> return merge(this[scope] || (this[scope] = {}), values); <add> return merge(getScope(this, scope), values); <add> } <add> <add> /** <add> * Routes the named defaults to fallback to another scope/name. <add> * This routing is useful when those target values, like defaults.color, are changed runtime. <add> * If the values would be copied, the runtime change would not take effect. By routing, the <add> * fallback is evaluated at each access, so its always up to date. <add> * <add> * Examples: <add> * <add> * defaults.route('elements.arc', 'backgroundColor', '', 'color') <add> * - reads the backgroundColor from defaults.color when undefined locally <add> * <add> * defaults.route('elements.line', ['backgroundColor', 'borderColor'], '', 'color') <add> * - reads the backgroundColor and borderColor from defaults.color when undefined locally <add> * <add> * defaults.route('elements.customLine', ['borderWidth', 'tension'], 'elements.line', ['borderWidth', 'tension']) <add> * - reads the borderWidth and tension from elements.line when those are not defined in elements.customLine <add> * <add> * @param {string} scope Scope this route applies to. <add> * @param {string[]} names Names of the properties that should be routed to different namespace when not defined here. <add> * @param {string} targetScope The namespace where those properties should be routed to. Empty string ('') is the root of defaults. <add> * @param {string|string[]} targetNames The target name/names in the target scope the properties should be routed to. <add> */ <add> route(scope, names, targetScope, targetNames) { <add> const scopeObject = getScope(this, scope); <add> const targetScopeObject = getScope(this, targetScope); <add> const targetNamesIsArray = isArray(targetNames); <add> names.forEach((name, index) => { <add> const privateName = '_' + name; <add> const targetName = targetNamesIsArray ? targetNames[index] : targetNames; <add> Object.defineProperties(scopeObject, { <add> // A private property is defined to hold the actual value, when this property is set in its scope (set in the setter) <add> [privateName]: { <add> writable: true <add> }, <add> // The actual property is defined as getter/setter so we can do the routing when value is not locally set. <add> [name]: { <add> enumerable: true, <add> get() { <add> // @ts-ignore <add> return valueOrDefault(this[privateName], targetScopeObject[targetName]); <add> }, <add> set(value) { <add> this[privateName] = value; <add> } <add> } <add> }); <add> }); <ide> } <ide> } <ide> <ide><path>src/elements/element.arc.js <ide> import Element from '../core/core.element'; <ide> import {_angleBetween, getAngleFromPoint} from '../helpers/helpers.math'; <ide> const TAU = Math.PI * 2; <ide> <del>defaults.set('elements', { <del> arc: { <del> backgroundColor: defaults.color, <del> borderAlign: 'center', <del> borderColor: '#fff', <del> borderWidth: 2 <del> } <add>const scope = 'elements.arc'; <add>defaults.set(scope, { <add> borderAlign: 'center', <add> borderColor: '#fff', <add> borderWidth: 2 <ide> }); <ide> <add>defaults.route(scope, ['backgroundColor'], '', ['color']); <add> <ide> function clipArc(ctx, model) { <ide> const {startAngle, endAngle, pixelMargin, x, y} = model; <ide> let angleMargin = pixelMargin / model.outerRadius; <ide><path>src/elements/element.line.js <ide> import {_updateBezierControlPoints} from '../helpers/helpers.curve'; <ide> * @typedef { import("./element.point").default } Point <ide> */ <ide> <del>const defaultColor = defaults.color; <del> <del>defaults.set('elements', { <del> line: { <del> backgroundColor: defaultColor, <del> borderCapStyle: 'butt', <del> borderColor: defaultColor, <del> borderDash: [], <del> borderDashOffset: 0, <del> borderJoinStyle: 'miter', <del> borderWidth: 3, <del> capBezierPoints: true, <del> fill: true, <del> tension: 0.4 <del> } <add>const scope = 'elements.line'; <add>defaults.set(scope, { <add> borderCapStyle: 'butt', <add> borderDash: [], <add> borderDashOffset: 0, <add> borderJoinStyle: 'miter', <add> borderWidth: 3, <add> capBezierPoints: true, <add> fill: true, <add> tension: 0.4 <ide> }); <ide> <add>defaults.route(scope, ['backgroundColor', 'borderColor'], '', 'color'); <add> <ide> function setStyle(ctx, vm) { <ide> ctx.lineCap = vm.borderCapStyle; <ide> ctx.setLineDash(vm.borderDash); <ide><path>src/elements/element.point.js <ide> import defaults from '../core/core.defaults'; <ide> import Element from '../core/core.element'; <ide> import {_isPointInArea, drawPoint} from '../helpers/helpers.canvas'; <ide> <del>const defaultColor = defaults.color; <del> <del>defaults.set('elements', { <del> point: { <del> backgroundColor: defaultColor, <del> borderColor: defaultColor, <del> borderWidth: 1, <del> hitRadius: 1, <del> hoverBorderWidth: 1, <del> hoverRadius: 4, <del> pointStyle: 'circle', <del> radius: 3 <del> } <add>const scope = 'elements.point'; <add>defaults.set(scope, { <add> borderWidth: 1, <add> hitRadius: 1, <add> hoverBorderWidth: 1, <add> hoverRadius: 4, <add> pointStyle: 'circle', <add> radius: 3 <ide> }); <ide> <add>defaults.route(scope, ['backgroundColor', 'borderColor'], '', 'color'); <add> <ide> class Point extends Element { <ide> <ide> constructor(cfg) { <ide><path>src/elements/element.rectangle.js <ide> import defaults from '../core/core.defaults'; <ide> import Element from '../core/core.element'; <ide> import {isObject} from '../helpers/helpers.core'; <ide> <del>const defaultColor = defaults.color; <del> <del>defaults.set('elements', { <del> rectangle: { <del> backgroundColor: defaultColor, <del> borderColor: defaultColor, <del> borderSkipped: 'bottom', <del> borderWidth: 0 <del> } <add>const scope = 'elements.rectangle'; <add>defaults.set(scope, { <add> borderSkipped: 'bottom', <add> borderWidth: 0 <ide> }); <ide> <add>defaults.route(scope, ['backgroundColor', 'borderColor'], '', 'color'); <add> <ide> /** <ide> * Helper function to get the bounds of the bar regardless of the orientation <ide> * @param {Rectangle} bar the bar <ide><path>test/specs/core.datasetController.tests.js <ide> describe('Chart.DatasetController', function() { <ide> expect(data1[hook]).toBe(Array.prototype[hook]); <ide> }); <ide> }); <add> <add> it('should resolve data element options to the default color', function() { <add> var data0 = [0, 1, 2, 3, 4, 5]; <add> var oldColor = Chart.defaults.color; <add> Chart.defaults.color = 'red'; <add> var chart = acquireChart({ <add> type: 'line', <add> data: { <add> datasets: [{ <add> data: data0 <add> }] <add> } <add> }); <add> <add> var meta = chart.getDatasetMeta(0); <add> expect(meta.dataset.options.borderColor).toBe('red'); <add> expect(meta.data[0].options.borderColor).toBe('red'); <add> <add> // Reset old shared state <add> Chart.defaults.color = oldColor; <add> }); <ide> });
7
Go
Go
replace overlay2 mount reexec with in-proc impl
34f459423ae32dd07993eebd7c81dc6390403b5a
<ide><path>daemon/graphdriver/overlay2/mount.go <ide> package overlay2 // import "github.com/docker/docker/daemon/graphdriver/overlay2" <ide> <ide> import ( <del> "bytes" <del> "encoding/json" <del> "flag" <del> "fmt" <del> "os" <ide> "runtime" <ide> <del> "github.com/docker/docker/pkg/reexec" <ide> "golang.org/x/sys/unix" <ide> ) <ide> <del>func init() { <del> reexec.Register("docker-mountfrom", mountFromMain) <del>} <del> <del>func fatal(err error) { <del> fmt.Fprint(os.Stderr, err) <del> os.Exit(1) <del>} <del> <del>type mountOptions struct { <del> Device string <del> Target string <del> Type string <del> Label string <del> Flag uint32 <del>} <del> <ide> func mountFrom(dir, device, target, mType string, flags uintptr, label string) error { <del> options := &mountOptions{ <del> Device: device, <del> Target: target, <del> Type: mType, <del> Flag: uint32(flags), <del> Label: label, <del> } <del> <del> cmd := reexec.Command("docker-mountfrom", dir) <del> w, err := cmd.StdinPipe() <del> if err != nil { <del> return fmt.Errorf("mountfrom error on pipe creation: %v", err) <del> } <del> <del> output := bytes.NewBuffer(nil) <del> cmd.Stdout = output <del> cmd.Stderr = output <del> <del> // reexec.Command() sets cmd.SysProcAttr.Pdeathsig on Linux, which <del> // causes the started process to be signaled when the creating OS thread <del> // dies. Ensure that the reexec is not prematurely signaled. See <del> // https://go.dev/issue/27505 for more information. <del> runtime.LockOSThread() <del> defer runtime.UnlockOSThread() <del> if err := cmd.Start(); err != nil { <del> w.Close() <del> return fmt.Errorf("mountfrom error on re-exec cmd: %v", err) <del> } <del> // write the options to the pipe for the untar exec to read <del> if err := json.NewEncoder(w).Encode(options); err != nil { <del> w.Close() <del> return fmt.Errorf("mountfrom json encode to pipe failed: %v", err) <del> } <del> w.Close() <del> <del> if err := cmd.Wait(); err != nil { <del> return fmt.Errorf("mountfrom re-exec error: %v: output: %v", err, output) <del> } <del> return nil <del>} <del> <del>// mountfromMain is the entry-point for docker-mountfrom on re-exec. <del>func mountFromMain() { <del> runtime.LockOSThread() <del> flag.Parse() <del> <del> var options *mountOptions <del> <del> if err := json.NewDecoder(os.Stdin).Decode(&options); err != nil { <del> fatal(err) <del> } <del> <del> if err := os.Chdir(flag.Arg(0)); err != nil { <del> fatal(err) <del> } <del> <del> if err := unix.Mount(options.Device, options.Target, options.Type, uintptr(options.Flag), options.Label); err != nil { <del> fatal(err) <del> } <del> <del> os.Exit(0) <add> chErr := make(chan error, 1) <add> <add> go func() { <add> runtime.LockOSThread() <add> // Do not unlock this thread as the thread state cannot be restored <add> // We do not want go to re-use this thread for anything else. <add> <add> if err := unix.Unshare(unix.CLONE_FS); err != nil { <add> chErr <- err <add> return <add> } <add> if err := unix.Chdir(dir); err != nil { <add> chErr <- err <add> return <add> } <add> chErr <- unix.Mount(device, target, mType, flags, label) <add> }() <add> return <-chErr <ide> }
1
Python
Python
handle `mask` in `timedistributed` wrapper.
a3664246de4bb8ef3232dd84ff47fc2694c69e58
<ide><path>keras/backend/theano_backend.py <ide> def var(x, axis=None, keepdims=False): <ide> def any(x, axis=None, keepdims=False): <ide> """Bitwise reduction (logical OR). <ide> """ <del> return T.any(x, axis=axis, keepdims=keepdims) <add> y = T.any(x, axis=axis, keepdims=keepdims) <add> if hasattr(x, '_keras_shape'): <add> if axis is None: <add> y._keras_shape = (1,) * len(x._keras_shape) if keepdims else (1,) <add> else: <add> if isinstance(axis, int): <add> axis_list = [axis] <add> else: <add> axis_list = list(set(int(a) for a in axis)) <add> keras_shape_list = list(x._keras_shape) <add> if keepdims: <add> for a in axis_list: <add> keras_shape_list[a] = 1 <add> else: <add> for a in axis_list[::-1]: <add> keras_shape_list.pop(a) <add> if not keras_shape_list: <add> keras_shape_list = (1,) <add> y._keras_shape = tuple(keras_shape_list) <add> return y <ide> <ide> <ide> def all(x, axis=None, keepdims=False): <ide> def equal(x, y): <ide> <ide> <ide> def not_equal(x, y): <del> return T.neq(x, y) <add> z = T.neq(x, y) <add> if hasattr(x, '_keras_shape'): <add> z._keras_shape = x._keras_shape <add> elif hasattr(y, '_keras_shape'): <add> z._keras_shape = y._keras_shape <add> return z <ide> <ide> <ide> def greater(x, y): <ide> def concatenate(tensors, axis=-1): <ide> <ide> def reshape(x, shape): <ide> y = T.reshape(x, shape) <del> if _is_explicit_shape(shape): <del> shape = tuple(x if x != -1 else None for x in shape) <del> y._keras_shape = shape <del> if hasattr(x, '_uses_learning_phase'): <del> y._uses_learning_phase = x._uses_learning_phase <del> else: <del> y._uses_learning_phase = False <add> shape = tuple(x if isinstance(x, int) and x > 0 else None for x in shape) <add> y._keras_shape = shape <add> if hasattr(x, '_uses_learning_phase'): <add> y._uses_learning_phase = x._uses_learning_phase <add> else: <add> y._uses_learning_phase = False <ide> return y <ide> <ide> <ide><path>keras/layers/core.py <ide> def __init__(self, mask_value=0., **kwargs): <ide> self.mask_value = mask_value <ide> <ide> def compute_mask(self, inputs, mask=None): <del> return K.any(K.not_equal(inputs, self.mask_value), axis=-1) <add> output_mask = K.any(K.not_equal(inputs, self.mask_value), axis=-1) <add> return output_mask <ide> <ide> def call(self, inputs): <ide> boolean_mask = K.any(K.not_equal(inputs, self.mask_value), <ide><path>keras/layers/embeddings.py <ide> def __init__(self, input_dim, output_dim, <ide> self.activity_regularizer = regularizers.get(activity_regularizer) <ide> self.embeddings_constraint = constraints.get(embeddings_constraint) <ide> self.mask_zero = mask_zero <add> self.supports_masking = mask_zero <ide> self.input_length = input_length <ide> <ide> def build(self, input_shape): <ide> def build(self, input_shape): <ide> def compute_mask(self, inputs, mask=None): <ide> if not self.mask_zero: <ide> return None <del> else: <del> return K.not_equal(inputs, 0) <add> output_mask = K.not_equal(inputs, 0) <add> return output_mask <ide> <ide> def compute_output_shape(self, input_shape): <ide> if self.input_length is None: <ide><path>keras/layers/wrappers.py <ide> def __init__(self, layer, **kwargs): <ide> super(TimeDistributed, self).__init__(layer, **kwargs) <ide> self.supports_masking = True <ide> <add> def _get_shape_tuple(self, init_tuple, tensor, start_idx, int_shape=None): <add> """Finds non-specific dimensions in the static shapes <add> and replaces them by the corresponding dynamic shapes of the tensor. <add> <add> # Arguments <add> init_tuple: a tuple, the first part of the output shape <add> tensor: the tensor from which to get the (static and dynamic) shapes <add> as the last part of the output shape <add> start_idx: int, which indicate the first dimension to take from <add> the static shape of the tensor <add> int_shape: an alternative static shape to take as the last part <add> of the output shape <add> <add> # Returns <add> The new int_shape with the first part from init_tuple <add> and the last part from either `int_shape` (if provided) <add> or K.int_shape(tensor), where every `None` is replaced by <add> the corresponding dimension from K.shape(tensor) <add> """ <add> # replace all None in int_shape by K.shape <add> if int_shape is None: <add> int_shape = K.int_shape(tensor)[start_idx:] <add> if not any(not s for s in int_shape): <add> return init_tuple + int_shape <add> tensor_shape = K.shape(tensor) <add> int_shape = list(int_shape) <add> for i, s in enumerate(int_shape): <add> if not s: <add> int_shape[i] = tensor_shape[start_idx + i] <add> return init_tuple + tuple(int_shape) <add> <ide> def build(self, input_shape): <ide> assert len(input_shape) >= 3 <ide> self.input_spec = InputSpec(shape=input_shape) <ide> def step(x, _): <ide> input_length = input_shape[1] <ide> if not input_length: <ide> input_length = K.shape(inputs)[1] <add> inner_input_shape = self._get_shape_tuple((-1,), inputs, 2) <ide> # Shape: (num_samples * timesteps, ...). And track the <ide> # transformation in self._input_map. <ide> input_uid = object_list_uid(inputs) <del> inputs = K.reshape(inputs, (-1,) + input_shape[2:]) <add> inputs = K.reshape(inputs, inner_input_shape) <ide> self._input_map[input_uid] = inputs <ide> # (num_samples * timesteps, ...) <add> if has_arg(self.layer.call, 'mask') and mask is not None: <add> inner_mask_shape = self._get_shape_tuple((-1,), mask, 2) <add> kwargs['mask'] = K.reshape(mask, inner_mask_shape) <ide> y = self.layer.call(inputs, **kwargs) <ide> if hasattr(y, '_uses_learning_phase'): <ide> uses_learning_phase = y._uses_learning_phase <ide> # Shape: (num_samples, timesteps, ...) <ide> output_shape = self.compute_output_shape(input_shape) <del> y = K.reshape(y, (-1, input_length) + output_shape[2:]) <add> output_shape = self._get_shape_tuple( <add> (-1, input_length), y, 1, output_shape[2:]) <add> y = K.reshape(y, output_shape) <ide> <ide> # Apply activity regularizer if any: <ide> if (hasattr(self.layer, 'activity_regularizer') and <ide> def step(x, _): <ide> y._uses_learning_phase = True <ide> return y <ide> <add> def compute_mask(self, inputs, mask=None): <add> """Computes an output mask tensor for Embedding layer <add> based on the inputs, mask, and the inner layer. <add> <add> If batch size is specified: <add> Simply return the input `mask`. (An rnn-based implementation with <add> more than one rnn inputs is required but not supported in Keras yet.) <add> <add> Otherwise we call `compute_mask` of the inner layer at each time step. <add> If the output mask at each time step is not `None`: <add> (E.g., inner layer is Masking or RNN) <add> Concatenate all of them and return the concatenation. <add> If the output mask at each time step is `None` and the input mask is not `None`: <add> (E.g., inner layer is Dense) <add> Reduce the input_mask to 2 dimensions and return it. <add> Otherwise (both the output mask and the input mask are `None`): <add> (E.g., `mask` is not used at all) <add> Return `None`. <add> <add> # Arguments <add> inputs: Tensor <add> mask: Tensor <add> # Returns <add> None or a tensor <add> """ <add> # cases need to call the layer.compute_mask when input_mask is None: <add> # Masking layer and Embedding layer with mask_zero <add> input_shape = K.int_shape(inputs) <add> if input_shape[0]: <add> # batch size matters, we currently do not handle mask explicitly <add> return mask <add> inner_mask = mask <add> if inner_mask is not None: <add> inner_mask_shape = self._get_shape_tuple((-1,), mask, 2) <add> inner_mask = K.reshape(inner_mask, inner_mask_shape) <add> input_uid = object_list_uid(inputs) <add> inner_inputs = self._input_map[input_uid] <add> output_mask = self.layer.compute_mask(inner_inputs, inner_mask) <add> if output_mask is None: <add> if mask is None: <add> return None <add> # input_mask is not None, and output_mask is None: <add> # we should return a not-None mask <add> output_mask = mask <add> for _ in range(2, len(K.int_shape(mask))): <add> output_mask = K.any(output_mask, axis=-1) <add> else: <add> # output_mask is not None. We need to reshape it <add> input_length = input_shape[1] <add> if not input_length: <add> input_length = K.shape(inputs)[1] <add> output_mask_int_shape = K.int_shape(output_mask) <add> if output_mask_int_shape is None: <add> # if the output_mask does not have a static shape, <add> # its shape must be the same as mask's <add> if mask is not None: <add> output_mask_int_shape = K.int_shape(mask) <add> else: <add> output_mask_int_shape = K.compute_output_shape(input_shape)[:-1] <add> output_mask_shape = self._get_shape_tuple( <add> (-1, input_length), output_mask, 1, output_mask_int_shape[1:]) <add> output_mask = K.reshape(output_mask, output_mask_shape) <add> return output_mask <add> <ide> <ide> class Bidirectional(Wrapper): <ide> """Bidirectional wrapper for RNNs. <ide><path>tests/keras/layers/wrappers_test.py <ide> def test_TimeDistributed_trainable(): <ide> assert len(layer.trainable_weights) == 2 <ide> <ide> <add>@keras_test <add>@pytest.mark.skipif((K.backend() == 'cntk'), <add> reason='Unknown timestamps for RNN not supported in CNTK.') <add>def test_TimeDistributed_with_masked_embedding_and_unspecified_shape(): <add> # test with unspecified shape and Embeddings with mask_zero <add> model = Sequential() <add> model.add(wrappers.TimeDistributed(layers.Embedding(5, 6, mask_zero=True), <add> input_shape=(None, None))) # N by t_1 by t_2 by 6 <add> model.add(wrappers.TimeDistributed(layers.SimpleRNN(7, return_sequences=True))) <add> model.add(wrappers.TimeDistributed(layers.SimpleRNN(8, return_sequences=False))) <add> model.add(layers.SimpleRNN(1, return_sequences=False)) <add> model.compile(optimizer='rmsprop', loss='mse') <add> model_input = np.random.randint(low=1, high=5, size=(10, 3, 4), dtype='int32') <add> for i in range(4): <add> model_input[i, i:, i:] = 0 <add> model.fit(model_input, <add> np.random.random((10, 1)), epochs=1, batch_size=10) <add> mask_outputs = [model.layers[0].compute_mask(model.input)] <add> for layer in model.layers[1:]: <add> mask_outputs.append(layer.compute_mask(layer.input, mask_outputs[-1])) <add> func = K.function([model.input], mask_outputs[:-1]) <add> mask_outputs_val = func([model_input]) <add> ref_mask_val_0 = model_input > 0 # embedding layer <add> ref_mask_val_1 = ref_mask_val_0 # first RNN layer <add> ref_mask_val_2 = np.any(ref_mask_val_1, axis=-1) # second RNN layer <add> ref_mask_val = [ref_mask_val_0, ref_mask_val_1, ref_mask_val_2] <add> for i in range(3): <add> assert np.array_equal(mask_outputs_val[i], ref_mask_val[i]) <add> assert mask_outputs[-1] is None # final layer <add> <add> <add>@keras_test <add>def test_TimeDistributed_with_masking_layer(): <add> # test with Masking layer <add> model = Sequential() <add> model.add(wrappers.TimeDistributed(layers.Masking(mask_value=0.,), <add> input_shape=(None, 4))) <add> model.add(wrappers.TimeDistributed(layers.Dense(5))) <add> model.compile(optimizer='rmsprop', loss='mse') <add> model_input = np.random.randint(low=1, high=5, size=(10, 3, 4)) <add> for i in range(4): <add> model_input[i, i:, :] = 0. <add> model.compile(optimizer='rmsprop', loss='mse') <add> model.fit(model_input, <add> np.random.random((10, 3, 5)), epochs=1, batch_size=6) <add> mask_outputs = [model.layers[0].compute_mask(model.input)] <add> mask_outputs += [model.layers[1].compute_mask(model.layers[1].input, mask_outputs[-1])] <add> func = K.function([model.input], mask_outputs) <add> mask_outputs_val = func([model_input]) <add> assert np.array_equal(mask_outputs_val[0], np.any(model_input, axis=-1)) <add> assert np.array_equal(mask_outputs_val[1], np.any(model_input, axis=-1)) <add> <add> <ide> @keras_test <ide> def test_regularizers(): <ide> model = Sequential()
5
Java
Java
add setchildren to flatuiimplementation
fede13878672578cabba0b6be2270550d887da1f
<ide><path>ReactAndroid/src/main/java/com/facebook/react/flat/FlatUIImplementation.java <ide> public void manageChildren( <ide> addChildren(parentNode, addChildTags, addAtIndices); <ide> } <ide> <add> @Override <add> public void setChildren( <add> int viewTag, <add> ReadableArray children) { <add> <add> ReactShadowNode parentNode = resolveShadowNode(viewTag); <add> <add> for (int i = 0; i < children.size(); i++) { <add> ReactShadowNode addToChild = resolveShadowNode(children.getInt(i)); <add> addChildAt(parentNode, addToChild, i, i - 1); <add> } <add> } <add> <ide> @Override <ide> public void measure(int reactTag, Callback callback) { <ide> FlatShadowNode node = (FlatShadowNode) resolveShadowNode(reactTag);
1
Javascript
Javascript
allow loaded progress of 0 in unit tests
d762567bcf765f2931322d90c99360cdb3c86751
<ide><path>test/unit/api_spec.js <ide> describe('api', function() { <ide> loadingTask.promise <ide> ]; <ide> Promise.all(promises).then(function (data) { <del> expect((data[0].loaded / data[0].total) > 0).toEqual(true); <add> expect((data[0].loaded / data[0].total) >= 0).toEqual(true); <ide> expect(data[1] instanceof PDFDocumentProxy).toEqual(true); <ide> expect(loadingTask).toEqual(data[1].loadingTask); <ide> loadingTask.destroy().then(done);
1
Go
Go
provide more info in error
ae1002219bc5d602c552ba952bc45e440cf3aae7
<ide><path>pkg/truncindex/truncindex.go <ide> var ( <ide> // ErrEmptyPrefix is an error returned if the prefix was empty. <ide> ErrEmptyPrefix = errors.New("Prefix can't be empty") <ide> <del> // ErrAmbiguousPrefix is returned if the prefix was ambiguous <del> // (multiple ids for the prefix). <del> ErrAmbiguousPrefix = errors.New("Multiple IDs found with provided prefix") <del> <ide> // ErrIllegalChar is returned when a space is in the ID <ide> ErrIllegalChar = errors.New("illegal character: ' '") <ide> <ide> // ErrNotExist is returned when ID or its prefix not found in index. <ide> ErrNotExist = errors.New("ID does not exist") <ide> ) <ide> <add>// ErrAmbiguousPrefix is returned if the prefix was ambiguous <add>// (multiple ids for the prefix). <add>type ErrAmbiguousPrefix struct { <add> prefix string <add>} <add> <add>func (e ErrAmbiguousPrefix) Error() string { <add> return fmt.Sprintf("Multiple IDs found with provided prefix: %s", e.prefix) <add>} <add> <ide> // TruncIndex allows the retrieval of string identifiers by any of their unique prefixes. <ide> // This is used to retrieve image and container IDs by more convenient shorthand prefixes. <ide> type TruncIndex struct { <ide> func (idx *TruncIndex) Get(s string) (string, error) { <ide> if id != "" { <ide> // we haven't found the ID if there are two or more IDs <ide> id = "" <del> return ErrAmbiguousPrefix <add> return ErrAmbiguousPrefix{prefix: string(prefix)} <ide> } <ide> id = string(prefix) <ide> return nil
1
Javascript
Javascript
fix veryfying exports in module codegen
0dcd57c73c4d0d0368ad77ebde1f93587caa9118
<ide><path>packages/react-native-codegen/src/parsers/flow/index.js <ide> const {processModule} = require('./modules'); <ide> function getTypes(ast) { <ide> return ast.body.reduce((types, node) => { <ide> if (node.type === 'ExportNamedDeclaration') { <del> if (node.declaration.type !== 'VariableDeclaration') { <add> if (node.declaration && node.declaration.type !== 'VariableDeclaration') { <ide> types[node.declaration.id.name] = node.declaration; <ide> } <ide> } else if (
1
Javascript
Javascript
fix the arguments order in `assert.strictequal`
c481799d72cb1fd496c0747fba870afb275d36b0
<ide><path>test/parallel/test-http-request-end.js <ide> const server = http.Server(function(req, res) { <ide> }); <ide> <ide> req.on('end', function() { <del> assert.strictEqual(expected, result); <add> assert.strictEqual(result, expected); <ide> server.close(); <ide> res.writeHead(200); <ide> res.end('hello world\n');
1
PHP
PHP
remove leftover of pagetitle
eb9877030496925740458b25cc50080f1eced681
<ide><path>lib/Cake/Test/Case/Controller/ControllerTest.php <ide> public function testControllerSet() { <ide> <ide> $Controller->set('title', 'someTitle'); <ide> $this->assertSame($Controller->viewVars['title'], 'someTitle'); <del> $this->assertTrue(empty($Controller->pageTitle)); <ide> <ide> $Controller->viewVars = array(); <ide> $expected = array('ModelName' => 'name', 'ModelName2' => 'name2'); <ide><path>lib/Cake/Test/Case/View/Helper/RssHelperTest.php <ide> public function testDocument() { <ide> */ <ide> public function testChannel() { <ide> $attrib = array('a' => '1', 'b' => '2'); <del> $elements = array('title' => 'title'); <add> $elements = array('title' => 'Title'); <ide> $content = 'content'; <ide> <ide> $result = $this->Rss->channel($attrib, $elements, $content); <ide> public function testChannel() { <ide> 'b' => '2' <ide> ), <ide> '<title', <del> 'title', <del> '/title', <del> '<link', <del> $this->Rss->url('/', true), <del> '/link', <del> '<description', <del> 'content', <del> '/channel' <del> ); <del> $this->assertTags($result, $expected); <del> <del> $this->View->pageTitle = 'title'; <del> $attrib = array('a' => '1', 'b' => '2'); <del> $elements = array(); <del> $content = 'content'; <del> <del> $result = $this->Rss->channel($attrib, $elements, $content); <del> $expected = array( <del> 'channel' => array( <del> 'a' => '1', <del> 'b' => '2' <del> ), <del> '<title', <del> 'title', <add> 'Title', <ide> '/title', <ide> '<link', <ide> $this->Rss->url('/', true), <ide><path>lib/Cake/Test/Case/View/ViewTest.php <ide> public function testExtendWithElementBeforeExtend() { <ide> $this->assertEquals($expected, $result); <ide> } <ide> <del>/** <del> * Test that setting arbitrary properties still works. <del> * <del> * @return void <del> */ <del> public function testPropertySetting() { <del> $this->assertFalse(isset($this->View->pageTitle)); <del> $this->View->pageTitle = 'test'; <del> $this->assertTrue(isset($this->View->pageTitle)); <del> $this->assertTrue(!empty($this->View->pageTitle)); <del> $this->assertEquals('test', $this->View->pageTitle); <del> } <del> <ide> /** <ide> * Test that setting arbitrary properties still works. <ide> * <ide><path>lib/Cake/View/Helper/RssHelper.php <ide> public function document($attrib = array(), $content = null) { <ide> * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/rss.html#RssHelper::channel <ide> */ <ide> public function channel($attrib = array(), $elements = array(), $content = null) { <del> if (!isset($elements['title']) && !empty($this->_View->pageTitle)) { <del> $elements['title'] = $this->_View->pageTitle; <del> } <ide> if (!isset($elements['link'])) { <ide> $elements['link'] = '/'; <ide> } <add> if (!isset($elements['title'])) { <add> $elements['title'] = ''; <add> } <ide> if (!isset($elements['description'])) { <ide> $elements['description'] = ''; <ide> }
4
Text
Text
update the "top level .mdx pages" code sample
e0ff050402ae7d2e71abb9efaffd917d950c4c4d
<ide><path>packages/next-mdx/readme.md <ide> module.exports = withMDX() <ide> <ide> ## Top level .mdx pages <ide> <del>Define the `pageExtensions` option to have Next.js handle `.mdx` files in the `pages` directory as pages: <add>Define the `pageExtensions` option to have Next.js handle `.md` and `.mdx` files in the `pages` directory as pages: <ide> <ide> ```js <ide> // next.config.js <ide> const withMDX = require('@next/mdx')({ <ide> extension: /\.mdx?$/, <ide> }) <ide> module.exports = withMDX({ <del> pageExtensions: ['js', 'jsx', 'mdx'], <add> pageExtensions: ['js', 'jsx', 'md', 'mdx'], <ide> }) <ide> ``` <ide>
1
PHP
PHP
remove duplicate comment
caf562f8e2d165898d6e8abe0549a5fb7384d92d
<ide><path>src/Illuminate/Database/Query/Grammars/Grammar.php <ide> protected function compileComponents(Builder $query) <ide> $sql = []; <ide> <ide> foreach ($this->selectComponents as $component) { <del> // To compile the query, we'll spin through each component of the query and <del> // see if that component exists. If it does we'll just call the compiler <del> // function for the component which is responsible for making the SQL. <ide> if (isset($query->$component) && ! is_null($query->$component)) { <ide> $method = 'compile'.ucfirst($component); <ide>
1
Python
Python
set retry-after header when throttled
c3891b6e00daa7a92cca1c88599e046f72926bb4
<ide><path>rest_framework/exceptions.py <ide> def __init__(self, media_type, detail=None): <ide> class Throttled(APIException): <ide> status_code = status.HTTP_429_TOO_MANY_REQUESTS <ide> default_detail = 'Request was throttled.' <del> extra_detail = "Expected available in %d second%s." <add> extra_detail = " Expected available in %d second%s." <ide> <ide> def __init__(self, wait=None, detail=None): <ide> if wait is None: <ide><path>rest_framework/tests/test_throttling.py <ide> def ensure_response_header_contains_proper_throttle_field(self, view, expected_h <ide> response = view.as_view()(request) <ide> if expect is not None: <ide> self.assertEqual(response['X-Throttle-Wait-Seconds'], expect) <add> self.assertEqual(response['Retry-After'], expect) <ide> else: <ide> self.assertFalse('X-Throttle-Wait-Seconds' in response) <add> self.assertFalse('Retry-After' in response) <ide> <ide> def test_seconds_fields(self): <ide> """ <ide> def test_non_time_throttle(self): <ide> <ide> response = MockView_NonTimeThrottling.as_view()(request) <ide> self.assertFalse('X-Throttle-Wait-Seconds' in response) <add> self.assertFalse('Retry-After' in response) <ide> <ide> self.assertTrue(MockView_NonTimeThrottling.throttle_classes[0].called) <ide> <ide> response = MockView_NonTimeThrottling.as_view()(request) <ide> self.assertFalse('X-Throttle-Wait-Seconds' in response) <add> self.assertFalse('Retry-After' in response) <ide> <ide> <ide> class ScopedRateThrottleTests(TestCase): <ide><path>rest_framework/views.py <ide> def exception_handler(exc): <ide> headers['WWW-Authenticate'] = exc.auth_header <ide> if getattr(exc, 'wait', None): <ide> headers['X-Throttle-Wait-Seconds'] = '%d' % exc.wait <add> headers['Retry-After'] = '%d' % exc.wait <ide> <ide> return Response({'detail': exc.detail}, <ide> status=exc.status_code,
3
Ruby
Ruby
test basic upload
1e05e6285602656bc3504b83d03135c343cd50e6
<ide><path>test/disk_site_test.rb <ide> class ActiveFile::DiskSiteTest < ActiveSupport::TestCase <ide> FIXTURE_FILE.rewind <ide> end <ide> <add> test "uploading" do <add> key = SecureRandom.base58(24) <add> data = "Something else entirely!" <add> @site.upload(key, StringIO.new(data)) <add> <add> assert_equal data, @site.download(key) <add> end <add> <ide> test "downloading" do <ide> assert_equal FIXTURE_FILE.read, @site.download(FIXTURE_KEY) <ide> end
1
Go
Go
fix ptmx issue on libcontainer
18f06b8d16c475568fd023e97eecc138ab052c2d
<ide><path>pkg/libcontainer/namespaces/exec.go <ide> func ExecContainer(container *libcontainer.Container) (pid int, err error) { <ide> // command.Stderr = os.Stderr <ide> command.SysProcAttr = &syscall.SysProcAttr{} <ide> command.SysProcAttr.Cloneflags = flag <del> //command.ExtraFiles = []*os.File{master} <add> <add> command.ExtraFiles = []*os.File{master} <ide> <ide> println("vvvvvvvvv") <ide> if err := command.Start(); err != nil { <ide><path>pkg/libcontainer/namespaces/mount.go <ide> func SetupNewMountNamespace(rootfs, console string, readonly bool) error { <ide> if err := os.Remove(ptmx); err != nil && !os.IsNotExist(err) { <ide> return err <ide> } <del> if err := os.Symlink(filepath.Join(rootfs, "pts/ptmx"), ptmx); err != nil { <add> if err := os.Symlink("pts/ptmx", ptmx); err != nil { <ide> return fmt.Errorf("symlink dev ptmx %s", err) <ide> } <ide>
2
PHP
PHP
add tests for invalid data
5ee6ff100d9ba15c90ef6eaa6a8ac911e1200b69
<ide><path>src/View/Input/DateTime.php <ide> protected function _deconstructDate($value, $options) { <ide> 'meridian' => '', <ide> ]; <ide> } <del> if (is_string($value)) { <del> $date = new \DateTime($value); <del> } elseif (is_int($value)) { <del> $date = new \DateTime('@' . $value); <del> } elseif (is_array($value)) { <del> $date = new \DateTime(); <del> if (isset($value['year'], $value['month'], $value['day'])) { <del> $date->setDate($value['year'], $value['month'], $value['day']); <del> } <del> if (isset($value['hour'], $value['minute'], $value['second'])) { <del> $date->setTime($value['hour'], $value['minute'], $value['second']); <add> try { <add> if (is_string($value)) { <add> $date = new \DateTime($value); <add> } elseif (is_int($value)) { <add> $date = new \DateTime('@' . $value); <add> } elseif (is_array($value)) { <add> $date = new \DateTime(); <add> if (isset($value['year'], $value['month'], $value['day'])) { <add> $date->setDate($value['year'], $value['month'], $value['day']); <add> } <add> if (isset($value['hour'], $value['minute'], $value['second'])) { <add> $date->setTime($value['hour'], $value['minute'], $value['second']); <add> } <add> } else { <add> $date = clone $value; <ide> } <del> } else { <del> $date = clone $value; <add> } catch (\Exception $e) { <add> $date = new \DateTime(); <ide> } <ide> <ide> if (isset($options['minute']['interval'])) { <ide><path>tests/TestCase/View/Input/DateTimeTest.php <ide> public function setUp() { <ide> $this->DateTime = new DateTime($this->templates, $this->selectBox); <ide> } <ide> <add>/** <add> * Data provider for testing various types of invalid selected values. <add> * <add> * @return array <add> */ <add> public static function invalidSelectedValuesProvider() { <add> $date = new \DateTime('2014-01-20 12:30:45'); <add> return [ <add> 'string' => ['Bag of poop'], <add> 'int' => [-1], <add> 'array' => [[ <add> 'derp' => 'hurt' <add> ]] <add> ]; <add> } <add> <add>/** <add> * test rendering selected values. <add> * <add> * @dataProvider selectedValuesProvider <add> * @return void <add> */ <add> public function testRenderSelectedInvalid($selected) { <add> $result = $this->DateTime->render(['val' => $selected]); <add> $now = new \DateTime(); <add> $format = '<option value="%s" selected="selected">%s</option>'; <add> $this->assertContains( <add> sprintf($format, $now->format('Y'), $now->format('Y')), <add> $result <add> ); <add> } <add> <ide> /** <ide> * Data provider for testing various acceptable selected values. <ide> *
2
Python
Python
put line ending on message to stderr
433b02a909c6ada47c721088d1fc6df67bab8ac8
<ide><path>numpy/__init__.py <ide> <ide> if __NUMPY_SETUP__: <ide> import sys as _sys <del> _sys.stderr.write('Running from numpy source directory.') <add> _sys.stderr.write('Running from numpy source directory.\n') <ide> del _sys <ide> else: <ide> try:
1
Javascript
Javascript
improve console.log output
27713a9d21b4cc542364bd8967953b71bf2b5537
<ide><path>common/app/routes/challenges/utils.js <ide> export function createTests({ tests = [] }) { <ide> }); <ide> } <ide> <add>function logReplacer(value) { <add> if (Array.isArray(value)) { <add> const replaced = value.map(logReplacer); <add> return '[' + replaced.join(', ') + ']'; <add> } <add> if (typeof value === 'string' && !value.startsWith('//')) { <add> return '"' + value + '"'; <add> } <add> if (typeof value === 'number' && isNaN(value)) { <add> return value.toString(); <add> } <add> if (typeof value === 'undefined') { <add> return 'undefined'; <add> } <add> if (value === null) { <add> return 'null'; <add> } <add> if (typeof value === 'function') { <add> return value.name; <add> } <add> if (typeof value === 'object') { <add> return JSON.stringify(value, null, 2); <add> } <add> <add> return value; <add>} <add> <ide> export function loggerToStr(args) { <ide> args = Array.isArray(args) ? args : [args]; <ide> return args <del> .map(arg => typeof arg === 'undefined' ? 'undefined' : arg) <del> .map(arg => { <del> if (typeof arg !== 'string') { <del> return JSON.stringify(arg); <del> } <del> return arg; <del> }) <add> .map(logReplacer) <ide> .reduce((str, arg) => str + arg + '\n', ''); <ide> } <ide>
1
Text
Text
create card for bert-tiny fine-tuned on squad v2
dedc7a8fdbdf4b9824fa2943a43be4ca147733de
<ide><path>model_cards/mrm8488/bert-tiny-finetuned-squadv2/README.md <add>--- <add>language: english <add>thumbnail: <add>--- <add> <add># BERT-Tiny fine-tuned on SQuAD v2 <add> <add>[BERT-Tiny](https://github.com/google-research/bert/) created by [Google Research](https://github.com/google-research) and fine-tuned on [SQuAD 2.0](https://rajpurkar.github.io/SQuAD-explorer/) for **Q&A** downstream task. <add> <add>**Mode size** (after training): **16.74 MB** <add> <add>## Details of BERT-Tiny and its 'family' (from their documentation) <add> <add>Released on March 11th, 2020 <add> <add>This is model is a part of 24 smaller BERT models (English only, uncased, trained with WordPiece masking) referenced in [Well-Read Students Learn Better: On the Importance of Pre-training Compact Models](https://arxiv.org/abs/1908.08962). <add> <add>The smaller BERT models are intended for environments with restricted computational resources. They can be fine-tuned in the same manner as the original BERT models. However, they are most effective in the context of knowledge distillation, where the fine-tuning labels are produced by a larger and more accurate teacher. <add> <add>## Details of the downstream task (Q&A) - Dataset <add> <add>[SQuAD2.0](https://rajpurkar.github.io/SQuAD-explorer/) combines the 100,000 questions in SQuAD1.1 with over 50,000 unanswerable questions written adversarially by crowdworkers to look similar to answerable ones. To do well on SQuAD2.0, systems must not only answer questions when possible, but also determine when no answer is supported by the paragraph and abstain from answering. <add> <add>| Dataset | Split | # samples | <add>| -------- | ----- | --------- | <add>| SQuAD2.0 | train | 130k | <add>| SQuAD2.0 | eval | 12.3k | <add> <add>## Model training <add> <add>The model was trained on a Tesla P100 GPU and 25GB of RAM. <add>The script for fine tuning can be found [here](https://github.com/huggingface/transformers/blob/master/examples/run_squad.py) <add> <add>## Results: <add> <add>| Metric | # Value | <add>| ------ | --------- | <add>| **EM** | **48.60** | <add>| **F1** | **49.73** | <add> <add>## Model in action <add> <add>Fast usage with **pipelines**: <add> <add>```python <add>from transformers import pipeline <add> <add>qa_pipeline = pipeline( <add> "question-answering", <add> model="mrm8488/bert-tiny-finetuned-squadv2", <add> tokenizer="mrm8488/bert-tiny-finetuned-squadv2" <add>) <add> <add>qa_pipeline({ <add> 'context': "Manuel Romero has been working hardly in the repository hugginface/transformers lately", <add> 'question': "Who has been working hard for hugginface/transformers lately?" <add> <add>}) <add> <add># Output: <add>``` <add> <add>```json <add>{ <add> "answer": "Manuel Romero", <add> "end": 13, <add> "score": 0.05684709993458714, <add> "start": 0 <add>} <add>``` <add> <add>### Yes! That was easy 🎉 Let's try with another example <add> <add>```python <add>qa_pipeline({ <add> 'context': "Manuel Romero has been working hardly in the repository hugginface/transformers lately", <add> 'question': "For which company has worked Manuel Romero?" <add>}) <add> <add># Output: <add>``` <add> <add>```json <add>{ <add> "answer": "hugginface/transformers", <add> "end": 79, <add> "score": 0.11613431826808274, <add> "start": 56 <add>} <add>``` <add> <add>### It works!! 🎉 🎉 🎉 <add> <add>> Created by [Manuel Romero/@mrm8488](https://twitter.com/mrm8488) | [LinkedIn](https://www.linkedin.com/in/manuel-romero-cs/) <add> <add>> Made with <span style="color: #e25555;">&hearts;</span> in Spain
1
Javascript
Javascript
replace frustum vertex with vector3
d1c934903a41bd10c9bfa61dd3c1f88ac4f2d2c4
<ide><path>examples/jsm/csm/Frustum.js <ide> */ <ide> <ide> import { MathUtils, Vector3 } from '../../../build/three.module.js'; <del>import FrustumVertex from './FrustumVertex.js'; <ide> <ide> export default class Frustum { <ide> <ide> export default class Frustum { <ide> // 2 --- 1 <ide> <ide> this.vertices.near.push( <del> new FrustumVertex( this.nearPlaneX, this.nearPlaneY, - this.near ), <del> new FrustumVertex( this.nearPlaneX, - this.nearPlaneY, - this.near ), <del> new FrustumVertex( - this.nearPlaneX, - this.nearPlaneY, - this.near ), <del> new FrustumVertex( - this.nearPlaneX, this.nearPlaneY, - this.near ) <add> new Vector3( this.nearPlaneX, this.nearPlaneY, - this.near ), <add> new Vector3( this.nearPlaneX, - this.nearPlaneY, - this.near ), <add> new Vector3( - this.nearPlaneX, - this.nearPlaneY, - this.near ), <add> new Vector3( - this.nearPlaneX, this.nearPlaneY, - this.near ) <ide> ); <ide> <ide> this.vertices.far.push( <del> new FrustumVertex( this.farPlaneX, this.farPlaneY, - this.far ), <del> new FrustumVertex( this.farPlaneX, - this.farPlaneY, - this.far ), <del> new FrustumVertex( - this.farPlaneX, - this.farPlaneY, - this.far ), <del> new FrustumVertex( - this.farPlaneX, this.farPlaneY, - this.far ) <add> new Vector3( this.farPlaneX, this.farPlaneY, - this.far ), <add> new Vector3( this.farPlaneX, - this.farPlaneY, - this.far ), <add> new Vector3( - this.farPlaneX, - this.farPlaneY, - this.far ), <add> new Vector3( - this.farPlaneX, this.farPlaneY, - this.far ) <ide> ); <ide> <ide> return this.vertices; <ide> export default class Frustum { <ide> <ide> for ( let j = 0; j < 4; j ++ ) { <ide> <del> cascade.vertices.near.push( new FrustumVertex().fromLerp( this.vertices.near[ j ], this.vertices.far[ j ], breaks[ i - 1 ] ) ); <add> cascade.vertices.near.push( new Vector3().lerpVectors( this.vertices.near[ j ], this.vertices.far[ j ], breaks[ i - 1 ] ) ); <ide> <ide> } <ide> <ide> export default class Frustum { <ide> <ide> for ( let j = 0; j < 4; j ++ ) { <ide> <del> cascade.vertices.far.push( new FrustumVertex().fromLerp( this.vertices.near[ j ], this.vertices.far[ j ], breaks[ i ] ) ); <add> cascade.vertices.far.push( new Vector3().lerpVectors( this.vertices.near[ j ], this.vertices.far[ j ], breaks[ i ] ) ); <ide> <ide> } <ide> <ide> export default class Frustum { <ide> <ide> point.set( this.vertices.near[ i ].x, this.vertices.near[ i ].y, this.vertices.near[ i ].z ); <ide> point.applyMatrix4( cameraMatrix ); <del> result.vertices.near.push( new FrustumVertex( point.x, point.y, point.z ) ); <add> result.vertices.near.push( new Vector3( point.x, point.y, point.z ) ); <ide> <ide> point.set( this.vertices.far[ i ].x, this.vertices.far[ i ].y, this.vertices.far[ i ].z ); <ide> point.applyMatrix4( cameraMatrix ); <del> result.vertices.far.push( new FrustumVertex( point.x, point.y, point.z ) ); <add> result.vertices.far.push( new Vector3( point.x, point.y, point.z ) ); <ide> <ide> } <ide> <ide><path>examples/jsm/csm/FrustumVertex.js <del>/** <del> * @author vHawk / https://github.com/vHawk/ <del> */ <del> <del>export default class FrustumVertex { <del> <del> constructor( x, y, z ) { <del> <del> this.x = x || 0; <del> this.y = y || 0; <del> this.z = z || 0; <del> <del> } <del> <del> fromLerp( v1, v2, amount ) { <del> <del> this.x = ( 1 - amount ) * v1.x + amount * v2.x; <del> this.y = ( 1 - amount ) * v1.y + amount * v2.y; <del> this.z = ( 1 - amount ) * v1.z + amount * v2.z; <del> <del> return this; <del> <del> } <del> <del>}
2
Python
Python
add a predict method in tagging task
c929b07ebc0eb93885d36569e6c64d1d7baa10d4
<ide><path>official/nlp/data/tagging_data_loader.py <ide> class TaggingDataConfig(cfg.DataConfig): <ide> """Data config for tagging (tasks/tagging).""" <ide> is_training: bool = True <ide> seq_length: int = 128 <add> include_sentence_id: bool = False <ide> <ide> <ide> @data_loader_factory.register_data_loader_cls(TaggingDataConfig) <ide> class TaggingDataLoader: <ide> def __init__(self, params: TaggingDataConfig): <ide> self._params = params <ide> self._seq_length = params.seq_length <add> self._include_sentence_id = params.include_sentence_id <ide> <ide> def _decode(self, record: tf.Tensor): <ide> """Decodes a serialized tf.Example.""" <ide> def _decode(self, record: tf.Tensor): <ide> 'segment_ids': tf.io.FixedLenFeature([self._seq_length], tf.int64), <ide> 'label_ids': tf.io.FixedLenFeature([self._seq_length], tf.int64), <ide> } <add> if self._include_sentence_id: <add> name_to_features['sentence_id'] = tf.io.FixedLenFeature([], tf.int64) <add> <ide> example = tf.io.parse_single_example(record, name_to_features) <ide> <ide> # tf.Example only supports tf.int64, but the TPU only supports tf.int32. <ide> def _parse(self, record: Mapping[str, tf.Tensor]): <ide> 'input_mask': record['input_mask'], <ide> 'input_type_ids': record['segment_ids'] <ide> } <add> if self._include_sentence_id: <add> x['sentence_id'] = record['sentence_id'] <ide> y = record['label_ids'] <ide> return (x, y) <ide> <ide><path>official/nlp/tasks/tagging.py <del># Lint as: python3 <del># Copyright 2020 The TensorFlow Authors. All Rights Reserved. <del># <del># Licensed under the Apache License, Version 2.0 (the "License"); <del># you may not use this file except in compliance with the License. <del># You may obtain a copy of the License at <del># <del># http://www.apache.org/licenses/LICENSE-2.0 <del># <del># Unless required by applicable law or agreed to in writing, software <del># distributed under the License is distributed on an "AS IS" BASIS, <del># WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <del># See the License for the specific language governing permissions and <del># limitations under the License. <del># ============================================================================== <del>"""Tagging (e.g., NER/POS) task.""" <del>import logging <del>from typing import List, Optional <del> <del>import dataclasses <del> <del>from seqeval import metrics as seqeval_metrics <del> <del>import tensorflow as tf <del>import tensorflow_hub as hub <del> <del>from official.core import base_task <del>from official.modeling.hyperparams import base_config <del>from official.modeling.hyperparams import config_definitions as cfg <del>from official.nlp.configs import encoders <del>from official.nlp.data import data_loader_factory <del>from official.nlp.modeling import models <del>from official.nlp.tasks import utils <del> <del> <del>@dataclasses.dataclass <del>class ModelConfig(base_config.Config): <del> """A base span labeler configuration.""" <del> encoder: encoders.TransformerEncoderConfig = ( <del> encoders.TransformerEncoderConfig()) <del> head_dropout: float = 0.1 <del> head_initializer_range: float = 0.02 <del> <del> <del>@dataclasses.dataclass <del>class TaggingConfig(cfg.TaskConfig): <del> """The model config.""" <del> # At most one of `init_checkpoint` and `hub_module_url` can be specified. <del> init_checkpoint: str = '' <del> hub_module_url: str = '' <del> model: ModelConfig = ModelConfig() <del> <del> # The real class names, the order of which should match real label id. <del> # Note that a word may be tokenized into multiple word_pieces tokens, and <del> # we asssume the real label id (non-negative) is assigned to the first token <del> # of the word, and a negative label id is assigned to the remaining tokens. <del> # The negative label id will not contribute to loss and metrics. <del> class_names: Optional[List[str]] = None <del> train_data: cfg.DataConfig = cfg.DataConfig() <del> validation_data: cfg.DataConfig = cfg.DataConfig() <del> <del> <del>def _masked_labels_and_weights(y_true): <del> """Masks negative values from token level labels. <del> <del> Args: <del> y_true: Token labels, typically shape (batch_size, seq_len), where tokens <del> with negative labels should be ignored during loss/accuracy calculation. <del> <del> Returns: <del> (masked_y_true, masked_weights) where `masked_y_true` is the input <del> with each negative label replaced with zero and `masked_weights` is 0.0 <del> where negative labels were replaced and 1.0 for original labels. <del> """ <del> # Ignore the classes of tokens with negative values. <del> mask = tf.greater_equal(y_true, 0) <del> # Replace negative labels, which are out of bounds for some loss functions, <del> # with zero. <del> masked_y_true = tf.where(mask, y_true, 0) <del> return masked_y_true, tf.cast(mask, tf.float32) <del> <del> <del>@base_task.register_task_cls(TaggingConfig) <del>class TaggingTask(base_task.Task): <del> """Task object for tagging (e.g., NER or POS).""" <del> <del> def __init__(self, params=cfg.TaskConfig, logging_dir=None): <del> super(TaggingTask, self).__init__(params, logging_dir) <del> if params.hub_module_url and params.init_checkpoint: <del> raise ValueError('At most one of `hub_module_url` and ' <del> '`init_checkpoint` can be specified.') <del> if not params.class_names: <del> raise ValueError('TaggingConfig.class_names cannot be empty.') <del> <del> if params.hub_module_url: <del> self._hub_module = hub.load(params.hub_module_url) <del> else: <del> self._hub_module = None <del> <del> def build_model(self): <del> if self._hub_module: <del> encoder_network = utils.get_encoder_from_hub(self._hub_module) <del> else: <del> encoder_network = encoders.instantiate_encoder_from_cfg( <del> self.task_config.model.encoder) <del> <del> return models.BertTokenClassifier( <del> network=encoder_network, <del> num_classes=len(self.task_config.class_names), <del> initializer=tf.keras.initializers.TruncatedNormal( <del> stddev=self.task_config.model.head_initializer_range), <del> dropout_rate=self.task_config.model.head_dropout, <del> output='logits') <del> <del> def build_losses(self, labels, model_outputs, aux_losses=None) -> tf.Tensor: <del> model_outputs = tf.cast(model_outputs, tf.float32) <del> masked_labels, masked_weights = _masked_labels_and_weights(labels) <del> loss = tf.keras.losses.sparse_categorical_crossentropy( <del> masked_labels, model_outputs, from_logits=True) <del> numerator_loss = tf.reduce_sum(loss * masked_weights) <del> denominator_loss = tf.reduce_sum(masked_weights) <del> loss = tf.math.divide_no_nan(numerator_loss, denominator_loss) <del> return loss <del> <del> def build_inputs(self, params, input_context=None): <del> """Returns tf.data.Dataset for sentence_prediction task.""" <del> if params.input_path == 'dummy': <del> <del> def dummy_data(_): <del> dummy_ids = tf.zeros((1, params.seq_length), dtype=tf.int32) <del> x = dict( <del> input_word_ids=dummy_ids, <del> input_mask=dummy_ids, <del> input_type_ids=dummy_ids) <del> <del> # Include some label_id as -1, which will be ignored in loss/metrics. <del> y = tf.random.uniform( <del> shape=(1, params.seq_length), <del> minval=-1, <del> maxval=len(self.task_config.class_names), <del> dtype=tf.dtypes.int32) <del> return (x, y) <del> <del> dataset = tf.data.Dataset.range(1) <del> dataset = dataset.repeat() <del> dataset = dataset.map( <del> dummy_data, num_parallel_calls=tf.data.experimental.AUTOTUNE) <del> return dataset <del> <del> return data_loader_factory.get_data_loader(params).load(input_context) <del> <del> def validation_step(self, inputs, model: tf.keras.Model, metrics=None): <del> """Validatation step. <del> <del> Args: <del> inputs: a dictionary of input tensors. <del> model: the keras.Model. <del> metrics: a nested structure of metrics objects. <del> <del> Returns: <del> A dictionary of logs. <del> """ <del> features, labels = inputs <del> outputs = self.inference_step(features, model) <del> loss = self.build_losses(labels=labels, model_outputs=outputs) <del> <del> # Negative label ids are padding labels which should be ignored. <del> real_label_index = tf.where(tf.greater_equal(labels, 0)) <del> predict_ids = tf.math.argmax(outputs, axis=-1) <del> predict_ids = tf.gather_nd(predict_ids, real_label_index) <del> label_ids = tf.gather_nd(labels, real_label_index) <del> return { <del> self.loss: loss, <del> 'predict_ids': predict_ids, <del> 'label_ids': label_ids, <del> } <del> <del> def aggregate_logs(self, state=None, step_outputs=None): <del> """Aggregates over logs returned from a validation step.""" <del> if state is None: <del> state = {'predict_class': [], 'label_class': []} <del> <del> def id_to_class_name(batched_ids): <del> class_names = [] <del> for per_example_ids in batched_ids: <del> class_names.append([]) <del> for per_token_id in per_example_ids.numpy().tolist(): <del> class_names[-1].append(self.task_config.class_names[per_token_id]) <del> <del> return class_names <del> <del> # Convert id to class names, because `seqeval_metrics` relies on the class <del> # name to decide IOB tags. <del> state['predict_class'].extend(id_to_class_name(step_outputs['predict_ids'])) <del> state['label_class'].extend(id_to_class_name(step_outputs['label_ids'])) <del> return state <del> <del> def reduce_aggregated_logs(self, aggregated_logs): <del> """Reduces aggregated logs over validation steps.""" <del> label_class = aggregated_logs['label_class'] <del> predict_class = aggregated_logs['predict_class'] <del> return { <del> 'f1': <del> seqeval_metrics.f1_score(label_class, predict_class), <del> 'precision': <del> seqeval_metrics.precision_score(label_class, predict_class), <del> 'recall': <del> seqeval_metrics.recall_score(label_class, predict_class), <del> 'accuracy': <del> seqeval_metrics.accuracy_score(label_class, predict_class), <del> } <del> <del> def initialize(self, model): <del> """Load a pretrained checkpoint (if exists) and then train from iter 0.""" <del> ckpt_dir_or_file = self.task_config.init_checkpoint <del> if tf.io.gfile.isdir(ckpt_dir_or_file): <del> ckpt_dir_or_file = tf.train.latest_checkpoint(ckpt_dir_or_file) <del> if not ckpt_dir_or_file: <del> return <del> <del> ckpt = tf.train.Checkpoint(**model.checkpoint_items) <del> status = ckpt.restore(ckpt_dir_or_file) <del> status.expect_partial().assert_existing_objects_matched() <del> logging.info('Finished loading pretrained checkpoint from %s', <del> ckpt_dir_or_file) <ide><path>official/nlp/tasks/tagging_test.py <del># Lint as: python3 <del># Copyright 2020 The TensorFlow Authors. All Rights Reserved. <del># <del># Licensed under the Apache License, Version 2.0 (the "License"); <del># you may not use this file except in compliance with the License. <del># You may obtain a copy of the License at <del># <del># http://www.apache.org/licenses/LICENSE-2.0 <del># <del># Unless required by applicable law or agreed to in writing, software <del># distributed under the License is distributed on an "AS IS" BASIS, <del># WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <del># See the License for the specific language governing permissions and <del># limitations under the License. <del># ============================================================================== <del>"""Tests for official.nlp.tasks.tagging.""" <del>import functools <del>import os <del>import tensorflow as tf <del> <del>from official.nlp.bert import configs <del>from official.nlp.bert import export_tfhub <del>from official.nlp.configs import encoders <del>from official.nlp.data import tagging_data_loader <del>from official.nlp.tasks import tagging <del> <del> <del>class TaggingTest(tf.test.TestCase): <del> <del> def setUp(self): <del> super(TaggingTest, self).setUp() <del> self._encoder_config = encoders.TransformerEncoderConfig( <del> vocab_size=30522, num_layers=1) <del> self._train_data_config = tagging_data_loader.TaggingDataConfig( <del> input_path="dummy", seq_length=128, global_batch_size=1) <del> <del> def _run_task(self, config): <del> task = tagging.TaggingTask(config) <del> model = task.build_model() <del> metrics = task.build_metrics() <del> <del> strategy = tf.distribute.get_strategy() <del> dataset = strategy.experimental_distribute_datasets_from_function( <del> functools.partial(task.build_inputs, config.train_data)) <del> <del> iterator = iter(dataset) <del> optimizer = tf.keras.optimizers.SGD(lr=0.1) <del> task.train_step(next(iterator), model, optimizer, metrics=metrics) <del> task.validation_step(next(iterator), model, metrics=metrics) <del> <del> def test_task(self): <del> # Saves a checkpoint. <del> encoder = encoders.instantiate_encoder_from_cfg(self._encoder_config) <del> ckpt = tf.train.Checkpoint(encoder=encoder) <del> saved_path = ckpt.save(self.get_temp_dir()) <del> <del> config = tagging.TaggingConfig( <del> init_checkpoint=saved_path, <del> model=tagging.ModelConfig(encoder=self._encoder_config), <del> train_data=self._train_data_config, <del> class_names=["O", "B-PER", "I-PER"]) <del> task = tagging.TaggingTask(config) <del> model = task.build_model() <del> metrics = task.build_metrics() <del> dataset = task.build_inputs(config.train_data) <del> <del> iterator = iter(dataset) <del> optimizer = tf.keras.optimizers.SGD(lr=0.1) <del> task.train_step(next(iterator), model, optimizer, metrics=metrics) <del> task.validation_step(next(iterator), model, metrics=metrics) <del> task.initialize(model) <del> <del> def test_task_with_fit(self): <del> config = tagging.TaggingConfig( <del> model=tagging.ModelConfig(encoder=self._encoder_config), <del> train_data=self._train_data_config, <del> class_names=["O", "B-PER", "I-PER"]) <del> <del> task = tagging.TaggingTask(config) <del> model = task.build_model() <del> model = task.compile_model( <del> model, <del> optimizer=tf.keras.optimizers.SGD(lr=0.1), <del> train_step=task.train_step, <del> metrics=[tf.keras.metrics.SparseCategoricalAccuracy(name="accuracy")]) <del> dataset = task.build_inputs(config.train_data) <del> logs = model.fit(dataset, epochs=1, steps_per_epoch=2) <del> self.assertIn("loss", logs.history) <del> self.assertIn("accuracy", logs.history) <del> <del> def _export_bert_tfhub(self): <del> bert_config = configs.BertConfig( <del> vocab_size=30522, <del> hidden_size=16, <del> intermediate_size=32, <del> max_position_embeddings=128, <del> num_attention_heads=2, <del> num_hidden_layers=1) <del> _, encoder = export_tfhub.create_bert_model(bert_config) <del> model_checkpoint_dir = os.path.join(self.get_temp_dir(), "checkpoint") <del> checkpoint = tf.train.Checkpoint(model=encoder) <del> checkpoint.save(os.path.join(model_checkpoint_dir, "test")) <del> model_checkpoint_path = tf.train.latest_checkpoint(model_checkpoint_dir) <del> <del> vocab_file = os.path.join(self.get_temp_dir(), "uncased_vocab.txt") <del> with tf.io.gfile.GFile(vocab_file, "w") as f: <del> f.write("dummy content") <del> <del> hub_destination = os.path.join(self.get_temp_dir(), "hub") <del> export_tfhub.export_bert_tfhub(bert_config, model_checkpoint_path, <del> hub_destination, vocab_file) <del> return hub_destination <del> <del> def test_task_with_hub(self): <del> hub_module_url = self._export_bert_tfhub() <del> config = tagging.TaggingConfig( <del> hub_module_url=hub_module_url, <del> class_names=["O", "B-PER", "I-PER"], <del> train_data=self._train_data_config) <del> self._run_task(config) <del> <del> def test_seqeval_metrics(self): <del> config = tagging.TaggingConfig( <del> model=tagging.ModelConfig(encoder=self._encoder_config), <del> train_data=self._train_data_config, <del> class_names=["O", "B-PER", "I-PER"]) <del> task = tagging.TaggingTask(config) <del> model = task.build_model() <del> dataset = task.build_inputs(config.train_data) <del> <del> iterator = iter(dataset) <del> strategy = tf.distribute.get_strategy() <del> distributed_outputs = strategy.run( <del> functools.partial(task.validation_step, model=model), <del> args=(next(iterator),)) <del> outputs = tf.nest.map_structure(strategy.experimental_local_results, <del> distributed_outputs) <del> aggregated = task.aggregate_logs(step_outputs=outputs) <del> aggregated = task.aggregate_logs(state=aggregated, step_outputs=outputs) <del> self.assertCountEqual({"f1", "precision", "recall", "accuracy"}, <del> task.reduce_aggregated_logs(aggregated).keys()) <del> <del> <del>if __name__ == "__main__": <del> tf.test.main()
3
Javascript
Javascript
improve grammar and clarity
e79a20e1ca2e725100acedc0ba5ac014fea0f412
<ide><path>src/ng/directive/booleanAttrs.js <ide> * </div> <ide> * </pre> <ide> * <del> * The HTML specs do not require browsers to preserve the values of special attributes <del> * such as disabled. (The presence of them means true and absence means false) <del> * This prevents the Angular compiler from correctly retrieving the binding expression. <del> * To solve this problem, we introduce the `ngDisabled` directive. <add> * The HTML specification does not require browsers to preserve the values of boolean attributes <add> * such as disabled. (Their presence means true and their absence means false.) <add> * This prevents the Angular compiler from retrieving the binding expression. <add> * The `ngDisabled` directive solves this problem for the `disabled` attribute. <ide> * <ide> * @example <ide> <doc:example> <ide> * @restrict A <ide> * <ide> * @description <del> * The HTML specs do not require browsers to preserve the special attributes such as checked. <del> * (The presence of them means true and absence means false) <del> * This prevents the angular compiler from correctly retrieving the binding expression. <del> * To solve this problem, we introduce the `ngChecked` directive. <add> * The HTML specification does not require browsers to preserve the values of boolean attributes <add> * such as checked. (Their presence means true and their absence means false.) <add> * This prevents the Angular compiler from retrieving the binding expression. <add> * The `ngChecked` directive solves this problem for the `checked` attribute. <ide> * @example <ide> <doc:example> <ide> <doc:source> <ide> * @restrict A <ide> * <ide> * @description <del> * The HTML specs do not require browsers to preserve the special attributes such as readonly. <del> * (The presence of them means true and absence means false) <del> * This prevents the angular compiler from correctly retrieving the binding expression. <del> * To solve this problem, we introduce the `ngReadonly` directive. <add> * The HTML specification does not require browsers to preserve the values of boolean attributes <add> * such as readonly. (Their presence means true and their absence means false.) <add> * This prevents the Angular compiler from retrieving the binding expression. <add> * The `ngReadonly` directive solves this problem for the `readonly` attribute. <ide> * @example <ide> <doc:example> <ide> <doc:source> <ide> * @restrict A <ide> * <ide> * @description <del> * The HTML specs do not require browsers to preserve the special attributes such as selected. <del> * (The presence of them means true and absence means false) <del> * This prevents the angular compiler from correctly retrieving the binding expression. <del> * To solve this problem, we introduced the `ngSelected` directive. <add> * The HTML specification does not require browsers to preserve the values of boolean attributes <add> * such as selected. (Their presence means true and their absence means false.) <add> * This prevents the Angular compiler from retrieving the binding expression. <add> * The `ngSelected` directive solves this problem for the `selected` atttribute. <ide> * @example <ide> <doc:example> <ide> <doc:source> <ide> * @restrict A <ide> * <ide> * @description <del> * The HTML specs do not require browsers to preserve the special attributes such as open. <del> * (The presence of them means true and absence means false) <del> * This prevents the angular compiler from correctly retrieving the binding expression. <del> * To solve this problem, we introduce the `ngOpen` directive. <add> * The HTML specification does not require browsers to preserve the values of boolean attributes <add> * such as open. (Their presence means true and their absence means false.) <add> * This prevents the Angular compiler from retrieving the binding expression. <add> * The `ngOpen` directive solves this problem for the `open` attribute. <ide> * <ide> * @example <ide> <doc:example>
1
PHP
PHP
add option for bc
b44ad4df64620b042b83f51ff34f10222e923e13
<ide><path>src/Illuminate/Queue/Console/WorkCommand.php <ide> protected function getOptions() <ide> return [ <ide> ['queue', null, InputOption::VALUE_OPTIONAL, 'The queue to listen on'], <ide> <add> ['daemon', null, InputOption::VALUE_NONE, 'Run the worker in daemon mode (Deprecated)'], <add> <ide> ['once', null, InputOption::VALUE_NONE, 'Only process the next job on the queue'], <ide> <ide> ['delay', null, InputOption::VALUE_OPTIONAL, 'Amount of time to delay failed jobs', 0],
1
Javascript
Javascript
remove unused meta methods
e5f9748cc9598854395f967858af5ef379b0cc8b
<ide><path>packages/ember-metal/lib/meta.js <ide> export class Meta { <ide> return this._findInherited('_watching', subkey); <ide> } <ide> <del> forEachWatching(fn) { <del> let pointer = this; <del> let seen; <del> while (pointer !== undefined) { <del> let map = pointer._watching; <del> if (map !== undefined) { <del> for (let key in map) { <del> seen = seen || Object.create(null); <del> if (seen[key] === undefined) { <del> seen[key] = true; <del> fn(key, map[key]); <del> } <del> } <del> } <del> pointer = pointer.parent; <del> } <del> } <del> <del> clearWatching() { <del> assert(`Cannot clear watchers on \`${toString(this.source)}\` after it has been destroyed.`, !this.isMetaDestroyed()); <del> <del> this._watching = undefined; <del> } <del> <del> deleteFromWatching(subkey) { <del> delete this._getOrCreateOwnMap('_watching')[subkey]; <del> } <del> <del> hasInWatching(subkey) { <del> return this._findInherited('_watching', subkey) !== undefined; <del> } <del> <ide> writeMixins(subkey, value) { <ide> assert(`Cannot add mixins for \`${subkey}\` on \`${toString(this.source)}\` call writeMixins after it has been destroyed.`, !this.isMetaDestroyed()); <ide> let map = this._getOrCreateOwnMap('_mixins'); <ide> export class Meta { <ide> } <ide> } <ide> <del> clearMixins() { <del> assert(`Cannot clear mixins on \`${toString(this.source)}\` after it has been destroyed.`, !this.isMetaDestroyed()); <del> <del> this._mixins = undefined; <del> } <del> <del> deleteFromMixins(subkey) { <del> delete this._getOrCreateOwnMap('_mixins')[subkey]; <del> } <del> <del> hasInMixins(subkey) { <del> return this._findInherited('_mixins', subkey) !== undefined; <del> } <del> <ide> writeBindings(subkey, value) { <ide> assert(`Cannot add a binding for \`${subkey}\` on \`${toString(this.source)}\` after it has been destroyed.`, !this.isMetaDestroyed()); <ide> <ide> export class Meta { <ide> this._bindings = undefined; <ide> } <ide> <del> deleteFromBindings(subkey) { <del> delete this._getOrCreateOwnMap('_bindings')[subkey]; <del> } <del> <del> hasInBindings(subkey) { <del> return this._findInherited('_bindings', subkey) !== undefined; <del> } <del> <ide> writeValues(subkey, value) { <ide> assert(`Cannot set the value of \`${subkey}\` on \`${toString(this.source)}\` after it has been destroyed.`, !this.isMetaDestroyed()); <ide> <ide> export class Meta { <ide> return this._findInherited('_values', subkey); <ide> } <ide> <del> forEachValues(fn) { <del> let pointer = this; <del> let seen; <del> while (pointer !== undefined) { <del> let map = pointer._values; <del> if (map !== undefined) { <del> for (let key in map) { <del> seen = seen || Object.create(null); <del> if (seen[key] === undefined) { <del> seen[key] = true; <del> fn(key, map[key]); <del> } <del> } <del> } <del> pointer = pointer.parent; <del> } <del> } <del> <del> clearValues() { <del> assert(`Cannot call clearValues after the object is destroyed.`, !this.isMetaDestroyed()); <del> <del> this._values = undefined; <del> } <del> <ide> deleteFromValues(subkey) { <ide> delete this._getOrCreateOwnMap('_values')[subkey]; <ide> } <del> <del> hasInValues(subkey) { <del> return this._findInherited('_values', subkey) !== undefined; <del> } <del> <ide> } <ide> <ide> if (EMBER_GLIMMER_DETECT_BACKTRACKING_RERENDER || EMBER_GLIMMER_ALLOW_BACKTRACKING_RERENDER) { <ide><path>packages/ember-metal/tests/accessors/mandatory_setters_test.js <ide> function hasMandatorySetter(object, property) { <ide> } <ide> <ide> function hasMetaValue(object, property) { <del> return metaFor(object).hasInValues(property); <add> return metaFor(object).peekValues(property) !== undefined; <ide> } <ide> <ide> if (MANDATORY_SETTER) { <ide><path>packages/ember-metal/tests/meta_test.js <ide> QUnit.test('meta.writeWatching issues useful error after destroy', function(asse <ide> }, 'Cannot update watchers for `hello` on `<special-sauce:123>` after it has been destroyed.'); <ide> }); <ide> <del>QUnit.test('meta.clearWatching issues useful error after destroy', function(assert) { <del> let target = { <del> toString() { return '<special-sauce:123>'; } <del> }; <del> let targetMeta = meta(target); <del> <del> targetMeta.destroy(); <del> <del> expectAssertion(() => { <del> targetMeta.clearWatching(); <del> }, 'Cannot clear watchers on `<special-sauce:123>` after it has been destroyed.'); <del>}); <ide> QUnit.test('meta.writableTag issues useful error after destroy', function(assert) { <ide> let target = { <ide> toString() { return '<special-sauce:123>'; }
3
Ruby
Ruby
remove deprecation notices
1012c3e9699471248f8554d4d5bf18e7d194ac2b
<ide><path>activesupport/lib/active_support/callbacks.rb <ide> def initialize(name, filter, kind, options, chain_config) <ide> @key = compute_identifier filter <ide> @if = Array(options[:if]) <ide> @unless = Array(options[:unless]) <del> <del> deprecate_per_key_option(options) <ide> end <ide> <ide> def filter; @key; end <ide> def raw_filter; @filter; end <ide> <del> def deprecate_per_key_option(options) <del> if options[:per_key] <del> raise NotImplementedError, ":per_key option is no longer supported. Use generic :if and :unless options instead." <del> end <del> end <del> <ide> def merge(chain, new_options) <ide> _options = { <ide> :if => @if.dup, <ide> :unless => @unless.dup <ide> } <ide> <del> deprecate_per_key_option new_options <del> <ide> _options[:if].concat Array(new_options.fetch(:unless, [])) <ide> _options[:unless].concat Array(new_options.fetch(:if, [])) <ide> <ide><path>activesupport/test/callbacks_test.rb <ide> def test_save <ide> end <ide> end <ide> <del> class PerKeyOptionDeprecationTest < ActiveSupport::TestCase <del> <del> def test_per_key_option_deprecation <del> assert_raise NotImplementedError do <del> Phone.class_eval do <del> set_callback :save, :before, :before_save1, :per_key => {:if => "true"} <del> end <del> end <del> assert_raise NotImplementedError do <del> Phone.class_eval do <del> skip_callback :save, :before, :before_save1, :per_key => {:if => "true"} <del> end <del> end <del> end <del> end <del> <ide> class ExcludingDuplicatesCallbackTest < ActiveSupport::TestCase <ide> def test_excludes_duplicates_in_separate_calls <ide> model = DuplicatingCallbacks.new
2
Python
Python
fix flaky ci
9c0afdaf7b091c341072b432ad6ee17ba7a5016b
<ide><path>tests/test_generation_utils.py <ide> def _get_warper_and_kwargs(num_beams): <ide> warp_kwargs = {"top_k": 10, "top_p": 0.7, "temperature": 0.7} <ide> logits_warper = LogitsProcessorList( <ide> [ <add> TemperatureLogitsWarper(warp_kwargs["temperature"]), <ide> TopKLogitsWarper(top_k=warp_kwargs["top_k"], min_tokens_to_keep=(2 if num_beams > 1 else 1)), <ide> TopPLogitsWarper(top_p=warp_kwargs["top_p"], min_tokens_to_keep=(2 if num_beams > 1 else 1)), <del> TemperatureLogitsWarper(warp_kwargs["temperature"]), <ide> ] <ide> ) <ide> return warp_kwargs, logits_warper
1
Text
Text
fix inaccuracy in faq
ecdce975d375c25a1738e86ce727eacf83b4090a
<ide><path>docs/templates/faq.md <ide> Similarly, you could build a Theano and TensorFlow function directly. <ide> <ide> You can do batch training using `model.train_on_batch(X, y)` and `model.test_on_batch(X, y)`. See the [models documentation](models.md). <ide> <del>Alternatively, you can write a generator that yields batches of training data and use the method `model.fit_generator(data_generator, batch_size)`. <add>Alternatively, you can write a generator that yields batches of training data and use the method `model.fit_generator(data_generator, samples_per_epoch, nb_epoch)`. <ide> <ide> You can see batch training in action in our [CIFAR10 example](https://github.com/fchollet/keras/blob/master/examples/cifar10_cnn.py). <ide>
1
Ruby
Ruby
fix rubocop warnings
1f2abbdd6e960399b50f35e3e34261d13b9cf893
<ide><path>Library/Homebrew/utils/hash.rb <ide> def deep_merge_hashes(hash1, hash2) <del> merger = proc do |key, v1, v2| <del> if Hash === v1 && Hash === v2 <add> merger = proc do |_key, v1, v2| <add> if v1.is_a?(Hash) && v2.is_a?(Hash) <ide> v1.merge v2, &merger <ide> else <ide> v2
1
Text
Text
fix execution path for pplm example
c016dbdbdaf79339ae6d275d4651dc9f380be055
<ide><path>examples/research_projects/pplm/README.md <ide> Please check out the repo under uber-research for more information: https://gith <ide> git clone https://github.com/huggingface/transformers && cd transformers <ide> pip install . <ide> pip install nltk torchtext # additional requirements. <del>cd examples/text-generation/pplm <add>cd examples/research_projects/pplm <ide> ``` <ide> <ide> ## PPLM-BoW
1
Python
Python
add heartbeat to triggererjob
9c8f7ac6236bdddd979bb6242b6c63003fae8490
<ide><path>airflow/jobs/triggerer_job.py <ide> def is_needed(cls, session) -> bool: <ide> """ <ide> return session.query(func.count(Trigger.id)).scalar() > 0 <ide> <add> def on_kill(self): <add> """ <add> Called when there is an external kill command (via the heartbeat <add> mechanism, for example) <add> """ <add> self.runner.stop = True <add> <ide> def _exit_gracefully(self, signum, frame) -> None: # pylint: disable=unused-argument <ide> """Helper method to clean up processor_agent to avoid leaving orphan processes.""" <ide> # The first time, try to exit nicely <ide> def _run_trigger_loop(self) -> None: <ide> self.handle_events() <ide> # Handle failed triggers <ide> self.handle_failed_triggers() <add> # Handle heartbeat <add> self.heartbeat(only_if_necessary=True) <ide> # Idle sleep <ide> time.sleep(1) <ide>
1
Javascript
Javascript
remove socket interface from dependencies command
a35ef6c745cbd9dbf02c3cd7c786bc2444b54e96
<ide><path>local-cli/dependencies/dependencies.js <ide> function _dependencies(argv, config, resolve, reject, packagerInstance) { <ide> ? fs.createWriteStream(args.output) <ide> : process.stdout; <ide> <del> if (packagerInstance) { <del> resolve(packagerInstance.getOrderedDependencyPaths(options).then( <del> deps => { <del> return _dependenciesHandler( <del> deps, <del> packageOpts.projectRoots, <del> outStream, <del> writeToFile <del> ); <del> } <del> )); <del> } else { <del> resolve(ReactPackager.createClientFor(packageOpts).then(client => { <del> return client.getOrderedDependencyPaths(options) <del> .then(deps => { <del> client.close(); <del> return _dependenciesHandler( <del> deps, <del> packageOpts.projectRoots, <del> outStream, <del> writeToFile <del> ); <del> }); <del> })); <del> } <del>} <add> resolve((packagerInstance ? <add> packagerInstance.getOrderedDependencyPaths(options) : <add> ReactPackager.getOrderedDependencyPaths(packageOpts, options)).then( <add> deps => { <add> deps.forEach(modulePath => { <add> // Temporary hack to disable listing dependencies not under this directory. <add> // Long term, we need either <add> // (a) JS code to not depend on anything outside this directory, or <add> // (b) Come up with a way to declare this dependency in Buck. <add> const isInsideProjectRoots = packageOpts.projectRoots.filter( <add> root => modulePath.startsWith(root) <add> ).length > 0; <ide> <del>function _dependenciesHandler(deps, projectRoots, outStream, writeToFile) { <del> deps.forEach(modulePath => { <del> // Temporary hack to disable listing dependencies not under this directory. <del> // Long term, we need either <del> // (a) JS code to not depend on anything outside this directory, or <del> // (b) Come up with a way to declare this dependency in Buck. <del> const isInsideProjectRoots = projectRoots.filter( <del> root => modulePath.startsWith(root) <del> ).length > 0; <del> <del> if (isInsideProjectRoots) { <del> outStream.write(modulePath + '\n'); <add> if (isInsideProjectRoots) { <add> outStream.write(modulePath + '\n'); <add> } <add> }); <add> return writeToFile <add> ? Promise.denodeify(outStream.end).bind(outStream)() <add> : Promise.resolve(); <ide> } <del> }); <del> return writeToFile <del> ? Promise.denodeify(outStream.end).bind(outStream)() <del> : Promise.resolve(); <add> )); <ide> } <ide> <ide> module.exports = dependencies; <ide><path>packager/react-packager/index.js <ide> exports.getDependencies = function(options, bundleOptions) { <ide> }); <ide> }; <ide> <add>exports.getOrderedDependencyPaths = function(options, bundleOptions) { <add> var server = createNonPersistentServer(options); <add> return server.getOrderedDependencyPaths(bundleOptions) <add> .then(function(paths) { <add> server.end(); <add> return paths; <add> }); <add>}; <add> <ide> exports.createClientFor = function(options) { <ide> if (options.verbose) { <ide> enableDebug();
2
Javascript
Javascript
remove unneeded common.indirectinstanceof()
25713861c074893a4a3855ec1aa63fe1725238c8
<ide><path>test/common.js <ide> exports.hasIPv6 = Object.keys(ifaces).some(function(name) { <ide> }); <ide> }); <ide> <del>function protoCtrChain(o) { <del> var result = []; <del> for (; o; o = Object.getPrototypeOf(o)) { result.push(o.constructor); } <del> return result.join(); <del>} <del> <del>exports.indirectInstanceOf = function(obj, cls) { <del> if (obj instanceof cls) { return true; } <del> var clsChain = protoCtrChain(cls.prototype); <del> var objChain = protoCtrChain(obj); <del> return objChain.slice(-clsChain.length) === clsChain; <del>}; <del> <ide> <ide> exports.ddCommand = function(filename, kilobytes) { <ide> if (exports.isWindows) { <ide><path>test/parallel/test-assert.js <ide> 'use strict'; <del>var common = require('../common'); <add>require('../common'); <ide> var assert = require('assert'); <ide> var a = require('assert'); <ide> <ide> function makeBlock(f) { <ide> }; <ide> } <ide> <del>assert.ok(common.indirectInstanceOf(a.AssertionError.prototype, Error), <add>assert.ok(a.AssertionError.prototype instanceof Error, <ide> 'a.AssertionError instanceof Error'); <ide> <ide> assert.throws(makeBlock(a, false), a.AssertionError, 'ok(false)'); <ide><path>test/sequential/test-module-loading.js <ide> 'use strict'; <del>var common = require('../common'); <add>require('../common'); <ide> var assert = require('assert'); <ide> var path = require('path'); <ide> var fs = require('fs'); <ide> var d4 = require('../fixtures/b/d'); <ide> <ide> assert.equal(false, false, 'testing the test program.'); <ide> <del>assert.equal(true, common.indirectInstanceOf(a.A, Function)); <add>assert.ok(a.A instanceof Function); <ide> assert.equal('A', a.A()); <ide> <del>assert.equal(true, common.indirectInstanceOf(a.C, Function)); <add>assert.ok(a.C instanceof Function); <ide> assert.equal('C', a.C()); <ide> <del>assert.equal(true, common.indirectInstanceOf(a.D, Function)); <add>assert.ok(a.D instanceof Function); <ide> assert.equal('D', a.D()); <ide> <del>assert.equal(true, common.indirectInstanceOf(d.D, Function)); <add>assert.ok(d.D instanceof Function); <ide> assert.equal('D', d.D()); <ide> <del>assert.equal(true, common.indirectInstanceOf(d2.D, Function)); <add>assert.ok(d2.D instanceof Function); <ide> assert.equal('D', d2.D()); <ide> <del>assert.equal(true, common.indirectInstanceOf(d3.D, Function)); <add>assert.ok(d3.D instanceof Function); <ide> assert.equal('D', d3.D()); <ide> <del>assert.equal(true, common.indirectInstanceOf(d4.D, Function)); <add>assert.ok(d4.D instanceof Function); <ide> assert.equal('D', d4.D()); <ide> <ide> assert.ok((new a.SomeClass()) instanceof c.SomeClass); <ide> require('../fixtures/node_modules/foo'); <ide> console.error('test name clashes'); <ide> // this one exists and should import the local module <ide> var my_path = require('../fixtures/path'); <del>assert.ok(common.indirectInstanceOf(my_path.path_func, Function)); <add>assert.ok(my_path.path_func instanceof Function); <ide> // this one does not exist and should throw <ide> assert.throws(function() { require('./utils'); }); <ide> <ide> assert.throws(function() { <ide> }, 'missing path'); <ide> <ide> process.on('exit', function() { <del> assert.ok(common.indirectInstanceOf(a.A, Function)); <add> assert.ok(a.A instanceof Function); <ide> assert.equal('A done', a.A()); <ide> <del> assert.ok(common.indirectInstanceOf(a.C, Function)); <add> assert.ok(a.C instanceof Function); <ide> assert.equal('C done', a.C()); <ide> <del> assert.ok(common.indirectInstanceOf(a.D, Function)); <add> assert.ok(a.D instanceof Function); <ide> assert.equal('D done', a.D()); <ide> <del> assert.ok(common.indirectInstanceOf(d.D, Function)); <add> assert.ok(d.D instanceof Function); <ide> assert.equal('D done', d.D()); <ide> <del> assert.ok(common.indirectInstanceOf(d2.D, Function)); <add> assert.ok(d2.D instanceof Function); <ide> assert.equal('D done', d2.D()); <ide> <ide> assert.equal(true, errorThrown);
3
Python
Python
add deprecation notice for subdagoperator
b311bc0237b28c6d23f54137ed46f46e7fa5893f
<ide><path>airflow/operators/subdag.py <ide> # KIND, either express or implied. See the License for the <ide> # specific language governing permissions and limitations <ide> # under the License. <del>"""The module which provides a way to nest your DAGs and so your levels of complexity.""" <add>""" <add>This module is deprecated. Please use :mod:`airflow.utils.task_group`. <add>The module which provides a way to nest your DAGs and so your levels of complexity. <add>""" <add> <add>import warnings <ide> from enum import Enum <ide> from typing import Dict, Optional <ide> <ide> class SkippedStatePropagationOptions(Enum): <ide> <ide> class SubDagOperator(BaseSensorOperator): <ide> """ <add> This class is deprecated. <add> Please use `airflow.utils.task_group.TaskGroup`. <add> <ide> This runs a sub dag. By convention, a sub dag's dag_id <ide> should be prefixed by its parent and a dot. As in `parent.child`. <ide> Although SubDagOperator can occupy a pool/concurrency slot, <ide> def __init__( <ide> self._validate_dag(kwargs) <ide> self._validate_pool(session) <ide> <add> warnings.warn( <add> """This class is deprecated. Please use `airflow.utils.task_group.TaskGroup`.""", <add> DeprecationWarning, <add> stacklevel=2, <add> ) <add> <ide> def _validate_dag(self, kwargs): <ide> dag = kwargs.get('dag') or DagContext.get_current_dag() <ide> <ide><path>tests/operators/test_subdag_operator.py <ide> def test_subdag_with_propagate_skipped_state( <ide> mock_skip.assert_called_once_with(context['dag_run'], context['execution_date'], [dummy_dag_task]) <ide> else: <ide> mock_skip.assert_not_called() <add> <add> def test_deprecation_warning(self): <add> dag = DAG('parent', default_args=default_args) <add> subdag = DAG('parent.test', default_args=default_args) <add> warning_message = """This class is deprecated. Please use `airflow.utils.task_group.TaskGroup`.""" <add> <add> with pytest.warns(DeprecationWarning) as warnings: <add> SubDagOperator(task_id='test', subdag=subdag, dag=dag) <add> assert warning_message == str(warnings[0].message)
2
PHP
PHP
fix coding standards
6beded1e835b7d2d5d500139bc6ce1ac28cdb84f
<ide><path>src/View/Form/EntityContext.php <ide> protected function _getValidator($entity) { <ide> $method = 'default'; <ide> if (is_string($this->_context['validator'])) { <ide> $method = $this->_context['validator']; <del> } elseif (isset($this->_context['validator'][$alias])){ <add> } elseif (isset($this->_context['validator'][$alias])) { <ide> $method = $this->_context['validator'][$alias]; <ide> } <ide> return $table->validator($method); <ide><path>tests/TestCase/View/Form/EntityContextTest.php <ide> */ <ide> namespace Cake\Test\TestCase\View\Form; <ide> <add>use Cake\Network\Request; <ide> use Cake\ORM\Entity; <ide> use Cake\ORM\Table; <ide> use Cake\ORM\TableRegistry; <del>use Cake\Network\Request; <ide> use Cake\TestSuite\TestCase; <ide> use Cake\Validation\Validator; <ide> use Cake\View\Form\EntityContext;
2
Python
Python
add new token classification model
ed302a73f4cc365db4cd29d26ca722d605bc85a1
<ide><path>pytorch_pretrained_bert/__init__.py <ide> from .tokenization import BertTokenizer, BasicTokenizer, WordpieceTokenizer <ide> from .modeling import (BertConfig, BertModel, BertForPreTraining, <ide> BertForMaskedLM, BertForNextSentencePrediction, <del> BertForSequenceClassification, BertForQuestionAnswering) <add> BertForSequenceClassification, BertForTokenClassification, <add> BertForQuestionAnswering) <ide> from .optimization import BertAdam <ide> from .file_utils import PYTORCH_PRETRAINED_BERT_CACHE
1
Javascript
Javascript
add support for test.filter.js in watchcases
4769dc6a51b82842b874899d0451b0904a7a508c
<ide><path>test/WatchTestCases.test.js <ide> describe("WatchTestCases", () => { <ide> tests: fs <ide> .readdirSync(path.join(casesPath, cat)) <ide> .filter(folder => folder.indexOf("_") < 0) <add> .filter(testName => { <add> const testDirectory = path.join(casesPath, cat, testName); <add> const filterPath = path.join(testDirectory, "test.filter.js"); <add> if (fs.existsSync(filterPath) && !require(filterPath)()) { <add> describe.skip(testName, () => it("filtered")); <add> return false; <add> } <add> return true; <add> }) <ide> .sort() <ide> }; <ide> });
1
Javascript
Javascript
remove unnecessary lines from outlineeffect
4342cf8ec12a68bdd53627731b63d11358aede72
<ide><path>examples/js/effects/OutlineEffect.js <ide> * <ide> * Reference: https://en.wikipedia.org/wiki/Cel_shading <ide> * <del> * Dependencies <del> * - THREE.ChainableEffect <del> * <ide> * // How to set default outline parameters <ide> * new THREE.OutlineEffect( renderer, { <ide> * defaultThickNess: 0.01,
1
Text
Text
revise accepting-modifications in guide
7d18e922ab093c9c85b365dbc7fd01984316abc3
<ide><path>COLLABORATOR_GUIDE.md <ide> to land but is [author ready](#author-ready-pull-requests), add the <ide> <ide> ## Accepting Modifications <ide> <del>All modifications to the Node.js code and documentation should be performed via <del>GitHub pull requests, including modifications by Collaborators and TSC members. <del>A pull request must be reviewed, and must also be tested with CI, before being <del>landed into the codebase. There may be exceptions to the latter (the changed <del>code cannot be tested with a CI or similar). If that is the case, please leave a <del>comment that explains why the PR does not require a CI run. <add>Contributors propose modifications to Node.js using GitHub pull requests. This <add>is true for all modifications including those proposed by TSC members and other <add>Collaborators. A pull request must pass code review and CI before landing into <add>the codebase. <ide> <ide> ### Code Reviews <ide>
1
Javascript
Javascript
add presentation role to text layer spans.
5231d922ec9d590f5e3eb0bbcbf1e715497b20c3
<ide><path>src/display/text_layer.js <ide> const renderTextLayer = (function renderTextLayerClosure() { <ide> textDiv.style.fontSize = `${fontHeight}px`; <ide> textDiv.style.fontFamily = style.fontFamily; <ide> <add> // Keeps screen readers from pausing on every new text span. <add> textDiv.setAttribute("role", "presentation"); <add> <ide> textDiv.textContent = geom.str; <ide> // geom.dir may be 'ttb' for vertical texts. <ide> textDiv.dir = geom.dir;
1
Javascript
Javascript
use useragent to detect ie
640043905206a080a36c0981a28aca6c42184767
<ide><path>examples/js/renderers/CSS3DRenderer.js <ide> THREE.CSS3DRenderer = function () { <ide> <ide> domElement.appendChild( cameraElement ); <ide> <del> // Should we replace to feature detection? <del> // https://github.com/Modernizr/Modernizr/blob/master/feature-detects/css/transformstylepreserve3d.js <del> // So far, we use `document.documentMode` to detect IE <del> var isFlatTransform = !! document.documentMode; <add> var isIE = /Trident/i.test( navigator.userAgent ) <ide> <ide> this.setClearColor = function () {}; <ide> <ide> THREE.CSS3DRenderer = function () { <ide> epsilon( elements[ 15 ] ) + <ide> ')'; <ide> <del> if ( ! isFlatTransform ) { <add> if ( isIE ) { <ide> <del> return 'translate(-50%,-50%)' + matrix3d; <add> return 'translate(-50%,-50%)' + <add> 'translate(' + _widthHalf + 'px,' + _heightHalf + 'px)' + <add> cameraCSSMatrix + <add> matrix3d; <ide> <ide> } <ide> <del> return 'translate(-50%,-50%)' + <del> 'translate(' + _widthHalf + 'px,' + _heightHalf + 'px)' + <del> cameraCSSMatrix + <del> matrix3d; <add> return 'translate(-50%,-50%)' + matrix3d; <ide> <ide> } <ide> <ide> THREE.CSS3DRenderer = function () { <ide> <ide> cache.objects[ object.id ] = { style: style }; <ide> <del> if ( isFlatTransform ) { <add> if ( isIE ) { <ide> <ide> cache.objects[ object.id ].distanceToCameraSquared = getDistanceToSquared( camera, object ); <ide> <ide> THREE.CSS3DRenderer = function () { <ide> var style = cameraCSSMatrix + <ide> 'translate(' + _widthHalf + 'px,' + _heightHalf + 'px)'; <ide> <del> if ( ! isFlatTransform && cache.camera.style !== style ) { <add> if ( cache.camera.style !== style && ! isIE ) { <ide> <ide> cameraElement.style.WebkitTransform = style; <ide> cameraElement.style.MozTransform = style; <ide> THREE.CSS3DRenderer = function () { <ide> <ide> renderObject( scene, camera, cameraCSSMatrix ); <ide> <del> if ( isFlatTransform ) { <add> if ( isIE ) { <ide> <ide> // IE10 and 11 does not support 'preserve-3d'. <ide> // Thus, z-order in 3D will not work.
1
Text
Text
describe tls session resumption
eaa1544d974d701c1eed7b42308ca6031e65c833
<ide><path>doc/api/tls.md <ide> To test the renegotiation limits on a server, connect to it using the OpenSSL <ide> command-line client (`openssl s_client -connect address:port`) then input <ide> `R<CR>` (i.e., the letter `R` followed by a carriage return) multiple times. <ide> <add>### Session Resumption <add> <add>Establishing a TLS session can be relatively slow. The process can be sped <add>up by saving and later reusing the session state. There are several mechanisms <add>to do so, discussed here from oldest to newest (and preferred). <add> <add>***Session Identifiers*** Servers generate a unique ID for new connections and <add>send it to the client. Clients and servers save the session state. When <add>reconnecting, clients send the ID of their saved session state and if the server <add>also has the state for that ID, it can agree to use it. Otherwise, the server <add>will create a new session. See [RFC 2246][] for more information, page 23 and <add>30. <add> <add>Resumption using session identifiers is supported by most web browsers when <add>making HTTPS requests. <add> <add>For Node.js, clients must call [`tls.TLSSocket.getSession()`][] after the <add>[`'secureConnect'`][] event to get the session data, and provide the data to the <add>`session` option of [`tls.connect()`][] to reuse the session. Servers must <add>implement handlers for the [`'newSession'`][] and [`'resumeSession'`][] events <add>to save and restore the session data using the session ID as the lookup key to <add>reuse sessions. To reuse sessions across load balancers or cluster workers, <add>servers must use a shared session cache (such as Redis) in their session <add>handlers. <add> <add>***Session Tickets*** The servers encrypt the entire session state and send it <add>to the client as a "ticket". When reconnecting, the state is sent to the server <add>in the initial connection. This mechanism avoids the need for server-side <add>session cache. If the server doesn't use the ticket, for any reason (failure <add>to decrypt it, it's too old, etc.), it will create a new session and send a new <add>ticket. See [RFC 5077][] for more information. <add> <add>Resumption using session tickets is becoming commonly supported by many web <add>browsers when making HTTPS requests. <add> <add>For Node.js, clients use the same APIs for resumption with session identifiers <add>as for resumption with session tickets. For debugging, if <add>[`tls.TLSSocket.getTLSTicket()`][] returns a value, the session data contains a <add>ticket, otherwise it contains client-side session state. <add> <add>Single process servers need no specific implementation to use session tickets. <add>To use session tickets across server restarts or load balancers, servers must <add>all have the same ticket keys. There are three 16-byte keys internally, but the <add>tls API exposes them as a single 48-byte buffer for convenience. <add> <add>Its possible to get the ticket keys by calling [`server.getTicketKeys()`][] on <add>one server instance and then distribute them, but it is more reasonable to <add>securely generate 48 bytes of secure random data and set them with the <add>`ticketKeys` option of [`tls.createServer()`][]. The keys should be regularly <add>regenerated and server's keys can be reset with <add>[`server.setTicketKeys()`][]. <add> <add>Session ticket keys are cryptographic keys, and they ***must be stored <add>securely***. With TLS 1.2 and below, if they are compromised all sessions that <add>used tickets encrypted with them can be decrypted. They should not be stored <add>on disk, and they should be regenerated regularly. <add> <add>If clients advertise support for tickets, the server will send them. The <add>server can disable tickets by supplying <add>`require('constants').SSL_OP_NO_TICKET` in `secureOptions`. <add> <add>Both session identifiers and session tickets timeout, causing the server to <add>create new sessions. The timeout can be configured with the `sessionTimeout` <add>option of [`tls.createServer()`][]. <add> <add>For all the mechanisms, when resumption fails, servers will create new sessions. <add>Since failing to resume the session does not cause TLS/HTTPS connection <add>failures, it is easy to not notice unnecessarily poor TLS performance. The <add>OpenSSL CLI can be used to verify that servers are resuming sessions. Use the <add>`-reconnect` option to `openssl s_client`, for example: <add> <add>```sh <add>$ openssl s_client -connect localhost:443 -reconnect <add>``` <add> <add>Read through the debug output. The first connection should say "New", for <add>example: <add> <add>```text <add>New, TLSv1.2, Cipher is ECDHE-RSA-AES128-GCM-SHA256 <add>``` <add> <add>Subsequent connections should say "Reused", for example: <add> <add>```text <add>Reused, TLSv1.2, Cipher is ECDHE-RSA-AES128-GCM-SHA256 <add>``` <add> <ide> ## Modifying the Default TLS Cipher suite <ide> <ide> Node.js is built with a default suite of enabled and disabled TLS ciphers. <ide> HIGH: <ide> !CAMELLIA <ide> ``` <ide> <del>This default can be replaced entirely using the [`--tls-cipher-list`][] command line <del>switch (directly, or via the [`NODE_OPTIONS`][] environment variable). For <del>instance, the following makes `ECDHE-RSA-AES128-GCM-SHA256:!RC4` the default <del>TLS cipher suite: <add>This default can be replaced entirely using the [`--tls-cipher-list`][] command <add>line switch (directly, or via the [`NODE_OPTIONS`][] environment variable). For <add>instance, the following makes `ECDHE-RSA-AES128-GCM-SHA256:!RC4` the default TLS <add>cipher suite: <ide> <ide> ```sh <ide> node --tls-cipher-list="ECDHE-RSA-AES128-GCM-SHA256:!RC4" server.js <ide> added: v0.9.2 <ide> --> <ide> <ide> The `'newSession'` event is emitted upon creation of a new TLS session. This may <del>be used to store sessions in external storage. The listener callback is passed <del>three arguments when called: <add>be used to store sessions in external storage. The data should be provided to <add>the [`'resumeSession'`][] callback. <add> <add>The listener callback is passed three arguments when called: <ide> <del>* `sessionId` - The TLS session identifier <del>* `sessionData` - The TLS session data <add>* `sessionId` {Buffer} The TLS session identifier <add>* `sessionData` {Buffer} The TLS session data <ide> * `callback` {Function} A callback function taking no arguments that must be <ide> invoked in order for data to be sent or received over the secure connection. <ide> <ide> The `'resumeSession'` event is emitted when the client requests to resume a <ide> previous TLS session. The listener callback is passed two arguments when <ide> called: <ide> <del>* `sessionId` - The TLS/SSL session identifier <add>* `sessionId` {Buffer} The TLS session identifier <ide> * `callback` {Function} A callback function to be called when the prior session <del> has been recovered. <del> <del>When called, the event listener may perform a lookup in external storage using <del>the given `sessionId` and invoke `callback(null, sessionData)` once finished. If <del>the session cannot be resumed (i.e., doesn't exist in storage) the callback may <del>be invoked as `callback(null, null)`. Calling `callback(err)` will terminate the <del>incoming connection and destroy the socket. <add> has been recovered: `callback([err[, sessionData]])` <add> * `err` {Error} <add> * `sessionData` {Buffer} <add> <add>The event listener should perform a lookup in external storage for the <add>`sessionData` saved by the [`'newSession'`][] event handler using the given <add>`sessionId`. If found, call `callback(null, sessionData)` to resume the session. <add>If not found, the session cannot be resumed. `callback()` must be called <add>without `sessionData` so that the handshake can continue and a new session can <add>be created. It is possible to call `callback(err)` to terminate the incoming <add>connection and destroy the socket. <ide> <ide> Listening for this event will have an effect only on connections established <ide> after the addition of the event listener. <ide> Returns the current number of concurrent connections on the server. <ide> added: v3.0.0 <ide> --> <ide> <del>* Returns: {Buffer} <add>* Returns: {Buffer} A 48-byte buffer containing the session ticket keys. <ide> <del>Returns a `Buffer` instance holding the keys currently used for <del>encryption/decryption of the [TLS Session Tickets][]. <add>Returns the session ticket keys. <add> <add>See [Session Resumption][] for more information. <ide> <ide> ### server.listen() <ide> <ide> existing server. Existing connections to the server are not interrupted. <ide> added: v3.0.0 <ide> --> <ide> <del>* `keys` {Buffer} The keys used for encryption/decryption of the <del> [TLS Session Tickets][]. <del> <del>Updates the keys for encryption/decryption of the [TLS Session Tickets][]. <add>* `keys` {Buffer} A 48-byte buffer containing the session ticket keys. <ide> <del>The key's `Buffer` should be 48 bytes long. See `ticketKeys` option in <del>[`tls.createServer()`] for more information on how it is used. <add>Sets the session ticket keys. <ide> <ide> Changes to the ticket keys are effective only for future server connections. <ide> Existing or currently pending server connections will use the previous keys. <ide> <add>See [Session Resumption][] for more information. <add> <ide> ## Class: tls.TLSSocket <ide> <!-- YAML <ide> added: v0.11.4 <ide> information. <ide> added: v0.11.4 <ide> --> <ide> <del>Returns the ASN.1 encoded TLS session or `undefined` if no session was <del>negotiated. Can be used to speed up handshake establishment when reconnecting <del>to the server. <add>* {Buffer} <add> <add>Returns the TLS session data or `undefined` if no session was <add>negotiated. On the client, the data can be provided to the `session` option of <add>[`tls.connect()`][] to resume the connection. On the server, it may be useful <add>for debugging. <add> <add>See [Session Resumption][] for more information. <ide> <ide> ### tlsSocket.getTLSTicket() <ide> <!-- YAML <ide> added: v0.11.4 <ide> --> <ide> <del>Returns the TLS session ticket or `undefined` if no session was negotiated. <add>* {Buffer} <add> <add>For a client, returns the TLS session ticket if one is available, or <add>`undefined`. For a server, always returns `undefined`. <add> <add>It may be useful for debugging. <ide> <del>This only works with client TLS sockets. Useful only for debugging, for session <del>reuse provide `session` option to [`tls.connect()`][]. <add>See [Session Resumption][] for more information. <ide> <ide> ### tlsSocket.localAddress <ide> <!-- YAML <ide> changes: <ide> * `requestCert` {boolean} If `true` the server will request a certificate from <ide> clients that connect and attempt to verify that certificate. **Default:** <ide> `false`. <del> * `sessionTimeout` {number} An integer specifying the number of seconds after <del> which the TLS session identifiers and TLS session tickets created by the <del> server will time out. See [`SSL_CTX_set_timeout`] for more details. <add> * `sessionTimeout` {number} The number of seconds after which a TLS session <add> created by the server will no longer be resumable. See <add> [Session Resumption][] for more information. **Default:** `300`. <ide> * `SNICallback(servername, cb)` {Function} A function that will be called if <ide> the client supports SNI TLS extension. Two arguments will be passed when <ide> called: `servername` and `cb`. `SNICallback` should invoke `cb(null, ctx)`, <ide> where `ctx` is a `SecureContext` instance. (`tls.createSecureContext(...)` <ide> can be used to get a proper `SecureContext`.) If `SNICallback` wasn't <ide> provided the default callback with high-level API will be used (see below). <del> * `ticketKeys`: A 48-byte `Buffer` instance consisting of a 16-byte prefix, <del> a 16-byte HMAC key, and a 16-byte AES key. This can be used to accept TLS <del> session tickets on multiple instances of the TLS server. <add> * `ticketKeys`: {Buffer} 48-bytes of cryptographically strong pseudo-random <add> data. See [Session Resumption][] for more information. <ide> * ...: Any [`tls.createSecureContext()`][] option can be provided. For <ide> servers, the identity options (`pfx` or `key`/`cert`) are usually required. <ide> * `secureConnectionListener` {Function} <ide> secureSocket = tls.TLSSocket(socket, options); <ide> <ide> where `secureSocket` has the same API as `pair.cleartext`. <ide> <add>[`'newSession'`]: #tls_event_newsession <add>[`'resumeSession'`]: #tls_event_resumesession <ide> [`'secureConnect'`]: #tls_event_secureconnect <ide> [`'secureConnection'`]: #tls_event_secureconnection <ide> [`--tls-cipher-list`]: cli.html#cli_tls_cipher_list_list <ide> [`NODE_OPTIONS`]: cli.html#cli_node_options_options <del>[`SSL_CTX_set_timeout`]: https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_timeout.html <ide> [`crypto.getCurves()`]: crypto.html#crypto_crypto_getcurves <ide> [`dns.lookup()`]: dns.html#dns_dns_lookup_hostname_options_callback <ide> [`net.Server.address()`]: net.html#net_server_address <ide> [`net.Server`]: net.html#net_class_net_server <ide> [`net.Socket`]: net.html#net_class_net_socket <ide> [`server.getConnections()`]: net.html#net_server_getconnections_callback <add>[`server.getTicketKeys()`]: #tls_server_getticketkeys <ide> [`server.listen()`]: net.html#net_server_listen <add>[`server.setTicketKeys()`]: #tls_server_setticketkeys_keys <ide> [`tls.DEFAULT_ECDH_CURVE`]: #tls_tls_default_ecdh_curve <ide> [`tls.Server`]: #tls_class_tls_server <ide> [`tls.TLSSocket.getPeerCertificate()`]: #tls_tlssocket_getpeercertificate_detailed <add>[`tls.TLSSocket.getSession()`]: #tls_tlssocket_getsession <add>[`tls.TLSSocket.getTLSTicket()`]: #tls_tlssocket_gettlsticket <ide> [`tls.TLSSocket`]: #tls_class_tls_tlssocket <ide> [`tls.connect()`]: #tls_tls_connect_options_callback <ide> [`tls.createSecureContext()`]: #tls_tls_createsecurecontext_options <ide> where `secureSocket` has the same API as `pair.cleartext`. <ide> [OpenSSL Options]: crypto.html#crypto_openssl_options <ide> [OpenSSL cipher list format documentation]: https://www.openssl.org/docs/man1.1.0/apps/ciphers.html#CIPHER-LIST-FORMAT <ide> [Perfect Forward Secrecy]: #tls_perfect_forward_secrecy <add>[RFC 2246]: https://www.ietf.org/rfc/rfc2246.txt <add>[RFC 5077]: https://tools.ietf.org/html/rfc5077 <ide> [RFC 5929]: https://tools.ietf.org/html/rfc5929 <ide> [SSL_METHODS]: https://www.openssl.org/docs/man1.1.0/ssl/ssl.html#Dealing-with-Protocol-Methods <add>[Session Resumption]: #tls_session_resumption <ide> [Stream]: stream.html#stream_stream <del>[TLS Session Tickets]: https://www.ietf.org/rfc/rfc5077.txt <ide> [TLS recommendations]: https://wiki.mozilla.org/Security/Server_Side_TLS <ide> [asn1.js]: https://www.npmjs.com/package/asn1.js <ide> [certificate object]: #tls_certificate_object
1
PHP
PHP
remove some comment bloat from the request class
0586bbe04e65384ac12ad06d0f9e1642f59091d4
<ide><path>laravel/request.php <ide> public static function uri() <ide> $uri = substr($uri, strlen($index)); <ide> } <ide> <del> // If all we are left with is an empty string, we will return a single forward <del> // slash indicating the request is to the root of the application. If we have <del> // something left, we will its remove the leading and trailing slashes. <ide> return static::$uri = (($uri = trim($uri, '/')) !== '') ? $uri : '/'; <ide> } <ide>
1
Text
Text
add language meta
015dc51fe35f758b70a3066298dff6ae917c11ba
<ide><path>model_cards/neuralmind/bert-base-portuguese-cased/README.md <add>--- <add>language: pt <add>--- <add> <add>## bert-base-portuguese-cased <ide>\ No newline at end of file <ide><path>model_cards/neuralmind/bert-large-portuguese-cased/README.md <add>--- <add>language: pt <add>--- <add> <add>## bert-large-portuguese-cased <ide>\ No newline at end of file
2
Text
Text
add pointer to website repository
c93627fe2a6f136ab83bd36292d917d6c09432bc
<ide><path>docs/README.md <del>Ember Documentation <del>======================== <add># Ember Documentation <add> <add>## Building the Documentation <ide> <ide> Generating the Ember documentation requires node.js, as well as the port of jsdoc-toolkit to node, located [here](https://github.com/p120ph37/node-jsdoc-toolkit). In order to build the docs, run the following commands from the `docs` directory: <ide> <ide> Using that, running ./run won't fail with latest node.js installed. <ide> ./run <ide> <ide> If you wish to consult it without installing node.js and the toolkit a static version is provided [here](https://s3.amazonaws.com/emberjs/emberjs-docs-as-of-2012-01-04.zip). <del>Please note that it will not be as up to date as building it yourself but it is provided as a convenience for the time being. <ide>\ No newline at end of file <add>Please note that it will not be as up to date as building it yourself but it is provided as a convenience for the time being. <add> <add>## Contributing to the Website <add> <add>The repository for the [emberjs.com](http://emberjs.com/) website is located at <add><a href="https://github.com/emberjs/website">github.com/emberjs/website</a>.
1
Python
Python
bugfix parser labels
fd36469900da4c34f3d7b6c5400f05d8df73db8d
<ide><path>spacy/tests/training/test_rehearse.py <ide> def _optimize(nlp, component: str, data: List, rehearse: bool): <ide> elif component == "tagger": <ide> _add_tagger_label(pipe, data) <ide> elif component == "parser": <del> _add_tagger_label(pipe, data) <add> _add_parser_label(pipe, data) <ide> elif component == "textcat_multilabel": <ide> _add_textcat_label(pipe, data) <ide> else:
1
Python
Python
fix naming collisions in schema generation
d138f30a86c98346e3c37eab330e4a1c9d5e732c
<ide><path>rest_framework/schemas/generators.py <ide> def is_api_view(callback): <ide> return (cls is not None) and issubclass(cls, APIView) <ide> <ide> <add>INSERT_INTO_COLLISION_FMT = """ <add>Schema Naming Collision. <add> <add>coreapi.Link for URL path {value_url} cannot be inserted into schema. <add>Position conflicts with coreapi.Link for URL path {target_url}. <add> <add>Attemped to insert link with keys: {keys}. <add> <add>Adjust URLs to avoid naming collision or override `SchemaGenerator.get_keys()` <add>to customise schema structure. <add>""" <add> <add> <ide> def insert_into(target, keys, value): <ide> """ <ide> Nested dictionary insertion. <ide> def insert_into(target, keys, value): <ide> if key not in target: <ide> target[key] = {} <ide> target = target[key] <del> target[keys[-1]] = value <add> try: <add> target[keys[-1]] = value <add> except TypeError: <add> msg = INSERT_INTO_COLLISION_FMT.format( <add> value_url=value.url, <add> target_url=target.url, <add> keys=keys <add> ) <add> raise ValueError(msg) <ide> <ide> <ide> def is_custom_action(action): <ide><path>tests/test_schemas.py <ide> from django.http import Http404 <ide> from django.test import TestCase, override_settings <ide> <del>from rest_framework import filters, pagination, permissions, serializers <add>from rest_framework import ( <add> filters, generics, pagination, permissions, serializers <add>) <ide> from rest_framework.compat import coreapi, coreschema <ide> from rest_framework.decorators import ( <ide> api_view, detail_route, list_route, schema <ide> ) <ide> from rest_framework.request import Request <del>from rest_framework.routers import DefaultRouter <add>from rest_framework.routers import DefaultRouter, SimpleRouter <ide> from rest_framework.schemas import ( <ide> AutoSchema, ManualSchema, SchemaGenerator, get_schema_view <ide> ) <ide> from rest_framework.schemas.generators import EndpointEnumerator <ide> from rest_framework.test import APIClient, APIRequestFactory <ide> from rest_framework.utils import formatting <ide> from rest_framework.views import APIView <del>from rest_framework.viewsets import ModelViewSet <add>from rest_framework.viewsets import GenericViewSet, ModelViewSet <add> <add>from .models import BasicModel <ide> <ide> factory = APIRequestFactory() <ide> <ide> def get(self, request, *args, **kwargs): <ide> "The `OldFashionedExcludedView.exclude_from_schema` attribute is " <ide> "pending deprecation. Set `schema = None` instead." <ide> ) <add> <add> <add>@api_view(["GET"]) <add>def simple_fbv(request): <add> pass <add> <add> <add>class BasicModelSerializer(serializers.ModelSerializer): <add> class Meta: <add> model = BasicModel <add> fields = "__all__" <add> <add> <add>class NamingCollisionView(generics.RetrieveUpdateDestroyAPIView): <add> queryset = BasicModel.objects.all() <add> serializer_class = BasicModelSerializer <add> <add> <add>class NamingCollisionViewSet(GenericViewSet): <add> """ <add> Example via: https://stackoverflow.com/questions/43778668/django-rest-framwork-occured-typeerror-link-object-does-not-support-item-ass/ <add> """ <add> permision_class = () <add> <add> @list_route() <add> def detail(self, request): <add> return {} <add> <add> @list_route(url_path='detail/export') <add> def detail_export(self, request): <add> return {} <add> <add> <add>naming_collisions_router = SimpleRouter() <add>naming_collisions_router.register(r'collision', NamingCollisionViewSet, base_name="collision") <add> <add> <add>class TestURLNamingCollisions(TestCase): <add> """ <add> Ref: https://github.com/encode/django-rest-framework/issues/4704 <add> """ <add> def test_manually_routing_nested_routes(self): <add> patterns = [ <add> url(r'^test', simple_fbv), <add> url(r'^test/list/', simple_fbv), <add> ] <add> <add> generator = SchemaGenerator(title='Naming Colisions', patterns=patterns) <add> <add> with pytest.raises(ValueError): <add> generator.get_schema() <add> <add> def test_manually_routing_generic_view(self): <add> patterns = [ <add> url(r'^test', NamingCollisionView.as_view()), <add> url(r'^test/retrieve/', NamingCollisionView.as_view()), <add> url(r'^test/update/', NamingCollisionView.as_view()), <add> <add> # Fails with method names: <add> url(r'^test/get/', NamingCollisionView.as_view()), <add> url(r'^test/put/', NamingCollisionView.as_view()), <add> url(r'^test/delete/', NamingCollisionView.as_view()), <add> ] <add> <add> generator = SchemaGenerator(title='Naming Colisions', patterns=patterns) <add> <add> with pytest.raises(ValueError): <add> generator.get_schema() <add> <add> def test_from_router(self): <add> patterns = [ <add> url(r'from-router', include(naming_collisions_router.urls)), <add> ] <add> <add> generator = SchemaGenerator(title='Naming Colisions', patterns=patterns) <add> <add> with pytest.raises(ValueError): <add> generator.get_schema()
2
Ruby
Ruby
use selected_migrations if block_given?
4d4db4c86163c9b3fd242db543007bc3adf2d115
<ide><path>activerecord/lib/active_record/migration.rb <ide> def down(target_version = nil) <ide> migrations <ide> end <ide> <del> Migrator.new(:down, migrations, target_version).migrate <add> Migrator.new(:down, selected_migrations, target_version).migrate <ide> end <ide> <ide> def run(direction, target_version)
1
Text
Text
add missing semicolon in nativemodulesios.md
b11dc3943070f2f35bb34d5ce61c2aa83435574b
<ide><path>docs/NativeModulesIOS.md <ide> You can then define methods and export your enum constants like this: <ide> { <ide> return @{ @"statusBarAnimationNone" : @(UIStatusBarAnimationNone), <ide> @"statusBarAnimationFade" : @(UIStatusBarAnimationFade), <del> @"statusBarAnimationSlide" : @(UIStatusBarAnimationSlide) } <add> @"statusBarAnimationSlide" : @(UIStatusBarAnimationSlide) }; <ide> }; <ide> <ide> RCT_EXPORT_METHOD(updateStatusBarAnimation:(UIStatusBarAnimation)animation
1
Text
Text
fix typos in primitives article
db03724dabebb84107fa85bc392d57212f5672aa
<ide><path>threejs/lessons/threejs-primitives.md <ide> are generally 3D shapes that are generated at runtime <ide> with a bunch of parameters. <ide> <ide> It's common to use primitives for things like a sphere <del>for globe or a bunch of boxes to draw a 3D graph. It's <add>for a globe or a bunch of boxes to draw a 3D graph. It's <ide> especially common to use primitives to experiment <del>and get started with 3D. For the majority if 3D apps <add>and get started with 3D. For the majority of 3D apps <ide> it's more common to have an artist make 3D models <ide> in a 3D modeling program. Later in this series we'll <ide> cover making and loading data from several 3D modeling <ide> for <code>TextBufferGeometry</code> and <code>TextGeometry</code> respectively.< <ide> <div data-primitive="IcosahedronBufferGeometry">An icosahedron (20 sides)</div> <ide> <div data-primitive="LatheBufferGeometry">A shape generated by spinning a line. Examples would lamps, bowling pins, candles, candle holders, wine glasses, drinking glasses, etc... You provide the 2d silhouette as series of points and then tell three.js how many subdivisions to make as it spins the silhouette around an axis.</div> <ide> <div data-primitive="OctahedronBufferGeometry">An Octahedron (8 sides)</div> <del><div data-primitive="ParametricBufferGeometry">A surface generated by providing a function that takes a 2d point from a grid and returns the corresponding 3d point.</div> <add><div data-primitive="ParametricBufferGeometry">A surface generated by providing a function that takes a 2D point from a grid and returns the corresponding 3d point.</div> <ide> <div data-primitive="PlaneBufferGeometry">A 2D plane</div> <ide> <div data-primitive="PolyhedronBufferGeometry">Takes a set of triangles centered around a point and projects them onto a sphere</div> <ide> <div data-primitive="RingBufferGeometry">A 2D disc with a hole in the center</div> <del><div data-primitive="ShapeBufferGeometry">A 2d outline that gets triangulated</div> <add><div data-primitive="ShapeBufferGeometry">A 2D outline that gets triangulated</div> <ide> <div data-primitive="SphereBufferGeometry">A sphere</div> <del><div data-primitive="TetrahedronBufferGeometry">A terahedron (4 sides)</div> <del><div data-primitive="TextBufferGeometry">3D Text generated from a 3D font and a string</div> <add><div data-primitive="TetrahedronBufferGeometry">A tetrahedron (4 sides)</div> <add><div data-primitive="TextBufferGeometry">3D text generated from a 3D font and a string</div> <ide> <div data-primitive="TorusBufferGeometry">A torus (donut)</div> <ide> <div data-primitive="TorusKnotBufferGeometry">A torus knot</div> <ide> <div data-primitive="TubeBufferGeometry">A circle traced down a path</div> <del><div data-primitive="EdgesGeometry">A helper object that takes another geometry as input and generates edges only if the angle between faces is greater than some threshold. For example if you look at the box at the top it shows a line going through each face showing every triangle that makes the box. Using an EdgesGeometry instead the middle lines are removed.</div> <del><div data-primitive="WireframeGeometry">Generates geometry that contains one line segment (2 points) per edge in the given geometry. With out this you'd often be missing edges or get extra edges since WebGL generally requires 2 points per line segment. For example if all you had was a single triangle there would only be 3 points. If you tried to draw it using a material with <code>wireframe: true</code> you would only get a single line. Passing that triangle geometry to a <code>WireframeGeometry</code> will generate a new Geometry that has 3 lines segments using 6 points..</div> <add><div data-primitive="EdgesGeometry">A helper object that takes another geometry as input and generates edges only if the angle between faces is greater than some threshold. For example if you look at the box at the top it shows a line going through each face showing every triangle that makes the box. Using an <code>EdgesGeometry</code> instead the middle lines are removed.</div> <add><div data-primitive="WireframeGeometry">Generates geometry that contains one line segment (2 points) per edge in the given geometry. Without this you'd often be missing edges or get extra edges since WebGL generally requires 2 points per line segment. For example if all you had was a single triangle there would only be 3 points. If you tried to draw it using a material with <code>wireframe: true</code> you would only get a single line. Passing that triangle geometry to a <code>WireframeGeometry</code> will generate a new geometry that has 3 lines segments using 6 points..</div> <ide> <ide> You might notice of most of them come in pairs of `Geometry` <ide> or `BufferGeometry`. The difference between the 2 types is effectively flexibility <ide> based primitives easier to deal with. <ide> As an simple example a `BufferGeometry` <ide> can not have new vertices easily added. The number of vertices used is <ide> decided at creation time, storage is created, and then data for vertices <del>are filled in. Where as for `Geometry` you can add vertices as you go. <add>are filled in. Whereas for `Geometry` you can add vertices as you go. <ide> <ide> We'll go over creating custom geometry in another article. For now <ide> let's make an example creating each type of primitive. We'll start <ide> is on the left edge. To work around this we can ask three.js to compute the boun <ide> box of the geometry. We can then call the `getCenter` method <ide> of the bounding box and pass it our mesh's position object. <ide> `getCenter` copies the center of the box into the position. <del>It also returns the position object so we can call `multiplyScaler(-1)` <add>It also returns the position object so we can call `multiplyScalar(-1)` <ide> to position the entire object such that its center of rotation <ide> is at the center of the object. <ide> <ide> works in another article](threejs-scenegraph.html). <ide> For now it's enough to know that <ide> like DOM nodes, children are drawn relative to their parent. <ide> By making an `Object3D` and making our mesh a child of that <del>we can position the `Object3D` where ever we want and still <del>keep the center offset we set earilier. <add>we can position the `Object3D` wherever we want and still <add>keep the center offset we set earlier. <ide> <ide> If we didn't do this the text would spin off center. <ide> <ide> {{{example url="../threejs-primitives-text.html" }}} <ide> <ide> Notice the one on the left is not spinning around its center <del>where as the one on the right is. <add>whereas the one on the right is. <ide> <ide> The other exceptions are the 2 line based examples for `EdgesGeometry` <ide> and `WireframeGeometry`. Instead of calling `addSolidGeometry` they call <ide> If you're only drawing a few spheres, like say a single globe for <ide> a map of the earth, then a single 10000 triangle sphere is not a bad <ide> choice. If on the otherhand you're trying to draw 1000 spheres <ide> then 1000 spheres times 10000 triangles each is 10 million triangles. <del>To animate smoothly you need the browser to draw at 60 frames a <add>To animate smoothly you need the browser to draw at 60 frames per <ide> second so you'd be asking the browser to draw 600 million triangles <ide> per second. That's a lot of computing. <ide>
1
PHP
PHP
clarify doc block
5d91e3ee2235a6748394b2d3ae98bf7e78616efa
<ide><path>src/Http/ServerRequest.php <ide> public function getEnv($key, $default = null) <ide> } <ide> <ide> /** <del> * Set a value to the request's environment data. <add> * Update the request with a new environment data element. <add> * <add> * Returns an updated request object. This method returns <add> * a *new* request object and does not mutate the request in-place. <ide> * <ide> * @param string $key The key you want to write to. <ide> * @param string $value Value to set
1
Javascript
Javascript
fix installation formatting
05d2703b4ed9191f58b1b899be52b4259e611acc
<ide><path>src/ngMock/angular-mocks.js <ide> angular.mock.$ComponentControllerProvider = ['$compileProvider', function($compi <ide> * <ide> * @installation <ide> * <del> * <p>First, download the file:</p> <del> * <ul> <del> <li> <del> <a href="https://developers.google.com/speed/libraries/devguide#angularjs">Google CDN</a> e.g. <del> {% code %}"//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/"{% endcode %} <del> </li> <del> <li> <del> <a href="https://www.npmjs.com/">NPM</a> e.g. <del> {% code %}npm install {$ doc.packageName $}@X.Y.Z{% endcode %} <del> </li> <del> <li> <del> <a href="http://bower.io">Bower</a><br> e.g. <del> {% code %}bower install {$ doc.packageName $}@X.Y.Z{% endcode %} <del> </li> <del> <li> <del> <a href="https://code.angularjs.org/">code.angularjs.org</a> (discouraged for <del> production use) e.g. <del> {% code %}"//code.angularjs.org/X.Y.Z/{$ doc.packageFile $}"{% endcode %} <del> </li> <del> </ul> <del> <p>where X.Y.Z is the AngularJS version you are running.</p> <del> <del> <p>Then, configure your test runner to load `angular-mocks.js` after `angular.js`. <del> This example uses <a href="http://karma-runner.github.io/">Karma</a>:</p> <del> <del> {% code %} <del> config.set({ <del> files: [ <del> 'build/angular.js', // and other module files you need <del> 'build/angular-mocks.js', <del> '<path/to/application/files>', <del> '<path/to/spec/files>' <del> ] <del> }); <del> {% endcode %} <del> <del> <p>Including the `angular-mocks.js` file automatically adds the `ngMock` module, so your tests <del> are ready to go!</p> <add> * First, download the file: <add> * * [Google CDN](https://developers.google.com/speed/libraries/devguide#angularjs) e.g. <add> * `"//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/"` <add> * * [NPM](https://www.npmjs.com/) e.g. `npm install {$ doc.packageName $}@X.Y.Z` <add> * * [Bower](http://bower.io) e.g. `bower install {$ doc.packageName $}@X.Y.Z` <add> * * [code.angularjs.org](https://code.angularjs.org/) (discouraged for production use) e.g. <add> * `"//code.angularjs.org/X.Y.Z/{$ doc.packageFile $}"` <add> * <add> * where X.Y.Z is the AngularJS version you are running. <add> * <add> * Then, configure your test runner to load `angular-mocks.js` after `angular.js`. <add> * This example uses <a href="http://karma-runner.github.io/">Karma</a>: <ide> * <add> * ``` <add> * config.set({ <add> * files: [ <add> * 'build/angular.js', // and other module files you need <add> * 'build/angular-mocks.js', <add> * '<path/to/application/files>', <add> * '<path/to/spec/files>' <add> * ] <add> * }); <add> * ``` <ide> * <add> * Including the `angular-mocks.js` file automatically adds the `ngMock` module, so your tests <add> * are ready to go! <ide> */ <ide> angular.module('ngMock', ['ng']).provider({ <ide> $browser: angular.mock.$BrowserProvider,
1
Python
Python
add lemma rules
2eb163c5dd675c2e7a9cedb5d6868545833cbf34
<ide><path>spacy/en/lemma_rules.py <add># encoding: utf8 <add>from __future__ import unicode_literals <add> <add> <add>LEMMA_RULES = { <add> "noun": [ <add> ["s", ""], <add> ["ses", "s"], <add> ["ves", "f"], <add> ["xes", "x"], <add> ["zes", "z"], <add> ["ches", "ch"], <add> ["shes", "sh"], <add> ["men", "man"], <add> ["ies", "y"] <add> ], <add> <add> "verb": [ <add> ["s", ""], <add> ["ies", "y"], <add> ["es", "e"], <add> ["es", ""], <add> ["ed", "e"], <add> ["ed", ""], <add> ["ing", "e"], <add> ["ing", ""] <add> ], <add> <add> "adj": [ <add> ["er", ""], <add> ["est", ""], <add> ["er", "e"], <add> ["est", "e"] <add> ], <add> <add> "punct": [ <add> ["“", "\""], <add> ["”", "\""], <add> ["\u2018", "'"], <add> ["\u2019", "'"] <add> ] <add>}
1
Python
Python
update the ner tf script
d38bbb225f7b847e8be4e969cb9b40e7e4d798a6
<ide><path>examples/ner/run_tf_ner.py <ide> def train( <ide> writer = tf.summary.create_file_writer("/tmp/mylogs") <ide> <ide> with strategy.scope(): <del> loss_fct = tf.keras.losses.SparseCategoricalCrossentropy(reduction=tf.keras.losses.Reduction.NONE) <add> loss_fct = tf.keras.losses.SparseCategoricalCrossentropy( <add> from_logits=True, reduction=tf.keras.losses.Reduction.NONE <add> ) <ide> optimizer = create_optimizer(args["learning_rate"], num_train_steps, args["warmup_steps"]) <ide> <ide> if args["fp16"]: <ide> def step_fn(train_features, train_labels): <ide> <ide> with tf.GradientTape() as tape: <ide> logits = model(train_features["input_ids"], **inputs)[0] <del> logits = tf.reshape(logits, (-1, len(labels) + 1)) <del> active_loss = tf.reshape(train_features["input_mask"], (-1,)) <del> active_logits = tf.boolean_mask(logits, active_loss) <del> train_labels = tf.reshape(train_labels, (-1,)) <del> active_labels = tf.boolean_mask(train_labels, active_loss) <add> active_loss = tf.reshape(train_labels, (-1,)) != pad_token_label_id <add> active_logits = tf.boolean_mask(tf.reshape(logits, (-1, len(labels))), active_loss) <add> active_labels = tf.boolean_mask(tf.reshape(train_labels, (-1,)), active_loss) <ide> cross_entropy = loss_fct(active_labels, active_logits) <ide> loss = tf.reduce_sum(cross_entropy) * (1.0 / train_batch_size) <ide> grads = tape.gradient(loss, model.trainable_variables) <ide> def evaluate(args, strategy, model, tokenizer, labels, pad_token_label_id, mode) <ide> <ide> with strategy.scope(): <ide> logits = model(eval_features["input_ids"], **inputs)[0] <del> tmp_logits = tf.reshape(logits, (-1, len(labels) + 1)) <del> active_loss = tf.reshape(eval_features["input_mask"], (-1,)) <del> active_logits = tf.boolean_mask(tmp_logits, active_loss) <del> tmp_eval_labels = tf.reshape(eval_labels, (-1,)) <del> active_labels = tf.boolean_mask(tmp_eval_labels, active_loss) <add> active_loss = tf.reshape(eval_labels, (-1,)) != pad_token_label_id <add> active_logits = tf.boolean_mask(tf.reshape(logits, (-1, len(labels))), active_loss) <add> active_labels = tf.boolean_mask(tf.reshape(eval_labels, (-1,)), active_loss) <ide> cross_entropy = loss_fct(active_labels, active_logits) <ide> loss += tf.reduce_sum(cross_entropy) * (1.0 / eval_batch_size) <ide> <ide> def main(_): <ide> ) <ide> <ide> labels = get_labels(args["labels"]) <del> num_labels = len(labels) + 1 <del> pad_token_label_id = 0 <add> num_labels = len(labels) <add> pad_token_label_id = -1 <ide> config = AutoConfig.from_pretrained( <ide> args["config_name"] if args["config_name"] else args["model_name_or_path"], <ide> num_labels=num_labels, <ide> def main(_): <ide> config=config, <ide> cache_dir=args["cache_dir"] if args["cache_dir"] else None, <ide> ) <del> model.layers[-1].activation = tf.keras.activations.softmax <ide> <ide> train_batch_size = args["per_device_train_batch_size"] * args["n_device"] <ide> train_dataset, num_train_examples = load_and_cache_examples( <ide><path>src/transformers/optimization_tf.py <ide> def __call__(self, gradients): <ide> raise ValueError("Expected %s gradients, but got %d" % (len(self._gradients), len(gradients))) <ide> <ide> for accum_gradient, gradient in zip(self._get_replica_gradients(), gradients): <del> if accum_gradient is not None: <add> if accum_gradient is not None and gradient is not None: <ide> accum_gradient.assign_add(gradient) <ide> <ide> self._accum_steps.assign_add(1) <ide> def _get_replica_gradients(self): <ide> return ( <ide> gradient.device_map.select_for_current_replica(gradient.values, replica_context) <ide> for gradient in self._gradients <add> if gradient is not None <ide> ) <ide> else: <ide> return self._gradients
2
Python
Python
remove some legacy features
0c8e6319cff0b0b723aa1a7b8d8a0b3628558848
<ide><path>keras/backend/__init__.py <ide> from .common import image_data_format <ide> from .common import set_image_data_format <ide> from .common import is_keras_tensor <del>from .common import legacy_weight_ordering <del>from .common import set_legacy_weight_ordering <ide> <ide> _keras_base_dir = os.path.expanduser('~') <ide> if not os.access(_keras_base_dir, os.W_OK): <ide><path>keras/backend/common.py <ide> _FLOATX = 'float32' <ide> _EPSILON = 10e-8 <ide> _IMAGE_DATA_FORMAT = 'channels_last' <del>_LEGACY_WEIGHT_ORDERING = False <ide> <ide> <ide> def epsilon(): <ide> def is_keras_tensor(x): <ide> return True <ide> else: <ide> return False <del> <del> <del>def set_legacy_weight_ordering(value): <del> global _LEGACY_WEIGHT_ORDERING <del> assert value in {True, False} <del> _LEGACY_WEIGHT_ORDERING = value <del> <del> <del>def legacy_weight_ordering(): <del> return _LEGACY_WEIGHT_ORDERING <ide><path>keras/backend/tensorflow_backend.py <del>from collections import defaultdict <ide> import tensorflow as tf <del> <ide> from tensorflow.python.training import moving_averages <ide> from tensorflow.python.ops import tensor_array_ops <ide> from tensorflow.python.ops import control_flow_ops <ide> from tensorflow.python.ops import functional_ops <del>try: <del> from tensorflow.python.ops import ctc_ops as ctc <del>except ImportError: <del> import tensorflow.contrib.ctc as ctc <add>from tensorflow.python.ops import ctc_ops as ctc <ide> <add>from collections import defaultdict <ide> import numpy as np <ide> import os <ide> import warnings <del>from .common import floatx, _EPSILON, image_data_format <add> <add>from .common import floatx <add>from .common import _EPSILON <add>from .common import image_data_format <ide> py_all = all <ide> <ide> # INTERNAL UTILS <ide> # Change its value via `manual_variable_initialization(value)`. <ide> _MANUAL_VAR_INIT = False <ide> <del># These two integers contain the tensorflow version for coping with API breaks. <del>tf_major_version = int(tf.__version__.split('.')[0]) <del>tf_minor_version = int(tf.__version__.split('.')[1]) <del> <ide> <ide> def get_uid(prefix=''): <ide> global _GRAPH_UID_DICTS <ide> def variable(value, dtype=None, name=None): <ide> sparse_coo = value.tocoo() <ide> indices = np.concatenate((np.expand_dims(sparse_coo.row, 1), <ide> np.expand_dims(sparse_coo.col, 1)), 1) <del> if tf_major_version >= 1: <del> v = tf.SparseTensor(indices=indices, <del> values=sparse_coo.data, <del> dense_shape=sparse_coo.shape) <del> else: <del> v = tf.SparseTensor(indices=indices, <del> values=sparse_coo.data, <del> shape=sparse_coo.shape) <add> v = tf.SparseTensor(indices=indices, <add> values=sparse_coo.data, <add> dense_shape=sparse_coo.shape) <ide> v._keras_shape = sparse_coo.shape <ide> v._uses_learning_phase = False <ide> return v <ide> def batch_dot(x, y, axes=None): <ide> if isinstance(axes, int): <ide> axes = (axes, axes) <ide> if ndim(x) == 2 and ndim(y) == 2: <del> if tf_major_version >= 1: <del> if axes[0] == axes[1]: <del> out = tf.reduce_sum(tf.multiply(x, y), axes[0]) <del> else: <del> out = tf.reduce_sum(tf.multiply(tf.transpose(x, [1, 0]), y), axes[1]) <add> if axes[0] == axes[1]: <add> out = tf.reduce_sum(tf.multiply(x, y), axes[0]) <ide> else: <del> if axes[0] == axes[1]: <del> out = tf.reduce_sum(tf.mul(x, y), axes[0]) <del> else: <del> out = tf.reduce_sum(tf.mul(tf.transpose(x, [1, 0]), y), axes[1]) <add> out = tf.reduce_sum(tf.multiply(tf.transpose(x, [1, 0]), y), axes[1]) <ide> else: <ide> if axes is not None: <ide> adj_x = None if axes[0] == ndim(x) - 1 else True <ide> def concatenate(tensors, axis=-1): <ide> if py_all([is_sparse(x) for x in tensors]): <ide> return tf.sparse_concat(axis, tensors) <ide> else: <del> if tf_major_version >= 1: <del> return tf.concat([to_dense(x) for x in tensors], axis) <del> else: <del> try: <del> return tf.concat_v2([to_dense(x) for x in tensors], axis) <del> except AttributeError: <del> return tf.concat(axis, [to_dense(x) for x in tensors]) <add> return tf.concat([to_dense(x) for x in tensors], axis) <ide> <ide> <ide> def reshape(x, shape): <ide> def ctc_decode(y_pred, input_length, greedy=True, beam_width=100, <ide> sequence_length=input_length, beam_width=beam_width, <ide> top_paths=top_paths) <ide> <del> if tf_major_version >= 1: <del> decoded_dense = [tf.sparse_to_dense(st.indices, st.dense_shape, st.values, default_value=-1) <del> for st in decoded] <del> else: <del> decoded_dense = [tf.sparse_to_dense(st.indices, st.shape, st.values, default_value=-1) <del> for st in decoded] <del> <add> decoded_dense = [tf.sparse_to_dense(st.indices, st.dense_shape, st.values, default_value=-1) <add> for st in decoded] <ide> return (decoded_dense, log_prob) <ide> <ide> <ide><path>keras/engine/topology.py <ide> def build_map_of_graph(tensor, seen_nodes=None, depth=0, <ide> layers_for_depth = layers_by_depth[depth] <ide> # Container.layers needs to have a deterministic order: <ide> # here we order them by traversal order. <del> if K.legacy_weight_ordering(): <del> layers_for_depth.sort(key=lambda x: x.name) <del> else: <del> layers_for_depth.sort(key=lambda x: layer_indices[x]) <add> layers_for_depth.sort(key=lambda x: layer_indices[x]) <ide> for layer in layers_for_depth: <ide> layers.append(layer) <ide> self.layers = layers
4
Java
Java
add connect/read timeout to netty requestfactory
e24ebd6dbb1b2e3d5ce25c275c3ce900ddf8869b
<ide><path>spring-web/src/main/java/org/springframework/http/client/Netty4ClientHttpRequestFactory.java <ide> <ide> import java.io.IOException; <ide> import java.net.URI; <add>import java.net.URLConnection; <add>import java.util.concurrent.TimeUnit; <ide> <ide> import io.netty.bootstrap.Bootstrap; <add>import io.netty.channel.ChannelConfig; <ide> import io.netty.channel.ChannelInitializer; <ide> import io.netty.channel.ChannelPipeline; <ide> import io.netty.channel.EventLoopGroup; <ide> import io.netty.channel.nio.NioEventLoopGroup; <ide> import io.netty.channel.socket.SocketChannel; <add>import io.netty.channel.socket.SocketChannelConfig; <ide> import io.netty.channel.socket.nio.NioSocketChannel; <ide> import io.netty.handler.codec.http.HttpClientCodec; <ide> import io.netty.handler.codec.http.HttpObjectAggregator; <ide> import io.netty.handler.ssl.SslContext; <add>import io.netty.handler.timeout.ReadTimeoutHandler; <ide> <ide> import org.springframework.beans.factory.DisposableBean; <ide> import org.springframework.beans.factory.InitializingBean; <ide> public class Netty4ClientHttpRequestFactory implements ClientHttpRequestFactory, <ide> <ide> private volatile Bootstrap bootstrap; <ide> <add> private int connectTimeout = -1; <add> <add> private int readTimeout = -1; <add> <ide> <ide> /** <ide> * Create a new {@code Netty4ClientHttpRequestFactory} with a default <ide> public void setSslContext(SslContext sslContext) { <ide> this.sslContext = sslContext; <ide> } <ide> <add> /** <add> * Set the underlying connect timeout (in milliseconds). <add> * A timeout value of 0 specifies an infinite timeout. <add> * @see ChannelConfig#setConnectTimeoutMillis(int) <add> */ <add> public void setConnectTimeout(int connectTimeout) { <add> this.connectTimeout = connectTimeout; <add> } <add> <add> /** <add> * Set the underlying URLConnection's read timeout (in milliseconds). <add> * A timeout value of 0 specifies an infinite timeout. <add> * @see ReadTimeoutHandler <add> */ <add> public void setReadTimeout(int readTimeout) { <add> this.readTimeout = readTimeout; <add> } <add> <ide> private Bootstrap getBootstrap() { <ide> if (this.bootstrap == null) { <ide> Bootstrap bootstrap = new Bootstrap(); <ide> bootstrap.group(this.eventLoopGroup).channel(NioSocketChannel.class) <ide> .handler(new ChannelInitializer<SocketChannel>() { <ide> @Override <ide> protected void initChannel(SocketChannel channel) throws Exception { <add> configureChannel(channel.config()); <ide> ChannelPipeline pipeline = channel.pipeline(); <ide> if (sslContext != null) { <ide> pipeline.addLast(sslContext.newHandler(channel.alloc())); <ide> } <ide> pipeline.addLast(new HttpClientCodec()); <ide> pipeline.addLast(new HttpObjectAggregator(maxResponseSize)); <add> if (readTimeout > 0) { <add> pipeline.addLast(new ReadTimeoutHandler(readTimeout, <add> TimeUnit.MILLISECONDS)); <add> } <ide> } <ide> }); <ide> this.bootstrap = bootstrap; <ide> } <ide> return this.bootstrap; <ide> } <ide> <add> /** <add> * Template method for changing properties on the given {@link SocketChannelConfig}. <add> * <p>The default implementation sets the connect timeout based on the set property. <add> * @param config the channel configuration <add> */ <add> protected void configureChannel(SocketChannelConfig config) { <add> if (this.connectTimeout >= 0) { <add> config.setConnectTimeoutMillis(this.connectTimeout); <add> } <add> } <add> <ide> @Override <ide> public void afterPropertiesSet() { <ide> getBootstrap();
1
Mixed
Ruby
remove jobs from queue when performing in tests
c6d621d132b8075698e451581e36381fee610e61
<ide><path>activejob/CHANGELOG.md <add>* `ActiveJob::TestCase#perform_enqueued_jobs` without a block removes performed jobs from the queue. <add> <add> That way the helper can be called multiple times and not perform a job invocation multiple times. <add> <add> ```ruby <add> def test_jobs <add> HelloJob.perform_later("rafael") <add> perform_enqueued_jobs <add> HelloJob.perform_later("david") <add> perform_enqueued_jobs # only runs with "david" <add> end <add> ``` <add> <ide> * `ActiveJob::TestCase#perform_enqueued_jobs` will no longer perform retries: <ide> <ide> When calling `perform_enqueued_jobs` without a block, the adapter will <ide><path>activejob/lib/active_job/test_helper.rb <ide> def performed_jobs_with(only: nil, except: nil, queue: nil, &block) <ide> <ide> def flush_enqueued_jobs(only: nil, except: nil, queue: nil, at: nil) <ide> enqueued_jobs_with(only: only, except: except, queue: queue, at: at) do |payload| <add> queue_adapter.enqueued_jobs.delete(payload) <ide> queue_adapter.performed_jobs << payload <ide> instantiate_job(payload).perform_now <ide> end <ide><path>activejob/test/cases/test_helper_test.rb <ide> def test_perform_enqueued_jobs_dont_perform_retries <ide> end <ide> <ide> assert_equal(1, performed_jobs.size) <del> assert_equal(2, enqueued_jobs.size) <add> assert_equal(1, enqueued_jobs.size) <add> end <add> <add> def test_perform_enqueued_jobs_without_block_removes_from_enqueued_jobs <add> HelloJob.perform_later("rafael") <add> assert_equal(0, performed_jobs.size) <add> assert_equal(1, enqueued_jobs.size) <add> perform_enqueued_jobs <add> assert_equal(1, performed_jobs.size) <add> assert_equal(0, enqueued_jobs.size) <add> end <add> <add> def test_perform_enqueued_jobs_without_block_only_performs_once <add> JobBuffer.clear <add> RescueJob.perform_later("no exception") <add> perform_enqueued_jobs <add> perform_enqueued_jobs <add> assert_equal(1, JobBuffer.values.size) <ide> end <ide> <ide> def test_assert_performed_jobs <ide> def test_assert_performed_with_without_block_does_not_change_jobs_count <ide> perform_enqueued_jobs <ide> assert_performed_with(job: HelloJob) <ide> <del> perform_enqueued_jobs <ide> HelloJob.perform_later <add> perform_enqueued_jobs <ide> assert_performed_with(job: HelloJob) <ide> <del> assert_equal 2, queue_adapter.enqueued_jobs.count <add> assert_equal 0, queue_adapter.enqueued_jobs.count <ide> assert_equal 2, queue_adapter.performed_jobs.count <ide> end <ide>
3
PHP
PHP
remove unnecessary $key in foreach
d43f114b02133269e9c2571169e11deb1c456921
<ide><path>src/Illuminate/Container/Container.php <ide> protected function getMethodDependencies($callback, array $parameters = []) <ide> { <ide> $dependencies = []; <ide> <del> foreach ($this->getCallReflector($callback)->getParameters() as $key => $parameter) { <add> foreach ($this->getCallReflector($callback)->getParameters() as $parameter) { <ide> $this->addDependencyForCallParameter($parameter, $parameters, $dependencies); <ide> } <ide>
1
Python
Python
add xfail test for deprojectivization sbd bug
6cd920e088d0a755644e380807db61a472a03eae
<ide><path>spacy/tests/regression/test_issue2772.py <add>'''Test that deprojectivization doesn't mess up sentence boundaries.''' <add>import pytest <add>from ...syntax.nonproj import projectivize, deprojectivize <add>from ..util import get_doc <add> <add>@pytest.mark.xfail <add>def test_issue2772(en_vocab): <add> words = 'When we write or communicate virtually , we can hide our true feelings .'.split() <add> # A tree with a non-projective (i.e. crossing) arc <add> # The arcs (0, 4) and (2, 9) cross. <add> heads = [4, 1, 7, -1, -1, -1, 3, 2, 1, 0, 2, 1, -1, -1] <add> deps = ['dep'] * len(heads) <add> heads, deps = projectivize(heads, deps) <add> doc = get_doc(en_vocab, words=words, heads=heads, deps=deps) <add> assert doc[0].is_sent_start == True <add> assert doc[1].is_sent_start is None <add> deprojectivize(doc) <add> assert doc[0].is_sent_start == True <add> assert doc[1].is_sent_start is None
1
Javascript
Javascript
set default path inside of project.replace
e14ffb94203d42fb5ca034965635868ee5aae483
<ide><path>src/main-process/atom-application.js <ide> class AtomApplication extends EventEmitter { <ide> } <ide> <ide> let openedWindow <del> if (existingWindow && projectSpecification.paths == null && projectSpecification.config == null) { <add> if (existingWindow && (projectSpecification == null || projectSpecification.config == null)) { <ide> openedWindow = existingWindow <ide> openedWindow.openLocations(locationsToOpen) <ide> if (openedWindow.isMinimized()) { <ide><path>src/main-process/parse-command-line.js <ide> module.exports = function parseCommandLine (processArgs) { <ide> <ide> const contents = Object.assign({}, readProjectSpecificationSync(readPath, executedFrom)) <ide> const pathToProjectFile = path.join(executedFrom, projectSpecificationFile) <add> <ide> const base = path.dirname(pathToProjectFile) <ide> pathsToOpen.push(path.dirname(projectSpecificationFile)) <add> const paths = (contents.paths == null) <add> ? undefined <add> : contents.paths.map(curPath => path.resolve(base, curPath)) <add> <ide> projectSpecification = { <del> originPath: projectSpecificationFile, <del> paths: contents.paths.map(curPath => path.resolve(base, curPath)), <add> originPath: pathToProjectFile, <add> paths, <ide> config: contents.config <ide> } <ide> } <ide> module.exports = function parseCommandLine (processArgs) { <ide> <ide> resourcePath = normalizeDriveLetterName(resourcePath) <ide> devResourcePath = normalizeDriveLetterName(devResourcePath) <add> <ide> return { <ide> projectSpecification, <ide> resourcePath, <ide> function readProjectSpecificationSync (filepath, executedFrom) { <ide> throw new Error('Unable to read supplied project specification file.') <ide> } <ide> <del> if (contents.paths == null) { <del> contents.paths = [path.dirname(filepath)] <del> } <ide> contents.config = (contents.config == null) ? {} : contents.config <ide> return contents <ide> } <ide><path>src/project.js <ide> class Project extends Model { <ide> atom.config.clearProjectSettings() <ide> this.setPaths([]) <ide> } else { <add> if (projectSpecification.originPath == null) { <add> return <add> } <add> <add> // If no path is specified, set to directory of originPath. <add> if (!Array.isArray(projectSpecification.paths)) { <add> projectSpecification.paths = [path.dirname(projectSpecification.originPath)] <add> } <ide> atom.config.resetProjectSettings(projectSpecification.config, projectSpecification.originPath) <ide> this.setPaths(projectSpecification.paths) <ide> }
3
Ruby
Ruby
move download strategies into their own file
72bde8c583f51d746b138161c6e84bde98d13c83
<ide><path>Library/Homebrew/brewkit.rb <ide> # <ide> require 'osx/cocoa' # to get number of cores <ide> require 'formula' <add>require 'download_strategy' <ide> require 'hw.model' <ide> <ide> ENV['MACOSX_DEPLOYMENT_TARGET']='10.5' <ide><path>Library/Homebrew/download_strategy.rb <add># Copyright 2009 Max Howell <[email protected]> <add># <add># This file is part of Homebrew. <add># <add># Homebrew is free software: you can redistribute it and/or modify <add># it under the terms of the GNU General Public License as published by <add># the Free Software Foundation, either version 3 of the License, or <add># (at your option) any later version. <add># <add># Homebrew is distributed in the hope that it will be useful, <add># but WITHOUT ANY WARRANTY; without even the implied warranty of <add># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <add># GNU General Public License for more details. <add># <add># You should have received a copy of the GNU General Public License <add># along with Homebrew. If not, see <http://www.gnu.org/licenses/>. <add># <add>class AbstractDownloadStrategy <add> def initialize url, name, version <add> @url=url <add> @unique_token="#{name}-#{version}" <add> end <add>end <add> <add>class HttpDownloadStrategy <AbstractDownloadStrategy <add> def fetch <add> ohai "Downloading #{@url}" <add> @dl=HOMEBREW_CACHE+(@unique_token+ext) <add> unless @dl.exist? <add> curl @url, '-o', @dl <add> else <add> puts "File already downloaded and cached" <add> end <add> return @dl # thus performs checksum verification <add> end <add> def stage <add> case `file -b #{@dl}` <add> when /^Zip archive data/ <add> safe_system 'unzip', '-qq', @dl <add> chdir <add> when /^(gzip|bzip2) compressed data/ <add> # TODO do file -z now to see if it is in fact a tar <add> safe_system 'tar', 'xf', @dl <add> chdir <add> else <add> # we are assuming it is not an archive, use original filename <add> # this behaviour is due to ScriptFileFormula expectations <add> @dl.mv File.basename(@url) <add> end <add> end <add>private <add> def chdir <add> entries=Dir['*'] <add> case entries.length <add> when 0 then raise "Empty archive" <add> when 1 then Dir.chdir entries.first rescue nil <add> end <add> end <add> def ext <add> # GitHub uses odd URLs for zip files, so check for those <add> rx=%r[http://(www\.)?github\.com/.*/(zip|tar)ball/] <add> if rx.match @url <add> if $2 == 'zip' <add> '.zip' <add> else <add> '.tgz' <add> end <add> else <add> Pathname.new(@url).extname <add> end <add> end <add>end <add> <add>class SubversionDownloadStrategy <AbstractDownloadStrategy <add> def fetch <add> ohai "Checking out #{@url}" <add> @co=HOMEBREW_CACHE+@unique_token <add> unless @co.exist? <add> safe_system 'svn', 'checkout', @url, @co <add> else <add> # TODO svn up? <add> puts "Repository already checked out" <add> end <add> end <add> def stage <add> # Force the export, since the target directory will already exist <add> safe_system 'svn', 'export', '--force', @co, Dir.pwd <add> end <add>end <add> <add>class GitDownloadStrategy <AbstractDownloadStrategy <add> def fetch <add> ohai "Cloning #{@url}" <add> @clone=HOMEBREW_CACHE+@unique_token <add> unless @clone.exist? <add> safe_system 'git', 'clone', @url, @clone <add> else <add> # TODO git pull? <add> puts "Repository already cloned" <add> end <add> end <add> def stage <add> dst=Dir.getwd <add> Dir.chdir @clone do <add> # http://stackoverflow.com/questions/160608/how-to-do-a-git-export-like-svn-export <add> safe_system 'git', 'checkout-index', '-af', "--prefix=#{dst}" <add> end <add> end <add>end <ide><path>Library/Homebrew/formula.rb <ide> # <ide> # You should have received a copy of the GNU General Public License <ide> # along with Homebrew. If not, see <http://www.gnu.org/licenses/>. <del> <del> <del>class AbstractDownloadStrategy <del> def initialize url, name, version <del> @url=url <del> @unique_token="#{name}-#{version}" <del> end <del>end <del> <del>class HttpDownloadStrategy <AbstractDownloadStrategy <del> def fetch <del> ohai "Downloading #{@url}" <del> @dl=HOMEBREW_CACHE+(@unique_token+ext) <del> unless @dl.exist? <del> curl @url, '-o', @dl <del> else <del> puts "File already downloaded and cached" <del> end <del> return @dl # thus performs checksum verification <del> end <del> def stage <del> case `file -b #{@dl}` <del> when /^Zip archive data/ <del> safe_system 'unzip', '-qq', @dl <del> chdir <del> when /^(gzip|bzip2) compressed data/ <del> # TODO do file -z now to see if it is in fact a tar <del> safe_system 'tar', 'xf', @dl <del> chdir <del> else <del> # we are assuming it is not an archive, use original filename <del> # this behaviour is due to ScriptFileFormula expectations <del> @dl.mv File.basename(@url) <del> end <del> end <del>private <del> def chdir <del> entries=Dir['*'] <del> case entries.length <del> when 0 then raise "Empty archive" <del> when 1 then Dir.chdir entries.first rescue nil <del> end <del> end <del> def ext <del> # GitHub uses odd URLs for zip files, so check for those <del> rx=%r[http://(www\.)?github\.com/.*/(zip|tar)ball/] <del> if rx.match @url <del> if $2 == 'zip' <del> '.zip' <del> else <del> '.tgz' <del> end <del> else <del> Pathname.new(@url).extname <del> end <del> end <del>end <del> <del>class SubversionDownloadStrategy <AbstractDownloadStrategy <del> def fetch <del> ohai "Checking out #{@url}" <del> @co=HOMEBREW_CACHE+@unique_token <del> unless @co.exist? <del> safe_system 'svn', 'checkout', @url, @co <del> else <del> # TODO svn up? <del> puts "Repository already checked out" <del> end <del> end <del> def stage <del> # Force the export, since the target directory will already exist <del> safe_system 'svn', 'export', '--force', @co, Dir.pwd <del> end <del>end <del> <del>class GitDownloadStrategy <AbstractDownloadStrategy <del> def fetch <del> ohai "Cloning #{@url}" <del> @clone=HOMEBREW_CACHE+@unique_token <del> unless @clone.exist? <del> safe_system 'git', 'clone', @url, @clone <del> else <del> # TODO git pull? <del> puts "Repository already cloned" <del> end <del> end <del> def stage <del> dst=Dir.getwd <del> Dir.chdir @clone do <del> # http://stackoverflow.com/questions/160608/how-to-do-a-git-export-like-svn-export <del> safe_system 'git', 'checkout-index', '-af', "--prefix=#{dst}" <del> end <del> end <del>end <del> <del> <add># <ide> class ExecutionError <RuntimeError <ide> def initialize cmd, args=[] <ide> super "#{cmd} #{args*' '}" <ide> end <ide> end <del> <del>class BuildError <ExecutionError; end <del> <add>class BuildError <ExecutionError <add>end <ide> class FormulaUnavailableError <RuntimeError <ide> def initialize name <ide> super "No available formula for #{name}" <ide><path>Library/Homebrew/unittest.rb <ide> $:.unshift File.dirname(__FILE__) <ide> require 'pathname+yeast' <ide> require 'formula' <add>require 'download_strategy' <ide> require 'keg' <ide> require 'utils' <ide>
4
Python
Python
add api endpoint - dagruns batch
5ddbbf1f59cf7f5999c3a872d4a14adab8427435
<ide><path>airflow/api_connexion/endpoints/dag_run_endpoint.py <ide> # under the License. <ide> from connexion import NoContent <ide> from flask import request <add>from marshmallow import ValidationError <ide> from sqlalchemy import and_, func <ide> <del>from airflow.api_connexion.exceptions import AlreadyExists, NotFound <add>from airflow.api_connexion.exceptions import AlreadyExists, BadRequest, NotFound <ide> from airflow.api_connexion.parameters import check_limit, format_datetime, format_parameters <ide> from airflow.api_connexion.schemas.dag_run_schema import ( <del> DAGRunCollection, dagrun_collection_schema, dagrun_schema, <add> DAGRunCollection, dagrun_collection_schema, dagrun_schema, dagruns_batch_form_schema, <ide> ) <ide> from airflow.models import DagModel, DagRun <ide> from airflow.utils.session import provide_session <ide> def delete_dag_run(dag_id, dag_run_id, session): <ide> """ <ide> if ( <ide> session.query(DagRun) <del> .filter(and_(DagRun.dag_id == dag_id, DagRun.run_id == dag_run_id)) <del> .delete() <del> == 0 <add> .filter(and_(DagRun.dag_id == dag_id, DagRun.run_id == dag_run_id)) <add> .delete() == 0 <ide> ): <ide> raise NotFound(detail=f"DAGRun with DAG ID: '{dag_id}' and DagRun ID: '{dag_run_id}' not found") <ide> return NoContent, 204 <ide> def get_dag_runs( <ide> if dag_id != "~": <ide> query = query.filter(DagRun.dag_id == dag_id) <ide> <add> dag_run, total_entries = _fetch_dag_runs(query, session, end_date_gte, end_date_lte, execution_date_gte, <add> execution_date_lte, start_date_gte, start_date_lte, <add> limit, offset) <add> <add> return dagrun_collection_schema.dump(DAGRunCollection(dag_runs=dag_run, <add> total_entries=total_entries)) <add> <add> <add>def _fetch_dag_runs(query, session, end_date_gte, end_date_lte, <add> execution_date_gte, execution_date_lte, <add> start_date_gte, start_date_lte, limit, offset): <add> query = _apply_date_filters_to_query(query, end_date_gte, end_date_lte, execution_date_gte, <add> execution_date_lte, start_date_gte, start_date_lte) <add> # apply offset and limit <add> dag_run = query.order_by(DagRun.id).offset(offset).limit(limit).all() <add> total_entries = session.query(func.count(DagRun.id)).scalar() <add> return dag_run, total_entries <add> <add> <add>def _apply_date_filters_to_query(query, end_date_gte, end_date_lte, execution_date_gte, <add> execution_date_lte, start_date_gte, start_date_lte): <ide> # filter start date <ide> if start_date_gte: <ide> query = query.filter(DagRun.start_date >= start_date_gte) <del> <ide> if start_date_lte: <ide> query = query.filter(DagRun.start_date <= start_date_lte) <del> <ide> # filter execution date <ide> if execution_date_gte: <ide> query = query.filter(DagRun.execution_date >= execution_date_gte) <del> <ide> if execution_date_lte: <ide> query = query.filter(DagRun.execution_date <= execution_date_lte) <del> <ide> # filter end date <ide> if end_date_gte: <ide> query = query.filter(DagRun.end_date >= end_date_gte) <del> <ide> if end_date_lte: <ide> query = query.filter(DagRun.end_date <= end_date_lte) <add> return query <ide> <del> # apply offset and limit <del> dag_run = query.order_by(DagRun.id).offset(offset).limit(limit).all() <del> total_entries = session.query(func.count(DagRun.id)).scalar() <ide> <del> return dagrun_collection_schema.dump( <del> DAGRunCollection(dag_runs=dag_run, total_entries=total_entries) <del> ) <del> <del> <del>def get_dag_runs_batch(): <add>@provide_session <add>def get_dag_runs_batch(session): <ide> """ <ide> Get list of DAG Runs <ide> """ <del> raise NotImplementedError("Not implemented yet.") <add> body = request.get_json() <add> try: <add> data = dagruns_batch_form_schema.load(body) <add> except ValidationError as err: <add> raise BadRequest(detail=str(err.messages)) <add> <add> query = session.query(DagRun) <add> <add> if data["dag_ids"]: <add> query = query.filter(DagRun.dag_id.in_(data["dag_ids"])) <add> <add> dag_runs, total_entries = _fetch_dag_runs(query, session, data["end_date_gte"], data["end_date_lte"], <add> data["execution_date_gte"], data["execution_date_lte"], <add> data["start_date_gte"], data["start_date_lte"], <add> data["page_limit"], data["page_offset"]) <add> <add> return dagrun_collection_schema.dump(DAGRunCollection(dag_runs=dag_runs, <add> total_entries=total_entries)) <ide> <ide> <ide> @provide_session <ide> def post_dag_run(dag_id, session): <ide> <ide> post_body = dagrun_schema.load(request.json, session=session) <ide> dagrun_instance = ( <del> session.query(DagRun) <del> .filter(and_(DagRun.dag_id == dag_id, DagRun.run_id == post_body["run_id"])) <del> .first() <add> session.query(DagRun).filter( <add> and_(DagRun.dag_id == dag_id, DagRun.run_id == post_body["run_id"])).first() <ide> ) <ide> if not dagrun_instance: <ide> dag_run = DagRun(dag_id=dag_id, run_type=DagRunType.MANUAL.value, **post_body) <ide><path>airflow/api_connexion/schemas/dag_run_schema.py <ide> class DAGRunCollectionSchema(Schema): <ide> total_entries = fields.Int() <ide> <ide> <add>class DagRunsBatchFormSchema(Schema): <add> """ Schema to validate and deserialize the Form(request payload) submitted to DagRun Batch endpoint""" <add> <add> class Meta: <add> """ Meta """ <add> datetimeformat = 'iso' <add> strict = True <add> <add> page_offset = fields.Int(missing=0, min=0) <add> page_limit = fields.Int(missing=100, min=1) <add> dag_ids = fields.List(fields.Str(), missing=None) <add> execution_date_gte = fields.DateTime(missing=None) <add> execution_date_lte = fields.DateTime(missing=None) <add> start_date_gte = fields.DateTime(missing=None) <add> start_date_lte = fields.DateTime(missing=None) <add> end_date_gte = fields.DateTime(missing=None) <add> end_date_lte = fields.DateTime(missing=None) <add> <add> <ide> dagrun_schema = DAGRunSchema() <ide> dagrun_collection_schema = DAGRunCollectionSchema() <add>dagruns_batch_form_schema = DagRunsBatchFormSchema() <ide><path>tests/api_connexion/endpoints/test_dag_run_endpoint.py <ide> <ide> from airflow.models import DagModel, DagRun <ide> from airflow.utils import timezone <del>from airflow.utils.session import provide_session <add>from airflow.utils.session import create_session, provide_session <ide> from airflow.utils.types import DagRunType <ide> from airflow.www import app <ide> from tests.test_utils.config import conf_vars <ide> def setUp(self) -> None: <ide> def tearDown(self) -> None: <ide> clear_db_runs() <ide> <del> def _create_test_dag_run(self, state="running", extra_dag=False): <add> def _create_test_dag_run(self, state='running', extra_dag=False, commit=True): <add> dag_runs = [] <ide> dagrun_model_1 = DagRun( <ide> dag_id="TEST_DAG_ID", <ide> run_id="TEST_DAG_RUN_ID_1", <ide> def _create_test_dag_run(self, state="running", extra_dag=False): <ide> external_trigger=True, <ide> state=state, <ide> ) <add> dag_runs.append(dagrun_model_1) <ide> dagrun_model_2 = DagRun( <ide> dag_id="TEST_DAG_ID", <ide> run_id="TEST_DAG_RUN_ID_2", <ide> def _create_test_dag_run(self, state="running", extra_dag=False): <ide> start_date=timezone.parse(self.default_time), <ide> external_trigger=True, <ide> ) <add> dag_runs.append(dagrun_model_2) <ide> if extra_dag: <del> dagrun_extra = [ <del> DagRun( <del> dag_id="TEST_DAG_ID_" + str(i), <del> run_id="TEST_DAG_RUN_ID_" + str(i), <del> run_type=DagRunType.MANUAL.value, <del> execution_date=timezone.parse(self.default_time_2), <del> start_date=timezone.parse(self.default_time), <del> external_trigger=True, <del> ) <del> for i in range(3, 5) <del> ] <del> return [dagrun_model_1, dagrun_model_2] + dagrun_extra <del> return [dagrun_model_1, dagrun_model_2] <add> dagrun_extra = [DagRun( <add> dag_id='TEST_DAG_ID_' + str(i), <add> run_id='TEST_DAG_RUN_ID_' + str(i), <add> run_type=DagRunType.MANUAL.value, <add> execution_date=timezone.parse(self.default_time_2), <add> start_date=timezone.parse(self.default_time), <add> external_trigger=True, <add> ) for i in range(3, 5)] <add> dag_runs.extend(dagrun_extra) <add> if commit: <add> with create_session() as session: <add> session.add_all(dag_runs) <add> return dag_runs <ide> <ide> <ide> class TestDeleteDagRun(TestDagRunEndpoint): <ide> def test_should_response_200(self, session): <ide> assert len(result) == 1 <ide> response = self.client.get("api/v1/dags/TEST_DAG_ID/dagRuns/TEST_DAG_RUN_ID") <ide> assert response.status_code == 200 <del> self.assertEqual( <del> response.json, <del> { <del> "dag_id": "TEST_DAG_ID", <del> "dag_run_id": "TEST_DAG_RUN_ID", <del> "end_date": None, <del> "state": "running", <del> "execution_date": self.default_time, <del> "external_trigger": True, <del> "start_date": self.default_time, <del> "conf": {}, <del> }, <del> ) <add> expected_response = { <add> 'dag_id': 'TEST_DAG_ID', <add> 'dag_run_id': 'TEST_DAG_RUN_ID', <add> 'end_date': None, <add> 'state': 'running', <add> 'execution_date': self.default_time, <add> 'external_trigger': True, <add> 'start_date': self.default_time, <add> 'conf': {} <add> } <add> assert response.json == expected_response <ide> <ide> def test_should_response_404(self): <ide> response = self.client.get("api/v1/dags/invalid-id/dagRuns/invalid-id") <ide> assert response.status_code == 404 <del> self.assertEqual( <del> { <del> "detail": None, <del> "status": 404, <del> "title": "DAGRun not found", <del> "type": "about:blank", <del> }, <del> response.json, <del> ) <add> expected_resp = { <add> 'detail': None, <add> 'status': 404, <add> 'title': 'DAGRun not found', <add> 'type': 'about:blank' <add> } <add> assert expected_resp == response.json <ide> <ide> <ide> class TestGetDagRuns(TestDagRunEndpoint): <ide> @provide_session <ide> def test_should_response_200(self, session): <del> dagruns = self._create_test_dag_run() <del> session.add_all(dagruns) <del> session.commit() <add> self._create_test_dag_run() <ide> result = session.query(DagRun).all() <ide> assert len(result) == 2 <ide> response = self.client.get("api/v1/dags/TEST_DAG_ID/dagRuns") <ide> assert response.status_code == 200 <del> self.assertEqual( <del> response.json, <del> { <del> "dag_runs": [ <del> { <del> "dag_id": "TEST_DAG_ID", <del> "dag_run_id": "TEST_DAG_RUN_ID_1", <del> "end_date": None, <del> "state": "running", <del> "execution_date": self.default_time, <del> "external_trigger": True, <del> "start_date": self.default_time, <del> "conf": {}, <del> }, <del> { <del> "dag_id": "TEST_DAG_ID", <del> "dag_run_id": "TEST_DAG_RUN_ID_2", <del> "end_date": None, <del> "state": "running", <del> "execution_date": self.default_time_2, <del> "external_trigger": True, <del> "start_date": self.default_time, <del> "conf": {}, <del> }, <del> ], <del> "total_entries": 2, <del> }, <del> ) <add> assert response.json == { <add> "dag_runs": [ <add> { <add> 'dag_id': 'TEST_DAG_ID', <add> 'dag_run_id': 'TEST_DAG_RUN_ID_1', <add> 'end_date': None, <add> 'state': 'running', <add> 'execution_date': self.default_time, <add> 'external_trigger': True, <add> 'start_date': self.default_time, <add> 'conf': {}, <add> }, <add> { <add> 'dag_id': 'TEST_DAG_ID', <add> 'dag_run_id': 'TEST_DAG_RUN_ID_2', <add> 'end_date': None, <add> 'state': 'running', <add> 'execution_date': self.default_time_2, <add> 'external_trigger': True, <add> 'start_date': self.default_time, <add> 'conf': {}, <add> }, <add> ], <add> "total_entries": 2, <add> } <ide> <ide> @provide_session <ide> def test_should_return_all_with_tilde_as_dag_id(self, session): <del> dagruns = self._create_test_dag_run(extra_dag=True) <del> expected_dag_run_ids = [ <del> "TEST_DAG_ID", <del> "TEST_DAG_ID", <del> "TEST_DAG_ID_3", <del> "TEST_DAG_ID_4", <del> ] <del> session.add_all(dagruns) <del> session.commit() <add> self._create_test_dag_run(extra_dag=True) <add> expected_dag_run_ids = ['TEST_DAG_ID', 'TEST_DAG_ID', <add> "TEST_DAG_ID_3", "TEST_DAG_ID_4"] <ide> result = session.query(DagRun).all() <ide> assert len(result) == 4 <ide> response = self.client.get("api/v1/dags/~/dagRuns") <ide> assert response.status_code == 200 <ide> dag_run_ids = [dag_run["dag_id"] for dag_run in response.json["dag_runs"]] <del> self.assertEqual(dag_run_ids, expected_dag_run_ids) <add> assert dag_run_ids == expected_dag_run_ids <ide> <ide> <ide> class TestGetDagRunsPagination(TestDagRunEndpoint): <ide> class TestGetDagRunsPagination(TestDagRunEndpoint): <ide> ), <ide> ] <ide> ) <del> @provide_session <del> def test_handle_limit_and_offset(self, url, expected_dag_run_ids, session): <del> dagrun_models = self._create_dag_runs(10) <del> session.add_all(dagrun_models) <del> session.commit() <del> <add> def test_handle_limit_and_offset(self, url, expected_dag_run_ids): <add> self._create_dag_runs(10) <ide> response = self.client.get(url) <ide> assert response.status_code == 200 <ide> <del> self.assertEqual(response.json["total_entries"], 10) <add> assert response.json["total_entries"] == 10 <ide> dag_run_ids = [dag_run["dag_run_id"] for dag_run in response.json["dag_runs"]] <del> self.assertEqual(dag_run_ids, expected_dag_run_ids) <del> <del> @provide_session <del> def test_should_respect_page_size_limit(self, session): <del> dagrun_models = self._create_dag_runs(200) <del> session.add_all(dagrun_models) <del> session.commit() <add> assert dag_run_ids == expected_dag_run_ids <ide> <add> def test_should_respect_page_size_limit(self): <add> self._create_dag_runs(200) <ide> response = self.client.get("api/v1/dags/TEST_DAG_ID/dagRuns") # default is 100 <ide> assert response.status_code == 200 <ide> <del> self.assertEqual(response.json["total_entries"], 200) <del> self.assertEqual(len(response.json["dag_runs"]), 100) # default is 100 <add> assert response.json["total_entries"] == 200 <add> assert len(response.json["dag_runs"]) == 100 # default is 100 <ide> <del> @provide_session <ide> @conf_vars({("api", "maximum_page_limit"): "150"}) <del> def test_should_return_conf_max_if_req_max_above_conf(self, session): <del> dagrun_models = self._create_dag_runs(200) <del> session.add_all(dagrun_models) <del> session.commit() <del> <add> def test_should_return_conf_max_if_req_max_above_conf(self): <add> self._create_dag_runs(200) <ide> response = self.client.get("api/v1/dags/TEST_DAG_ID/dagRuns?limit=180") <ide> assert response.status_code == 200 <ide> self.assertEqual(len(response.json["dag_runs"]), 150) <ide> <ide> def _create_dag_runs(self, count): <del> return [ <add> dag_runs = [ <ide> DagRun( <ide> dag_id="TEST_DAG_ID", <ide> run_id="TEST_DAG_RUN_ID" + str(i), <ide> def _create_dag_runs(self, count): <ide> ) <ide> for i in range(1, count + 1) <ide> ] <add> with create_session() as session: <add> session.add_all(dag_runs) <ide> <ide> <ide> class TestGetDagRunsPaginationFilters(TestDagRunEndpoint): <ide> def test_date_filters_gte_and_lte(self, url, expected_dag_run_ids, session): <ide> <ide> response = self.client.get(url) <ide> assert response.status_code == 200 <del> self.assertEqual(response.json["total_entries"], 10) <add> assert response.json["total_entries"] == 10 <ide> dag_run_ids = [dag_run["dag_run_id"] for dag_run in response.json["dag_runs"]] <del> self.assertEqual(dag_run_ids, expected_dag_run_ids) <add> assert dag_run_ids == expected_dag_run_ids <ide> <ide> def _create_dag_runs(self): <ide> dates = [ <ide> class TestGetDagRunsEndDateFilters(TestDagRunEndpoint): <ide> ), <ide> ] <ide> ) <add> def test_end_date_gte_lte(self, url, expected_dag_run_ids): <add> self._create_test_dag_run('success') # state==success, then end date is today <add> response = self.client.get(url) <add> assert response.status_code == 200 <add> assert response.json["total_entries"] == 2 <add> dag_run_ids = [ <add> dag_run["dag_run_id"] for dag_run in response.json["dag_runs"] if dag_run] <add> assert dag_run_ids == expected_dag_run_ids <add> <add> <add>class TestGetDagRunBatch(TestDagRunEndpoint): <add> def test_should_respond_200(self): <add> self._create_test_dag_run() <add> payload = { <add> "dag_ids": ["TEST_DAG_ID"] <add> } <add> response = self.client.post("api/v1/dags/~/dagRuns/list", json=payload) <add> assert response.status_code == 200 <add> assert response.json == { <add> "dag_runs": [ <add> { <add> 'dag_id': 'TEST_DAG_ID', <add> 'dag_run_id': 'TEST_DAG_RUN_ID_1', <add> 'end_date': None, <add> 'state': 'running', <add> 'execution_date': self.default_time, <add> 'external_trigger': True, <add> 'start_date': self.default_time, <add> 'conf': {}, <add> }, <add> { <add> 'dag_id': 'TEST_DAG_ID', <add> 'dag_run_id': 'TEST_DAG_RUN_ID_2', <add> 'end_date': None, <add> 'state': 'running', <add> 'execution_date': self.default_time_2, <add> 'external_trigger': True, <add> 'start_date': self.default_time, <add> 'conf': {}, <add> }, <add> ], <add> "total_entries": 2, <add> } <add> <add> @parameterized.expand( <add> [ <add> ({"dag_ids": ["TEST_DAG_ID"], "page_offset": -1}, <add> "-1 is less than the minimum of 0 - 'page_offset'"), <add> ({"dag_ids": ["TEST_DAG_ID"], "page_limit": 0}, <add> "0 is less than the minimum of 1 - 'page_limit'"), <add> ({"dag_ids": "TEST_DAG_ID"}, <add> "'TEST_DAG_ID' is not of type 'array' - 'dag_ids'"), <add> ({"start_date_gte": "2020-06-12T18"}, <add> "{'start_date_gte': ['Not a valid datetime.']}"), <add> ] <add> ) <add> def test_payload_validation(self, payload, error): <add> self._create_test_dag_run() <add> response = self.client.post("api/v1/dags/~/dagRuns/list", json=payload) <add> assert response.status_code == 400 <add> assert error == response.json.get("detail") <add> <add> <add>class TestGetDagRunBatchPagination(TestDagRunEndpoint): <add> @parameterized.expand( <add> [ <add> ({"page_limit": 1}, ["TEST_DAG_RUN_ID1"]), <add> ({"page_limit": 2}, ["TEST_DAG_RUN_ID1", "TEST_DAG_RUN_ID2"]), <add> ( <add> {"page_offset": 5}, <add> [ <add> "TEST_DAG_RUN_ID6", <add> "TEST_DAG_RUN_ID7", <add> "TEST_DAG_RUN_ID8", <add> "TEST_DAG_RUN_ID9", <add> "TEST_DAG_RUN_ID10", <add> ], <add> ), <add> ( <add> {"page_offset": 0}, <add> [ <add> "TEST_DAG_RUN_ID1", <add> "TEST_DAG_RUN_ID2", <add> "TEST_DAG_RUN_ID3", <add> "TEST_DAG_RUN_ID4", <add> "TEST_DAG_RUN_ID5", <add> "TEST_DAG_RUN_ID6", <add> "TEST_DAG_RUN_ID7", <add> "TEST_DAG_RUN_ID8", <add> "TEST_DAG_RUN_ID9", <add> "TEST_DAG_RUN_ID10", <add> ], <add> ), <add> ({"page_offset": 5, "page_limit": 1}, ["TEST_DAG_RUN_ID6"]), <add> ({"page_offset": 1, "page_limit": 1}, ["TEST_DAG_RUN_ID2"]), <add> ({"page_offset": 2, "page_limit": 2}, ["TEST_DAG_RUN_ID3", "TEST_DAG_RUN_ID4"],), <add> ] <add> ) <add> def test_handle_limit_and_offset(self, payload, expected_dag_run_ids): <add> self._create_dag_runs(10) <add> response = self.client.post("api/v1/dags/~/dagRuns/list", json=payload) <add> assert response.status_code == 200 <add> <add> assert response.json["total_entries"] == 10 <add> dag_run_ids = [dag_run["dag_run_id"] for dag_run in response.json["dag_runs"]] <add> assert dag_run_ids == expected_dag_run_ids <add> <add> def test_should_respect_page_size_limit(self): <add> self._create_dag_runs(200) <add> response = self.client.post("api/v1/dags/~/dagRuns/list", json={}) # default is 100 <add> assert response.status_code == 200 <add> <add> assert response.json["total_entries"] == 200 <add> assert len(response.json["dag_runs"]) == 100 # default is 100 <add> <add> def _create_dag_runs(self, count): <add> dag_runs = [ <add> DagRun( <add> dag_id="TEST_DAG_ID", <add> run_id="TEST_DAG_RUN_ID" + str(i), <add> run_type=DagRunType.MANUAL.value, <add> execution_date=timezone.parse(self.default_time) + timedelta(minutes=i), <add> start_date=timezone.parse(self.default_time), <add> external_trigger=True, <add> ) <add> for i in range(1, count + 1) <add> ] <add> with create_session() as session: <add> session.add_all(dag_runs) <add> <add> <add>class TestGetDagRunBatchDateFilters(TestDagRunEndpoint): <add> @parameterized.expand( <add> [ <add> ( <add> {"start_date_gte": "2020-06-18T18:00:00+00:00"}, <add> ["TEST_START_EXEC_DAY_18", "TEST_START_EXEC_DAY_19"], <add> ), <add> ( <add> {"start_date_lte": "2020-06-11T18:00:00+00:00"}, <add> ["TEST_START_EXEC_DAY_10", "TEST_START_EXEC_DAY_11"], <add> ), <add> ( <add> {"start_date_lte": "2020-06-15T18:00:00+00:00", <add> "start_date_gte": "2020-06-12T18:00:00Z"}, <add> ["TEST_START_EXEC_DAY_12", "TEST_START_EXEC_DAY_13", <add> "TEST_START_EXEC_DAY_14", "TEST_START_EXEC_DAY_15"], <add> ), <add> ( <add> {"execution_date_lte": "2020-06-13T18:00:00+00:00"}, <add> ["TEST_START_EXEC_DAY_10", "TEST_START_EXEC_DAY_11", <add> "TEST_START_EXEC_DAY_12", "TEST_START_EXEC_DAY_13"], <add> ), <add> ( <add> {"execution_date_gte": "2020-06-16T18:00:00+00:00"}, <add> ["TEST_START_EXEC_DAY_16", "TEST_START_EXEC_DAY_17", <add> "TEST_START_EXEC_DAY_18", "TEST_START_EXEC_DAY_19"], <add> ), <add> ] <add> ) <ide> @provide_session <del> def test_end_date_gte_lte(self, url, expected_dag_run_ids, session): <del> dagruns = self._create_test_dag_run( <del> "success" <del> ) # state==success, then end date is today <del> session.add_all(dagruns) <add> def test_date_filters_gte_and_lte(self, payload, expected_dag_run_ids, session): <add> dag_runs = self._create_dag_runs() <add> session.add_all(dag_runs) <ide> session.commit() <ide> <del> response = self.client.get(url) <add> response = self.client.post("api/v1/dags/~/dagRuns/list", json=payload) <ide> assert response.status_code == 200 <del> self.assertEqual(response.json["total_entries"], 2) <del> dag_run_ids = [ <del> dag_run["dag_run_id"] for dag_run in response.json["dag_runs"] if dag_run <add> assert response.json["total_entries"] == 10 <add> dag_run_ids = [dag_run["dag_run_id"] for dag_run in response.json["dag_runs"]] <add> assert dag_run_ids == expected_dag_run_ids <add> <add> def _create_dag_runs(self): <add> dates = [ <add> '2020-06-10T18:00:00+00:00', <add> '2020-06-11T18:00:00+00:00', <add> '2020-06-12T18:00:00+00:00', <add> '2020-06-13T18:00:00+00:00', <add> '2020-06-14T18:00:00+00:00', <add> '2020-06-15T18:00:00Z', <add> '2020-06-16T18:00:00Z', <add> '2020-06-17T18:00:00Z', <add> '2020-06-18T18:00:00Z', <add> '2020-06-19T18:00:00Z', <ide> ] <del> self.assertEqual(dag_run_ids, expected_dag_run_ids) <add> <add> return [ <add> DagRun( <add> dag_id="TEST_DAG_ID", <add> run_id="TEST_START_EXEC_DAY_1" + str(i), <add> run_type=DagRunType.MANUAL.value, <add> execution_date=timezone.parse(dates[i]), <add> start_date=timezone.parse(dates[i]), <add> external_trigger=True, <add> state='success', <add> ) <add> for i in range(len(dates)) <add> ] <add> <add> @parameterized.expand( <add> [ <add> ( <add> {"end_date_gte": f"{(timezone.utcnow() + timedelta(days=1)).isoformat()}"}, <add> [], <add> ), <add> ( <add> {"end_date_lte": f"{(timezone.utcnow() + timedelta(days=1)).isoformat()}"}, <add> ["TEST_DAG_RUN_ID_1"], <add> ), <add> ] <add> ) <add> def test_end_date_gte_lte(self, payload, expected_dag_run_ids): <add> self._create_test_dag_run('success') # state==success, then end date is today <add> response = self.client.post("api/v1/dags/~/dagRuns/list", json=payload) <add> assert response.status_code == 200 <add> assert response.json["total_entries"] == 2 <add> dag_run_ids = [dag_run["dag_run_id"] for dag_run in response.json["dag_runs"] if dag_run] <add> assert dag_run_ids == expected_dag_run_ids <ide> <ide> <ide> class TestPostDagRun(TestDagRunEndpoint):
3
Javascript
Javascript
fix broken link
28cf179171b02caada7d61f2c4b8c542aa3ad4cc
<ide><path>website/layout/AutodocsLayout.js <ide> var ComponentDoc = React.createClass({ <ide> {(style.composes || []).map((name) => { <ide> var link; <ide> if (name === 'LayoutPropTypes') { <del> name = 'Flexbox'; <add> name = 'Layout Props'; <ide> link = <del> <a href={'docs/' + slugify(name) + '.html#proptypes'}>{name}...</a>; <add> <a href={'docs/' + slugify(name) + '.html#props'}>{name}...</a>; <add> } else if (name === 'ShadowPropTypesIOS') { <add> name = 'Shadow Props'; <add> link = <add> <a href={'docs/' + slugify(name) + '.html#props'}>{name}...</a>; <ide> } else if (name === 'TransformPropTypes') { <ide> name = 'Transforms'; <ide> link = <del> <a href={'docs/' + slugify(name) + '.html#proptypes'}>{name}...</a>; <add> <a href={'docs/' + slugify(name) + '.html#props'}>{name}...</a>; <ide> } else { <ide> name = name.replace('StylePropTypes', ''); <ide> link =
1
Ruby
Ruby
use json to marshal errors from children
5c90833f0a16e9326750959aec91d779b889ceca
<ide><path>Library/Homebrew/build.rb <ide> require "debrew" <ide> require "fcntl" <ide> require "socket" <add>require "json" <add>require "json/add/core" <ide> <ide> class Build <ide> attr_reader :formula, :deps, :reqs <ide> def fixopt(f) <ide> build = Build.new(formula, options) <ide> build.install <ide> rescue Exception => e # rubocop:disable Lint/RescueException <del> Marshal.dump(e, error_pipe) <add> error_hash = JSON.parse e.to_json <add> <add> # Special case: We need to toss our build state into the error hash <add> # for proper analytics reporting and sensible error messages. <add> if e.is_a?(BuildError) <add> error_hash["cmd"] = e.cmd <add> error_hash["args"] = e.args <add> error_hash["env"] = e.env <add> end <add> <add> error_pipe.write error_hash.to_json <ide> error_pipe.close <ide> exit! 1 <ide> end <ide><path>Library/Homebrew/dev-cmd/test.rb <ide> def test <ide> exec(*args) <ide> end <ide> end <del> rescue ::Test::Unit::AssertionFailedError => e <add> rescue ChildProcessError => e <ide> ofail "#{f.full_name}: failed" <del> puts e.message <del> rescue Exception => e # rubocop:disable Lint/RescueException <del> ofail "#{f.full_name}: failed" <del> puts e, e.backtrace <add> case e.inner["json_class"] <add> when "Test::Unit::AssertionFailedError" <add> puts e.inner["m"] <add> else <add> puts e.inner["json_class"], e.backtrace <add> end <ide> ensure <ide> ENV.replace(env) <ide> end <ide><path>Library/Homebrew/exceptions.rb <ide> def initialize(formula) <ide> end <ide> <ide> class BuildError < RuntimeError <del> attr_reader :formula, :env <add> attr_reader :formula, :cmd, :args, :env <ide> attr_accessor :options <ide> <ide> def initialize(formula, cmd, args, env) <ide> @formula = formula <add> @cmd = cmd <add> @args = args <ide> @env = env <del> args = args.map { |arg| arg.to_s.gsub " ", "\\ " }.join(" ") <del> super "Failed executing: #{cmd} #{args}" <add> pretty_args = args.map { |arg| arg.to_s.gsub " ", "\\ " }.join(" ") <add> super "Failed executing: #{cmd} #{pretty_args}" <ide> end <ide> <ide> def issues <ide> def initialize(bottle_path, formula_path) <ide> EOS <ide> end <ide> end <add> <add># Raised when a child process sends us an exception over its error pipe. <add>class ChildProcessError < RuntimeError <add> attr_reader :inner <add> <add> def initialize(inner) <add> @inner = inner <add> <add> super <<~EOS <add> An exception occured within a build process: <add> #{inner["json_class"]}: #{inner["m"]} <add> EOS <add> <add> # Clobber our real (but irrelevant) backtrace with that of the inner exception. <add> set_backtrace inner["b"] <add> end <add>end <ide><path>Library/Homebrew/formula_installer.rb <ide> def build <ide> raise "Empty installation" <ide> end <ide> rescue Exception => e # rubocop:disable Lint/RescueException <del> e.options = display_options(formula) if e.is_a?(BuildError) <add> # If we've rescued a ChildProcessError and that ChildProcessError <add> # contains a BuildError, then we reconstruct the inner build error <add> # to make analytics happy. <add> if e.is_a?(ChildProcessError) && e.inner["json_class"] == "BuildError" <add> build_error = BuildError.new(formula, e["cmd"], e["args"], e["env"]) <add> build_error.set_backtrace e.backtrace <add> build_error.options = display_options(formula) <add> <add> e = build_error <add> end <add> <ide> ignore_interrupts do <ide> # any exceptions must leave us with nothing installed <ide> formula.update_head_version <ide> formula.prefix.rmtree if formula.prefix.directory? <ide> formula.rack.rmdir_if_possible <ide> end <del> raise <add> <add> raise e <ide> end <ide> <ide> def link(keg) <ide><path>Library/Homebrew/postinstall.rb <ide> require "debrew" <ide> require "fcntl" <ide> require "socket" <add>require "json/add/core" <ide> <ide> begin <ide> error_pipe = UNIXSocket.open(ENV["HOMEBREW_ERROR_PIPE"], &:recv_io) <ide> formula.extend(Debrew::Formula) if ARGV.debug? <ide> formula.run_post_install <ide> rescue Exception => e # rubocop:disable Lint/RescueException <del> Marshal.dump(e, error_pipe) <add> error_pipe.write e.to_json <ide> error_pipe.close <ide> exit! 1 <ide> end <ide><path>Library/Homebrew/test.rb <ide> require "formula_assertions" <ide> require "fcntl" <ide> require "socket" <add>require "json/add/core" <ide> <ide> TEST_TIMEOUT_SECONDS = 5 * 60 <ide> <ide> raise "test returned false" if formula.run_test == false <ide> end <ide> rescue Exception => e # rubocop:disable Lint/RescueException <del> Marshal.dump(e, error_pipe) <add> error_pipe.write e.to_json <ide> error_pipe.close <ide> exit! 1 <ide> end <ide><path>Library/Homebrew/utils/fork.rb <ide> require "fcntl" <ide> require "socket" <add>require "json" <add>require "json/add/core" <ide> <ide> module Utils <ide> def self.safe_fork(&_block) <ide> def self.safe_fork(&_block) <ide> write.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) <ide> yield <ide> rescue Exception => e # rubocop:disable Lint/RescueException <del> Marshal.dump(e, write) <add> write.write e.to_json <ide> write.close <ide> exit! <ide> else <ide> def self.safe_fork(&_block) <ide> data = read.read <ide> read.close <ide> Process.wait(pid) unless socket.nil? <del> raise Marshal.load(data) unless data.nil? || data.empty? # rubocop:disable Security/MarshalLoad <add> raise ChildProcessError, JSON.parse(data) unless data.nil? || data.empty? <ide> raise Interrupt if $CHILD_STATUS.exitstatus == 130 <ide> raise "Forked child process failed: #{$CHILD_STATUS}" unless $CHILD_STATUS.success? <ide> end
7
Text
Text
resolve merge conflict, attempt 3
319a8a241e0b9182ea309b886e2d23e2f4d73c6c
<ide><path>docs/sources/articles/https.md <ide> page_title: Docker HTTPS Setup <del>page_description: How to setup docker with https <add>page_description: How to set Docker up with https <ide> page_keywords: docker, example, https, daemon <ide> <ide> # Running Docker with https <ide> <ide> By default, Docker runs via a non-networked Unix socket. It can also <ide> optionally communicate using a HTTP socket. <ide> <del>If you need Docker reachable via the network in a safe manner, you can <del>enable TLS by specifying the tlsverify flag and pointing Docker's <del>tlscacert flag to a trusted CA certificate. <add>If you need Docker to be reachable via the network in a safe manner, you can <add>enable TLS by specifying the `tlsverify` flag and pointing Docker's <add>`tlscacert` flag to a trusted CA certificate. <ide> <ide> In daemon mode, it will only allow connections from clients <ide> authenticated by a certificate signed by that CA. In client mode, it <ide> will only connect to servers with a certificate signed by that CA. <ide> <ide> > **Warning**: <del>> Using TLS and managing a CA is an advanced topic. Please make you self <del>> familiar with OpenSSL, x509 and TLS before using it in production. <add>> Using TLS and managing a CA is an advanced topic. Please familiarize yourself <add>> with OpenSSL, x509 and TLS before using it in production. <ide> <ide> > **Warning**: <ide> > These TLS commands will only generate a working set of certificates on Linux. <ide> keys: <ide> $ openssl req -new -x509 -days 365 -key ca-key.pem -out ca.pem <ide> <ide> Now that we have a CA, you can create a server key and certificate <del>signing request. Make sure that "Common Name (e.g. server FQDN or YOUR <del>name)" matches the hostname you will use to connect to Docker: <add>signing request (CSR). Make sure that "Common Name" (i.e. server FQDN or YOUR <add>name) matches the hostname you will use to connect to Docker: <ide> <ide> $ openssl genrsa -des3 -out server-key.pem 2048 <del> $ openssl req -subj '/CN=**<Your Hostname Here>**' -new -key server-key.pem -out server.csr <add> $ openssl req -subj '/CN=<Your Hostname Here>' -new -key server-key.pem -out server.csr <ide> <ide> Next we're going to sign the key with our CA: <ide> <ide> request: <ide> $ openssl genrsa -des3 -out client-key.pem 2048 <ide> $ openssl req -subj '/CN=client' -new -key client-key.pem -out client.csr <ide> <del>To make the key suitable for client authentication, create a extensions <add>To make the key suitable for client authentication, create an extensions <ide> config file: <ide> <ide> $ echo extendedKeyUsage = clientAuth > extfile.cnf <ide> Now sign the key: <ide> $ openssl x509 -req -days 365 -in client.csr -CA ca.pem -CAkey ca-key.pem \ <ide> -out client-cert.pem -extfile extfile.cnf <ide> <del>Finally you need to remove the passphrase from the client and server <del>key: <add>Finally, you need to remove the passphrase from the client and server key: <ide> <ide> $ openssl rsa -in server-key.pem -out server-key.pem <ide> $ openssl rsa -in client-key.pem -out client-key.pem <ide> need to provide your client keys, certificates and trusted CA: <ide> > Docker over TLS should run on TCP port 2376. <ide> <ide> > **Warning**: <del>> As shown in the example above, you don't have to run the <del>> `docker` client with `sudo` or <del>> the `docker` group when you use certificate <add>> As shown in the example above, you don't have to run the `docker` client <add>> with `sudo` or the `docker` group when you use certificate <ide> > authentication. That means anyone with the keys can give any <ide> > instructions to your Docker daemon, giving them root access to the <ide> > machine hosting the daemon. Guard these keys as you would a root <ide> Docker in various other modes by mixing the flags. <ide> <ide> ### Daemon modes <ide> <del> - tlsverify, tlscacert, tlscert, tlskey set: Authenticate clients <del> - tls, tlscert, tlskey: Do not authenticate clients <add> - `tlsverify`, `tlscacert`, `tlscert`, `tlskey` set: Authenticate clients <add> - `tls`, `tlscert`, `tlskey`: Do not authenticate clients <ide> <ide> ### Client modes <ide> <del> - tls: Authenticate server based on public/default CA pool <del> - tlsverify, tlscacert: Authenticate server based on given CA <del> - tls, tlscert, tlskey: Authenticate with client certificate, do not <add> - `tls`: Authenticate server based on public/default CA pool <add> - `tlsverify`, `tlscacert`: Authenticate server based on given CA <add> - `tls`, `tlscert`, `tlskey`: Authenticate with client certificate, do not <ide> authenticate server based on given CA <del> - tlsverify, tlscacert, tlscert, tlskey: Authenticate with client <del> certificate, authenticate server based on given CA <add> - `tlsverify`, `tlscacert`, `tlscert`, `tlskey`: Authenticate with client <add> certificate and authenticate server based on given CA <ide> <ide> The client will send its client certificate if found, so you just need <del>to drop your keys into ~/.docker/<ca, cert or key>.pem. Alternatively, if you <add>to drop your keys into `~/.docker/<ca, cert or key>.pem`. Alternatively, if you <ide> want to store your keys in another location, you can specify that location <ide> using the environment variable `DOCKER_CONFIG`. <ide>
1
Go
Go
remove explicit set of memberlist protocol
da9ac65ea65e4badf1be178a026abe0c7de91c98
<ide><path>libnetwork/networkdb/cluster.go <ide> func (nDB *NetworkDB) clusterInit() error { <ide> config.BindPort = nDB.config.BindPort <ide> } <ide> <del> config.ProtocolVersion = memberlist.ProtocolVersionMax <add> config.ProtocolVersion = memberlist.ProtocolVersion2Compatible <ide> config.Delegate = &delegate{nDB: nDB} <ide> config.Events = &eventDelegate{nDB: nDB} <ide> // custom logger that does not add time or date, so they are not
1
Javascript
Javascript
add rntester example for nested text
67af1b8218c4bca43d8fce32ae99b9d76d6fc364
<ide><path>packages/rn-tester/js/examples/Text/TextExample.android.js <ide> class TextExample extends React.Component<{...}> { <ide> <Text style={{fontSize: 12}}> <ide> <Entity>Entity Name</Entity> <ide> </Text> <add> <Text style={{fontSize: 8}}> <add> Nested text with size 8,{' '} <add> <Text style={{fontSize: 23}}>size 23, </Text> <add> and size 8 again <add> </Text> <add> <Text style={{color: 'red'}}> <add> Nested text with red color,{' '} <add> <Text style={{color: 'blue'}}>blue color, </Text> <add> and red color again <add> </Text> <ide> </RNTesterBlock> <ide> <RNTesterBlock title="Text Align"> <ide> <Text>auto (default) - english LTR</Text>
1
Javascript
Javascript
keep withcredentials on passthrough
3079a6f4e097a777414b8c3a8a87b8e1e20b55b5
<ide><path>src/ngMock/angular-mocks.js <ide> function createHttpBackendMock($rootScope, $delegate, $browser) { <ide> } <ide> <ide> // TODO(vojta): change params to: method, url, data, headers, callback <del> function $httpBackend(method, url, data, callback, headers, timeout) { <add> function $httpBackend(method, url, data, callback, headers, timeout, withCredentials) { <ide> var xhr = new MockXhr(), <ide> expectation = expectations[0], <ide> wasExpected = false; <ide> function createHttpBackendMock($rootScope, $delegate, $browser) { <ide> // if $browser specified, we do auto flush all requests <ide> ($browser ? $browser.defer : responsesPush)(wrapResponse(definition)); <ide> } else if (definition.passThrough) { <del> $delegate(method, url, data, callback, headers, timeout); <add> $delegate(method, url, data, callback, headers, timeout, withCredentials); <ide> } else throw Error('No response defined !'); <ide> return; <ide> } <ide><path>test/ngMock/angular-mocksSpec.js <ide> describe('ngMockE2E', function() { <ide> describe('passThrough()', function() { <ide> it('should delegate requests to the real backend when passThrough is invoked', function() { <ide> hb.when('GET', /\/passThrough\/.*/).passThrough(); <del> hb('GET', '/passThrough/23', null, callback); <add> hb('GET', '/passThrough/23', null, callback, {}, null, true); <ide> <ide> expect(realHttpBackend).toHaveBeenCalledOnceWith( <del> 'GET', '/passThrough/23', null, callback, undefined, undefined); <add> 'GET', '/passThrough/23', null, callback, {}, null, true); <ide> }); <ide> }); <ide>
2
PHP
PHP
fix whitespace error
e2781a536adc9491e363e2c79d2da9a417778a0d
<ide><path>lib/Cake/Error/exceptions.php <ide> public function __construct($message, $code = 500) { <ide> } <ide> parent::__construct($message, $code); <ide> } <add> <ide> } <ide> <ide> /**
1
Java
Java
use write aggregator from databufferutils
8a129ef3daf8a28728314905d4b843a4129d9a87
<ide><path>spring-core/src/main/java/org/springframework/core/codec/AbstractDataBufferDecoder.java <ide> /* <del> * Copyright 2002-2017 the original author or authors. <add> * Copyright 2002-2018 the original author or authors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); <ide> * you may not use this file except in compliance with the License. <ide> <ide> import org.springframework.core.ResolvableType; <ide> import org.springframework.core.io.buffer.DataBuffer; <add>import org.springframework.core.io.buffer.DataBufferUtils; <ide> import org.springframework.lang.Nullable; <ide> import org.springframework.util.MimeType; <ide> <ide> public Mono<T> decodeToMono(Publisher<DataBuffer> inputStream, ResolvableType el <ide> @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) { <ide> <ide> return Flux.from(inputStream) <del> .reduce(DataBuffer::write) <add> .reduce(DataBufferUtils.writeAggregator()) <ide> .map(buffer -> decodeDataBuffer(buffer, elementType, mimeType, hints)); <ide> } <ide> <ide><path>spring-web/src/main/java/org/springframework/http/codec/FormHttpMessageReader.java <ide> /* <del> * Copyright 2002-2017 the original author or authors. <add> * Copyright 2002-2018 the original author or authors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); <ide> * you may not use this file except in compliance with the License. <ide> import reactor.core.publisher.Mono; <ide> <ide> import org.springframework.core.ResolvableType; <del>import org.springframework.core.io.buffer.DataBuffer; <ide> import org.springframework.core.io.buffer.DataBufferUtils; <ide> import org.springframework.http.MediaType; <ide> import org.springframework.http.ReactiveHttpInputMessage; <ide> public Mono<MultiValueMap<String, String>> readMono(ResolvableType elementType, <ide> MediaType contentType = message.getHeaders().getContentType(); <ide> Charset charset = getMediaTypeCharset(contentType); <ide> <del> return message.getBody() <del> .reduce(DataBuffer::write) <add> return message.getBody().reduce(DataBufferUtils.writeAggregator()) <ide> .map(buffer -> { <ide> CharBuffer charBuffer = charset.decode(buffer.asByteBuffer()); <ide> String body = charBuffer.toString(); <ide><path>spring-web/src/main/java/org/springframework/http/codec/xml/XmlEventDecoder.java <ide> /* <del> * Copyright 2002-2017 the original author or authors. <add> * Copyright 2002-2018 the original author or authors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); <ide> * you may not use this file except in compliance with the License. <ide> public Flux<XMLEvent> decode(Publisher<DataBuffer> inputStream, ResolvableType e <ide> .doFinally(signalType -> aaltoMapper.endOfInput()); <ide> } <ide> else { <del> Mono<DataBuffer> singleBuffer = flux.reduce(DataBuffer::write); <add> Mono<DataBuffer> singleBuffer = flux.reduce(DataBufferUtils.writeAggregator()); <ide> return singleBuffer. <ide> flatMapMany(dataBuffer -> { <ide> try { <ide><path>spring-web/src/test/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReaderTests.java <ide> /* <del> * Copyright 2002-2017 the original author or authors. <add> * Copyright 2002-2018 the original author or authors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); <ide> * you may not use this file except in compliance with the License. <ide> import org.springframework.core.ResolvableType; <ide> import org.springframework.core.io.ClassPathResource; <ide> import org.springframework.core.io.buffer.DataBuffer; <add>import org.springframework.core.io.buffer.DataBufferUtils; <ide> import org.springframework.core.io.buffer.DefaultDataBufferFactory; <ide> import org.springframework.http.HttpEntity; <ide> import org.springframework.http.HttpHeaders; <ide> import org.springframework.util.MultiValueMap; <ide> <ide> import static java.util.Collections.emptyMap; <del>import static org.junit.Assert.assertEquals; <del>import static org.junit.Assert.assertFalse; <del>import static org.junit.Assert.assertTrue; <add>import static org.junit.Assert.*; <ide> import static org.springframework.core.ResolvableType.forClassWithGenerics; <ide> import static org.springframework.http.HttpHeaders.CONTENT_LENGTH; <ide> import static org.springframework.http.HttpHeaders.CONTENT_TYPE; <ide> public void resolveParts() throws IOException { <ide> assertTrue(part instanceof FilePart); <ide> assertEquals("fooPart", part.name()); <ide> assertEquals("foo.txt", ((FilePart) part).filename()); <del> DataBuffer buffer = part.content().reduce(DataBuffer::write).block(); <add> DataBuffer buffer = part.content().reduce(DataBufferUtils.writeAggregator()).block(); <ide> assertEquals(12, buffer.readableByteCount()); <ide> byte[] byteContent = new byte[12]; <ide> buffer.read(byteContent); <ide><path>spring-web/src/test/java/org/springframework/http/server/reactive/MultipartIntegrationTests.java <ide> /* <del> * Copyright 2002-2017 the original author or authors. <add> * Copyright 2002-2018 the original author or authors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); <ide> * you may not use this file except in compliance with the License. <ide> <ide> import org.springframework.core.io.ClassPathResource; <ide> import org.springframework.core.io.buffer.DataBuffer; <add>import org.springframework.core.io.buffer.DataBufferUtils; <ide> import org.springframework.http.HttpEntity; <ide> import org.springframework.http.HttpHeaders; <ide> import org.springframework.http.HttpStatus; <ide> private void assertFooPart(Part part) { <ide> assertEquals("foo.txt", ((FilePart) part).filename()); <ide> DataBuffer buffer = part <ide> .content() <del> .reduce(DataBuffer::write) <add> .reduce(DataBufferUtils.writeAggregator()) <ide> .block(); <ide> assertEquals(12, buffer.readableByteCount()); <ide> byte[] byteContent = new byte[12]; <ide><path>spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClient.java <ide> /* <del> * Copyright 2002-2017 the original author or authors. <add> * Copyright 2002-2018 the original author or authors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); <ide> * you may not use this file except in compliance with the License. <ide> import reactor.core.publisher.Mono; <ide> <ide> import org.springframework.core.ParameterizedTypeReference; <del>import org.springframework.core.io.buffer.DataBuffer; <ide> import org.springframework.core.io.buffer.DataBufferUtils; <ide> import org.springframework.http.HttpHeaders; <ide> import org.springframework.http.HttpMethod; <ide> private <T extends Publisher<?>> T bodyToPublisher(ClientResponse response, <ide> private static Mono<WebClientResponseException> createResponseException(ClientResponse response) { <ide> <ide> return response.body(BodyExtractors.toDataBuffers()) <del> .reduce(DataBuffer::write) <add> .reduce(DataBufferUtils.writeAggregator()) <ide> .map(dataBuffer -> { <ide> byte[] bytes = new byte[dataBuffer.readableByteCount()]; <ide> dataBuffer.read(bytes); <ide><path>spring-webflux/src/main/java/org/springframework/web/reactive/resource/AppCacheManifestTransformer.java <ide> /* <del> * Copyright 2002-2017 the original author or authors. <add> * Copyright 2002-2018 the original author or authors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); <ide> * you may not use this file except in compliance with the License. <ide> import reactor.core.publisher.SynchronousSink; <ide> <ide> import org.springframework.core.io.Resource; <del>import org.springframework.core.io.buffer.DataBuffer; <ide> import org.springframework.core.io.buffer.DataBufferFactory; <ide> import org.springframework.core.io.buffer.DataBufferUtils; <ide> import org.springframework.lang.Nullable; <ide> public Mono<Resource> transform(ServerWebExchange exchange, Resource inputResour <ide> } <ide> DataBufferFactory bufferFactory = exchange.getResponse().bufferFactory(); <ide> return DataBufferUtils.read(outputResource, bufferFactory, StreamUtils.BUFFER_SIZE) <del> .reduce(DataBuffer::write) <add> .reduce(DataBufferUtils.writeAggregator()) <ide> .flatMap(dataBuffer -> { <ide> CharBuffer charBuffer = DEFAULT_CHARSET.decode(dataBuffer.asByteBuffer()); <ide> DataBufferUtils.release(dataBuffer); <ide><path>spring-webflux/src/main/java/org/springframework/web/reactive/resource/ContentVersionStrategy.java <ide> /* <del> * Copyright 2002-2017 the original author or authors. <add> * Copyright 2002-2018 the original author or authors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); <ide> * you may not use this file except in compliance with the License. <ide> * You may obtain a copy of the License at <ide> * <del> * http://www.apache.org/licenses/LICENSE-2.0 <add> * http://www.apache.org/licenses/LICENSE-2.0 <ide> * <ide> * Unless required by applicable law or agreed to in writing, software <ide> * distributed under the License is distributed on an "AS IS" BASIS, <ide> import reactor.core.publisher.Mono; <ide> <ide> import org.springframework.core.io.Resource; <del>import org.springframework.core.io.buffer.DataBuffer; <ide> import org.springframework.core.io.buffer.DataBufferFactory; <ide> import org.springframework.core.io.buffer.DataBufferUtils; <ide> import org.springframework.core.io.buffer.DefaultDataBufferFactory; <ide> public class ContentVersionStrategy extends AbstractFileNameVersionStrategy { <ide> @Override <ide> public Mono<String> getResourceVersion(Resource resource) { <ide> return DataBufferUtils.read(resource, dataBufferFactory, StreamUtils.BUFFER_SIZE) <del> .reduce(DataBuffer::write) <add> .reduce(DataBufferUtils.writeAggregator()) <ide> .map(buffer -> { <ide> byte[] result = new byte[buffer.readableByteCount()]; <ide> buffer.read(result); <ide><path>spring-webflux/src/main/java/org/springframework/web/reactive/resource/CssLinkResourceTransformer.java <ide> /* <del> * Copyright 2002-2017 the original author or authors. <add> * Copyright 2002-2018 the original author or authors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); <ide> * you may not use this file except in compliance with the License. <ide> import reactor.core.publisher.Mono; <ide> <ide> import org.springframework.core.io.Resource; <del>import org.springframework.core.io.buffer.DataBuffer; <ide> import org.springframework.core.io.buffer.DataBufferFactory; <ide> import org.springframework.core.io.buffer.DataBufferUtils; <ide> import org.springframework.lang.Nullable; <ide> public Mono<Resource> transform(ServerWebExchange exchange, Resource inputResour <ide> <ide> DataBufferFactory bufferFactory = exchange.getResponse().bufferFactory(); <ide> return DataBufferUtils.read(ouptputResource, bufferFactory, StreamUtils.BUFFER_SIZE) <del> .reduce(DataBuffer::write) <add> .reduce(DataBufferUtils.writeAggregator()) <ide> .flatMap(dataBuffer -> { <ide> CharBuffer charBuffer = DEFAULT_CHARSET.decode(dataBuffer.asByteBuffer()); <ide> DataBufferUtils.release(dataBuffer); <ide><path>spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyInsertersTests.java <ide> /* <del> * Copyright 2002-2017 the original author or authors. <add> * Copyright 2002-2018 the original author or authors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); <ide> * you may not use this file except in compliance with the License. <ide> import org.springframework.util.MultiValueMap; <ide> <ide> import static java.nio.charset.StandardCharsets.UTF_8; <del>import static org.hamcrest.Matchers.*; <add>import static org.hamcrest.Matchers.containsString; <ide> import static org.junit.Assert.*; <ide> import static org.springframework.http.codec.json.Jackson2CodecSupport.JSON_VIEW_HINT; <ide> <ide> public void fromMultipartDataWithMultipleValues() { <ide> Mono<Void> result = inserter.insert(request, this.context); <ide> StepVerifier.create(result).expectComplete().verify(); <ide> <del> StepVerifier.create(request.getBody().reduce(DataBuffer::write)) <add> StepVerifier.create(request.getBody() <add> .reduce(DataBufferUtils.writeAggregator())) <ide> .consumeNextWith(dataBuffer -> { <ide> byte[] resultBytes = new byte[dataBuffer.readableByteCount()]; <ide> dataBuffer.read(resultBytes);
10
Java
Java
move backpressureutils to subscription
53b76e90fc5b3ad954439241ee85acd8209c5fca
<ide><path>spring-web-reactive/src/main/java/org/springframework/core/codec/support/AbstractRawByteStreamDecoder.java <ide> import org.reactivestreams.Subscriber; <ide> import reactor.Flux; <ide> import reactor.core.subscriber.SubscriberBarrier; <del>import reactor.core.support.BackpressureUtils; <add>import reactor.core.subscription.BackpressureUtils; <ide> <ide> import org.springframework.core.ResolvableType; <ide> import org.springframework.core.codec.Decoder; <ide><path>spring-web-reactive/src/main/java/org/springframework/core/codec/support/JsonObjectEncoder.java <ide> import reactor.Flux; <ide> import reactor.Mono; <ide> import reactor.core.subscriber.SubscriberBarrier; <del>import reactor.core.support.BackpressureUtils; <add>import reactor.core.subscription.BackpressureUtils; <ide> import reactor.io.buffer.Buffer; <ide> <ide> import org.springframework.core.ResolvableType; <ide><path>spring-web-reactive/src/main/java/org/springframework/http/server/reactive/UndertowHttpHandlerAdapter.java <ide> import org.xnio.channels.StreamSourceChannel; <ide> import reactor.Mono; <ide> import reactor.core.subscriber.BaseSubscriber; <del>import reactor.core.support.BackpressureUtils; <add>import reactor.core.subscription.BackpressureUtils; <ide> import reactor.core.support.Exceptions; <ide> <ide> import org.springframework.util.Assert;
3
Ruby
Ruby
expect xcode 8.0 on os x 10.11
860f4bd11ff06e5875756991e423f33f9ae4f0c8
<ide><path>Library/Homebrew/os/mac/xcode.rb <ide> def latest_version <ide> when "10.8" then "5.1.1" <ide> when "10.9" then "6.2" <ide> when "10.10" then "7.2.1" <del> when "10.11" then "7.3.1" <add> when "10.11" then "8.0" <ide> when "10.12" then "8.0" <ide> else <ide> # Default to newest known version of Xcode for unreleased macOS versions. <ide> def update_instructions <ide> def latest_version <ide> case MacOS.version <ide> when "10.12" then "800.0.38" <del> when "10.11" then "703.0.31" <add> when "10.11" then "800.0.38" <ide> when "10.10" then "700.1.81" <ide> when "10.9" then "600.0.57" <ide> when "10.8" then "503.0.40"
1
Ruby
Ruby
fix hg strategy under stdenv
cc932ca6681df313149985066f15a7bed516bc21
<ide><path>Library/Homebrew/download_strategy.rb <ide> def initialize name, package <ide> def cached_location; @clone; end <ide> <ide> def hgpath <del> @path ||= if which "hg" <del> 'hg' <del> else <del> "#{HOMEBREW_PREFIX}/bin/hg" <del> end <add> @path ||= (which "hg" || "#{HOMEBREW_PREFIX}/bin/hg") <ide> end <ide> <ide> def fetch
1
Java
Java
create cxx binding
e155e78451ec4e736169dbd6889919d9283d3806
<ide><path>ReactAndroid/src/main/java/com/facebook/react/fabric/FabricBinder.java <add>/** <add> * Copyright (c) 2014-present, Facebook, Inc. <add> * <add> * This source code is licensed under the MIT license found in the <add> * LICENSE file in the root directory of this source tree. <add> */ <add> <add>package com.facebook.react.fabric; <add> <add>public interface FabricBinder { <add> <add> void setBinding(FabricBinding binding); <add> <add>} <ide><path>ReactAndroid/src/main/java/com/facebook/react/fabric/FabricBinding.java <ide> <ide> import com.facebook.react.bridge.JavaScriptContextHolder; <ide> import com.facebook.react.bridge.NativeMap; <add>import com.facebook.react.bridge.UIManager; <ide> <ide> public interface FabricBinding { <ide> <del> void installFabric(JavaScriptContextHolder jsContext, FabricUIManager fabricModule); <add> void installFabric(JavaScriptContextHolder jsContext, FabricBinder fabricBinder); <ide> <ide> void releaseEventTarget(long jsContextNativePointer, long eventTargetPointer); <ide> <ide><path>ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java <ide> */ <ide> @SuppressWarnings("unused") // used from JNI <ide> @DoNotStrip <del>public class FabricUIManager implements UIManager, JSHandler { <add>public class FabricUIManager implements UIManager, JSHandler, FabricBinder { <ide> <ide> private static final String TAG = FabricUIManager.class.getSimpleName(); <ide> private static final boolean DEBUG = ReactBuildConfig.DEBUG || PrinterHolder.getPrinter().shouldDisplayLogMessage(ReactDebugOverlayTags.FABRIC_UI_MANAGER); <ide> public FabricUIManager( <ide> mJSContext = jsContext; <ide> } <ide> <add> @Override <ide> public void setBinding(FabricBinding binding) { <ide> mBinding = binding; <ide> } <ide><path>ReactAndroid/src/main/java/com/facebook/react/fabric/jsc/FabricJSCBinding.java <ide> import com.facebook.jni.HybridData; <ide> import com.facebook.proguard.annotations.DoNotStrip; <ide> import com.facebook.react.bridge.JavaScriptContextHolder; <add>import com.facebook.react.bridge.UIManager; <add>import com.facebook.react.fabric.FabricBinder; <ide> import com.facebook.react.fabric.FabricBinding; <ide> import com.facebook.react.fabric.FabricUIManager; <ide> import com.facebook.react.bridge.NativeMap; <ide> public FabricJSCBinding() { <ide> } <ide> <ide> @Override <del> public void installFabric(JavaScriptContextHolder jsContext, FabricUIManager fabricModule) { <add> public void installFabric(JavaScriptContextHolder jsContext, FabricBinder fabricModule) { <ide> fabricModule.setBinding(this); <ide> installFabric(jsContext.get(), fabricModule); <ide> }
4
Text
Text
update es6 class documentation with binding perf
fb13cf55feb3391af30fb8c9e45b6c2aec40c6ae
<ide><path>docs/docs/05-reusable-components.md <ide> export class Counter extends React.Component { <ide> constructor(props) { <ide> super(props); <ide> this.state = {count: props.initialCount}; <add> this.tick = this.tick.bind(this); <ide> } <ide> tick() { <ide> this.setState({count: this.state.count + 1}); <ide> } <ide> render() { <ide> return ( <del> <div onClick={this.tick.bind(this)}> <add> <div onClick={this.tick}> <ide> Clicks: {this.state.count} <ide> </div> <ide> ); <ide> Counter.defaultProps = { initialCount: 0 }; <ide> <ide> ### No Autobinding <ide> <del>Methods follow the same semantics as regular ES6 classes, meaning that they don't automatically bind `this` to the instance. You'll have to explicitly use `.bind(this)` or [arrow functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions) `=>`. <add>Methods follow the same semantics as regular ES6 classes, meaning that they don't automatically bind `this` to the instance. You'll have to explicitly use `.bind(this)` or [arrow functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions) `=>`: <add> <add>```javascript <add>// You can use bind() to preserve `this` <add><div onClick={this.tick.bind(this)}> <add> <add>// Or you can use arrow functions <add><div onClick={() => this.tick()}> <add>``` <add> <add>We recommend that you bind your event handlers in the constructor so they are only bound once for every instance: <add> <add>```javascript <add>constructor(props) { <add> super(props); <add> this.state = {count: props.initialCount}; <add> this.tick = this.tick.bind(this); <add>} <add>``` <add> <add>Now you can use `this.tick` directly as it was bound once in the constructor: <add> <add>```javascript <add>// It is already bound in the constructor <add><div onClick={this.tick}> <add>``` <add> <add>This is better for performance of your application, especially if you implement [shouldComponentUpdate()](/react/docs/component-specs.html#updating-shouldcomponentupdate) with a [shallow comparison](/react/docs/shallow-compare.html) in the child components. <ide> <ide> ### No Mixins <ide>
1
Ruby
Ruby
fix typo in ar store docs [ci skip]
2fd095507c2d48fdd24c8d2d060d1d01168e1d23
<ide><path>activerecord/lib/active_record/store.rb <ide> module ActiveRecord <ide> # JSON, YAML, Marshal are supported out of the box. Generally it can be any wrapper that provides +load+ and +dump+. <ide> # <ide> # NOTE - If you are using special PostgreSQL columns like +hstore+ or +json+ there is no need for <del> # the serialization provieded by +store+. You can simply use +store_accessor+ instead to generate <add> # the serialization provided by +store+. You can simply use +store_accessor+ instead to generate <ide> # the accessor methods. <ide> # <ide> # Examples:
1
Python
Python
change the page title to prioritize page content
e5caf48a12e777df3e5801fa19d98f59b6453aa2
<ide><path>mkdocs.py <ide> if filename == 'index.md': <ide> main_title = 'Django REST framework - APIs made easy' <ide> else: <del> main_title = 'Django REST framework - ' + main_title <add> main_title = main_title + ' - Django REST framework' <ide> <ide> if relative_path == 'index.md': <ide> canonical_url = base_url
1
Go
Go
use exportchanges() in runtime.diff()
d69a6a20f0b6657821638ee591920d071a784b0e
<ide><path>archive/changes.go <ide> func ChangesDirs(newDir, oldDir string) ([]Change, error) { <ide> return newRoot.Changes(oldRoot), nil <ide> } <ide> <del>func ExportChanges(root, rw string) (Archive, error) { <del> changes, err := ChangesDirs(root, rw) <del> if err != nil { <del> return nil, err <del> } <add>func ExportChanges(dir string, changes []Change) (Archive, error) { <ide> files := make([]string, 0) <ide> deletions := make([]string, 0) <ide> for _, change := range changes { <ide> func ExportChanges(root, rw string) (Archive, error) { <ide> deletions = append(deletions, filepath.Join(dir, ".wh."+base)) <ide> } <ide> } <del> return TarFilter(root, &TarOptions{Compression: Uncompressed, Recursive: false, Includes: files, CreateFiles: deletions}) <add> // FIXME: Why do we create whiteout files inside Tar code ? <add> return TarFilter(dir, &TarOptions{ <add> Compression: Uncompressed, <add> Includes: files, <add> Recursive: false, <add> CreateFiles: deletions, <add> }) <ide> } <ide><path>runtime.go <ide> import ( <ide> "os" <ide> "os/exec" <ide> "path" <del> "path/filepath" <ide> "sort" <ide> "strings" <ide> "time" <ide> func (runtime *Runtime) Diff(container *Container) (archive.Archive, error) { <ide> return nil, fmt.Errorf("Error getting container rootfs %s from driver %s: %s", container.ID, container.runtime.driver, err) <ide> } <ide> <del> files := make([]string, 0) <del> deletions := make([]string, 0) <del> for _, change := range changes { <del> if change.Kind == archive.ChangeModify || change.Kind == archive.ChangeAdd { <del> files = append(files, change.Path) <del> } <del> if change.Kind == archive.ChangeDelete { <del> base := filepath.Base(change.Path) <del> dir := filepath.Dir(change.Path) <del> deletions = append(deletions, filepath.Join(dir, ".wh."+base)) <del> } <del> } <del> // FIXME: Why do we create whiteout files inside Tar code ? <del> return archive.TarFilter(cDir, &archive.TarOptions{ <del> Compression: archive.Uncompressed, <del> Includes: files, <del> Recursive: false, <del> CreateFiles: deletions, <del> }) <add> return archive.ExportChanges(cDir, changes) <ide> } <ide> <ide> func linkLxcStart(root string) error {
2
Javascript
Javascript
fix disabled behavior
33ff4445dcf858cd5e6ba899163fd2a76774b641
<ide><path>Libraries/Text/Text.js <ide> const Text: React.AbstractComponent< <ide> const [isHighlighted, setHighlighted] = useState(false); <ide> <ide> const isPressable = <del> onPress != null || onLongPress != null || onStartShouldSetResponder != null; <add> (onPress != null || <add> onLongPress != null || <add> onStartShouldSetResponder != null) && <add> restProps.disabled !== true; <ide> <ide> const initialized = useLazyInitialization(isPressable); <ide> const config = useMemo(
1
Javascript
Javascript
add support for commonjs module definition
477e09f1d406b71f0c3f8990da7d0037c427125f
<ide><path>Chart.js <ide> define(function(){ <ide> return Chart; <ide> }); <add> } else if (typeof module === 'object' && module.exports) { <add> module.exports = Chart; <ide> } <ide> <ide> root.Chart = Chart; <ide><path>Chart.min.js <ide> * Released under the MIT license <ide> * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md <ide> */ <del>(function(){"use strict";var t=this,i=t.Chart,e=function(t){this.canvas=t.canvas,this.ctx=t;this.width=t.canvas.width,this.height=t.canvas.height;return this.aspectRatio=this.width/this.height,s.retinaScale(this),this};e.defaults={global:{animation:!0,animationSteps:60,animationEasing:"easeOutQuart",showScale:!0,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleIntegersOnly:!0,scaleBeginAtZero:!1,scaleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",responsive:!1,showTooltips:!0,tooltipEvents:["mousemove","touchstart","touchmove","mouseout"],tooltipFillColor:"rgba(0,0,0,0.8)",tooltipFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipFontSize:14,tooltipFontStyle:"normal",tooltipFontColor:"#fff",tooltipTitleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipTitleFontSize:14,tooltipTitleFontStyle:"bold",tooltipTitleFontColor:"#fff",tooltipYPadding:6,tooltipXPadding:6,tooltipCaretSize:8,tooltipCornerRadius:6,tooltipXOffset:10,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>",multiTooltipTemplate:"<%= value %>",multiTooltipKeyBackground:"#fff",onAnimationProgress:function(){},onAnimationComplete:function(){}}},e.types={};var s=e.helpers={},n=s.each=function(t,i,e){var s=Array.prototype.slice.call(arguments,3);if(t)if(t.length===+t.length){var n;for(n=0;n<t.length;n++)i.apply(e,[t[n],n].concat(s))}else for(var o in t)i.apply(e,[t[o],o].concat(s))},o=s.clone=function(t){var i={};return n(t,function(e,s){t.hasOwnProperty(s)&&(i[s]=e)}),i},a=s.extend=function(t){return n(Array.prototype.slice.call(arguments,1),function(i){n(i,function(e,s){i.hasOwnProperty(s)&&(t[s]=e)})}),t},h=s.merge=function(){var t=Array.prototype.slice.call(arguments,0);return t.unshift({}),a.apply(null,t)},l=s.indexOf=function(t,i){if(Array.prototype.indexOf)return t.indexOf(i);for(var e=0;e<t.length;e++)if(t[e]===i)return e;return-1},r=s.inherits=function(t){var i=this,e=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return i.apply(this,arguments)},s=function(){this.constructor=e};return s.prototype=i.prototype,e.prototype=new s,e.extend=r,t&&a(e.prototype,t),e.__super__=i.prototype,e},c=s.noop=function(){},u=s.uid=function(){var t=0;return function(){return"chart-"+t++}}(),d=s.warn=function(t){window.console&&"function"==typeof window.console.warn&&console.warn(t)},p=s.amd="function"==typeof t.define&&t.define.amd,f=s.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},g=s.max=function(t){return Math.max.apply(Math,t)},m=s.min=function(t){return Math.min.apply(Math,t)},v=(s.cap=function(t,i,e){if(f(i)){if(t>i)return i}else if(f(e)&&e>t)return e;return t},s.getDecimalPlaces=function(t){return t%1!==0&&f(t)?t.toString().split(".")[1].length:0}),S=s.radians=function(t){return t*(Math.PI/180)},x=(s.getAngleFromPoint=function(t,i){var e=i.x-t.x,s=i.y-t.y,n=Math.sqrt(e*e+s*s),o=2*Math.PI+Math.atan2(s,e);return 0>e&&0>s&&(o+=2*Math.PI),{angle:o,distance:n}},s.aliasPixel=function(t){return t%2===0?0:.5}),C=(s.splineCurve=function(t,i,e,s){var n=Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2)),o=Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2)),a=s*n/(n+o),h=s*o/(n+o);return{inner:{x:i.x-a*(e.x-t.x),y:i.y-a*(e.y-t.y)},outer:{x:i.x+h*(e.x-t.x),y:i.y+h*(e.y-t.y)}}},s.calculateOrderOfMagnitude=function(t){return Math.floor(Math.log(t)/Math.LN10)}),y=(s.calculateScaleRange=function(t,i,e,s,n){var o=2,a=Math.floor(i/(1.5*e)),h=o>=a,l=g(t),r=m(t);l===r&&(l+=.5,r>=.5&&!s?r-=.5:l+=.5);for(var c=Math.abs(l-r),u=C(c),d=Math.ceil(l/(1*Math.pow(10,u)))*Math.pow(10,u),p=s?0:Math.floor(r/(1*Math.pow(10,u)))*Math.pow(10,u),f=d-p,v=Math.pow(10,u),S=Math.round(f/v);(S>a||a>2*S)&&!h;)if(S>a)v*=2,S=Math.round(f/v),S%1!==0&&(h=!0);else if(n&&u>=0){if(v/2%1!==0)break;v/=2,S=Math.round(f/v)}else v/=2,S=Math.round(f/v);return h&&(S=o,v=f/S),{steps:S,stepValue:v,min:p,max:p+S*v}},s.template=function(t,i){function e(t,i){var e=/\W/.test(t)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+t.replace(/[\r\t\n]/g," ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):s[t]=s[t];return i?e(i):e}var s={};return e(t,i)}),b=(s.generateLabels=function(t,i,e,s){var o=new Array(i);return labelTemplateString&&n(o,function(i,n){o[n]=y(t,{value:e+s*(n+1)})}),o},s.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-0.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-0.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-0.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-0.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var i=1.70158,e=0,s=1;return 0===t?0:1==(t/=1)?1:(e||(e=.3),s<Math.abs(1)?(s=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/s),-(s*Math.pow(2,10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e)))},easeOutElastic:function(t){var i=1.70158,e=0,s=1;return 0===t?0:1==(t/=1)?1:(e||(e=.3),s<Math.abs(1)?(s=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/s),s*Math.pow(2,-10*t)*Math.sin(2*(1*t-i)*Math.PI/e)+1)},easeInOutElastic:function(t){var i=1.70158,e=0,s=1;return 0===t?0:2==(t/=.5)?1:(e||(e=.3*1.5),s<Math.abs(1)?(s=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/s),1>t?-.5*s*Math.pow(2,10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e):s*Math.pow(2,-10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e)*.5+1)},easeInBack:function(t){var i=1.70158;return 1*(t/=1)*t*((i+1)*t-i)},easeOutBack:function(t){var i=1.70158;return 1*((t=t/1-1)*t*((i+1)*t+i)+1)},easeInOutBack:function(t){var i=1.70158;return(t/=.5)<1?.5*t*t*(((i*=1.525)+1)*t-i):.5*((t-=2)*t*(((i*=1.525)+1)*t+i)+2)},easeInBounce:function(t){return 1-b.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?7.5625*t*t:2/2.75>t?1*(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return.5>t?.5*b.easeInBounce(2*t):.5*b.easeOutBounce(2*t-1)+.5}}),w=s.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),P=(s.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),s.animationLoop=function(t,i,e,s,n,o){var a=0,h=b[e]||b.linear,l=function(){a++;var e=a/i,r=h(e);t.call(o,r,e,a),s.call(o,r,e),i>a?o.animationFrame=w(l):n.apply(o)};w(l)},s.getRelativePosition=function(t){var i,e,s=t.originalEvent||t,n=t.currentTarget||t.srcElement,o=n.getBoundingClientRect();return s.touches?(i=s.touches[0].clientX-o.left,e=s.touches[0].clientY-o.top):(i=s.clientX-o.left,e=s.clientY-o.top),{x:i,y:e}},s.addEvent=function(t,i,e){t.addEventListener?t.addEventListener(i,e):t.attachEvent?t.attachEvent("on"+i,e):t["on"+i]=e}),L=s.removeEvent=function(t,i,e){t.removeEventListener?t.removeEventListener(i,e,!1):t.detachEvent?t.detachEvent("on"+i,e):t["on"+i]=c},k=(s.bindEvents=function(t,i,e){t.events||(t.events={}),n(i,function(i){t.events[i]=function(){e.apply(t,arguments)},P(t.chart.canvas,i,t.events[i])})},s.unbindEvents=function(t,i){n(i,function(i,e){L(t.chart.canvas,e,i)})}),F=s.getMaximumSize=function(t){var i=t.parentNode;return i.clientWidth},R=s.retinaScale=function(t){var i=t.ctx,e=t.canvas.width,s=t.canvas.height;window.devicePixelRatio&&(i.canvas.style.width=e+"px",i.canvas.style.height=s+"px",i.canvas.height=s*window.devicePixelRatio,i.canvas.width=e*window.devicePixelRatio,i.scale(window.devicePixelRatio,window.devicePixelRatio))},A=s.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},T=s.fontString=function(t,i,e){return i+" "+t+"px "+e},M=s.longestText=function(t,i,e){t.font=i;var s=0;return n(e,function(i){var e=t.measureText(i).width;s=e>s?e:s}),s},W=s.drawRoundedRectangle=function(t,i,e,s,n,o){t.beginPath(),t.moveTo(i+o,e),t.lineTo(i+s-o,e),t.quadraticCurveTo(i+s,e,i+s,e+o),t.lineTo(i+s,e+n-o),t.quadraticCurveTo(i+s,e+n,i+s-o,e+n),t.lineTo(i+o,e+n),t.quadraticCurveTo(i,e+n,i,e+n-o),t.lineTo(i,e+o),t.quadraticCurveTo(i,e,i+o,e),t.closePath()};e.instances={},e.Type=function(t,i,s){this.options=i,this.chart=s,this.id=u(),e.instances[this.id]=this,i.responsive&&this.resize(),this.initialize.call(this,t)},a(e.Type.prototype,{initialize:function(){return this},clear:function(){return A(this.chart),this},stop:function(){return s.cancelAnimFrame.call(t,this.animationFrame),this},resize:function(t){this.stop();var i=this.chart.canvas,e=F(this.chart.canvas),s=e/this.chart.aspectRatio;return i.width=this.chart.width=e,i.height=this.chart.height=s,R(this.chart),"function"==typeof t&&t.apply(this,Array.prototype.slice.call(arguments,1)),this},reflow:c,render:function(t){return t&&this.reflow(),this.options.animation&&!t?s.animationLoop(this.draw,this.options.animationSteps,this.options.animationEasing,this.options.onAnimationProgress,this.options.onAnimationComplete,this):(this.draw(),this.options.onAnimationComplete.call(this)),this},generateLegend:function(){return y(this.options.legendTemplate,this)},destroy:function(){this.clear(),k(this,this.events),delete e.instances[this.id]},showTooltip:function(t,i){"undefined"==typeof this.activeElements&&(this.activeElements=[]);var o=function(t){var i=!1;return t.length!==this.activeElements.length?i=!0:(n(t,function(t,e){t!==this.activeElements[e]&&(i=!0)},this),i)}.call(this,t);if(o||i){if(this.activeElements=t,this.draw(),t.length>0)if(this.datasets&&this.datasets.length>1){for(var a,h,r=this.datasets.length-1;r>=0&&(a=this.datasets[r].points||this.datasets[r].bars||this.datasets[r].segments,h=l(a,t[0]),-1===h);r--);var c=[],u=[],d=function(){var t,i,e,n,o,a=[],l=[],r=[];return s.each(this.datasets,function(i){t=i.points||i.bars||i.segments,a.push(t[h])}),s.each(a,function(t){l.push(t.x),r.push(t.y),c.push(s.template(this.options.multiTooltipTemplate,t)),u.push({fill:t._saved.fillColor||t.fillColor,stroke:t._saved.strokeColor||t.strokeColor})},this),o=m(r),e=g(r),n=m(l),i=g(l),{x:n>this.chart.width/2?n:i,y:(o+e)/2}}.call(this,h);new e.MultiTooltip({x:d.x,y:d.y,xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,xOffset:this.options.tooltipXOffset,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,titleTextColor:this.options.tooltipTitleFontColor,titleFontFamily:this.options.tooltipTitleFontFamily,titleFontStyle:this.options.tooltipTitleFontStyle,titleFontSize:this.options.tooltipTitleFontSize,cornerRadius:this.options.tooltipCornerRadius,labels:c,legendColors:u,legendColorBackground:this.options.multiTooltipKeyBackground,title:t[0].label,chart:this.chart,ctx:this.chart.ctx}).draw()}else n(t,function(t){var i=t.tooltipPosition();new e.Tooltip({x:Math.round(i.x),y:Math.round(i.y),xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,caretHeight:this.options.tooltipCaretSize,cornerRadius:this.options.tooltipCornerRadius,text:y(this.options.tooltipTemplate,t),chart:this.chart}).draw()},this);return this}},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),e.Type.extend=function(t){var i=this,s=function(){return i.apply(this,arguments)};if(s.prototype=o(i.prototype),a(s.prototype,t),s.extend=e.Type.extend,t.name||i.prototype.name){var n=t.name||i.prototype.name,l=e.defaults[i.prototype.name]?o(e.defaults[i.prototype.name]):{};e.defaults[n]=a(l,t.defaults),e.types[n]=s,e.prototype[n]=function(t,i){var o=h(e.defaults.global,e.defaults[n],i||{});return new s(t,o,this)}}else d("Name not provided for this chart, so it hasn't been registered");return i},e.Element=function(t){a(this,t),this.initialize.apply(this,arguments),this.save()},a(e.Element.prototype,{initialize:function(){},restore:function(t){return t?n(t,function(t){this[t]=this._saved[t]},this):a(this,this._saved),this},save:function(){return this._saved=o(this),delete this._saved._saved,this},update:function(t){return n(t,function(t,i){this._saved[i]=this[i],this[i]=t},this),this},transition:function(t,i){return n(t,function(t,e){this[e]=(t-this._saved[e])*i+this._saved[e]},this),this},tooltipPosition:function(){return{x:this.x,y:this.y}}}),e.Element.extend=r,e.Point=e.Element.extend({display:!0,inRange:function(t,i){var e=this.hitDetectionRadius+this.radius;return Math.pow(t-this.x,2)+Math.pow(i-this.y,2)<Math.pow(e,2)},draw:function(){if(this.display){var t=this.ctx;t.beginPath(),t.arc(this.x,this.y,this.radius,0,2*Math.PI),t.closePath(),t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.fillStyle=this.fillColor,t.fill(),t.stroke()}}}),e.Arc=e.Element.extend({inRange:function(t,i){var e=s.getAngleFromPoint(this,{x:t,y:i}),n=e.angle>=this.startAngle&&e.angle<=this.endAngle,o=e.distance>=this.innerRadius&&e.distance<=this.outerRadius;return n&&o},tooltipPosition:function(){var t=this.startAngle+(this.endAngle-this.startAngle)/2,i=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{x:this.x+Math.cos(t)*i,y:this.y+Math.sin(t)*i}},draw:function(t){var i=this.ctx;i.beginPath(),i.arc(this.x,this.y,this.outerRadius,this.startAngle,this.endAngle),i.arc(this.x,this.y,this.innerRadius,this.endAngle,this.startAngle,!0),i.closePath(),i.strokeStyle=this.strokeColor,i.lineWidth=this.strokeWidth,i.fillStyle=this.fillColor,i.fill(),i.lineJoin="bevel",this.showStroke&&i.stroke()}}),e.Rectangle=e.Element.extend({draw:function(){var t=this.ctx,i=this.width/2,e=this.x-i,s=this.x+i,n=this.base-(this.base-this.y),o=this.strokeWidth/2;this.showStroke&&(e+=o,s-=o,n+=o),t.beginPath(),t.fillStyle=this.fillColor,t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.moveTo(e,this.base),t.lineTo(e,n),t.lineTo(s,n),t.lineTo(s,this.base),t.fill(),this.showStroke&&t.stroke()},height:function(){return this.base-this.y},inRange:function(t,i){return t>=this.x-this.width/2&&t<=this.x+this.width/2&&i>=this.y&&i<=this.base}}),e.Tooltip=e.Element.extend({draw:function(){var t=this.chart.ctx;t.font=T(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var i=2,e=t.measureText(this.text).width+2*this.xPadding,s=this.fontSize+2*this.yPadding,n=s+this.caretHeight+i;this.x+e/2>this.chart.width?this.xAlign="left":this.x-e/2<0&&(this.xAlign="right"),this.y-n<0&&(this.yAlign="below");var o=this.x-e/2,a=this.y-n;switch(t.fillStyle=this.fillColor,this.yAlign){case"above":t.beginPath(),t.moveTo(this.x,this.y-i),t.lineTo(this.x+this.caretHeight,this.y-(i+this.caretHeight)),t.lineTo(this.x-this.caretHeight,this.y-(i+this.caretHeight)),t.closePath(),t.fill();break;case"below":a=this.y+i+this.caretHeight,t.beginPath(),t.moveTo(this.x,this.y+i),t.lineTo(this.x+this.caretHeight,this.y+i+this.caretHeight),t.lineTo(this.x-this.caretHeight,this.y+i+this.caretHeight),t.closePath(),t.fill()}switch(this.xAlign){case"left":o=this.x-e+(this.cornerRadius+this.caretHeight);break;case"right":o=this.x-(this.cornerRadius+this.caretHeight)}W(t,o,a,e,s,this.cornerRadius),t.fill(),t.fillStyle=this.textColor,t.textAlign="center",t.textBaseline="middle",t.fillText(this.text,o+e/2,a+s/2)}}),e.MultiTooltip=e.Element.extend({initialize:function(){this.font=T(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=T(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+2*this.yPadding+1.5*this.titleFontSize,this.ctx.font=this.titleFont;var t=this.ctx.measureText(this.title).width,i=M(this.ctx,this.font,this.labels)+this.fontSize+3,e=g([i,t]);this.width=e+2*this.xPadding;var s=this.height/2;this.y-s<0?this.y=s:this.y+s>this.chart.height&&(this.y=this.chart.height-s),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},getLineHeight:function(t){var i=this.y-this.height/2+this.yPadding,e=t-1;return 0===t?i+this.titleFontSize/2:i+(1.5*this.fontSize*e+this.fontSize/2)+1.5*this.titleFontSize},draw:function(){W(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var t=this.ctx;t.fillStyle=this.fillColor,t.fill(),t.closePath(),t.textAlign="left",t.textBaseline="middle",t.fillStyle=this.titleTextColor,t.font=this.titleFont,t.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),t.font=this.font,s.each(this.labels,function(i,e){t.fillStyle=this.textColor,t.fillText(i,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(e+1)),t.fillStyle=this.legendColorBackground,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize),t.fillStyle=this.legendColors[e].fill,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}),e.Scale=e.Element.extend({initialize:function(){this.fit()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),i=0;i<=this.steps;i++)this.yLabels.push(y(this.templateString,{value:(this.min+i*this.stepValue).toFixed(t)}));this.yLabelWidth=this.display&&this.showLabels?M(this.ctx,this.font,this.yLabels):0},addXLabel:function(t){this.xLabels.push(t),this.valuesCount++,this.fit()},removeXLabel:function(){this.xLabels.shift(),this.valuesCount--,this.fit()},fit:function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-1.5*this.fontSize-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var t,i=this.endPoint-this.startPoint;for(this.calculateYRange(i),this.buildYLabels(),this.calculateXLabelRotation();i>this.endPoint-this.startPoint;)i=this.endPoint-this.startPoint,t=this.yLabelWidth,this.calculateYRange(i),this.buildYLabels(),t<this.yLabelWidth&&this.calculateXLabelRotation()},calculateXLabelRotation:function(){this.ctx.font=this.font;var t,i,e=this.ctx.measureText(this.xLabels[0]).width,s=this.ctx.measureText(this.xLabels[this.xLabels.length-1]).width;if(this.xScalePaddingRight=s/2+3,this.xScalePaddingLeft=e/2>this.yLabelWidth+10?e/2:this.yLabelWidth+10,this.xLabelRotation=0,this.display){var n,o=M(this.ctx,this.font,this.xLabels);this.xLabelWidth=o;for(var a=Math.floor(this.calculateX(1)-this.calculateX(0))-6;this.xLabelWidth>a&&0===this.xLabelRotation||this.xLabelWidth>a&&this.xLabelRotation<=90&&this.xLabelRotation>0;)n=Math.cos(S(this.xLabelRotation)),t=n*e,i=n*s,t+this.fontSize/2>this.yLabelWidth+8&&(this.xScalePaddingLeft=t+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2,this.xLabelRotation++,this.xLabelWidth=n*o;this.xLabelRotation>0&&(this.endPoint-=Math.sin(S(this.xLabelRotation))*o+3)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},calculateYRange:c,drawingArea:function(){return this.startPoint-this.endPoint},calculateY:function(t){var i=this.drawingArea()/(this.min-this.max);return this.endPoint-i*(t-this.min)},calculateX:function(t){var i=(this.xLabelRotation>0,this.width-(this.xScalePaddingLeft+this.xScalePaddingRight)),e=i/(this.valuesCount-(this.offsetGridLines?0:1)),s=e*t+this.xScalePaddingLeft;return this.offsetGridLines&&(s+=e/2),Math.round(s)},update:function(t){s.extend(this,t),this.fit()},draw:function(){var t=this.ctx,i=(this.endPoint-this.startPoint)/this.steps,e=Math.round(this.xScalePaddingLeft);this.display&&(t.fillStyle=this.textColor,t.font=this.font,n(this.yLabels,function(n,o){var a=this.endPoint-i*o,h=Math.round(a);t.textAlign="right",t.textBaseline="middle",this.showLabels&&t.fillText(n,e-10,a),t.beginPath(),o>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),h+=s.aliasPixel(t.lineWidth),t.moveTo(e,h),t.lineTo(this.width,h),t.stroke(),t.closePath(),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(e-5,h),t.lineTo(e,h),t.stroke(),t.closePath()},this),n(this.xLabels,function(i,e){var s=this.calculateX(e)+x(this.lineWidth),n=this.calculateX(e-(this.offsetGridLines?.5:0))+x(this.lineWidth),o=this.xLabelRotation>0;t.beginPath(),e>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),t.moveTo(n,this.endPoint),t.lineTo(n,this.startPoint-3),t.stroke(),t.closePath(),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(n,this.endPoint),t.lineTo(n,this.endPoint+5),t.stroke(),t.closePath(),t.save(),t.translate(s,o?this.endPoint+12:this.endPoint+8),t.rotate(-1*S(this.xLabelRotation)),t.font=this.font,t.textAlign=o?"right":"center",t.textBaseline=o?"middle":"top",t.fillText(i,0,0),t.restore()},this))}}),e.RadialScale=e.Element.extend({initialize:function(){this.size=m([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},calculateCenterOffset:function(t){var i=this.drawingArea/(this.max-this.min);return(t-this.min)*i},update:function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),i=0;i<=this.steps;i++)this.yLabels.push(y(this.templateString,{value:(this.min+i*this.stepValue).toFixed(t)}))},getCircumference:function(){return 2*Math.PI/this.valuesCount},setScaleSize:function(){var t,i,e,s,n,o,a,h,l,r,c,u,d=m([this.height/2-this.pointLabelFontSize-5,this.width/2]),p=this.width,g=0;for(this.ctx.font=T(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),i=0;i<this.valuesCount;i++)t=this.getPointPosition(i,d),e=this.ctx.measureText(y(this.templateString,{value:this.labels[i]})).width+5,0===i||i===this.valuesCount/2?(s=e/2,t.x+s>p&&(p=t.x+s,n=i),t.x-s<g&&(g=t.x-s,a=i)):i<this.valuesCount/2?t.x+e>p&&(p=t.x+e,n=i):i>this.valuesCount/2&&t.x-e<g&&(g=t.x-e,a=i);l=g,r=Math.ceil(p-this.width),o=this.getIndexAngle(n),h=this.getIndexAngle(a),c=r/Math.sin(o+Math.PI/2),u=l/Math.sin(h+Math.PI/2),c=f(c)?c:0,u=f(u)?u:0,this.drawingArea=d-(u+c)/2,this.setCenterPoint(u,c)},setCenterPoint:function(t,i){var e=this.width-i-this.drawingArea,s=t+this.drawingArea;this.xCenter=(s+e)/2,this.yCenter=this.height/2},getIndexAngle:function(t){var i=2*Math.PI/this.valuesCount;return t*i-Math.PI/2},getPointPosition:function(t,i){var e=this.getIndexAngle(t);return{x:Math.cos(e)*i+this.xCenter,y:Math.sin(e)*i+this.yCenter}},draw:function(){if(this.display){var t=this.ctx;if(n(this.yLabels,function(i,e){if(e>0){var s,n=e*(this.drawingArea/this.steps),o=this.yCenter-n;if(this.lineWidth>0)if(t.strokeStyle=this.lineColor,t.lineWidth=this.lineWidth,this.lineArc)t.beginPath(),t.arc(this.xCenter,this.yCenter,n,0,2*Math.PI),t.closePath(),t.stroke();else{t.beginPath();for(var a=0;a<this.valuesCount;a++)s=this.getPointPosition(a,this.calculateCenterOffset(this.min+e*this.stepValue)),0===a?t.moveTo(s.x,s.y):t.lineTo(s.x,s.y);t.closePath(),t.stroke()}if(this.showLabels){if(t.font=T(this.fontSize,this.fontStyle,this.fontFamily),this.showLabelBackdrop){var h=t.measureText(i).width;t.fillStyle=this.backdropColor,t.fillRect(this.xCenter-h/2-this.backdropPaddingX,o-this.fontSize/2-this.backdropPaddingY,h+2*this.backdropPaddingX,this.fontSize+2*this.backdropPaddingY)}t.textAlign="center",t.textBaseline="middle",t.fillStyle=this.fontColor,t.fillText(i,this.xCenter,o)}}},this),!this.lineArc){t.lineWidth=this.angleLineWidth,t.strokeStyle=this.angleLineColor;for(var i=this.valuesCount-1;i>=0;i--){if(this.angleLineWidth>0){var e=this.getPointPosition(i,this.calculateCenterOffset(this.max));t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(e.x,e.y),t.stroke(),t.closePath()}var s=this.getPointPosition(i,this.calculateCenterOffset(this.max)+5);t.font=T(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),t.fillStyle=this.pointLabelFontColor;var o=this.labels.length,a=this.labels.length/2,h=a/2,l=h>i||i>o-h,r=i===h||i===o-h;t.textAlign=0===i?"center":i===a?"center":a>i?"left":"right",t.textBaseline=r?"middle":l?"bottom":"top",t.fillText(this.labels[i],s.x,s.y)}}}}}),s.addEvent(window,"resize",function(){var t;return function(){clearTimeout(t),t=setTimeout(function(){n(e.instances,function(t){t.options.responsive&&t.resize(t.render,!0)})},50)}}()),p&&define(function(){return e}),t.Chart=e,e.noConflict=function(){return t.Chart=i,e}}).call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={scaleBeginAtZero:!0,scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,barShowStroke:!0,barStrokeWidth:2,barValueSpacing:5,barDatasetSpacing:1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].fillColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};i.Type.extend({name:"Bar",defaults:s,initialize:function(t){var s=this.options;this.ScaleClass=i.Scale.extend({offsetGridLines:!0,calculateBarX:function(t,i,e){var n=this.calculateBaseWidth(),o=this.calculateX(e)-n/2,a=this.calculateBarWidth(t);return o+a*i+i*s.barDatasetSpacing+a/2},calculateBaseWidth:function(){return this.calculateX(1)-this.calculateX(0)-2*s.barValueSpacing},calculateBarWidth:function(t){var i=this.calculateBaseWidth()-(t-1)*s.barDatasetSpacing;return i/t}}),this.datasets=[],this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getBarsAtEvent(t):[];this.eachBars(function(t){t.restore(["fillColor","strokeColor"])}),e.each(i,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(i)}),this.BarClass=i.Rectangle.extend({strokeWidth:this.options.barStrokeWidth,showStroke:this.options.barShowStroke,ctx:this.chart.ctx}),e.each(t.datasets,function(i){var s={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,bars:[]};this.datasets.push(s),e.each(i.data,function(n,o){e.isNumber(n)&&s.bars.push(new this.BarClass({value:n,label:t.labels[o],strokeColor:i.strokeColor,fillColor:i.fillColor,highlightFill:i.highlightFill||i.fillColor,highlightStroke:i.highlightStroke||i.strokeColor}))},this)},this),this.buildScale(t.labels),this.BarClass.prototype.base=this.scale.endPoint,this.eachBars(function(t,i,s){e.extend(t,{width:this.scale.calculateBarWidth(this.datasets.length),x:this.scale.calculateBarX(this.datasets.length,s,i),y:this.scale.endPoint}),t.save()},this),this.render()},update:function(){this.scale.update(),e.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachBars(function(t){t.save()}),this.render()},eachBars:function(t){e.each(this.datasets,function(i,s){e.each(i.bars,t,this,s)},this)},getBarsAtEvent:function(t){for(var i,s=[],n=e.getRelativePosition(t),o=function(t){s.push(t.bars[i])},a=0;a<this.datasets.length;a++)for(i=0;i<this.datasets[a].bars.length;i++)if(this.datasets[a].bars[i].inRange(n.x,n.y))return e.each(this.datasets,o),s;return s},buildScale:function(t){var i=this,s=function(){var t=[];return i.eachBars(function(i){t.push(i.value)}),t},n={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:t.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(t){var i=e.calculateScaleRange(s(),t,this.fontSize,this.beginAtZero,this.integersOnly);e.extend(this,i)},xLabels:t,font:e.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.barShowStroke?this.options.barStrokeWidth:0,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&e.extend(n,{calculateYRange:e.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new this.ScaleClass(n)},addData:function(t,i){e.each(t,function(t,s){e.isNumber(t)&&this.datasets[s].bars.push(new this.BarClass({value:t,label:i,x:this.scale.calculateBarX(this.datasets.length,s,this.scale.valuesCount+1),y:this.scale.endPoint,width:this.scale.calculateBarWidth(this.datasets.length),base:this.scale.endPoint,strokeColor:this.datasets[s].strokeColor,fillColor:this.datasets[s].fillColor}))},this),this.scale.addXLabel(i),this.update()},removeData:function(){this.scale.removeXLabel(),e.each(this.datasets,function(t){t.bars.shift()},this),this.update()},reflow:function(){e.extend(this.BarClass.prototype,{y:this.scale.endPoint,base:this.scale.endPoint});var t=e.extend({height:this.chart.height,width:this.chart.width});this.scale.update(t)},draw:function(t){var i=t||1;this.clear();this.chart.ctx;this.scale.draw(i),e.each(this.datasets,function(t,s){e.each(t.bars,function(t,e){t.base=this.scale.endPoint,t.transition({x:this.scale.calculateBarX(this.datasets.length,s,e),y:this.scale.calculateY(t.value),width:this.scale.calculateBarWidth(this.datasets.length)},i).draw()},this)},this)}})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,percentageInnerCutout:50,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'};i.Type.extend({name:"Doughnut",defaults:s,initialize:function(t){this.segments=[],this.outerRadius=(e.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,this.SegmentArc=i.Arc.extend({ctx:this.chart.ctx,x:this.chart.width/2,y:this.chart.height/2}),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getSegmentsAtEvent(t):[]; <add>(function(){"use strict";var t=this,i=t.Chart,e=function(t){this.canvas=t.canvas,this.ctx=t;this.width=t.canvas.width,this.height=t.canvas.height;return this.aspectRatio=this.width/this.height,s.retinaScale(this),this};e.defaults={global:{animation:!0,animationSteps:60,animationEasing:"easeOutQuart",showScale:!0,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleIntegersOnly:!0,scaleBeginAtZero:!1,scaleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",responsive:!1,showTooltips:!0,tooltipEvents:["mousemove","touchstart","touchmove","mouseout"],tooltipFillColor:"rgba(0,0,0,0.8)",tooltipFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipFontSize:14,tooltipFontStyle:"normal",tooltipFontColor:"#fff",tooltipTitleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipTitleFontSize:14,tooltipTitleFontStyle:"bold",tooltipTitleFontColor:"#fff",tooltipYPadding:6,tooltipXPadding:6,tooltipCaretSize:8,tooltipCornerRadius:6,tooltipXOffset:10,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>",multiTooltipTemplate:"<%= value %>",multiTooltipKeyBackground:"#fff",onAnimationProgress:function(){},onAnimationComplete:function(){}}},e.types={};var s=e.helpers={},n=s.each=function(t,i,e){var s=Array.prototype.slice.call(arguments,3);if(t)if(t.length===+t.length){var n;for(n=0;n<t.length;n++)i.apply(e,[t[n],n].concat(s))}else for(var o in t)i.apply(e,[t[o],o].concat(s))},o=s.clone=function(t){var i={};return n(t,function(e,s){t.hasOwnProperty(s)&&(i[s]=e)}),i},a=s.extend=function(t){return n(Array.prototype.slice.call(arguments,1),function(i){n(i,function(e,s){i.hasOwnProperty(s)&&(t[s]=e)})}),t},h=s.merge=function(){var t=Array.prototype.slice.call(arguments,0);return t.unshift({}),a.apply(null,t)},l=s.indexOf=function(t,i){if(Array.prototype.indexOf)return t.indexOf(i);for(var e=0;e<t.length;e++)if(t[e]===i)return e;return-1},r=s.inherits=function(t){var i=this,e=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return i.apply(this,arguments)},s=function(){this.constructor=e};return s.prototype=i.prototype,e.prototype=new s,e.extend=r,t&&a(e.prototype,t),e.__super__=i.prototype,e},c=s.noop=function(){},u=s.uid=function(){var t=0;return function(){return"chart-"+t++}}(),d=s.warn=function(t){window.console&&"function"==typeof window.console.warn&&console.warn(t)},p=s.amd="function"==typeof t.define&&t.define.amd,f=s.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},g=s.max=function(t){return Math.max.apply(Math,t)},m=s.min=function(t){return Math.min.apply(Math,t)},v=(s.cap=function(t,i,e){if(f(i)){if(t>i)return i}else if(f(e)&&e>t)return e;return t},s.getDecimalPlaces=function(t){return t%1!==0&&f(t)?t.toString().split(".")[1].length:0}),S=s.radians=function(t){return t*(Math.PI/180)},x=(s.getAngleFromPoint=function(t,i){var e=i.x-t.x,s=i.y-t.y,n=Math.sqrt(e*e+s*s),o=2*Math.PI+Math.atan2(s,e);return 0>e&&0>s&&(o+=2*Math.PI),{angle:o,distance:n}},s.aliasPixel=function(t){return t%2===0?0:.5}),C=(s.splineCurve=function(t,i,e,s){var n=Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2)),o=Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2)),a=s*n/(n+o),h=s*o/(n+o);return{inner:{x:i.x-a*(e.x-t.x),y:i.y-a*(e.y-t.y)},outer:{x:i.x+h*(e.x-t.x),y:i.y+h*(e.y-t.y)}}},s.calculateOrderOfMagnitude=function(t){return Math.floor(Math.log(t)/Math.LN10)}),y=(s.calculateScaleRange=function(t,i,e,s,n){var o=2,a=Math.floor(i/(1.5*e)),h=o>=a,l=g(t),r=m(t);l===r&&(l+=.5,r>=.5&&!s?r-=.5:l+=.5);for(var c=Math.abs(l-r),u=C(c),d=Math.ceil(l/(1*Math.pow(10,u)))*Math.pow(10,u),p=s?0:Math.floor(r/(1*Math.pow(10,u)))*Math.pow(10,u),f=d-p,v=Math.pow(10,u),S=Math.round(f/v);(S>a||a>2*S)&&!h;)if(S>a)v*=2,S=Math.round(f/v),S%1!==0&&(h=!0);else if(n&&u>=0){if(v/2%1!==0)break;v/=2,S=Math.round(f/v)}else v/=2,S=Math.round(f/v);return h&&(S=o,v=f/S),{steps:S,stepValue:v,min:p,max:p+S*v}},s.template=function(t,i){function e(t,i){var e=/\W/.test(t)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+t.replace(/[\r\t\n]/g," ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):s[t]=s[t];return i?e(i):e}var s={};return e(t,i)}),b=(s.generateLabels=function(t,i,e,s){var o=new Array(i);return labelTemplateString&&n(o,function(i,n){o[n]=y(t,{value:e+s*(n+1)})}),o},s.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-0.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-0.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-0.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-0.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var i=1.70158,e=0,s=1;return 0===t?0:1==(t/=1)?1:(e||(e=.3),s<Math.abs(1)?(s=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/s),-(s*Math.pow(2,10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e)))},easeOutElastic:function(t){var i=1.70158,e=0,s=1;return 0===t?0:1==(t/=1)?1:(e||(e=.3),s<Math.abs(1)?(s=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/s),s*Math.pow(2,-10*t)*Math.sin(2*(1*t-i)*Math.PI/e)+1)},easeInOutElastic:function(t){var i=1.70158,e=0,s=1;return 0===t?0:2==(t/=.5)?1:(e||(e=.3*1.5),s<Math.abs(1)?(s=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/s),1>t?-.5*s*Math.pow(2,10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e):s*Math.pow(2,-10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e)*.5+1)},easeInBack:function(t){var i=1.70158;return 1*(t/=1)*t*((i+1)*t-i)},easeOutBack:function(t){var i=1.70158;return 1*((t=t/1-1)*t*((i+1)*t+i)+1)},easeInOutBack:function(t){var i=1.70158;return(t/=.5)<1?.5*t*t*(((i*=1.525)+1)*t-i):.5*((t-=2)*t*(((i*=1.525)+1)*t+i)+2)},easeInBounce:function(t){return 1-b.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?7.5625*t*t:2/2.75>t?1*(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return.5>t?.5*b.easeInBounce(2*t):.5*b.easeOutBounce(2*t-1)+.5}}),w=s.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),P=(s.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),s.animationLoop=function(t,i,e,s,n,o){var a=0,h=b[e]||b.linear,l=function(){a++;var e=a/i,r=h(e);t.call(o,r,e,a),s.call(o,r,e),i>a?o.animationFrame=w(l):n.apply(o)};w(l)},s.getRelativePosition=function(t){var i,e,s=t.originalEvent||t,n=t.currentTarget||t.srcElement,o=n.getBoundingClientRect();return s.touches?(i=s.touches[0].clientX-o.left,e=s.touches[0].clientY-o.top):(i=s.clientX-o.left,e=s.clientY-o.top),{x:i,y:e}},s.addEvent=function(t,i,e){t.addEventListener?t.addEventListener(i,e):t.attachEvent?t.attachEvent("on"+i,e):t["on"+i]=e}),L=s.removeEvent=function(t,i,e){t.removeEventListener?t.removeEventListener(i,e,!1):t.detachEvent?t.detachEvent("on"+i,e):t["on"+i]=c},k=(s.bindEvents=function(t,i,e){t.events||(t.events={}),n(i,function(i){t.events[i]=function(){e.apply(t,arguments)},P(t.chart.canvas,i,t.events[i])})},s.unbindEvents=function(t,i){n(i,function(i,e){L(t.chart.canvas,e,i)})}),F=s.getMaximumSize=function(t){var i=t.parentNode;return i.clientWidth},R=s.retinaScale=function(t){var i=t.ctx,e=t.canvas.width,s=t.canvas.height;window.devicePixelRatio&&(i.canvas.style.width=e+"px",i.canvas.style.height=s+"px",i.canvas.height=s*window.devicePixelRatio,i.canvas.width=e*window.devicePixelRatio,i.scale(window.devicePixelRatio,window.devicePixelRatio))},A=s.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},T=s.fontString=function(t,i,e){return i+" "+t+"px "+e},M=s.longestText=function(t,i,e){t.font=i;var s=0;return n(e,function(i){var e=t.measureText(i).width;s=e>s?e:s}),s},W=s.drawRoundedRectangle=function(t,i,e,s,n,o){t.beginPath(),t.moveTo(i+o,e),t.lineTo(i+s-o,e),t.quadraticCurveTo(i+s,e,i+s,e+o),t.lineTo(i+s,e+n-o),t.quadraticCurveTo(i+s,e+n,i+s-o,e+n),t.lineTo(i+o,e+n),t.quadraticCurveTo(i,e+n,i,e+n-o),t.lineTo(i,e+o),t.quadraticCurveTo(i,e,i+o,e),t.closePath()};e.instances={},e.Type=function(t,i,s){this.options=i,this.chart=s,this.id=u(),e.instances[this.id]=this,i.responsive&&this.resize(),this.initialize.call(this,t)},a(e.Type.prototype,{initialize:function(){return this},clear:function(){return A(this.chart),this},stop:function(){return s.cancelAnimFrame.call(t,this.animationFrame),this},resize:function(t){this.stop();var i=this.chart.canvas,e=F(this.chart.canvas),s=e/this.chart.aspectRatio;return i.width=this.chart.width=e,i.height=this.chart.height=s,R(this.chart),"function"==typeof t&&t.apply(this,Array.prototype.slice.call(arguments,1)),this},reflow:c,render:function(t){return t&&this.reflow(),this.options.animation&&!t?s.animationLoop(this.draw,this.options.animationSteps,this.options.animationEasing,this.options.onAnimationProgress,this.options.onAnimationComplete,this):(this.draw(),this.options.onAnimationComplete.call(this)),this},generateLegend:function(){return y(this.options.legendTemplate,this)},destroy:function(){this.clear(),k(this,this.events),delete e.instances[this.id]},showTooltip:function(t,i){"undefined"==typeof this.activeElements&&(this.activeElements=[]);var o=function(t){var i=!1;return t.length!==this.activeElements.length?i=!0:(n(t,function(t,e){t!==this.activeElements[e]&&(i=!0)},this),i)}.call(this,t);if(o||i){if(this.activeElements=t,this.draw(),t.length>0)if(this.datasets&&this.datasets.length>1){for(var a,h,r=this.datasets.length-1;r>=0&&(a=this.datasets[r].points||this.datasets[r].bars||this.datasets[r].segments,h=l(a,t[0]),-1===h);r--);var c=[],u=[],d=function(){var t,i,e,n,o,a=[],l=[],r=[];return s.each(this.datasets,function(i){t=i.points||i.bars||i.segments,a.push(t[h])}),s.each(a,function(t){l.push(t.x),r.push(t.y),c.push(s.template(this.options.multiTooltipTemplate,t)),u.push({fill:t._saved.fillColor||t.fillColor,stroke:t._saved.strokeColor||t.strokeColor})},this),o=m(r),e=g(r),n=m(l),i=g(l),{x:n>this.chart.width/2?n:i,y:(o+e)/2}}.call(this,h);new e.MultiTooltip({x:d.x,y:d.y,xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,xOffset:this.options.tooltipXOffset,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,titleTextColor:this.options.tooltipTitleFontColor,titleFontFamily:this.options.tooltipTitleFontFamily,titleFontStyle:this.options.tooltipTitleFontStyle,titleFontSize:this.options.tooltipTitleFontSize,cornerRadius:this.options.tooltipCornerRadius,labels:c,legendColors:u,legendColorBackground:this.options.multiTooltipKeyBackground,title:t[0].label,chart:this.chart,ctx:this.chart.ctx}).draw()}else n(t,function(t){var i=t.tooltipPosition();new e.Tooltip({x:Math.round(i.x),y:Math.round(i.y),xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,caretHeight:this.options.tooltipCaretSize,cornerRadius:this.options.tooltipCornerRadius,text:y(this.options.tooltipTemplate,t),chart:this.chart}).draw()},this);return this}},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),e.Type.extend=function(t){var i=this,s=function(){return i.apply(this,arguments)};if(s.prototype=o(i.prototype),a(s.prototype,t),s.extend=e.Type.extend,t.name||i.prototype.name){var n=t.name||i.prototype.name,l=e.defaults[i.prototype.name]?o(e.defaults[i.prototype.name]):{};e.defaults[n]=a(l,t.defaults),e.types[n]=s,e.prototype[n]=function(t,i){var o=h(e.defaults.global,e.defaults[n],i||{});return new s(t,o,this)}}else d("Name not provided for this chart, so it hasn't been registered");return i},e.Element=function(t){a(this,t),this.initialize.apply(this,arguments),this.save()},a(e.Element.prototype,{initialize:function(){},restore:function(t){return t?n(t,function(t){this[t]=this._saved[t]},this):a(this,this._saved),this},save:function(){return this._saved=o(this),delete this._saved._saved,this},update:function(t){return n(t,function(t,i){this._saved[i]=this[i],this[i]=t},this),this},transition:function(t,i){return n(t,function(t,e){this[e]=(t-this._saved[e])*i+this._saved[e]},this),this},tooltipPosition:function(){return{x:this.x,y:this.y}}}),e.Element.extend=r,e.Point=e.Element.extend({display:!0,inRange:function(t,i){var e=this.hitDetectionRadius+this.radius;return Math.pow(t-this.x,2)+Math.pow(i-this.y,2)<Math.pow(e,2)},draw:function(){if(this.display){var t=this.ctx;t.beginPath(),t.arc(this.x,this.y,this.radius,0,2*Math.PI),t.closePath(),t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.fillStyle=this.fillColor,t.fill(),t.stroke()}}}),e.Arc=e.Element.extend({inRange:function(t,i){var e=s.getAngleFromPoint(this,{x:t,y:i}),n=e.angle>=this.startAngle&&e.angle<=this.endAngle,o=e.distance>=this.innerRadius&&e.distance<=this.outerRadius;return n&&o},tooltipPosition:function(){var t=this.startAngle+(this.endAngle-this.startAngle)/2,i=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{x:this.x+Math.cos(t)*i,y:this.y+Math.sin(t)*i}},draw:function(t){var i=this.ctx;i.beginPath(),i.arc(this.x,this.y,this.outerRadius,this.startAngle,this.endAngle),i.arc(this.x,this.y,this.innerRadius,this.endAngle,this.startAngle,!0),i.closePath(),i.strokeStyle=this.strokeColor,i.lineWidth=this.strokeWidth,i.fillStyle=this.fillColor,i.fill(),i.lineJoin="bevel",this.showStroke&&i.stroke()}}),e.Rectangle=e.Element.extend({draw:function(){var t=this.ctx,i=this.width/2,e=this.x-i,s=this.x+i,n=this.base-(this.base-this.y),o=this.strokeWidth/2;this.showStroke&&(e+=o,s-=o,n+=o),t.beginPath(),t.fillStyle=this.fillColor,t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.moveTo(e,this.base),t.lineTo(e,n),t.lineTo(s,n),t.lineTo(s,this.base),t.fill(),this.showStroke&&t.stroke()},height:function(){return this.base-this.y},inRange:function(t,i){return t>=this.x-this.width/2&&t<=this.x+this.width/2&&i>=this.y&&i<=this.base}}),e.Tooltip=e.Element.extend({draw:function(){var t=this.chart.ctx;t.font=T(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var i=2,e=t.measureText(this.text).width+2*this.xPadding,s=this.fontSize+2*this.yPadding,n=s+this.caretHeight+i;this.x+e/2>this.chart.width?this.xAlign="left":this.x-e/2<0&&(this.xAlign="right"),this.y-n<0&&(this.yAlign="below");var o=this.x-e/2,a=this.y-n;switch(t.fillStyle=this.fillColor,this.yAlign){case"above":t.beginPath(),t.moveTo(this.x,this.y-i),t.lineTo(this.x+this.caretHeight,this.y-(i+this.caretHeight)),t.lineTo(this.x-this.caretHeight,this.y-(i+this.caretHeight)),t.closePath(),t.fill();break;case"below":a=this.y+i+this.caretHeight,t.beginPath(),t.moveTo(this.x,this.y+i),t.lineTo(this.x+this.caretHeight,this.y+i+this.caretHeight),t.lineTo(this.x-this.caretHeight,this.y+i+this.caretHeight),t.closePath(),t.fill()}switch(this.xAlign){case"left":o=this.x-e+(this.cornerRadius+this.caretHeight);break;case"right":o=this.x-(this.cornerRadius+this.caretHeight)}W(t,o,a,e,s,this.cornerRadius),t.fill(),t.fillStyle=this.textColor,t.textAlign="center",t.textBaseline="middle",t.fillText(this.text,o+e/2,a+s/2)}}),e.MultiTooltip=e.Element.extend({initialize:function(){this.font=T(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=T(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+2*this.yPadding+1.5*this.titleFontSize,this.ctx.font=this.titleFont;var t=this.ctx.measureText(this.title).width,i=M(this.ctx,this.font,this.labels)+this.fontSize+3,e=g([i,t]);this.width=e+2*this.xPadding;var s=this.height/2;this.y-s<0?this.y=s:this.y+s>this.chart.height&&(this.y=this.chart.height-s),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},getLineHeight:function(t){var i=this.y-this.height/2+this.yPadding,e=t-1;return 0===t?i+this.titleFontSize/2:i+(1.5*this.fontSize*e+this.fontSize/2)+1.5*this.titleFontSize},draw:function(){W(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var t=this.ctx;t.fillStyle=this.fillColor,t.fill(),t.closePath(),t.textAlign="left",t.textBaseline="middle",t.fillStyle=this.titleTextColor,t.font=this.titleFont,t.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),t.font=this.font,s.each(this.labels,function(i,e){t.fillStyle=this.textColor,t.fillText(i,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(e+1)),t.fillStyle=this.legendColorBackground,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize),t.fillStyle=this.legendColors[e].fill,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}),e.Scale=e.Element.extend({initialize:function(){this.fit()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),i=0;i<=this.steps;i++)this.yLabels.push(y(this.templateString,{value:(this.min+i*this.stepValue).toFixed(t)}));this.yLabelWidth=this.display&&this.showLabels?M(this.ctx,this.font,this.yLabels):0},addXLabel:function(t){this.xLabels.push(t),this.valuesCount++,this.fit()},removeXLabel:function(){this.xLabels.shift(),this.valuesCount--,this.fit()},fit:function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-1.5*this.fontSize-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var t,i=this.endPoint-this.startPoint;for(this.calculateYRange(i),this.buildYLabels(),this.calculateXLabelRotation();i>this.endPoint-this.startPoint;)i=this.endPoint-this.startPoint,t=this.yLabelWidth,this.calculateYRange(i),this.buildYLabels(),t<this.yLabelWidth&&this.calculateXLabelRotation()},calculateXLabelRotation:function(){this.ctx.font=this.font;var t,i,e=this.ctx.measureText(this.xLabels[0]).width,s=this.ctx.measureText(this.xLabels[this.xLabels.length-1]).width;if(this.xScalePaddingRight=s/2+3,this.xScalePaddingLeft=e/2>this.yLabelWidth+10?e/2:this.yLabelWidth+10,this.xLabelRotation=0,this.display){var n,o=M(this.ctx,this.font,this.xLabels);this.xLabelWidth=o;for(var a=Math.floor(this.calculateX(1)-this.calculateX(0))-6;this.xLabelWidth>a&&0===this.xLabelRotation||this.xLabelWidth>a&&this.xLabelRotation<=90&&this.xLabelRotation>0;)n=Math.cos(S(this.xLabelRotation)),t=n*e,i=n*s,t+this.fontSize/2>this.yLabelWidth+8&&(this.xScalePaddingLeft=t+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2,this.xLabelRotation++,this.xLabelWidth=n*o;this.xLabelRotation>0&&(this.endPoint-=Math.sin(S(this.xLabelRotation))*o+3)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},calculateYRange:c,drawingArea:function(){return this.startPoint-this.endPoint},calculateY:function(t){var i=this.drawingArea()/(this.min-this.max);return this.endPoint-i*(t-this.min)},calculateX:function(t){var i=(this.xLabelRotation>0,this.width-(this.xScalePaddingLeft+this.xScalePaddingRight)),e=i/(this.valuesCount-(this.offsetGridLines?0:1)),s=e*t+this.xScalePaddingLeft;return this.offsetGridLines&&(s+=e/2),Math.round(s)},update:function(t){s.extend(this,t),this.fit()},draw:function(){var t=this.ctx,i=(this.endPoint-this.startPoint)/this.steps,e=Math.round(this.xScalePaddingLeft);this.display&&(t.fillStyle=this.textColor,t.font=this.font,n(this.yLabels,function(n,o){var a=this.endPoint-i*o,h=Math.round(a);t.textAlign="right",t.textBaseline="middle",this.showLabels&&t.fillText(n,e-10,a),t.beginPath(),o>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),h+=s.aliasPixel(t.lineWidth),t.moveTo(e,h),t.lineTo(this.width,h),t.stroke(),t.closePath(),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(e-5,h),t.lineTo(e,h),t.stroke(),t.closePath()},this),n(this.xLabels,function(i,e){var s=this.calculateX(e)+x(this.lineWidth),n=this.calculateX(e-(this.offsetGridLines?.5:0))+x(this.lineWidth),o=this.xLabelRotation>0;t.beginPath(),e>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),t.moveTo(n,this.endPoint),t.lineTo(n,this.startPoint-3),t.stroke(),t.closePath(),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(n,this.endPoint),t.lineTo(n,this.endPoint+5),t.stroke(),t.closePath(),t.save(),t.translate(s,o?this.endPoint+12:this.endPoint+8),t.rotate(-1*S(this.xLabelRotation)),t.font=this.font,t.textAlign=o?"right":"center",t.textBaseline=o?"middle":"top",t.fillText(i,0,0),t.restore()},this))}}),e.RadialScale=e.Element.extend({initialize:function(){this.size=m([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},calculateCenterOffset:function(t){var i=this.drawingArea/(this.max-this.min);return(t-this.min)*i},update:function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),i=0;i<=this.steps;i++)this.yLabels.push(y(this.templateString,{value:(this.min+i*this.stepValue).toFixed(t)}))},getCircumference:function(){return 2*Math.PI/this.valuesCount},setScaleSize:function(){var t,i,e,s,n,o,a,h,l,r,c,u,d=m([this.height/2-this.pointLabelFontSize-5,this.width/2]),p=this.width,g=0;for(this.ctx.font=T(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),i=0;i<this.valuesCount;i++)t=this.getPointPosition(i,d),e=this.ctx.measureText(y(this.templateString,{value:this.labels[i]})).width+5,0===i||i===this.valuesCount/2?(s=e/2,t.x+s>p&&(p=t.x+s,n=i),t.x-s<g&&(g=t.x-s,a=i)):i<this.valuesCount/2?t.x+e>p&&(p=t.x+e,n=i):i>this.valuesCount/2&&t.x-e<g&&(g=t.x-e,a=i);l=g,r=Math.ceil(p-this.width),o=this.getIndexAngle(n),h=this.getIndexAngle(a),c=r/Math.sin(o+Math.PI/2),u=l/Math.sin(h+Math.PI/2),c=f(c)?c:0,u=f(u)?u:0,this.drawingArea=d-(u+c)/2,this.setCenterPoint(u,c)},setCenterPoint:function(t,i){var e=this.width-i-this.drawingArea,s=t+this.drawingArea;this.xCenter=(s+e)/2,this.yCenter=this.height/2},getIndexAngle:function(t){var i=2*Math.PI/this.valuesCount;return t*i-Math.PI/2},getPointPosition:function(t,i){var e=this.getIndexAngle(t);return{x:Math.cos(e)*i+this.xCenter,y:Math.sin(e)*i+this.yCenter}},draw:function(){if(this.display){var t=this.ctx;if(n(this.yLabels,function(i,e){if(e>0){var s,n=e*(this.drawingArea/this.steps),o=this.yCenter-n;if(this.lineWidth>0)if(t.strokeStyle=this.lineColor,t.lineWidth=this.lineWidth,this.lineArc)t.beginPath(),t.arc(this.xCenter,this.yCenter,n,0,2*Math.PI),t.closePath(),t.stroke();else{t.beginPath();for(var a=0;a<this.valuesCount;a++)s=this.getPointPosition(a,this.calculateCenterOffset(this.min+e*this.stepValue)),0===a?t.moveTo(s.x,s.y):t.lineTo(s.x,s.y);t.closePath(),t.stroke()}if(this.showLabels){if(t.font=T(this.fontSize,this.fontStyle,this.fontFamily),this.showLabelBackdrop){var h=t.measureText(i).width;t.fillStyle=this.backdropColor,t.fillRect(this.xCenter-h/2-this.backdropPaddingX,o-this.fontSize/2-this.backdropPaddingY,h+2*this.backdropPaddingX,this.fontSize+2*this.backdropPaddingY)}t.textAlign="center",t.textBaseline="middle",t.fillStyle=this.fontColor,t.fillText(i,this.xCenter,o)}}},this),!this.lineArc){t.lineWidth=this.angleLineWidth,t.strokeStyle=this.angleLineColor;for(var i=this.valuesCount-1;i>=0;i--){if(this.angleLineWidth>0){var e=this.getPointPosition(i,this.calculateCenterOffset(this.max));t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(e.x,e.y),t.stroke(),t.closePath()}var s=this.getPointPosition(i,this.calculateCenterOffset(this.max)+5);t.font=T(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),t.fillStyle=this.pointLabelFontColor;var o=this.labels.length,a=this.labels.length/2,h=a/2,l=h>i||i>o-h,r=i===h||i===o-h;t.textAlign=0===i?"center":i===a?"center":a>i?"left":"right",t.textBaseline=r?"middle":l?"bottom":"top",t.fillText(this.labels[i],s.x,s.y)}}}}}),s.addEvent(window,"resize",function(){var t;return function(){clearTimeout(t),t=setTimeout(function(){n(e.instances,function(t){t.options.responsive&&t.resize(t.render,!0)})},50)}}()),p?define(function(){return e}):"object"==typeof module&&module.exports&&(module.exports=e),t.Chart=e,e.noConflict=function(){return t.Chart=i,e}}).call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={scaleBeginAtZero:!0,scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,barShowStroke:!0,barStrokeWidth:2,barValueSpacing:5,barDatasetSpacing:1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].fillColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};i.Type.extend({name:"Bar",defaults:s,initialize:function(t){var s=this.options;this.ScaleClass=i.Scale.extend({offsetGridLines:!0,calculateBarX:function(t,i,e){var n=this.calculateBaseWidth(),o=this.calculateX(e)-n/2,a=this.calculateBarWidth(t);return o+a*i+i*s.barDatasetSpacing+a/2},calculateBaseWidth:function(){return this.calculateX(1)-this.calculateX(0)-2*s.barValueSpacing},calculateBarWidth:function(t){var i=this.calculateBaseWidth()-(t-1)*s.barDatasetSpacing;return i/t}}),this.datasets=[],this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getBarsAtEvent(t):[];this.eachBars(function(t){t.restore(["fillColor","strokeColor"])}),e.each(i,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(i)}),this.BarClass=i.Rectangle.extend({strokeWidth:this.options.barStrokeWidth,showStroke:this.options.barShowStroke,ctx:this.chart.ctx}),e.each(t.datasets,function(i){var s={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,bars:[]};this.datasets.push(s),e.each(i.data,function(n,o){e.isNumber(n)&&s.bars.push(new this.BarClass({value:n,label:t.labels[o],strokeColor:i.strokeColor,fillColor:i.fillColor,highlightFill:i.highlightFill||i.fillColor,highlightStroke:i.highlightStroke||i.strokeColor}))},this)},this),this.buildScale(t.labels),this.BarClass.prototype.base=this.scale.endPoint,this.eachBars(function(t,i,s){e.extend(t,{width:this.scale.calculateBarWidth(this.datasets.length),x:this.scale.calculateBarX(this.datasets.length,s,i),y:this.scale.endPoint}),t.save()},this),this.render()},update:function(){this.scale.update(),e.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachBars(function(t){t.save()}),this.render()},eachBars:function(t){e.each(this.datasets,function(i,s){e.each(i.bars,t,this,s)},this)},getBarsAtEvent:function(t){for(var i,s=[],n=e.getRelativePosition(t),o=function(t){s.push(t.bars[i])},a=0;a<this.datasets.length;a++)for(i=0;i<this.datasets[a].bars.length;i++)if(this.datasets[a].bars[i].inRange(n.x,n.y))return e.each(this.datasets,o),s;return s},buildScale:function(t){var i=this,s=function(){var t=[];return i.eachBars(function(i){t.push(i.value)}),t},n={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:t.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(t){var i=e.calculateScaleRange(s(),t,this.fontSize,this.beginAtZero,this.integersOnly);e.extend(this,i)},xLabels:t,font:e.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.barShowStroke?this.options.barStrokeWidth:0,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&e.extend(n,{calculateYRange:e.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new this.ScaleClass(n)},addData:function(t,i){e.each(t,function(t,s){e.isNumber(t)&&this.datasets[s].bars.push(new this.BarClass({value:t,label:i,x:this.scale.calculateBarX(this.datasets.length,s,this.scale.valuesCount+1),y:this.scale.endPoint,width:this.scale.calculateBarWidth(this.datasets.length),base:this.scale.endPoint,strokeColor:this.datasets[s].strokeColor,fillColor:this.datasets[s].fillColor}))},this),this.scale.addXLabel(i),this.update()},removeData:function(){this.scale.removeXLabel(),e.each(this.datasets,function(t){t.bars.shift()},this),this.update()},reflow:function(){e.extend(this.BarClass.prototype,{y:this.scale.endPoint,base:this.scale.endPoint});var t=e.extend({height:this.chart.height,width:this.chart.width});this.scale.update(t)},draw:function(t){var i=t||1;this.clear();this.chart.ctx;this.scale.draw(i),e.each(this.datasets,function(t,s){e.each(t.bars,function(t,e){t.base=this.scale.endPoint,t.transition({x:this.scale.calculateBarX(this.datasets.length,s,e),y:this.scale.calculateY(t.value),width:this.scale.calculateBarWidth(this.datasets.length)},i).draw()},this)},this)}})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,percentageInnerCutout:50,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'};i.Type.extend({name:"Doughnut",defaults:s,initialize:function(t){this.segments=[],this.outerRadius=(e.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,this.SegmentArc=i.Arc.extend({ctx:this.chart.ctx,x:this.chart.width/2,y:this.chart.height/2}),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getSegmentsAtEvent(t):[]; <ide> e.each(this.segments,function(t){t.restore(["fillColor"])}),e.each(i,function(t){t.fillColor=t.highlightColor}),this.showTooltip(i)}),this.calculateTotal(t),e.each(t,function(t,i){this.addData(t,i,!0)},this),this.render()},getSegmentsAtEvent:function(t){var i=[],s=e.getRelativePosition(t);return e.each(this.segments,function(t){t.inRange(s.x,s.y)&&i.push(t)},this),i},addData:function(t,i,e){var s=i||this.segments.length;this.segments.splice(s,0,new this.SegmentArc({value:t.value,outerRadius:this.options.animateScale?0:this.outerRadius,innerRadius:this.options.animateScale?0:this.outerRadius/100*this.options.percentageInnerCutout,fillColor:t.color,highlightColor:t.highlight||t.color,showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,startAngle:1.5*Math.PI,circumference:this.options.animateRotate?0:this.calculateCircumference(t.value),label:t.label})),e||(this.reflow(),this.update())},calculateCircumference:function(t){return 2*Math.PI*(t/this.total)},calculateTotal:function(t){this.total=0,e.each(t,function(t){this.total+=t.value},this)},update:function(){this.calculateTotal(this.segments),e.each(this.activeElements,function(t){t.restore(["fillColor"])}),e.each(this.segments,function(t){t.save()}),this.render()},removeData:function(t){var i=e.isNumber(t)?t:this.segments.length-1;this.segments.splice(i,1),this.reflow(),this.update()},reflow:function(){e.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.outerRadius=(e.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,e.each(this.segments,function(t){t.update({outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout})},this)},draw:function(t){var i=t?t:1;this.clear(),e.each(this.segments,function(t,e){t.transition({circumference:this.calculateCircumference(t.value),outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout},i),t.endAngle=t.startAngle+t.circumference,t.draw(),0===e&&(t.startAngle=1.5*Math.PI),e<this.segments.length-1&&(this.segments[e+1].startAngle=t.endAngle)},this)}}),i.types.Doughnut.extend({name:"Pie",defaults:e.merge(s,{percentageInnerCutout:0})})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,bezierCurve:!0,bezierCurveTension:.4,pointDot:!0,pointDotRadius:4,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].strokeColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};i.Type.extend({name:"Line",defaults:s,initialize:function(t){this.PointClass=i.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx,inRange:function(t){return Math.pow(t-this.x,2)<Math.pow(this.radius+this.hitDetectionRadius,2)}}),this.datasets=[],this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getPointsAtEvent(t):[];this.eachPoints(function(t){t.restore(["fillColor","strokeColor"])}),e.each(i,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(i)}),e.each(t.datasets,function(i){var s={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,pointColor:i.pointColor,pointStrokeColor:i.pointStrokeColor,points:[]};this.datasets.push(s),e.each(i.data,function(n,o){e.isNumber(n)&&s.points.push(new this.PointClass({value:n,label:t.labels[o],strokeColor:i.pointStrokeColor,fillColor:i.pointColor,highlightFill:i.pointHighlightFill||i.pointColor,highlightStroke:i.pointHighlightStroke||i.pointStrokeColor}))},this),this.buildScale(t.labels),this.eachPoints(function(t,i){e.extend(t,{x:this.scale.calculateX(i),y:this.scale.endPoint}),t.save()},this)},this),this.render()},update:function(){this.scale.update(),e.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachPoints(function(t){t.save()}),this.render()},eachPoints:function(t){e.each(this.datasets,function(i){e.each(i.points,t,this)},this)},getPointsAtEvent:function(t){var i=[],s=e.getRelativePosition(t);return e.each(this.datasets,function(t){e.each(t.points,function(t){t.inRange(s.x,s.y)&&i.push(t)})},this),i},buildScale:function(t){var s=this,n=function(){var t=[];return s.eachPoints(function(i){t.push(i.value)}),t},o={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:t.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(t){var i=e.calculateScaleRange(n(),t,this.fontSize,this.beginAtZero,this.integersOnly);e.extend(this,i)},xLabels:t,font:e.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.pointDotRadius+this.options.pointDotStrokeWidth,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&e.extend(o,{calculateYRange:e.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new i.Scale(o)},addData:function(t,i){e.each(t,function(t,s){e.isNumber(t)&&this.datasets[s].points.push(new this.PointClass({value:t,label:i,x:this.scale.calculateX(this.scale.valuesCount+1),y:this.scale.endPoint,strokeColor:this.datasets[s].pointStrokeColor,fillColor:this.datasets[s].pointColor}))},this),this.scale.addXLabel(i),this.update()},removeData:function(){this.scale.removeXLabel(),e.each(this.datasets,function(t){t.points.shift()},this),this.update()},reflow:function(){var t=e.extend({height:this.chart.height,width:this.chart.width});this.scale.update(t)},draw:function(t){var i=t||1;this.clear();var s=this.chart.ctx;this.scale.draw(i),e.each(this.datasets,function(t){e.each(t.points,function(t,e){t.transition({y:this.scale.calculateY(t.value),x:this.scale.calculateX(e)},i)},this),this.options.bezierCurve&&e.each(t.points,function(i,s){i.controlPoints=0===s?e.splineCurve(i,i,t.points[s+1],0):s>=t.points.length-1?e.splineCurve(t.points[s-1],i,i,0):e.splineCurve(t.points[s-1],i,t.points[s+1],this.options.bezierCurveTension)},this),s.lineWidth=this.options.datasetStrokeWidth,s.strokeStyle=t.strokeColor,s.beginPath(),e.each(t.points,function(i,e){e>0?this.options.bezierCurve?s.bezierCurveTo(t.points[e-1].controlPoints.outer.x,t.points[e-1].controlPoints.outer.y,i.controlPoints.inner.x,i.controlPoints.inner.y,i.x,i.y):s.lineTo(i.x,i.y):s.moveTo(i.x,i.y)},this),s.stroke(),this.options.datasetFill&&(s.lineTo(t.points[t.points.length-1].x,this.scale.endPoint),s.lineTo(this.scale.calculateX(0),this.scale.endPoint),s.fillStyle=t.fillColor,s.closePath(),s.fill()),e.each(t.points,function(t){t.draw()})},this)}})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)",scaleBeginAtZero:!0,scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,scaleShowLine:!0,segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'};i.Type.extend({name:"PolarArea",defaults:s,initialize:function(t){this.segments=[],this.SegmentArc=i.Arc.extend({showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,ctx:this.chart.ctx,innerRadius:0,x:this.chart.width/2,y:this.chart.height/2}),this.scale=new i.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,lineArc:!0,width:this.chart.width,height:this.chart.height,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,valuesCount:t.length}),this.updateScaleRange(t),this.scale.update(),e.each(t,function(t,i){this.addData(t,i,!0)},this),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];e.each(this.segments,function(t){t.restore(["fillColor"])}),e.each(i,function(t){t.fillColor=t.highlightColor}),this.showTooltip(i)}),this.render()},getSegmentsAtEvent:function(t){var i=[],s=e.getRelativePosition(t);return e.each(this.segments,function(t){t.inRange(s.x,s.y)&&i.push(t)},this),i},addData:function(t,i,e){var s=i||this.segments.length;this.segments.splice(s,0,new this.SegmentArc({fillColor:t.color,highlightColor:t.highlight||t.color,label:t.label,value:t.value,outerRadius:this.options.animateScale?0:this.scale.calculateCenterOffset(t.value),circumference:this.options.animateRotate?0:this.scale.getCircumference(),startAngle:1.5*Math.PI})),e||(this.reflow(),this.update())},removeData:function(t){var i=e.isNumber(t)?t:this.segments.length-1;this.segments.splice(i,1),this.reflow(),this.update()},calculateTotal:function(t){this.total=0,e.each(t,function(t){this.total+=t.value},this),this.scale.valuesCount=this.segments.length},updateScaleRange:function(t){var i=[];e.each(t,function(t){i.push(t.value)});var s=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:e.calculateScaleRange(i,e.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);e.extend(this.scale,s,{size:e.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2})},update:function(){this.calculateTotal(this.segments),e.each(this.segments,function(t){t.save()}),this.render()},reflow:function(){e.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.updateScaleRange(this.segments),this.scale.update(),e.extend(this.scale,{xCenter:this.chart.width/2,yCenter:this.chart.height/2}),e.each(this.segments,function(t){t.update({outerRadius:this.scale.calculateCenterOffset(t.value)})},this)},draw:function(t){var i=t||1;this.clear(),e.each(this.segments,function(t,e){t.transition({circumference:this.scale.getCircumference(),outerRadius:this.scale.calculateCenterOffset(t.value)},i),t.endAngle=t.startAngle+t.circumference,0===e&&(t.startAngle=1.5*Math.PI),e<this.segments.length-1&&(this.segments[e+1].startAngle=t.endAngle),t.draw()},this),this.scale.draw()}})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers;i.Type.extend({name:"Radar",defaults:{scaleShowLine:!0,angleShowLineOut:!0,scaleShowLabels:!1,scaleBeginAtZero:!0,angleLineColor:"rgba(0,0,0,.1)",angleLineWidth:1,pointLabelFontFamily:"'Arial'",pointLabelFontStyle:"normal",pointLabelFontSize:10,pointLabelFontColor:"#666",pointDot:!0,pointDotRadius:3,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].strokeColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'},initialize:function(t){this.PointClass=i.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx}),this.datasets=[],this.buildScale(t),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getPointsAtEvent(t):[];this.eachPoints(function(t){t.restore(["fillColor","strokeColor"])}),e.each(i,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(i)}),e.each(t.datasets,function(i){var s={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,pointColor:i.pointColor,pointStrokeColor:i.pointStrokeColor,points:[]};this.datasets.push(s),e.each(i.data,function(n,o){if(e.isNumber(n)){var a;this.scale.animation||(a=this.scale.getPointPosition(o,this.scale.calculateCenterOffset(n))),s.points.push(new this.PointClass({value:n,label:t.labels[o],x:this.options.animation?this.scale.xCenter:a.x,y:this.options.animation?this.scale.yCenter:a.y,strokeColor:i.pointStrokeColor,fillColor:i.pointColor,highlightFill:i.pointHighlightFill||i.pointColor,highlightStroke:i.pointHighlightStroke||i.pointStrokeColor}))}},this)},this),this.render()},eachPoints:function(t){e.each(this.datasets,function(i){e.each(i.points,t,this)},this)},getPointsAtEvent:function(t){var i=e.getRelativePosition(t),s=e.getAngleFromPoint({x:this.scale.xCenter,y:this.scale.yCenter},i),n=2*Math.PI/this.scale.valuesCount,o=Math.round((s.angle-1.5*Math.PI)/n),a=[];return(o>=this.scale.valuesCount||0>o)&&(o=0),s.distance<=this.scale.drawingArea&&e.each(this.datasets,function(t){a.push(t.points[o])}),a},buildScale:function(t){this.scale=new i.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,angleLineColor:this.options.angleLineColor,angleLineWidth:this.options.angleShowLineOut?this.options.angleLineWidth:0,pointLabelFontColor:this.options.pointLabelFontColor,pointLabelFontSize:this.options.pointLabelFontSize,pointLabelFontFamily:this.options.pointLabelFontFamily,pointLabelFontStyle:this.options.pointLabelFontStyle,height:this.chart.height,width:this.chart.width,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,labels:t.labels,valuesCount:t.datasets[0].data.length}),this.scale.setScaleSize(),this.updateScaleRange(t.datasets),this.scale.buildYLabels()},updateScaleRange:function(t){var i=function(){var i=[];return e.each(t,function(t){t.data?i=i.concat(t.data):e.each(t.points,function(t){i.push(t.value)})}),i}(),s=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:e.calculateScaleRange(i,e.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);e.extend(this.scale,s)},addData:function(t,i){this.scale.valuesCount++,e.each(t,function(t,s){if(e.isNumber(t)){var n=this.scale.getPointPosition(this.scale.valuesCount,this.scale.calculateCenterOffset(t));this.datasets[s].points.push(new this.PointClass({value:t,label:i,x:n.x,y:n.y,strokeColor:this.datasets[s].pointStrokeColor,fillColor:this.datasets[s].pointColor}))}},this),this.scale.labels.push(i),this.reflow(),this.update()},removeData:function(){this.scale.valuesCount--,this.scale.labels.shift(),e.each(this.datasets,function(t){t.points.shift()},this),this.reflow(),this.update()},update:function(){this.eachPoints(function(t){t.save()}),this.render()},reflow:function(){e.extend(this.scale,{width:this.chart.width,height:this.chart.height,size:e.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2}),this.updateScaleRange(this.datasets),this.scale.setScaleSize(),this.scale.buildYLabels()},draw:function(t){var i=t||1,s=this.chart.ctx;this.clear(),this.scale.draw(),e.each(this.datasets,function(t){e.each(t.points,function(t,e){t.transition(this.scale.getPointPosition(e,this.scale.calculateCenterOffset(t.value)),i)},this),s.lineWidth=this.options.datasetStrokeWidth,s.strokeStyle=t.strokeColor,s.beginPath(),e.each(t.points,function(t,i){0===i?s.moveTo(t.x,t.y):s.lineTo(t.x,t.y)},this),s.closePath(),s.stroke(),s.fillStyle=t.fillColor,s.fill(),e.each(t.points,function(t){t.draw()})},this)}})}.call(this); <ide>\ No newline at end of file <ide><path>src/Chart.Core.js <ide> define(function(){ <ide> return Chart; <ide> }); <add> } else if (typeof module === 'object' && module.exports) { <add> module.exports = Chart; <ide> } <ide> <ide> root.Chart = Chart;
3
PHP
PHP
accomodate older versions of sqlite
8fe26ed4ae9d19a1d3063a2fd1e8e3a5d9f16c66
<ide><path>src/Database/Schema/SqliteSchema.php <ide> public function describeForeignKeySql($tableName, $config) <ide> */ <ide> public function convertForeignKeyDescription(Table $table, $row) <ide> { <add> $update = isset($row['on_update']) ? $row['on_update'] : ''; <add> $delete = isset($row['on_delete']) ? $row['on_delete'] : ''; <ide> $data = [ <ide> 'type' => Table::CONSTRAINT_FOREIGN, <ide> 'columns' => [$row['from']], <ide> 'references' => [$row['table'], $row['to']], <del> 'update' => $this->_convertOnClause($row['on_update']), <del> 'delete' => $this->_convertOnClause($row['on_delete']), <add> 'update' => $this->_convertOnClause($update), <add> 'delete' => $this->_convertOnClause($delete), <ide> ]; <ide> $name = $row['from'] . '_fk'; <ide> $table->addConstraint($name, $data);
1
Javascript
Javascript
clarify names within map impl
dffd85498f49cedca85cae1098709806792d335c
<ide><path>dist/immutable.js <ide> var $BitmapIndexedNode = BitmapIndexedNode; <ide> if (newNode === node) { <ide> return this; <ide> } <del> if (!exists && newNode && nodes.length >= MAX_BITMAP_SIZE) { <add> if (!exists && newNode && nodes.length >= MIN_BITMAP_INDEXED_SIZE) { <ide> return expandNodes(ownerID, nodes, bitmap, hashFrag, newNode); <ide> } <ide> if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) { <ide> var $BitmapIndexedNode = BitmapIndexedNode; <ide> } <ide> } <ide> }, {}); <del>var ArrayNode = function ArrayNode(ownerID, count, nodes) { <add>var HashArrayMapNode = function HashArrayMapNode(ownerID, count, nodes) { <ide> this.ownerID = ownerID; <ide> this.count = count; <ide> this.nodes = nodes; <ide> }; <del>var $ArrayNode = ArrayNode; <del>($traceurRuntime.createClass)(ArrayNode, { <add>var $HashArrayMapNode = HashArrayMapNode; <add>($traceurRuntime.createClass)(HashArrayMapNode, { <ide> get: function(shift, hash, key, notSetValue) { <ide> var idx = (shift === 0 ? hash : hash >>> shift) & MASK; <ide> var node = this.nodes[idx]; <ide> var $ArrayNode = ArrayNode; <ide> newCount++; <ide> } else if (!newNode) { <ide> newCount--; <del> if (newCount < MIN_ARRAY_SIZE) { <add> if (newCount < MIN_HASH_ARRAY_MAP_SIZE) { <ide> return packNodes(ownerID, nodes, newCount, idx); <ide> } <ide> } <ide> var $ArrayNode = ArrayNode; <ide> this.nodes = newNodes; <ide> return this; <ide> } <del> return new $ArrayNode(ownerID, newCount, newNodes); <add> return new $HashArrayMapNode(ownerID, newCount, newNodes); <ide> }, <ide> iterate: function(fn, reverse) { <ide> var nodes = this.nodes; <ide> function expandNodes(ownerID, nodes, bitmap, including, node) { <ide> expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined; <ide> } <ide> expandedNodes[including] = node; <del> return new ArrayNode(ownerID, count + 1, expandedNodes); <add> return new HashArrayMapNode(ownerID, count + 1, expandedNodes); <ide> } <ide> function mergeIntoMapWith(map, merger, iterables) { <ide> var iters = []; <ide> function spliceOut(array, idx, canEdit) { <ide> } <ide> return newArray; <ide> } <del>var MAX_BITMAP_SIZE = SIZE / 2; <del>var MIN_ARRAY_SIZE = SIZE / 4; <add>var MIN_BITMAP_INDEXED_SIZE = SIZE / 2; <add>var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4; <ide> var ToKeyedSequence = function ToKeyedSequence(indexed, useKeys) { <ide> this._iter = indexed; <ide> this._useKeys = useKeys; <ide><path>src/Map.js <ide> class BitmapIndexedNode { <ide> return this; <ide> } <ide> <del> if (!exists && newNode && nodes.length >= MAX_BITMAP_SIZE) { <add> if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) { <ide> return expandNodes(ownerID, nodes, bitmap, hashFrag, newNode); <ide> } <ide> <ide> class BitmapIndexedNode { <ide> } <ide> } <ide> <del>class ArrayNode { <add>class HashArrayMapNode { <ide> <ide> constructor(ownerID, count, nodes) { <ide> this.ownerID = ownerID; <ide> class ArrayNode { <ide> newCount++; <ide> } else if (!newNode) { <ide> newCount--; <del> if (newCount < MIN_ARRAY_SIZE) { <add> if (newCount < MIN_HASH_ARRAY_MAP_SIZE) { <ide> return packNodes(ownerID, nodes, newCount, idx); <ide> } <ide> } <ide> class ArrayNode { <ide> return this; <ide> } <ide> <del> return new ArrayNode(ownerID, newCount, newNodes); <add> return new HashArrayMapNode(ownerID, newCount, newNodes); <ide> } <ide> <ide> iterate(fn, reverse) { <ide> function expandNodes(ownerID, nodes, bitmap, including, node) { <ide> expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined; <ide> } <ide> expandedNodes[including] = node; <del> return new ArrayNode(ownerID, count + 1, expandedNodes); <add> return new HashArrayMapNode(ownerID, count + 1, expandedNodes); <ide> } <ide> <ide> function mergeIntoMapWith(map, merger, iterables) { <ide> function spliceOut(array, idx, canEdit) { <ide> return newArray; <ide> } <ide> <del>var MAX_BITMAP_SIZE = SIZE / 2; <del>var MIN_ARRAY_SIZE = SIZE / 4; <add>var MAX_BITMAP_INDEXED_SIZE = SIZE / 2; <add>var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;
2
Ruby
Ruby
remove unreachable code
7816bfff21876e663aab757dc0c04c442ea05827
<ide><path>railties/lib/rails/generators/rails/app/app_generator.rb <ide> class AppGenerator < AppBase # :nodoc: <ide> def initialize(*args) <ide> super <ide> <del> unless app_path <del> raise Error, "Application name should be provided in arguments. For details run: rails --help" <del> end <del> <ide> if !options[:skip_active_record] && !DATABASES.include?(options[:database]) <ide> raise Error, "Invalid value for --database option. Supported for preconfiguration are: #{DATABASES.join(", ")}." <ide> end <ide><path>railties/lib/rails/generators/rails/plugin/plugin_generator.rb <ide> class PluginGenerator < AppBase # :nodoc: <ide> def initialize(*args) <ide> @dummy_path = nil <ide> super <del> <del> unless plugin_path <del> raise Error, "Plugin name should be provided in arguments. For details run: rails plugin new --help" <del> end <ide> end <ide> <ide> public_task :set_default_accessors!
2
Text
Text
make link more specific in guide doc
52b5fff5370314a392dd446af5f9dead92d19452
<ide><path>docs/upgrading/upgrading-your-ui-theme.md <ide> Inside a context-targeted style sheet, there's no need to use the `::shadow` or <ide> During the transition phase, style sheets targeting the `atom-text-editor` context will *also* be loaded globally. Make sure you update your selectors in a way that maintains compatibility with the shadow DOM being disabled. That means if you use a `::host` pseudo element, you should also include the same style rule matches against `atom-text-editor`. <ide> <ide> [shadow-dom-101]: http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom <del>[shadow-dom-201]: http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom-201/ <add>[shadow-dom-201]: http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom-201#toc-style-cat-hat <ide> [find-and-replace]: https://github.com/atom/find-and-replace/blob/95351f261bc384960a69b66bf12eae8002da63f9/stylesheets/find-and-replace.less#L10
1
Text
Text
move mmarchini to emeritus
98e9499b55fbc63b2b3db79507ee1475302f9763
<ide><path>README.md <ide> For information about the governance of the Node.js project, see <ide> **Matteo Collina** <<[email protected]>> (he/him) <ide> * [mhdawson](https://github.com/mhdawson) - <ide> **Michael Dawson** <<[email protected]>> (he/him) <del>* [mmarchini](https://github.com/mmarchini) - <del> **Mary Marchini** <<[email protected]>> (she/her) <ide> * [MylesBorins](https://github.com/MylesBorins) - <ide> **Myles Borins** <<[email protected]>> (he/him) <ide> * [RaisinTen](https://github.com/RaisinTen) - <ide> For information about the governance of the Node.js project, see <ide> **Isaac Z. Schlueter** <<[email protected]>> <ide> * [joshgav](https://github.com/joshgav) - <ide> **Josh Gavant** <<[email protected]>> <add>* [mmarchini](https://github.com/mmarchini) - <add> **Mary Marchini** <<[email protected]>> (she/her) <ide> * [mscdex](https://github.com/mscdex) - <ide> **Brian White** <<[email protected]>> <ide> * [nebrius](https://github.com/nebrius) - <ide> For information about the governance of the Node.js project, see <ide> **Milad Fa** <<[email protected]>> (he/him) <ide> * [mildsunrise](https://github.com/mildsunrise) - <ide> **Alba Mendez** <<[email protected]>> (she/her) <del>* [mmarchini](https://github.com/mmarchini) - <del> **Mary Marchini** <<[email protected]>> (she/her) <ide> * [mscdex](https://github.com/mscdex) - <ide> **Brian White** <<[email protected]>> <ide> * [MylesBorins](https://github.com/MylesBorins) - <ide> For information about the governance of the Node.js project, see <ide> **Mikeal Rogers** <<[email protected]>> <ide> * [misterdjules](https://github.com/misterdjules) - <ide> **Julien Gilli** <<[email protected]>> <add>* [mmarchini](https://github.com/mmarchini) - <add> **Mary Marchini** <<[email protected]>> (she/her) <ide> * [monsanto](https://github.com/monsanto) - <ide> **Christopher Monsanto** <<[email protected]>> <ide> * [MoonBall](https://github.com/MoonBall) - <ide><path>doc/contributing/strategic-initiatives.md <ide> agenda to ensure they are active and have the support they need. <ide> <ide> ## Current initiatives <ide> <del>| Initiative | Champion | Links | <del>| ------------------------- | --------------------------- | -------------------------------------------------------------------------------------------- | <del>| Core Promise APIs | [Antoine du Hamel][aduh95] | <https://github.com/nodejs/TSC/issues/1094> | <del>| Future of Build Toolchain | [Mary Marchini][mmarchini] | <https://github.com/nodejs/TSC/issues/901>, <https://github.com/nodejs/build-toolchain-next> | <del>| QUIC / HTTP3 | [James M Snell][jasnell] | <https://github.com/nodejs/quic> | <del>| Startup performance | [Joyee Cheung][joyeecheung] | <https://github.com/nodejs/node/issues/35711> | <del>| V8 Currency | [Michaël Zasso][targos] | | <del>| Next-10 | [Michael Dawson][mhdawson] | <https://github.com/nodejs/next-10> | <add>| Initiative | Champion | Links | <add>| ------------------- | --------------------------- | --------------------------------------------- | <add>| Core Promise APIs | [Antoine du Hamel][aduh95] | <https://github.com/nodejs/TSC/issues/1094> | <add>| QUIC / HTTP3 | [James M Snell][jasnell] | <https://github.com/nodejs/quic> | <add>| Startup performance | [Joyee Cheung][joyeecheung] | <https://github.com/nodejs/node/issues/35711> | <add>| V8 Currency | [Michaël Zasso][targos] | | <add>| Next-10 | [Michael Dawson][mhdawson] | <https://github.com/nodejs/next-10> | <ide> <ide> <details> <ide> <summary>List of completed initiatives</summary> <ide> agenda to ensure they are active and have the support they need. <ide> [jasnell]: https://github.com/jasnell <ide> [joyeecheung]: https://github.com/joyeecheung <ide> [mhdawson]: https://github.com/mhdawson <del>[mmarchini]: https://github.com/mmarchini <ide> [targos]: https://github.com/targos
2
Javascript
Javascript
ensure case-insens. header overriding
53359d549e364759d5b382c229f7d326799bf418
<ide><path>src/ng/http.js <ide> function $HttpProvider() { <ide> transformRequest: defaults.transformRequest, <ide> transformResponse: defaults.transformResponse <ide> }; <del> var headers = {}; <add> var headers = mergeHeaders(requestConfig); <ide> <ide> extend(config, requestConfig); <ide> config.headers = headers; <ide> config.method = uppercase(config.method); <ide> <del> extend(headers, <del> defaults.headers.common, <del> defaults.headers[lowercase(config.method)], <del> requestConfig.headers); <del> <ide> var xsrfValue = isSameDomain(config.url, $browser.url()) <ide> ? $browser.cookies()[config.xsrfCookieName || defaults.xsrfCookieName] <ide> : undefined; <ide> function $HttpProvider() { <ide> <ide> // strip content-type if data is undefined <ide> if (isUndefined(config.data)) { <del> delete headers['Content-Type']; <add> forEach(headers, function(value, header) { <add> if (lowercase(header) === 'content-type') { <add> delete headers[header]; <add> } <add> }); <ide> } <ide> <ide> if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) { <ide> function $HttpProvider() { <ide> ? resp <ide> : $q.reject(resp); <ide> } <add> <add> function mergeHeaders(config) { <add> var defHeaders = defaults.headers, <add> reqHeaders = extend({}, config.headers), <add> defHeaderName, lowercaseDefHeaderName, reqHeaderName; <add> <add> defHeaders = extend({}, defHeaders.common, defHeaders[lowercase(config.method)]); <add> <add> // using for-in instead of forEach to avoid unecessary iteration after header has been found <add> defaultHeadersIteration: <add> for (defHeaderName in defHeaders) { <add> lowercaseDefHeaderName = lowercase(defHeaderName); <add> <add> for (reqHeaderName in reqHeaders) { <add> if (lowercase(reqHeaderName) === lowercaseDefHeaderName) { <add> continue defaultHeadersIteration; <add> } <add> } <add> <add> reqHeaders[defHeaderName] = defHeaders[defHeaderName]; <add> } <add> <add> return reqHeaders; <add> } <ide> } <ide> <ide> $http.pendingRequests = []; <ide><path>test/ng/httpSpec.js <ide> describe('$http', function() { <ide> $httpBackend.flush(); <ide> }); <ide> <add> it('should override default headers with custom in a case insensitive manner', function() { <add> $httpBackend.expect('POST', '/url', 'messageBody', function(headers) { <add> return headers['accept'] == 'Rewritten' && <add> headers['content-type'] == 'Content-Type Rewritten' && <add> headers['Accept'] === undefined && <add> headers['Content-Type'] === undefined; <add> }).respond(''); <add> <add> $http({url: '/url', method: 'POST', data: 'messageBody', headers: { <add> 'accept': 'Rewritten', <add> 'content-type': 'Content-Type Rewritten' <add> }}); <add> $httpBackend.flush(); <add> }); <add> <ide> it('should not set XSRF cookie for cross-domain requests', inject(function($browser) { <ide> $browser.cookies('XSRF-TOKEN', 'secret'); <ide> $browser.url('http://host.com/base'); <ide> describe('$http', function() { <ide> return !headers.hasOwnProperty('Content-Type'); <ide> }).respond(''); <ide> <add> $httpBackend.expect('POST', '/url2', undefined, function(headers) { <add> return !headers.hasOwnProperty('content-type'); <add> }).respond(''); <add> <ide> $http({url: '/url', method: 'POST'}); <add> $http({url: '/url2', method: 'POST', headers: {'content-type': 'Rewritten'}}); <ide> $httpBackend.flush(); <ide> }); <ide>
2