text:
// jTDS JDBC Driver for Microsoft SQL Server and Sybase
// Copyright (C) 2004 The jTDS Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//
package net.sourceforge.jtds.jdbc;

import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.Types;
import java.sql.ResultSet;

/**
 * This class extends the JtdsResultSet to support scrollable and or
 * updateable cursors on Microsoft servers.
 *
The undocumented Microsoft sp_cursor procedures are used.
 *

 * Implementation notes:
 *

 *
All of Alin's cursor result set logic is incorporated here.
 *
This logic was originally implemented in the JtdsResultSet class but on reflection
 * it seems that Alin's original approch of having a dedicated cursor class leads to a more
 * flexible and maintainable design.
 *

 *
 * @author Alin Sinpalean
 * @author Mike Hutchinson
 * @version $Id: MSCursorResultSet.java,v 1.40 2005/01/04 12:43:56 alin_sinpalean Exp $
 */
public class MSCursorResultSet extends JtdsResultSet {
    /*
     * Constants
     */
    private static final Integer FETCH_FIRST    = new Integer(1);
    private static final Integer FETCH_NEXT     = new Integer(2);
    private static final Integer FETCH_PREVIOUS = new Integer(4);
    private static final Integer FETCH_LAST     = new Integer(8);
    private static final Integer FETCH_ABSOLUTE = new Integer(16);
    private static final Integer FETCH_RELATIVE = new Integer(32);
    private static final Integer FETCH_REPEAT   = new Integer(128);
    private static final Integer FETCH_INFO     = new Integer(256);

    private static final int CURSOR_TYPE_KEYSET = 1;
    private static final int CURSOR_TYPE_DYNAMIC = 2;
    private static final int CURSOR_TYPE_FORWARD = 4;
    private static final int CURSOR_TYPE_STATIC = 8;
    private static final int CURSOR_TYPE_PARAMETERIZED = 0x1000;

    private static final int CURSOR_CONCUR_READ_ONLY = 1;
    private static final int CURSOR_CONCUR_SCROLL_LOCKS = 2;
    private static final int CURSOR_CONCUR_OPTIMISTIC = 4;

    private static final Integer CURSOR_OP_INSERT = new Integer(4);
    private static final Integer CURSOR_OP_UPDATE = new Integer(33);
    private static final Integer CURSOR_OP_DELETE = new Integer(34);

    /**
     * The row is dirty and needs to be reloaded (internal state).
     */
    private static final Integer SQL_ROW_DIRTY   = new Integer(0);

    /**
     * The row is valid.
     */
    private static final Integer SQL_ROW_SUCCESS = new Integer(1);

    /**
     * The row has been deleted.
     */
    private static final Integer SQL_ROW_DELETED = new Integer(2);

    /*
     * Instance variables.
     */
    /** The prepared statment handle from prepare/prepexec. */
    private Integer prepStmtHandle;
    /** Set when moveToInsertRow() was called. */
    private boolean onInsertRow;
    /** The "insert row". */
    private ParamInfo[] insertRow;
    /** The "update row". */
    private ParamInfo[] updateRow;
    /** The row cache used instead {@link #currentRow}. */
    private Object[][] rowCache;
    /** Actual position of the cursor. */
    private int cursorPos;

    //
    // Fixed sp_XXX parameters
    //
    /** Cursor handle parameter. */
    private final ParamInfo PARAM_CURSOR_HANDLE = new ParamInfo(Types.INTEGER, null, ParamInfo.INPUT);

    /** sp_cursorfetch fetchtype parameter. */
    private final ParamInfo PARAM_FETCHTYPE = new ParamInfo(Types.INTEGER, null, ParamInfo.INPUT);

    /** sp_cursorfetch rownum IN parameter (for actual fetches). */
    private final ParamInfo PARAM_ROWNUM_IN = new ParamInfo(Types.INTEGER, null, ParamInfo.INPUT);

    /** sp_cursorfetch numrows IN parameter (for actual fetches). */
    private final ParamInfo PARAM_NUMROWS_IN = new ParamInfo(Types.INTEGER, new Integer(1), ParamInfo.INPUT);

    /** sp_cursorfetch rownum OUT parameter (for FETCH_INFO). */
    private final ParamInfo PARAM_ROWNUM_OUT = new ParamInfo(Types.INTEGER, null, ParamInfo.OUTPUT);

    /** sp_cursorfetch numrows OUT parameter (for FETCH_INFO). */
    private final ParamInfo PARAM_NUMROWS_OUT = new ParamInfo(Types.INTEGER, null, ParamInfo.OUTPUT);

    /** sp_cursor optype parameter. */
    private final ParamInfo PARAM_OPTYPE = new ParamInfo(Types.INTEGER, null, ParamInfo.INPUT);

    /** sp_cursor rownum parameter. */
    private final ParamInfo PARAM_ROWNUM = new ParamInfo(Types.INTEGER, new Integer(1), ParamInfo.INPUT);

    /** sp_cursor table parameter. */
    private final ParamInfo PARAM_TABLE = new ParamInfo(Types.VARCHAR, "", ParamInfo.UNICODE);

    /**
     * Construct a cursor result set using Microsoft sp_cursorcreate etc.
     *
     * @param statement The parent statement object or null.
     * @param resultSetType one of FORWARD_ONLY, SCROLL_INSENSITIVE, SCROLL_SENSITIVE.
     * @param concurrency One of CONCUR_READ_ONLY, CONCUR_UPDATE.
     * @throws SQLException
     */
    MSCursorResultSet(JtdsStatement statement,
                      String sql,
                      String procName,
                      ParamInfo[] procedureParams,
                      int resultSetType,
                      int concurrency)
            throws SQLException {
        super(statement, resultSetType, concurrency, null, false);

        rowCache = new Object[fetchSize][];

        cursorCreate(sql, procName, procedureParams);
    }

    /**
     * Set the specified column's data value.
     *
     * @param colIndex The index of the column in the row.
     * @param value The new column value.
     */
    protected void setColValue(int colIndex, int jdbcType, Object value, int length)
            throws SQLException {

        super.setColValue(colIndex, jdbcType, value, length);

        if (!onInsertRow && getCurrentRow() == null) {
            throw new SQLException(Messages.get("error.resultset.norow"), "24000");
        }
        colIndex--;
        ParamInfo pi;
        ColInfo ci = columns[colIndex];

        if (onInsertRow) {
            pi = insertRow[colIndex];
        } else {
            if (updateRow == null) {
                updateRow = new ParamInfo[columnCount];
            }
            pi = updateRow[colIndex];
        }

        if (pi == null) {
            pi = new ParamInfo(-1);
            pi.name = '@'+ci.realName;
            pi.collation = ci.collation;
            pi.charsetInfo = ci.charsetInfo;
            if (onInsertRow) {
                insertRow[colIndex] = pi;
            } else {
                updateRow[colIndex] = pi;
            }
        }

        if (value == null) {
            pi.value    = null;
            pi.length   = 0;
            pi.jdbcType = ci.jdbcType;
            pi.isSet    = true;
        } else {
            pi.value     = value;
            pi.length    = length;
            pi.isSet     = true;
            pi.jdbcType  = jdbcType;
            pi.isUnicode = ci.sqlType.equals("ntext")
                    || ci.sqlType.equals("nchar")
                    || ci.sqlType.equals("nvarchar");
        }
    }

    /**
     * Get the specified column's data item.
     *
     * @param index the column index in the row
     * @return the column value as an Object
     * @throws SQLException if the index is out of bounds or there is no
     *                      current row
     */
    protected Object getColumn(int index) throws SQLException {
        checkOpen();

        if (index < 1 || index > columnCount) {
            throw new SQLException(Messages.get("error.resultset.colindex",
                    Integer.toString(index)),
                    "07009");
        }

        Object[] currentRow;
        if (onInsertRow || (currentRow = getCurrentRow()) == null) {
            throw new SQLException(
                    Messages.get("error.resultset.norow"), "24000");
        }

        if (SQL_ROW_DIRTY.equals(currentRow[columns.length - 1])) {
            cursorFetch(FETCH_REPEAT, 0);
            currentRow = getCurrentRow();
        }

        Object data = currentRow[index - 1];
        wasNull = data == null;

        return data;
    }

    /**
     * Translates a JDBC result set type into SQL Server native @scrollOpt value
     * for use with stored procedures such as sp_cursoropen, sp_cursorprepare
     * or sp_cursorprepexec.
     *
     * @param resultSetType JDBC result set type (one of the
     *                      ResultSet.TYPE_XXX values)
     * @return a value for the @scrollOpt parameter
     */
    static int getCursorScrollOpt(int resultSetType, boolean parameterized) {
        int scrollOpt;

        switch (resultSetType) {
            case TYPE_SCROLL_INSENSITIVE:
                scrollOpt = CURSOR_TYPE_STATIC;
                break;

            case TYPE_SCROLL_SENSITIVE:
                scrollOpt = CURSOR_TYPE_KEYSET;
                break;

            case TYPE_FORWARD_ONLY:
            default:
                scrollOpt = CURSOR_TYPE_FORWARD;
                break;
        }

        // If using sp_cursoropen need to set a flag on scrollOpt.
        // The 0x1000 tells the server that there is a parameter
        // definition and user parameters present. If this flag is
        // not set the driver will ignore the additional parameters.
        if (parameterized) {
            scrollOpt |= CURSOR_TYPE_PARAMETERIZED;
        }

        return scrollOpt;
    }

    /**
     * Translates a JDBC result set concurrency into SQL Server native @ccOpt
     * value for use with stored procedures such as sp_cursoropen,
     * sp_cursorprepare or sp_cursorprepexec.
     *
     * @param resultSetConcurrency JDBC result set concurrency (one of the
     *                             ResultSet.CONCUR_XXX
     *                             values)
     * @return a value for the @scrollOpt parameter
     */
    static int getCursorConcurrencyOpt(int resultSetConcurrency) {
        switch (resultSetConcurrency) {
            case CONCUR_READ_ONLY:
            default:
                return CURSOR_CONCUR_READ_ONLY;

            case CONCUR_UPDATABLE:
                return CURSOR_CONCUR_SCROLL_LOCKS;
        }
    }

