text:
package org.apache.kafka.connect.runtime.standalone;

import org.apache.kafka.common.config.Config;
import org.apache.kafka.common.config.ConfigDef;
import org.apache.kafka.common.config.ConfigValue;
import org.apache.kafka.connect.connector.Connector;
import org.apache.kafka.connect.connector.ConnectorContext;
import org.apache.kafka.connect.connector.Task;
import org.apache.kafka.connect.connector.policy.ConnectorClientConfigOverridePolicy;
import org.apache.kafka.connect.connector.policy.NoneConnectorClientConfigOverridePolicy;
import org.apache.kafka.connect.errors.AlreadyExistsException;
import org.apache.kafka.connect.errors.ConnectException;
import org.apache.kafka.connect.errors.NotFoundException;
import org.apache.kafka.connect.runtime.AbstractStatus;
import org.apache.kafka.connect.runtime.ConnectorConfig;
import org.apache.kafka.connect.runtime.ConnectorStatus;
import org.apache.kafka.connect.runtime.Herder;
import org.apache.kafka.connect.runtime.HerderConnectorContext;
import org.apache.kafka.connect.runtime.SinkConnectorConfig;
import org.apache.kafka.connect.runtime.SourceConnectorConfig;
import org.apache.kafka.connect.runtime.TargetState;
import org.apache.kafka.connect.runtime.TaskConfig;
import org.apache.kafka.connect.runtime.TaskStatus;
import org.apache.kafka.connect.runtime.Worker;
import org.apache.kafka.connect.runtime.WorkerConfigTransformer;
import org.apache.kafka.connect.runtime.WorkerConnector;
import org.apache.kafka.connect.runtime.distributed.ClusterConfigState;
import org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader;
import org.apache.kafka.connect.runtime.isolation.PluginClassLoader;
import org.apache.kafka.connect.runtime.isolation.Plugins;
import org.apache.kafka.connect.runtime.rest.entities.ConnectorInfo;
import org.apache.kafka.connect.runtime.rest.entities.ConnectorType;
import org.apache.kafka.connect.runtime.rest.entities.TaskInfo;
import org.apache.kafka.connect.runtime.rest.errors.BadRequestException;
import org.apache.kafka.connect.sink.SinkConnector;
import org.apache.kafka.connect.sink.SinkTask;
import org.apache.kafka.connect.source.SourceConnector;
import org.apache.kafka.connect.source.SourceTask;
import org.apache.kafka.connect.storage.MemoryConfigBackingStore;
import org.apache.kafka.connect.storage.StatusBackingStore;
import org.apache.kafka.connect.util.Callback;
import org.apache.kafka.connect.util.ConnectorTaskId;
import org.apache.kafka.connect.util.FutureCallback;
import org.easymock.Capture;
import org.easymock.EasyMock;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.api.easymock.PowerMock;
import org.powermock.api.easymock.annotation.Mock;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;

import static java.util.Collections.singleton;
import static java.util.Collections.singletonList;
import static java.util.Collections.singletonMap;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

@RunWith(PowerMockRunner.class)
@SuppressWarnings("unchecked")
@PrepareForTest({StandaloneHerder.class, Plugins.class, WorkerConnector.class})
public class StandaloneHerderTest {
    private static final String CONNECTOR_NAME = "test";
    private static final List<String> TOPICS_LIST = Arrays.asList("topic1", "topic2");
    private static final String TOPICS_LIST_STR = "topic1,topic2";
    private static final int DEFAULT_MAX_TASKS = 1;
    private static final String WORKER_ID = "localhost:8083";
    private static final String KAFKA_CLUSTER_ID = "I4ZmrWqfT2e-upky_4fdPA";

    private enum SourceSink {
        SOURCE, SINK
    }

    private StandaloneHerder herder;

    private Connector connector;
    @Mock protected Worker worker;
    @Mock protected WorkerConfigTransformer transformer;
    @Mock private Plugins plugins;
    @Mock
    private PluginClassLoader pluginLoader;
    @Mock
    private DelegatingClassLoader delegatingLoader;
    @Mock protected Callback<Herder.Created<ConnectorInfo>> createCallback;
    @Mock protected StatusBackingStore statusBackingStore;

    private final ConnectorClientConfigOverridePolicy
        noneConnectorClientConfigOverridePolicy = new NoneConnectorClientConfigOverridePolicy();

    @Before
    public void setup() {
        worker = PowerMock.createMock(Worker.class);
        herder = PowerMock.createPartialMock(StandaloneHerder.class, new String[]{"connectorTypeForClass"},
            worker, WORKER_ID, KAFKA_CLUSTER_ID, statusBackingStore, new MemoryConfigBackingStore(transformer), noneConnectorClientConfigOverridePolicy);
        plugins = PowerMock.createMock(Plugins.class);
        pluginLoader = PowerMock.createMock(PluginClassLoader.class);
        delegatingLoader = PowerMock.createMock(DelegatingClassLoader.class);
        PowerMock.mockStatic(Plugins.class);
        PowerMock.mockStatic(WorkerConnector.class);
        Capture<Map<String, String>> configCapture = Capture.newInstance();
        EasyMock.expect(transformer.transform(EasyMock.eq(CONNECTOR_NAME), EasyMock.capture(configCapture))).andAnswer(configCapture::getValue).anyTimes();
    }

    @Test
    public void testCreateSourceConnector() throws Exception {
        connector = PowerMock.createMock(BogusSourceConnector.class);
        expectAdd(SourceSink.SOURCE);

        Map<String, String> config = connectorConfig(SourceSink.SOURCE);
        Connector connectorMock = PowerMock.createMock(SourceConnector.class);
        expectConfigValidation(connectorMock, true, config);

        PowerMock.replayAll();

        herder.putConnectorConfig(CONNECTOR_NAME, config, false, createCallback);

        PowerMock.verifyAll();
    }

    @Test
    public void testCreateConnectorFailedBasicValidation() {
        // Basic validation should be performed and return an error, but should still evaluate the connector's config
        connector = PowerMock.createMock(BogusSourceConnector.class);

        Map<String, String> config = connectorConfig(SourceSink.SOURCE);
        config.remove(ConnectorConfig.NAME_CONFIG);

        Connector connectorMock = PowerMock.createMock(SourceConnector.class);
        EasyMock.expect(worker.configTransformer()).andReturn(transformer).times(2);
        final Capture<Map<String, String>> configCapture = EasyMock.newCapture();
        EasyMock.expect(transformer.transform(EasyMock.capture(configCapture))).andAnswer(configCapture::getValue);
        EasyMock.expect(worker.getPlugins()).andReturn(plugins).times(3);
        EasyMock.expect(plugins.compareAndSwapLoaders(connectorMock)).andReturn(delegatingLoader);
        EasyMock.expect(plugins.newConnector(EasyMock.anyString())).andReturn(connectorMock);

        EasyMock.expect(connectorMock.config()).andStubReturn(new ConfigDef());

        ConfigValue validatedValue = new ConfigValue("foo.bar");
        EasyMock.expect(connectorMock.validate(config)).andReturn(new Config(singletonList(validatedValue)));
        EasyMock.expect(Plugins.compareAndSwapLoaders(delegatingLoader)).andReturn(pluginLoader);

        createCallback.onCompletion(EasyMock.<BadRequestException>anyObject(), EasyMock.<Herder.Created<ConnectorInfo>>isNull());
        PowerMock.expectLastCall();

        PowerMock.replayAll();

        herder.putConnectorConfig(CONNECTOR_NAME, config, false, createCallback);

        PowerMock.verifyAll();
    }

    @Test
    public void testCreateConnectorFailedCustomValidation() {
        connector = PowerMock.createMock(BogusSourceConnector.class);

        Connector connectorMock = PowerMock.createMock(SourceConnector.class);
        EasyMock.expect(worker.configTransformer()).andReturn(transformer).times(2);
        final Capture<Map<String, String>> configCapture = EasyMock.newCapture();
        EasyMock.expect(transformer.transform(EasyMock.capture(configCapture))).andAnswer(configCapture::getValue);
        EasyMock.expect(worker.getPlugins()).andReturn(plugins).times(3);
        EasyMock.expect(plugins.compareAndSwapLoaders(connectorMock)).andReturn(delegatingLoader);
        EasyMock.expect(plugins.newConnector(EasyMock.anyString())).andReturn(connectorMock);

        ConfigDef configDef = new ConfigDef();
        configDef.define("foo.bar", ConfigDef.Type.STRING, ConfigDef.Importance.HIGH, "foo.bar doc");
        EasyMock.expect(connectorMock.config()).andReturn(configDef);

        ConfigValue validatedValue = new ConfigValue("foo.bar");
        validatedValue.addErrorMessage("Failed foo.bar validation");
        Map<String, String> config = connectorConfig(SourceSink.SOURCE);
        EasyMock.expect(connectorMock.validate(config)).andReturn(new Config(singletonList(validatedValue)));
        EasyMock.expect(Plugins.compareAndSwapLoaders(delegatingLoader)).andReturn(pluginLoader);

        createCallback.onCompletion(EasyMock.<BadRequestException>anyObject(), EasyMock.<Herder.Created<ConnectorInfo>>isNull());
        PowerMock.expectLastCall();

        PowerMock.replayAll();

        herder.putConnectorConfig(CONNECTOR_NAME, config, false, createCallback);

        PowerMock.verifyAll();
    }

