text:
package com.songchao.mybilibili.util;

import java.util.Calendar;

/**
 * Author: SongCHao
 * Date: 2017/9/14/14:26
 * Email: 15704762346@163.com
 */

public class GetDate {
    public static StringBuilder getDate(){

        StringBuilder stringBuilder = new StringBuilder();
        Calendar now = Calendar.getInstance();
        stringBuilder.append(now.get(Calendar.YEAR) + "年");
        stringBuilder.append((int)(now.get(Calendar.MONTH) + 1)  + "月");
        stringBuilder.append(now.get(Calendar.DAY_OF_MONTH) + "日");
        return stringBuilder;
    }
}

redpajama_set_name: RedPajamaGithub


text:
import assert from 'assert';
import { ABI } from '../../contracts/abi';
import { getSize, libraryName, nameFromABI, sha3 } from './solidity';

describe('abi helpers', function () {
  it('should compute a valid method id', async function () {
    assert.equal(sha3('baz(uint32,bool)').slice(0, 8), 'CDCD77C0');
  });

  it('should return the full function name with args', async function () {
    const abi: ABI.Func = {
      type: 'function',
      name: 'baz',
      stateMutability: 'pure',
      inputs: [
        {
          name: '1',
          type: 'uint32',
        },
        {
          name: '2',
          type: 'bool',
        },
      ],
    };
    assert.equal(nameFromABI(abi), 'baz(uint32,bool)');
  });

  it('should strip array size', () => {
    assert.equal(getSize('uint[3]'), 3);
  });

  it('should extract library name', () => {
    assert.equal(libraryName('sol/Storage.sol:Storage'), 'Storage');
  });
});


text:
<?php

use Rax\Mvc\Service;

Service::getShared()
    // Your services
;


text:
const express = require("express");
const logfmt = require("logfmt");
const microtime = require('microtime');

const app = express();
app.use(logfmt.requestLogger());

app.get('/', (req, res) => {
  res.send('Hello, World!');
});

app.get('/microtime', (req, res) => {
  res.send('native time: ' + microtime.nowDouble().toString());
});

const port = Number(process.env.PORT || 5000);
app.listen(port, () => {
  console.log("Listening on " + port);
});


text:
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.jetbrains.python.packaging.ui;

import com.intellij.execution.ExecutionException;
import com.intellij.execution.RunCanceledByUserException;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.openapi.util.NlsContexts.DetailedDescription;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.ui.scale.JBUIScale;
import com.intellij.util.CatchingConsumer;
import com.intellij.util.concurrency.AppExecutorUtil;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.webcore.packaging.InstalledPackage;
import com.intellij.webcore.packaging.PackageManagementServiceEx;
import com.intellij.webcore.packaging.RepoPackage;
import com.jetbrains.python.PyBundle;
import com.jetbrains.python.PySdkBundle;
import com.jetbrains.python.packaging.*;
import com.jetbrains.python.packaging.PyPIPackageUtil.PackageDetails;
import com.jetbrains.python.packaging.requirement.PyRequirementRelation;
import com.jetbrains.python.psi.LanguageLevel;
import com.jetbrains.python.sdk.PythonSdkType;
import com.jetbrains.python.sdk.PythonSdkUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author yole
 */
public class PyPackageManagementService extends PackageManagementServiceEx {
  @NotNull private static final Pattern PATTERN_ERROR_LINE = Pattern.compile(".*error:.*", Pattern.CASE_INSENSITIVE);
  @NonNls private static final String TEXT_PREFIX = buildHtmlStylePrefix();

  @NotNull
  private static String buildHtmlStylePrefix() {
    // Shamelessly copied from Plugin Manager dialog
    final int fontSize = JBUIScale.scale(12);
    final int m1 = JBUIScale.scale(2);
    final int m2 = JBUIScale.scale(5);
    return String.format("" +
                         "    " +
                         "",
                         fontSize, m1, m1, fontSize, m2, m2);
  }

  @NonNls private static final String TEXT_SUFFIX = "";

  @NotNull private final Project myProject;
  @NotNull protected final Sdk mySdk;
  protected final ExecutorService myExecutorService;

  public PyPackageManagementService(@NotNull Project project, @NotNull Sdk sdk) {
    myProject = project;
    mySdk = sdk;
    // Dumb heuristic for the size of IO-bound tasks pool: safer than unlimited, snappier than a single thread
    myExecutorService = AppExecutorUtil.createBoundedApplicationPoolExecutor("PyPackageManagementService Pool", 4);
  }

  @NotNull
  public Sdk getSdk() {
    return mySdk;
  }

  @NotNull
  public Project getProject() {
    return myProject;
  }

  @Nullable
  @Override
  public List<String> getAllRepositories() {
    final List<String> result = new ArrayList<>();
    if (!PyPackageService.getInstance().PYPI_REMOVED) result.add(PyPIPackageUtil.PYPI_LIST_URL);
    result.addAll(getAdditionalRepositories());
    return result;
  }

  @Override
  public void addRepository(String repositoryUrl) {
    PyPackageService.getInstance().addRepository(repositoryUrl);
  }

  @Override
  public void removeRepository(String repositoryUrl) {
    PyPackageService.getInstance().removeRepository(repositoryUrl);
  }

  @NotNull
  @Override
  public List<RepoPackage> getAllPackages() throws IOException {
    PyPIPackageUtil.INSTANCE.loadPackages();
    PyPIPackageUtil.INSTANCE.loadAdditionalPackages(getAdditionalRepositories(), false);
    return getAllPackagesCached();
  }

  @NotNull
  @Override
  public List<RepoPackage> reloadAllPackages() throws IOException {
    PyPIPackageUtil.INSTANCE.updatePyPICache();
    PyPIPackageUtil.INSTANCE.loadAdditionalPackages(getAdditionalRepositories(), true);
    return getAllPackagesCached();
  }

  @NotNull
  @Override
  public List<RepoPackage> getAllPackagesCached() {
    // Make a copy, since ManagePackagesDialog attempts to change the passed in collection directly
    final List<RepoPackage> result = new ArrayList<>();
    if (!PyPackageService.getInstance().PYPI_REMOVED) {
      result.addAll(getCachedPyPIPackages());
    }
    result.addAll(PyPIPackageUtil.INSTANCE.getAdditionalPackages(getAdditionalRepositories()));
    return result;
  }

  @NotNull
  private static List<String> getAdditionalRepositories() {
    return PyPackageService.getInstance().additionalRepositories;
  }

  @NotNull
  private static List<RepoPackage> getCachedPyPIPackages() {
    // Don't show URL next to the package name in "Available Packages" if only PyPI is in use
    final boolean customRepoConfigured = !getAdditionalRepositories().isEmpty();
    final String url = customRepoConfigured ? PyPIPackageUtil.PYPI_LIST_URL : "";
    return ContainerUtil.map(PyPIPackageCache.getInstance().getPackageNames(), name -> new RepoPackage(name, url, null));
  }

  @Override
  public boolean canInstallToUser() {
    return !PythonSdkUtil.isVirtualEnv(mySdk);
  }

