text:
package org.jgroups.blocks;

import org.jgroups.Address;
import org.jgroups.Global;
import org.jgroups.JChannel;
import org.jgroups.tests.ChannelTestBase;
import org.jgroups.util.Buffer;
import org.jgroups.util.Rsp;
import org.jgroups.util.RspList;
import org.jgroups.util.Util;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

import java.io.*;
import java.util.Iterator;
import java.util.List;

@Test(groups=Global.STACK_DEPENDENT,sequential=true)
public class RpcDispatcherSerializationTest extends ChannelTestBase {
    private JChannel channel, channel2;
    private RpcDispatcher disp, disp2;
    private final Target target=new Target();

    @BeforeClass
    protected void setUp() throws Exception {
        channel=createChannel(true);
        disp=new RpcDispatcher(channel, target);
        channel.connect("RpcDispatcherSerializationTest");

        channel2=createChannel(channel);
        disp2=new RpcDispatcher(channel2, target);
        channel2.connect("RpcDispatcherSerializationTest");
    }

    @AfterClass
    protected void tearDown() throws Exception {
        channel2.close();
        disp2.stop();

        disp.stop();
        channel.close();
    }

    public void testNonSerializableArgument() throws Exception {
        try {
            disp.callRemoteMethods(null, "foo", new Object[]{new NonSerializable()}, new Class[]{NonSerializable.class},
                                   new RequestOptions(ResponseMode.GET_ALL, 5000));
            throw new IllegalStateException("should throw NotSerializableException");
        }
        catch(Exception t) {
            assert t instanceof NotSerializableException : "exception is not of expected type: " + t;
        }
    }

    public void testTargetMethodNotFound() throws Exception {
        List<Address> members=channel.getView().getMembers();
        System.out.println("members are: " + members);
        RspList<Object> rsps=disp.callRemoteMethods(members, "foo", null, new Class[]{String.class, String.class},
                                            new RequestOptions(ResponseMode.GET_ALL, 8000));
        System.out.println("responses:\n" + rsps + ", channel.view: " + channel.getView() + ", channel2.view: " + channel2.getView());
        assert members.size() == rsps.size() : "expected " + members.size() + " responses, but got " + rsps + " (" + rsps.size() + ")";

        for(Rsp rsp: rsps.values()) {
            assert rsp.getException() instanceof NoSuchMethodException : "exception is " + rsp.getException();
        }
    }

    public void testMarshaller() throws Exception {
        RpcDispatcher.Marshaller m=new MyMarshaller();
        disp.setRequestMarshaller(m);
        disp.setResponseMarshaller(m);
        disp2.setRequestMarshaller(m);
        disp2.setResponseMarshaller(m);

        RspList rsps;
        rsps=disp.callRemoteMethods(null, "methodA", new Object[]{Boolean.TRUE, new Long(322649)},
                                    new Class[]{boolean.class, long.class},
                                    new RequestOptions(ResponseMode.GET_ALL, 0));
        assert rsps.size() == 2;
        for(Iterator<Rsp> it=rsps.values().iterator(); it.hasNext();) {
            Rsp rsp=it.next();
            assert rsp.getValue() == null;
            assertTrue(rsp.wasReceived());
            assertFalse(rsp.wasSuspected());
        }

        rsps=disp.callRemoteMethods(null, "methodB", null, null, new RequestOptions(ResponseMode.GET_ALL, 0));
        assertEquals(2, rsps.size());
        for(Iterator<Rsp> it=rsps.values().iterator(); it.hasNext();) {
            Rsp rsp=it.next();
            assertNotNull(rsp.getValue());
            assertEquals(Boolean.TRUE, rsp.getValue());
            assertTrue(rsp.wasReceived());
            assertFalse(rsp.wasSuspected());
        }

        rsps=disp.callRemoteMethods(null, "methodC", null, null, new RequestOptions(ResponseMode.GET_ALL, 0));
        assertEquals(2, rsps.size());
        for(Iterator<Rsp> it=rsps.values().iterator(); it.hasNext();) {
            Rsp rsp=it.next();
            assertNull(rsp.getValue());
            assertNotNull(rsp.getException());
            assertTrue(rsp.wasReceived());
            assertFalse(rsp.wasSuspected());
        }

        disp.setRequestMarshaller(null);
        disp.setResponseMarshaller(null);
        disp2.setRequestMarshaller(null);
        disp2.setResponseMarshaller(null);
    }

    static class MyMarshaller implements RpcDispatcher.Marshaller {
        static final byte NULL  = 0;
        static final byte BOOL  = 1;
        static final byte LONG  = 2;
        static final byte OBJ   = 3;

        public Buffer objectToBuffer(Object obj) throws Exception {
            ByteArrayOutputStream out=new ByteArrayOutputStream(24);
            ObjectOutputStream oos=new ObjectOutputStream(out);

            try {
                if(obj == null) {
                    oos.writeByte(NULL);
                }
                else if(obj instanceof Boolean) {
                    oos.writeByte(BOOL);
                    oos.writeBoolean(((Boolean)obj).booleanValue());
                }
                else if(obj instanceof Long) {
                    oos.writeByte(LONG);
                    oos.writeLong(((Long)obj).longValue());
                }
                else {
                    oos.writeByte(OBJ);
                    oos.writeObject(obj);
                }
                oos.flush();
                return new Buffer(out.toByteArray());
            }
            finally {
                Util.close(oos);
            }
        }

        public Object objectFromBuffer(byte[] buf, int offset, int length) throws Exception {
            ByteArrayInputStream inp=new ByteArrayInputStream(buf, offset, length);
            ObjectInputStream in=new ObjectInputStream(inp);

            try {
                int type=in.readByte();
                switch(type) {
                    case NULL:
                        return null;
                    case BOOL:
                        return Boolean.valueOf(in.readBoolean());
                    case LONG:
                        return new Long(in.readLong());
                    case OBJ:
                        return in.readObject();
                    default:
                        throw new IllegalArgumentException("incorrect type " + type);
                }
            }
            finally {
                Util.close(in);
            }
        }
    }

    static class Target {
        public static void methodA(boolean b, long l) {
            ;
        }

        public static boolean methodB() {
            return true;
        }

        public static void methodC() {
            throw new IllegalArgumentException("dummy exception - for testing only");
        }
    }

    static class NonSerializable {
        int i;
    }

}


text:
$scriptBlock = {
    param (
        $commandName,

        $parameterName,

        $wordToComplete,

        $commandAst,

        $fakeBoundParameter
    )

    $server = $fakeBoundParameter['SqlInstance']
    if (-not $server) {
        return
    }
    $sqlCredential = $fakeBoundParameter['SqlCredential']

    try {
        if ($sqlCredential) { $instance = Connect-SqlInstance -SqlInstance $server -ErrorAction Stop  }
        else { $instance = Connect-SqlInstance -SqlInstance $server -ErrorAction Stop }

        $instance.EnumProcesses().Program | Select-Object -Unique | Where-DbaObject -Like "$wordToComplete*" | ForEach-Object {
            if (-not ([string]::IsNullOrWhiteSpace($_))) { New-DbaTeppCompletionResult -CompletionText $_ -ToolTip $_ }
        }
    } catch {
        return
    } finally {
    }
}

Register-DbaTeppScriptblock -ScriptBlock $scriptBlock -Name processprogram

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Api\Bus\Scenics;

use Api\Bus\AbstractBus;
use Exception;
use Application\Lib\Log;
class Lists extends AbstractBus
{
    protected $_required = array(
        'limit',
        'page',
    );

    protected $_number_format = array(
        'limit',
        'page'
    );

    protected $_default_value  = array(
        'page' => 1,
        'limit'=> 10,
    );
    public function operateDB( $model, $param )
    {
        try
        {
            $this->_response = $model->getList( $param );
            Log::info($this->_response);
            return $this->result( $model->error() );
        }
        catch (Exception $e) {
        	Log::error($e);
            $this->_exception = $e;
        }
        return false;
    }

}


text:
package org.apache.ignite.testsuites;

import junit.framework.TestSuite;
import org.apache.ignite.internal.processors.cache.CacheLocalQueryMetricsSelfTest;
import org.apache.ignite.internal.processors.cache.CachePartitionedQueryMetricsDistributedSelfTest;
import org.apache.ignite.internal.processors.cache.CachePartitionedQueryMetricsLocalSelfTest;
import org.apache.ignite.internal.processors.cache.CacheReplicatedQueryMetricsDistributedSelfTest;
import org.apache.ignite.internal.processors.cache.CacheReplicatedQueryMetricsLocalSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheQueryIndexDisabledSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheQueryIndexingDisabledSelfTest;
import org.apache.ignite.internal.processors.cache.GridCacheReduceQueryMultithreadedSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheFieldsQueryNoDataSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheLargeResultSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheOffheapTieredMultithreadedSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheP2pUnmarshallingQueryErrorTest;
import org.apache.ignite.internal.processors.cache.IgniteCachePartitionedQueryMultiThreadedSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheQueryEvictsMultiThreadedSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheQueryMultiThreadedSelfTest;
import org.apache.ignite.internal.processors.cache.IgniteCacheQueryOffheapMultiThreadedSelfTest;
import org.apache.ignite.internal.processors.cache.portable.distributed.dht.GridCachePortableDuplicateIndexObjectPartitionedAtomicSelfTest;
import org.apache.ignite.internal.processors.cache.portable.distributed.dht.GridCachePortableDuplicateIndexObjectPartitionedTransactionalSelfTest;
import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicNearEnabledSelfTest;
import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicP2PDisabledSelfTest;
import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicSelfTest;
import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryLocalAtomicSelfTest;
import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryPartitionedOnlySelfTest;
import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryReplicatedAtomicSelfTest;
import org.apache.ignite.internal.processors.query.h2.sql.BaseH2CompareQueryTest;
import org.apache.ignite.internal.processors.query.h2.sql.GridQueryParsingTest;
import org.apache.ignite.internal.processors.query.h2.sql.H2CompareBigQueryTest;
import org.apache.ignite.internal.portable.BinaryMarshaller;
import org.apache.ignite.spi.communication.tcp.GridOrderedMessageCancelSelfTest;
import org.apache.ignite.testframework.config.GridTestProperties;

/**
 * Cache query suite with portable marshaller.
 */
public class IgnitePortableCacheQueryTestSuite extends TestSuite {
    /**
     * @return Suite.
     * @throws Exception In case of error.
     */
    public static TestSuite suite() throws Exception {
        GridTestProperties.setProperty(GridTestProperties.MARSH_CLASS_NAME, BinaryMarshaller.class.getName());

        TestSuite suite = new TestSuite("Grid Cache Query Test Suite using PortableMarshaller");

        // Parsing
        suite.addTestSuite(GridQueryParsingTest.class);

        // Queries tests.
        suite.addTestSuite(GridCacheQueryIndexDisabledSelfTest.class);
        suite.addTestSuite(IgniteCachePartitionedQueryMultiThreadedSelfTest.class);
        suite.addTestSuite(IgniteCacheLargeResultSelfTest.class);
        suite.addTestSuite(IgniteCacheQueryMultiThreadedSelfTest.class);
        suite.addTestSuite(IgniteCacheQueryEvictsMultiThreadedSelfTest.class);
        suite.addTestSuite(IgniteCacheQueryOffheapMultiThreadedSelfTest.class);

        suite.addTestSuite(IgniteCacheOffheapTieredMultithreadedSelfTest.class);
        suite.addTestSuite(GridCacheReduceQueryMultithreadedSelfTest.class);

        // Fields queries.
        suite.addTestSuite(IgniteCacheFieldsQueryNoDataSelfTest.class);

        // Continuous queries.
        suite.addTestSuite(GridCacheContinuousQueryLocalAtomicSelfTest.class);
        suite.addTestSuite(GridCacheContinuousQueryReplicatedAtomicSelfTest.class);
        suite.addTestSuite(GridCacheContinuousQueryPartitionedOnlySelfTest.class);
        suite.addTestSuite(GridCacheContinuousQueryAtomicSelfTest.class);
        suite.addTestSuite(GridCacheContinuousQueryAtomicNearEnabledSelfTest.class);
        suite.addTestSuite(GridCacheContinuousQueryAtomicP2PDisabledSelfTest.class);

        suite.addTestSuite(GridCacheQueryIndexingDisabledSelfTest.class);

        //Should be adjusted. Not ready to be used with PortableMarshaller.
        //suite.addTestSuite(GridCachePortableSwapScanQuerySelfTest.class);

        suite.addTestSuite(GridOrderedMessageCancelSelfTest.class);

        // Ignite cache and H2 comparison.
        suite.addTestSuite(BaseH2CompareQueryTest.class);
        suite.addTestSuite(H2CompareBigQueryTest.class);

        // Metrics tests
        suite.addTestSuite(CacheLocalQueryMetricsSelfTest.class);
        suite.addTestSuite(CachePartitionedQueryMetricsDistributedSelfTest.class);
        suite.addTestSuite(CachePartitionedQueryMetricsLocalSelfTest.class);
        suite.addTestSuite(CacheReplicatedQueryMetricsDistributedSelfTest.class);
        suite.addTestSuite(CacheReplicatedQueryMetricsLocalSelfTest.class);

        //Unmarshallig query test.
        suite.addTestSuite(IgniteCacheP2pUnmarshallingQueryErrorTest.class);

        suite.addTestSuite(GridCachePortableDuplicateIndexObjectPartitionedAtomicSelfTest.class);
        suite.addTestSuite(GridCachePortableDuplicateIndexObjectPartitionedTransactionalSelfTest.class);

        return suite;
    }
}