    @Test
    public void testCreateConnectorAlreadyExists() throws Exception {
        connector = PowerMock.createMock(BogusSourceConnector.class);
        // First addition should succeed
        expectAdd(SourceSink.SOURCE);

        Map<String, String> config = connectorConfig(SourceSink.SOURCE);
        Connector connectorMock = PowerMock.createMock(SourceConnector.class);
        expectConfigValidation(connectorMock, true, config, config);

        EasyMock.expect(worker.configTransformer()).andReturn(transformer).times(2);
        final Capture<Map<String, String>> configCapture = EasyMock.newCapture();
        EasyMock.expect(transformer.transform(EasyMock.capture(configCapture))).andAnswer(configCapture::getValue);
        EasyMock.expect(worker.getPlugins()).andReturn(plugins).times(2);
        EasyMock.expect(plugins.compareAndSwapLoaders(connectorMock)).andReturn(delegatingLoader);
        // No new connector is created
        EasyMock.expect(Plugins.compareAndSwapLoaders(delegatingLoader)).andReturn(pluginLoader);
        // Second should fail
        createCallback.onCompletion(EasyMock.<AlreadyExistsException>anyObject(), EasyMock.<Herder.Created<ConnectorInfo>>isNull());
        PowerMock.expectLastCall();

        PowerMock.replayAll();

        herder.putConnectorConfig(CONNECTOR_NAME, config, false, createCallback);
        herder.putConnectorConfig(CONNECTOR_NAME, config, false, createCallback);

        PowerMock.verifyAll();
    }

    @Test
    public void testCreateSinkConnector() throws Exception {
        connector = PowerMock.createMock(BogusSinkConnector.class);
        expectAdd(SourceSink.SINK);

        Map<String, String> config = connectorConfig(SourceSink.SINK);
        Connector connectorMock = PowerMock.createMock(SinkConnector.class);
        expectConfigValidation(connectorMock, true, config);
        PowerMock.replayAll();

        herder.putConnectorConfig(CONNECTOR_NAME, config, false, createCallback);

        PowerMock.verifyAll();
    }

    @Test
    public void testDestroyConnector() throws Exception {
        connector = PowerMock.createMock(BogusSourceConnector.class);
        expectAdd(SourceSink.SOURCE);

        Map<String, String> config = connectorConfig(SourceSink.SOURCE);
        Connector connectorMock = PowerMock.createMock(SourceConnector.class);
        expectConfigValidation(connectorMock, true, config);

        EasyMock.expect(statusBackingStore.getAll(CONNECTOR_NAME)).andReturn(Collections.<TaskStatus>emptyList());
        statusBackingStore.put(new ConnectorStatus(CONNECTOR_NAME, AbstractStatus.State.DESTROYED, WORKER_ID, 0));

        expectDestroy();

        PowerMock.replayAll();

        herder.putConnectorConfig(CONNECTOR_NAME, config, false, createCallback);
        FutureCallback<Herder.Created<ConnectorInfo>> futureCb = new FutureCallback<>();
        herder.deleteConnectorConfig(CONNECTOR_NAME, futureCb);
        futureCb.get(1000L, TimeUnit.MILLISECONDS);

        // Second deletion should fail since the connector is gone
        futureCb = new FutureCallback<>();
        herder.deleteConnectorConfig(CONNECTOR_NAME, futureCb);
        try {
            futureCb.get(1000L, TimeUnit.MILLISECONDS);
            fail("Should have thrown NotFoundException");
        } catch (ExecutionException e) {
            assertTrue(e.getCause() instanceof NotFoundException);
        }

        PowerMock.verifyAll();
    }

    @Test
    public void testRestartConnector() throws Exception {
        expectAdd(SourceSink.SOURCE);

        Map<String, String> config = connectorConfig(SourceSink.SOURCE);
        Connector connectorMock = PowerMock.createMock(SourceConnector.class);
        expectConfigValidation(connectorMock, true, config);

        worker.stopConnector(CONNECTOR_NAME);
        EasyMock.expectLastCall().andReturn(true);

        worker.startConnector(EasyMock.eq(CONNECTOR_NAME), EasyMock.eq(config),
                EasyMock.anyObject(HerderConnectorContext.class), EasyMock.eq(herder), EasyMock.eq(TargetState.STARTED));
        EasyMock.expectLastCall().andReturn(true);

        PowerMock.replayAll();

        herder.putConnectorConfig(CONNECTOR_NAME, config, false, createCallback);

        FutureCallback<Void> cb = new FutureCallback<>();
        herder.restartConnector(CONNECTOR_NAME, cb);
        cb.get(1000L, TimeUnit.MILLISECONDS);

        PowerMock.verifyAll();
    }

    @Test
    public void testRestartConnectorFailureOnStart() throws Exception {
        expectAdd(SourceSink.SOURCE);

        Map<String, String> config = connectorConfig(SourceSink.SOURCE);
        Connector connectorMock = PowerMock.createMock(SourceConnector.class);
        expectConfigValidation(connectorMock, true, config);

        worker.stopConnector(CONNECTOR_NAME);
        EasyMock.expectLastCall().andReturn(true);

        worker.startConnector(EasyMock.eq(CONNECTOR_NAME), EasyMock.eq(config),
                EasyMock.anyObject(HerderConnectorContext.class), EasyMock.eq(herder), EasyMock.eq(TargetState.STARTED));
        EasyMock.expectLastCall().andReturn(false);

        PowerMock.replayAll();

        herder.putConnectorConfig(CONNECTOR_NAME, config, false, createCallback);

        FutureCallback<Void> cb = new FutureCallback<>();
        herder.restartConnector(CONNECTOR_NAME, cb);
        try {
            cb.get(1000L, TimeUnit.MILLISECONDS);
            fail();
        } catch (ExecutionException exception) {
            assertEquals(ConnectException.class, exception.getCause().getClass());
        }

        PowerMock.verifyAll();
    }

    @Test
    public void testRestartTask() throws Exception {
        ConnectorTaskId taskId = new ConnectorTaskId(CONNECTOR_NAME, 0);
        expectAdd(SourceSink.SOURCE);

        Map<String, String> connectorConfig = connectorConfig(SourceSink.SOURCE);
        Connector connectorMock = PowerMock.createMock(SourceConnector.class);
        expectConfigValidation(connectorMock, true, connectorConfig);

        worker.stopAndAwaitTask(taskId);
        EasyMock.expectLastCall();

        ClusterConfigState configState = new ClusterConfigState(
                -1,
                null,
                Collections.singletonMap(CONNECTOR_NAME, 1),
                Collections.singletonMap(CONNECTOR_NAME, connectorConfig),
                Collections.singletonMap(CONNECTOR_NAME, TargetState.STARTED),
                Collections.singletonMap(taskId, taskConfig(SourceSink.SOURCE)),
                new HashSet<>(),
                transformer);
        worker.startTask(taskId, configState, connectorConfig, taskConfig(SourceSink.SOURCE), herder, TargetState.STARTED);
        EasyMock.expectLastCall().andReturn(true);

        PowerMock.replayAll();

        herder.putConnectorConfig(CONNECTOR_NAME, connectorConfig, false, createCallback);

        FutureCallback<Void> cb = new FutureCallback<>();
        herder.restartTask(taskId, cb);
        cb.get(1000L, TimeUnit.MILLISECONDS);

        PowerMock.verifyAll();
    }

    @Test
    public void testRestartTaskFailureOnStart() throws Exception {
        ConnectorTaskId taskId = new ConnectorTaskId(CONNECTOR_NAME, 0);
        expectAdd(SourceSink.SOURCE);

        Map<String, String> connectorConfig = connectorConfig(SourceSink.SOURCE);
        Connector connectorMock = PowerMock.createMock(SourceConnector.class);
        expectConfigValidation(connectorMock, true, connectorConfig);

        worker.stopAndAwaitTask(taskId);
        EasyMock.expectLastCall();

        ClusterConfigState configState = new ClusterConfigState(
                -1,
                null,
                Collections.singletonMap(CONNECTOR_NAME, 1),
                Collections.singletonMap(CONNECTOR_NAME, connectorConfig),
                Collections.singletonMap(CONNECTOR_NAME, TargetState.STARTED),
                Collections.singletonMap(new ConnectorTaskId(CONNECTOR_NAME, 0), taskConfig(SourceSink.SOURCE)),
                new HashSet<>(),
                transformer);
        worker.startTask(taskId, configState, connectorConfig, taskConfig(SourceSink.SOURCE), herder, TargetState.STARTED);
        EasyMock.expectLastCall().andReturn(false);

        PowerMock.replayAll();

        herder.putConnectorConfig(CONNECTOR_NAME, connectorConfig, false, createCallback);

        FutureCallback<Void> cb = new FutureCallback<>();
        herder.restartTask(taskId, cb);
        try {
            cb.get(1000L, TimeUnit.MILLISECONDS);
            fail("Expected restart callback to raise an exception");
        } catch (ExecutionException exception) {
            assertEquals(ConnectException.class, exception.getCause().getClass());
        }

        PowerMock.verifyAll();
    }

    @Test
    public void testCreateAndStop() throws Exception {
        connector = PowerMock.createMock(BogusSourceConnector.class);
        expectAdd(SourceSink.SOURCE);

        Map<String, String> connectorConfig = connectorConfig(SourceSink.SOURCE);
        Connector connectorMock = PowerMock.createMock(SourceConnector.class);
        expectConfigValidation(connectorMock, true, connectorConfig);

        // herder.stop() should stop any running connectors and tasks even if destroyConnector was not invoked
        expectStop();

        statusBackingStore.stop();
        EasyMock.expectLastCall();
        worker.stop();
        EasyMock.expectLastCall();

        PowerMock.replayAll();

        herder.putConnectorConfig(CONNECTOR_NAME, connectorConfig, false, createCallback);
        herder.stop();

        PowerMock.verifyAll();
    }