  @NotNull
  @Override
  public String getInstallToUserText() {
    String userSiteText = PyBundle.message("button.install.to.user.site.packages.directory");
    if (!PythonSdkUtil.isRemote(mySdk))
      userSiteText += " (" + PythonSdkUtil.getUserSite() + ")";
    return userSiteText;
  }

  @Override
  public boolean isInstallToUserSelected() {
    return PyPackageService.getInstance().useUserSite(mySdk.getHomePath());
  }

  @Override
  public void installToUserChanged(boolean newValue) {
    PyPackageService.getInstance().addSdkToUserSite(mySdk.getHomePath(), newValue);
  }

  @Override
  public @NotNull List<? extends InstalledPackage> getInstalledPackagesList() throws ExecutionException {
    List<PyPackage> packages = new ArrayList<>(PyPackageManager.getInstance(mySdk).refreshAndGetPackages(true));
    packages.sort(Comparator.comparing(InstalledPackage::getName));
    return packages;
  }

  @Override
  public void installPackage(@NotNull RepoPackage repoPackage, @Nullable String version, boolean forceUpgrade, @Nullable String extraOptions,
                             @NotNull Listener listener, boolean installToUser) {
    final String packageName = repoPackage.getName();
    final String repository = PyPIPackageUtil.isPyPIRepository(repoPackage.getRepoUrl()) ? null : repoPackage.getRepoUrl();
    final List<String> extraArgs = new ArrayList<>();
    if (installToUser) {
      extraArgs.add(PyPackageManager.USE_USER_SITE);
    }
    if (extraOptions != null) {
      // TODO: Respect arguments quotation
      Collections.addAll(extraArgs, extraOptions.split(" +"));
    }
    if (!StringUtil.isEmptyOrSpaces(repository)) {
      extraArgs.add("--index-url");
      extraArgs.add(repository);
    }
    if (forceUpgrade) {
      extraArgs.add("-U");
    }
    final PyRequirement req = version == null
                              ? PyRequirementsKt.pyRequirement(packageName)
                              : PyRequirementsKt.pyRequirement(packageName, PyRequirementRelation.EQ, version);

    final PyPackageManagerUI ui = new PyPackageManagerUI(myProject, mySdk, new PyPackageManagerUI.Listener() {
      @Override
      public void started() {
        listener.operationStarted(packageName);
      }

      @Override
      public void finished(@Nullable List<ExecutionException> exceptions) {
        listener.operationFinished(packageName, toErrorDescription(exceptions, mySdk));
      }
    });
    ui.install(Collections.singletonList(req), extraArgs);
  }

  @Nullable
  public static ErrorDescription toErrorDescription(@Nullable List<ExecutionException> exceptions, @Nullable Sdk sdk) {
    if (exceptions != null && !exceptions.isEmpty() && !isCancelled(exceptions)) {
      return createDescription(exceptions.get(0), sdk);
    }
    return null;
  }

  @Override
  public void uninstallPackages(@NotNull List<InstalledPackage> installedPackages, @NotNull Listener listener) {
    final String packageName = installedPackages.size() == 1 ? installedPackages.get(0).getName() : null;
    final PyPackageManagerUI ui = new PyPackageManagerUI(myProject, mySdk, new PyPackageManagerUI.Listener() {
      @Override
      public void started() {
        listener.operationStarted(packageName);
      }

      @Override
      public void finished(List<ExecutionException> exceptions) {
        listener.operationFinished(packageName, toErrorDescription(exceptions, mySdk));
      }
    });

    final List<PyPackage> pyPackages = new ArrayList<>();
    for (InstalledPackage aPackage : installedPackages) {
      if (aPackage instanceof PyPackage) {
        pyPackages.add((PyPackage)aPackage);
      }
    }
    ui.uninstall(pyPackages);
  }

  @Override
  public void fetchPackageVersions(String packageName, CatchingConsumer<List<String>, Exception> consumer) {
    PyPIPackageUtil.INSTANCE.usePackageReleases(packageName, consumer);
  }

  @Override
  public void fetchPackageDetails(@NotNull String packageName, @NotNull CatchingConsumer<String, Exception> consumer) {
    PyPIPackageUtil.INSTANCE.fillPackageDetails(packageName, new CatchingConsumer<>() {
      @Override
      public void consume(PackageDetails.Info details) {
        consumer.consume(formatPackageInfo(details));
      }

      @Override
      public void consume(Exception e) {
        consumer.consume(e);
      }
    });
  }