text:
package com.rampatra.sorting;

import java.util.Arrays;

/**
 * Created by IntelliJ IDEA.
 *
 * @author rampatra
 * @since 10/26/15
 * @time: 9:20 PM
 */
public class PancakeSort {

    /**
     * Sorts the array {@param a} in-place in O(n^2) time complexity.
     * <p/>
     * This can also be seen as: Sort the array {@param a} using a method
     * {@code reverse(int[] a, int end)} which reverses array {@code int[] a}
     * from {@code 0} index till {@code end} index (both inclusive).
     *
     * @param a
     */
    public static void sort(int[] a) {

        int maxIndex; // max element's index
        int unsortedIndex = a.length - 1; // index till which elements are unsorted

        while (unsortedIndex > 0) {
            maxIndex = 0;
            // find max element's index
            for (int j = 1; j <= unsortedIndex; j++) {
                if (a[j] > a[maxIndex]) {
                    maxIndex = j;
                }
            }
            // move the max element to its appropriate index if its not already in its correct index
            if (maxIndex != unsortedIndex) {
                reverse(a, maxIndex); // bring the max element to the front
                reverse(a, unsortedIndex); // move the max element to its appropriate index
            }
            unsortedIndex--;
        }
    }

    /**
     * Reverses array {@param a} from {@code 0} index
     * till {@code end} index.
     *
     * @param a
     * @param end
     */
    public static void reverse(int[] a, int end) {
        int temp;
        for (int i = 0; i <= end / 2; i++) {
            temp = a[i];
            a[i] = a[end - i];
            a[end - i] = temp;
        }
    }

    public static void main(String[] args) {
        int[] ar = {1, 2, 3, 4, 5, 6};
        System.out.println(Arrays.toString(ar));
        sort(ar);
        System.out.println(Arrays.toString(ar));
        ar = new int[]{3, 4, 7, 1, 9, 0};
        System.out.println(Arrays.toString(ar));
        sort(ar);
        System.out.println(Arrays.toString(ar));
        ar = new int[]{6, 5, 4, 3, 2, 1};
        System.out.println(Arrays.toString(ar));
        sort(ar);
        System.out.println(Arrays.toString(ar));
        ar = new int[]{};
        System.out.println(Arrays.toString(ar));
        sort(ar);
        System.out.println(Arrays.toString(ar));
        ar = new int[]{1};
        System.out.println(Arrays.toString(ar));
        sort(ar);
        System.out.println(Arrays.toString(ar));
    }
}


text:
using System;

namespace System.Runtime.Caching
{
    public delegate void CacheEntryRemovedCallback(CacheEntryRemovedArguments arguments);
}


text:
'use strict';

var angular = require('angular');
var moment = require('moment');

angular
  .module('md.calendar')
  .constant('moment', moment);


text:
from setuptools import setup, find_packages

setup(
    name = "cobe",
    version = "2.1.0",
    author = "Peter Teichman",
    author_email = "peter@teichman.org",
    url = "http://wiki.github.com/pteichman/cobe/",
    description = "Markov chain based text generator library and chatbot",
    packages = ["cobe"],
    test_suite = "tests",

    install_requires = [
        "PyStemmer==1.3.0",
        "argparse==1.2.1",
        "irc==8.5.4"
        ],

    classifiers = [
        "Development Status :: 5 - Production/Stable",
        "Environment :: Console",
        "Intended Audience :: Developers",
        "Intended Audience :: End Users/Desktop",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Topic :: Scientific/Engineering :: Artificial Intelligence"
        ],

    entry_points = {
        "console_scripts" : [
            "cobe = cobe.control:main"
        ]
    }
)


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Kew Bull. 51(4): 790 (1996)

#### Original name
Agaricus griseovinaceous A. Pearson ex Pegler

### Remarks
null


text:
package com.amazon.carbonado.repo.sleepycat;

import java.io.FileNotFoundException;

import com.sleepycat.db.CompactStats;
import com.sleepycat.db.Cursor;
import com.sleepycat.db.Database;
import com.sleepycat.db.DatabaseConfig;
import com.sleepycat.db.DatabaseEntry;
import com.sleepycat.db.DatabaseException;
import com.sleepycat.db.DatabaseType;
import com.sleepycat.db.Environment;
import com.sleepycat.db.LockMode;
import com.sleepycat.db.OperationStatus;
import com.sleepycat.db.Transaction;

import com.amazon.carbonado.ConfigurationException;
import com.amazon.carbonado.RepositoryException;
import com.amazon.carbonado.Storable;

import com.amazon.carbonado.raw.StorableCodecFactory;

import com.amazon.carbonado.txn.TransactionScope;

/**
 * Storage implementation for DBRepository.
 *
 * @author Brian S O'Neill
 * @author Vidya Iyer
 * @author Nicole Deflaux
 */
class DB_Storage<S extends Storable> extends BDBStorage<Transaction, S> {
    // Primary database of Storable instances
    private Database mDatabase;

    /**
     *
     * @param repository repository reference
     * @param storableFactory factory for emitting storables
     * @param db database for Storables
     * @throws DatabaseException
     * @throws SupportException
     */
    DB_Storage(DB_Repository repository, Class<S> type)
        throws DatabaseException, RepositoryException
    {
        super(repository, type);
        open(repository.mReadOnly);
    }

    @Override
    protected boolean db_exists(Transaction txn, byte[] key, boolean rmw) throws Exception {
        DatabaseEntry keyEntry = new DatabaseEntry(key);
        DatabaseEntry dataEntry = new DatabaseEntry();
        dataEntry.setPartial(0, 0, true);
        OperationStatus status = mDatabase.get
            (txn, keyEntry, dataEntry, rmw ? LockMode.RMW : null);
        return status != OperationStatus.NOTFOUND;
    }

    @Override
    protected byte[] db_get(Transaction txn, byte[] key, boolean rmw) throws Exception {
        DatabaseEntry keyEntry = new DatabaseEntry(key);
        DatabaseEntry dataEntry = new DatabaseEntry();
        OperationStatus status = mDatabase.get
            (txn, keyEntry, dataEntry, rmw ? LockMode.RMW : null);
        if (status == OperationStatus.NOTFOUND) {
            return NOT_FOUND;
        }
        return dataEntry.getData();
    }

    @Override
    protected Object db_putNoOverwrite(Transaction txn, byte[] key, byte[] value)
        throws Exception
    {
        DatabaseEntry keyEntry = new DatabaseEntry(key);
        DatabaseEntry dataEntry = new DatabaseEntry(value);
        OperationStatus status = mDatabase.putNoOverwrite(txn, keyEntry, dataEntry);
        if (status == OperationStatus.SUCCESS) {
            return SUCCESS;
        } else if (status == OperationStatus.KEYEXIST) {
            return KEY_EXIST;
        } else {
            return NOT_FOUND;
        }
    }

    @Override
    protected boolean db_put(Transaction txn, byte[] key, byte[] value)
        throws Exception
    {
        DatabaseEntry keyEntry = new DatabaseEntry(key);
        DatabaseEntry dataEntry = new DatabaseEntry(value);
        return mDatabase.put(txn, keyEntry, dataEntry) == OperationStatus.SUCCESS;
    }

    @Override
    protected boolean db_delete(Transaction txn, byte[] key) throws Exception {
        DatabaseEntry keyEntry = new DatabaseEntry(key);
        return mDatabase.delete(txn, keyEntry) == OperationStatus.SUCCESS;
    }

    @Override
    protected void db_truncate(Transaction txn) throws Exception {
        if (txn != null) {
            mDatabase.truncate(txn, false);
            return;
        }

        DB_Repository dbRepository = (DB_Repository) getRepository();

        String fileName, dbName;
        {
            StorableCodecFactory codecFactory = dbRepository.getStorableCodecFactory();
            String name = codecFactory.getStorageName(getStorableType());
            if (name == null) {
                name = getStorableType().getName();
            }
            fileName = dbRepository.getDatabaseFileName(name);
            dbName = dbRepository.getDatabaseName(name);
        }

        close();
        dbRepository.mEnv.removeDatabase(null, fileName, dbName);
        open(false, null, false);
    }

    @Override
    protected boolean db_isEmpty(Transaction txn, Object database, boolean rmw) throws Exception {
        Cursor cursor = ((Database) database).openCursor(txn, null);
        OperationStatus status = cursor.getFirst
            (new DatabaseEntry(), new DatabaseEntry(), rmw ? LockMode.RMW : null);
        cursor.close();
        return status == OperationStatus.NOTFOUND;
    }

    @Override
    protected CompactionCapability.Result<S> db_compact
        (Transaction txn, Object database, byte[] start, byte[] end)
        throws Exception
    {
        DatabaseEntry dstart = start == null ? null : new DatabaseEntry(start);
        DatabaseEntry dstop = end == null ? null : new DatabaseEntry(end);

        final CompactStats stats = ((Database) database).compact(txn, dstart, dstop, null, null);

        return new CompactionCapability.Result<S>() {
            public int getPagesExamine() {
                return stats.getPagesExamine();
            }

            public int getPagesFree() {
                return stats.getPagesFree();
            }

            public int getPagesTruncated() {
                return stats.getPagesTruncated();
            }

            public int getLevels() {
                return stats.getLevels();
            }

            public int getDeadlockCount() {
                return stats.getDeadlock();
            }

            @Override
            public String toString() {
                return stats.toString();
            }
        };
    }

    @Override
    protected void db_close(Object database) throws Exception {
        ((Database) database).close();
    }

    @Override
    protected Object env_openPrimaryDatabase(Transaction txn, String name)
        throws Exception
    {
        DB_Repository dbRepository = (DB_Repository) getRepository();

        Environment env = dbRepository.mEnv;
        boolean readOnly = dbRepository.mReadOnly;

        DatabaseConfig config;
        try {
            config = (DatabaseConfig) dbRepository.getInitialDatabaseConfig();
        } catch (ClassCastException e) {
            throw new ConfigurationException
                ("Unsupported initial environment config. Must be instance of " +
                 DatabaseConfig.class.getName(), e);
        }

        if (config == null) {
            config = new DatabaseConfig();
            config.setType(DatabaseType.BTREE);
            config.setSortedDuplicates(false);
            if (dbRepository.mReverseSplitOff) {
                config.setReverseSplitOff(true);
            }
            Integer pageSize = dbRepository.getDatabasePageSize(getStorableType());
            if (pageSize != null) {
                config.setPageSize(pageSize);
            }
            if (dbRepository.mChecksum != null) {
                config.setChecksum(dbRepository.mChecksum);
            }
        } else {
            if (DatabaseType.BTREE != config.getType()) {
                throw new IllegalArgumentException("DatabaseConfig: database type is not BTREE");
            }
            if (config.getSortedDuplicates()) {
                throw new IllegalArgumentException("DatabaseConfig: getSortedDuplicates is true");
            }
        }

        // Overwrite these settings as they depend upon the
        // configuration of the repository
        config.setTransactional(dbRepository.mDatabasesTransactional);
        config.setReadOnly(readOnly);
        config.setAllowCreate(!readOnly);

        runDatabasePrepareForOpeningHook(config);

        String fileName = dbRepository.getDatabaseFileName(name);
        String dbName = dbRepository.getDatabaseName(name);
        try {
            return mDatabase = env.openDatabase(txn, fileName, dbName, config);
        } catch (FileNotFoundException e) {
            throw new FileNotFoundException(e.getMessage() + ": " + fileName);
        }
    }

    @Override
    protected void env_removeDatabase(Transaction txn, String databaseName) throws Exception {
        DB_Repository dbRepository = (DB_Repository) getRepository();
        String fileName = dbRepository.getDatabaseFileName(databaseName);
        String dbName = dbRepository.getDatabaseName(databaseName);
        mDatabase.getEnvironment().removeDatabase(txn, fileName, dbName);
    }

    @Override
    protected BDBCursor<Transaction, S> openCursor
        (TransactionScope<Transaction> scope,
         byte[] startBound, boolean inclusiveStart,
         byte[] endBound, boolean inclusiveEnd,
         int maxPrefix,
         boolean reverse,
         Object database)
        throws Exception
    {
        return new DB_Cursor<S>
            (scope,
             startBound, inclusiveStart,
             endBound, inclusiveEnd,
             maxPrefix,
             reverse,
             this,
             (Database) database);
    }
}