    @Test
    public void testAccessors() throws Exception {
        Map<String, String> connConfig = connectorConfig(SourceSink.SOURCE);
        System.out.println(connConfig);

        Callback<Collection<String>> listConnectorsCb = PowerMock.createMock(Callback.class);
        Callback<ConnectorInfo> connectorInfoCb = PowerMock.createMock(Callback.class);
        Callback<Map<String, String>> connectorConfigCb = PowerMock.createMock(Callback.class);
        Callback<List<TaskInfo>> taskConfigsCb = PowerMock.createMock(Callback.class);

        // Check accessors with empty worker
        listConnectorsCb.onCompletion(null, Collections.EMPTY_SET);
        EasyMock.expectLastCall();
        connectorInfoCb.onCompletion(EasyMock.<NotFoundException>anyObject(), EasyMock.<ConnectorInfo>isNull());
        EasyMock.expectLastCall();
        connectorConfigCb.onCompletion(EasyMock.<NotFoundException>anyObject(), EasyMock.<Map<String, String>>isNull());
        EasyMock.expectLastCall();
        taskConfigsCb.onCompletion(EasyMock.<NotFoundException>anyObject(), EasyMock.<List<TaskInfo>>isNull());
        EasyMock.expectLastCall();

        // Create connector
        connector = PowerMock.createMock(BogusSourceConnector.class);
        expectAdd(SourceSink.SOURCE);
        expectConfigValidation(connector, true, connConfig);

        // Validate accessors with 1 connector
        listConnectorsCb.onCompletion(null, singleton(CONNECTOR_NAME));
        EasyMock.expectLastCall();
        ConnectorInfo connInfo = new ConnectorInfo(CONNECTOR_NAME, connConfig, Arrays.asList(new ConnectorTaskId(CONNECTOR_NAME, 0)),
            ConnectorType.SOURCE);
        connectorInfoCb.onCompletion(null, connInfo);
        EasyMock.expectLastCall();
        connectorConfigCb.onCompletion(null, connConfig);
        EasyMock.expectLastCall();

        TaskInfo taskInfo = new TaskInfo(new ConnectorTaskId(CONNECTOR_NAME, 0), taskConfig(SourceSink.SOURCE));
        taskConfigsCb.onCompletion(null, Arrays.asList(taskInfo));
        EasyMock.expectLastCall();

        PowerMock.replayAll();

        // All operations are synchronous for StandaloneHerder, so we don't need to actually wait after making each call
        herder.connectors(listConnectorsCb);
        herder.connectorInfo(CONNECTOR_NAME, connectorInfoCb);
        herder.connectorConfig(CONNECTOR_NAME, connectorConfigCb);
        herder.taskConfigs(CONNECTOR_NAME, taskConfigsCb);

        herder.putConnectorConfig(CONNECTOR_NAME, connConfig, false, createCallback);

        EasyMock.reset(transformer);
        EasyMock.expect(transformer.transform(EasyMock.eq(CONNECTOR_NAME), EasyMock.anyObject()))
            .andThrow(new AssertionError("Config transformation should not occur when requesting connector or task info"))
            .anyTimes();
        EasyMock.replay(transformer);

        herder.connectors(listConnectorsCb);
        herder.connectorInfo(CONNECTOR_NAME, connectorInfoCb);
        herder.connectorConfig(CONNECTOR_NAME, connectorConfigCb);
        herder.taskConfigs(CONNECTOR_NAME, taskConfigsCb);

        PowerMock.verifyAll();
    }

    @Test
    public void testPutConnectorConfig() throws Exception {
        Map<String, String> connConfig = connectorConfig(SourceSink.SOURCE);
        Map<String, String> newConnConfig = new HashMap<>(connConfig);
        newConnConfig.put("foo", "bar");

        Callback<Map<String, String>> connectorConfigCb = PowerMock.createMock(Callback.class);
        Callback<Herder.Created<ConnectorInfo>> putConnectorConfigCb = PowerMock.createMock(Callback.class);

        // Create
        connector = PowerMock.createMock(BogusSourceConnector.class);
        expectAdd(SourceSink.SOURCE);
        Connector connectorMock = PowerMock.createMock(SourceConnector.class);
        expectConfigValidation(connectorMock, true, connConfig);

        // Should get first config
        connectorConfigCb.onCompletion(null, connConfig);
        EasyMock.expectLastCall();
        // Update config, which requires stopping and restarting
        worker.stopConnector(CONNECTOR_NAME);
        EasyMock.expectLastCall().andReturn(true);
        Capture<Map<String, String>> capturedConfig = EasyMock.newCapture();
        worker.startConnector(EasyMock.eq(CONNECTOR_NAME), EasyMock.capture(capturedConfig), EasyMock.<ConnectorContext>anyObject(),
                EasyMock.eq(herder), EasyMock.eq(TargetState.STARTED));
        EasyMock.expectLastCall().andReturn(true);
        EasyMock.expect(worker.isRunning(CONNECTOR_NAME)).andReturn(true);
        // Generate same task config, which should result in no additional action to restart tasks
        EasyMock.expect(worker.connectorTaskConfigs(CONNECTOR_NAME, new SourceConnectorConfig(plugins, newConnConfig)))
                .andReturn(singletonList(taskConfig(SourceSink.SOURCE)));
        worker.isSinkConnector(CONNECTOR_NAME);
        EasyMock.expectLastCall().andReturn(false);
        ConnectorInfo newConnInfo = new ConnectorInfo(CONNECTOR_NAME, newConnConfig, Arrays.asList(new ConnectorTaskId(CONNECTOR_NAME, 0)),
            ConnectorType.SOURCE);
        putConnectorConfigCb.onCompletion(null, new Herder.Created<>(false, newConnInfo));
        EasyMock.expectLastCall();
        // Should get new config
        expectConfigValidation(connectorMock, false, newConnConfig);
        connectorConfigCb.onCompletion(null, newConnConfig);
        EasyMock.expectLastCall();
        EasyMock.expect(worker.getPlugins()).andReturn(plugins).anyTimes();

        PowerMock.replayAll();

        herder.putConnectorConfig(CONNECTOR_NAME, connConfig, false, createCallback);
        herder.connectorConfig(CONNECTOR_NAME, connectorConfigCb);
        herder.putConnectorConfig(CONNECTOR_NAME, newConnConfig, true, putConnectorConfigCb);
        assertEquals("bar", capturedConfig.getValue().get("foo"));
        herder.connectorConfig(CONNECTOR_NAME, connectorConfigCb);

        PowerMock.verifyAll();

    }

    @Test(expected = UnsupportedOperationException.class)
    public void testPutTaskConfigs() {
        Callback<Void> cb = PowerMock.createMock(Callback.class);

        PowerMock.replayAll();

        herder.putTaskConfigs(CONNECTOR_NAME,
                Arrays.asList(singletonMap("config", "value")),
                cb,
                null);

        PowerMock.verifyAll();
    }

    @Test
    public void testCorruptConfig() {
        Map<String, String> config = new HashMap<>();
        config.put(ConnectorConfig.NAME_CONFIG, CONNECTOR_NAME);
        config.put(ConnectorConfig.CONNECTOR_CLASS_CONFIG, BogusSinkConnector.class.getName());
        config.put(SinkConnectorConfig.TOPICS_CONFIG, TOPICS_LIST_STR);
        Connector connectorMock = PowerMock.createMock(SinkConnector.class);
        String error = "This is an error in your config!";
        List<String> errors = new ArrayList<>(singletonList(error));
        String key = "foo.invalid.key";
        EasyMock.expect(connectorMock.validate(config)).andReturn(
            new Config(
                Arrays.asList(new ConfigValue(key, null, Collections.emptyList(), errors))
            )
        );
        ConfigDef configDef = new ConfigDef();
        configDef.define(key, ConfigDef.Type.STRING, ConfigDef.Importance.HIGH, "");
        EasyMock.expect(worker.configTransformer()).andReturn(transformer).times(2);
        final Capture<Map<String, String>> configCapture = EasyMock.newCapture();
        EasyMock.expect(transformer.transform(EasyMock.capture(configCapture))).andAnswer(configCapture::getValue);
        EasyMock.expect(worker.getPlugins()).andReturn(plugins).times(3);
        EasyMock.expect(plugins.compareAndSwapLoaders(connectorMock)).andReturn(delegatingLoader);
        EasyMock.expect(worker.getPlugins()).andStubReturn(plugins);
        EasyMock.expect(plugins.newConnector(EasyMock.anyString())).andReturn(connectorMock);
        EasyMock.expect(connectorMock.config()).andStubReturn(configDef);
        EasyMock.expect(Plugins.compareAndSwapLoaders(delegatingLoader)).andReturn(pluginLoader);
        Callback<Herder.Created<ConnectorInfo>> callback = PowerMock.createMock(Callback.class);
        Capture<BadRequestException> capture = Capture.newInstance();
        callback.onCompletion(
            EasyMock.capture(capture), EasyMock.isNull(Herder.Created.class)
        );

        PowerMock.replayAll();

        herder.putConnectorConfig(CONNECTOR_NAME, config, true, callback);
        assertEquals(
            capture.getValue().getMessage(),
            "Connector configuration is invalid and contains the following 1 error(s):\n" +
                error + "\n" +
                "You can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`"
        );

        PowerMock.verifyAll();
    }

