text:
package wisekb.agent.oz;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import com.sun.net.httpserver.HttpServer;
import org.apache.oozie.service.JPAService;
import org.apache.oozie.service.Service;
import org.apache.oozie.service.ServiceException;
import org.apache.oozie.service.Services;
import org.apache.oozie.util.XLog;

import javax.persistence.EntityManager;
import javax.persistence.Query;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.sql.Timestamp;
import java.util.*;
import java.util.concurrent.Executors;

public class JpaNativeQueryExecutorService implements Service {

    private static XLog LOG;

    private Properties config;

    private JPAService jpaService;

    private ObjectMapper objectMapper;

    private HttpServer httpServer;

    @Override
    public void init(Services services) throws ServiceException {
        LOG = XLog.getLog(JpaNativeQueryExecutorService.class);
        objectMapper = new ObjectMapper();
        jpaService = services.get(JPAService.class);

        loadConfig();

        if (!checkFunction()) {
            makeFunction();
        }

        startServer();

    }

    @Override
    public void destroy() {
        httpServer.stop(0);
    }

    @Override
    public Class<? extends Service> getInterface() {
        return JpaNativeQueryExecutorService.class;
    }

    private void loadConfig() {
        config = new Properties();
        try {
            config.load(getClass().getResourceAsStream("/config.properties"));
        } catch (IOException e) {
            config.setProperty("port", "31000");
            e.printStackTrace();
        }
    }

    private boolean checkFunction() {
        boolean result = false;

        EntityManager entityManager = jpaService.getEntityManager();
        try {
            entityManager.getTransaction().begin();
            Query query = entityManager.createNativeQuery("SELECT DATE_TRUNC('hour', CURRENT_DATE)");
            Object queryResult = query.getSingleResult();
            result = true;
        } catch (Exception e) {

        } finally {
            entityManager.getTransaction().rollback();
            if (entityManager.isOpen()) {
                entityManager.close();
            }
        }

        return result;
    }

    private void makeFunction() {
        EntityManager entityManager = jpaService.getEntityManager();
        try {

            String makeFunctionQuery = "DELIMITER //\n" +
                    "create function date_trunc(vInterval varchar(7), vDate timestamp)\n" +
                    "  returns timestamp\n" +
                    "  begin\n" +
                    "    declare toReturn timestamp;\n" +
                    "\n" +
                    "    if vInterval = 'year' then set toReturn = date_add('1900-01-01', interval TIMESTAMPDIFF(YEAR, '1900-01-01', vDate) YEAR);\n" +
                    "    elseif vInterval = 'quarter' then set toReturn = date_add('1900-01-01', interval TIMESTAMPDIFF(QUARTER, '1900-01-01', vDate) QUARTER);\n" +
                    "    elseif vInterval = 'month' then set toReturn = date_add('1900-01-01', interval TIMESTAMPDIFF(MONTH, '1900-01-01', vDate) MONTH);\n" +
                    "    elseif vInterval = 'week' then set toReturn = date_add('1900-01-01', interval TIMESTAMPDIFF(WEEK, '1900-01-01', vDate) WEEK);\n" +
                    "    elseif vInterval = 'day' then set toReturn = date_add('1900-01-01', interval TIMESTAMPDIFF(DAY, '1900-01-01', vDate) DAY);\n" +
                    "    elseif vInterval = 'hour' then set toReturn = date_add('1900-01-01', interval TIMESTAMPDIFF(HOUR, '1900-01-01', vDate) HOUR);\n" +
                    "    elseif vInterval = 'minute' then set toReturn = date_add('1900-01-01', interval TIMESTAMPDIFF(MINUTE, '1900-01-01', vDate) MINUTE);\n" +
                    "    END IF;\n" +
                    "\n" +
                    "    return toReturn;\n" +
                    "  end//\n" +
                    "DELIMITER ;";

            entityManager.getTransaction().begin();
            Query query = entityManager.createNativeQuery(makeFunctionQuery);
            query.executeUpdate();
        } catch (Exception e) {

        } finally {
            entityManager.getTransaction().rollback();
            if (entityManager.isOpen()) {
                entityManager.close();
            }
        }
    }