text:
angular.module('App', ['ngRoute', 'LocationBar'])
.config(['$routeProvider', function ($routeProvider) {
  $routeProvider
    .when('/', {
      templateUrl: 'index-tmpl',
      controller: 'SheetListController'
    })
    .when('/new', {
      templateUrl: 'new-tmpl',
      controller: 'CreationController'
    })
    .when('/sheet/:id', {
      templateUrl: 'sheet-tmpl',
      controller: 'SheetController'
    })
    .otherwise({
      redirectTo: '/'
    });
}])
.service('sheets', [function () {
  this.list = [];

  this.add = function (lines) {
    this.list.push({
      id: String(this.list.length + 1),
      createdAt: Date.now(),
      lines: lines
    });
  };

  this.get = function (id) {
    var list = this.list;
    var index = list.length;
    var sheet;

    while (index--) {
      sheet = list[index];
      if (sheet.id === id) {
        return sheet;
      }
    }
    return null;
  };
}])
.controller('SheetListController', ['$scope', 'sheets',
function SheetListController($scope, sheets) {
  $scope.list = sheets.list;
}])
.controller('CreationController', ['$scope', '$location', 'sheets',
function CreationController($scope, $location, sheets) {
  function createOrderLine() {
    return {
      productName: '',
      unitPrice: 0,
      count: 0
    };
  }

  $scope.initialize = function () {
    $scope.lines = [createOrderLine()];
  };

  $scope.addLine = function () {
    $scope.lines.push(createOrderLine());
  };

  $scope.removeLine = function (target) {
    var lines = $scope.lines;
    var index = lines.indexOf(target);

    if (index !==  -1) {
      lines.splice(index, 1);
    }
  };

  $scope.save = function () {
    sheets.add($scope.lines);
    $location.path('/');
  };

  $scope.getSubtotal = function (orderLine) {
    return orderLine.unitPrice * orderLine.count;
  };

  $scope.getTotalAmount = function (lines) {
    var totalAmount = 0;

    angular.forEach(lines, function (orderLine) {
      totalAmount += $scope.getSubtotal(orderLine);
    });

    return totalAmount;
  };

  $scope.initialize();
}])
.controller('SheetController', [function SheetController() {/* 詳細用 */}]);


text:
using System;
using System.Collections.Generic;
using System.Linq;

namespace BizHawk.Emulation.Common
{
	/// <summary>
	/// This interface specifies that an interface or implementation is a emulator core service, such as IDebuggable,
	/// but is an optional part of the core functionality
	/// Clients should gracefully handle an IEmulator that has a missing or partial implementation of one of these services
	/// </summary>
	public interface IEmulatorService
	{
	}

	/// <summary>
	/// Should be added to any field of an ICoreService that is not implemented.  By Convention it should also throw a NotImplementedException
	/// Any feature that does not have this attribute is assumed to be implemented
	/// </summary>
	public class FeatureNotImplemented : Attribute { }

	/// <summary>
	/// This represents a service that would not apply to every core, instead it is a specialized service specific to a core or group of cores
	/// This service is merely intended to define semantics and expectations of a service
	/// </summary>
	public interface ISpecializedEmulatorService : IEmulatorService
	{
	}

	[AttributeUsage(AttributeTargets.Class)]
	public class ServiceNotApplicable : Attribute
	{
		public ServiceNotApplicable(params Type[] types)
		{
			if (types != null)
			{
				NotApplicableTypes = types.ToList();
			}
			else
			{
				NotApplicableTypes = new List<Type>();
			}
		}

		public IEnumerable<Type> NotApplicableTypes { get; private set; }
	}
}


text:
// Python Tools for Visual Studio
// Copyright(c) Microsoft Corporation
// All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the License); you may not use
// this file except in compliance with the License. You may obtain a copy of the
// License at http://www.apache.org/licenses/LICENSE-2.0
//
// THIS CODE IS PROVIDED ON AN  *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS
// OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY
// IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
// MERCHANTABLITY OR NON-INFRINGEMENT.
//
// See the Apache Version 2.0 License for specific language governing
// permissions and limitations under the License.

using System.Collections.Generic;
using System.Linq;

namespace Microsoft.PythonTools.Interpreter.Ast {
    class AstPythonFunctionOverload : IPythonFunctionOverload {
        private readonly IReadOnlyList<IParameterInfo> _parameters;

        public AstPythonFunctionOverload(
            string doc,
            string returnDoc,
            IEnumerable<IParameterInfo> parameters,
            IEnumerable<IPythonType> returns
        ) {
            Documentation = doc;
            ReturnDocumentation = returnDoc;
            _parameters = parameters.ToArray();
            ReturnType = returns.ToList();
        }

        public string Documentation { get; }
        public string ReturnDocumentation { get; }
        public IParameterInfo[] GetParameters() => _parameters.ToArray();
        public IList<IPythonType> ReturnType { get; }
    }
}


text:
package gdrj

import (
	"strings"

	"github.com/eaciit/dbox"
	"github.com/eaciit/orm/v1"
	"github.com/eaciit/toolkit"
)

type PLData struct {
	PLCode                 string
	PLOrder                string
	Group1, Group2, Group3 string
	Amount                 float64
}

type SalesLineRatio struct {
	Global, GlobalVdist, Branch, Brand, SKUID, ChannelID                       float64
	Month, MonthVdist, MonthSKUID, MonthChannel, MonthBranch, MonthVdistBranch float64
	MonthChannelBrand, MonthBrand                                              float64
}

type SalesPL struct {
	orm.ModelBase `bson:"-" json:"-"`
	ID            string `bson:"_id" json:"_id"`

	SKUID       string
	SKUID_VDIST string
	OutletID    string

	SalesQty       float64
	GrossAmount    float64
	DiscountAmount float64
	TaxAmount      float64
	NetAmount      float64

	Date     *Date
	Customer *Customer
	Product  *Product
	PC       *ProfitCenter
	CC       *CostCenter
	Ratio    *SalesLineRatio

	// RatioToGlobalSales            float64
	// RatioToGlobalSalesVdist       float64
	// RatioToBranchSales            float64
	// RatioToBrandSales             float64
	// RatioToSKUSales               float64
	// RatioToChannelSales           float64
	// RatioToMonthSales             float64 //APROMO
	// RatioToMonthSKUSales          float64
	// RatioToMonthChannelSales      float64 //DISCOUNT_ALL
	// RatioToMonthChannelBrandSales float64 //DISCOUNT
	// RatioToMonthSalesVdist        float64 //FREIGHT

	PLDatas map[string]*PLData

	TrxSrc, Source, Ref string
}

func (s *SalesPL) TableName() string {
	return "salespls"
}

func (s *SalesPL) RecordID() interface{} {
	s.ID = s.PrepareID().(string)
	return s.ID
}

func TrxToSalesPL(conn dbox.IConnection,
	trx *SalesTrx,
	masters toolkit.M,
	config toolkit.M) *SalesPL {

	pl := new(SalesPL)
	pl.ID = trx.ID
	pl.SKUID = trx.SKUID
	pl.SKUID_VDIST = trx.SKUID_VDIST
	pl.OutletID = trx.OutletID

	pl.Date = SetDate(trx.Date)

	pl.SalesQty = trx.SalesQty
	pl.GrossAmount = trx.GrossAmount
	pl.DiscountAmount = trx.DiscountAmount
	pl.TaxAmount = trx.TaxAmount

	pl.Customer = trx.Customer
	pl.Product = trx.Product

	// pl.Calc(conn, masters, config)

	return pl
}

func SaveDiv(a float64, b float64) float64 {
	if b == 0 {
		return 0
	}

	return a / b
}

func (pl *SalesPL) RatioCalc(masters toolkit.M) {

	tratio := new(SalesLineRatio)
	if strings.Contains(pl.ID, "SALES-ADJUST") {
		pl.Ratio = tratio
		return
	}
	tratio.Global = SaveDiv(pl.GrossAmount, masters.GetFloat64("globalgross"))
	tratio.GlobalVdist = SaveDiv(pl.GrossAmount, masters.GetFloat64("globalgrossvdist"))

	tgrossbybrand := masters.Get("grossbybrand", toolkit.M{}).(toolkit.M)
	// if pl.Product.Brand != "" && pl.Product.Brand != "Other" && masters.Has("grossbybrand") {
	if masters.Has("grossbybrand") {
		tratio.Brand = SaveDiv(pl.GrossAmount, tgrossbybrand.GetFloat64(pl.Product.Brand))
	}

	if masters.Has("grossbysku") {
		tmp := masters["grossbysku"].(toolkit.M)
		tratio.SKUID = SaveDiv(pl.GrossAmount, tmp.GetFloat64(pl.SKUID))
	}

	if masters.Has("grossbybranch") {
		tmp := masters["grossbybranch"].(toolkit.M)
		tratio.Branch = SaveDiv(pl.GrossAmount, tmp.GetFloat64(pl.Customer.BranchID))
	}

	if masters.Has("grossbychannel") {
		gbychannel := masters["grossbychannel"].(toolkit.M)
		tratio.ChannelID = SaveDiv(pl.GrossAmount, gbychannel.GetFloat64(pl.Customer.ChannelID))
	}

	if masters.Has("grossbymonth") {
		gdt := masters["grossbymonth"].(toolkit.M)
		key := toolkit.Sprintf("%d_%d", pl.Date.Year, pl.Date.Month)
		tratio.Month = SaveDiv(pl.GrossAmount, gdt.GetFloat64(key))
	}

	if masters.Has("grossbymonthvdist") && strings.ToUpper(pl.TrxSrc) == "VDIST" {
		gdt := masters["grossbymonthvdist"].(toolkit.M)
		key := toolkit.Sprintf("%d_%d", pl.Date.Year, pl.Date.Month)
		tratio.MonthVdist = SaveDiv(pl.GrossAmount, gdt.GetFloat64(key))
	}

	if masters.Has("grossbymonthsku") && pl.SKUID != "" {
		gdt := masters["grossbymonthsku"].(toolkit.M)
		key := toolkit.Sprintf("%d_%d_%s", pl.Date.Year, pl.Date.Month, pl.SKUID)
		tratio.MonthSKUID = SaveDiv(pl.GrossAmount, gdt.GetFloat64(key))
	}

	if masters.Has("grossbymonthchannel") {
		gdt := masters["grossbymonthchannel"].(toolkit.M)
		key := toolkit.Sprintf("%d_%d_%s", pl.Date.Year, pl.Date.Month, pl.Customer.ChannelID)
		tratio.MonthChannel = SaveDiv(pl.GrossAmount, gdt.GetFloat64(key))
	}
	//MonthBranch, MonthVdistBranch float64
	//=================================
	//
	if masters.Has("grossbymonthbrandchannel") {
		gdt := masters["grossbymonthbrandchannel"].(toolkit.M)
		key := toolkit.Sprintf("%d_%d_%s_%s", pl.Date.Year, pl.Date.Month, pl.Product.Brand, pl.Customer.ChannelID)
		tratio.MonthChannelBrand = SaveDiv(pl.GrossAmount, gdt.GetFloat64(key))
	}

	if masters.Has("grossbymonthbrand") {
		gdt := masters["grossbymonthbrand"].(toolkit.M)
		key := toolkit.Sprintf("%d_%d_%s", pl.Date.Year, pl.Date.Month, pl.Product.Brand)
		tratio.MonthBrand = SaveDiv(pl.GrossAmount, gdt.GetFloat64(key))
	}

	pl.Ratio = tratio

	return
}