    private void expectAdd(SourceSink sourceSink) {
        Map<String, String> connectorProps = connectorConfig(sourceSink);
        ConnectorConfig connConfig = sourceSink == SourceSink.SOURCE ?
            new SourceConnectorConfig(plugins, connectorProps) :
            new SinkConnectorConfig(plugins, connectorProps);

        worker.startConnector(EasyMock.eq(CONNECTOR_NAME), EasyMock.eq(connectorProps), EasyMock.anyObject(HerderConnectorContext.class),
                              EasyMock.eq(herder), EasyMock.eq(TargetState.STARTED));
        EasyMock.expectLastCall().andReturn(true);
        EasyMock.expect(worker.isRunning(CONNECTOR_NAME)).andReturn(true);

        ConnectorInfo connInfo = new ConnectorInfo(CONNECTOR_NAME, connectorProps, Arrays.asList(new ConnectorTaskId(CONNECTOR_NAME, 0)),
            SourceSink.SOURCE == sourceSink ? ConnectorType.SOURCE : ConnectorType.SINK);
        createCallback.onCompletion(null, new Herder.Created<>(true, connInfo));
        EasyMock.expectLastCall();

        // And we should instantiate the tasks. For a sink task, we should see added properties for the input topic partitions

        Map<String, String> generatedTaskProps = taskConfig(sourceSink);

        EasyMock.expect(worker.connectorTaskConfigs(CONNECTOR_NAME, connConfig))
            .andReturn(singletonList(generatedTaskProps));

        ClusterConfigState configState = new ClusterConfigState(
                -1,
                null,
                Collections.singletonMap(CONNECTOR_NAME, 1),
                Collections.singletonMap(CONNECTOR_NAME, connectorConfig(sourceSink)),
                Collections.singletonMap(CONNECTOR_NAME, TargetState.STARTED),
                Collections.singletonMap(new ConnectorTaskId(CONNECTOR_NAME, 0), generatedTaskProps),
                new HashSet<>(),
                transformer);
        worker.startTask(new ConnectorTaskId(CONNECTOR_NAME, 0), configState, connectorConfig(sourceSink), generatedTaskProps, herder, TargetState.STARTED);
        EasyMock.expectLastCall().andReturn(true);

        EasyMock.expect(herder.connectorTypeForClass(BogusSourceConnector.class.getName()))
            .andReturn(ConnectorType.SOURCE).anyTimes();
        EasyMock.expect(herder.connectorTypeForClass(BogusSinkConnector.class.getName()))
            .andReturn(ConnectorType.SINK).anyTimes();
        worker.isSinkConnector(CONNECTOR_NAME);
        PowerMock.expectLastCall().andReturn(sourceSink == SourceSink.SINK);
    }

    private void expectStop() {
        ConnectorTaskId task = new ConnectorTaskId(CONNECTOR_NAME, 0);
        worker.stopAndAwaitTasks(singletonList(task));
        EasyMock.expectLastCall();
        worker.stopConnector(CONNECTOR_NAME);
        EasyMock.expectLastCall().andReturn(true);
    }

    private void expectDestroy() {
        expectStop();
    }

    private static Map<String, String> connectorConfig(SourceSink sourceSink) {
        Map<String, String> props = new HashMap<>();
        props.put(ConnectorConfig.NAME_CONFIG, CONNECTOR_NAME);
        Class<? extends Connector> connectorClass = sourceSink == SourceSink.SINK ? BogusSinkConnector.class : BogusSourceConnector.class;
        props.put(ConnectorConfig.CONNECTOR_CLASS_CONFIG, connectorClass.getName());
        props.put(ConnectorConfig.TASKS_MAX_CONFIG, "1");
        if (sourceSink == SourceSink.SINK)
            props.put(SinkTask.TOPICS_CONFIG, TOPICS_LIST_STR);
        return props;
    }

    private static Map<String, String> taskConfig(SourceSink sourceSink) {
        HashMap<String, String> generatedTaskProps = new HashMap<>();
        // Connectors can add any settings, so these are arbitrary
        generatedTaskProps.put("foo", "bar");
        Class<? extends Task> taskClass = sourceSink == SourceSink.SINK ? BogusSinkTask.class : BogusSourceTask.class;
        generatedTaskProps.put(TaskConfig.TASK_CLASS_CONFIG, taskClass.getName());
        if (sourceSink == SourceSink.SINK)
            generatedTaskProps.put(SinkTask.TOPICS_CONFIG, TOPICS_LIST_STR);
        return generatedTaskProps;
    }

    private void expectConfigValidation(
            Connector connectorMock,
            boolean shouldCreateConnector,
            Map<String, String>... configs
    ) {
        // config validation
        EasyMock.expect(worker.configTransformer()).andReturn(transformer).times(2);
        final Capture<Map<String, String>> configCapture = EasyMock.newCapture();
        EasyMock.expect(transformer.transform(EasyMock.capture(configCapture))).andAnswer(configCapture::getValue);
        EasyMock.expect(worker.getPlugins()).andReturn(plugins).times(3);
        EasyMock.expect(plugins.compareAndSwapLoaders(connectorMock)).andReturn(delegatingLoader);
        if (shouldCreateConnector) {
            EasyMock.expect(worker.getPlugins()).andReturn(plugins);
            EasyMock.expect(plugins.newConnector(EasyMock.anyString())).andReturn(connectorMock);
        }
        EasyMock.expect(connectorMock.config()).andStubReturn(new ConfigDef());

        for (Map<String, String> config : configs)
            EasyMock.expect(connectorMock.validate(config)).andReturn(new Config(Collections.<ConfigValue>emptyList()));
        EasyMock.expect(Plugins.compareAndSwapLoaders(delegatingLoader)).andReturn(pluginLoader);
    }

    // We need to use a real class here due to some issue with mocking java.lang.Class
    private abstract class BogusSourceConnector extends SourceConnector {
    }

    private abstract class BogusSourceTask extends SourceTask {
    }

    private abstract class BogusSinkConnector extends SinkConnector {
    }

    private abstract class BogusSinkTask extends SourceTask {
    }

}


text:
HomeIllinois NewsIllinois Democrats to require highest minimum wage in Midwest
Illinois Democrats to require highest minimum wage in Midwest
Gov Pritzker on IL House floor after minimum wage hike vote | Chicago Tribune photo
SPRINGFIELD— As soon as Tuesday, Gov. JB Pritzker will sign a bill that passed the Illinois General Assembly with backing of Illinois Democrats that will have businesses pay their employees the highest minimum wage in the nation in 2025.
Thursday, the Illinois House passed SB 1, sending to the new governor a bill he is eagerly anticipating which forces businesses from one end of the Illinois to the other to pay a $15 per hour for entry-level jobs.
Governor Pritzker was delighted to hear the news, and joined the House members on the floor during the discussion.
"Today is resounding victory for the 1.4 million Illinoisans who will soon get a hard-earned and well-deserved raise," said Gov. JB Pritzker. "After nearly a decade of delay, I applaud the House and Senate for passing a living wage with the fierce urgency this moment requires.
"Phasing in the minimum wage over the next six years will put $6,300 a year into the pockets of nearly a quarter of our state's workforce and billions of dollars into local economies in every corner of our state. Whether you're a home healthcare provider in McLeansboro or a janitor in Rockford, hardworking men and women across Illinois deserve a raise and will get one. After campaigning on a promise to put Springfield back on the side of working families, I will proudly sign this historic legislation in the days to come."
With a super majority in the Illinois House, Democrats were able to allow three of their caucus to vote "no" – three that are in conservative-leaning districts: Rep. Jerry Costello, Terry Costa Howard and Edly-Allen. The other 44 "no" votes came from the Illinois Republican House Caucus.
The minimum wage hike will negatively affect business owners, they told the lawmakers, only to fall on deaf ears.
State Representative Tom Morrison (R-Palatine) said, "The lack of discussion and negotiation on this extremely dramatic change in policy is concerning. This is not a bipartisan piece of legislation, yet the effects of this proposal will impact small businesses and families in the entire state. For businesses that are already struggling to stay in Illinois, this increase will be detrimental to the cost of doing business. Some employees will benefit from this change, but more would be hurt, which is why I could not in good faith support this bill. Expect businesses to either close their doors altogether, cut employee hours, and/or find ways to automate—all of which would be detrimental to those who depend on these jobs. The best way to improve the livelihoods of all Illinoisans is to encourage a growing Illinois economy."
After the vote, State Representative Steve Reick (R-Woodstock) said, "In spite of promises made by the new administration that we will enjoy bipartisanship and cooperation in the 101st General Assembly, today the majority party chose to fulfill a political campaign promise at the expense of job creators and taxpayers across Illinois. In a state where policy decisions move like molasses, this minimum wage bill shot like a rocket through the Senate and House, with no regard for legitimate issues brought forward at the committee level."
The manuever could cost jobs of disabled in DuPage County. State Representative Grant Wehrli (R-Naperville) said, "In my community I have a social services agency called Little Friends, which operates Spectrum Services in Downers Grove, an organization that provides jobs to adults with intellectual disabilities. The approved wording of this bill puts their ability to provide meaningful jobs to disabled adults in real jeopardy. Nearly 175 adults with intellectual disabilities may soon be out of a job because the bill sponsor refused to slow down the process and respond to legitimate concerns that were brought to his attention yesterday during the committee hearing. Had we taken the time to address serious issues about the wording of this bill, Spectrum Services might not be facing the real possibility of closing their doors. Instead, it was clearly more important to hand the Governor a minimum wage bill he could tout during next week's budget address. Our vulnerable populations deserve better."
Nevins to IL GOP Leadership: Embrace party platform or step down
Domestic abuse account re-emerges on rising star IL Democrat Chris Welch
Live Free Or Die February 15, 2019 At 11:53 am
This action violates the Illinois constitution. Notice how the demoncrats deceived by changing the $15 from a living wage to a minimum wage.
The crap for brains commiecrats aren't satisfied with pushing the state of Illinois to the brink of bankruptcy, now the incompetent democrat socialist scum wants to bankrupt businesses by mandating a $15/hr wage. Only an oppressive gov't like a socialist state thinks they have the right to make business decisions for business owners.
This so called minimum wage mandate is nothing but another business tax, and it dang sure won't help Illinois business.
Hey state legislature, where in the Illinois constitution does it grant you the power to make business decisions for Illinois business owners? Hey state legislature why do you entice illegal aliens to come to Illinois which drives down wages, you know that supply and demand thing. Hey state legislature, why does your abject incompetence and financial failure of state gov't qualify you to tell business owners how to run their businesses? How can a state legislature tell businesses what they must pay employees when the state of Illinois is eight BILLION dollars behind on their bills to vendors/business owners? Hey state legislature, how can you tell businesses what wages they must pay, when the irresponsible and incompetent, overtaxing and over-regulating state govt has run up an unfunded debt that Moody's said is the true estimate of Illinois' unfunded state pension liability of $234 BILLION dollars? Hey worthless state legislature, how can you tell business owners what wage they must pay when your business & job unfriendly policies drive businesses and jobs out of the state. Not to mention the state population in 2018 dropped another 45,000 people. Hey state legislature, how can you justify telling businesses what wage they must pay. According to a recent report by Moody's Investors Service, Illinois' unfunded pension liabilities equaled 601% of the total state revenues in 2017, a U.S. record. The state's financial mismanagement makes it impossible to accept the socialist state legislature proposed minimum wage increase serious. The state legislature is the worst enemy we Illinois citizens have. We have the God given right to self-government and freedom from dictatorial rule.
The corrupt democrat controlled state legislature acts like they are the savior of the Illinois worker, but the reality is they are the worst enemy Illinois workers have.
Live Free Or Die February 15, 2019 At 12:10 pm
Illinois State Government is not the servant of the people but their tyrannical master and dictator.
Time for a new Illinois, demand your state rep co-sponsor HR 101
Fight for freedom from tyranny!
P M February 15, 2019 At 12:24 pm
Ah, J.B. is doing what I wanted: Punching the accelerator as Illinois drives off a fiscal cliff.
Soon it will all be over boys and girls. How long can the Trump economy hold off the next recession? We know it will be over when anyone else takes office so, give it a bit for the money to dry up after a recession hits, but Illinois maximum lifespan is about 7 years and likely lifespan in 3-5 years.
Awesome. Keep punching that accelerator J.B. I know some teachers I want to see crying when their pension millions evaporate before their eyes.
Bob February 15, 2019 At 12:25 pm
I see my Madigan bought and paid for representative is on the yeas list.
DL February 16, 2019 At 2:52 pm
Toilet-tax trained Pritzker was flushed with victory and said "Today is resounding victory for the 1.4 million Illinoisans…" but failed to mention it was a resounding defeat for 11.2 million tax-soaked Illinoisans.
Will Pritzker make this his personal song as more Illinoisans leave? Demoncrats always blame US, the citizens!
https://www.youtube.com/watch?v=xbfMlk1PwGU
Jorod February 16, 2019 At 5:21 pm
Democrats think that raising minimum wage will increase sales and income tax revenue. But they don't realize it will also increase payroll taxes and costs to business, especially small businesses that operate on small margins. Consumers are already hit by high taxes and high interest rates on parent student debt. As usual, this will backfire on democrats and maybe wise up people on the disadvantages of the welfare state that says burger flipping is a career. It will also hurt the most unskilled workers who will be priced out of the market. Students and part time workers will also be hurt. Democrats think it is immoral for the poor to work for a living. This will help manufacture more poor, ignorant and violent people. Viva the welfare State!
Hold the door February 18, 2019 At 6:03 am
J.B. has nothing to worry about if the reports are true that most of his money is stashed offshore.
Seriously, Pritzker may soon become the Governor Jon Corzine of Illinois politics.
If the democraps get away with this, they will have laid the foundation for a socialist-Communism Illinois gov't.
The democraps have no lawful authority to deny business owners the freedom to run their business and make themselves business partners of every business in the state. The Illinois state constitution states gov't is supposed to "secure the blessings of freedom and liberty to ourselves and our posterity"
Just how is it securing the blessings of freedom by way of this oppressive Marxist action?
Have you had enough of this power abuse from the corrupt democrat controlled state gov't? Then insist your state rep co-sponsor HR 101, the CHICAGO-51ST STATE resolution.