    /**
     * Create a new Cursor result set using the internal sp_cursoropen procedure.
     *
     * @param sql The SQL SELECT statement.
     * @param procName Optional procedure name for cursors based on a stored procedure.
     * @param parameters Optional stored procedure parameters.
     * @throws SQLException
     */
    private void cursorCreate(String sql,
                              String procName,
                              ParamInfo[] parameters)
            throws SQLException {
        TdsCore tds = statement.getTds();
        int prepareSql = statement.connection.getPrepareSql();

        //
        // If this cursor is going to be a named forward only cursor
        // force the concurrency to be updateable.
        // TODO: Cursor is updateable unless user appends FOR READ to the select
        // but we would need to parse the SQL to discover this.
        //
        if (cursorName != null
            && resultSetType == ResultSet.TYPE_FORWARD_ONLY
            && concurrency == ResultSet.CONCUR_READ_ONLY) {
            concurrency = ResultSet.CONCUR_UPDATABLE;
        }
        //
        // Simplify future tests for parameters
        //
        if (parameters != null && parameters.length == 0) {
            parameters = null;
        }
        //
        // If there are no parameters we will opt for
        // the sp_cursoropen option only.
        //
        // TODO Is this really the best solution? What if the query is complex?
        if (parameters == null) {
            prepareSql = TdsCore.UNPREPARED;
        }
        //
        // SQL 6.5 does not support stored procs (with params) in the sp_cursor call
        // will need to substitute any parameter values into the SQL.
        //
        if (tds.getTdsVersion() == Driver.TDS42) {
            prepareSql = TdsCore.UNPREPARED;
            if (parameters != null) {
                procName = null;
            }
        }
        //
        // If we are running in unprepare mode and there are parameters
        // substitute these into the SQL statement now.
        //
        if (parameters != null && prepareSql == TdsCore.UNPREPARED) {
            sql = Support.substituteParameters(sql, parameters, tds.getTdsVersion());
            parameters = null;
        }
        //
        // For most prepare modes we need to substitute parameter
        // names for the ? markers.
        //
        if (parameters != null) {
            if (procName == null || !procName.startsWith("#jtds")) {
                sql = Support.substituteParamMarkers(sql, parameters);
            }
        }
        //
        // There are generally three situations in which procName is not null:
        // 1. Running in prepareSQL=1 and contains a temp proc name e.g. #jtds00001
        //    in which case we need to generate an SQL statement exec #jtds...
        // 2. Running in prepareSQL=4 and contains an existing statement handle.
        // 3. CallableStatement in which case the SQL string has a valid exec
        //    statement and we can ignore procName.
        //
        if (procName != null) {
            if (procName.startsWith("#jtds")) {
                StringBuffer buf = new StringBuffer(procName.length() + 16
                        + (parameters != null ? parameters.length * 5 : 0));
                buf.append("EXEC ").append(procName).append(' ');
                for (int i = 0; parameters != null && i < parameters.length; i++) {
                    if (i != 0) {
                        buf.append(',');
                    }
                    if (parameters[i].name != null) {
                        buf.append(parameters[i].name);
                    } else {
                        buf.append("@P").append(i);
                    }
                }
                sql = buf.toString();
            } else
            // Prepared Statement Handle?
            if (TdsCore.isPreparedProcedureName(procName)) {
                //
                // At present procName is set to the value obtained by
                // the connection.prepareSQL() call in JtdsPreparedStatement.
                // This handle was obtained using sp_cursorprepare not sp_prepare
                // so it's ok to use here.
                //
                try {
                    prepStmtHandle = new Integer(procName);
                } catch (NumberFormatException e) {
                    throw new IllegalStateException(
                               "Invalid prepared statement handle: " +
                                      procName);
                }
            }
        }

        //
        // Select the correct type of Server side cursor to
        // match the scroll and concurrency options.
        //
        int scrollOpt = getCursorScrollOpt(resultSetType, parameters != null);
        int ccOpt = getCursorConcurrencyOpt(concurrency);

        //
        // Create parameter objects
        //
        // Setup scroll options parameter
        //
        ParamInfo pScrollOpt  = new ParamInfo(Types.INTEGER, new Integer(scrollOpt), ParamInfo.OUTPUT);
        //
        // Setup concurrency options parameter
        //
        ParamInfo pConCurOpt  = new ParamInfo(Types.INTEGER, new Integer(ccOpt), ParamInfo.OUTPUT);
        //
        // Setup number of rows parameter
        //
        ParamInfo pRowCount   = new ParamInfo(Types.INTEGER, null, ParamInfo.OUTPUT);
        //
        // Setup cursor handle parameter
        //
        ParamInfo pCursor = new ParamInfo(Types.INTEGER, null, ParamInfo.OUTPUT);
        //
        // Setup statement handle param
        //
        ParamInfo pStmtHand = null;
        if (prepareSql == TdsCore.PREPEXEC || prepareSql == TdsCore.PREPARE) {
            pStmtHand = new ParamInfo(Types.INTEGER, prepStmtHandle, ParamInfo.OUTPUT);
        }
        //
        // Setup parameter definitions parameter
        //
        ParamInfo pParamDef = null;
        if (parameters != null ) {
            // Parameter declarations
            for (int i = 0; i < parameters.length; i++) {
                TdsData.getNativeType(statement.connection, parameters[i]);
            }

            pParamDef  = new ParamInfo(Types.LONGVARCHAR,
                    Support.getParameterDefinitions(parameters),
                    ParamInfo.UNICODE);
        }
        //
        // Setup SQL statement parameter
        //
        ParamInfo pSQL = new ParamInfo(Types.LONGVARCHAR, sql, ParamInfo.UNICODE);
        //
        // If using the prepare/execute model, now need to pepare SQL
        //
        if (prepareSql == TdsCore.PREPARE && prepStmtHandle == null) {
            ParamInfo params[] = new ParamInfo[6];

            // Setup statement handle param
            params[0] = pStmtHand;

            // Setup parameter definitions
            params[1] = pParamDef;

            // Setup statement param
            params[2] = pSQL;

            // Setup flag param
            params[3] = new ParamInfo(Types.INTEGER, new Integer(1), ParamInfo.INPUT);
            // Setup scroll options
            params[4] = pScrollOpt;
            // Setup concurrency options
            params[5] = pConCurOpt;

            columns = null; // Will be populated if preparing a select

            // Use sp_cursorprepare approach
            tds.executeSQL(null, "sp_cursorprepare", params, false, statement.getQueryTimeout(), -1, true);
            tds.clearResponseQueue();

            // columns will now hold meta data for select statements
            prepStmtHandle = (Integer) pStmtHand.getOutValue();

            if (prepStmtHandle == null) {
                // Some types of statements cannot be prepared
                prepareSql = TdsCore.UNPREPARED;
                if (parameters != null) {
                    // Ensure that sp_cursoropen will recognise user params
                    pScrollOpt.value = new Integer(
                            ((Integer)pScrollOpt.getOutValue()).intValue() | 0x1000);
                }
            }
        }
        //
        // OK now open the Cursor
        //
        if (prepareSql == TdsCore.PREPARE && prepStmtHandle != null) {
            // Use sp_cursorexecute approach
            ParamInfo[] params = new ParamInfo[5 + parameters.length];
            System.arraycopy(parameters, 0, params, 5, parameters.length);
            // Setup statement handle param
            pStmtHand.isOutput = false;
            pStmtHand.value = prepStmtHandle;
            params[0] = pStmtHand;
            // Setup cursor handle param
            params[1] = pCursor;
            // Setup scroll options (mask off parameter flag)
            pScrollOpt.value = new Integer(
                    ((Integer)pScrollOpt.getOutValue()).intValue() & 0XFF);
            params[2] = pScrollOpt;
            // Setup concurrency options
            params[3] = pConCurOpt;
            // Setup numRows parameter
            params[4] = pRowCount;
            parameters = params;
            procName = "sp_cursorexecute";
        } else if (prepareSql == TdsCore.PREPEXEC) {
            // Use sp_cursorprepexec approach
            ParamInfo[] params = new ParamInfo[7 + parameters.length];
            System.arraycopy(parameters, 0, params, 7, parameters.length);

            // Setup statement handle param
            params[0] = pStmtHand;

            // Setup cursor handle param
            params[1] = pCursor;

            // Setup parameter definitions
            params[2] = pParamDef;

            // Setup statement param
            params[3] = pSQL;

            // Setup scroll options
            params[4] = pScrollOpt;

            // Setup concurrency options
            params[5] = pConCurOpt;

            // Setup numRows parameter
            params[6] = pRowCount;

            parameters = params;

            procName = "sp_cursorprepexec";
        } else {
            // Use sp_cursoropen approach
            ParamInfo[] params;

            if (parameters == null) {
                params = new ParamInfo[5];
            } else {
                params = new ParamInfo[6 + parameters.length];
                System.arraycopy(parameters, 0, params, 6, parameters.length);
                params[5] = pParamDef;
            }
            // Setup cursor handle param
            params[0] = pCursor;

            // Setup statement param
            params[1] = pSQL;

            // Setup scroll options
            params[2] = pScrollOpt;

            // Setup concurrency options
            params[3] = pConCurOpt;

            // Setup numRows parameter
            params[4] = pRowCount;

            parameters = params;

            procName = "sp_cursoropen";
        }

        tds.executeSQL(null, procName, parameters, false,
                statement.getQueryTimeout(), statement.getMaxRows(), true);

        while (!tds.getMoreResults() && !tds.isEndOfResponse());

        if (tds.isResultSet()) {
            this.columns = copyInfo(tds.getColumns());
            this.columnCount = getColumnCount(columns);
        } else {
            statement.getMessages().addException(new SQLException(
                    Messages.get("error.statement.noresult"), "24000"));
        }

        tds.clearResponseQueue();
        statement.messages.checkErrors();
        Integer retVal = tds.getReturnStatus();

        int actualScroll;
        int actualCc;

        //
        // Retrieve values of output parameters
        //
        PARAM_CURSOR_HANDLE.value = pCursor.getOutValue();
        actualScroll = ((Integer)pScrollOpt.getOutValue()).intValue();
        actualCc     = ((Integer)pConCurOpt.getOutValue()).intValue();
        rowsInResult = ((Integer)pRowCount.getOutValue()).intValue();
        if (prepareSql == TdsCore.PREPEXEC) {
            prepStmtHandle = (Integer)pStmtHand.getOutValue();
        }

        if ((retVal == null) || (retVal.intValue() != 0)) {
            throw new SQLException(Messages.get("error.resultset.openfail"), "24000");
        }
        //
        // Set the cursor name if required allowing positioned updates.
        // We need to do this here as any downgrade warnings will be wiped
        // out by the executeSQL call.
        //
        if (cursorName != null) {
            ParamInfo params[] = new ParamInfo[3];
            params[0] = PARAM_CURSOR_HANDLE;
            PARAM_OPTYPE.value = new Integer(2);
            params[1] = PARAM_OPTYPE;
            params[2] = new ParamInfo(Types.VARCHAR, cursorName, ParamInfo.INPUT);
            tds.executeSQL(null, "sp_cursoroption", params, true, 0, -1, true);
            tds.clearResponseQueue();
            if (tds.getReturnStatus().intValue() != 0) {
                throw new SQLException(Messages.get("error.resultset.openfail"), "24000");
            }
        }
        //
        // Check for downgrade of scroll or concurrency options
        //
        if ((actualScroll != (scrollOpt & 0xFFF)) || (actualCc != ccOpt)) {
            if (actualScroll != scrollOpt) {
                switch (actualScroll) {
                    case CURSOR_TYPE_FORWARD:
                        this.resultSetType = TYPE_FORWARD_ONLY;
                        break;

                    case CURSOR_TYPE_STATIC:
                        this.resultSetType = TYPE_SCROLL_INSENSITIVE;
                        break;

                    case CURSOR_TYPE_DYNAMIC:
                    case CURSOR_TYPE_KEYSET:
                        this.resultSetType = TYPE_SCROLL_SENSITIVE;
                        break;

                    default:
                        statement.getMessages().addWarning(new SQLWarning(
                                Messages.get("warning.cursortype", Integer.toString(actualScroll)),
                                "01000"));
                }
            }

            if (actualCc != ccOpt) {
                switch (actualCc) {
                    case CURSOR_CONCUR_READ_ONLY:
                        concurrency = CONCUR_READ_ONLY;
                        break;

                    case CURSOR_CONCUR_SCROLL_LOCKS:
                    case CURSOR_CONCUR_OPTIMISTIC:
                        concurrency = CONCUR_UPDATABLE;
                        break;

                    default:
                        statement.getMessages().addWarning(new SQLWarning(
                                Messages.get("warning.concurrtype", Integer.toString(actualCc)),
                                "01000"));
                }
            }

            // SAfe This warning goes to the Statement, not the ResultSet
            statement.addWarning(new SQLWarning(Messages.get(
                    "warning.cursordowngraded", resultSetType + "/" + concurrency), "01000"));
        }

        //
        // TODO: Save the value of the prepStmtHandle for reuse later
        //
    }