func (spl *SalesPL) CleanAndClasify(masters toolkit.M) {

	if spl.Customer == nil {
		c := new(Customer)
		c.BranchID = "CD02"
		c.CustType = "General"
		c.IsRD = false
		spl.Customer = c
	}

	subchannels := masters.Get("subchannels").(toolkit.M)
	subchannel := subchannels.GetString(spl.Customer.CustType)
	switch spl.Customer.ChannelID {
	case "I1":
		spl.Customer.IsRD = true
		spl.Customer.ChannelName = "RD"
		spl.Customer.ReportChannel = "RD"
		spl.Customer.ReportSubChannel = spl.Customer.Name
	case "I3": //MT
		subchannel = subchannels.GetString("M3")
		spl.Customer.ChannelName = "MT"
		spl.Customer.ReportChannel = "MT"

		if spl.Customer.CustType == "M1" || spl.Customer.CustType == "M2" {
			subchannel = subchannels.GetString(spl.Customer.CustType)
		}
		spl.Customer.ReportSubChannel = subchannel
	case "I4":
		spl.Customer.ChannelName = "INDUSTRIAL"
		spl.Customer.ReportChannel = "IT"
		// spl.Customer.ReportSubChannel = spl.Customer.Name
		spl.Customer.ReportSubChannel = subchannels.GetString("S8")
		if len(spl.Customer.CustType) == 2 && spl.Customer.CustType[:1] == "S" {
			spl.Customer.ReportSubChannel = subchannels.GetString(spl.Customer.CustType)
		}
	case "I6":
		spl.Customer.ChannelName = "MOTORIST"
		spl.Customer.ReportChannel = "Motoris"
		spl.Customer.ReportSubChannel = "Motoris"
	case "EXP":
		spl.Customer.ChannelName = "EXPORT"
		spl.Customer.ReportChannel = "EXPORT"
		spl.Customer.ReportSubChannel = "EXPORT"
	default:
		spl.Customer.ChannelID = "I2"
		spl.Customer.ChannelName = "GT"
		spl.Customer.ReportChannel = "GT"
		subchannel := subchannels.GetString(spl.Customer.CustType)

		if spl.Customer.CustType == "" || (len(spl.Customer.CustType) > 1 && spl.Customer.CustType[:1] != "R") {
			subchannel = ""
		}

		if subchannel == "" {
			spl.Customer.ReportSubChannel = "R18 - Lain-lain"
		} else {
			spl.Customer.ReportSubChannel = subchannel
		}
	}

	if spl.Product == nil {
		p := new(Product)
		p.Brand = "OTHER"
		p.Name = "OTHER"
		spl.Product = p
	}

	mcustomers := masters["customers"].(toolkit.M)
	mbranchs := masters["branchs"].(toolkit.M)

	cust, iscust := mcustomers[spl.Customer.ID].(*Customer)
	branch, isbranch := mbranchs[spl.Customer.BranchID].(toolkit.M)

	if isbranch {
		spl.Customer.BranchName = branch.GetString("name")
	}

	if iscust {
		spl.Customer.National = cust.National
		spl.Customer.Zone = cust.Zone
		spl.Customer.Region = cust.Region
		spl.Customer.AreaName = cust.AreaName
	} else if isbranch {
		spl.Customer.National = branch.Get("national", "").(string)
		spl.Customer.Zone = branch.Get("zone", "").(string)
		spl.Customer.Region = branch.Get("region", "").(string)
		spl.Customer.AreaName = branch.Get("area", "").(string)
	} else {
		spl.Customer.National = "INDONESIA"
		spl.Customer.Zone = "OTHER"
		spl.Customer.Region = "OTHER"
		spl.Customer.AreaName = "OTHER"
	}

	if spl.Customer.IsRD && masters.Has("rdlocations") {
		mrdloc := masters["rdlocations"].(toolkit.M)
		if mrdloc.Has(spl.Customer.ID) {
			tkm := mrdloc[spl.Customer.ID].(toolkit.M)
			spl.Customer.Zone = tkm.GetString("zone")
			spl.Customer.Region = tkm.GetString("region")
			spl.Customer.AreaName = tkm.GetString("area")
		}
	}

}

/*
func (pl *SalesPL) Calc(conn dbox.IConnection,
	masters toolkit.M,
	config toolkit.M) *SalesPL {

	pl.NetAmount = pl.GrossAmount - pl.DiscountAmount
	//-- classing
	if pl.Customer == nil {
		c := new(Customer)
		c.BranchID = "CD02"
		c.CustType = "General"
		c.IsRD = false
		pl.Customer = c
	}

	if pl.Customer.ChannelID == "I1" {
		pl.Customer.IsRD = true
		pl.Customer.ReportChannel = "RD"
		pl.Customer.ChannelName = "MT"
	} else if pl.Customer.ChannelID == "I3" {
		pl.Customer.IsRD = false
		pl.Customer.ReportChannel = "MT"
		pl.Customer.ChannelName = "MT"
	} else if pl.Customer.ChannelID == "I4" {
		pl.Customer.IsRD = false
		pl.Customer.ReportChannel = "IT"
		pl.Customer.ChannelName = "IT"
	} else {
		pl.Customer.IsRD = false
		pl.Customer.ReportChannel = "GT"
		pl.Customer.ChannelName = "GT"
	}

	if pl.Product == nil {
		p := new(Product)
		p.Brand = "OTHER"
		p.Name = "OTHER"
	}
	//-- end of classing

	compute := strings.ToLower(config.Get("compute", "all").(string))
	if compute != "none" {
		globalSales := masters.Get("globalsales").(float64)
		branchSales := masters.Get("branchsales").(map[string]float64)
		brandSales := masters.Get("brandsales").(map[string]float64)

		var brandSale, branchSale float64
		if pl.Product != nil {
			brandSale, _ = brandSales[pl.Product.Brand]
		}

		if pl.Customer != nil {
			branchSale, _ = branchSales[pl.Customer.BranchID]
		}

		if globalSales != 0 {
			pl.RatioToGlobalSales = pl.NetAmount / globalSales
		}

		if brandSale != 0 {
			pl.RatioToBrandSales = pl.NetAmount / brandSale
		}

		if branchSale != 0 {
			pl.RatioToBranchSales = pl.NetAmount / branchSale
		}

		if compute == "all" {
			pl.CalcSales(masters)
			pl.CalcCOGS(masters)
			pl.CalcRoyalties(masters)
			pl.CalcDepre(masters)
			pl.CalcFreight(masters)
			pl.CalcPromo(masters)
			pl.CalcSGA(masters)
		} else if compute == "sales" {
			pl.CalcSales(masters)
		} else if compute == "cogs" {
			pl.CalcCOGS(masters)
		} else if compute == "freight" {
			pl.CalcFreight(masters)
		} else if compute == "promo" {
			pl.CalcRoyalties(masters)
			pl.CalcPromo(masters)
		} else if compute == "sga" {
			pl.CalcSGA(masters)
		} else if compute == "rawdatapl" {
			pl.CalcFreight(masters)
			pl.CalcRoyalties(masters)
			pl.CalcPromo(masters)
			pl.CalcSGA(masters)
			pl.CalcDepre(masters)
		} else if compute == "salescogs" {
			pl.CalcSales(masters)
			pl.CalcCOGS(masters)
		}
	}

	pl.CalcSum(masters)
	return pl
}
*/
func (pl *SalesPL) CalcSum(masters toolkit.M) {
	var netsales, cogs, grossmargin, sellingexpense,
		sga, opincome, directexpense, indirectexpense,
		royaltiestrademark, advtpromoexpense, operatingexpense,
		freightexpense, nonoprincome, ebt, taxexpense,
		percentpbt, eat, totdepreexp, damagegoods, ebitda, ebitdaroyalties, ebitsga,
		grosssales, discount, advexp, promoexp, spgexp float64

	plmodels := masters.Get("plmodel").(map[string]*PLModel)

	exclude := []string{"PL8A", "PL14A", "PL74A", "PL26A", "PL32A", "PL94A", "PL39A", "PL41A", "PL44A",
		"PL74B", "PL74C", "PL32B", "PL94B", "PL94C", "PL39B", "PL41B", "PL41C", "PL44B", "PL44C", "PL44D", "PL44E",
		"PL44F", "PL6A", "PL0", "PL28", "PL29A", "PL31"}
	inexclude := func(f string) bool {
		for _, v := range exclude {
			if v == f {
				return true
			}
		}

		return false
	}

	for k, v := range pl.PLDatas {
		if inexclude(k) {
			//pl.AddData(k,0,plmodels)
			delete(pl.PLDatas, k)
			continue
		}
		// toolkit.Println(k, " PL DATA : ", v)
		switch v.Group1 {
		case "Net Sales":
			netsales += v.Amount
		case "Direct Expense":
			directexpense += v.Amount
		case "Indirect Expense":
			indirectexpense += v.Amount
		case "Freight Expense":
			freightexpense += v.Amount
		case "Royalties & Trademark Exp":
			royaltiestrademark += v.Amount
		case "Advt & Promo Expenses":
			advtpromoexpense += v.Amount
		case "G&A Expenses":
			sga += v.Amount
		case "Non Operating (Income) / Exp":
			nonoprincome += v.Amount
		case "Tax Expense":
			taxexpense += v.Amount
		case "Total Depreciation Exp":
			if v.Group2 == "Damaged Goods" {
				damagegoods += v.Amount
			} else {
				totdepreexp += v.Amount
			}
		}

		switch v.Group2 {
		case "Gross Sales":
			grosssales += v.Amount
		case "Discount":
			discount += v.Amount
		case "Advertising Expenses":
			advexp += v.Amount
		case "Promotions Expenses":
			promoexp += v.Amount
		case "SPG Exp / Export Cost":
			spgexp += v.Amount
		}
	}

	cogs = directexpense + indirectexpense
	grossmargin = netsales + cogs
	sellingexpense = freightexpense + royaltiestrademark + advtpromoexpense
	operatingexpense = sellingexpense + sga
	opincome = grossmargin + operatingexpense
	ebt = opincome + nonoprincome //asume nonopriceincome already minus
	percentpbt = 0
	if ebt != 0 {
		percentpbt = taxexpense / ebt * 100
	}
	eat = ebt + taxexpense
	ebitda = totdepreexp + damagegoods + opincome
	ebitdaroyalties = ebitda - royaltiestrademark
	ebitsga = opincome - sga
	ebitsgaroyalty := ebitsga - royaltiestrademark

	pl.AddData("PL0", grosssales, plmodels)
	pl.AddData("PL6A", discount, plmodels)
	pl.AddData("PL8A", netsales, plmodels)
	pl.AddData("PL14A", directexpense, plmodels)
	pl.AddData("PL74A", indirectexpense, plmodels)
	pl.AddData("PL26A", royaltiestrademark, plmodels)
	pl.AddData("PL32A", advtpromoexpense, plmodels)
	pl.AddData("PL94A", sga, plmodels)
	pl.AddData("PL39A", nonoprincome, plmodels)
	pl.AddData("PL41A", taxexpense, plmodels)
	pl.AddData("PL44A", totdepreexp, plmodels)

	pl.AddData("PL28", advexp, plmodels)
	pl.AddData("PL29A", promoexp, plmodels)
	pl.AddData("PL31", spgexp, plmodels)
	pl.AddData("PL74B", cogs, plmodels)
	pl.AddData("PL74C", grossmargin, plmodels)
	pl.AddData("PL32B", sellingexpense, plmodels)
	pl.AddData("PL94B", operatingexpense, plmodels)
	pl.AddData("PL94C", opincome, plmodels)
	pl.AddData("PL39B", ebt, plmodels)
	pl.AddData("PL41B", percentpbt, plmodels)
	pl.AddData("PL41C", eat, plmodels)
	pl.AddData("PL44B", opincome, plmodels)
	pl.AddData("PL44C", ebitda, plmodels)
	pl.AddData("PL44D", ebitdaroyalties, plmodels)
	pl.AddData("PL44E", ebitsga, plmodels)
	pl.AddData("PL44F", ebitsgaroyalty, plmodels)
}

func (pl *SalesPL) CalcSales(masters toolkit.M) {
	plmodels := masters.Get("plmodel").(map[string]*PLModel)

	aplmodel := pl.PLDatas
	for k, _ := range aplmodel {
		if k == "PL2" || k == "PL8" || k == "PL6" || k == "PL1" || k == "PL7" {
			delete(aplmodel, k)
		}
	}

	pl.PLDatas = aplmodel

	switch {
	case pl.Customer.IsRD == true:
		if strings.Contains(pl.ID, "RD-DISC_") {
			pl.AddData("PL8", pl.GrossAmount, plmodels)
		} else {
			pl.AddData("PL2", pl.GrossAmount, plmodels)
			pl.AddData("PL8", pl.DiscountAmount, plmodels)
		}
	case strings.Contains(pl.ID, "EXPORT"):
		pl.AddData("PL6", pl.GrossAmount, plmodels)
	// case strings.Contains(pl.ID, "DISCOUNT"):
	// 	pl.AddData("PL7A", pl.GrossAmount, plmodels)
	default:
		pl.AddData("PL1", pl.GrossAmount, plmodels)
		pl.AddData("PL7", pl.DiscountAmount, plmodels)
	}
}