    private void startServer() {
        try {
            httpServer = HttpServer.create(new InetSocketAddress(Integer.parseInt(config.getProperty("port"))), 0);
            httpServer.createContext("/getWorkFlowJobByDate", new HttpHandler() {
                @Override
                public void handle(HttpExchange httpExchange) throws IOException {

                    EntityManager entityManager = jpaService.getEntityManager();
                    try {
                        entityManager.getTransaction().begin();

                        Map requestMap = parseRequestBody(httpExchange.getRequestBody());

                        List<String> parameters = Arrays.asList("datetime");

                        String responseText = "";

                        httpExchange.getResponseHeaders().set("Content-type", "application/json; charset=UTF-8");

                        if (parameterCheck(requestMap, "datetime")) {
                            long timestamp = Long.parseLong(requestMap.get("datetime").toString());
                            Calendar calendar = Calendar.getInstance();
                            calendar.setTimeInMillis(timestamp);
                            int year = calendar.get(Calendar.YEAR);
                            int month = calendar.get(Calendar.MONTH) + 1;
                            int day = calendar.get(Calendar.DATE);

                            Query query = entityManager.createNativeQuery(
                                    "select * " +
                                            "from WF_JOBS where round(extract(YEAR FROM start_time)) = ?1 and " +
                                            "round(extract(MONTH FROM start_time)) = ?2 and " +
                                            "round(extract(DAY FROM start_time)) = ?3 " +
                                            "order by start_time desc", Map.class);

                            setQueryParameters(query, year, month, day);

                            List resultList = query.getResultList();
                            entityManager.getTransaction().commit();

                            responseText = objectMapper.writeValueAsString(resultList);
                        } else {
                            getParameterRequiredMessage(parameters);
                        }

                        httpExchange.sendResponseHeaders(200, responseText.length());
                        OutputStream out = httpExchange.getResponseBody();
                        out.write(responseText.getBytes());
                        out.flush();
                    } catch (Exception e) {
                        e.printStackTrace();
                        entityManager.getTransaction().rollback();
                    } finally {
                        if (entityManager.isOpen()) {
                            entityManager.close();
                        }
                    }
                    httpExchange.close();
                }
            });

            httpServer.createContext("/getWorkFlowJobByDateWithGroup", new HttpHandler() {
                @Override
                public void handle(HttpExchange httpExchange) throws IOException {

                    EntityManager entityManager = jpaService.getEntityManager();
                    try {
                        entityManager.getTransaction().begin();

                        Map requestMap = parseRequestBody(httpExchange.getRequestBody());

                        List<String> parameters = Arrays.asList("datetime");

                        String responseText = "";

                        httpExchange.getResponseHeaders().set("Content-type", "application/json; charset=UTF-8");

                        if (parameterCheck(requestMap, "datetime")) {
                            long timestamp = Long.parseLong(requestMap.get("datetime").toString());
                            Calendar calendar = Calendar.getInstance();
                            calendar.setTimeInMillis(timestamp);
                            int year = calendar.get(Calendar.YEAR);
                            int month = calendar.get(Calendar.MONTH) + 1;
                            int day = calendar.get(Calendar.DATE);

                            Query query = entityManager.createNativeQuery(
                                    "select app_name, status, date_trunc('hour', start_time) as start_time, " +
                                            "count(*) as count from WF_JOBS where round(extract(YEAR FROM start_time)) = ?1 and " +
                                            "round(extract(MONTH FROM start_time)) = ?2 and " +
                                            "round(extract(DAY FROM start_time)) = ?3 " +
                                            "group by app_name, date_trunc('hour', start_time), status " +
                                            "order by app_name, start_time", Map.class);

                            setQueryParameters(query, year, month, day);

                            List resultList = query.getResultList();
                            entityManager.getTransaction().commit();

                            responseText = objectMapper.writeValueAsString(resultList);
                        } else {
                            getParameterRequiredMessage(parameters);
                        }

                        httpExchange.sendResponseHeaders(200, responseText.length());
                        OutputStream out = httpExchange.getResponseBody();
                        out.write(responseText.getBytes());
                        out.flush();
                    } catch (Exception e) {
                        e.printStackTrace();
                        entityManager.getTransaction().rollback();
                    } finally {
                        if (entityManager.isOpen()) {
                            entityManager.close();
                        }
                    }
                    httpExchange.close();
                }
            });

            httpServer.createContext("/getWorkFlowJobCountByHour", new HttpHandler() {
                @Override
                public void handle(HttpExchange httpExchange) throws IOException {
                    EntityManager entityManager = jpaService.getEntityManager();
                    try {
                        entityManager.getTransaction().begin();
                        Map requestMap = parseRequestBody(httpExchange.getRequestBody());

                        String responseText = "";

                        httpExchange.getResponseHeaders().set("Content-type", "application/json; charset=UTF-8");

                        List<String> parameters = Arrays.asList("datetime");

                        if (parameterCheck(requestMap, "datetime")) {
                            long timestamp = Long.parseLong(requestMap.get("datetime").toString());
                            Calendar calendar = Calendar.getInstance();
                            calendar.setTimeInMillis(timestamp);
                            int year = calendar.get(Calendar.YEAR);
                            int month = calendar.get(Calendar.MONTH) + 1;
                            int day = calendar.get(Calendar.DATE);

                            Query query = entityManager.createNativeQuery(
                                    "select status, date_trunc('hour', start_time) as start_time, count(*) as count " +
                                            "from WF_JOBS where round(extract(YEAR FROM start_time)) = ?1 and " +
                                            "extract(MONTH FROM start_time) = ?2 and round(extract(DAY FROM start_time)) = ?3 " +
                                            "and status in ('SUCCEEDED', 'FAILED', 'KILLED') " +
                                            "group by date_trunc('hour', start_time), status " +
                                            "order by start_time", Map.class);

                            setQueryParameters(query, year, month, day);

                            List<Map<String, Object>> resultList = query.getResultList();

                            entityManager.getTransaction().commit();

                            responseText = objectMapper.writeValueAsString(resultList);

                        } else {
                            getParameterRequiredMessage(parameters);
                        }

                        httpExchange.sendResponseHeaders(200, responseText.length());
                        OutputStream out = httpExchange.getResponseBody();
                        out.write(responseText.getBytes());
                        out.flush();
                    } catch (Exception e) {
                        e.printStackTrace();
                        entityManager.getTransaction().rollback();
                    } finally {
                        if (entityManager.isOpen()) {
                            entityManager.close();
                        }
                    }
                    httpExchange.close();
                }
            });

            httpServer.createContext("/getWorkFlowJobByAppNameAndStatus", new HttpHandler() {
                @Override
                public void handle(HttpExchange httpExchange) throws IOException {
                    EntityManager entityManager = jpaService.getEntityManager();
                    try {
                        entityManager.getTransaction().begin();
                        Map requestMap = parseRequestBody(httpExchange.getRequestBody());

                        String responseText = "";

                        httpExchange.getResponseHeaders().set("Content-type", "application/json; charset=UTF-8");

                        List<String> parameters = Arrays.asList("datetime", "appName", "status");

                        if (parameterCheck(requestMap, "datetime", "appName", "status")) {
                            long timestamp = Long.parseLong(requestMap.get("datetime").toString());
                            String appName = requestMap.get("appName").toString();
                            String status = requestMap.get("status").toString();
                            Calendar calendar = Calendar.getInstance();
                            calendar.setTimeInMillis(timestamp);
                            int year = calendar.get(Calendar.YEAR);
                            int month = calendar.get(Calendar.MONTH) + 1;
                            int day = calendar.get(Calendar.DATE);
                            int hour = calendar.get(Calendar.HOUR_OF_DAY);

                            Query query;

                            if (status.equals("FAILED") || status.equals("KILLED")) {
                                query = entityManager.createNativeQuery(
                                        "select * from WF_JOBS where round(extract(YEAR FROM start_time)) = ?1 and " +
                                                "extract(MONTH FROM start_time) = ?2 and " +
                                                "round(extract(DAY FROM start_time)) = ?3 and " +
                                                "extract(HOUR FROM start_time) = ?4 and " +
                                                "app_name = ?5 and status in ('FAILED', 'KILLED')", Map.class);
                            } else if (status.equals("SUCCEEDED")) {
                                query = entityManager.createNativeQuery(
                                        "select * from WF_JOBS where round(extract(YEAR FROM start_time)) = ?1 " +
                                                "and extract(MONTH FROM start_time) = ?2 and " +
                                                "round(extract(DAY FROM start_time)) = ?3 and " +
                                                "extract(HOUR FROM start_time) = ?4 and " +
                                                "app_name = ?5 and status = 'SUCCEEDED'", Map.class);
                            } else {
                                query = entityManager.createNativeQuery(
                                        "select * from WF_JOBS where round(extract(YEAR FROM start_time)) = ?1 " +
                                                "and extract(MONTH FROM start_time) = ?2 and " +
                                                "round(extract(DAY FROM start_time)) = ?3 and " +
                                                "extract(HOUR FROM start_time) = ?4 and " +
                                                "app_name = ?5 and status in ('FAILED', 'KILLED', 'SUCCEEDED')", Map.class);
                            }

                            setQueryParameters(query, year, month, day, hour, appName);

                            List resultList = query.getResultList();
                            entityManager.getTransaction().commit();

                            responseText = objectMapper.writeValueAsString(resultList);

                        } else {
                            getParameterRequiredMessage(parameters);
                        }

                        httpExchange.sendResponseHeaders(200, responseText.length());
                        OutputStream out = httpExchange.getResponseBody();
                        out.write(responseText.getBytes());
                        out.flush();
                    } catch (Exception e) {
                        e.printStackTrace();
                        entityManager.getTransaction().rollback();
                    } finally {
                        if (entityManager.isOpen()) {
                            entityManager.close();
                        }
                    }
                    httpExchange.close();
                }
            });

            httpServer.createContext("/getCoordJobByStatus", new HttpHandler() {
                @Override
                public void handle(HttpExchange httpExchange) throws IOException {
                    EntityManager entityManager = jpaService.getEntityManager();
                    try {
                        entityManager.getTransaction().begin();
                        Map requestMap = parseRequestBody(httpExchange.getRequestBody());

                        String responseText = "";

                        httpExchange.getResponseHeaders().set("Content-type", "application/json; charset=UTF-8");

                        List<String> parameters = Arrays.asList("datetime", "status");

                        if (parameterCheck(requestMap, "datetime", "status")) {
                            long timestamp = Long.parseLong(requestMap.get("datetime").toString());
                            String status = requestMap.get("status").toString();
                            Calendar calendar = Calendar.getInstance();
                            calendar.setTimeInMillis(timestamp);
                            int year = calendar.get(Calendar.YEAR);
                            int month = calendar.get(Calendar.MONTH) + 1;
                            int day = calendar.get(Calendar.DATE);

                            Query query = entityManager.createNativeQuery(
                                    "select status, date_trunc('hour', start_time) as start_time, count(*) as count " +
                                            "from COORD_JOBS where round(extract(YEAR FROM start_time)) = ?1 and " +
                                            "extract(MONTH FROM start_time) = ?2 and " +
                                            "round(extract(DAY FROM start_time)) = ?3 and status = ?4 " +
                                            "group by date_trunc('hour', start_time), status " +
                                            "order by start_time", Map.class);

                            setQueryParameters(query, year, month, day, status);

                            List resultList = query.getResultList();
                            entityManager.getTransaction().commit();

                            responseText = objectMapper.writeValueAsString(resultList);

                        } else {
                            getParameterRequiredMessage(parameters);
                        }

                        httpExchange.sendResponseHeaders(200, responseText.length());
                        OutputStream out = httpExchange.getResponseBody();
                        out.write(responseText.getBytes());
                        out.flush();
                    } catch (Exception e) {
                        e.printStackTrace();
                        entityManager.getTransaction().rollback();
                    } finally {
                        if (entityManager.isOpen()) {
                            entityManager.close();
                        }
                    }
                    httpExchange.close();
                }
            });

            httpServer.createContext("/getBundleJobByStatus", new HttpHandler() {
                @Override
                public void handle(HttpExchange httpExchange) throws IOException {
                    EntityManager entityManager = jpaService.getEntityManager();
                    try {
                        entityManager.getTransaction().begin();
                        Map requestMap = parseRequestBody(httpExchange.getRequestBody());

                        String responseText = "";

                        httpExchange.getResponseHeaders().set("Content-type", "application/json; charset=UTF-8");

                        List<String> parameters = Arrays.asList("datetime", "status");

                        if (parameterCheck(requestMap, "datetime", "status")) {
                            long timestamp = Long.parseLong(requestMap.get("datetime").toString());
                            String status = requestMap.get("status").toString();
                            Calendar calendar = Calendar.getInstance();
                            calendar.setTimeInMillis(timestamp);
                            int year = calendar.get(Calendar.YEAR);
                            int month = calendar.get(Calendar.MONTH) + 1;
                            int day = calendar.get(Calendar.DATE);

                            Query query = entityManager.createNativeQuery(
                                    "select status, date_trunc('hour', start_time) as start_time, count(*) as count " +
                                            "from BUNDLE_JOBS where round(extract(YEAR FROM start_time)) = ?1 and " +
                                            "extract(MONTH FROM start_time) = ?2 and round(extract(DAY FROM start_time)) = ?3 " +
                                            "and status = ?4 " +
                                            "group by date_trunc('hour', start_time), status " +
                                            "order by start_time", Map.class);

                            setQueryParameters(query, year, month, day, status);

                            List resultList = query.getResultList();
                            entityManager.getTransaction().commit();

                            responseText = objectMapper.writeValueAsString(resultList);

                        } else {
                            getParameterRequiredMessage(parameters);
                        }

                        httpExchange.sendResponseHeaders(200, responseText.length());
                        OutputStream out = httpExchange.getResponseBody();
                        out.write(responseText.getBytes());
                        out.flush();
                    } catch (Exception e) {
                        e.printStackTrace();
                        entityManager.getTransaction().rollback();
                    } finally {
                        if (entityManager.isOpen()) {
                            entityManager.close();
                        }
                    }
                    httpExchange.close();
                }
            });

            httpServer.createContext("/getWorkFlowJobTotal", new HttpHandler() {
                @Override
                public void handle(HttpExchange httpExchange) throws IOException {
                    EntityManager entityManager = jpaService.getEntityManager();
                    try {
                        entityManager.getTransaction().begin();
                        Map requestMap = parseRequestBody(httpExchange.getRequestBody());

                        String responseText = "";

                        httpExchange.getResponseHeaders().set("Content-type", "application/json; charset=UTF-8");

                        List<String> parameters = Arrays.asList("datetime");

                        if (parameterCheck(requestMap, "datetime")) {
                            long timestamp = Long.parseLong(requestMap.get("datetime").toString());
                            Calendar calendar = Calendar.getInstance();
                            calendar.setTimeInMillis(timestamp);
                            int year = calendar.get(Calendar.YEAR);
                            int month = calendar.get(Calendar.MONTH) + 1;
                            int day = calendar.get(Calendar.DATE);

                            Query query = entityManager.createNativeQuery(
                                    "select status, date_trunc('day', start_time) as start_time, count(*) as count " +
                                            "from WF_JOBS where round(extract(YEAR FROM start_time)) = ?1 and " +
                                            "extract(MONTH FROM start_time) = ?2 and round(extract(DAY FROM start_time)) = ?3 " +
                                            "group by date_trunc('day', start_time), status " +
                                            "order by status desc", Map.class);

                            setQueryParameters(query, year, month, day);

                            List resultList = query.getResultList();
                            entityManager.getTransaction().commit();

                            responseText = objectMapper.writeValueAsString(resultList);

                        } else {
                            getParameterRequiredMessage(parameters);
                        }

                        httpExchange.sendResponseHeaders(200, responseText.length());
                        OutputStream out = httpExchange.getResponseBody();
                        out.write(responseText.getBytes());
                        out.flush();
                    } catch (Exception e) {
                        e.printStackTrace();
                        entityManager.getTransaction().rollback();
                    } finally {
                        if (entityManager.isOpen()) {
                            entityManager.close();
                        }
                    }
                    httpExchange.close();
                }
            });

            httpServer.createContext("/getWorkFlowJobCountByDate", new HttpHandler() {
                @Override
                public void handle(HttpExchange httpExchange) throws IOException {
                    EntityManager entityManager = jpaService.getEntityManager();
                    try {
                        entityManager.getTransaction().begin();
                        Map requestMap = parseRequestBody(httpExchange.getRequestBody());

                        String responseText = "";

                        httpExchange.getResponseHeaders().set("Content-type", "application/json; charset=UTF-8");

                        List<String> parameters = Arrays.asList("datetime");

                        if (parameterCheck(requestMap, "datetime")) {
                            long timestamp = Long.parseLong(requestMap.get("datetime").toString());
                            Calendar calendar = Calendar.getInstance();
                            calendar.setTimeInMillis(timestamp);
                            int year = calendar.get(Calendar.YEAR);
                            int month = calendar.get(Calendar.MONTH) + 1;
                            int day = calendar.get(Calendar.DATE);

                            Query query = entityManager.createNativeQuery(
                                    "select status, count(*) as count " +
                                            "from WF_JOBS where round(extract(YEAR FROM start_time)) = ?1 and " +
                                            "extract(MONTH FROM start_time) = ?2 and round(extract(DAY FROM start_time)) = ?3 " +
                                            "group by status", Map.class);

                            setQueryParameters(query, year, month, day);

                            List<Map<String, Object>> resultList = query.getResultList();

                            Map<String, Object> returnMap = new HashMap<>();

                            for (Map<String, Object> map : resultList) {
                                returnMap.put(map.get("status").toString(), map.get("count"));
                            }

                            Query countQuery = entityManager.createNativeQuery(
                                    "select count(*) as count " +
                                            "from WF_JOBS where round(extract(YEAR FROM start_time)) = ?1 and " +
                                            "extract(MONTH FROM start_time) = ?2 and round(extract(DAY FROM start_time)) = ?3",
                                    Integer.class);

                            setQueryParameters(countQuery, year, month, day);

                            int count = (int) countQuery.getSingleResult();

                            returnMap.put("ALL", count);

                            entityManager.getTransaction().commit();

                            responseText = objectMapper.writeValueAsString(returnMap);
                        } else {
                            getParameterRequiredMessage(parameters);
                        }

                        httpExchange.sendResponseHeaders(200, responseText.length());
                        OutputStream out = httpExchange.getResponseBody();
                        out.write(responseText.getBytes());
                        out.flush();
                    } catch (Exception e) {
                        e.printStackTrace();
                        entityManager.getTransaction().rollback();
                    } finally {
                        if (entityManager.isOpen()) {
                            entityManager.close();
                        }
                    }
                    httpExchange.close();
                }
            });

            httpServer.createContext("/searchWorkFlowJob", new HttpHandler() {
                @Override
                public void handle(HttpExchange httpExchange) throws IOException {
                    EntityManager entityManager = jpaService.getEntityManager();
                    try {
                        entityManager.getTransaction().begin();
                        Map requestMap = parseRequestBody(httpExchange.getRequestBody());

                        String responseText = "";

                        httpExchange.getResponseHeaders().set("Content-type", "application/json; charset=UTF-8");

                        List<String> parameters = Arrays.asList("startDate", "endDate", "gubun", "text", "status", "start",
                                "limit");

                        if (parameterCheck(requestMap, "startDate", "endDate", "gubun", "text", "status", "start", "limit")) {
                            long startDate = Long.parseLong(requestMap.get("startDate").toString());
                            long endDate = Long.parseLong(requestMap.get("endDate").toString());
                            endDate += 86399999L;
                            Timestamp startTimeStamp = new Timestamp(startDate);
                            Timestamp endTimeStamp = new Timestamp(endDate);
                            String targetColumn = requestMap.get("gubun").toString();
                            String text = requestMap.get("text").toString();
                            text = "%" + text + "%";
                            String status[] = requestMap.get("status").toString().split(",");
                            long start = Long.parseLong(requestMap.get("start").toString());
                            long limit = Long.parseLong(requestMap.get("limit").toString());

                            String queryString = "select * from WF_JOBS where start_time between ?1 and ?2 and " +
                                    targetColumn + " like ?3";

                            if (requestMap.get("status") != null && requestMap.get("status").toString().length() > 0) {
                                queryString += " and status in (";
                                for (int i = 0; i < status.length; i++) {
                                    queryString += "'" + status[i].trim() + "'";
                                    if (i < status.length-1) {
                                        queryString += ",";
                                    }
                                }
                                queryString += ")";
                            }

                            queryString += "ORDER BY created_time DESC LIMIT ?5 OFFSET ?4";

                            String countQueryString = "select count(*) from WF_JOBS where start_time between ?1 and ?2 and " +
                                    targetColumn + " like ?3";

                            if (requestMap.get("status") != null && requestMap.get("status").toString().length() > 0) {
                                countQueryString += " and status in (";
                                for (int i = 0; i < status.length; i++) {
                                    countQueryString += "'" + status[i].trim() + "'";
                                    if (i < status.length-1) {
                                        countQueryString += ",";
                                    }
                                }
                                countQueryString += ")";
                            }

                            Query query = entityManager.createNativeQuery(queryString, Map.class);

                            Query countQuery = entityManager.createNativeQuery(countQueryString, Long.class);

                            setQueryParameters(query, startTimeStamp, endTimeStamp, text, start, limit);
                            setQueryParameters(countQuery, startTimeStamp, endTimeStamp, text, start, limit);

                            List resultList = query.getResultList();
                            Long count = (Long) countQuery.getSingleResult();
                            entityManager.getTransaction().commit();

                            Map<String, Object> resultMap = new HashMap<>();

                            resultMap.put("totalCount", count);
                            resultMap.put("data", resultList);

                            responseText = objectMapper.writeValueAsString(resultMap);

                        } else {
                            getParameterRequiredMessage(parameters);
                        }

                        httpExchange.sendResponseHeaders(200, responseText.length());
                        OutputStream out = httpExchange.getResponseBody();
                        out.write(responseText.getBytes());
                        out.flush();
                    } catch (Exception e) {
                        e.printStackTrace();
                        entityManager.getTransaction().rollback();
                    } finally {
                        if (entityManager.isOpen()) {
                            entityManager.close();
                        }
                    }
                    httpExchange.close();
                }
            });

            httpServer.createContext("/searchBundleJob", new HttpHandler() {
                @Override
                public void handle(HttpExchange httpExchange) throws IOException {
                    EntityManager entityManager = jpaService.getEntityManager();
                    try {
                        entityManager.getTransaction().begin();
                        Map requestMap = parseRequestBody(httpExchange.getRequestBody());

                        String responseText = "";

                        httpExchange.getResponseHeaders().set("Content-type", "application/json; charset=UTF-8");

                        List<String> parameters = Arrays.asList("gubun", "text", "status", "start",
                                "limit");

                        if (parameterCheck(requestMap, "gubun", "text", "status", "start", "limit")) {
                            String targetColumn = requestMap.get("gubun").toString();
                            String text = requestMap.get("text").toString();
                            text = "%" + text + "%";
                            String status[] = requestMap.get("status").toString().split(",");
                            long start = Long.parseLong(requestMap.get("start").toString());
                            long limit = Long.parseLong(requestMap.get("limit").toString());

                            String queryString = "select * from BUNDLE_JOBS where " +
                                    targetColumn + " like ?1";

                            if (requestMap.get("status") != null && requestMap.get("status").toString().length() > 0) {
                                queryString += " and status in (";
                                for (int i = 0; i < status.length; i++) {
                                    queryString += "'" + status[i].trim() + "'";
                                    if (i < status.length-1) {
                                        queryString += ",";
                                    }
                                }
                                queryString += ")";
                            }

                            queryString += "ORDER BY created_time DESC LIMIT ?3 OFFSET ?2";

                            String countQuerySTring = "select count(*) from BUNDLE_JOBS where " + targetColumn + " like ?1";

                            if (requestMap.get("status") != null && requestMap.get("status").toString().length() > 0) {
                                countQuerySTring += " and status in (";
                                for (int i = 0; i < status.length; i++) {
                                    countQuerySTring += "'" + status[i].trim() + "'";
                                    if (i < status.length-1) {
                                        countQuerySTring += ",";
                                    }
                                }
                                countQuerySTring += ")";
                            }

                            Query query = entityManager.createNativeQuery(queryString, Map.class);

                            Query countQuery = entityManager.createNativeQuery(countQuerySTring, Long.class);

                            setQueryParameters(query, text, start, limit);
                            setQueryParameters(countQuery, text, start, limit);

                            List resultList = query.getResultList();
                            Long count = (Long) countQuery.getSingleResult();
                            entityManager.getTransaction().commit();

                            Map<String, Object> resultMap = new HashMap<>();

                            resultMap.put("totalCount", count);
                            resultMap.put("data", resultList);

                            responseText = objectMapper.writeValueAsString(resultMap);

                        } else {
                            getParameterRequiredMessage(parameters);
                        }

                        httpExchange.sendResponseHeaders(200, responseText.length());
                        OutputStream out = httpExchange.getResponseBody();
                        out.write(responseText.getBytes());
                        out.flush();
                    } catch (Exception e) {
                        e.printStackTrace();
                        entityManager.getTransaction().rollback();
                    } finally {
                        if (entityManager.isOpen()) {
                            entityManager.close();
                        }
                    }
                    httpExchange.close();
                }
            });

            httpServer.createContext("/searchCoordJob", new HttpHandler() {
                @Override
                public void handle(HttpExchange httpExchange) throws IOException {
                    EntityManager entityManager = jpaService.getEntityManager();
                    try {
                        entityManager.getTransaction().begin();
                        Map requestMap = parseRequestBody(httpExchange.getRequestBody());

                        String responseText = "";

                        httpExchange.getResponseHeaders().set("Content-type", "application/json; charset=UTF-8");

                        List<String> parameters = Arrays.asList("gubun", "text", "status", "start", "limit");

                        if (parameterCheck(requestMap, "gubun", "text", "status", "start", "limit")) {
                            String targetColumn = requestMap.get("gubun").toString();
                            String text = requestMap.get("text").toString();
                            text = "%" + text + "%";
                            String status[] = requestMap.get("status").toString().split(",");
                            long start = Long.parseLong(requestMap.get("start").toString());
                            long limit = Long.parseLong(requestMap.get("limit").toString());

                            String queryString = "select * from COORD_JOBS where " + targetColumn + " like ?1";

                            if (requestMap.get("status") != null && requestMap.get("status").toString().length() > 0) {
                                queryString += " and status in (";
                                for (int i = 0; i < status.length; i++) {
                                    queryString += "'" + status[i].trim() + "'";
                                    if (i < status.length-1) {
                                        queryString += ",";
                                    }
                                }
                                queryString += ")";
                            }

                            queryString += "ORDER BY created_time DESC LIMIT ?3 OFFSET ?2";

                            String countQuerySTring = "select count(*) from COORD_JOBS where " + targetColumn + " like ?1";

                            if (requestMap.get("status") != null && requestMap.get("status").toString().length() > 0) {
                                countQuerySTring += " and status in (";
                                for (int i = 0; i < status.length; i++) {
                                    countQuerySTring += "'" + status[i].trim() + "'";
                                    if (i < status.length-1) {
                                        countQuerySTring += ",";
                                    }
                                }
                                countQuerySTring += ")";
                            }

                            Query query = entityManager.createNativeQuery(queryString, Map.class);

                            Query countQuery = entityManager.createNativeQuery(countQuerySTring, Long.class);

                            setQueryParameters(query, text, start, limit);
                            setQueryParameters(countQuery, text, start, limit);

                            List resultList = query.getResultList();
                            Long count = (Long) countQuery.getSingleResult();
                            entityManager.getTransaction().commit();

                            Map<String, Object> resultMap = new HashMap<>();

                            resultMap.put("totalCount", count);
                            resultMap.put("data", resultList);

                            responseText = objectMapper.writeValueAsString(resultMap);

                        } else {
                            getParameterRequiredMessage(parameters);
                        }

                        httpExchange.sendResponseHeaders(200, responseText.length());
                        OutputStream out = httpExchange.getResponseBody();
                        out.write(responseText.getBytes());
                        out.flush();
                    } catch (Exception e) {
                        e.printStackTrace();
                        entityManager.getTransaction().rollback();
                    } finally {
                        if (entityManager.isOpen()) {
                            entityManager.close();
                        }
                    }
                    httpExchange.close();
                }
            });

            httpServer.createContext("/query", new HttpHandler() {
                @Override
                public void handle(HttpExchange httpExchange) throws IOException {
                    EntityManager entityManager = jpaService.getEntityManager();
                    try {
                        entityManager.getTransaction().begin();

                        Map requestMap = parseRequestBody(httpExchange.getRequestBody());

                        String responseText = "";

                        httpExchange.getResponseHeaders().set("Content-type", "application/json; charset=UTF-8");

                        if (parameterCheck(requestMap, "query")) {
                            String queryString = requestMap.get("query").toString();

                            Query query = entityManager.createNativeQuery(queryString, Map.class);
                            entityManager.getTransaction().commit();

                            List resultList = query.getResultList();

                            responseText = objectMapper.writeValueAsString(resultList);
                        } else {
                            responseText = "{\"success\":false, \"message\":\"parameter 'query' is " +
                                    "required\"}";
                        }

                        httpExchange.sendResponseHeaders(200, responseText.length());
                        OutputStream out = httpExchange.getResponseBody();
                        out.write(responseText.getBytes());
                        out.flush();
                    } catch (Exception e) {
                        String responseText = "{\"success\":false, \"message\":" + objectMapper.writeValueAsString(e.getMessage()) + "}";
                        e.printStackTrace();
                        entityManager.getTransaction().rollback();
                        httpExchange.sendResponseHeaders(200, responseText.length());
                        OutputStream out = httpExchange.getResponseBody();
                        out.write(responseText.getBytes());
                        out.flush();
                    } finally {
                        if (entityManager.isOpen()) {
                            entityManager.close();
                        }
                    }
                    httpExchange.close();
                }
            });
            httpServer.setExecutor(Executors.newCachedThreadPool());
            httpServer.start();
            LOG.info("started");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private Map parseRequestBody(InputStream requestBody) {
        Map requestMap = null;

        try {
            if (requestBody.available() > 0) {
                requestMap = objectMapper.readValue(requestBody, Map.class);
            }
        } catch (Exception e) {
            LOG.error("could not parsing request body");
        }

        return requestMap;
    }

    private boolean parameterCheck(Map map, String... parameters) {
        boolean isValidate = true;

        if (map != null) {
            for (String parameter : parameters) {
                if (map.get(parameter) == null) {
                    isValidate = false;
                }
            }
        } else {
            isValidate = false;
        }

        return isValidate;
    }

    private void setQueryParameters(Query query, Object... parameter) {
        for (int i = 0; i < parameter.length; i++) {
            query.setParameter(i+1, parameter[i]);
        }
    }

    private String getParameterRequiredMessage(List<String> parameters) {
        return  "{\"success\":false, \"message\":\"required parameter " + parameters + "\"}";
    }
}


text:
Southern Pacific #4449's Last Run For The American Freedom Train!
Souther Pacific #4449 has had a long and illustrious history and is an integral locomotive to America's proud steam history! She ran from May 30th, 1941 until she was retired from service on October 2nd, 1957. Lucky for us, her journey did not end there.
For almost 20 years, 4449 sat on display in Portland, Oregon in Oaks park. Sadly during its time on display, the engine was repeatedly vandalized and stripped of parts, including its whistle and builder's plate. However in 1974 there was a silver lining on the horizon when the old Southern Pacific was chosen to lead the American Freedom Train!
The Alco PA-1 #1776 was the first engine to lead the first American Freedom Train!
On April 21st, wearing a custom paint scheme of patriotic Red White & Blue she emerged anew and would ride under those colors for two years, pulling a display train around most of the United States! She was theb retired once more, this time however making sure she would see no exposure to the elements.
SP #4449 is a 4-8-4 'Northern' type GS-4 locomotive!
After a series of paint jobs and excursion services in 2002, 23 years after #4449 was retired as part of the American Freedom Train, she adorned old glory's colors once more after the events of September 11th! She kept these colors between early 2002 and the fall of 2004. This clip was taken during this time, along the newly opened Springwater Trail in Portland, Oregon, in June of 2003.
Did you get to see the 4449 American Freedom Train either time she was in service? We'd love to hear about it!

redpajama_set_name: RedPajamaCommonCrawl


text:
FROST* release 'Terrestrial'; first single from new album 'Day And Age'
Frost* recently announced 'Day And Age', their first new studio album in 5 years, set for release on the 14th May 2021. The band's fourth record features Jem Godfrey once again joined by John Mitchell & Nathan King, as well as 3 guest drummers: Kaz Rodriguez (Chaka Khan, Josh Groban), Darby Todd (The Darkness, Martin Barre) & Pat Mastelotto (King Crimson, Mister Mister). The album also features actor Jason Isaacs.
Today the band are pleased to launch 'Terrestrial', the first single taken from 'Day And Age', and you can watch the video here:
Jem Godfrey comments: "Terrestrial is about Donald Crowhurst who disappeared while competing in the Sunday Times Golden Globe Race never to be found. The last page of his logbook contained the words: "I have no need to prolong the game. It is finished – It is finished IT IS THE MERCY."
'Day And Age' was recorded over the course of 2019 and 2020, featuring 8 tracks and striking cover artwork by Carl Glover of Aleph Studios (Steven Wilson, Marillion, Steve Jansen). The album will be released on Limited 2CD (including a bonus disc of instrumentals), Gatefold 180g 2LP + CD (with etching on Side D), and as Digital Album. Pre-order now here: https://frost-band.lnk.to/DayAndAge
The full track-listing is below:
1. Day And Age 11:49
2. Terrestrial 5:13
3. Waiting For The Lie 4:31
4. The Boy Who Stood Still 7:33
5. Island Life 4:14
6. Skywards 4:13
7. Kill The Orchestra 9:27
8. Repeat To Fade 6:14
In September 2019 Godfrey and Mitchell rented a cottage for a week in Helford, Cornwall and set about converting it into a recording studio. Day one saw them write and record "Skywards", "Island Life" was written on day two. On day three, the duo wrote what was to become the title and defining track of the new album, "Day And Age".
The following January, the band setup a new temporary studio for a further week in a converted coastguard tower at Dungeness in East Sussex. "We were 30 feet by the sea, next to a nuclear power station and a lighthouse, in midwinter. So there was hardly any daylight and the weather was dreadful", laughs bassist Nathan King, "We wrote "Terrestrial" and "Repeat To Fade" there and you can definitely hear the bleak isolated oppression having an effect on us. The songs we wrote were far darker – the wind howling round the building at night, the power station generating crackles on the audio, a huge lighthouse next door sweeping light into the fog every 30 seconds and John screaming "ENJOY YOURSELVES YOU SCUM" into a microphone. It was absolutely brilliant!".
In November 2020, Frost* released the career-retrospective collection '13 Winters' which featured all their studio albums to date, plus live material, b-sides & last years 'Others' EP, all packaged in a beautiful artbook.
Frost* was formed in 2004 by keyboard player and singer Jem Godfrey, Released in 2006 the band's debut album "Milliontown" was an instant success and is regarded by many as a classic in the modern prog rock genre featuring John Mitchell on guitar, John Jowitt on bass and Andy Edwards on drums. The band quickly followed it up with "Experiments In Mass Appeal" in 2008, in many ways the antithesis of "Milliontown" featuring a much more stripped back sound, more concise songs and a new band member and singer in the form of Dec Burke.
The live album "The Philadelphia Experiment" followed in 2009 and the a long gap followed before 3rd album "Falling Satellites" was released in 2016 with a new line-up of Nathan King on bass and Craig Blundell on drums, plus returning guitarist and singer John Mitchell on guitar who also co-wrote much of the album with Jem Godfrey.
Posted on 19th March 2021 19th March 2021 Author martinCategories New album releases, News, Track/Video ReleaseTags Day and Age, For The Lost PR, Frost*, Jem Godfrey, John Mitchell, Nathan King, Progradar, Terrestrial
Previous Previous post: Review – League Of Lights – Dreamers Don't Come Down – by Martin Hutchinson
Next Next post: Review – Nad Sylvan – Spiritus Mundi – by John Wenlock-Smith


Megastar Rajinikanth and Akshay starrer 2.0 is setting the box office on fire. While the Hindi version of the movie alone is nearing the Rs 100 crore mark, the combined gross of all three languages (Tamil, Telugu and Hindi) has breached the magical figure of Rs 400 crores. While industry insiders and trade experts are yet to confirm on this, the makers have officially shared the collection details through their social media handle.
2.0 got released in a record number of screens worldwide on November 29 and soon opened to phenomenal response, both in the Indian and overseas box office. The movie had emerged as the highest opening day grosser in Indian cinema this year. The record has held by Aamir Khan's 'Thugs of Hindostan' (ToH), which had a pan-India opening day earning of around Rs 52.25 crores.
2.0 has already become an industry hit in Kollywood. Unseating Rajinikanth's Enthiran, which was released 8 years back, 2.0 has become the highest grossing Tamil film of all time. The movie is expected to shatter several other records in the coming days.
BSNL Customers Kind Attention Please..
Robo2.0: Will The Rajinikanth Starrer Be The First Indian Film To Cross Rs 2000 Crores Worldwide?


Who has the right to wear a beard? Which holy sites are fit for worship? Competition over religious symbols in Kyrgyzstan is deeply intertwined with the political and economic turmoil that has swept the country since the breakdown of the Soviet Union.
Dreams appear only to the individual, but seem to come from a source outside our social selves. Do we allow them to shape our days? Comparing Dutch and Kyrgyz social contexts, we understand how profoundly cultural these processes are.


The 6 factors that affect your average cost of packaging.
How is Your Packaging Priced?
Deciphering how and why you spend what you do on your packaging can be surprisingly complex.
So whilst it is simple enough to say that you order a specific number of lines, in specific sizes and specific volumes, utilising a particular material, if you have grown your packaging inventory over a prolonged (or even quite rapid) period, the question can still be – why?
Why is a specific material or board grade used? Why do you order 2 similar sized boxes? Why does one box, which seems quite similar on the face of it to another, cost so much more? Why do you order so many additional items such as tape and inserts?
There are normally three possible answers.
The first is usually along the lines of "this is what we needed to accommodate our product range". However, if the product range has grown over time, with new packaging introduced as you go, decisions made in isolation may be affecting your average cost of packaging.
Answer two usually focuses on cost. In effect, this was the cheapest option (at the time).
The final answer – which may be of some concern – is I don't know.
However, with an increasing number of companies seeing price increases across their packaging range, now is an important time to be able to analyse what truly makes up the cost of your packaging.
Put simply, an increase in the cost of your packaging puts you in an awkward position.
You can either take the hit to your bottom line or pass the costs onto your customers. Neither of which is ideal.
This is why it is important to be able to analyse the cost make-up of your packaging.
If you do not know the key factors that are determining the price of your packaging, and therefore your overall packaging spend, then it is that much harder to identify areas where you can drive cost savings.
Once you know the reasons your packaging has been designed or manufactured in a specific way, it enables you to decide if these reasons are still valid, whether specific compromises can be made without affecting your packaging effectiveness, or if there is just a much better (and potentially cost-effective) way of doing things.
So what factors affect packaging pricing?
For most business types and packaging users, it will usually be possible to identify 6 over-arching factors that affect the why and how of your packaging.
Whilst not each of these factors may be completely relevant to your business, the remainder of this guide details why you should – if possible – analyse these elements in order to begin identifying potential cost saving opportunities.
Perhaps the most obvious, the fragility and specifications of your product can have a direct and noticeable impact on your overall packaging spend.
In simple terms, the more delicate the items you need to package, the more money you will need to spend to successfully protect them.
Similarly, larger items will generally cost more to package than smaller items.
This all leads back to a significant – and rising – cost of your packaging. The type and amount of material used.
One of the main reasons you may have experienced a price rise is the increase in demand for the raw materials that are used to produce corrugated cardboard (and for the finished material itself). This rise in demand has led to shortages, rises in pricing and ultimately an increase cost for your packaging.
So, even knowing this, is there anything you can do?
For example, could your boxes be made smaller to use less material (this could be the case if you are not using custom packaging)?
Another area to explore is if the material of your packaging is over-specified. Whilst your packaging may be protecting your products in transit successfully, it may be the case that a lighter, cheaper board grade would provide no noticeable difference in protection, but could offer you an instant cost saving.
Packaging material costs are one of the biggest factors in the price you pay.
A similar principal actually applies to the intended use of your packaging. So whilst looking at how fragile or robust your product is, you should also consider what environments and types of handling it will experience in your supply chain.
As a very basic example, a product that will be delivered to an end user through a courier network may be handled numerous times as it passes through various distribution centres. It will also potentially have a number of different journeys in vans or lorries where it will be exposed to differing forces (impact, vibration etc.).
The exact same product, being delivered directly to your customer using your own transport will be handled considerably less and depending on location, may also travel less distance too.
The first scenario would require a considerably higher level of transit protection than the second.
This again returns to the material specification of your packaging – and the cost of using a material or board grade that may or may not be suitable.
It is therefore important that you look at the average distances your products travel, how they are transported, the amount of handling they are likely to be subjected to and then combine this with analysis of your products fragility to ascertain the optimum material to strike the balance between cost and protection.
Remember; an over-specified carton will only offer you one thing – additional costs!
The final point that links to the protection of your product – but can manifest itself in other ways – is the complexity of your packaging.
For example, in order to protect different items within your outer carton, you may have a complicated die cut insert that requires assembly before being placed in the outer box. Whilst a good idea, in theory, the design of your pack may be overly complex.
This does not apply to inserts alone, however – you have been a sold a highly technical solution that, whilst fulfilling the brief, is actually over-elaborate for what is required.
This can be particularly harmful (to your costs) if multiple, costly or labour intensive manufacturing processes are needed to produce your pack.
Hand finishing is a cost that will usually be added to your invoice. Similarly, multiple passes through a machine (e.g. for cutting, creasing or adding print) will also be reflected in your overall costs.
As such, consider if your packaging really needs to be as complex as it is currently. There are many occasions where you will not be able to simplify your packaging without compromising performance / protection for your products. This is often referred to as "value engineering".
However, eliminating just one manufacturing process could see a significant reduction in your costs.
And whilst you may not feel confident analysing your packaging yourself, your packaging supplier – if competent – should be more than willing to help.
As with any item you purchase, the overall volume ordered can have a significant impact on the price you pay.
Whilst this is simple economies of scale, the effect can be even more pronounced if you are using custom packaging.
Firstly you have machine setup time (and tooling costs on the initial order). You then have the manufacturing processes, plus any other manual tasks (e.g. hand finishing, packing into bundles etc.). There is then storage and shipping to your location.
The more each of these processes need to be completed (particularly the initial setup and delivery), the bigger impact on your costs.
But how can you affect order volumes when you have a fairly consistent usage?
Well, there are a number of ways you can increase the volumes you order without impacting the day to day processes regarding your packaging.
For example, if you have additional free warehouse space you could put this to use to store additional packaging. If you know your average usage – and more importantly have the space – you could order larger volumes of packaging and keep them safely stored until they are required.
This makes the assumption that you have free space however.
If you don't, your packaging company should be able to offer you a managed inventory service, where they will hold an agreed level of stock and deliver on a Just in Time basis. This could allow you to order a larger volume up-front (realising the cost saving), and then take delivery as previously.
The final option is to consider rationalising your packaging.
This would see you combining boxes of a similar size, and allowing you to order higher volumes of fewer boxes. This has the added benefit of minimising your admin and ordering process too.
Many people, when looking at reducing their packaging costs, tend to overlook all of the secondary packaging and sundries that they are using.
These can be a significant, hidden cost of your packaging.
How much of these you use is directly affected by the type and size of packaging you are using (and therefore the first 4 points listed above).
Boxes that offer little protection for your product may be "improved" using void fill such as expanding foam or polystyrene. You may be using additional bags or papers such as those that offer protection against static or rust (VCI). The design of your boxes may mean you use a lot of tape during assembly.
Each of these adds not only to overall packaging spend, but also creates an additional process for your staff to undertake (taping, putting in a bag before packaging into the outer etc.). This in turn affects their overall productivity, and thus your labour costs rise too.
All of them can be mitigated through analysis of your packaging design however.
It is possible for VCI and anti-static coatings to be applied directly to you boxes surfaces, eliminating the need (and cost) of the bags and papers you may have been using.
Custom size boxes can dramatically reduce the amount of void fill you use, whilst you can even switch to "crash lock" boxes to minimise the amount of tape required (and speed up assembly time too).
The final part of your packaging to consider is the role it plays in your company's' marketing.
If your corrugated packaging does not currently have your logo printed on the exterior, then it is a missed branding and advertising opportunity (although on occasion there may be security reasons why you do not wish to advertise the packs' contents).
However, if you are using a 3 or even full-colour logo – and incurring the associated print costs of doing so – is this really necessary?
You should be able to analyse any impact of dropping from multiple colours to a single monochromatic logo and may find the cost saving of doing this easily outweighs the possible slight loss of visual impact.
You may also – with the help of your packaging supplier – be able to ascertain whether switching print methods can yield cost savings with little noticeable impact. This may be moving from a lithographic print to a high-quality flexographic finish for example.
The key point is to think about what impact your packaging needs to make, and is your current print the most suitable option for achieving this.
Although there is a myriad of factors that affect the price you pay for your packaging, if you focus on the factors that you can easily analyse – and even control – it will allow you to identify the quick wins that allow you start reducing your packaging spend.
And don't be afraid to ask your packaging supplier for help and advice. If they value your business, and know their stuff, they should be happy to work with you to achieve your cost reduction targets.


text:
Search For "arjen robben"
Arjen Robben's Groningen comeback ends in injury
Groningen [Netherlands], September 13 (ANI): Former Netherlands striker Arjen Robben's return to his boyhood club Groningen lasted less than half an hour on Sunday as he was forced out of his comeback match with injury.
Arjen Robben announces return to football with his first club Groningen
Groningen [Netherland], June 28 (ANI): Former Bayern Munich and Netherlands striker Arjen Robben has announced that he will return to football with his boyhood club Groningen.
Have considered coming out of retirement: Arjen Robben
Munich [Germany], April 27 (ANI): Former Bayern Munich star Arjen Robben revealed that he has considered coming out of retirement from professional football.
Arjen Robben announces retirement from football
Munich [Germany], July 5 (ANI): Arjen Robben, the former Bayern Munich and Netherland forward, announced his retirement from football on Thursday.
Arjen Robben calls Pep Guardiola 'tactically brilliant'
Leeds [UK], May 24 (ANI): Bayern Munich winger Arjen Robben heaped praise on Pep Guardiola, the Manchester City's treble-winning coach Pep Guardiola, calling him 'tactically brilliant'.
Bayern Munich's manager praises departing duo Ribery and Robben
Leeds [UK], May 19 (ANI): Bayern Munich won their seventh consecutive Bundesliga title on Saturday and their manager Niko Kovac heaped praise on the departing duo of Franck Ribery and Arjen Robben, saying that both these players helped in shaping up the team.
Bayern Munich held to 2-2 draw against Wolfsburg in Bundesliga
Munich [Germany], Sept. 23 (ANI): Bayern Munich squandered a 2-0 lead as they were held to a 2-2 draw by Wolfsburg in the Bundesliga at the Allianz Arena on Friday night.


Apple has mocked Microsoft's recent $300 million advertising spend in its latest 'Mac Vs PC' advert.
Titled the Bean Counter Ad, we see Mr Mac question Mr PC about the mountain of money spent on the recent Seinfeld/Gates promo and the meagre amount invested in fixing Vista.
This is the first of two new adverts promoting the Apple brand. The second derides Microsoft's decision to go back to naming Windows, er, Windows.
In the advert, every time the word Vista is mentioned by Mr Mac, it is buzzed out.
The 'Get A Mac' adverts were first launched by Apple in 2006, and star Justin Long (Mac) and John Hodgman (PC).
The UK version features comedy duo Robert Webb (Mac) and David Mitchell (PC).
Microsoft's recent advertising campaign featured both Jerry Seinfeld and Bill Gates. The latest advert dropped Seinfeld in favour of putting a more positive spin on the 'I'm A PC' motif from the Apple promos.


This is a guest post authored by "Tex" Pomeroy. He is a Tokyo-based writer specializing in ICT and high technology.
The Voyager accelerator program Demo Day was held on July 14th in Shibuya. Run by the Nomura group of companies under the auspices of Nomura Holdings, support from the Nomura side with an eye to producing synergy – in addition to outside private-sector mentors (like former Intel Japan chief Ikuo Nishioka) as well as advisors such as academics and field professionals helped five startups gain traction in their business.
Chikaku, which offers a service providing links for senior citizens to their relatives as exemplified by their grandchildren via video tech ("Mago" in Japanese, hence "Mago Channel" as the service name), tried out their productline at half a dozen Nomura Securities branches. Much positive feedback from the trial participants and the securities sales staff was gained. Chikaku hopes to expand their service further in cooperation with Nomura Securities.
Simulatio, a venture business born out of research at Japan's National Institute of Information and Communications Technology (NICT), unveiled its natural language-grounded "Logic & Arithmetic Network Database" (LAND). The startup aims to promote analysis and solution provision for the financial sector while improving the reliability of financial information for users. By collaborating with the Nomura group of companies, it looks to realize further enhancement of its services.
Giftee in conjunction with Nomura Securities Koshigaya (Saitama Prefecture) branch gave a trial run of its casual gift service "eGift" which focuses on the grandparents generation wishing to provide younger family members with small gifts. The Nomura group also stands to gain by making in-roads into the elder generation through jointly marketing the "eGift" services.
A10 Lab is offering the "MinChallenge" (meaning "Take on the challenge with everyone") software which seeks to motivate those involved in various activities but prone to possibly dropping out. The startup hopes to improve people's lifestyles so the general public will be motivated to be active in society. Research work on this endeavor was carried out jointly with Nomura Research Institute.
Nagoya University Medical School-spawned Prevent wishes to set up a health-oriented community where residents can lower insurance, medical and other social costs based on proper diet or training. Such communities are to be establish by working together with real estate developers such as Nomura Real Estate.


Power Supply:12V Compatible Make: Universal Compatible Car Model: Universal Frequency Range: fm-a..
Description: Self adhesive back for easy installtion. Dummy antenna make a great decoration for y..
Description: Designed with the dice style, the purple body . Can enhance more elegant look for you..
Specifications: Product Name Car Sticker Decor Material Metal Design S..
Vehicle Car Clear Overlays Vinyl Head Light Film Cover 354" x 11.8"
Specifications: Product Name Car Light Film Sticker Material Vinyl Color ..
Auto Car Black Stick-on Wide Angle Round Rearview Blind Spot Mirror 3.15"
Specification: Product Name Blind Spot Mirror Housing Material Plastic Fr..
Description: Custom design Butterfly Car Sticker can be easily applied to most smooth, and clean su..
Specification: Product Name Car Air Flow Fender Sticker Material Plastic ..
description: interior applications: switch rim, air condition rim, shift knob trim, speakers, door h..
specification: product name car badge sticker pattern 4wd size 11.2 x 1.5 x 0.4cm/ 4.4" ..
Color :Green-Yellow + Silver Quantity :1 Piece Material: Zinc alloy Application: Body Type:DIY S..
Description: It is is perfect as a replacement for your missing existing rear view mirror. P..
Description: Decorate your wheel with these Silvery Valve Covers. Instead of the original bad Valv..
Specification: Product Name Car Scratch Repair Pen Paint Color Alpine White ..


text:
Q: Completed a row before a selectall I have an array with my column title and i want my first cell to have "A1" as title.
I tried like that :
var title=mtable.append("thead").append("tr");
title.append("td").text("A1");
title.selectAll("td")
        .data(lTitre)
        .enter().append("td")
        .text(function(d) { return d.key; });

My code doesn't draw the first column title: 2007 (as show under). how can i solve this ?

    A1
 !!!! 2007	 !!!!! is missing here
    2008
    2009
    2010
    2011

A: With your current code, if you check the __data__ bound to A1	, you'll see it has __data__.key == 2007. This happens because whenever your selectAll() statement matches any elements in your current selection, the .data() function binds data to existing elements before it creates the entering selection. To fix this, simply use a selectAll() function that doesn't match any existing elements:
var title = mtable.append("thead").append("tr");
title.append("td").text("A1");
title.selectAll(".new")
        .data(lTitre)
        .enter().append("td")
        .text(function(d) { return d.key; });

redpajama_set_name: RedPajamaStackExchange


Hillary Clinton: Op-ed: Sponsored flag-burning bill for centrist credential.
Mike Bloomberg: Lock them up and throw away key, but no death penalty.
Bill Weld: 1996 River Protection Act: 9,000 miles of land use rules.
Anthony Kennedy: Using foreign law is inevitable with an interconnected world.
Antonin Scalia: Foreign laws ought to be rejected out of hand.
Stephen Breyer: Supreme Court can learn from foreign laws.
Pete Buttigieg: Get rid of the Electoral College.
Hillary Clinton: Hillary�s paradox: she�s not as liberal as people think.
Howard Dean: DNC pursuing a 50-state strategy to take back the House.
Paul Ryan: Within government limits are things like infrastructure.
James Mattis: Keep U.S. troops in Syria indefinitely to defeat ISIS.
Wesley Clark: Bush used 9/11 as a pretext to implement Iraq invasion plan.
Wesley Clark: Supported Iraq war while we were at war.
The above quotations are from Columns and news articles in The New Yorker.


text:
Archive for the 'fallout' Category
Pressure on India and Pakistan to prevent Mumbai fallout
India demanded Pakistan hand over its most wanted man as sign of faith as diplomatic efforts to prevent the nuclear-armed rivals from heading toward a confrontation over the Mumbai attacks intensified on Tuesday.
By C. Bryson Hull
The Times of India and television channels reported New Delhi renewed a demand Pakistan hand over 20 militants wanted in India, including Dawood Ibrahim, a Mumbai underworld don blamed for bomb blasts in the city in 1993 that killed 260 people.
U.S. Message to Pakistan: Battle Terror, Not India
Mumbai: In India, Secretary of State Condoleezza Rice Pressures Pakistan
Arab League Secretary-General Amr Moussa was in New Delhi on a scheduled visit while U.S. Secretary of State Condoleezza Rice was due to arrive on Wednesday following the militant attacks that killed 183 people in India's financial capital.
India has blamed Islamist militants based in Pakistan and issued a note of protest to its old enemy on Monday demanding decisive action.
"It was conveyed to the Pakistan high commissioner that Pakistan's actions needed to match the sentiments expressed by its leadership that it wishes to have a qualitatively new relationship with India," a foreign ministry statement said.
Azam Amir Kasav, an injured suspected militant, lies on a bed in this undated handout picture released by Mumbai police on November 30, 2008. (Mumbai Police/Handout/Reuters)
http://news.yahoo.com/s/nm/20081202/ts_
nm/us_india_mumbai_20
Posted in Azam Amir Kasav, Border, business, Dawood Ibrahim, fallout, India, investigation, Maulana Masood Azhar, Mumbai, news, Pakistan, peace, politics, tensions, terrorism, trade, war | Leave a Comment »
You are currently browsing the archives for the fallout category.
racist ph


Fliggerty has found and corrected the error which was preventing me from replacing the lost attachment, so once again we have the 16.08 version available for download.
Hi. This is not necro-posting but ancient post worship, which I hope is tolerated.
Do you have a newer version? I tried to use the Tamriel_Data patcher to make MC3 compatible with Tamriel Rebuilt 16.12. It works, but the lag in cities is unbearable.
kloppix wrote: Hi. This is not necro-posting but ancient post worship, which I hope is tolerated.
Greetings. Unfortunately, while we had worked for some time on Morrowind Crafting 3, we ran into something of a brick wall when they decided to rework much of their previous efforts; MC3 contained 'fixed' versions of a great many NIF files, which the newer Tamriel Rebuilt immediately broke, after a fashion, and other changes broke a great deal more.
At this time, we've no idea how to reconcile with the newer versions of TR, so until/unless we can find some way that does not involve hundreds of hours of redoing work that we've done 2-3 times already, we're on hold.
As to the lag... I've no idea how MC3 could be affecting that; we add a few NPCs here and there, and maybe a couple of stacks of wood or so. Very little in any one city or village.
Wow, the version 17.09 is out already. I see what you mean.
I'm sorry Drac, but I'm a noob in mod creation. Can't you just take the required files from TR and include it in MC? (After asking for permission, of course).
Unfortunately, no. The problem is the way the items created by the mod are stored by the mod internally. The construction set changes the very complicated internal numbering system into something more readable for the people making the mod, but those internal numbers are the source of serious problems.
A simple example: On one side of the map is a small hut with a fireplace and three logs. The logs are statics and unusable. Morrowind Crafting 3 mod deletes those three logs and replaces them with miscellaneous objects that the player can pick up and use. What happens internally is that MC3 mod tells the game engine to delete object #88721518761873518765, #88721518761873518784, and #88721518761873518791 and add object #52914804924780191215, #52914804924780191221, and #52914804924780191225. As long as TR_Mainland.esm is the same as it was when MC3 was made, this works fine.
However, the moment the TR team creates a new version, all the object numbers of EVERYTHING in their mod get recalculated by the construction set and re-written. Unfortunately, now, object #88721518761873518765 is no longer a static log in a crafter's hut in one section of the mainland, but the door to a merchant's shop in some other city, #88721518761873518784 is a bookshelf in his shop, and #88721518761873518791 is a section of floor/wall/ceiling in one if his storerooms.
When you load MC3 with the new version of TR_Mainland.esm, it will still try to carry out those same instructions, except instead of deleting a static version of three logs and replacing them with ones the player can pick up, it deletes three completely unrelated items elsewhere in the game. Now, if you go into the crafter's hut, you can't pick up the logs because the statics are still there interfering with the process (they have new numbers since the TR team rebuilt TR_Mainland.esm) and if you enter the merchant's shop, you'll find some of his wares floating where the bookshelf used to be, there is a black void leading into empty space where one of his walls used to be, and you can no longer leave, since the inside door is gone!
Of course, all those numbers and objects are hypothetical, but hopefully it illustrates the type of problem we're dealing with. It isn't as simple as just including files from TR so that everything still works. It means having to repair the MC3 mod every time anything in TR_mainland changes, no matter how big or small that change might be... and the TR team's changing all the internal reference IDs for the sake of consistency with a couple of other mainland projects just adds another layer of complexity to an already frustrating situation.
No, unfortunately this isn't something that can be so easily resolved. I wish it were.
Thank you for your extensive response, Tocatta. It was very informative. I hope OpenMW can help to solve issues like this in the future. Mark and Recall to Vvanrdenfell until then.
Not sure how feasible this would be for something as big and intricate as MC3, but wanted to share nonetheless.
Can anybody post the 2.1 version of the mod?
Sorry for the difficulty, but I've been unable to attach copies of any file larger than a megabyte or so here, so I can't host it. I have no idea why MMH removed it, but if anyone asks, I did not request it to be removed. While trying to track down a valid download link, I was surprised to find myself described as "known to be a 'parlor' style mod author", which probably comes from my request in the v2.1 readme that meshes, textures, and scripts in MC2.1 should not be used in unrelated projects. I did, however, give blanket permission for their use in any project that was intended to be compatible with or build upon Morrowind Crafting, so I'm not sure why anyone would feel that I'm trying to keep a tight fist on the mod. My only concern was to not have someone mooch my hard work for something either completely unrelated to crafting or to enable someone to create a mod intended to REPLACE Morrowind Crafting.
Anyone wishing to make something that works WITH Morrowind Crafting; is simply Morrowind Crafting aware (e.g. which includes objects, creatures, or NPCs which can provide MC related raw materials); or which extends its abilities or areas of effect (e.g. into the mainland areas of Tamriel Rebuilt) has permission to use them in any way desired.
On the other hand, if you want to make a mod which has nothing to do with crafting, but you think the pottery wheel looks nice and you want to stick it into a building... either make one yourself, or have whoever owns the pottery wheel actually sell pottery AND CLAY. By making it MC aware, you have my blessing. If you just want to mooch... bugger off. If that makes me a "parlor" style mod author, so be it, but you don't have to come into my parlor to use it. You just have to respect the work I put into it. i.e. derivative works of any sort are fine, blatant plagiarizing is not.
Also, as stated in the Morrowind Crafting Readme, I have no problem with this mod being hosted anywhere, provided that the host makes no claims of ownership or intellectual property rights on the mod by virtue of hosting it. That is to say, any mod hosting site which has a policy of "all your mod are belong to us" is somewhere that may NOT host MC Crafting. Anywhere else is just fine.


Whether you are in Oakland Gardens on business or to check out the sights, having the option to go where you want to go, when you need to can help make your trip all the better. Using Oakland Gardens public transportation may be an inexpensive method to explore the neighborhood, but if you want to get to another part of New York, you might be left waiting for a while. Taxis and ridesharing, like Lyft or Uber, can be faster, but if you are going all over Oakland Gardens, the cost can really add up. Additionally, they may not be immediately available.
If you want to get the most out of your trip to Oakland Gardens, then booking a car rental is the best way to be sure you have time to go everywhere you want to go during your visit. CarRentals.com can help you book an affordable price and the car of your choosing. Read through our tips to find out everything you want to know about renting a car in Oakland Gardens.
What's the best way to get an affordable rental car in Oakland Gardens?
What car do you suggest for Oakland Gardens?
With a variety of vehicles to pick from, it can be tricky to decide which type is the best for your holiday. However, consider your needs and the number of you are riding with. Our table below can help you decide which vehicle is the best one for you.
How old do I have to be to rent a car in Oakland Gardens?
The minimum age to rent an automobile in most cities, like Oakland Gardens, New York, is 21. However, there is commonly an additional charge for anyone under 25. Moreover, for higher categories, such as premium, large capacity vehicles, or SUVs, the age restrictions can be different. Confirm the rental car company's policy before you book.
You are required to have insurance before you rent in United States of America. It may possible to buy additional insurance through the supplier for your trip, if you know your insurance won't cover your rental during your trip.
Many of the major credit card issuers (American Express, Visa, MasterCard and Discover) usually cover your car rental. However, many have limitations, such as not completely covering larger vehicles, like trucks or SUVs. It is best to find out exactly what your credit card will cover and how much before you travel to New York. You can also purchase Collision Damage Coverage with CarRentals.com at checkout if you are a U.S. citizen.
What fuel policy should I go for in Oakland Gardens?
Most rental car suppliers give you a full tank of gas. At CarRentals.com, we advise returning the car topped off. If you want to save some money, you should find a filling station before you bring it back to the supplier. Stations close to airports or car rental places tend to have higher prices.
Do any Oakland Gardens suppliers allow one-way?
Most car rental providers offer one-way rentals. Depending on your itinerary, you may find it easier to drop off your car at another location. Be aware that there is usually an extra fee for one-way car rentals.
Can I book with unlimited mileage when renting a car in New York, New York?
The majority of suppliers offer unlimited miles, but you need to ensure it is part of the bundle that you are purchasing. It's helpful to know how far you want to drive and plan your trips in advance. Although most car rental suppliers offer unlimited mileage, if it isn't part of your rental agreement those miles can pile up and so can the extra cost. You may want unlimited miles if you're thinking of some road trips to explore all that New York or even New York has to offer.
What is there to do around Oakland Gardens?
Hamilton Grange National Memorial located at 414 West 141st St.
New York has lots of things to do while you are on vacation. You may just have to jump into your rental car and discover what is else is out there.
Stop worrying about matching up your vacation to a bus schedule. After you've booked a rental car in Oakland Gardens from us, you'll be able to cruise all over the neighborhood and the rest of New York at your leisure. Browse our selection of automobiles from some of the best car rental companies in the country and pick out the ideal car for your Oakland Gardens vacation! The perfect set of wheels is only a few clicks away.


In episode 169 of The Real Food Reel we are joined by Sahara Rose. Sahara is the best-selling author of the Idiot's Guide to Ayurveda and has been called "a leading voice for the millennial generation into the new paradigm shift" by none other than Deepak Chopra. Ayurveda is a science of life and one of the most sophisticated and powerful mind-body health systems in the world. As an dedicated yogi, I was really interested to learn about this ancient wisdom from a nutrition stand point and maybe parts of this will resonate with you too?
In today's episode you will learn about the origins of Ayurveda, what is a mind-body-type, the three energy types, how to identify an imbalance, what to do if any one of your energy types are imbalanced and how to take the key Ayurvedic principles into your modern life. If you would like to know your mind-body type before listening to the show, hit pause now and go to iamsahararose.com to take Sahara's online quiz. Without further ado, let's welcome Sahara to The Real Food Reel.
All you need to do to be in the running to win a copy of Sahara's book, Idiot's Guide to Ayurveda is to share this episode on Instagram and tag @iamsahararose, @thenaturalnutritionist and #realfoodreel.


Are you interested in weather trends?
Then this is the right application for you.
There is a special pop-up menu for easy usability. There is no need to follow the values on the vertical and horizontal axes, rather you "tap" anywhere on the chart and more detailed informations are displayed. With the Meteogram app you can access data for your current location or select a location from the database which contains over 110 000 cities worldwide.
If you have any feature requests regarding this application please use the contact form. I will try to help you as soon as I can!
LorinEAppStore Sweden Best weather app! Wow, finally someone has figured out the best way to display the weather over time. Weather presented in a simple yet, elegant way.
Finally an accurate weather app for Sweden. Bästa väder appen! Wow, äntligen har någon tänkt ut det bästa sättet att visa väder över tid. Vädret presenteras på ett enkelt men, elegant sätt.
Äntligen en exakt väder app för Sverige.
Oliver TaylorAppStore United States Great way to view forecasts The app itself is a little rough around the edges — portrait mode, seems translated, some odd layout choices, etc. — but it is uncluttered and does its job well, and I've never seen anything exactly like it. This is a very useful and an elegant way to look at weather.
Paul70_AppStore Russia Very nice and comfortable Conveniently for the overall assessment of the weather, almost all on the same graph. The idea and implementation is very successful. In Moscow precision is quite normal. I would very much like to continue to show pressure in mm. Hg, yet not so bad to make the possibility of withdrawal schedule for 10-12 days and the opportunity to make a copy of the screen or better graphics in the file. Thanks to the author, lead to the development of the program.Очень неплохо и удобно Удобно для общей оценки погоды, все практически на одном графике. Идея и реализация очень удачны. По Москве точность вполне нормальная. Очень бы хотелось в дальнейшем отображения давления в мм. Ртутного столба, еще не плохо бы сделать возможность вывода графика на 10-12 дней и возможность делать копию экрана или лучше графика в файл. Спасибо автору, ждем развития программы.
Bjarte MindeAppStore United States My favorite weather app All I need, fast.
Charles Perry This is simply elegant. Edward Tufte and Stephen Few would be proud. May I ask how you designed it and coded it? I would love to design something this beautiful myself one day. I do business analytics, scorecards and metrics for a living. This is beautiful.
Marc revolApp Store France Clear, sharp and clear Great success graph. Forecast as correct as possible. No hesitationClair, net et précis Belle réussite graphique. Prévisions aussi correctes que possible. Pas d'hésitation.
MarkosbAppStore United States Nice weather app I bought it cause of the neat graphics, I like the way the information is presented in the app, it's a really nice weather app.
Pward1965AppStore United Kingdom Very good weather app I seem to collect weather apps, and this is one I will use regularly. It presents a wealth of information primarily on a single screen in an attractive layout. Weather information comes from a Norwegian web site. Excellent Support from the developer too - initially the app didn't work; I contacted the Michal the developer and the issue was fixed within 24 hours! Well worth the money.
Meteogram meets exactly what I need: reliable, precise and to the point - no knick-knick-design.
The other apps (much more expensive and totally unreliable) I will delete now, to make room on my Ipad. I just got far too often annoyed by it.
Meteogram trifft genau, was ich brauche: Zuverlässig, präzise und auf den Punkt gebracht - kein Schnick-Schnick-Design.
Die anderen Apps (viel teurer und total unzuverlässig) werde ich jetzt löschen, um Platz auf meinem Ipad zu schaffen. Habe mich viel zu oft über sie geärgert.
© 2012 Meteogram. All Rights Reserved.


The BikeInsure GiveBack program supports charitable organizations with causes near to our heart. As the Founder of BikeInsure, I developed the GiveBack program to support charities that take on important social causes and issues that have impacted the lives of my family and many others.
The Davis Phinney Foundation for Parkinson's is unique in the Parkinson's community. Our mission to help people living with Parkinson's to live well today makes us so. We are committed to supporting programs and research that deliver inspiration, information and tools that will enable people living with Parkinson's to take more control in managing their disease.The Davis Phinney Foundation was founded in 2004 by Olympic medal-winner and cycling great, Davis Phinney, who was diagnosed with Parkinson's disease in 2000 at the age of 40. Today, Davis is both a role model in the cycling community and an inspiration to the estimated 1.5 million Americans and estimated 10 million worldwide who are currently living with the disease.
Yield to Life engages in a vigorous awareness campaigns to promote positive attitudes toward cyclists and replace any hostility that exists between motorists and cyclists with understanding, respect, and appreciation for all life on the road. Safety for every cyclist is the top priority of Yield to Life.
Yield to Life is provides road-rule education programs for motorists and cyclists alike through driver's education programs, public awareness movements and media campaigns in order to ensure a safer and more harmonious environment for all those on the road.


text:
Dancing On Ice: 22 hrs 8 mins
Bruno Tonioli 'forced to take 50% Strictly pay cut'
Bruno Tonioli's salary is reportedly cut in half after he is unable to fully take part in this year's Strictly Come Dancing.
Bruno Tonioli has reportedly had his wages slashed in half after he was unable to perform a full role on this year's Strictly Come Dancing.
The 65-year-old has been part of the judging panel since the show launched in 2004, but due to coronavirus and his work on US version Dancing With The Stars, he has been unable to properly take part in the current series.
According to The Sun, as a result of the change in circumstances, Tonioli will only be paid around half of the £250,000 he normally pockets for each series.
The news means that the veteran judge will still earn £125,000, however - despite only appearing via video link for a few minutes each week during the Sunday night results show.
"Much of Britain is working from home right now but Bruno is expected, where possible, to be there in person," a source told the newspaper.
"He's contributed less than he normally would with all of his Italian flamboyance and high-energy performances in the studio, so he was happy to take less than his usual wage.
"After all, it was his decision to focus on the American show while keeping his toe in the UK. There's no hard feelings."
Tonioli had originally hoped to be back in the studio for the final two shows of this series but has since decided that it is too risky to fly back to the UK with the coronavirus pandemic still raging on both sides of the Atlantic.
Click here for more stories about Bruno Tonioli
Read more about Bruno Tonioli Entertainment
Motsi Mabuse out of Strictly Come Dancing live show?
Anton Du Beke confirmed for Strictly judging panel
Jason Tindall hits out at "blatantly wrong" Lerma red card in Luton loss
John Hughes feels Ross County "got it spot on" tactically in Aberdeen win
Celtic's Gavin Strachan expresses frustration at Livingston draw