redpajama_set_name: RedPajamaCommonCrawl


text:
New Artsci Salon event: Revealing Neutrinos. Wednesday, November 11, 2015, 6:00-8:00 pm @ Fields
by @r0b3r7a | posted in: blog, events | 0
Dr. Hosale and Dr. Madsen will discuss the Art/Science processes of collaboration and the challenges in exploring the visualization and sonification of data sets collected at the IceCube Neutrino Observatory, a new type of telescope made from one cubic kilometer of ice starting one and half kilometers below the surface at the South Pole. Hosale and Madsen have been working regularly with each other since 2012 and have realized several projects including Quasar2 and 3, an international art/science panel discussion at Deutsches Museum in Munich, Germany, and a variety of education and outreach projects. Their current work is the product of a collaboration between the Wisconsin IceCube Particle Astrophysics Center and the nD::StudioLab at York University.
Mark-David Hosale Digital Media, School of the Arts, Media, Performance & Design, York University
James Madsen Physics, University of Wisconsin-River Falls
Wednesday, November 11, 2015, 6:00-8:00 pm
Rm 230, The Fields Institute for Research in Mathematical Sciences,
222 College Street, Toronto
IceCube 8 cubic foot LED volumetric display – Kathy M Helgeson/UW-River Falls
Mark-David Hosale is an artist and composer who use technology as a means of expression. Mark-David has a Ph.D. in Media Arts and Technology from the University of California. He is an Associate Professor in Digital Media in the School of Arts, Media, Performance, and Design at York University. He has had works exhibited and performed internationally at conferences, universities, and festivals; and has given lectures and taught at institutions in Denmark, The Netherlands, Norway, Canada, and the United States. His research and work explores the boundaries between the virtual and the physical world. Whether as part of an installation or performance work, the virtual spaces he creates are technologically transparent, sophisticated and virtuosic explorations of knowledge, time, and space.
Jim Madsen is the chair of the physics department at the University of Wisconsin–River Falls and an associate director of the IceCube Neutrino Observatory, where he leads the education and outreach team. He has deployed three times to Antarctica, and presented science talks on five continents. He enjoys providing opportunities to participate in astrophysics research that range from one-time talks for general audiences to extended research experiences for teachers and students, including field deployments at the South Pole.
The Labs
Wisconsin IceCube Particle Astrophysics Center (WIPAC)
The Wisconsin IceCube Particle Astrophysics Center, or WIPAC, is a scientific center within the Graduate School of the University of Wisconsin-Madison with faculty based in the Departments of Physics and Astronomy. Until December of 2011, WIPAC was known as the IceCube Research Center. Following construction completion of the IceCube Neutrino Observatory in December 2010, the mission, vision, and name of the center were revised to reflect the shift from IceCube construction to data analysis and encompass a broader range of particle astrophysics research interests. The main goals of the center still revolve around IceCube: maintaining and operating the detector to maximize data output and supporting the international collaboration in multiple ways. Other priorities include recruiting and developing gifted researchers, developing a national education and outreach program, and contributing to the field of particle astrophysics.
nD::StudioLab
Led by Mark-David Hosale, the n-D::StudioLab is a multi-purpose facility designed for the research and development of transmodal artworks based on worldmaking theoretical research based at York University. The n-D::StudioLab is an adaptable space that can accommodate Research-creation activities that include theoretical discourse, methodological development, and the production of works. The common foci of these activities explore questions and produce work in the areas of ArtScience, Media Art, and Interactive Architecture. While a distinction between theory, methods, and making can be helpful for discussion, in practice they are interrelated with the output of one activity being the catalyst of another. Since its inception in October 2011 the n-D::StudioLab has been involved in the research and development of several works that have been shown internationally, and contributed to published research with a number of collaborators.


Friday it was reported that U.S. Drillers added more rigs for the seventh straight week. For the past several months the commodity price of natural gas has been on a rollercoaster depending on the day and weather outlook however hoovering around $2.75 for a while now (spot price today @ 2.81).
North American exploration and production companies will spend one-quarter more this year, leading global spending growth among oil and gas companies. The biggest swing comes in North America, fueled by U.S. shale drillers, where spending had dipped by 38 percent in 2016, according to Barclays. Larger companies could boost spending by as much as 58 percent this year.
Range Resources- $1.15 billion increased budget for 2017 with 2/3 allocated to Marcellus Shale and 1/3 to N. Louisiana. An estimated 80% of the Marcellus budget is directed to drilling.
Rice – $1.04 billion on drilling completions for Marcellus and Utica plays with and an additional $225 million for land acquisition. Rice's Marcellus' wells costs $7.4 million vs. Utica at $13 million.
EOG – Is projected to spend $3.7 billion to $4.1 billion for 2017.
And this is just a few of the companies that we know have disclosed their 2017 budgets with the prospective allocation where the funds are committed. Even though budgets have greatly increase for 2017 companies are concerned that operating costs and the uncertainly of the commodity price could still bring drilling about at a slow pace. Stay tuned and stay connected for updates with ShaleDirectories.com.


The electronic election for six Director-at-Large positions and for the modifications of by-laws previously approved by the NACS Board is now complete.
were elected to four-year terms as Directors-at-Large from 11 candidates. They will be seated as NACS Board members at the start of the NAM23 meeting on June 2, 2013. Umit Ozkan (The Ohio State University), as the candidate with the next higher voter count, will be serving as Alternate Director-at-Large. This is not a Board position, but the Alternate would succeed a DAL in case any of the elected DAL is unable to serve.
The proposed modifications to the by-laws were approved by a vote of 338 to 7.
Votes were recorded from 590 of 1954 members of the North American Catalysis Society.
The electronic ballots were collected, recorded, and certified by Creative Scanning Solutions, Inc. an independent organization contracted by the North American Catalysis Society for this purpose.
Published on April 12, 2013 . Posted in News and tagged by-laws, director-at-large, X elections.