/*func (pl *SalesPL) CalcCOGS(masters toolkit.M) {
	//-- cogs
	cogsid := toolkit.Sprintf("%d_%d_%s", pl.Date.Year, pl.Date.Month, pl.SKUID)
	if pl.Date.Year == 2014 && pl.Date.Month <= 9 {
		cogsid = toolkit.Sprintf("%d_%d_%s", 2014, 9, pl.SKUID)
	}
	if !masters.Has("cogs") {
		return
	}
	cogsTable := masters.Get("cogs").(map[string]*COGSConsolidate)
	cogsSchema, exist := cogsTable[cogsid]
	if !exist {
		return
	}

	cogsAmount := float64(0)
	cogsShemaAmount := float64(0)
	if cogsSchema.COGS_Amount == 0 {
		cogsShemaAmount = cogsSchema.RM_Amount +
			cogsSchema.LC_Amount +
			cogsSchema.PF_Amount +
			cogsSchema.Depre_Amount +
			cogsSchema.Other_Amount
	} else {
		cogsShemaAmount = cogsSchema.COGS_Amount
	}
	//rm_amount	lc_amount	pf_amount	other_amount	fixed_amount	depre_amount

	if cogsShemaAmount == 0 {
		// toolkit.Printfn("COGS error: no keys for ID %s", cogsid)
		return
	}

	if cogsSchema.NPS_Amount != 0 {
		cogsAmount = -cogsShemaAmount * pl.NetAmount / cogsSchema.NPS_Amount
	}

	rmAmount := cogsSchema.RM_Amount * cogsAmount / cogsShemaAmount
	lcAmount := cogsSchema.LC_Amount * cogsAmount / cogsShemaAmount
	energyAmount := cogsSchema.PF_Amount * cogsAmount / cogsShemaAmount
	depreciation := cogsSchema.Depre_Amount * cogsAmount / cogsShemaAmount
	otherAmount := cogsAmount - rmAmount - lcAmount - energyAmount - depreciation

	plmodels := masters.Get("plmodel").(map[string]*PLModel)
	pl.AddData("PL9", rmAmount, plmodels)
	pl.AddData("PL14", lcAmount, plmodels)
	pl.AddData("PL74", energyAmount, plmodels)
	pl.AddData("Pl20", otherAmount, plmodels)
	pl.AddData("PL21", energyAmount, plmodels)
	//pl.AddData("PL74B", cogsAmount, plmodels)
}*/

func (pl *SalesPL) CalcCOGSRev(masters toolkit.M) {
	if !masters.Has("cogs") {
		return
	}

	aplmodel := pl.PLDatas
	for k, _ := range aplmodel {
		if k == "PL9" || k == "PL14" || k == "PL20" || k == "PL21" || k == "PL74" {
			delete(aplmodel, k)
		}
	}

	pl.PLDatas = aplmodel

	cogsid := toolkit.Sprintf("%d_%d_%s", pl.Date.Year, pl.Date.Month, strings.ToUpper(pl.SKUID))
	cogsidmonth := toolkit.Sprintf("%d_%d", pl.Date.Year, pl.Date.Month)
	if pl.Date.Year == 2014 && pl.Date.Month <= 9 {
		cogsid = toolkit.Sprintf("%d_%d_%s", 2014, 9, strings.ToUpper(pl.SKUID))
	}

	cogsdatas := masters.Get("cogs").(map[string]*COGSConsolidate)
	cogsdata, exist := cogsdatas[cogsid]
	cogsdatamonth, existmonth := cogsdatas[cogsidmonth]

	if !exist && !existmonth {
		return
	}

	rmamount, lcamount, energyamount, depreamount, otheramount := float64(0), float64(0), float64(0), float64(0), float64(0)
	if exist {
		totamount := cogsdata.COGS_Amount * pl.Ratio.MonthSKUID
		rmamount = cogsdata.RM_Amount * pl.Ratio.MonthSKUID
		lcamount = cogsdata.LC_Amount * pl.Ratio.MonthSKUID
		energyamount = cogsdata.PF_Amount * pl.Ratio.MonthSKUID
		depreamount = cogsdata.Depre_Amount * pl.Ratio.MonthSKUID
		otheramount = totamount - rmamount - lcamount - energyamount - depreamount
	}

	if existmonth {
		othermonth := cogsdatamonth.COGS_Amount - cogsdatamonth.RM_Amount - cogsdatamonth.LC_Amount - cogsdatamonth.PF_Amount - cogsdatamonth.Depre_Amount
		rmamount += cogsdatamonth.RM_Amount * pl.Ratio.Month
		lcamount += cogsdatamonth.LC_Amount * pl.Ratio.Month
		energyamount += cogsdatamonth.PF_Amount * pl.Ratio.Month
		depreamount += cogsdatamonth.Depre_Amount * pl.Ratio.Month
		otheramount += othermonth * pl.Ratio.Month
	}
	// toolkit.Printfn("%v [%v,%v,%v,%v,%v]", cogsid, rmamount, lcamount, otheramount, depreamount, energyamount)
	plmodels := masters.Get("plmodel").(map[string]*PLModel)
	pl.AddData("PL9", -rmamount, plmodels)
	pl.AddData("PL14", -lcamount, plmodels)
	pl.AddData("Pl20", -otheramount, plmodels)
	pl.AddData("PL21", -depreamount, plmodels)
	pl.AddData("PL74", -energyamount, plmodels)

}

func (pl *SalesPL) CalcFreight(masters toolkit.M) {
	if masters.Has("freight") == false {
		return
	}

	aplmodel := pl.PLDatas
	for k, _ := range aplmodel {
		if k == "PL23" {
			delete(aplmodel, k)
		}
	}
	pl.PLDatas = aplmodel

	freights := masters.Get("freight").(map[string]*RawDataPL)

	freightid := toolkit.Sprintf("%d_%d", pl.Date.Year, pl.Date.Month)
	f, exist := freights[freightid]
	if !exist {
		return
	}

	plmodels := masters.Get("plmodel").(map[string]*PLModel)
	pl.AddData("PL23", -f.AmountinIDR*pl.Ratio.Month, plmodels)
}

func (pl *SalesPL) CalcDepre(masters toolkit.M) {
	if masters.Has("depreciation") == false {
		return
	}

	depreciation := masters.Get("depreciation").(map[string]float64)

	aplmodel := pl.PLDatas
	for k, _ := range aplmodel {
		if k == "PL43" || k == "PL42" {
			delete(aplmodel, k)
		}
	}
	pl.PLDatas = aplmodel

	find := func(x string) float64 {
		id := toolkit.Sprintf("%d_%d_%s", pl.Date.Year, pl.Date.Month, x)
		return depreciation[id]
	}

	findirect := find("indirect")
	fdirect := find("direct")

	plmodels := masters.Get("plmodel").(map[string]*PLModel)

	pl.AddData("PL43", findirect*pl.Ratio.Month, plmodels)
	pl.AddData("PL42", fdirect*pl.Ratio.Month, plmodels)
}

func (pl *SalesPL) CalcDamage(masters toolkit.M) {
	if masters.Has("damages") == false {
		return
	}

	damages := masters.Get("damages").(map[string]float64)

	aplmodel := pl.PLDatas
	for k, _ := range aplmodel {
		if k == "PL44" {
			delete(aplmodel, k)
		}
	}
	pl.PLDatas = aplmodel

	damagesid := toolkit.Sprintf("%s", pl.Date.Fiscal)
	d, exist := damages[damagesid]
	if !exist {
		return
	}

	d = d / 12

	plmodels := masters.Get("plmodel").(map[string]*PLModel)
	pl.AddData("PL44", d*pl.Ratio.Month, plmodels)
	// pl.AddData("PL44", -d*pl.Ratio.Month, plmodels)
}

func (pl *SalesPL) CalcRoyalties(masters toolkit.M) {
	if !masters.Has("royalties") {
		return
	}

	plbrand := strings.ToUpper(strings.TrimSpace(pl.Product.Brand))
	if plbrand == "3PRO" || plbrand == "AUTOSOL" || plbrand == "SIMBA" {
		return
	}
	//Autosol, 3PRO and Simba
	/*	royals := masters.Get("royalties").(map[string]float64)*/
	royalsamount := masters.GetFloat64("royaltiesamount")

	aplmodel := pl.PLDatas
	for k, _ := range aplmodel {
		if k == "PL25" {
			delete(aplmodel, k)
		}
	}
	pl.PLDatas = aplmodel

	/*	royalid := toolkit.Sprintf("%d_%d", pl.Date.Year, pl.Date.Month)
		r, exist := royals[royalid]
		if !exist {
			return
		}*/
	// toolkit.Println(royalid, ":", r)
	plmodels := masters.Get("plmodel").(map[string]*PLModel)
	// pl.AddData("PL25", -r*pl.Ratio.Month, plmodels)
	pl.AddData("PL25", -royalsamount*2.85900895*pl.Ratio.Global, plmodels)
}

func (pl *SalesPL) CalcRoyalties2016(masters toolkit.M) {
	// if !masters.Has("royalties") {
	// 	return
	// }

	netsalesamount := float64(0)
	arrnetsales := []string{"PL1", "PL2", "PL3", "PL4", "PL5", "PL6", "PL7", "PL8", "PL7A"}
	found := func(str string) bool {
		for _, v := range arrnetsales {
			if v == str {
				return true
			}
		}
		return false
	}

	aplmodel := pl.PLDatas
	for k, v := range aplmodel {
		if k == "PL25" {
			delete(aplmodel, k)
		}

		if found(k) {
			netsalesamount += v.Amount
		}
	}

	pl.PLDatas = aplmodel

	plmodels := masters.Get("plmodel").(map[string]*PLModel)
	pl.AddData("PL25", -netsalesamount*0.0285214610603953, plmodels)
}

func (pl *SalesPL) CalcRoyalties2015(masters toolkit.M) {
	// if !masters.Has("royalties") {
	// 	return
	// }

	netsalesamount := float64(0)
	arrnetsales := []string{"PL1", "PL2", "PL3", "PL4", "PL5", "PL6", "PL7", "PL8", "PL7A"}
	found := func(str string) bool {
		for _, v := range arrnetsales {
			if v == str {
				return true
			}
		}
		return false
	}

	aplmodel := pl.PLDatas
	for k, v := range aplmodel {
		if k == "PL25" {
			delete(aplmodel, k)
		}

		if found(k) {
			netsalesamount += v.Amount
		}
	}

	pl.PLDatas = aplmodel

	plmodels := masters.Get("plmodel").(map[string]*PLModel)
	pl.AddData("PL25", -netsalesamount*0.0282568801711491, plmodels)
}

//== OLD Fix Calculate Royalties
// func (pl *SalesPL) CalcRoyalties(masters toolkit.M) {
// 	if !masters.Has("royalties") {
// 		return
// 	}

// 	royals := masters.Get("royalties").(map[string]float64)

// 	aplmodel := pl.PLDatas
// 	for k, _ := range aplmodel {
// 		if k == "PL25" {
// 			delete(aplmodel, k)
// 		}
// 	}
// 	pl.PLDatas = aplmodel

// 	royalid := toolkit.Sprintf("%d_%d", pl.Date.Year, pl.Date.Month)
// 	r, exist := royals[royalid]
// 	if !exist {
// 		return
// 	}
// 	// toolkit.Println(royalid, ":", r)
// 	plmodels := masters.Get("plmodel").(map[string]*PLModel)
// 	pl.AddData("PL25", -r*pl.Ratio.Month, plmodels)
// }

func (pl *SalesPL) CalcDiscountActivity(masters toolkit.M) {

	if !masters.Has("discounts") {
		return
	}

	discounts := masters.Get("discounts").(toolkit.M)

	aplmodel := pl.PLDatas
	for k, _ := range aplmodel {
		if k == "PL7A" {
			delete(aplmodel, k)
		}
	}
	pl.PLDatas = aplmodel

	key01 := toolkit.Sprintf("%d_%d_%s", pl.Date.Year, pl.Date.Month, strings.ToUpper(pl.Customer.ChannelID))
	key02 := toolkit.Sprintf("%s_%s", key01, strings.ToUpper(pl.Product.Brand))

	amount := (pl.Ratio.MonthChannelBrand * discounts.GetFloat64(key02)) + (pl.Ratio.MonthChannel * discounts.GetFloat64(key01))
	// toolkit.Printfn("%v : %v : %v", key01, key02, amount)
	plmodels := masters.Get("plmodel").(map[string]*PLModel)
	pl.AddData("PL7A", -amount, plmodels)

}