    /**
     * Fetch the next result row from a cursor using the internal sp_cursorfetch procedure.
     *
     * @param fetchType The type of fetch eg FETCH_ABSOLUTE.
     * @param rowNum The row number to fetch.
     * @return boolean true if a result set row is returned.
     * @throws SQLException
     */
    private boolean cursorFetch(Integer fetchType, int rowNum)
            throws SQLException {
        TdsCore tds = statement.getTds();

        statement.clearWarnings();

        if (fetchType != FETCH_ABSOLUTE && fetchType != FETCH_RELATIVE) {
            rowNum = 1;
        }

        ParamInfo[] param = new ParamInfo[4];
        // Setup cursor handle param
        param[0] = PARAM_CURSOR_HANDLE;

        // Setup fetchtype param
        PARAM_FETCHTYPE.value = fetchType;
        param[1] = PARAM_FETCHTYPE;

        // Setup rownum
        PARAM_ROWNUM_IN.value = new Integer(rowNum);
        param[2] = PARAM_ROWNUM_IN;
        // Setup numRows parameter
        if (((Integer) PARAM_NUMROWS_IN.value).intValue() != fetchSize) {
            // If the fetch size changed, update the parameter and cache size
            PARAM_NUMROWS_IN.value = new Integer(fetchSize);
            rowCache = new Object[fetchSize][];
        }
        param[3] = PARAM_NUMROWS_IN;

        synchronized (tds) {
            // No meta data, no timeout (we're not sending it yet), no row
            // limit, don't send yet
            tds.executeSQL(null, "sp_cursorfetch", param, true, 0, 0, false);

            // Setup fetchtype param
            PARAM_FETCHTYPE.value = FETCH_INFO;
            param[1] = PARAM_FETCHTYPE;

            // Setup rownum
            PARAM_ROWNUM_OUT.clearOutValue();
            param[2] = PARAM_ROWNUM_OUT;
            // Setup numRows parameter
            PARAM_NUMROWS_OUT.clearOutValue();
            param[3] = PARAM_NUMROWS_OUT;

            // No meta data, use the statement timeout, leave max rows as it is
            // (no limit), send now
            tds.executeSQL(null, "sp_cursorfetch", param, true,
                    statement.getQueryTimeout(), -1, true);
        }

        while (!tds.getMoreResults() && !tds.isEndOfResponse());

        int i = 0;
        if (tds.isResultSet()) {
            // With TDS 7 the data row (if any) is sent without any
            // preceding resultset header.
            // With TDS 8 there is a dummy result set header first
            // then the data. This case also used if meta data not supressed.
            if (tds.isRowData() || tds.getNextRow()) {
                do {
                    rowCache[i++] = copyRow(tds.getRowData());
                } while (tds.getNextRow());
            }
        }
        // Set the rest of the rows to null
        for (; i < rowCache.length; ++i) {
            rowCache[i] = null;
        }

        tds.clearResponseQueue();

        pos = ((Integer) PARAM_ROWNUM_OUT.getOutValue()).intValue();
        cursorPos = pos;
        rowsInResult = ((Integer) PARAM_NUMROWS_OUT.getOutValue()).intValue();

        statement.getMessages().checkErrors();

        return getCurrentRow() != null;
    }

    /**
     * Support general cursor operations such as delete, update etc.
     *
     * @param opType the type of operation to perform
     * @param row    the row number to update
     * @throws SQLException
     */
    private void cursor(Integer opType , ParamInfo[] row) throws SQLException {
        TdsCore tds = statement.getTds();

        statement.clearWarnings();
        ParamInfo param[];

        if (opType == CURSOR_OP_DELETE) {
            // 3 parameters for delete
            param = new ParamInfo[3];
        } else {
            if (row == null) {
                throw new SQLException(Messages.get("error.resultset.update"), "24000");
            }
            // 4 parameters plus one for each column for insert/update
            param = new ParamInfo[4 + columnCount];
        }

        // Setup cursor handle param
        param[0] = PARAM_CURSOR_HANDLE;

        // Setup optype param
        PARAM_OPTYPE.value = opType;
        param[1] = PARAM_OPTYPE;

        // Setup rownum
        PARAM_ROWNUM.value = new Integer(pos - cursorPos + 1);
        param[2] = PARAM_ROWNUM;

        // If row is not null, we're dealing with an insert/update
        if (row != null) {
            // Setup table
            param[3] = PARAM_TABLE;

            int colCnt = columnCount;
            // Current column; we will only update/insert columns for which
            // values were specified
            int crtCol = 4;
            // Name of the table to insert default values into (if necessary)
            String tableName = null;

            for (int i = 0; i < colCnt; i++) {
                ParamInfo pi = row[i];
                ColInfo col = columns[i];

                if (pi != null && pi.isSet) {
                    if (!col.isWriteable) {
                        // Column is read-only but was updated
                        throw new SQLException(Messages.get("error.resultset.insert",
                                Integer.toString(i + 1), col.realName), "24000");
                    }

                    param[crtCol++] = pi;
                }
                if (tableName == null && col.tableName != null) {
                    if (col.catalog != null || col.schema != null) {
                        tableName = (col.catalog != null ? col.catalog : "")
                                + "." + (col.schema != null ? col.schema : "")
                                + "." + col.tableName;
                    } else {
                        tableName = col.tableName;
                    }
                }
            }

            if (crtCol == 4) {
                if (opType == CURSOR_OP_INSERT) {
                    // Insert default values for all columns.
                    // There seem to be two forms of sp_cursor: one with
                    // parameter names and values and one w/o names and with
                    // expressions (this is where 'default' comes in).
                    param[crtCol] = new ParamInfo(Types.VARCHAR,
                            "insert " + tableName + " default values",
                            ParamInfo.UNICODE);
                    crtCol++;
                } else {
                    // No column to update so bail out!
                    return;
                }
            }

            // If the count is different (i.e. there were read-only
            // columns) reallocate the parameters into a shorter array
            if (crtCol != colCnt + 4) {
                ParamInfo[] newParam = new ParamInfo[crtCol];

                System.arraycopy(param, 0, newParam, 0, crtCol);
                param = newParam;
            }
        }

        synchronized (tds) {
            // With meta data (we're not expecting any ResultSets), no timeout
            // (because we're not sending the request yet), don't alter max
            // rows, don't send yet
            tds.executeSQL(null, "sp_cursor", param, false, 0, -1, false);

            if (param.length != 4) {
                param = new ParamInfo[4];
                param[0] = PARAM_CURSOR_HANDLE;
            }

            // Setup fetchtype param
            PARAM_FETCHTYPE.value = FETCH_INFO;
            param[1] = PARAM_FETCHTYPE;

            // Setup rownum
            PARAM_ROWNUM_OUT.clearOutValue();
            param[2] = PARAM_ROWNUM_OUT;
            // Setup numRows parameter
            PARAM_NUMROWS_OUT.clearOutValue();
            param[3] = PARAM_NUMROWS_OUT;

            // No meta data (no ResultSets expected), use statement timeout,
            // don't alter max rows, send now
            tds.executeSQL(null, "sp_cursorfetch", param, true,
                    statement.getQueryTimeout(), -1, true);
        }

        // Consume the sp_cursor response
        tds.consumeOneResponse();
        statement.getMessages().checkErrors();
        Integer retVal = tds.getReturnStatus();
        if (retVal.intValue() != 0) {
            throw new SQLException(Messages.get("error.resultset.cursorfail"),
                    "24000");
        }

        //
        // Allow row values to be garbage collected
        //
        if (row != null) {
            for (int i = 0; i < row.length; i++) {
                if (row[i] != null) {
                    row[i].clearInValue();
                }
            }
        }

        // Consume the sp_cursorfetch response
        tds.clearResponseQueue();
        statement.getMessages().checkErrors();
        cursorPos = ((Integer) PARAM_ROWNUM_OUT.getOutValue()).intValue();
        rowsInResult = ((Integer) PARAM_NUMROWS_OUT.getOutValue()).intValue();

        // Update row status
        if (opType == CURSOR_OP_DELETE || opType == CURSOR_OP_UPDATE) {
            Object[] currentRow = getCurrentRow();
            if (currentRow == null) {
                throw new SQLException(
                        Messages.get("error.resultset.updatefail"), "24000");
            }
            // No need to re-fetch the row, just mark it as deleted or dirty
            currentRow[columns.length - 1] =
                    (opType == CURSOR_OP_DELETE) ? SQL_ROW_DELETED : SQL_ROW_DIRTY;
        }
    }