The week leading up to St. Patrick's Day saw the 20th Anniversary of the Craic Fest, a music and film fest featuring the best of independent film and music from Ireland. I went along to see a day filled with a broad range of new films spanning the amazing talent currently coming out of the Irish Indie film scene.
First up was the documentary Pota Óir from filmmaker Anthony White on the Irish traditional band Kila. A cannily shot inside look into the incredible stage energy of this long-time Irish staple, it follows the band on tour and in rehearsals and in interviews. It's a great peek into the amazing energy of this seminal trad phenomenon which has been gracing stages around the world and Ireland for 30 years now.
Giving a broad range of concert footage, the film highlights the power and ambiance of their shows, from the plaintive instrumental solos to the wild frenzy of their upbeat numbers. There was a great feeling of the camaraderie of the band and their loyal fans who are an integral part of their performances. Growing out of White's own interest in their music, there is a great fan's eye given to the look and feel of the film, capturing those moments that every fan would love to see. As someone who has followed the band for most of their 30 years, I was thrilled to see some songs played in their entirety, something which is sorely overlooked in the more MTV-driven modern editing style. The film is currently being screened around the world and I hope it will find a home for folks to see it soon in a cinema near you or online. Until then you can find out more information here: Kila Pota Oir.
Following were two films from the collaboration of Irish actor John Connors and filmmaker Mark O'Connor. First up was the film Stalker which stars Connors as a homeless man forging a relationship with a young kid in inner-city Dublin. A gritty, yet at times poignant tale of a man living on the street and his interactions with a kid, played by Barry Keoghan whom he tries to rescue from the clutches of his evil uncle played by Peter Coonan. You may know Connors from his work on the hit TV show Love/Hate, (which also helped make stars of Keoghan and Coonan) or his viral acceptance speech at this year's IFTA awards for the lead role in his semi-autobiographical film Cardboard Gangsters. This was quite a departure for him, having mostly played hardened and gruff hitmen and heavies, and here he is a soft and almost poetic soul trying to struggle with his own demons and do good. Meanwhile he ends up surrounded by not so savory folks, who definitely don't have the best of intentions. It's a thrill ride of a film that packs quite a punch at the end.
Next up was Cardboard Gangsters the award winning semi-autobiographical tale penned by O'Connor and Connors and starring Connors as a DJ turned thug in the North Dublin town of Darndale. I loved the flow of this story and the characters that gave at true flavor of the comedy and tragedy that are a part of the story of getting swallowed up in the drug culture and treachery surrounding them. Just a regular gang of lads who happen into dealing nearly by accident, the story follows them through the partying, violence, and deception that become part of their lives. But they never seem to lose their humanity in this piece which shows their flaws and allows them to laugh at themselves as well. Available now on Irish Netflix, hopefully it will be available to US audiences soon. I got to chat with Connors later that week and part of that interview will come in a future NYIrishArts podcast.
The final film of the day was the U.S. premiere of Shelter Me : Apollo House. A documentary produced by Jim Sheridan and shot by Zahara Moufid, of the activist take-over of a vacant NAMA building over the Christmas period of 2016 into 2017 to house the homeless in Dublin. It follows the activists as they plot how to go about taking over the building and the outpouring of help coming to them from all over Dublin.
Featured in the film are Glen Hansard, Dean Scurry, Jim Sheridan as well as host of other volunteers who help plan, coordinate and manage the massive effort to give a respite to the homeless people living on the streets of Dublin. The film follows them as they wrangle all the supplies, getting lights on and beds ready, as well as providing meals and arranging signage and connecting the people with services that will help them locate more amenable accommodations for the future.
Even though the effort was only successful for a few weeks, it was an amazing wake up call to the people of Ireland and has helped to feed the ongoing discussion and action currently going on to try and solve this problem countrywide.
All of these films made for a great day's entertainment, and I would recommend going to see them if and when they reach a theatre near you!


We are pleased to announce we are back at Wickersley School & Sports College this Easter break for more action packed Holiday Camps. We have a wide variety of camps available from GK, Girls only, Mainstream plus more!
Our Holiday Camps give children the chance to interact with each other, enhance their footballing skills through training and matches, all this can be done whilst having fun and keeping active.
If you would like to book on to our holiday camps, please select the preferred course above where you will be taken to our official online booking system, alternatively please contact sportdevelopment@rotherhamunited.net or phone the Sport Participation team on 01709 827767.


text:
Q: Bootstrap : change dynamically radio button color I have bootstrap radio buttons :

            <input type="radio" class="custom-control-input"....

I would like to change the color whenthe form is validated. I tried color, background-color, border, outline...nothing works.
tried to add the bootstrap btn-danger class...nope.. even the word important.

Is there a way to change the color of the button dynamically (meaning by adding a class with jquery addClass) ?

A:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

                <input type="radio" id="customRadio1" name="customRadio" class="custom-control-input">
                Red on click!

A: Maybe Bootstrap styles overwrite your styles.
So you can have !important in css Style that element get your styles only.
for exapmle
input
{
  backgorund-color : black !important;
}

A: when your form validation is true, add active class on custom-radio class
 $(".custom-radio").addClass("active")

and put this css in your css
.custom-radio.active .custom-control-input:checked ~ .custom-control-label::before {
    color: #fff;
    border-color: #df1895;      //desired color
    background-color: #df1895;  //desired color
}

A: With some help from the others, I found the answer. You just have to add this css rule :
.active:checked~.custom-control-label::after {
    background-color:red;
}

after adding "active" class to your input.

redpajama_set_name: RedPajamaStackExchange


Predictions in the New York Times and elsewhere were that the US Supreme Court could trend left at the end of its session. They weren't far off, with four out of the six major decisions cheering liberals.
History–like all human endeavors–is complex and often individual nuances are lost in the overarching context of a given time. The complexities of our history are not being adequately reflected in the ongoing debate over Confederate imagery, at least in part, because the symbols themselves are not capable of representing them fully.
There are currently five declared Democratic Party candidates for each of Maryland's 4th and 8th Congressional Districts and twelve Republican Party candidates for president. We can expect more candidates to announce soon for these and other competitive primary elections. The way we in the USA usually select a winner in such multi-candidate, single winner contests is unlikely to select the most popular candidate. There are alternatives methods for electing candidates that more accurately reflect the electorate's preferences.
The Washington Post's ongoing jihad against American workers continues with its latest [June 10] unrestrained attack on critics of the Trans Pacific Partnership (TPP).


Parfois was founded in 1994 in Porto, Portugal. In creation of the brand took an active part Manuela Medeiros, whose desire was to create a fashionable and original women's accessories. The popularity of Parfois confirmed by large number of brand shops, all about 650 stores in 60 countries. Without a doubt, for any fashionista in Parfois could be found an accessory according to her taste, which will emphasize the individuality of the owner and will create a magical image. Parfois is created for stylish women who prefer originality and quality at an affordable price.