func (pl *SalesPL) CalcPromo(masters toolkit.M) {

	if !masters.Has("promos") && !masters.Has("advertisements") {
		return
	}
	plmodels := masters.Get("plmodel").(map[string]*PLModel)
	PLList := []string{"PL28", "PL28A", "PL28B", "PL28C", "PL28D", "PL28E", "PL28F", "PL28G", "PL28H", "PL28I", "PL29A", "PL29A1",
		"PL29A2", "PL29A3", "PL29A4", "PL29A5", "PL29A6", "PL29A7", "PL29A8", "PL29A9", "PL29A10", "PL29A11", "PL29A12", "PL29A13", "PL29A14",
		"PL29A15", "PL29A16", "PL29A17", "PL29A18", "PL29A19", "PL29A20", "PL29A21", "PL29A22", "PL29A23", "PL29A24", "PL29A25", "PL29A26", "PL29A27", "PL29A28",
		"PL29A29", "PL29A30", "PL29A31", "PL29A32", "PL29", "PL30", "PL31", "PL31A", "PL31B", "PL31C", "PL31D", "PL31E", "PL32A"}
	inlist := func(str string) bool {
		for _, k := range PLList {
			if str == k {
				return true
			}
		}
		return false
	}

	aplmodel := pl.PLDatas
	for k, _ := range aplmodel {
		if inlist(k) {
			delete(aplmodel, k)
		}
	}
	pl.PLDatas = aplmodel

	promos := masters.Get("promos").(map[string]toolkit.M)

	find := func(id string) toolkit.M {
		// id := toolkit.Sprintf("%d_%d_%s", pl.Date.Year, pl.Date.Month, x)
		tkm, exist := promos[id]
		if exist {
			return tkm
		}
		return toolkit.M{}
	}

	fpromo := find(toolkit.Sprintf("%d_%d_%s", pl.Date.Year, pl.Date.Month, "promo"))
	fadv := find(toolkit.Sprintf("%d_%d_%s", pl.Date.Year, pl.Date.Month, "adv"))
	fadvbrand := find(toolkit.Sprintf("%d_%d_%s_%s", pl.Date.Year, pl.Date.Month, strings.TrimSpace(strings.ToUpper(pl.Product.Brand)), "adv"))
	fspg := find(toolkit.Sprintf("%d_%d_%s", pl.Date.Year, pl.Date.Month, "spg"))

	for key, v := range fadv {
		fv := toolkit.ToFloat64(v, 6, toolkit.RoundingAuto)
		pl.AddData(key, -pl.Ratio.Month*fv, plmodels)
	}

	for key, v := range fadvbrand {
		fv := toolkit.ToFloat64(v, 6, toolkit.RoundingAuto)
		pl.AddData(key, -pl.Ratio.MonthBrand*fv, plmodels)
	}

	for key, v := range fpromo {
		fv := toolkit.ToFloat64(v, 6, toolkit.RoundingAuto)
		pl.AddData(key, -pl.Ratio.Month*fv, plmodels)
	}

	for key, v := range fspg {
		fv := toolkit.ToFloat64(v, 6, toolkit.RoundingAuto)
		pl.AddData(key, -pl.Ratio.Month*fv, plmodels)
	}

	// pl.AddData("PL29A", -fpromo*pl.RatioToMonthSales, plmodels)
	// // pl.AddData("PL28", -fadv.AmountinIDR*pl.RatioToMonthSales, plmodels)
	// pl.AddData("PL32", -fspg*pl.RatioToMonthSales, plmodels)

}

//sgapls
func (pl *SalesPL) CalcSGARev(masters toolkit.M) {
	if !masters.Has("sgapls") {
		return
	}
	plmodels := masters.Get("plmodel").(map[string]*PLModel)

	aplmodel := pl.PLDatas
	for k, _ := range aplmodel {
		if strings.Contains(k, "PL33") || strings.Contains(k, "PL34") || strings.Contains(k, "PL35") {
			delete(aplmodel, k)
		}
	}
	pl.PLDatas = aplmodel

	sgadatas := masters.Get("sgapls").(map[string]toolkit.M)
	sgadata, exist := sgadatas[toolkit.Sprintf("%d_%d", pl.Date.Year, pl.Date.Month)]
	if exist {
		for k, v := range sgadata {
			arstr := strings.Split(k, "_")
			fv := toolkit.ToFloat64(v, 6, toolkit.RoundingAuto)
			pl.AddDataCC(arstr[0], -pl.Ratio.MonthVdist*fv, arstr[1], plmodels)
		}
	}
}

//Handle by other
/*func (pl *SalesPL) CalcSGA(masters toolkit.M) {
	if masters.Has("sga") == false || masters.Has("ledger") == false {
		return
	}
	sgas := masters.Get("sga").(map[string]map[string]*RawDataPL)

	plmodels := masters.Get("plmodel").(map[string]*PLModel)
	sgaid := toolkit.Sprintf("%d_%d", pl.Date.Year, pl.Date.Month)
	raws, exist := sgas[sgaid]
	if !exist {
		return
	}

	ccs := map[string]*CostCenter{}
	if masters.Has("cc") {
		ccs = masters.Get("cc").(map[string]*CostCenter)
	}
	ledgers := masters.Get("ledger").(map[string]*LedgerMaster)
	for _, raw := range raws {

		plcode := "PL34"
		switch {
		case strings.Contains(raw.Grouping, "General"):
			plcode = "PL34"
		case strings.Contains(raw.Grouping, "Personnel"):
			plcode = "PL33"
		case strings.Contains(raw.Grouping, "Depr & Amort. Exp. -  Office"):
			plcode = "PL35"
		default:
			return
		}

		ledger, exist := ledgers[raw.Account]
		if exist {
			plcode = ledger.PLCode
		}
		cc, exist := ccs[raw.CCID]
		ccgroup := "Other"
		if exist {
			ccgroup = cc.CostGroup01
		}
		pl.AddDataCC(plcode, -pl.RatioToGlobalSales*raw.AmountinIDR, ccgroup, plmodels)
	}
}*/

func (pl *SalesPL) AddData(plcode string, amount float64, models map[string]*PLModel) {
	pl.AddDataCC(plcode, amount, "", models)
}

func (pl *SalesPL) AddDataCC(plcode string, amount float64, ccgroup string, models map[string]*PLModel) {

	m, exist := models[plcode]
	if !exist {
		return
	}
	if ccgroup != "" {
		plcode = plcode + "_" + ccgroup
	}
	pl_m, exist := pl.PLDatas[plcode]
	if !exist || pl_m == nil {
		pl_m = new(PLData)
		pl_m.PLOrder = m.OrderIndex
		pl_m.Group1 = m.PLHeader1
		pl_m.Group2 = m.PLHeader2
		pl_m.Group3 = m.PLHeader3
	}

	if ccgroup != "" {
		pl_m.Group3 = ccgroup
	}

	pl_m.Amount += amount
	if pl.PLDatas == nil {
		pl.PLDatas = map[string]*PLData{}
	}

	pl.PLDatas[plcode] = pl_m
}