    /**
     * Close a server side cursor.
     *
     * @throws SQLException
     */
    private void cursorClose() throws SQLException {
        TdsCore tds = statement.getTds();

        statement.clearWarnings();

        ParamInfo param[] = new ParamInfo[1];

        // Setup cursor handle param
        param[0] = PARAM_CURSOR_HANDLE;

        tds.executeSQL(null, "sp_cursorclose", param, false, statement.getQueryTimeout(), -1, true);
        tds.clearResponseQueue();
        statement.getMessages().checkErrors();
        //
        // If using prepared statements unprepare now to prevent resource leaks on server.
        //
        if (prepStmtHandle != null) {
            param[0].value = prepStmtHandle;
            tds.executeSQL(null, "sp_cursorunprepare", param, false, statement.getQueryTimeout(), -1, true);
            tds.clearResponseQueue();
            statement.getMessages().checkErrors();
        }
    }

//
// -------------------- java.sql.ResultSet methods -------------------
//

    public void afterLast() throws SQLException {
        checkOpen();
        checkScrollable();

        if (pos != POS_AFTER_LAST) {
            // SAfe Just fetch a very large absolute value
            cursorFetch(FETCH_ABSOLUTE, Integer.MAX_VALUE);
        }
    }

    public void beforeFirst() throws SQLException {
        checkOpen();
        checkScrollable();

        if (pos != POS_BEFORE_FIRST) {
            cursorFetch(FETCH_ABSOLUTE, 0);
        }
    }

    public void cancelRowUpdates() throws SQLException {
        checkOpen();
        checkUpdateable();

        if (onInsertRow) {
            throw new SQLException(Messages.get("error.resultset.insrow"), "24000");
        }

        for (int i = 0; updateRow != null && i < updateRow.length; i++) {
            if (updateRow[i] != null) {
                updateRow[i].clearInValue();
            }
        }
    }

    public void close() throws SQLException {
        if (!closed) {
            try {
                if (!statement.getConnection().isClosed()) {
                    cursorClose();
                }
            } finally {
                closed    = true;
                statement = null;
            }
        }
    }

    public void deleteRow() throws SQLException {
        checkOpen();
        checkUpdateable();

        if (getCurrentRow() == null) {
            throw new SQLException(Messages.get("error.resultset.norow"), "24000");
        }

        if (onInsertRow) {
            throw new SQLException(Messages.get("error.resultset.insrow"), "24000");
        }

        cursor(CURSOR_OP_DELETE, null);
    }

    public void insertRow() throws SQLException {
        checkOpen();
        checkUpdateable();

        if (!onInsertRow) {
            throw new SQLException(Messages.get("error.resultset.notinsrow"), "24000");
        }

        cursor(CURSOR_OP_INSERT, insertRow);
    }

    public void moveToCurrentRow() throws SQLException {
        checkOpen();
        checkUpdateable();

        onInsertRow = false;
    }

    public void moveToInsertRow() throws SQLException {
        checkOpen();
        checkUpdateable();
        if (insertRow == null) {
            insertRow = new ParamInfo[columnCount];
        }
        onInsertRow = true;
    }

    public void refreshRow() throws SQLException {
        checkOpen();

        if (onInsertRow) {
            throw new SQLException(Messages.get("error.resultset.insrow"), "24000");
        }

        // Save and restore current position
        int crtPos = pos;
        cursorFetch(FETCH_REPEAT, 0);
        pos = crtPos;
    }

    public void updateRow() throws SQLException {
        checkOpen();
        checkUpdateable();

        if (getCurrentRow() == null) {
            throw new SQLException(Messages.get("error.resultset.norow"), "24000");
        }

        if (onInsertRow) {
            throw new SQLException(Messages.get("error.resultset.insrow"), "24000");
        }

        cursor(CURSOR_OP_UPDATE, updateRow);
    }

    public boolean first() throws SQLException {
        checkOpen();
        checkScrollable();

        pos = 1;
        if (getCurrentRow() == null) {
            return cursorFetch(FETCH_FIRST, 0);
        } else {
            return true;
        }
    }

    // FIXME Make the isXXX() methods work with forward-only cursors (rowsInResult == -1)
    public boolean isLast() throws SQLException {
        checkOpen();

        return(pos == rowsInResult) && (rowsInResult != 0);
    }

    public boolean last() throws SQLException {
        checkOpen();
        checkScrollable();

        pos = rowsInResult;
        if (getCurrentRow() == null) {
            if (cursorFetch(FETCH_LAST, 0)) {
                // Set pos to the last row, as the number of rows can change
                pos = rowsInResult;
                return true;
            } else {
                return false;
            }
        } else {
            return true;
        }
    }

    public boolean next() throws SQLException {
        checkOpen();

        ++pos;
        if (getCurrentRow() == null) {
            return cursorFetch(FETCH_NEXT, 0);
        } else {
            return true;
        }
    }

    public boolean previous() throws SQLException {
        checkOpen();
        checkScrollable();

        // Save current ResultSet position
        int initPos = pos;
        // Decrement current position
        --pos;
        if (initPos == POS_AFTER_LAST || getCurrentRow() == null) {
            boolean res = cursorFetch(FETCH_PREVIOUS, 0);
            pos = (initPos == POS_AFTER_LAST) ? rowsInResult : (initPos - 1);
            return res;
        } else {
            return true;
        }
    }

    public boolean rowDeleted() throws SQLException {
        checkOpen();

        Object[] currentRow = getCurrentRow();

        // If there is no current row, return false (the row was not deleted)
        if (currentRow == null) {
            return false;
        }

        // Reload if dirty
        if (SQL_ROW_DIRTY.equals(currentRow[columns.length - 1])) {
            // Save and restore ResultSet position
            int crtPos = pos;
            cursorFetch(FETCH_REPEAT, 0);
            pos = crtPos;
            currentRow = getCurrentRow();
        }

        return SQL_ROW_DELETED.equals(currentRow[columns.length - 1]);
    }

    public boolean rowInserted() throws SQLException {
        checkOpen();
        // No way to find out
        return false;
    }

    public boolean rowUpdated() throws SQLException {
        checkOpen();
        // No way to find out
        return false;
    }

    public boolean absolute(int row) throws SQLException {
        checkOpen();
        checkScrollable();

        pos = row;
        if (getCurrentRow() == null) {
            return cursorFetch(FETCH_ABSOLUTE, row);
        } else {
            return true;
        }
    }

    public boolean relative(int row) throws SQLException {
        checkOpen();
        checkScrollable();

        pos += row;
        if (getCurrentRow() == null) {
            return cursorFetch(FETCH_RELATIVE, row);
        } else {
            return true;
        }
    }

    private Object[] getCurrentRow() {
        if (pos < cursorPos || pos >= cursorPos + rowCache.length) {
            return null;
        }

        return rowCache[pos - cursorPos];
    }
}