text:
Search University
Long Island Business Institute
Long Island Business Institute in Flushing
This is the page with old design. Go to the new design of that page
Private for-profit, 2-year
Degree-granting
Download Long Island Business Institute Whitepaper!
Download all the data in PDF
Don't want to waste time? Make your decision based on facts and numbers!
Download the PDF with FULL information about the Long Island Business Institute from opened government trustful sources - right now!
All the contact information, academic programs, admissions and much more are available in the PDF file - click on the button below!
Whitepaper Download
Average Annual Cost
Location & Website
Long Island Business Institute offers 29-degree programs. Student-to-faculty ratio is 12:1. 1 high safety campus. 31.9% are women, and 68.1% are men. 6% percents of international students. The average annual total cost of attendance at Long Island Business Institute is 14796$, that is above national average. 25% of full-time Long Island Business Institute students completed their education in 150 percent of time: graduation rate is at the level of national average. Average salary after attending is $16,500, so if you studied 2 years, you'll get your funds back in less than 2 years.
Average annual cost includes tuition and fees, books and supplies, and living expenses, minus the average grant/scholarship aid. Separate metrics have calculated for different institutions depends on calendar system and sector of the establishment (public or private).
The Long Island Business Institute is a private and academic-year institution, so it's net price represents an average of all programs and includes only undergraduates who first enrolled in the fall term and receive Title IV aid. The total cost of attendance depends on whether undergraduates live on campus, off campus (not with family), or off campus (with family).
By Family Income
Depending on the federal state, or institutional grant and available, Long Island Business Institute students in your income bracket may pay more of less than the overall average costs.
Family Income
$0 - $30,000 $15,289
$30,001 - $48,000 $14,699
$75,001 - $110,000 $10,470
$110,001+ $14,020
Typical room charge for academic year: -
Typical board charge for academic year: -
Combined charge for room and board: -
In-district
Percent of students with financial aid
Types of financial aids
436 of Long Island Business Institute undergraduate students were awarded with some type of financial aid, it's 100 percents of all undergraduate students. This makes Long Island Business Institute number 233 in the amount of financial aid awarded to students among all educational institutions in New York.
Students at Long Island Business Institute awarded 5 types of loans or aids, the biggest percent of students received a federal, state, local or institutional grant aid.
Salary After Attending
According to College Scorecard Data from U.S. Department of Education
Academic/career counseling service
Employment services for students
Living & meal
Full-time, first-time degree/certificate-seeking students required to live on campus
Institution provide on-campus housing
Institution provides board or meal plan
Veteran Services Available
Yellow Ribbon Program
Dedicated point of contact for support services for veterans, military servicemembers, and their families
Percent indicator of undergraduates formally registered as students with disabilities
Does not offer distance education opportunities
Alternative tuition plans
Any alternative tuition plans offered by institution
Tuition payment plan
Tuition payment plan - a program that allows tuition to be paid in installments spread out over an agreed upon period of time, sometimes without interest or finance charges.
Special learning opportunities
Here are the learning opportunities available in Long Island Business Institute.
Weekend/evening college
Weekend/evening college allows students to complete courses and attend classes only on weekends or only in evenings.
Long Island Business Institute graduation rate is below the national average.
25% of full-time students enrolled for the first time to Long Island Business Institute completed the education program and got a degree in 150 percent of the expected time of completion.
The graduation rate value includes only programs that were completed less than six years for four-year degrees or less than three years for two-year degrees.
Graduation rate is the percentage of institution's new-entering, first-time, first-year undergraduate students who complete their program within 150% of the published time for the program. Graduation rate excludes a huge number of students. This index doesn't take into account students of nontraditional enrollments - part-time students, students who enroll mid-year, and who transfer from one institution to another. So graduation rate alone can create a misleading picture. Completion rate in the form of total number of students receiving any types of awards/degrees creates a complete picture. Combining this data with graduation rate is a better way to compare educational institutions.
The student-to-faculty ratio at Long Island Business Institute is 12:1, that means that for every 12 students the institution has one professor, lecturer or specialist with a degree in education. Lower student-to-faculty ratio is better - it means that professors can dedicate more time and attention to each student.
Men/Women
Number of international students
Percent of international students
Race/ethnicity breakdown
Total ethnicity
Men ethnicity
Women ethnicity
Students enrollment in distance education
In Long Island Business Institute the biggest percent of students are enrolled in on-campus courses.
Distance education location breakdown
Here are the students enrolled exclusively in distance education courses at Long Island Business Institute and grouped by their location. Distance education courses are the most popular for students located in not reported location.
The percentage of crimes on Flushing Campus
The campus located by 136-18 39Th Avenue, Fifth Floor address in Flushing, New York.
Flushing Campus in comparison of all branches in the US. It is calculated as the average percent of crimes yearly by five years of data for every campus, based on an overall number of students studying there. The branch is a part of Long Island Business Institute with 0.25% of maximum crimes a year. The only type of crimes detected on Flushing Campus is burglary.
Number of degree programs offered
Long Island Business Institute offers 29 programs in total: 20 are for Associate's degree, 6 - for 1-year, but less than-2-year certificate programs, and 3 are 2-year, but less than 4-year certificate programs.
This is one of the lowest number of programs in comparison with other 30 universities in Queens county. Long Island Business Institute is one of the few institutions in Queens that offers an Associate's degree program.
Total credit/contact hours
Here you can find the data on instructional activity in measured in total credit and/or contact hours delivered by institutions during a 12-month period. Also we shown the New York state average data to help you compare.
Long Island Business Institute provides coursework for undergraduate students оnly.
In 2014-2015 academic year estimated full-time equivalent undergraduate enrollment was 730 students with 657079 сontact hours for 12-month instructional activity period.
TOP 5 Popular Majors
The most popular majors counted as percentage breakdown of degrees awarded in every single discipline in Long Island Business Institute
24% — Business, Management, Marketing, and Related Support Services
11% — Business Operations Support and Assistant Services
7% — Business Administration, Management and Operations
6% — Homeland Security, Law Enforcement, Firefighting, and Related Protective Service
6% — Homeland Security
Give feedback about Long Island Business Institute
Thank you for your feedback! We'll moderate the review and publish it here.
Tell us what you think about Long Island Business Institute:
Overall Rating: *
Your First Name: *
Current StudentFormer Student (Did not Graduate)Alumnus (Graduate)Professor / FacultyProspective StudentParent of StudentOther
Professors / Faculty:
Campus Atmosphere:
Dating and Social Life:
Party and Bar Scene:
Student Reviews and Ratings for Long Island Business Institute
Elliot Katzsecon
Do not patronize any product or service complicit in full-page android popup attacks
Source of the review: Google Places, Google Maps™
Fer grensecon
Terrible environment, unprofessional, just-in-it-for-the-money attitude, mediocre at best, education is not even an afterthought. Just another NYC scam. Go to CUNY. Don't waste your time there.
Liu baohangsecon
In LIBI learning time, I had a very happy. I really like the teaching style of the school, and the teacher is very good to us.
ly leesecon
I graduated from school with Associate degree with GED.I really like LIBI offer a good quality of education, financial aid .All faculty provide students with a good service. Through the job placement of introduction, I find a stable job.
Sara Jiangsecon
LIBI is a nice school to study skills to help us to find a better job. Its employees are kind; when I need help, they try their best to help me.
Address: 136-18 39th Avenue, Fifth Floor
Calendar system: Semester
General Phone Number: +7189395100
Institution is active in current year: 1
Institution's internet website address: libi.edu
Financial aid office: Go to the page
Admissions office: Go to the page
Online application: Go to the page
Net price calculator: Go to the page
Veterans and Military Service members tuition policies: Go to the page
Student-Right-to-Know student athlete graduation rate: Go to the page
More colleges and universities in Queens county
New York Medical Career Training Center
Graduation Rate: 93%
Acceptance Rate: 0%
Setting: City
Grace International Beauty School
Berk Trade and Business School
Yeshiva Shaar Hatorah
New Life Business Institute
More colleges and universities in New York state
Finger Lakes School of Massage
Mt. Kisco, NY
Setting: Suburb
New School of Radio and Television
The Collective School Of Music
Thank you for your feedback! % of people found this helpful
SAT Converter
Win 2000$ scholarship from Search.University
Search.University provides you with a huge choice of colleges and universities from the US. We are trying to publish the most accurate and actual information as we could. If you found a mistake or know what to add - do not hesitate to contact us by [email protected]
Please note that Search.University is not affiliated with any institution and delivers information from opened and trustful sources.
Cerritos College
Austin Community College District
Popular Universities
University of Washington-Bothell Campus
K-12 Private Schools
(C) 2017 Search.University All Rights Reserved.


text:
CRAFT YOUR JOURNEY
Bespoke Journeys
hello@kamalan.travel
i want to travel Browse travel guides, journeys and itineraries
i want to read Delve in narratives, travelogues and musings
ArtsPerforming Arts, Fine Arts, Contemporary Arts
CuisineFeasts, Staples, Spices & condiments, Desserts, Beverages
History & ArchitectureClassical Period, Medieval Period, Colonial Period, Modern Period, Contemporary Spaces
Crafts & DesignTextiles, Handicrafts, Jewellery, Contemporary Design Workshops
Religion & CommunityWorship, Festivals & Events, Community
Nature & WellnessYoga & Meditation, Ayurveda & Healing, Wildlife, The Outdoors
North IndiaDelhi, Rajasthan, Jammu and Kashmir, Uttar Pradesh, Punjab, Himachal Pradesh, Uttarakhand, Haryana
South IndiaKerala, Tamil Nadu, Karnataka, Andhra Pradesh, Telengana, Lakshadweep, Andaman and Nicobar Islands
East IndiaWest Bengal, Sikkim, Assam, Orissa, Meghalaya, Nagaland, Mizoram, Arunachal Pradesh, Manipur, Tripura, Bihar, Chhattisgarh, Jharkhand
West IndiaGujarat, Maharashtra, Goa, Madhya Pradesh
March - June
Summer sets in, humid in the plains and by the seaside, pleasant in the hills
July - SeptemberThe monsoons arrive with strong winds and heavy rains, especially in the coastal regions
October - NovemberAs autumn descends, the heat and the rain wane across the country
December - February
Winter brings with it snow in the north and a pleasant wind in the south
StoriesTales and memories of India collected over time
VisualsIllustrations of sagas discovered and cherished
ProjectsCollaborations done with creatives from around the world
PARADISE MUST BE GAINED
Far from the maddening crowd, out of the beaten track, a journey to the Andaman brings the traveller to the end of the world, as close as possible to paradise. But, paradise must be gained. My friend Lisa had just come back from her trip to India and wanted to have us all over for an exotic dinner and the inevitable slide show. Both Lisa and her husband Michael are so fond of India; I believe they have visited every nook and cranny of it. This time they had travelled as far East as possible in India; they had flown to the Andaman Islands, nearer to Thailand than to the South East coast of the country.
Lisa's proficiency in Indian cuisine is legendary among our friends; we all have favourites: Mark swears by her yellow daal, the cream of lentils; Joan prefers the spicy aloo-gobi, potatoes and cauliflower; Paul and I always ask for baingan bharta, the best eggplants we ever had. If the vegetarian dinner is a good enough incentive for us to visit, the slide projection and the tales of their journeys always make for excellent entertainment.
As soon as the dinner is over, the projector is on, and Michael declares: "Paradise must be gained." Before we can even start wondering what he means, he explains how long it takes to reach the Andaman Islands from the United States. The shortest way from New York to Chennai, flying through Dubai, takes 18 hours and 30 minutes. "Once there, we spent a few days in Mahabalipuram, strolling through the beautiful sculptural complex on the beach and recovering from jet lag. We then headed on to Port Blair, the capital of the Andaman Islands. The flight lasted only an hour and a half, but once in Port Blair, we had to spend the night waiting for the boat that would take us to Havelock Island.
Port Blair is a charming sea town, known in India for the infamous jail where the British kept the freedom fighters. We chose to skip the visit to the jail, now transformed into a museum, but we learned a lot about the islands and the tribal populations that still inhabit some of them from a visit to the anthropological museum. By then we couldn't wait any longer. We wanted to arrive in Havelock, where our kamalan agent had reserved a Nilambari hut at the Barefoot Resort, a very promising name for weary city dwellers.
After a two-and-a-half-hour journey, our boat reached the port at Havelock, and we immediately enjoyed the atmosphere. Newly-wed couples on honeymoon carrying much too heavy luggage, entire Bengali families speaking their sweet language that sounds like bird songs, businessmen wearing a white cloth wrapped around their hips and a crisp white short-sleeved shirt. While the jeep was driving through the narrow lane winding through the island, Lisa and I looked at each other, smiling in anticipation. All around us, lovely countryside, huge trees, a few farmers stuck in bucolic times; no cars, no noise. The sheer simplicity of our hut made us happy. We dressed lightly and walked out, immediately longing to see the most beautiful beach in Asia, according to the Times magazine.
It was sunset when we laid eyes on Radhanagar beach. We just stood unable to utter a word, spellbound by the pristine scenery. We walked silently on the fine sand and felt our breath slow down. The days that followed were just perfect. We swam, we drove around the island on a small motorcycle, we met a kind population, we snorkelled, and we learned diving. Wherever we were, on land or in the sea, the beauty that surrounded us made us believe we were in paradise. Thank God that paradise is not so near; otherwise, it would be at risk of becoming crowded."
While driving back home, my eyes filled with images of the blue lagoon, extravagant marine fauna, and divine sunsets, I said to Paul: "Do you think we could travel there for a couple of weeks next winter?" "Why not?" he answered, and I felt serene and happy, knowing that we too would soon be heading for paradise.
Of Vanaras and God-Kings: Tales of Hampi's Ruins
Myth and legend are part of the fabric of the Indian subcontinent. Nowhere is this more apparent than in Hampi, the ruins...
Narrative • South India
Unified by Fire
The thin line between private and public can be almost invisible in India as compared to other places in the world...
Where Desert Meets the Sea
A classic journey to India's west, sojourning the major cities and towns of Maharashtra and Gujarat...
Bespoke Journey • West India
Kingdoms of Old
This journey traces heritage through the remnants of the dynasties that ruled Madhya Pradesh from ancient times till the present...
White sandy beaches separate crystal clear azure waters from lush curtains of rainforest green...
Hotel Guide • South India
At the edge of the Desert
Sand easily overtakes the careless traveller. Grain by grain, it squeezes slowly between tight lips, it threads its way through...
Narrative • North India
PLEASE SHARE YOUR DETAILS
Region(s) you wish to travel to
Theme(s) for your experience
History & Architecture
Crafts & Design
Religion & Community
Nature & Wellness
How long would you want to travel?
Upto 1 week
How much would you like to spend per day?
What type of accommodation would you prefer?
Contemporary & Boutique
(Modern stays with unique design sensibilities offering the best of comforts)
(Traditional mansions, palaces, and houses restored into heritage stays)
(Stays set in picturesque environs, the perfect choice for those seeking to unwind)
Our Pathfinders will tailor this story for you. Please share your details on the form below and we will get back to you promptly.
Thank you for joining the kamalan community. You shall receive stories from the nooks and crannies of India. In order to ensure our stories find their way to you, please confirm your subscription once the email reaches you.
CRAFT THIS JOURNEY
Our pathfinders can help you curate an experience similar to this story for you.
contact via email ID phone
travelling with family friends other
Immerse yourself in a bespoke cultural experience tailored to your interests by our Pathfinders
KAMALAN NEWSLETTERS
These letters are a way for us to keep in touch with you with an essential curation of Indian culture.
KAMALAN DIGEST The Indian Travel Craftsman shares with you glimpses of India as seen through the eyes of a traveller.
KAMALAN COLLABORATIONS India is a land full of stories waiting to be told by people across the world. Keep in touch with our travels with the Kamalan Collaborations Newsletter.
We use cookies to ensure that we give you the best experience on our website. By using this website, you agree to our use of cookies. However, if you would like to, you can change your cookie settings anytime. Read our Privacy Policy x