  private static String formatPackageInfo(@NotNull PackageDetails.Info info) {
    final StringBuilder stringBuilder = new StringBuilder(TEXT_PREFIX);
    final String description = info.getSummary();
    if (StringUtil.isNotEmpty(description)) {
      stringBuilder.append(description).append("
");
    }
    final String version = info.getVersion();
    if (StringUtil.isNotEmpty(version)) {
      stringBuilder.append("
Version
");
      stringBuilder.append(version);
    }
    final String author = info.getAuthor();
    if (StringUtil.isNotEmpty(author)) {
      stringBuilder.append("
Author
");
      stringBuilder.append(author).append("

");
    }
    final String authorEmail = info.getAuthorEmail();
    if (StringUtil.isNotEmpty(authorEmail)) {
      stringBuilder.append("
");
      stringBuilder.append(composeHref("mailto:" + authorEmail));
    }
    final String homePage = info.getHomePage();
    if (StringUtil.isNotEmpty(homePage)) {
      stringBuilder.append("
");
      stringBuilder.append(composeHref(homePage));
    }
    stringBuilder.append(TEXT_SUFFIX);
    return stringBuilder.toString();
  }

  @NonNls private static final String HTML_PREFIX = "<a href=\"";
  @NonNls private static final String HTML_SUFFIX = "";

  @NotNull
  private static String composeHref(String vendorUrl) {
    return HTML_PREFIX + vendorUrl + "\">" + vendorUrl + HTML_SUFFIX;
  }

  private static boolean isCancelled(@NotNull List<ExecutionException> exceptions) {
    for (ExecutionException e : exceptions) {
      if (e instanceof RunCanceledByUserException) {
        return true;
      }
    }
    return false;
  }

  @NotNull
  private static ErrorDescription createDescription(@NotNull ExecutionException e, @Nullable Sdk sdk) {
    if (e instanceof PyExecutionException) {
      final PyExecutionException ee = (PyExecutionException)e;
      final String stdoutCause = findErrorCause(ee.getStdout());
      final String stderrCause = findErrorCause(ee.getStderr());
      final String cause = stdoutCause != null ? stdoutCause : stderrCause;
      final String message =  cause != null ? cause : ee.getMessage();
      final String command = ee.getCommand() + " " + StringUtil.join(ee.getArgs(), " ");
      return new ErrorDescription(message, command, ee.getStdout() + "\n" + ee.getStderr(), findErrorSolution(ee, cause, sdk));
    }
    else {
      return ErrorDescription.fromMessage(e.getMessage());
    }
  }

  @Nullable
  private static @DetailedDescription String findErrorSolution(@NotNull PyExecutionException e, @Nullable String cause, @Nullable Sdk sdk) {
    if (cause != null) {
      if (StringUtil.containsIgnoreCase(cause, "SyntaxError")) {
        final LanguageLevel languageLevel = PythonSdkType.getLanguageLevelForSdk(sdk);
        return PySdkBundle.message("python.sdk.use.python.version.supported.by.this.package", languageLevel);
      }
    }

    if (SystemInfo.isLinux && (containsInOutput(e, "pyconfig.h") || containsInOutput(e, "Python.h"))) {
      return PySdkBundle.message("python.sdk.check.python.development.packages.installed");
    }

    if ("pip".equals(e.getCommand()) && sdk != null) {
      return PySdkBundle.message("python.sdk.try.to.run.command.from.system.terminal", sdk.getHomePath());
    }

    return null;
  }

  private static boolean containsInOutput(@NotNull PyExecutionException e, @NotNull String text) {
    return StringUtil.containsIgnoreCase(e.getStdout(), text) || StringUtil.containsIgnoreCase(e.getStderr(), text);
  }

  @Nullable
  private static String findErrorCause(@NotNull String output) {
    final Matcher m = PATTERN_ERROR_LINE.matcher(output);
    if (m.find()) {
      final String result = m.group();
      return result != null ? result.trim() : null;
    }
    return null;
  }

  @Override
  public void updatePackage(@NotNull InstalledPackage installedPackage,
                            @Nullable String version,
                            @NotNull Listener listener) {
    installPackage(new RepoPackage(installedPackage.getName(), null), version, true, null, listener, false);
  }

  /**
   * @return whether the latest version should be requested independently for each package
   */
  @Override
  public boolean shouldFetchLatestVersionsForOnlyInstalledPackages() {
    return true;
  }

  @Override
  public void fetchLatestVersion(@NotNull InstalledPackage pkg, @NotNull CatchingConsumer<String, Exception> consumer) {
    myExecutorService.execute(() -> {
      if (myProject.isDisposed()) return;
      try {
        PyPIPackageUtil.INSTANCE.loadPackages();
        final String version = PyPIPackageUtil.INSTANCE.fetchLatestPackageVersion(myProject, pkg.getName());
        consumer.consume(StringUtil.notNullize(version));
      }
      catch (IOException e) {
        consumer.consume(e);
      }
    });
  }

  @Override
  public int compareVersions(@NotNull String version1, @NotNull String version2) {
    return PyPackageVersionComparator.getSTR_COMPARATOR().compare(version1, version2);
  }

  @Nullable
  @Override
  public String getID() {
    return "Python";
  }
}


text:
//
//  TwitterText.h
//
//  Copyright 2012-2014 Twitter, Inc.
//
//  Licensed under the Apache License, Version 2.0 (the "License");
//  you may not use this file except in compliance with the License.
//  You may obtain a copy of the License at
//
//  http://www.apache.org/licenses/LICENSE-2.0
//

/**
 This header is private to the Twitter Kit SDK and not exposed for public SDK consumption
 */

#import <Foundation/Foundation.h>
#import "TWTRTwitterTextEntity.h"

@interface TWTRTwitterText : NSObject

+ (NSArray *)entitiesInText:(NSString *)text;
+ (NSArray *)URLsInText:(NSString *)text;
+ (NSArray *)hashtagsInText:(NSString *)text checkingURLOverlap:(BOOL)checkingURLOverlap;
+ (NSArray *)symbolsInText:(NSString *)text checkingURLOverlap:(BOOL)checkingURLOverlap;
+ (NSArray *)mentionedScreenNamesInText:(NSString *)text;
+ (NSArray *)mentionsOrListsInText:(NSString *)text;
+ (TWTRTwitterTextEntity *)repliedScreenNameInText:(NSString *)text;

+ (NSCharacterSet *)validHashtagBoundaryCharacterSet;

+ (NSUInteger)tweetLength:(NSString *)text;
+ (NSUInteger)tweetLength:(NSString *)text httpURLLength:(NSUInteger)httpURLLength httpsURLLength:(NSUInteger)httpsURLLength;

+ (NSInteger)remainingCharacterCount:(NSString *)text;
+ (NSInteger)remainingCharacterCount:(NSString *)text httpURLLength:(NSUInteger)httpURLLength httpsURLLength:(NSUInteger)httpsURLLength;

@end


text:
@interface GGRecommendCategory : NSObject

@property (nonatomic, assign) NSInteger id;
@property (nonatomic, assign) NSInteger count;
@property(nonatomic ,copy) NSString *name;

//这个类别存储该栏目的用户数据
@property(nonatomic,strong) NSMutableArray  * user;

@property (nonatomic, assign) NSInteger total;
@property (nonatomic, assign) NSInteger currentPage;

@end


text:
package io.cdap.plugin.datagen.generator;

import com.github.javafaker.Lorem;
import io.cdap.plugin.datagen.GeneratorContext;

/**
 * Generates random text.
 */
public class LoremGenerator extends RandomGenerator<String> {
  private final Config config;
  private Lorem lorem;

  public LoremGenerator(Config config) {
    this.config = config;
  }

  @Override
  public void initialize(GeneratorContext context) {
    super.initialize(context);
    lorem = context.getFaker().lorem();
  }

  @Override
  public String generate() {
    return lorem.fixedString(config.size);
  }

  /**
   * Config.
   */
  public static class Config {
    private int size;

    public Config() {
      this(100);
    }

    public Config(int size) {
      this.size = size;
    }
  }
}


text:
module Momo

	class Resource < MomoScope

		include MomoCondition

		attr_accessor :type, :name, :props, :metadata, :condition, :dependencies, :deletion_policy

		def initialize(type, name, stack)
			@type = type
			@name = name
			@metadata = nil
			@props = {}
			@condition = nil
			@dependencies = []
			@complete = false
			@deletion_policy = nil
			@stack = stack
		end

		def method_missing(name, *args, &block)

			if !@complete
				if /^[[:upper:]]/.match(name) == nil
					raise "Invalid property name: #{name}"
				end
				@props[name] = Momo.resolve(args[0], resource: name, stack: @stack, &block)

			else
				if /^[[:upper:]]/.match(name) == nil
					raise "Invalid attribute name: #{name}"
				end
				# For get attributes when the resource is completed
				# TODO: should instead instance eval with a different class
				MemberReference.new @name, name, @stack
			end
		end

		def set_deletion_policy(value)
			@deletion_policy = value
		end

		def complete!
			@complete = true
		end

		def init_metadata!

			if !@metadata
				@metadata = {}
			end
		end

		def init_cfinit!
			init_metadata!

			if !@metadata["AWS::CloudFormation::Init"]
				@metadata["AWS::CloudFormation::Init"] = {}
			end

			if !@metadata["AWS::CloudFormation::Init"]["config"]
				@metadata["AWS::CloudFormation::Init"]["config"] = {
					"packages" => {},
					"groups" => {},
					"users" => {},
					"sources" => {},
					"files" => {},
					"commands" => {},
					"services" => {}
				}
			end
		end

		def init_group(group)
			init_cfinit!
			if !@metadata["AWS::CloudFormation::Init"]["config"][group]
				@metadata["AWS::CloudFormation::Init"]["config"][group] = {}
			end
		end

		def add_thing(group, name, thing)
			init_group(group)

			if !@metadata["AWS::CloudFormation::Init"]["config"][group][name]
				@metadata["AWS::CloudFormation::Init"]["config"][group][name] = []
			end

			@metadata["AWS::CloudFormation::Init"]["config"][group][name] << thing
		end

		def set_thing(group, subgroup, name, thing)
			init_group(group)

			if !@metadata["AWS::CloudFormation::Init"]["config"][group][subgroup]
				@metadata["AWS::CloudFormation::Init"]["config"][group][subgroup] = {}
			end

			@metadata["AWS::CloudFormation::Init"]["config"][group][subgroup][name] = thing
		end

		def set_thing2(group, name, thing)
			init_group(group)

			@metadata["AWS::CloudFormation::Init"]["config"][group][name] = thing
		end

		def yum(package)
			set_thing("packages", "yum", package, [])
		end

		def gem(package)
			set_thing("packages", "rubygems", package, [])
		end

		def rpm(package)
			set_thing("packages", "rpm", package, [])
		end

		def file(name, options={})
			info = {
				"content" => "",
				"group" => "root",
				"owner" => "root",
				"mode" => "000600",
				"context" => {},
			}

			if options[:content] and options[:source]
				raise "Momo CFL Resource: Please specify only file content or source and not both"
			end

			info["content"] = options[:content] if options[:content]
			info["source"] = options[:source] if options[:source]
			info["group"] = options[:group] if options[:group]
			info["mode"] = options[:mode] if options[:mode]
			info["owner"] = options[:owner] if options[:owner]
			info["context"] = Momo.resolve(options[:context], stack: @stack, resource: name) if options[:context]

			set_thing2("files", name, info)
		end

		def service(service_name)
			set_thing("services", "sysvinit", service_name, {enabled: true, ensureRunning: true})
		end

		def tag(key, value, options={})
			if !@props["Tags"]
				@props["Tags"] = []
			end

			theTag = { "Key" => key, "Value" => Momo.resolve(value) }
			theTag["PropagateAtLaunch"] = options[:propagate_at_launch] if options[:propagate_at_launch]

			@props["Tags"] << theTag
		end

		def depends_on(resource)
			if resource.is_a? String
				@dependencies << args[0]
			elsif resource.is_a? Resource
				@dependencies << resource.name
			else
				raise "Invalid argument to depends_on: #{resource[0]}"
			end
		end
	end
end


text:
package com.landawn.abacus.pool;

/**
 *
 * @since 0.8
 *
 * @author Haiyang Li
 */
public abstract class PoolFactory {
    private PoolFactory() {
        // singleton
    }

    public static <E extends Poolable> ObjectPool<E> createObjectPool(int capacity) {
        return new GenericObjectPool<E>(capacity, AbstractPool.DEFAULT_EVICT_DELAY, EvictionPolicy.LAST_ACCESS_TIME);
    }

    public static <E extends Poolable> ObjectPool<E> createObjectPool(int capacity, long evictDelay) {
        return new GenericObjectPool<E>(capacity, evictDelay, EvictionPolicy.LAST_ACCESS_TIME);
    }

    public static <E extends Poolable> ObjectPool<E> createObjectPool(int capacity, long evictDelay, EvictionPolicy evictionPolicy) {
        return new GenericObjectPool<E>(capacity, evictDelay, evictionPolicy);
    }

    public static <E extends Poolable> ObjectPool<E> createObjectPool(int capacity, long evictDelay, EvictionPolicy evictionPolicy, long maxMemorySize,
            ObjectPool.MemoryMeasure<E> memoryMeasure) {
        return new GenericObjectPool<E>(capacity, evictDelay, evictionPolicy, maxMemorySize, memoryMeasure);
    }

    public static <E extends Poolable> ObjectPool<E> createObjectPool(int capacity, long evictDelay, EvictionPolicy evictionPolicy, boolean autoBalance,
            float balanceFactor) {
        return new GenericObjectPool<E>(capacity, evictDelay, evictionPolicy, autoBalance, balanceFactor);
    }

    /**
     *
     * @param capacity
     * @param evictDelay
     * @param evictionPolicy default value is EvictionPolicy.LAST_ACCESS_TIME
     * @param autoBalance default value is true
     * @param balanceFactor default value is 0.2
     * @param maxMemorySize
     * @param memoryMeasure
     * @return
     */
    public static <E extends Poolable> ObjectPool<E> createObjectPool(int capacity, long evictDelay, EvictionPolicy evictionPolicy, boolean autoBalance,
            float balanceFactor, long maxMemorySize, ObjectPool.MemoryMeasure<E> memoryMeasure) {
        return new GenericObjectPool<E>(capacity, evictDelay, evictionPolicy, autoBalance, balanceFactor, maxMemorySize, memoryMeasure);
    }

    public static <K, E extends Poolable> KeyedObjectPool<K, E> createKeyedObjectPool(int capacity) {
        return new GenericKeyedObjectPool<K, E>(capacity, AbstractPool.DEFAULT_EVICT_DELAY, EvictionPolicy.LAST_ACCESS_TIME);
    }

    public static <K, E extends Poolable> KeyedObjectPool<K, E> createKeyedObjectPool(int capacity, long evictDelay) {
        return new GenericKeyedObjectPool<K, E>(capacity, evictDelay, EvictionPolicy.LAST_ACCESS_TIME);
    }

    public static <K, E extends Poolable> KeyedObjectPool<K, E> createKeyedObjectPool(int capacity, long evictDelay, EvictionPolicy evictionPolicy) {
        return new GenericKeyedObjectPool<K, E>(capacity, evictDelay, evictionPolicy);
    }

    public static <K, E extends Poolable> KeyedObjectPool<K, E> createKeyedObjectPool(int capacity, long evictDelay, EvictionPolicy evictionPolicy,
            long maxMemorySize, KeyedObjectPool.MemoryMeasure<K, E> memoryMeasure) {
        return new GenericKeyedObjectPool<K, E>(capacity, evictDelay, evictionPolicy, maxMemorySize, memoryMeasure);
    }

    public static <K, E extends Poolable> KeyedObjectPool<K, E> createKeyedObjectPool(int capacity, long evictDelay, EvictionPolicy evictionPolicy,
            boolean autoBalance, float balanceFactor) {
        return new GenericKeyedObjectPool<K, E>(capacity, evictDelay, evictionPolicy, autoBalance, balanceFactor);
    }

    /**
     *
     * @param capacity
     * @param evictDelay
     * @param evictionPolicy default value is EvictionPolicy.LAST_ACCESS_TIME
     * @param autoBalance default value is true
     * @param balanceFactor default value is 0.2
     * @param maxMemorySize
     * @param memoryMeasure
     * @return
     */
    public static <K, E extends Poolable> KeyedObjectPool<K, E> createKeyedObjectPool(int capacity, long evictDelay, EvictionPolicy evictionPolicy,
            boolean autoBalance, float balanceFactor, long maxMemorySize, KeyedObjectPool.MemoryMeasure<K, E> memoryMeasure) {
        return new GenericKeyedObjectPool<K, E>(capacity, evictDelay, evictionPolicy, autoBalance, balanceFactor, maxMemorySize, memoryMeasure);
    }
}


text:
import { Injectable } from '@angular/core';
import { Node } from '@alfresco/js-api';
import { CardViewDateItemModel, CardViewTextItemModel, FileSizePipe } from '@alfresco/adf-core';
@Injectable({
    providedIn: 'root'
})
export class BasicPropertiesService {

    constructor(private fileSizePipe: FileSizePipe) {
    }

    getProperties(node: Node) {
        const sizeInBytes = node.content ? node.content.sizeInBytes : '';
        const mimeTypeName = node.content ? node.content.mimeTypeName : '';
        const author = node.properties ? node.properties['cm:author'] : '';
        const description = node.properties ? node.properties['cm:description'] : '';
        const title = node.properties ? node.properties['cm:title'] : '';

        return [
            new CardViewTextItemModel({
                label: 'CORE.METADATA.BASIC.NAME',
                value: node.name,
                key: 'properties.cm:name',
                editable: true
            }),
            new CardViewTextItemModel({
                label: 'CORE.METADATA.BASIC.TITLE',
                value: title,
                key: 'properties.cm:title',
                editable: true
            }),
            new CardViewTextItemModel({
                label: 'CORE.METADATA.BASIC.CREATOR',
                value: node.createdByUser.displayName,
                key: 'createdByUser.displayName',
                editable: false
            }),
            new CardViewDateItemModel({
                label: 'CORE.METADATA.BASIC.CREATED_DATE',
                value: node.createdAt,
                key: 'createdAt',
                editable: false,
                format: 'mediumDate'
            }),
            new CardViewTextItemModel({
                label: 'CORE.METADATA.BASIC.SIZE',
                value: sizeInBytes,
                key: 'content.sizeInBytes',
                pipes: [{ pipe: this.fileSizePipe }],
                editable: false
            }),
            new CardViewTextItemModel({
                label: 'CORE.METADATA.BASIC.MODIFIER',
                value: node.modifiedByUser.displayName,
                key: 'modifiedByUser.displayName',
                editable: false
            }),
            new CardViewDateItemModel({
                label: 'CORE.METADATA.BASIC.MODIFIED_DATE',
                value: node.modifiedAt,
                key: 'modifiedAt',
                editable: false,
                format: 'mediumDate'
            }),
            new CardViewTextItemModel({
                label: 'CORE.METADATA.BASIC.MIMETYPE',
                value: mimeTypeName,
                key: 'content.mimeTypeName',
                editable: false
            }),
            new CardViewTextItemModel({
                label: 'CORE.METADATA.BASIC.AUTHOR',
                value: author,
                key: 'properties.cm:author',
                editable: true
            }),
            new CardViewTextItemModel({
                label: 'CORE.METADATA.BASIC.DESCRIPTION',
                value: description,
                key: 'properties.cm:description',
                multiline: true,
                editable: true
            })
        ];
    }
}


text:
import { CSS, nativeRaf, transitionEnd, nativeTimeout } from '../util/dom';
import { isDefined } from '../util/util';
export var Animation = (function () {
    function Animation(ele, opts, raf) {
        this._dur = null;
        this._es = null;
        this.hasChildren = false;
        this.isPlaying = false;
        this.hasCompleted = false;
        this.element(ele).opts = opts;
        this._raf = raf || nativeRaf;
    }
    Animation.prototype.element = function (ele) {
        if (ele) {
            if (typeof ele === 'string') {
                ele = document.querySelectorAll(ele);
                for (var i = 0; i < ele.length; i++) {
                    this._addEle(ele[i]);
                }
            }
            else if (ele.length) {
                for (var i = 0; i < ele.length; i++) {
                    this._addEle(ele[i]);
                }
            }
            else {
                this._addEle(ele);
            }
        }
        return this;
    };
    Animation.prototype._addEle = function (ele) {
        if (ele.nativeElement) {
            ele = ele.nativeElement;
        }
        if (ele.nodeType === 1) {
            this._eL = (this._e = this._e || []).push(ele);
        }
    };
    Animation.prototype.add = function (childAnimation) {
        childAnimation.parent = this;
        this.hasChildren = true;
        this._cL = (this._c = this._c || []).push(childAnimation);
        return this;
    };
    Animation.prototype.getDuration = function (opts) {
        if (opts && isDefined(opts.duration)) {
            return opts.duration;
        }
        else if (this._dur !== null) {
            return this._dur;
        }
        else if (this.parent) {
            return this.parent.getDuration();
        }
        return 0;
    };
    Animation.prototype.duration = function (milliseconds) {
        this._dur = milliseconds;
        return this;
    };
    Animation.prototype.getEasing = function () {
        return this._es !== null ? this._es : (this.parent && this.parent.getEasing()) || null;
    };
    Animation.prototype.easing = function (name) {
        this._es = name;
        return this;
    };
    Animation.prototype.from = function (prop, val) {
        this._addProp('from', prop, val);
        return this;
    };
    Animation.prototype.to = function (prop, val, clearProperyAfterTransition) {
        var fx = this._addProp('to', prop, val);
        if (clearProperyAfterTransition) {
            this.afterClearStyles([fx.trans ? CSS.transform : prop]);
        }
        return this;
    };
    Animation.prototype.fromTo = function (prop, fromVal, toVal, clearProperyAfterTransition) {
        return this.from(prop, fromVal).to(prop, toVal, clearProperyAfterTransition);
    };
    Animation.prototype._getProp = function (name) {
        if (this._fx) {
            return this._fx.find(function (prop) { return prop.name === name; });
        }
        else {
            this._fx = [];
        }
        return null;
    };
    Animation.prototype._addProp = function (state, prop, val) {
        var fxProp = this._getProp(prop);
        if (!fxProp) {
            var shouldTrans = (TRANSFORMS[prop] === 1);
            fxProp = {
                name: prop,
                trans: shouldTrans,
                wc: (shouldTrans ? CSS.transform : prop)
            };
            this._fx.push(fxProp);
        }
        var fxState = {
            val: val,
            num: null,
            unit: '',
        };
        fxProp[state] = fxState;
        if (typeof val === 'string' && val.indexOf(' ') < 0) {
            var r = val.match(CSS_VALUE_REGEX);
            var num = parseFloat(r[1]);
            if (!isNaN(num)) {
                fxState.num = num;
            }
            fxState.unit = (r[0] !== r[2] ? r[2] : '');
        }
        else if (typeof val === 'number') {
            fxState.num = val;
        }
        return fxProp;
    };
    Animation.prototype.beforeAddClass = function (className) {
        (this._bfAdd = this._bfAdd || []).push(className);
        return this;
    };
    Animation.prototype.beforeRemoveClass = function (className) {
        (this._bfRm = this._bfRm || []).push(className);
        return this;
    };
    Animation.prototype.beforeStyles = function (styles) {
        this._bfSty = styles;
        return this;
    };
    Animation.prototype.beforeClearStyles = function (propertyNames) {
        this._bfSty = this._bfSty || {};
        for (var i = 0; i < propertyNames.length; i++) {
            this._bfSty[propertyNames[i]] = '';
        }
        return this;
    };
    Animation.prototype.beforeAddRead = function (domReadFn) {
        (this._rdFn = this._rdFn || []).push(domReadFn);
        return this;
    };
    Animation.prototype.beforeAddWrite = function (domWriteFn) {
        (this._wrFn = this._wrFn || []).push(domWriteFn);
        return this;
    };
    Animation.prototype.afterAddClass = function (className) {
        (this._afAdd = this._afAdd || []).push(className);
        return this;
    };
    Animation.prototype.afterRemoveClass = function (className) {
        (this._afRm = this._afRm || []).push(className);
        return this;
    };
    Animation.prototype.afterStyles = function (styles) {
        this._afSty = styles;
        return this;
    };
    Animation.prototype.afterClearStyles = function (propertyNames) {
        this._afSty = this._afSty || {};
        for (var i = 0; i < propertyNames.length; i++) {
            this._afSty[propertyNames[i]] = '';
        }
        return this;
    };
    Animation.prototype.play = function (opts) {
        var _this = this;
        if (!this._raf) {
            return;
        }
        this._isAsync = this._hasDuration(opts);
        this._clearAsync();
        this._playInit(opts);
        this._raf(function () {
            (void 0);
            _this._raf(_this._playDomInspect.bind(_this, opts));
        });
    };
    Animation.prototype._playInit = function (opts) {
        this._twn = false;
        this.isPlaying = true;
        this.hasCompleted = false;
        this._hasDur = (this.getDuration(opts) > ANIMATION_DURATION_MIN);
        var children = this._c;
        for (var i = 0; i < this._cL; i++) {
            children[i]._playInit(opts);
        }
        if (this._hasDur) {
            this._progress(0);
            this._willChg(true);
        }
    };
    Animation.prototype._playDomInspect = function (opts) {
        (void 0);
        this._beforeAnimation();
        var dur = this.getDuration(opts);
        if (this._isAsync) {
            this._asyncEnd(dur, true);
        }
        this._playProgress(opts);
        if (this._isAsync && this._raf) {
            this._raf(this._playToStep.bind(this, 1));
        }
    };
    Animation.prototype._playProgress = function (opts) {
        var children = this._c;
        for (var i = 0; i < this._cL; i++) {
            children[i]._playProgress(opts);
        }
        if (this._hasDur) {
            this._setTrans(this.getDuration(opts), false);
        }
        else {
            this._progress(1);
            this._setAfterStyles();
            this._didFinish(true);
        }
    };
    Animation.prototype._playToStep = function (stepValue) {
        var children = this._c;
        for (var i = 0; i < this._cL; i++) {
            children[i]._playToStep(stepValue);
        }
        if (this._hasDur) {
            this._progress(stepValue);
        }
    };
    Animation.prototype._asyncEnd = function (dur, shouldComplete) {
        var self = this;
        function onTransitionEnd(ev) {
            self._clearAsync();
            self._playEnd();
            self._didFinishAll(shouldComplete, true, false);
        }
        function onTransitionFallback() {
            (void 0);
            self._tm = 0;
            self._clearAsync();
            self._playEnd(1);
            self._didFinishAll(shouldComplete, true, false);
        }
        self._unrgTrns = transitionEnd(self._transEl(), onTransitionEnd);
        self._tm = nativeTimeout(onTransitionFallback, (dur + TRANSITION_END_FALLBACK_PADDING_MS));
    };
    Animation.prototype._playEnd = function (stepValue) {
        var children = this._c;
        for (var i = 0; i < this._cL; i++) {
            children[i]._playEnd(stepValue);
        }
        if (this._hasDur) {
            if (isDefined(stepValue)) {
                this._setTrans(0, true);
                this._progress(stepValue);
            }
            this._setAfterStyles();
            this._willChg(false);
        }
    };
    Animation.prototype._hasDuration = function (opts) {
        if (this.getDuration(opts) > ANIMATION_DURATION_MIN) {
            return true;
        }
        var children = this._c;
        for (var i = 0; i < this._cL; i++) {
            if (children[i]._hasDuration(opts)) {
                return true;
            }
        }
        return false;
    };
    Animation.prototype._hasDomReads = function () {
        if (this._rdFn && this._rdFn.length) {
            return true;
        }
        var children = this._c;
        for (var i = 0; i < this._cL; i++) {
            if (children[i]._hasDomReads()) {
                return true;
            }
        }
        return false;
    };
    Animation.prototype.stop = function (stepValue) {
        if (stepValue === void 0) { stepValue = 1; }
        this._clearAsync();
        this._hasDur = true;
        this._playEnd(stepValue);
    };
    Animation.prototype._clearAsync = function () {
        this._unrgTrns && this._unrgTrns();
        this._tm && clearTimeout(this._tm);
        this._tm = this._unrgTrns = undefined;
    };
    Animation.prototype._progress = function (stepValue) {
        var val;
        var effects = this._fx;
        var nuElements = this._eL;
        if (!effects || !nuElements) {
            return;
        }
        if (this._rv) {
            stepValue = ((stepValue * -1) + 1);
        }
        var i, j;
        var finalTransform = '';
        var elements = this._e;
        for (i = 0; i < effects.length; i++) {
            var fx = effects[i];
            if (fx.from && fx.to) {
                var fromNum = fx.from.num;
                var toNum = fx.to.num;
                var tweenEffect = (fromNum !== toNum);
                if (tweenEffect) {
                    this._twn = true;
                }
                if (stepValue === 0) {
                    val = fx.from.val;
                }
                else if (stepValue === 1) {
                    val = fx.to.val;
                }
                else if (tweenEffect) {
                    val = (((toNum - fromNum) * stepValue) + fromNum) + fx.to.unit;
                }
                if (val !== null) {
                    var prop = fx.name;
                    if (fx.trans) {
                        finalTransform += prop + '(' + val + ') ';
                    }
                    else {
                        for (j = 0; j < nuElements; j++) {
                            elements[j].style[prop] = val;
                        }
                    }
                }
            }
        }
        if (finalTransform.length) {
            if (!this._rv && stepValue !== 1 || this._rv && stepValue !== 0) {
                finalTransform += 'translateZ(0px)';
            }
            var cssTransform = CSS.transform;
            for (i = 0; i < elements.length; i++) {
                elements[i].style[cssTransform] = finalTransform;
            }
        }
    };
    Animation.prototype._setTrans = function (dur, forcedLinearEasing) {
        if (!this._fx) {
            return;
        }
        var elements = this._e;
        var easing = (forcedLinearEasing ? 'linear' : this.getEasing());
        var durString = dur + 'ms';
        var cssTransform = CSS.transition;
        var cssTransitionDuration = CSS.transitionDuration;
        var cssTransitionTimingFn = CSS.transitionTimingFn;
        var eleStyle;
        for (var i = 0; i < this._eL; i++) {
            eleStyle = elements[i].style;
            if (dur > 0) {
                eleStyle[cssTransform] = '';
                eleStyle[cssTransitionDuration] = durString;
                if (easing) {
                    eleStyle[cssTransitionTimingFn] = easing;
                }
            }
            else {
                eleStyle[cssTransform] = 'none';
            }
        }
    };
    Animation.prototype._beforeAnimation = function () {
        this._fireBeforeReadFunc();
        this._fireBeforeWriteFunc();
        this._setBeforeStyles();
    };
    Animation.prototype._setBeforeStyles = function () {
        var i, j;
        var children = this._c;
        for (i = 0; i < this._cL; i++) {
            children[i]._setBeforeStyles();
        }
        if (this._rv) {
            return;
        }
        var addClasses = this._bfAdd;
        var removeClasses = this._bfRm;
        var ele;
        var eleClassList;
        var prop;
        for (i = 0; i < this._eL; i++) {
            ele = this._e[i];
            eleClassList = ele.classList;
            if (addClasses) {
                for (j = 0; j < addClasses.length; j++) {
                    eleClassList.add(addClasses[j]);
                }
            }
            if (removeClasses) {
                for (j = 0; j < removeClasses.length; j++) {
                    eleClassList.remove(removeClasses[j]);
                }
            }
            if (this._bfSty) {
                for (prop in this._bfSty) {
                    ele.style[prop] = this._bfSty[prop];
                }
            }
        }
    };
    Animation.prototype._fireBeforeReadFunc = function () {
        var children = this._c;
        for (var i = 0; i < this._cL; i++) {
            children[i]._fireBeforeReadFunc();
        }
        var readFunctions = this._rdFn;
        if (readFunctions) {
            for (var i = 0; i < readFunctions.length; i++) {
                readFunctions[i]();
            }
        }
    };
    Animation.prototype._fireBeforeWriteFunc = function () {
        var children = this._c;
        for (var i = 0; i < this._cL; i++) {
            children[i]._fireBeforeWriteFunc();
        }
        var writeFunctions = this._wrFn;
        if (this._wrFn) {
            for (var i = 0; i < writeFunctions.length; i++) {
                writeFunctions[i]();
            }
        }
    };
    Animation.prototype._setAfterStyles = function () {
        var i, j;
        var ele;
        var eleClassList;
        var elements = this._e;
        for (i = 0; i < this._eL; i++) {
            ele = elements[i];
            eleClassList = ele.classList;
            ele.style[CSS.transitionDuration] = ele.style[CSS.transitionTimingFn] = '';
            if (this._rv) {
                if (this._bfAdd) {
                    for (j = 0; j < this._bfAdd.length; j++) {
                        eleClassList.remove(this._bfAdd[j]);
                    }
                }
                if (this._bfRm) {
                    for (j = 0; j < this._bfRm.length; j++) {
                        eleClassList.add(this._bfRm[j]);
                    }
                }
                if (this._bfSty) {
                    for (var prop in this._bfSty) {
                        ele.style[prop] = '';
                    }
                }
            }
            else {
                if (this._afAdd) {
                    for (j = 0; j < this._afAdd.length; j++) {
                        eleClassList.add(this._afAdd[j]);
                    }
                }
                if (this._afRm) {
                    for (j = 0; j < this._afRm.length; j++) {
                        eleClassList.remove(this._afRm[j]);
                    }
                }
                if (this._afSty) {
                    for (var prop in this._afSty) {
                        ele.style[prop] = this._afSty[prop];
                    }
                }
            }
        }
    };
    Animation.prototype._willChg = function (addWillChange) {
        var wc;
        var effects = this._fx;
        var willChange;
        if (addWillChange && effects) {
            wc = [];
            for (var i = 0; i < effects.length; i++) {
                var propWC = effects[i].wc;
                if (propWC === 'webkitTransform') {
                    wc.push('transform', '-webkit-transform');
                }
                else {
                    wc.push(propWC);
                }
            }
            willChange = wc.join(',');
        }
        else {
            willChange = '';
        }
        for (var i = 0; i < this._eL; i++) {
            this._e[i].style.willChange = willChange;
        }
    };
    Animation.prototype.progressStart = function () {
        this._clearAsync();
        this._beforeAnimation();
        this._progressStart();
    };
    Animation.prototype._progressStart = function () {
        var children = this._c;
        for (var i = 0; i < this._cL; i++) {
            children[i]._progressStart();
        }
        this._setTrans(0, true);
        this._willChg(true);
    };
    Animation.prototype.progressStep = function (stepValue) {
        stepValue = Math.min(1, Math.max(0, stepValue));
        var children = this._c;
        for (var i = 0; i < this._cL; i++) {
            children[i].progressStep(stepValue);
        }
        if (this._rv) {
            stepValue = ((stepValue * -1) + 1);
        }
        this._progress(stepValue);
    };
    Animation.prototype.progressEnd = function (shouldComplete, currentStepValue, maxDelta) {
        if (maxDelta === void 0) { maxDelta = 0; }
        (void 0);
        this._isAsync = (currentStepValue > 0.05 && currentStepValue < 0.95);
        var stepValue = shouldComplete ? 1 : 0;
        var factor = Math.max(Math.abs(currentStepValue - stepValue), 0.5) * 2;
        var dur = 64 + factor * maxDelta;
        this._progressEnd(shouldComplete, stepValue, dur, this._isAsync);
        if (this._isAsync) {
            this._asyncEnd(dur, shouldComplete);
            this._raf && this._raf(this._playToStep.bind(this, stepValue));
        }
    };
    Animation.prototype._progressEnd = function (shouldComplete, stepValue, dur, isAsync) {
        var children = this._c;
        for (var i = 0; i < this._cL; i++) {
            children[i]._progressEnd(shouldComplete, stepValue, dur, isAsync);
        }
        if (!isAsync) {
            this._progress(stepValue);
            this._willChg(false);
            this._setAfterStyles();
            this._didFinish(shouldComplete);
        }
        else {
            this.isPlaying = true;
            this.hasCompleted = false;
            this._hasDur = true;
            this._willChg(true);
            this._setTrans(dur, false);
        }
    };
    Animation.prototype.onFinish = function (callback, onceTimeCallback, clearOnFinishCallacks) {
        if (onceTimeCallback === void 0) { onceTimeCallback = false; }
        if (clearOnFinishCallacks === void 0) { clearOnFinishCallacks = false; }
        if (clearOnFinishCallacks) {
            this._fFn = this._fOneFn = undefined;
        }
        if (onceTimeCallback) {
            this._fOneFn = this._fOneFn || [];
            this._fOneFn.push(callback);
        }
        else {
            this._fFn = this._fFn || [];
            this._fFn.push(callback);
        }
        return this;
    };
    Animation.prototype._didFinishAll = function (hasCompleted, finishAsyncAnimations, finishNoDurationAnimations) {
        var children = this._c;
        for (var i = 0; i < this._cL; i++) {
            children[i]._didFinishAll(hasCompleted, finishAsyncAnimations, finishNoDurationAnimations);
        }
        if (finishAsyncAnimations && this._isAsync || finishNoDurationAnimations && !this._isAsync) {
            this._didFinish(hasCompleted);
        }
    };
    Animation.prototype._didFinish = function (hasCompleted) {
        this.isPlaying = false;
        this.hasCompleted = hasCompleted;
        if (this._fFn) {
            for (var i = 0; i < this._fFn.length; i++) {
                this._fFn[i](this);
            }
        }
        if (this._fOneFn) {
            for (var i = 0; i < this._fOneFn.length; i++) {
                this._fOneFn[i](this);
            }
            this._fOneFn.length = 0;
        }
    };
    Animation.prototype.reverse = function (shouldReverse) {
        if (shouldReverse === void 0) { shouldReverse = true; }
        var children = this._c;
        for (var i = 0; i < this._cL; i++) {
            children[i].reverse(shouldReverse);
        }
        this._rv = shouldReverse;
        return this;
    };
    Animation.prototype.destroy = function () {
        var children = this._c;
        for (var i = 0; i < this._cL; i++) {
            children[i].destroy();
        }
        this._clearAsync();
        this.parent = this._e = this._rdFn = this._wrFn = this._raf = null;
        if (this._c) {
            this._c.length = this._cL = 0;
        }
        if (this._fFn) {
            this._fFn.length = 0;
        }
        if (this._fOneFn) {
            this._fOneFn.length = 0;
        }
    };
    Animation.prototype._transEl = function () {
        var targetEl;
        for (var i = 0; i < this._cL; i++) {
            targetEl = this._c[i]._transEl();
            if (targetEl) {
                return targetEl;
            }
        }
        return (this._twn && this._hasDur && this._eL ? this._e[0] : null);
    };
    return Animation;
}());
var TRANSFORMS = {
    'translateX': 1,
    'translateY': 1,
    'translateZ': 1,
    'scale': 1,
    'scaleX': 1,
    'scaleY': 1,
    'scaleZ': 1,
    'rotate': 1,
    'rotateX': 1,
    'rotateY': 1,
    'rotateZ': 1,
    'skewX': 1,
    'skewY': 1,
    'perspective': 1
};
var CSS_VALUE_REGEX = /(^-?\d*\.?\d*)(.*)/;
var ANIMATION_DURATION_MIN = 32;
var TRANSITION_END_FALLBACK_PADDING_MS = 400;
//# sourceMappingURL=animation.js.map


text:
class cItemGoldenAppleHandler :
	public cItemFoodHandler
{
	typedef cItemFoodHandler super;

public:
	cItemGoldenAppleHandler()
		: super(E_ITEM_GOLDEN_APPLE)
	{
	}

	virtual bool EatItem(cPlayer * a_Player, cItem * a_Item) override
	{
		// Feed the player:
		FoodInfo Info = GetFoodInfo();
		a_Player->Feed(Info.FoodLevel, Info.Saturation);

		// Add the effects:
		a_Player->AddEntityEffect(cEntityEffect::effAbsorption, 2400, 0);
		a_Player->AddEntityEffect(cEntityEffect::effRegeneration, 100, 1);

		// When the apple is a 'notch apple', give extra effects:
		if (a_Item->m_ItemDamage >= E_META_GOLDEN_APPLE_ENCHANTED)
		{
			a_Player->AddEntityEffect(cEntityEffect::effRegeneration, 600, 4);
			a_Player->AddEntityEffect(cEntityEffect::effResistance, 6000, 0);
			a_Player->AddEntityEffect(cEntityEffect::effFireResistance, 6000, 0);
		}

		a_Player->GetInventory().RemoveOneEquippedItem();
		return true;
	}

	virtual FoodInfo GetFoodInfo(void) override
	{
		return FoodInfo(4, 9.6);
	}

	virtual bool GetEatEffect(cEntityEffect::eType & a_EffectType, int & a_EffectDurationTicks, short & a_EffectIntensity, float & a_Chance) override
	{
		return false;
	}

};


text:
<?php
return array (
  'New Comment' => 'Neuer Kommentar',
);


text:
class Customer
  include Mongoid::Document

  field :name

  embeds_one :home_address, class_name: 'CustomerAddress', as: :addressable
  embeds_one :work_address, class_name: 'CustomerAddress', as: :addressable
end


text:
<?php

namespace backend\modules\sekretariat\organisation;

class Module extends \yii\base\Module
{
    public $controllerNamespace = 'backend\modules\sekretariat\organisation\controllers';

    public function init()
    {
        parent::init();
    }

	public function getMenuItems(){
		return [
			['icon'=>'fa fa-fw fa-dashboard','label' => 'Dashboard', 'url' => ['/'.$this->uniqueId.'/default']],
			['icon'=>'fa fa-fw fa-tree','label' => 'Referensi', 'url' => '#','items'=>[
			['icon'=>'fa fa-fw fa-graduation-cap','label' => 'Graduate', 'url' => ['/'.$this->uniqueId.'/graduate/index'],'path'=>'graduate/'],
			['icon'=>'fa fa-fw fa-sliders','label' => 'Program Code', 'url' => ['/'.$this->uniqueId.'/program-code/index'],'path'=>'program-code/'],
			['icon'=>'fa fa-fw fa-empire', 'label' => 'Religion', 'url' => ['/'.$this->uniqueId.'/religion/index'],'path'=>'religion/'],
			['icon'=>'fa fa-fw fa-trophy', 'label' => 'RankClass', 'url' => ['/'.$this->uniqueId.'/rank-class/index'],'path'=>'rank-class/'],
			['icon'=>'fa fa-fw fa-institution', 'label' => 'Satker', 'url' => ['/'.$this->uniqueId.'/satker/index'],'path'=>'satker/'],
			['icon'=>'fa fa-fw fa-database', 'label' => 'StaUnit', 'url' => ['/'.$this->uniqueId.'/sta-unit/index'],'path'=>'sta-unit/'],
			['icon'=>'fa fa-fw fa-building', 'label' => 'Unit', 'url' => ['/'.$this->uniqueId.'/unit/index'],'path'=>'unit/'],
			]],
		];
	}
}


text:
package se.sunet.ati.ladok.rest.services.impl;

import static junit.framework.TestCase.fail;
import static org.junit.Assert.*;

import java.util.Objects;

import javax.ws.rs.core.Response;

import org.junit.Ignore;
import org.junit.Test;
import org.mockito.Matchers;
import org.mockito.Mockito;

import se.ladok.schemas.LadokException;
import se.ladok.schemas.studentinformation.Student;
import se.sunet.ati.ladok.rest.services.LadokRestClientException;

public class ResponseFactoryTest {

	@Test
	@Ignore
	public void responseOk() {
		Response response = mockResponse(200, new Student());

		Student student = ResponseFactory.validatedResponse(response, Student.class);

		assertNotNull(student);
	}

	@Test
	@Ignore
	public void responseGenericException() {
		Response response = mockResponse(300, new IllegalStateException("FEL"));

		try {
			ResponseFactory.validatedResponse(response, Student.class);
			fail();
		} catch (LadokRestClientException e) {
			assertTrue(e.getMessage().contains("FEL"));
			assertEquals(300, e.getHttpStatusCode());
			assertNull(e.getLadokException());
		}
	}

	@Test
	@Ignore
	public void responseLadokException() {
		LadokException ladokException = new LadokException();
		Response response = mockResponse(300, ladokException);

		try {
			ResponseFactory.validatedResponse(response, Student.class);
			fail();
		} catch (LadokRestClientException e) {
			assertTrue(e.getMessage().contains("meddelande: " + LadokException.class.getCanonicalName()));
			assertEquals(300, e.getHttpStatusCode());
			assertNotNull(e.getLadokException());
		}
	}

	private Response mockResponse(int statusCode, Object responseEntity) {
		Response response = Mockito.mock(Response.class);
		Mockito.when(response.getStatus()).thenReturn(statusCode);
	//	Mockito.when(response.readEntity(Matchers.eq(responseEntity.getClass()))).thenReturn(responseEntity);
		Mockito.when(response.readEntity(Matchers.eq(String.class))).thenReturn(Objects.toString(responseEntity));
		return response;
	}
}