text:
"Bloody Bloody Andrew Jackson" on Broadway
Bloody Bloody Andrew Jackson is a bloody brilliant musical! It's everything I want musical theater to be: original, challenging, engaging, thrilling, thought-provoking, hilarious, and with a rocking score. This is not your grandmother's musical, nor is it for kids. But if, like me, you love the art form that is musical theater and believe it can and should make a strong statement about the world we live in, it's just what the doctor ordered.
Walking into the Jacobs Theater, we knew we were in for an awesome experience. I've never seen a theater decked out like this. It was red. Everywhere, everything, red. There were strings of red lights covering the ceiling and walls, which made everything a bloody glow. Portraits of President Andrew Jackson adorned the walls, as did (hopefully faux) animal heads. And in the middle of the theater, hanging upside down, was a dead horse! (I'm glad I didn't have a seat directly below that.) It set the tone for the evening, and when the actors walked on stage, the lights went down and the show began.
the bloody red Bernard B. Jacobs Theatre
the dead horse hanging in the middle of the theater
Bloody Bloody Andrew Jackson tells the story of the seventh president of the United States of America, from his humble beginnings on the frontier of Tennessee, to "hero" of wars against the Spanish, English, and Indians, to the White House. It's a "period piece," but with many modern conventions, language, and anachronisms, including microphones, phones, video games, and even a Cosmo magazine. It's a wonderful mishmash of current popular culture and history, which makes it easy to draw parallels between the story that's being told about the early 19th century, and our own time. The show is a political satire that illustrates just how much things haven't changed. Even though the musical has gone through several years of development, the subject is very timely and some of the jokes refer to events in recent weeks. I have a feeling they'll continue to add and tweak jokes to reflect the political scandal du jour.
Andrew Jackson has dreams of overthrowing the Washington "elite" and becoming "the people's president," but he soon discovers that a president has to make the hard decisions, and is never going to please everyone. "The president doesn't have the luxury of having friends." One of the things Jackson is most known for is "Indian removal," having convinced many Native American tribes to sign treaties and move west, resulting in the infamous Trail of Tears. As the narrator (a hilarious woman in an ugly sweater and glasses, riding a scooter) said, historians are still debating whether Jackson was a hero or a genocidal murderer.
The cast is gorgeous and talented, dressed in a sort of pioneer/modern/hip wardrobe. The action is largely over the top and campy, and a heck of a lot of fun. The score is what they call "emo-rock" and is great to listen to; I've been singing "Populism, Yea, Yea," and "Life sucks, and my life sucks in particular" all day! The band consists of a drummer and two guitar/keyboard players, who also at times function as characters in the action. The choreography was cool and edgy. The show reminded me a little of the equally brilliant Spring Awakening (which I'm going to see in November at the Orpheum Theatre in Minneapolis, go see it if you're interested in a great modern rock musical). Both are set in a specific time in the past, but the themes easily translate to today. The rock score and use of hand held mics is also similar, but Spring Awakening has a more somber tone, where BBAJ is pure campy fun and dark humor. I hope this show receives the acclaim and success that Spring Awakening did.
After the show we waited at the stage door to talk to the actors. You can tell it's a new show (it officially opens on October 13 after a few weeks in previews and a successful run at the Public Theater downtown earlier this year). There wasn't any organization to the stage door and the actors seemed quite pleased to sign our playbills and chat with us. For many of them, this is their Broadway debut. The entire cast is marvelous; it really is an ensemble piece with everyone playing several parts. I especially enjoyed Bryce Pinkham (who appeared recently at the Guthrie in A View from the Bridge) who plays both Indian chief Black Fox and Henry Clay, a creepy ferret-holding politician. Jeff Hiller (who's appeared on such NY based TV shows as 30 Rock, Guiding Light, and Ugly Betty) is a scene stealer in all of his many roles, including the mentally challenged John Quincy Adams and the White House tour guide. The title role is played by Benjamin Walker with strength, vulnerability, humor, a little wackiness, and a whole lot of charisma. He truly is a rock star president in tight jeans! He was very pleasant and friendly at the stage door and happily posed for a picture with us. Unfortunately he's engaged – to Meryl Streep's daughter Mamie Gummer!
me and Kendra with Ben Walker who plays Andrew Jackson
with members of the cast of Bloody Bloody Andrew Jackson
If you're in NYC or planning to be there anytime soon, go see this show. It'll blow you away, make you laugh, and make you want to cry at the messed up state of politics 200 years ago and today. And maybe it'll even get us thinking about a better way to do things. It's encouraging to me that this show is on Broadway at the same time as Scottsboro Boys. Both shows deal with unpleasant periods in the history of our country and the horrible way we've treated people, and still are. Original musical theater as social commentary? I'll take that over Spiderman the Musical any day!
Update: watch a video about opening night here.
Labels: Benjamin Walker, Bernard B. Jacobs Theatre, Bloody Bloody Andrew Jackson, Broadway, Bryce Pinkham, celebrity sighting, Jeff Hiller, Michael Friedman
"String" at Yellow Tree Theatre
"Evita" by Theater Latte Da at the Ordway McKnight...
"Rock of Ages" at the Orpheum
Minnesotans on Broadway
"The Master Butchers Singing Club" at the Guthrie
"Brief Encounter" on Broadway
"A Little Night Music" on Broadway
"The Oldest Story in the World" by Theatre Novi Mo...

redpajama_set_name: RedPajamaCommonCrawl


text:
Q: selelct2 autocomplete not showing values from database This is my code. Callback function shows undefined value.In image You can see I am getting undefined values which are initially fetched from database
THis is HTML
<input type="text" name="city[]" class="itemSearch form-control" id="city_dropdown" value='{{$cities}}'>

PHP CODE:
     $cities = $this->city->select('city_name', 'id')->whereIn('id', $city)->get()->toArray();
            $cities = json_encode($cities);
I get this  [{"city_name":"Badarpur Railway Town","id":321},{"city_name":"Bahbari Gaon","id":322}]  in $cities. which is a value of HTML text box.
 $("#city_dropdown").select2({
      minimumInputLength: 2,
      tags: [],
      ajax: {
          url: adminPath+"pincode/getcitydropdown",
          dataType: 'json',
          type: "GET",
          quietMillis: 50,
          data: function (term) {
              return {
                  term: term
              };
          },
          results: function (data) {
              return {
                  results: $.map(data, function (item) {
                      return {
                          text: item.city_name,
                          id: item.id
                      }
                  })
              };
          }
      }, initSelection : function (element, callback) {
         var elementText = $(element).attr('value');
          callback(JSON.parse(elementText));
      }

  });

redpajama_set_name: RedPajamaStackExchange


Freedom of speech – is it everything?
Over the past few weeks my feed has been filled with book week costumes. In fact, I'm pretty sure it's been book month, not week. Cute kids in cute creations. Proud mammas showing off their genius. I shrank a little inside when a kind soul pointed out kids should be dressing as book characters, not movie or sporting heroes. You see, I'd love to make something strictly book related and awesome with my son. I sew, I'm crafty and I'm partial to Facebook bragging rights. Book week and I should be made for each other. But my boy insisted on going as that modern-day literary hero, Christiano Ronaldo.
Does it seem like there are more and more horrible things happening to women? Or do you think that we are just becoming more aware of them and that attitudes are slowly changing? Voices that may have gone unheard in the past are being listened to? Eyes are finally being opened to existing horrors? We are making progress and with that progress comes the inevitable push back from those who feel something is being stolen from them? I think it might be the latter. I hope it's the latter.


text:
minnesota-golden-gophers
Gophers WR Rashod Bateman named semifinalist for Biletnikoff Award
The award, named after the legendary Oakland Raiders wideout, recognizes the best receiver in college football.
Minnesota wide receiver Rashod Bateman, left, is tripped by Iowa defensive back Riley Moss while running the ball during the second half of an NCAA college football game, Saturday, Nov. 16, 2019, in Iowa City, Iowa. (AP Photo/Matthew Putney)
Author: Dana Thiede
Published: 10:23 AM CST November 18, 2019
He's no longer MInnesota's secret.
Gophers sophomore Rashod Bateman on Monday was named a semifinalist for the prestigious Biletnikoff Award, which recognizes the best receiver in college football.
Bateman is one of a dozen semifinalists, and one of three from the Big Ten Conference who is up for the award.
Through 10 games this year Bateman has 44 catches for 945 yards and seven touchdowns, making him a huge contributor to the Gophers' success. He is just 224 yards shy of tying teammate Tyler Johnson's single season record of 1,169 receiving yards set in 2018 with two games remaining.
Bateman set freshman program records in 2018 with 51 receptions for 704 yards. His six touchdowns during the 2018-19 season rank second. Bateman has caught at least one pass in all 23 games he has played. He caught seven passes for 203 yards against Penn State this year, which was the second most in a game in school history.
The 2019 Biletnikoff Award will be presented live on Dec. 12, 2019, on The Home Depot College Football Awards carried by ESPN.
RELATED: Morgan flourishing as the Gophers' starting QB
Bateman is not the only Gopher attracting national attention. Last week Gophers quarterback Tanner Morgan was named one of 16 semifinalists for the Davey O'Brien National Quarterback Award.
RELATED: Gophers embrace weekly 'championship' philosophy


Remember the Golden Rule? Do unto others as you would have them do unto you? I'm sure that most of us would agree that this should also be a rule we follow in business. Use common sense, differentiate between right and wrong, and treat others fairly and with dignity. Sounds simple, right? The truth, from this writer's opinion, is it should be. However, if it is so simple, then why does every major association, board of directors, company and more have a written statement of core values or code of ethics?
Guidelines: Your organization's statement should be a guideline that defines the persona of the business or organization. Think of this as a value proposition that defines how you want to be and be seen in the eyes of your clients, partners, and even your competitors. Make it a firm foundation where you can stand and make solid business decisions.
Direction: Develop ethical practices and behaviors. Your values statement should be used as the direction for your team, and will guide them in making decisions that are beneficial to the organization as well as the individual. It should serve as a roadmap to making the right decision in sometimes difficult situations. By providing your team with values and ethics, you will create and foster an environment where employees can feel confident about how to handle, or get direction on how to handle an ethical issue before it becomes something much worse.
Measurability: Create a defined set of standards by which you can measure the success of your initiatives and your reputation. As with all business initiatives, the ethical operation of a company is directly related to profitability in both the short and long term. The reputation of that company serves as a litmus test for potential partners, vendors and shareholders. It is imperative that you have something in place to define and measure these metrics. At Imagine every employee is measured each quarter on our core values – we live and breathe our values.
Recently, the Chairman of our Board of Directors at ImagineSoftware, Michael J. Hershman, was named as one of the top 10 most ethical CEO's of 2015 by MBA*. Michael is considered one of the top leaders in the area of corporate transparency and accountability. He has advised various countries governments on matters of ethics, and in 2011 he was brought in to help monitor the FIFA World Cup selection committee. We are honored to have Michael as a part of our team. He is a constant reminder to us that in business, just as much as in our lives, we always need to be above reproach and be our best selves.
In conclusion, how about creating Core Values for your organization?


text:
Poloniex To Partner with Fantom Foundation
Mon, 21st Mar, 2022 - 14:00 GMT
Photo by Uriel SC
Poloniex, a global cryptocurrency exchange, has announced its collaboration with the Fantom Foundation to facilitate the general advancement of its ecosystem. The cryptocurrency exchange aims to support the blockchain by availing more resources to develop more decentralized projects and applications on the Fantom platform.
Also, the exchange will back the foundation through the provision of listing, technical knowledge publications, and anchoring exclusive campaigns.
According to Poloniex General Manager Shaun Scovil, Poloniex strives to contribute to building the industry. It's committed to assisting developers and protocols in unleashing their potential. In the end, the company envisages advancing through its commitment to innovations and blockchain technology.
Strategic Overhaul of Poloniex
Founded in 2014, Poloniex has meteorically grown as a global cryptocurrency exchange. It boasts millions of customers that engage on its platform to trade cryptocurrencies and other financial or digital assets.
It provides different services such as spot and margin trading, leveraged tokens, perpetual contracts, etc. It's currently supporting trades for more than 300 tokens and 450 market pairs.
Moreover, the platform is accessible to users from over 100 countries worldwide. In addition, its services are available in several languages such as English, Russian, Turkish, and others. Through its performance, Poloniex got funding from numerous investors in 2019, of which the Founder of TRON, His Excellency Justin Sun, was part.
While marching into its ninth year, Poloniex had repackaged its brand for better performance and interaction in the industry.
As a global platform, Poloniex is also accelerating its expansion into international markets, such as the Commonwealth of Independent State (CIS), Asia-Pacific (APAC), Middle East and North Africa (MENA), and Latin America (LATAM), to drive overall business growth.
Poloniex also launched its referral Bonanza in March with up to 100,000 USDT reward to reward users and further encourage growth. Details.
Poloniex proved its new move through its vision to launch a trading system with superior performance. Also, the system will teach an advanced API and security. Users will enjoy improved performance and unlimited liquidity through unique features and products.
So, the collaboration of Poloniex with Fantom comes as a positive sign for centralized exchange participation and support for decentralized projects and innovations.
Fantom Reaction to the Collaboration
Reaction to the collaboration with Poloniex, the CEO of Fantom, Michael Kong, expressed excitement in having Poloniex as their supporter. He mentioned that the crypto exchange backing would increase their inspiration for more innovative projects.
Kong revealed Fantom's willingness to partner with more projects. He added that the low cost, security, and fast speed of Fantom are advantages for Ethereum developers to grab their projects.
Fantom is a highly scalable, secure, fast, smart contract protocol that has recently gained much attention. Its high performance depicts its capacity in blockchain technology. In addition, it's reliable, processes millions of transactions per second, and offers meager costs that give it a competitive edge over several protocols.
Fantom remains a conducive and intuitive environment for developers and investors within the industry with its outstanding features.
There have indeed been several misconceptions surrounding the move of Andre Cronje; this has nothing to do with the integrity of Fantom. Andre was an Advisor within the Fantom team and has decided to leave crypto and decentralized finance space. However, the overall records for Fantom are still impressively high.
Fantom boasts a market cap of over $3 billion. Its price is $1.23 per token, showing a rise of 3.51% within 24 hours. Its total value is $100 million. Fantom is still one of the top cryptocurrencies.
PrevPrevious ArticleGrePay and Alchemy Pay Partner to Expand Crypto Payments
Next ArticleGhostwire: Tokyo is the kind of exclusive Xbox Series X desperately needsNext


text:
Q: Google Colab: "Unable to connect to the runtime" after uploading Pytorch model from local I am using a simple (not necessarily efficient) method for Pytorch model saving.
import torch
from google.colab import files

torch.save(model, filename) # save a trained model on the VM
files.download(filename) # download the model to local

best_model = files.upload() # select the model just downloaded
best_model[filename] # access the model

Colab disconnects during execution of the last line, and hitting RECONNECT tab always shows ALLOCATING -> CONNECTING (fails, with "unable to connect to the runtime" message in the left bottom corner) -> RECONNECT. At the same time, executing any one of the cells gives Error message "Failed to execute cell, Could not send execute message to runtime: [object CloseEvent]"
I know it is related to the last line, because I can successfully connect with my other google accounts which doesn't execute that.
Why does it happen? It seems the google accounts which have executed the last line can no longer connect to the runtime.
Edit:
One night later, I can reconnect with the google account after session expiration. I just attempted the approach in the comment, and found that just files.upload() the Pytorch model would lead to the problem. Once the upload completes, Colab disconnects.

A: Try disabling your ad-blocker. Worked for me

A: (I wrote this answer before reading your update. Think it may help.)
files.upload() is just for uploading files. We have no reason to expect it to return some pytorch type/model.
When you call a = files.upload(), a is a dictionary of filename - a big bytes array.
{'my_image.png': b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR....' }
type(a['my_image.png'])

Just like when you do open('my_image', 'b').read()
So, I think the next line best_model[filename] try to print the whole huge bytes array, which bugs the colab.


Craig Issod has been involved in the hearth industry since 1978 and burned wood stoves for heat starting in 1972. Having moved to rural WV and TN to escape the city life, Martha and Craig Issod quickly turned to chain saws, axes and wood stoves in order to warm their homes (well, actually their shacks and army tents, but that is another story).
After moving back to NJ in the 1974, the Issods missed the feeling of true warmth associated with Wood Heating and started shopping for a new stove to heat their small ranch house. At the time, there were no stove shops. so the Issods found a decent Atlanta Stove in a small appliance shop in Trenton. After installing a Hart and Cooley Metalvent chimney, the stove was ready to heat.
Burning wood was such a rarity at the time that the smoke exiting the chimney brought the Fire Dept. to the door one day to inquire about whether the Issods house was ablaze!
A few years later, Craig and Martha desired a newer stove - and they heard about the new "Airtight" models. Some shopping around revealed an interesting fact : You could buy one stove for $525, but buy 3 or more and a price break to $375 was possible. After some additional research, the Issods decided to set up a stove shop in their dining room and place a few classified ads.
Right about this time in history, the second oil shock hit, as well as the Iranian Hostage Crisis and the partial meltdown at Three Mile Island nuclear plant. The result was a strong market for wood stoves and the birth of [[Stoveworks (Medford and Williamstown, NJ) , a retail shop which became a leader in the industry.
In 1984, Craig purchased some of the patterns and castings of the defunct (bankrupt) Upland Stove Co. and commenced the manufacture of stoves in a small Medford factory.
In 1986, Craig partnered with Richard Brown and, G, Crowe and J. Dell Conner to develop and market the "1/2 Kettle", a patented tea kettle which fit on the narrow ledge of many Fireplace Inserts.
In 1990, Craig purchased the US and Canadian importing rights to the [HS Tarm Boilers] and introduced a number of new products including the Excel Multi-Fuel Gasification boiler.
Computers were always in use at the many businesses, so Craig was always learning more about these technologies. Craig taught seminars on using computers in the hearth business at the yearly trade shows and also was involved in online communities as early as 1986, well before the birth of the public internet.
In 2006, Craig developed a number of new products and obtained a patent for them. After development and proof of sales potential, the new company was sold in 2011.
In his spare time, Craig enjoys reading, computing, writing, inventing, teaching, sailing, historic places such as Newport RI and Rosie - our Cavalier King Charles Spaniel.


I was very fortunate to get a visit to the Artillery Museum in Antwerp on a recent visit to Belgium. I am much indebted to Graham Sallar of Resicast and the Staff of the Brasschaat Museum for opening up the museum to my self and George Moore for a private visit. They couldn't have been more helpful. Thank you all so much.
The museum has a wide variety of artillery pieces ranging form the 1800s to the modern day so I hope you enjoy the selection of pictures and if you're ever in the area it is well worth a visit.
Hopefully the pictures will give you a flavor of the Museum.
Al, this was a real treat to visit this place, especially the reception we got. Some interesting stuff, especially the conversion of the 25pdr, fitted with the US 105mm barrel.
Nice photos Al. Thanks for posting them.


text:
The US already has the
The US already has the technology to test millions of people a day – MIT Technology Review
Posted: May 2, 2020 at 7:43 pm
There is widespread agreement that the only way to safely reopen the economy is through a massive increase in testing. The US needs to test millions of people per day to effectively track and then contain the covid-19 pandemic.
This is a tall order. The country tested only around 210,000 people per day last week, and the pace is not increasing fast enough to get to millions quickly.
The urgency to do better is overwhelmingly bipartisan, with the most recent legislation adding $25 billion for testing a few days ago. Fears are growing, however, that testing might not scale in time to make a difference. As Senators Lamar Alexander and Roy Blunt wrote last week, We have been talking with experts across the government and the private sector to find anyone who believes that current technology can produce the tens of millions of tests necessary to put this virus behind us. Unfortunately, we have yet to find anyone to do so.
We believe that it can be done. The scientific community has the technological capabilities today to test everyone who needs it and enable people to come back to work safely.
To be clearthe senators are right that simply scaling up current practices for covid testing is insufficient. However, with a bit of innovation, the US can meet the need without inventing entirely new technologies. The necessary scale can be achieved by deploying the fruits of the last decade of innovation in biology, including the dizzying advances in DNA sequencing, genetic engineering, industrial automation, and advanced computation.
We speak from experience. We have worked with and helped engender many of these technologies across academia and industry. Scaling them for widespread testing will require investment, infrastructure, and determination, but nothing technologically or logistically infeasible.
Tests for mass screening may have different requirements and characteristics from the tests run in clinical labs today that are approved by the Food and Drug Administration. So what might a solution look like?
It must be scalable, meaning tens or hundreds of thousands of tests per day per facility, or at-home tests. It must be sensitive to early stages of infection, detecting the actual virus rather than immunity to it. And it must be less bound by health insurance and regulatory constraints, to allow fast and broad testing, contact tracing, and isolation. These differences do not mean lower standards. In fact, screening at this scale will require stringent requirements for safety, accuracy, and reliability.
The life sciences community is rising to the challenge. We are repurposing our labs to advance new centralized and at-home methods that solve the bottlenecks preventing testing from reaching global scale. This community is moving fast, with shared purpose and a commitment to open collaboration. As a result of these efforts, several promising avenues are emerging.
Some rely on DNA sequencing tools that have improved a million-fold since the completion of the Human Genome Project nearly 20 years ago. Not only can these tools now read trillions of base pairs of human DNA every day, but they can be readily repurposed to test for the presence of coronavirus at mass scale, using instruments that already exist across the country. Some methods, such as SHERLOCK and DETECTR, harness CRISPR DNA and RNA recognition tools to enable rapid, distributed testing in doctors offices and at other sites. Other efforts are removing critical bottlenecks, such as sample purification, to make the existing approaches more scalable.
There are additional possibilities, and the US needs to place bets on several of them at the same time. Some of those bets might fail, but the severity of the moment requires that we try. Chances are, we will need more than one of them.
As important as the diagnostic technology itself is the need to fuel innovation at all stages of the testing process, including sample collection, regulation, logistics, manufacturing, distribution, scale-up, data infrastructure, and billing. These are solvable problems. The solutions may sometimes differ from current clinical testing conventions, but these are not conventional times.
Maybe cotton swabs or saliva can be used for collection rather than traditional nasopharyngeal swabs, which are in critically short supply. Maybe mass screening tests dont have to have the tested persons name and date on every collection tube but could instead include a bar code that you snap a picture of with your phone. Maybe these tests can be self-administered at home or work rather than conducted by trained professionals in clinical settings. Maybe samples from low-risk, asymptomatic people can be pooled together for initial testing and further screened only in the event of a positive result. This would allow many more samples to be analyzed at once.
State or federal regulatory agencies could make these adjustments to conventional practices more easily if they were willing to treat mass screening for bringing people back to work differently from the testing used in clinical settings. In addition, mass screening efforts will require unconventional partnerships with private companies, nonprofits, universities, and government agencies to support the logistics, collection, manufacturing, scale-up, and data infrastructure to make such a system possible. All this can be done, and some of it is already starting to be donebut we must not lose hope.
The United States capabilities in the life sciences and information technology are unmatched in the world. The time is now to rapidly build a massively scaled screening program that will save lives while allowing us to reopen our economy and keep it open. This can be done, but it will require urgency and determination to make multiple, simultaneous bets on infrastructure, regulation, and technology, as well as collaboration to put it all together.
We have united before to face far greater challenges as a nation, and we can do so again.
Sri Kosuri is cofounder and CEO of Octant and an associate professor in the Department of Chemistry and Biochemistry at UCLA. Feng Zhang is the James and Patricia Poitras Professor of Neuroscience at MITs McGovern Institute, a core member of the Broad Institute, a Howard Hughes Medical Institute Investigator, and cofounder of Sherlock Biosciences. Jason Kelly is cofounder and CEO of Ginkgo Bioworks. Jay Shendure is a Howard Hughes Medical Institute Investigator at the University of Washington School of Medicine and scientific director of the Brotman Baty Institute.
The US already has the technology to test millions of people a day - MIT Technology Review
Students harness the power of technology to address larger issues - Waterbury Republican American - January 3rd, 2021
Banning Government Use of Face Recognition Technology: 2020 Year in Review - EFF - January 3rd, 2021
As ice fishing gets easier because of technology, can fish withstand the onslaught? - Duluth News Tribune - January 3rd, 2021
Technology may have helped us survive Covid-19, but at what cost? - CTech - January 3rd, 2021
The Effects of Technology on Teens - Cat's Eye View - January 3rd, 2021
'Peak hype': why the driverless car revolution has stalled - The Guardian - January 3rd, 2021
Five Microsoft technologies to watch in 2021 - ZDNet - January 3rd, 2021
Birmingham CEO named in "100 Most Powerful Women In Technology 2020" - Bham Now - January 3rd, 2021
Muslims and technology - DAWN.com - January 3rd, 2021
The biggest technology failures of 2020 - MIT Technology Review - January 3rd, 2021
Technology trends to thrive in the new normal - BusinessLine - January 3rd, 2021
Harvard professor believes bizarre asteroid from 2017 was alien technology - SlashGear - January 3rd, 2021
Irving-based Exela Technologies hires firm to help it explore strategic alternatives - The Dallas Morning News - January 3rd, 2021
Century Technology Group leans on tech acquisitions to drive growth - MiBiz: West Michigan Business News - January 3rd, 2021
Global Anti-Counterfeit Packaging Technologies Market (2020 to 2028) - Featuring 3M, Avery Dennison and Digimarc Among Others - ResearchAndMarkets.com... - January 3rd, 2021
5G Technologies and the Driverless Car - GlobeNewswire - January 3rd, 2021
Inside the radical community near Kent without modern technology and where nobody is paid - Kent Live - January 3rd, 2021
Technology In 2020: Big Tech Goes To Washington; Online Shopping Gets A Pandemic Boost - Here And Now - December 29th, 2020
Quantum computers' power will remake competition in industries from technology to finance - MarketWatch - December 29th, 2020
Alarm Bells Ringing On Education Technology - The Chattanoogan - December 29th, 2020
Technology and Sustainability to Drive Recovery in the UK Facility Management Market - GlobeNewswire - December 29th, 2020
Boomer's Blueprint: The technology physical - Accounting Today - December 29th, 2020
How technology will help to shape the future of work in 2021 and beyond - The Star Online - December 29th, 2020
Technology was a bright spot: Year in Review 2020 - Idaho Business Review - December 29th, 2020
Tech platforms vowed to address racial equity: how have they fared? - The Guardian - December 29th, 2020
Global Tissue Ablation Technologies Industry - GlobeNewswire - December 29th, 2020
This technology could start saving lives tomorrow, but the Nationals won't let it happen - Sydney Morning Herald - December 29th, 2020
Tackling unforeseen situations along with technological advancements - The Tribune India - December 29th, 2020
Rebekah Jones named Forbes Technology Person of The Year - Florida Politics - December 29th, 2020
Vaccines are the latest battleground for doctors on social media - MIT Technology Review - December 29th, 2020
Top 10 Technology Analysts of 2020 - eWeek - December 29th, 2020
5 Ways To Build Trust In Cloud Technology We Saw In 2020 - Forbes - December 29th, 2020
BRINK Explores the Technology Sector in 2020 BRINK News and Insights on Global Risk - BRINK - December 29th, 2020
10 Information Technology Stocks Showing Unusual Options Activity In Today's Session - Benzinga - December 29th, 2020
Differentiated Lidar Technology Puts Luminar in the Spotlight - InvestorPlace - December 29th, 2020
The global Green Technology and Sustainability market size to grow from USD 11.2 billion in 2020 to USD 36.6 billion by 2025, at a Compound Annual... - December 21st, 2020
Technology that detects whisky's age is 'world first' - The Spirits Business - December 21st, 2020
LocatorX Launches Lends-A-Hand Program and Women in Technology Group to Reflect Company Values and Mission - GlobeNewswire - December 21st, 2020
Shenpu Technology (KIEYYUEL) Made a Stunning Appearance at the International Epidemic Prevention Exhibition - Business Wire - December 21st, 2020
2021 Supply Chain Technology Trends To Watch - Forbes - December 21st, 2020
Understanding the Role of Technology in Today's Foodservice Equipment Marketplace - Total Food Service - December 21st, 2020
Technology that went its own way in 2020 - Gearbrain - December 21st, 2020
2021 outlook: Here are the technologies, questions that'll matter - ZDNet - December 21st, 2020
Group14 Technologies Powering Next Generation Of Batteries With $17M Series B - Crunchbase News - December 21st, 2020
How the pandemic inspired creative uses of technology in 2020 - The Verge - December 21st, 2020
Talking to the LTA innovator hoping to bring new technology to tennis - Tennis365 - December 21st, 2020
Automotive Air Purifier Market Research Report by Technology, by Type, by Vehicle Class, by Distribution - Global Forecast to 2025 - Cumulative Impact... - December 21st, 2020
VOTIS Subdermal Imaging Technologies And ii Ventures Announce Plans To Develop Preventative Medicine Devices To Screen For Peripheral Artery Disease... - December 21st, 2020
12 Emerging Technologies To Watch In 2021 - Yahoo Finance - December 21st, 2020
These stocks are the best way to play the technology transformation mega trend, Jefferies says - CNBC - December 21st, 2020
EPA awards grant to Marshall student team for technology project - Huntington Herald Dispatch - December 21st, 2020
Wind generation sets another record in banner year for the technology - Current News - December 21st, 2020
How the Massachusetts police reform bill would actually affect law enforcement use of facial recognition technology - Boston.com - December 21st, 2020
Greenland Technologies Ramps to Over 800 Units in Monthly Sales of New Integrated Drive Train System for Electric Forklift Trucks - PRNewswire - December 21st, 2020
Q BioMed Technology Partner Mannin Research Inc. Announced as Member of Canadian National COVID-19 Consortium - BioSpace - December 21st, 2020
Technology will lead Iowa's business recovery - The Gazette - December 21st, 2020
Polestar 2 greets winter solstice with advanced lighting technology - Automotive World - December 21st, 2020
Turnover, Tiny Homes and New Technology: 2021 Predictions from 14 Home Care Executives - Home Health Care News - December 21st, 2020
Defence technology in 2021: our predictions - Army Technology - December 21st, 2020
Peijia Medical and HighLife Enter Into License and Technology Transfer Agreement for Transeptal Mitral Valve Replacement in Greater China - BioSpace - December 21st, 2020
Asian security rests on forging closer U.S.-Japan science and technology cooperation - The Japan Times - December 21st, 2020
Times Have Changed: Real Estate Event Highlights Reliance on Virtual Technology in a Shifting Environment - RisMedia.com - December 21st, 2020
New technology will aid search and rescue around Caithness coast - JohnOGroat Journal - December 21st, 2020
Peter Rhodes on naming a toadstool, harmless technology and why the truth is sometimes not obvious - expressandstar.com - December 21st, 2020
Leading Technology Advisory Firm ISG Recognizes Unisys as Global Leader in Public Cloud Solutions and Services - PRNewswire - December 21st, 2020
Leveraging new technology to source and secure carrier capacity - FreightWaves - December 19th, 2020
Education Technology in 2020: 8 Takeaways From a Chaotic Year - Education Week - December 19th, 2020
From caring for wildlife to using technology for water distribution, here are the top Social Stories for the w - YourStory - December 19th, 2020
12 Emerging Technologies To Watch In 2021 - Benzinga - December 19th, 2020
The MOCVD Market 2020-2024- Featuring Advanced Micro-Fabrication Equipment Inc., Agnitron Technology Inc., AIXTRON AG, Among Others to Contribute to... - December 19th, 2020
Introducing SP8CEVC: The World's First Space Technology and Human Longevity Focused Rolling Fund in Partnership with AngelList - PRNewswire - December 19th, 2020
BioSig's Division NeuroClear Technologies Signs a Research Agreement with the University of Minnesota - GlobeNewswire - December 19th, 2020
Waste Is A Design Flaw: Rubicon Taps Technology To Help Businesses And Governments Save Money And Go Zero-Waste - Forbes - December 19th, 2020
Global STING Pathway Targeting Therapeutics and Technologies Market, 2020-2030 - Promising Leads are Anticipated to be Launched Over the Coming Decade... - December 19th, 2020
Meet the 10 disruptive technologies vying to win UC's Startup Innovation Challenge - University of California - December 19th, 2020
Webinar recording with Fervo Energy on key technologies to accelerate geothermal energy development - ThinkGeoEnergy - December 19th, 2020
Massachusetts Institute of Technology disciplining professor with ties to disgraced financier Jeffrey Epstein - MassLive.com - December 19th, 2020
Using Automation Technology to Improve Facility Safety - EHS Today - December 19th, 2020
Parsables Connected Worker Technology: The Human-Centric Manufacturing Revolution - Forbes - December 19th, 2020
Growing Champions: Building digital success with women in technology in Malaysia - The Edge Markets MY - December 19th, 2020
Breaking News and Updates
Cosmic Heaven
Gene Medicine
Human Longevity
Moon Colonization
Teilhard De Charden
Transhuman News
Prometheism
Prometheus' Vindication
Promethean Principles
Future Evolution
Flash Intro
Version Zero
The Evolutionary Perspective
Transtopia Menu
Island Project
PC-Free Zone
Link Xchange
Cosmos Theology
Cosmos Theology Questions And Answers
Cosmotheism 3 Books in PDF
The Genetic Ascent of Godhood
Fame of a Dead Mans Deeds
Culture of Critique
Jewish Supremacism
Socrates Meets Jesus
The Anti-Christ
Neo-Eugenics Manifesto
Race, Evolution, and Behavior
The Meaning of COSMOTHEISM
The Color of Crime
Jewish-Communist Brainwashing Techniques
Does Race Exist
Why Civilizations Self-Destruct
Future Euvolution
Eusim
Lucid Dreams from Childhood
Genetic Revolution
Speciation + Self-Directed Evolution
Copyright 2000 to 2021 © Prometheism Transhumanism Post Humanism | Prometheism | Euvolution | Pierre Teilhard De Chardin


text:
Q: Is the remaining code of a function that comes after a Future processed in "one batch" on the event queue? I thought that when the compiler hits a future, automatically the future and the remaining code of the function is placed on the event queue and bundled up as one future basically.
So in this example from Future1 to somebullshit() everything should be pushed on the event queue and the future returned from asyncFunction() should resolve when everything is processed.
main(){
     asyncFunction()
}
asyncFunction() async{
     await Future1();
     await Future2();
     somebullshit();
}

*

*My experience was that after Future1 is completed on the event queue
not Future2 is processed next but some createState Method from the
framework is called first and then it continues to Future2.

*So why is it not processed directly one after another?

*And why if I wrap my asyncFunction inside a Future like this, does the code work as expected and executes everything in one batch after the createState method is called

main(){
    Future((){asyncFunction() })
}

Is the explanation that just like with synchronous code the compiler automatically jumps out of the current function when hitting a future even when its handled on the event loop and first processes something else?

A: Ok my problem was that I didn't return anything inside the function in the Future constructor my bad.
  await Future(() {
  return someAsyncStuff();
});


That's right. It's Knuckles as Black Panther.
And since I plan to add on to this little piece over the next week or so, I will wait until then to explain why I did it.
I hate to be the one to make this joke... but Wakandan Knuckles?
Would you believe it's been done?


text:
University of York (UK): call for papers su "Debt Sustainability" i prossimi 26-28 marzo 2018
Dottorato in studi umanistici presso l'Università di Bari: tutti i dettagli del bando
"Il lavoro nelle campagne": convegno internazionale di studi a Milano il 28-29 settembre
Published by Sisenet at 29 Agosto 2017
Second European Macrohistory Workshop
March 26-28, 2018, University of York, York, United Kingdom
Main topic: Debt Sustainability
The Department of Economics at the University of York is organizing a "European Macrohistory Workshop", which will be held in York, UK (March 26-28, 2018).
The workshop – which follows a first such event held in June 2016 at the Macrohistory Lab at the University of Bonn (Prof. Moritz Schularick) – aims to bring together economic historians and macroeconomists. Half of the sessions will be devoted to general topics at the intersection of macroeconomics and economic history, while the other half will focus on debt sustainability as one of the key issues facing developed countries in the medium and long-term. The objective of the workshop is to strengthen further the ties which have developed in recent years to great mutual advantage between economic and financial historians, on the one hand, and macroeconomists and applied economists, on the other.
Key note speakers
Prof. Barry Eichengreen (University of California, Berkeley)
Prof. Ricardo Reis (London School of Economics)
Complete manuscripts or 3-page drafts should be submitted to macrohistory-conference@york.ac.uk<mailto:macrohistory-conference@york.ac.uk> no later than 15th October (in pdf-format). We will acknowledge receipt of submission and the authors of accepted papers will be notified by 30th November.
Accommodation and travel expenses will be covered for programme participants.
Financial support from the Royal Economic Society, the University of York, University College London and the University of Bonn is gratefully acknowledged.
Prof. Carsten Burhop (University of Bonn)
Dr. Matthias Morys (University of York)
Prof. Peter Spencer (University of York and Office of Budget Responsibility)
Dr. Coskun Tuncer (University College London)
Prof. Claude Diebolt (University of Strasbourg)
Prof. Rui Esteves (University of Oxford)
Dr. Eric Monnet (Paris School of Economics and Bank of France)
Prof. Moritz Schularick (University of Bonn and CEPR)
Prof. Nikolaus Wolf (Humboldt University Berlin and CEPR)
CFP – "The EU Strategy on Green Finance and ESG factors" (28 febbraio 2022)
Call for papers: "Social Mobility in Preindustrial Societies" (Milano, scadenza: 6 febbraio 2022)


text:
TARYAG-MEDICAL
Po Box 148, 14 Ha'Ilan St.
Or Akiva ,3065101
Tel: +972.4.6776929
Fax: +972.77.3180728
info@taryag-medical.com
The ByCross is a minimal invasive, single use and fully disposable rotational atherectomy device with an expandable a-traumatic tip, including a simultaneous non-clogging aspiration system. While ByCross is introduced over a guidewire, it does not require the passage of an occlusion with the wire first, therefore, in such completely blocked occlusion whereby guidewire passage cannot be facilitated, instead of aborting the procedure, ByCross enables the completion of re-vascularization percutaneously.
ByCross is designed to restore blood flow in many types of lesion morphologies encountered with Peripheral Vascular Disease (PVD). The ByCross consists of a motor driven coaxial flexible rotating shaft that accepts standard 0.035" guide wire and is accommodated inside a 6F introducer sheath. The shaft rotates at ~6000 RPM with an expandable distal tip (1.7-4.7mm) that macerates the atheroma and the thrombus into small particles which are aspirated simultaneously through the 6F sheath into a collection bag.
The ByCross allows injection of contrast material through the distal end of the tip to improve the safety and the control of the procedure. In addition, a remote-control unit which can be mounted onto the introducer sheath allows the physician to operate the device without losing eye and hand contact throughout the procedure. The same hand of the physician holding the introducer sheath can operate the device via the remote-control while the other hand can advance the device into the vessel. The ByCross shaft flexibility facilitates delivery in tortuous anatomy. The device is available in various lengths (40-135cm) for distal anatomy and contra lateral access. Its stainless-steel design provides complete hub-to-tip radiopacity, it operates without the need of capital equipment, pedal or non-sterile equipment, it is powered by lithium batteries that dispose separately of the device as a non-bio-hazard waist at the end of use.
ByCross electronics and embedded software provides visual indications such as readiness for use or malfunction. This software monitors the electrical behavior of the device and provides safety protections in case of malfunction by stopping the rotation.
About Peripheral Vascular Disease (PVD) and available treatment modalities:
Peripheral artery disease (PAD) is a common manifestation of systemic atherosclerosis causing a chronic, slowly developing, and narrowing of the arteries. Lower extremity peripheral artery disease (LE-PAD) typically affects lower limbs with a frequency that is strongly age-related (~20% of the population older than 55). Clinical manifestations vary from intermittent claudication (pain in the calves while walking that goes away with rest) to chronic total occlusion (CTO), critical limb ischemia (CLI), gangrene and, ultimately, limb loss.
A number of pharmacological and invasive strategies have been developed over the last decades to improve the clinical outcomes of patients affected by LE-PAD. In the past, bypass surgery was the standard of care for patients with severe claudication and CLI. Recently, technological advances favored a significant evolution of percutaneous revascularization therapies that now can be offered as treatment options less invasive than traditional surgery. There are several options including percutaneous transluminal angioplasty (PTA), stents, drug-coated balloons, crioplasty, percutaneous thrombectomy (rheolytic and aspiration thrombectomy) and atherectomy. In particular, the promise of atherectomy is to overcome the limitations and complications of traditional angioplasty such as dissection, elastic recoil, and disruption of the internal elastic lamina, resulting in overwhelming neointima and smooth muscle cell proliferation. Unlike balloons and stents, which push plaque into the vessel wall, atherectomy offers the ability to debulk the plaque burden within the vessel. Various atherectomy methods are available including plaque excision (directional) atherectomy, laser atheroablation, rotational aspiration/atherectomy and orbital atherectomy.
Procedural success rates have been historically lower in the setting of chronic total occlusion that account for up to 20-40% of patients with LE-PAD undergoing percutaneous treatment. In addition, a number of potential complications (in particular, distal embolization, plaque shift and perforation) may contribute to disappointing results of percutaneous approach to complex infrainguinal disease. Atherectomy, by debulking and removing atherosclerotic plaque cutting or pulverizing atheroma, seems to be a favorable option to increase the spectrum of treatable femoropopliteal lesions such as ostial disease (involving profunda femoral artery), densely calcified plaque, diffuse disease.
The ByCross is a single use, disposable, minimal invasive aspiration rotational atherectomy device (combining rotation with aspiration capability). The ByCross is aimed to enable effective revascularization and restore blood flow in peripheral occluded vessels. It is also capable of crossing total occlusion when guide wire passage cannot be facilitated. The ByCross can be used in several pathologies: calcified atheroma, old and fresh thrombus.


text:
Creepypasta poll
While Jordan was playing Don't Starve a few weeks later, he noticed that everything had changed. Not only there were updates, but his game had seemed glitchier than before. His characters died at random points. Pigmen had acted starngely around him, saying, "HELP ME," when he got close to them instead of running.
Jordan was infuriated. He was going to get rid of this mod once and for all. When he got to the mod button, his mouse frozen, as if intentionally preventing him from deleting the mod. When he managed to try and delete the mod, a message popped up:
"I can't let you do that."
Jordan was startled. Was the mod programmed to prevent him from deleting it? He tried all he could, but at the last try, he got a different message:
"Why delete me? The fun is about to begin....for me...."
Jordan asked himself who "me" was. But before he could, two words popped up in red:
"YOU'RE MINE"
Two blood-red arms popped out of the screen and grabbed Jordan, tightening him to his chair. He tried to break free, but nothing happened. The arms tightened around him. A face popped onto the screen. It said a simple sentence, but in a way only the Devil himself could say it.
"YOU ARE MINE."
15-11 22-19-16-15-10-20 25-9-3
Edited January 13, 2014 by Mack18853
HoneyHam 435
SPESHUL
They just get creepier and creepier....
also, put all your creepypastas in a single thread, maybe titled "Mack's Creepypastas!"
Good idea....
By the way, did you notice the numbers at the bottom?
It's a code. When solved it says 'I'M RIGHT BEHIND YOU'
ClayNorman 1
Well, it was pretty good... until you destroyed my immersion and had two arms come out of the screen and grab Jordan. See, with these gaming creepy pastas you gotta keep it seeming real. The mod was believable as someone with the right skill could totally create something like this and that is what was good. The ending was just kind of a cop out at the end like you got lazy and didn't know how to end it. My only suggestions would be to make it a bit longer and keep the cliches to a minimum. And please, no SPOOKY HYPER REALISTIC EYES, MUCH REAL BLOOD, SO WOW, In the next one. Just fix those things and you'll be set for any more you write! 7/10 would read again.
Hm. I see.
Don't take it to offense I actually do like the idea of the whole thing and the build up, it feels really good considering the modding community with the game. And the whole thing about the hyper realistic eyes was a joke at other gaming pastas that use that stuff as you probably know. I did like it man and I hope you make another, I would love to read it!
To make a good creepypasta, no huge amounts of gore. Makes it too cheesy.
What kind of cheese? Mozzarella or swiss?
But I'm serious. I agree.