The couple might have kept their relationship largely out of the spotlight, but they looked blissfully happy as they were pictured together at LAX airport.Sean Bean arrives in LA with his future wife Ashley Moore Both had dressed casually for the long-haul flight; Sean wearing jeans, a T-shirt and a flat cap, and former nanny Ashley in jeans, a shirt and a coat embroidered with flowers., Tristan Loraine's movie based on his own experiences as a British Airways captain. as well as a public enquiry in Britain from its story about contaminated air supplies on commercial airlines.Loraine, who was retired from flying service on medical grounds, is taxiing the project towards takeoff after spending more than two years developing the script. Loraine's production banner Fact Not Fiction Films is mounting the fiction movie with backing from private investors. The public has been kept in the dark long enough." Shooting is scheduled to start in June this year.Then, in 1990, he tied the knot with actress Melanie Hill, and together they welcomed two children, daughters Lorna and Molly, before splitting in 1997.In November of that same year, he wed actress Abigail Cruttenden, who he had met on the set of TV series .Sean Bean and his future wife, Ashley Moore, touched down in LA together this week – a rare public sighting of the couple.The 55-year-old actor is about to start promotional duties for his new film, , and arrived in California with his fiancée, 29, by his side.
The actor's decision to pop the question came as a surprise to many, given that he had previously stated he would not tie the knot again.
Speaking to the Croatian magazine Sean Bean is believed to have proposed to Ashley in December Sean was first married from 1981 to 1988 to his high school sweetheart Debra Jones.
It was reported in December that Sean had proposed to Ashley – which would mean he is set to walk down the aisle for a fifth time.
And sure enough, Ashley could be seen with a ring on her engagement finger.
Billed as a fact-based investigative thriller, the script tells the story of an air traffic controller who is suspended following a serious in-flight incident. Marina has taken a real interest in the issues highlighted within the film for many years." Lorain's investigative documentary taxied into U. theaters in 2008 and sparked media coverage in Australia, the U. Loraine said: "This film is a true thriller that will not only entertain but will open the public's eyes to some uncomfortable facts.
When his journalist wife (Sutcliffe) starts to ask questions, she uncovers a disturbing succession of cover-ups dating back to 1954. Sutcliffe said: "If this film serves to uncover serious air safety issues, it will have succeeded in its purpose. " Sirtis added: "We all fly, and I want to play my part in making air travel safer by being part of this film." Co-screenwriter Viv Young said: "We are delighted and honored that Marina Sirtis will be briefly coming back to the U.


text:
DHA-enriched formula boosts infant brain development
Related tags: Infant formula, Docosahexaenoic acid, Nutrition
Feeding babies formula enriched with the omega-3 fatty acid DHA may enhance their cognitive skills, compared to babies fed non-enriched formula, says a new study.
A dose of 0.36 per cent DHA (docosahexaenoic acid) was necessary to produce superior problem solving performance, according to findings published in Child Development.
"Given that performance on means-end problem solving is correlated with later IQ and vocabulary, this implies that the cognitive benefits of DHA supplementation might persist well beyond infancy," wrote the researchers, led by James Drover, formerly of the University of Texas Southwestern Medical Center, and now at Memorial University in Canada.
The study used Mead Johnson Nutritionals' commercial Enfamil with iron infant formula, with or without DHA (0.36 per cent) and ARA (arachidonic acid, 0.72 per cent). The DHA, ARA-containing formulas contained Martek's single-cell oils, DHASCO and ARASCO.
"Currently, there is no clear consensus on whether infant formula should be supplemented with DHA," said Drover. "However, our results clearly suggest that feeding infants formula supplemented with high concentrations of DHA provides beneficial effects on cognitive development."
Infant formula is a highly emotive area, with watchdogs keeping a close eye on companies' marketing tactics lest they drift towards promoting their products as preferable to breast-feeding.
While it is agreed that breastfeeding is the best way to ensure an infant receives the nutrients it needs in its first months, formulas are indispensable in cases where mothers are unable to feed their children - be it for health or logistical reasons. Mothers' desire to give their children the best possible start in life means that there is scope for fortification.
The study, funded by the Eunice Kennedy Shriver National Institute of Child Health and Human Development, followed 229 infants. Babies were randomly assigned to receive either formula supplemented with DHA or traditional infant formula. The babies were given the different formulas either shortly after birth, after 6 weeks of breastfeeding, or after 4 to 6 months of breastfeeding. At nine months of age the babies were given a problem-solving test.
Infants who started receiving the DHA-enriched formula shortly after birth were more successful on the tests, with a 51 percent success rate, compared to only 29 percent for children who received the traditional formula. Furthermore, children given the formula after 6 weeks of breastfeeding also performed better than their counterparts not given the DHA-enriched formula (46 compared to 13 per cent).
Industry welcome
The research was welcomed by fatty acid supplier Martek. A spokesperson for the company told NutraIngredients-USA.com that the study is "significant because it adds to the already strong body of research supporting the important benefits of DHA and ARA for infants.
"Many studies have shown that compared to infants fed formula not supplemented with DHA and ARA, infants fed formula supplemented with DHA and ARA exhibit health benefits like improved mental development and better visual acuity. This body of research has led experts at leading medical institutions, research organizations, regulatory and government agencies across the world to note that DHA and ARA are important nutrients for infant health.
"Human milk represents the optimal form of infant nutrition and Martek agrees that breastfeeding is the best method of feeding infants. However, those parents who need or choose formula should have access to the most nutritionally optimal formula available," said the spokesperson.
The company's DHA and ARA are found in 99 percent of infant formulas on the U.S. market, in formula in more than 75 countries around the world. "We believe that research like this will help to support the importance of DHA and ARA to infant nutrition and help to ensure that even more infants worldwide receiving infant formula will benefit from these vital fatty acids," added the spokesperson.
Source: Child Development
September/October 2009, Volume 80 Issue 5, Pages 1376-1384
"Three Randomized Controlled Trials of Early Long-Chain Polyunsaturated Fatty Acid Supplementation on Means-End Problem Solving in 9-Month-Olds"
Authors: J. Drover, D.R. Hoffman, Y.S. Castaneda, S.E. Morale, E.E. Birch
Related topics: Research, Omega-3, Omega-3s & Nutritional oils, Cognitive function, Maternal & infant health
Study identifies novel antioxidants in human milk
Omega-3 infant formula complaint not scientifically sound, says expert
DHA and eye health: Study supports omega-3 in formula
Martek goes vertical with $200m acquisition
NEW Clinical results showing improvement of working memory
Nexira | 28-Oct-2019 | Technical / White Paper
Cognivia™ is a unique synergistic combination of organic sage leaf extract and encapsulated essential oil. The new clinical study on Cognivia™, assessed...
Advanced Organic Materials (AOM) | ExcelVite Sdn. Bhd. | Fermentalg | Gemini Pharmaceuticals | Jennewein Biotechnologie GmbH | KGK Science, Inc. | Lallemand Health Solutions. Quality Probiotics. Complete Solutions. | MeriCal, LLC | Natreon Inc. | Naturex | NP Nutra (Nature's Power Nutraceuticals Corp.) | Nutrition 21: Leading Developer of Clinically Substantiated Ingredients | Phenolaeis | Stratum Nutrition
By BASF2'-FL: Mother's gift for digestive health across life stages
By IFF Health Sharp●PS - A partner for the growing nootropic market