text:
* **usePopper:** fix exported Modifier type ([#1013](https://github.com/react-bootstrap/react-overlays/issues/1013)) ([96b3425](https://github.com/react-bootstrap/react-overlays/commit/96b34251baf534d146a6cf84bb3f20dda451db5b))

# [5.2.0](https://github.com/react-bootstrap/react-overlays/compare/v5.1.2...v5.2.0) (2022-06-02)

### Features

* **useRootClose:** add support for open shadow roots ([#1004](https://github.com/react-bootstrap/react-overlays/issues/1004)) ([3b7fb53](https://github.com/react-bootstrap/react-overlays/commit/3b7fb53d4b2141bbffa476608dfa1c0f694fa429))

## [5.1.2](https://github.com/react-bootstrap/react-overlays/compare/v5.1.1...v5.1.2) (2022-05-10)

### Bug Fixes

* update @restart/hooks to 0.4.7 ([#999](https://github.com/react-bootstrap/react-overlays/issues/999)) ([82d9bf9](https://github.com/react-bootstrap/react-overlays/commit/82d9bf9ffe6c6055d4a1f31c74822f82bb24b3b2))

## [5.1.1](https://github.com/react-bootstrap/react-overlays/compare/v5.1.0...v5.1.1) (2021-07-11)

### Bug Fixes

* **types:** fixed TransitionCallbacks interface to reflect react-transition-group args ([#962](https://github.com/react-bootstrap/react-overlays/issues/962)) ([282161c](https://github.com/react-bootstrap/react-overlays/commit/282161c74ddc129668cc7e536cce13e36ecf62de))

# [5.1.0](https://github.com/react-bootstrap/react-overlays/compare/v5.0.0...v5.1.0) (2021-06-25)

### Bug Fixes

* **Dropdown:** add checking if ref exists on dropdown ([#958](https://github.com/react-bootstrap/react-overlays/issues/958)) ([b0363c0](https://github.com/react-bootstrap/react-overlays/commit/b0363c0b2350a842f13e5ab38e1e33490e1c5d70))
* **Dropdown:** avoid calling onToggle when tabbing if menu ref not set ([#959](https://github.com/react-bootstrap/react-overlays/issues/959)) ([1c23c7d](https://github.com/react-bootstrap/react-overlays/commit/1c23c7d03a4bb3edaed55acc6abecd995b67ae0a))
* allow internal tabbing in dropdown menu ([#939](https://github.com/react-bootstrap/react-overlays/issues/939)) ([30fb517](https://github.com/react-bootstrap/react-overlays/commit/30fb51753e7f763029fb75ddd4bc7333de8bc4e0))

### Features

* **Modal:** split modal types for ease of export ([#956](https://github.com/react-bootstrap/react-overlays/issues/956)) ([849ab56](https://github.com/react-bootstrap/react-overlays/commit/849ab56b181d16215ce850ea1e13c3859c40fba3))

## [5.0.1](https://github.com/react-bootstrap/react-overlays/compare/v5.0.0...v5.0.1) (2021-04-21)

### Bug Fixes

* allow internal tabbing in dropdown menu ([#939](https://github.com/react-bootstrap/react-overlays/issues/939)) ([30fb517](https://github.com/react-bootstrap/react-overlays/commit/30fb51753e7f763029fb75ddd4bc7333de8bc4e0))

# [5.0.0](https://github.com/react-bootstrap/react-overlays/compare/v4.1.1...v5.0.0) (2021-03-01)

* feat!: Make DropdownAPI consistent and fix keyboard handling (#843) ([3ed2d85](https://github.com/react-bootstrap/react-overlays/commit/3ed2d853180db7325ab090ebdd4b2ef1096d20b4)), closes [#843](https://github.com/react-bootstrap/react-overlays/issues/843)

### BREAKING CHANGES

* Dropdown does not inject props or accept a children render function (it just works)

## [4.1.1](https://github.com/react-bootstrap/react-overlays/compare/v4.1.0...v4.1.1) (2020-10-29)

### Bug Fixes

* **Popper:** Prevent duplicate ids in aria-describedby ([#883](https://github.com/react-bootstrap/react-overlays/issues/883)) ([48bb128](https://github.com/react-bootstrap/react-overlays/commit/48bb1285916b6c0b49e02f07bcf1a603b77de15e))
* root-close firing immediately in react 17 ([#880](https://github.com/react-bootstrap/react-overlays/issues/880)) ([fa8c878](https://github.com/react-bootstrap/react-overlays/commit/fa8c878daba92ff7852aa8245d08df31d9ed17ab))

# [4.1.0](https://github.com/react-bootstrap/react-overlays/compare/v4.0.0...v4.1.0) (2020-07-20)

### Bug Fixes

* **deps:** bump lodash from 4.17.15 to 4.17.19 ([#840](https://github.com/react-bootstrap/react-overlays/issues/840)) ([e718175](https://github.com/react-bootstrap/react-overlays/commit/e718175eb4ea35d8bbe656d19ec0769bb2363653))

### Features

* add aria-describedby modifier for tooltips ([#842](https://github.com/react-bootstrap/react-overlays/issues/842)) ([941a5dc](https://github.com/react-bootstrap/react-overlays/commit/941a5dca181c36db891bffd5abdbd7c83759a704))

# [4.0.0](https://github.com/react-bootstrap/react-overlays/compare/v3.2.0...v4.0.0) (2020-07-10)

### Features

* improve popper integration ([#837](https://github.com/react-bootstrap/react-overlays/issues/837)) ([362128f](https://github.com/react-bootstrap/react-overlays/commit/362128f66baab0bfbc611204e5de5c86fc264fb0))

### BREAKING CHANGES

* popperConfig longer accept object forms of modifiers, pass an array instead
* overlay and dropdown menu injected values are different
* overlay no longer triggers an update when placement change due to auto or flip placements

* address feedback

# [3.2.0](https://github.com/react-bootstrap/react-overlays/compare/v3.1.3...v3.2.0) (2020-05-14)

### Bug Fixes

* Adding missing useEventCallback ([#804](https://github.com/react-bootstrap/react-overlays/issues/804)) ([cb7e2ab](https://github.com/react-bootstrap/react-overlays/commit/cb7e2ab299f450ef342fb572cafa355c0108eb26))

### Features

* **Modal:** Prevent onHide when keyboard event defaultPrevented is true ([#816](https://github.com/react-bootstrap/react-overlays/issues/816)) ([b4ffcec](https://github.com/react-bootstrap/react-overlays/commit/b4ffcecc7a1c25af9d2525a5704b2320e0509fb8))

## [3.1.3](https://github.com/react-bootstrap/react-overlays/compare/v3.1.2...v3.1.3) (2020-04-22)

### Bug Fixes

* **types:** fix Modal prop types ([#802](https://github.com/react-bootstrap/react-overlays/issues/802)) ([caa0531](https://github.com/react-bootstrap/react-overlays/commit/caa05316151953eb839a6fe75cb4a36064f76720))

## [3.1.2](https://github.com/react-bootstrap/react-overlays/compare/v3.1.1...v3.1.2) (2020-04-20)

### Bug Fixes

* esm imports in cjs build ([933b159](https://github.com/react-bootstrap/react-overlays/commit/933b159bb5e3e7fe99636b49c488ec249f7bd8dd))

## [3.1.1](https://github.com/react-bootstrap/react-overlays/compare/v3.1.0...v3.1.1) (2020-04-20)

### Bug Fixes

* **types:** onHide is optional ([#800](https://github.com/react-bootstrap/react-overlays/issues/800)) ([bdc10d1](https://github.com/react-bootstrap/react-overlays/commit/bdc10d12d2020ef9430a07cf959018fa4d2ce926))

# [3.1.0](https://github.com/react-bootstrap/react-overlays/compare/v3.0.1...v3.1.0) (2020-04-20)

### Bug Fixes

* build output ([#799](https://github.com/react-bootstrap/react-overlays/issues/799)) ([8bf269e](https://github.com/react-bootstrap/react-overlays/commit/8bf269e42e8a3df249dd8cbff736874b6a23f35c))

### Features

* typescript and docs ([#794](https://github.com/react-bootstrap/react-overlays/issues/794)) ([9c9b441](https://github.com/react-bootstrap/react-overlays/commit/9c9b44144e3c2899b77335546c7484bbf5469b3e))

## [3.0.1](https://github.com/react-bootstrap/react-overlays/compare/v3.0.0...v3.0.1) (2020-03-16)

### Bug Fixes

* popper imports for common js ([#781](https://github.com/react-bootstrap/react-overlays/issues/781)) ([c29dc76](https://github.com/react-bootstrap/react-overlays/commit/c29dc76f66c7eb74f5123ca9d5f531918ea7134a))
* typo ([#777](https://github.com/react-bootstrap/react-overlays/issues/777)) ([edd278b](https://github.com/react-bootstrap/react-overlays/commit/edd278b585106729cfef2ed556cc4a9d97077b0d))

# [3.0.0](https://github.com/react-bootstrap/react-overlays/compare/v2.1.1...v3.0.0) (2020-02-19)

### Features

* upgrade popper to v2 ([#766](https://github.com/react-bootstrap/react-overlays/issues/766)) ([02c8e6d](https://github.com/react-bootstrap/react-overlays/commit/02c8e6dc3c2a692de1a87b7c985f82a08a4e8594))

### BREAKING CHANGES

* popper upgrade to v2, slightly different modifiers format now

## [2.1.1](https://github.com/react-bootstrap/react-overlays/compare/v2.1.0...v2.1.1) (2020-02-03)

### Bug Fixes

* Compute scrollbar size dynamically on need ([#297](https://github.com/react-bootstrap/react-overlays/issues/297)) ([e022e9c](https://github.com/react-bootstrap/react-overlays/commit/e022e9c2b66fb7a0f8ef0c172a1b12c986dbcc75))

# [2.1.0](https://github.com/react-bootstrap/react-overlays/compare/v2.0.0...v2.1.0) (2019-10-11)

### Bug Fixes

* **github:** correct name of bug report template ([30ab079](https://github.com/react-bootstrap/react-overlays/commit/30ab079))

### Features

* **github:** add issue templates ([4fc4e52](https://github.com/react-bootstrap/react-overlays/commit/4fc4e52))

# [2.0.0](https://github.com/react-bootstrap/react-overlays/compare/v2.0.0-1...v2.0.0) (2019-10-03)

> No changes from 2.0.0-1

# [2.0.0-1](https://github.com/react-bootstrap/react-overlays/compare/v2.0.0-0...v2.0.0-1) (2019-09-18)

### Bug Fixes

- mismatch between Modal.dialog and hideSiblings parameters ([#389](https://github.com/react-bootstrap/react-overlays/issues/389)) ([202c96b](https://github.com/react-bootstrap/react-overlays/commit/202c96ba970c87394f245fcef914e94bd8a59a8b))
- **ci:** add git attributes that prevents formatter from failing ([b343193](https://github.com/react-bootstrap/react-overlays/commit/b343193fb30e70cc276ec979e75aafc3001c24b2))
- **ci:** add safeguard for running CodeCov on non-linux container ([b29b594](https://github.com/react-bootstrap/react-overlays/commit/b29b5941fca3a367f68e0ae044b4e9a2e5b1022e))
- **ci:** container action can only be run on linux containers fix ([c0be34e](https://github.com/react-bootstrap/react-overlays/commit/c0be34e1560384d4c10b390999840fe86e2c8e14))
- **ci:** merge upload test coverage step into main testing job ([0671fa8](https://github.com/react-bootstrap/react-overlays/commit/0671fa828b1e8eeeecb0c098883b4e7339b93a17))
- **ci:** missing import due to not installing parent package ([93059c8](https://github.com/react-bootstrap/react-overlays/commit/93059c89b090dc710c544d03d678d01d1c89205a))
- **ci:** potential fix for linting issue on windows ci build ([a54f2b6](https://github.com/react-bootstrap/react-overlays/commit/a54f2b6931c6b7499bdc599208de57ca636014bb))
- **ci:** remove macOS CI build ([b2f7225](https://github.com/react-bootstrap/react-overlays/commit/b2f7225cb74f1b0fd3e1a3a77ba016ffa615d539))
- **ci:** run upload test results as a separate job ([d601e7e](https://github.com/react-bootstrap/react-overlays/commit/d601e7eb590cc16b0187b6380949df305b1a210b))
- **docs:** compilation issues when building production files ([#412](https://github.com/react-bootstrap/react-overlays/issues/412)) ([3867655](https://github.com/react-bootstrap/react-overlays/commit/3867655aa5f61c053cdc7c682cdf8e893af6b232))
- **readme:** correct badge link ([85ad01e](https://github.com/react-bootstrap/react-overlays/commit/85ad01e6550cdcd4da179a497bdcf3ab26f2d80a))
- **readme:** incorrect naming for github actions badge ([e4b47b8](https://github.com/react-bootstrap/react-overlays/commit/e4b47b83fb57bd23b993c5f3c7efc33a1eb955a7))

### Features

- **ci:** only trigger test build on pushes and prs to master ([723f91e](https://github.com/react-bootstrap/react-overlays/commit/723f91eff173da54a4668663ed1aba8ee885389e))

# [2.0.0-0](https://github.com/react-bootstrap/react-overlays/compare/v1.2.0...v2.0.0-0) (2019-08-17)

### Bug Fixes

- cleanup ([d0d95b2](https://github.com/react-bootstrap/react-overlays/commit/d0d95b20037e0d6b93eba603e9d78980671bc3c3))
- disabled mocha/no-mocha-arrows ([a5ed2eb](https://github.com/react-bootstrap/react-overlays/commit/a5ed2ebfdceb52d1d0363e6609984726f697a561))
- eslint ([1ac8079](https://github.com/react-bootstrap/react-overlays/commit/1ac8079813d2ca1ce8569e99bd5cc0eba3e464f7))
- Make sure menu ref is set before using contains ([#291](https://github.com/react-bootstrap/react-overlays/issues/291)) ([8caa423](https://github.com/react-bootstrap/react-overlays/commit/8caa4236ac6d016676130d4a3258e77a3b04bd9b))
- ModalManager typo ([1a25b5a](https://github.com/react-bootstrap/react-overlays/commit/1a25b5a3cbdcea887949ca05e430b68944407502))

### Features

- Hooks and API simplifications ([#288](https://github.com/react-bootstrap/react-overlays/issues/288)) ([9f98306](https://github.com/react-bootstrap/react-overlays/commit/9f9830696178605b4e729bf15cf949140bf8c197))
- Remove affix support ([#287](https://github.com/react-bootstrap/react-overlays/issues/287)) ([cae4df8](https://github.com/react-bootstrap/react-overlays/commit/cae4df8b8762d491abbcd868df9b1b44f6bb9c5c))
- usePopper ([#299](https://github.com/react-bootstrap/react-overlays/issues/299)) ([bb5c51f](https://github.com/react-bootstrap/react-overlays/commit/bb5c51f2993aae28a41d7bdb3ef80a96ce1f4be3))

### BREAKING CHANGES

- removes RootCloseWrapper for useRootClose

# [1.2.0](https://github.com/react-bootstrap/react-overlays/compare/v1.1.2...v1.2.0) (2019-03-07)

### Features

- allow configurable menu focus behavior ([#286](https://github.com/react-bootstrap/react-overlays/issues/286)) ([76a63d4](https://github.com/react-bootstrap/react-overlays/commit/76a63d4))

## [1.1.2](https://github.com/react-bootstrap/react-overlays/compare/v1.1.1...v1.1.2) (2019-02-13)

### Bug Fixes

- modal focus ([#277](https://github.com/react-bootstrap/react-overlays/issues/277)) ([d348903](https://github.com/react-bootstrap/react-overlays/commit/d348903))

## [1.1.1](https://github.com/react-bootstrap/react-overlays/compare/v1.1.0...v1.1.1) (2019-01-04)

### Bug Fixes

- release config ([31a379a](https://github.com/react-bootstrap/react-overlays/commit/31a379a))

# [1.1.0](https://github.com/react-bootstrap/react-overlays/compare/v1.0.0...v1.1.0) (2019-01-03)

### Bug Fixes

- add uncontrollable to deps ([#276](https://github.com/react-bootstrap/react-overlays/issues/276)) ([e07cf96](https://github.com/react-bootstrap/react-overlays/commit/e07cf96)), closes [#262](https://github.com/react-bootstrap/react-overlays/issues/262)

### Features

- add RootCloseWrapper's disabled support to Overlay ([#273](https://github.com/react-bootstrap/react-overlays/issues/273)) ([2e316d1](https://github.com/react-bootstrap/react-overlays/commit/2e316d1))

## [v0.8.3]

> 2017-10-24

- **Bugfix:** Support React v16 portal API ([#208])
- **Bugfix:** Only call `onRendered` in `<LegacyPortal>` on initial render ([#218])
- **Bugfix:** Use more robust method of getting `<Modal>` dialog element ([#220])
- **Bugfix:** Remove broken `getOverlayDOMNode` from `<Portal>` ([#222])

[v0.8.3]: https://github.com/react-bootstrap/react-overlays/compare/v0.8.2...v0.8.3
[#208]: https://github.com/react-bootstrap/react-overlays/pull/208
[#218]: https://github.com/react-bootstrap/react-overlays/pull/218
[#220]: https://github.com/react-bootstrap/react-overlays/pull/220
[#222]: https://github.com/react-bootstrap/react-overlays/pull/222

## [v0.8.2]

> 2017-10-06

- **Bugfix:** Fix detecting escape keyboard event on IE ([#211])

[v0.8.2]: https://github.com/react-bootstrap/react-overlays/compare/v0.8.1...v0.8.2
[#211]: https://github.com/react-bootstrap/react-overlays/pull/211

## [v0.8.1]

> 2017-09-13

- **Bugfix:** Use `keydown` instead of incorrect `keyup` for `<Modal>` close keyboard event ([#195])

[v0.8.1]: https://github.com/react-bootstrap/react-overlays/compare/v0.8.0...v0.8.1
[#195]: https://github.com/react-bootstrap/react-overlays/pull/195

## [v0.8.0]

> 2017-07-03

- **Feature:** Remove `<Transition>` and depend on react-transition-group@2.0.0 ([#184])

[v0.8.0]: https://github.com/react-bootstrap/react-overlays/compare/v0.7.0...v0.8.0
[#184]: https://github.com/react-bootstrap/react-overlays/pull/184

## [v0.7.0]

> 2017-04-22

- **Chore:** Update dependencies to avoid React deprecation warnings
- **Chore:** Use function refs ([#159])

[v0.7.0]: https://github.com/react-bootstrap/react-overlays/compare/v0.6.12...v0.7.0
[#159]: https://github.com/react-bootstrap/react-overlays/pull/159

## [v0.6.12]

> 2017-03-06

- **Feature:** Add `mountOnEnter` to `<Transition>` ([#144])
- **Feature:** Add `restoreFocus` to `<Modal>` ([#145])

[v0.6.12]: https://github.com/react-bootstrap/react-overlays/compare/v0.6.11...v0.6.12
[#144]: https://github.com/react-bootstrap/react-overlays/pull/144
[#145]: https://github.com/react-bootstrap/react-overlays/pull/145

## [v0.6.11]

> 2017-02-13

- **Feature:** Allow accessibility attributes on `<Modal>` root element ([#114])
- **Feature:** Expose triggering event in `onRootClose` callback ([#142])

[v0.6.11]: https://github.com/react-bootstrap/react-overlays/compare/v0.6.10...v0.6.11
[#114]: https://github.com/react-bootstrap/react-overlays/pull/114
[#142]: https://github.com/react-bootstrap/react-overlays/pull/142

## [v0.6.10]

> 2016-10-03

- **Bugfix:** Don't fire `onRootClose` in capture phase to avoid race conditions with React events ([#118])

[v0.6.10]: https://github.com/react-bootstrap/react-overlays/compare/v0.6.9...v0.6.10
[#118]: https://github.com/react-bootstrap/react-overlays/pull/118

## [v0.6.9]

> 2016-10-01

- **Bugfix:** Don't spuriously trigger `onRootClose` when React event handler unmounts event target ([#117])

[v0.6.9]: https://github.com/react-bootstrap/react-overlays/compare/v0.6.8...v0.6.9
[#117]: https://github.com/react-bootstrap/react-overlays/pull/117

## [v0.6.8]

> 2016-09-30

- **Feature:** Remove wrapping DOM element in `<RootCloseWrapper>` ([#116])
- **Bugfix:** Do not bind listeners for `<RootCloseWrapper>` when `disabled` is set ([#116])

[v0.6.8]: https://github.com/react-bootstrap/react-overlays/compare/v0.6.7...v0.6.8
[#116]: https://github.com/react-bootstrap/react-overlays/pull/116

## [v0.6.7]

> 2016-09-29

- **Feature:** Allow opt-out of `<Modal>` container styling ([#113])
- **Feature:** Add `renderBackdrop` to `<Modal>` ([#113])

[v0.6.7]: https://github.com/react-bootstrap/react-overlays/compare/v0.6.6...v0.6.7
[#113]: https://github.com/react-bootstrap/react-overlays/pull/113

## [v0.6.6]

> 2016-08-01

- **Bugfix:** Don't trigger PropTypes warning ([#105])

[v0.6.6]: https://github.com/react-bootstrap/react-overlays/compare/v0.6.5...v0.6.6
[#105]: https://github.com/react-bootstrap/react-overlays/pull/105

## [v0.6.5]

> 2016-07-13

- **Bugfix:** Make `target` on `<Portal>` work like `container` ([#102])

[v0.6.5]: https://github.com/react-bootstrap/react-overlays/compare/v0.6.4...v0.6.5
[#102]: https://github.com/react-bootstrap/react-overlays/pull/102

## [v0.6.4]

> 2016-07-11

- **Feature:** Add `disabled` prop to `<RootCloseWrapper>` ([#93])
- **Feature:** Add `event` prop to `<RootCloseWrapper>` to control mouse event that triggers root close behavior ([#95])
- **Bugfix:** Fix restoring focus on closing `<Modal>` ([#82])
- **Bugfix:** Do not pass unknown props to children ([#99])
- **Chore:** Upgrade to Babel 6 ([#100])

[v0.6.4]: https://github.com/react-bootstrap/react-overlays/compare/v0.6.3...v0.6.4
[#82]: https://github.com/react-bootstrap/react-overlays/pull/82
[#93]: https://github.com/react-bootstrap/react-overlays/pull/93
[#95]: https://github.com/react-bootstrap/react-overlays/pull/95
[#99]: https://github.com/react-bootstrap/react-overlays/pull/99
[#100]: https://github.com/react-bootstrap/react-overlays/pull/100

## [v0.6.3]

> 2016-04-07

- **Minor:** Update React peer dependency ([#76])

[v0.6.3]: https://github.com/react-bootstrap/react-overlays/compare/v0.6.2...v0.6.3
[#76]: https://github.com/react-bootstrap/react-overlays/pull/76

## [v0.6.2]

> 2016-04-03

- **Bugfix:** Fix unmounting `<Portal>` when parent is unmounted ([#74])

[v0.6.2]: https://github.com/react-bootstrap/react-overlays/compare/v0.6.1...v0.6.2
[#74]: https://github.com/react-bootstrap/react-overlays/pull/74

## [v0.6.1]

> 2016-03-28

- **Bugfix:** Flush new props to DOM before initiating transitions ([#60])
- **Bugfix:** Update `<Portal>` container node when `container` prop changes ([#66])
- **Bugfix:** Don't invoke close in `<RootCloseWrapper>` on right clicks ([#69])

[v0.6.1]: https://github.com/react-bootstrap/react-overlays/compare/v0.6.0...v0.6.1
[#60]: https://github.com/react-bootstrap/react-overlays/pull/60
[#66]: https://github.com/react-bootstrap/react-overlays/pull/66
[#69]: https://github.com/react-bootstrap/react-overlays/pull/69

## v0.6.0 - Fri, 15 Jan 2016 16:15:50 GMT

- [c0b5890](../../commit/c0b5890) [fixed] Don't forward own props from <Position>
- [742c3c1](../../commit/742c3c1) [fixed] Modal does not fire show callback

## v0.5.4 - Tue, 17 Nov 2015 20:03:06 GMT

- [4eabbfc](../../commit/4eabbfc) [added] affix state callbacks

## v0.5.3 - Mon, 16 Nov 2015 19:52:03 GMT

- [d064667](../../commit/d064667) [fixed] AutoAffix nnot passing width or updating

## v0.5.2 - Mon, 16 Nov 2015 17:32:27 GMT

- [823d0f8](../../commit/823d0f8) [fixed] fix missing warning dep
- [1857449](../../commit/1857449) [changed] Friendlier default for AutoAffix
- [f633476](../../commit/f633476) [fixed] clean up modal styles if unmounted during exit transition

## v0.5.1 - Mon, 02 Nov 2015 16:07:44 GMT

- [e965152](../../commit/e965152) [added] Affix and AutoAffix

## v0.5.0 - Wed, 07 Oct 2015 19:40:23 GMT

- [044100b](../../commit/044100b) [added] React 0.14 support
- [edd316a](../../commit/edd316a) [added] aria-hidden, by default, to modal container siblings.

## v0.4.4 - Mon, 24 Aug 2015 18:34:19 GMT

## v0.4.3 - Sun, 23 Aug 2015 22:54:52 GMT

- [4f7823e](../../commit/4f7823e) [changed] focus target of the modal to its content

## v0.4.2 - Mon, 10 Aug 2015 19:04:31 GMT

## v0.4.1 - Tue, 04 Aug 2015 23:48:08 GMT


text:
// This file is automatically generated.

package adila.db;

/*
 * LG Optimus L5
 *
 * DEVICE: m4
 * MODEL: LG-E610
 */
final class m4_lg2de610 {
    public static final String DATA = "LG|Optimus L5|";
}


text:
/*                     __                                               *\
**     ________ ___   / /  ___      __ ____  Scala.js sbt plugin        **
**    / __/ __// _ | / /  / _ | __ / // __/  (c) 2013, LAMP/EPFL        **
**  __\ \/ /__/ __ |/ /__/ __ |/_// /_\ \    http://scala-js.org/       **
** /____/\___/_/ |_/____/_/ | |__/ /____/                               **
**                          |/____/                                     **
\*                                                                      */

package org.scalajs.sbtplugin

import OptimizerOptions._

/** Various options for the Scala.js optimizer tool chain
 *
 *  This is not a case class and does have a private constructor so that we
 *  can add fields in a binary-compatible manner.
 *
 *  Use [[OptimizerOptions.apply]] and the `with` methods to create a configured
 *  instance.
 */
final class OptimizerOptions private (
    /** Whether to only warn if the linker has errors */
    val bypassLinkingErrors: Boolean = false,
    /** Whether to parallelize the optimizer (currently fastOptJS only) **/
    val parallel: Boolean = true,
    /** Whether to run the optimizer in batch (i.e. non-incremental) mode */
    val batchMode: Boolean = false,
    /** Whether to run the Scala.js optimizer */
    val disableOptimizer: Boolean = false,
    /** Whether to pretty-print in fullOptJS */
    val prettyPrintFullOptJS: Boolean = false,
    /** Perform expensive checks of the sanity of the Scala.js IR */
    val checkScalaJSIR: Boolean = false,
    /** Use Google Closure Backend */
    val useClosureCompiler: Boolean = false
) {

  @deprecated(
      "Bypassing linking errors will not be possible in the next major version.",
      "0.6.6")
  def withBypassLinkingErrors(bypassLinkingErrors: Boolean): OptimizerOptions =
    copy(bypassLinkingErrors = bypassLinkingErrors)

  def withParallel(parallel: Boolean): OptimizerOptions =
    copy(parallel = parallel)

  def withBatchMode(batchMode: Boolean): OptimizerOptions =
    copy(batchMode = batchMode)

  def withDisableOptimizer(disableOptimizer: Boolean): OptimizerOptions =
    copy(disableOptimizer = disableOptimizer)

  def withPrettyPrintFullOptJS(prettyPrintFullOptJS: Boolean): OptimizerOptions =
    copy(prettyPrintFullOptJS = prettyPrintFullOptJS)

  def withCheckScalaJSIR(checkScalaJSIR: Boolean): OptimizerOptions =
    copy(checkScalaJSIR = checkScalaJSIR)

  def withUseClosureCompiler(useClosureCompiler: Boolean): OptimizerOptions =
    copy(useClosureCompiler = useClosureCompiler)

  private def copy(bypassLinkingErrors: Boolean = bypassLinkingErrors,
      parallel: Boolean = parallel, batchMode: Boolean = batchMode,
      disableOptimizer: Boolean = disableOptimizer,
      prettyPrintFullOptJS: Boolean = prettyPrintFullOptJS,
      checkScalaJSIR: Boolean = checkScalaJSIR,
      useClosureCompiler: Boolean = useClosureCompiler) = {
    new OptimizerOptions(bypassLinkingErrors, parallel, batchMode,
        disableOptimizer, prettyPrintFullOptJS, checkScalaJSIR,
        useClosureCompiler)
  }

  override def toString: String = {
    s"""OptimizerOptions(
       |  bypassLinkingErrors  = $bypassLinkingErrors
       |  parallel             = $parallel
       |  batchMode            = $batchMode
       |  disableOptimizer     = $disableOptimizer
       |  prettyPrintFullOptJS = $prettyPrintFullOptJS
       |  checkScalaJSIR       = $checkScalaJSIR
       |  useClosureCompiler   = $useClosureCompiler
       |)""".stripMargin
  }

}

object OptimizerOptions {
  def apply(): OptimizerOptions = new OptimizerOptions()
}


text: wakuwakup blog


text:
using System;
using System.Linq;

public class Startup
{
    public static void Main()
    {
        Book bookOne = new Book("Animal Farm", 2003, "George Orwell");
        Book bookTwo = new Book("The Documents in the Case", 2002, "Dorothy Sayers", "Robert Eustace");
        Book bookThree = new Book("The Documents in the Case", 1930);

        Library libraryOne = new Library();
        Library libraryTwo = new Library(bookOne, bookTwo, bookThree);
        libraryTwo.Books.Sort(new BookComparator());

        foreach (var book in libraryTwo)
        {
            Console.WriteLine(book);
        }
    }
}


text:
drop trigger wmatturn_ad0;
CREATE TRIGGER WMATTURN_AD0 FOR WMATTURN
ACTIVE AFTER DELETE POSITION 0
AS
begin
  execute procedure sp_recalc_remains_ex(old.posid, old.matid, old.wid, old.ondate, 1)^
  delete from extrel where extrel.intposid=old.sourceid^
end;

CREATE PROCEDURE SP_GET_INPOS (
    POSID INTEGER)
RETURNS (
    PID INTEGER)
AS
DECLARE VARIABLE V_WTYPE INTEGER^
begin
  select first 1 wmt.posid, wbl.wtype
   from wmatturn wmt, waybilldet wbd, waybilllist wbl
     where wmt.sourceid=:POSID and wmt.posid<>sourceid
      and wmt.posid=wbd.posid and wbd.wbillid=wbl.wbillid
  into :PID, :v_wtype^
  if (v_wtype = 4)
    then select pid from sp_get_inpos(:pid) into :PID^
  suspend^
end;

CREATE PROCEDURE SP_FIX_MOVE
AS
DECLARE VARIABLE V_POSID INTEGER^
DECLARE VARIABLE V_EXTPOSID INTEGER^
DECLARE VARIABLE V_TMP INTEGER^
begin
  for select wmt.sourceid
   from wmatturn wmt, waybilldet wbd, waybilllist wbl
   where wmt.sourceid=wbd.posid
    and wbd.wbillid=wbl.wbillid
    and wmt.posid<>wmt.sourceid
    and wbl.wtype=4
    and wmt.turntype<>2
   into :v_posid do
  begin
    v_tmp = null^
    select extposid
      from extrel where intposid=:v_posid
    into :v_tmp^
    if (v_tmp is null) then begin
      select pid from sp_get_inpos(:v_posid) into :v_extposid^
      if (v_extposid is not null) then
        insert into extrel (intposid, extposid) values (:v_posid, :v_extposid)^
    end
  end
end;

execute procedure sp_fix_move;
drop procedure sp_fix_move;
drop procedure sp_get_inpos;