text:
package org.teatrove.tea.compiler;

import java.util.Vector;

import org.teatrove.tea.parsetree.AndExpression;
import org.teatrove.tea.parsetree.ArithmeticExpression;
import org.teatrove.tea.parsetree.Block;
import org.teatrove.tea.parsetree.BooleanLiteral;
import org.teatrove.tea.parsetree.BreakStatement;
import org.teatrove.tea.parsetree.CompareExpression;
import org.teatrove.tea.parsetree.ConcatenateExpression;
import org.teatrove.tea.parsetree.ContinueStatement;
import org.teatrove.tea.parsetree.Expression;
import org.teatrove.tea.parsetree.Expression.Conversion;
import org.teatrove.tea.parsetree.ForeachStatement;
import org.teatrove.tea.parsetree.IfStatement;
import org.teatrove.tea.parsetree.Literal;
import org.teatrove.tea.parsetree.NegateExpression;
import org.teatrove.tea.parsetree.Node;
import org.teatrove.tea.parsetree.NotExpression;
import org.teatrove.tea.parsetree.NumberLiteral;
import org.teatrove.tea.parsetree.OrExpression;
import org.teatrove.tea.parsetree.ParenExpression;
import org.teatrove.tea.parsetree.RelationalExpression;
import org.teatrove.tea.parsetree.Statement;
import org.teatrove.tea.parsetree.StatementList;
import org.teatrove.tea.parsetree.StringLiteral;
import org.teatrove.tea.parsetree.TernaryExpression;
import org.teatrove.tea.parsetree.TreeMutator;
import org.teatrove.tea.parsetree.VariableRef;

/**
 * The BasicOptimizer only performs two optimizations: constant
 * folding and dead code elimination.
 *
 *
Expressions that contain known values at compile time can
 * be replaced with a constant expression. This basic optimization is
 * known as constant folding. It improves runtime performance and reduces
 * the size of generated code.
 *
 *
Statements that are known at compile time to be unreachable (sometimes
 * as a result of constant folding) can be removed. This is dead code
 * elimination, and it mainly reduces the size of generated code. It can also
 * improve runtime performance.
 *
 * @author Brian S O'Neill
 */
public class BasicOptimizer {
    private Node mTree;

    public BasicOptimizer(Node tree) {
        mTree = tree;
    }

    public Node optimize() {
        return (Node)mTree.accept(new Visitor());
    }

    private static class Visitor extends TreeMutator {
        public Object visit(Statement node) {
            return null;
        }

        public Object visit(StatementList node) {
            Statement[] stmts = optimizeStatements(node.getStatements());
            if (stmts == null || stmts.length == 0) {
                return null;
            }

            if (stmts.length == 1) {
                return stmts[0];
            }

            return new StatementList(node.getSourceInfo(), stmts);
        }

        public Object visit(Block node) {
            Statement[] stmts = optimizeStatements(node.getStatements());

            Statement init = node.getInitializer();
            if (init != null) {
                init = (Statement)init.accept(this);
            }

            Statement fin = node.getFinalizer();
            if (fin != null) {
                fin = (Statement)fin.accept(this);
            }

            if (stmts == null || stmts.length == 0) {
                if (init == null && fin == null) {
                    return null;
                }
                else {
                    node.setStatements(new Statement[0]);
                }
            }
            else {
                node.setStatements(stmts);
            }

            node.setInitializer(init);
            node.setFinalizer(fin);

            return node;
        }

        private Statement[] optimizeStatements(Statement[] stmts) {
            if (stmts == null) {
                return null;
            }

            int length = stmts.length;
            Vector<Statement> v = new Vector<Statement>(length);

            for (int i=0; i<length; i++) {
                Statement stmt = (Statement)stmts[i].accept(this);
                if (stmt != null) {
                    v.addElement(stmt);
                }
            }

            Statement[] newStmts = new Statement[v.size()];
            v.copyInto(newStmts);

            return newStmts;
        }

        public Object visit(BreakStatement node) {
            return (BreakStatement)super.visit(node);
        }

        public Object visit(ContinueStatement node) {
            return (ContinueStatement)super.visit(node);
        }

        public Object visit(ForeachStatement node) {
            node = (ForeachStatement)super.visit(node);

            Expression range = node.getRange();
            Expression endRange = node.getEndRange();
            if (endRange != null &&
                range.isValueKnown() && endRange.isValueKnown()) {

                Object rangeValue = range.getValue();
                Object endRangeValue = endRange.getValue();

                if (rangeValue instanceof Number &&
                    endRangeValue instanceof Number) {

                    if (((Number)rangeValue).intValue() >
                        ((Number)endRangeValue).intValue()) {

                        // Will loop zero times. Set the body to null
                        // instead of returning null because the loop
                        // variable still should be set to the first value.
                        // It is possible that the loop variable is
                        // accessed outside the loop, so it must be
                        // set to the correct value.

                        node.setBody(null);
                    }
                }
            }

            return node;
        }

        public Object visit(IfStatement node) {
            Expression condition = visitExpression(node.getCondition());

            Block thenPart;
            Block elsePart;

            // If the condition is a constant boolean...
            if (condition.isValueKnown() &&
                condition.getType().getObjectClass() == Boolean.class) {
                // ... and the condition's value is true...
                if ( ((Boolean)condition.getValue()).booleanValue() ) {
                    // ... then the then part will always execute.
                    thenPart = node.getThenPart();
                    if (thenPart != null) {
                        thenPart = (Block)thenPart.accept(this);
                    }

                    return thenPart;
                }
                else {
                    // ... else the else part will always execute.
                    elsePart = node.getElsePart();
                    if (elsePart != null) {
                        elsePart = (Block)elsePart.accept(this);
                    }

                    return elsePart;
                }
            }

            thenPart = node.getThenPart();
            if (thenPart != null) {
                thenPart = (Block)thenPart.accept(this);
            }

            elsePart = node.getElsePart();
            if (elsePart != null) {
                elsePart = (Block)elsePart.accept(this);
            }

            // if there is no then part, but there is an else part,
            // invert the condition and make the else part the then part.
            if (thenPart == null && elsePart != null) {
                thenPart = elsePart;
                elsePart = null;
                condition.convertTo(Type.BOOLEAN_TYPE);
                condition = new NotExpression(condition.getSourceInfo(),
                                              condition);
                condition.convertTo(Type.BOOLEAN_TYPE);
            }

            node.setCondition(condition);
            node.setThenPart(thenPart);
            node.setElsePart(elsePart);

            return node;
        }

        public Object visit(ParenExpression node) {
            return node.getExpression().accept(this);
        }

        public Object visit(NegateExpression node) {
            SourceInfo info = node.getSourceInfo();
            Expression expr = visitExpression(node.getExpression());

            if (expr.isValueKnown()) {
                Object value = expr.getValue();

                if (value instanceof Number) {
                    Expression result = null;
                    Number number = (Number)value;

                    if (value instanceof Integer) {
                        result = new NumberLiteral(info, -number.intValue());
                    }
                    else if (value instanceof Long) {
                        result = new NumberLiteral(info, -number.longValue());
                    }
                    else if (value instanceof Float) {
                        result = new NumberLiteral(info, -number.floatValue());
                    }
                    else if (value instanceof Double) {
                        result = new NumberLiteral(info, -number.doubleValue());
                    }

                    if (result != null) {
                        // ensure any prior conversion is maintained
                        for (Conversion conversion : node.getConversionChain()) {
                            result.convertTo(conversion.getToType());
                        }
                    }

                    return result;
                }
            }
            else if (expr instanceof NegateExpression) {
                return ((NegateExpression)expr).getExpression();
            }

            node.setExpression(expr);
            return node;
        }

        public Object visit(NotExpression node) {
            SourceInfo info = node.getSourceInfo();
            Expression expr = visitExpression(node.getExpression());

            if (expr.isValueKnown()) {
                Object value = expr.getValue();

                if (value instanceof Boolean) {
                    boolean bv = ((Boolean)value).booleanValue();
                    return new BooleanLiteral(info, !bv);
                }
            }
            else if (expr instanceof NotExpression) {
                return ((NotExpression)expr).getExpression();
            }

            node.setExpression(expr);
            return node;
        }

        public Object visit(ConcatenateExpression node) {
            SourceInfo info = node.getSourceInfo();

            Expression left = visitExpression(node.getLeftExpression());
            Expression right = visitExpression(node.getRightExpression());

            if (left.isValueKnown() && left.getValue() instanceof String) {
                String leftValue = (String)left.getValue();
                if (right.isValueKnown() &&
                    right.getValue() instanceof String) {

                    String rightValue = (String)right.getValue();
                    return new StringLiteral(info, leftValue + rightValue);
                }

                if (leftValue.length() == 0) {
                    return right;
                }
            }
            else if (right.isValueKnown() &&
                     right.getValue() instanceof String) {

                if (((String)right.getValue()).length() == 0) {
                    return left;
                }
            }

            node.setLeftExpression(left);
            node.setRightExpression(right);
            return node;
        }

        public strictfp Object visit(ArithmeticExpression node) {
            SourceInfo info = node.getSourceInfo();
            Token operator = node.getOperator();

            Expression left = visitExpression(node.getLeftExpression());
            Expression right = visitExpression(node.getRightExpression());

            if (node.getType() != null &&
                left.isValueKnown() && right.isValueKnown()) {
                int ID = operator.getID();
                Object leftValue = left.getValue();
                Object rightValue = right.getValue();

                Type type = left.getType();

                if (leftValue instanceof Number &&
                    rightValue instanceof Number &&
                    type.equals(right.getType())) {

                    Class<?> clazz = type.getObjectClass();

                    Number lv = (Number)leftValue;
                    Number rv = (Number)rightValue;

                    try {
                        if (clazz == Integer.class) {
                            int i1 = lv.intValue();
                            int i2 = rv.intValue();

                            switch (ID) {
                            case Token.PLUS:
                                return new NumberLiteral(info, i1 + i2);
                            case Token.MINUS:
                                return new NumberLiteral(info, i1 - i2);
                            case Token.MULT:
                                return new NumberLiteral(info, i1 * i2);
                            case Token.DIV:
                                return new NumberLiteral(info, i1 / i2);
                            case Token.MOD:
                                return new NumberLiteral(info, i1 % i2);
                            }
                        }
                        else if (clazz == Float.class) {
                            float f1 = lv.floatValue();
                            float f2 = rv.floatValue();

                            switch (ID) {
                            case Token.PLUS:
                                return new NumberLiteral(info, f1 + f2);
                            case Token.MINUS:
                                return new NumberLiteral(info, f1 - f2);
                            case Token.MULT:
                                return new NumberLiteral(info, f1 * f2);
                            case Token.DIV:
                                return new NumberLiteral(info, f1 / f2);
                            case Token.MOD:
                                return new NumberLiteral(info, f1 % f2);
                            }
                        }
                        else if (clazz == Long.class) {
                            long L1 = lv.longValue();
                            long L2 = rv.longValue();

                            switch (ID) {
                            case Token.PLUS:
                                return new NumberLiteral(info, L1 + L2);
                            case Token.MINUS:
                                return new NumberLiteral(info, L1 - L2);
                            case Token.MULT:
                                return new NumberLiteral(info, L1 * L2);
                            case Token.DIV:
                                return new NumberLiteral(info, L1 / L2);
                            case Token.MOD:
                                return new NumberLiteral(info, L1 % L2);
                            }
                        }
                        else if (clazz == Double.class) {
                            double d1 = lv.doubleValue();
                            double d2 = rv.doubleValue();

                            switch (ID) {
                            case Token.PLUS:
                                return new NumberLiteral(info, d1 + d2);
                            case Token.MINUS:
                                return new NumberLiteral(info, d1 - d2);
                            case Token.MULT:
                                return new NumberLiteral(info, d1 * d2);
                            case Token.DIV:
                                return new NumberLiteral(info, d1 / d2);
                            case Token.MOD:
                                return new NumberLiteral(info, d1 % d2);
                            }
                        }
                    }
                    catch (ArithmeticException e) {
                        // A divide or mod by 0 is ignored, and expression
                        // is left as is. Runtime will detect and throw
                        // divide by zero. The compiler is not required
                        // to detect divide by zero, because it can't
                        // always perform this check.
                    }
                }
            }

            node.setLeftExpression(left);
            node.setRightExpression(right);
            return node;
        }

        public Object visit(RelationalExpression node) {
            SourceInfo info = node.getSourceInfo();
            Token operator = node.getOperator();
            int ID = operator.getID();

            Expression left = visitExpression(node.getLeftExpression());
            Type leftType = left.getType();
            Object leftValue = left.getValue();

            if (ID == Token.ISA) {
                Type rightType = node.getIsaTypeName().getType();

                if (rightType.getObjectClass().isAssignableFrom
                    (leftType.getObjectClass())) {
                    // Widening case. i.e. (5 isa Number) is always true.
                    return new BooleanLiteral(info, true);
                }

                node.setLeftExpression(left);
                return node;
            }

            Expression right = visitExpression(node.getRightExpression());
            Type rightType = right.getType();
            Object rightValue = right.getValue();

            if (node.getType() != null &&
                left.isValueKnown() && right.isValueKnown() &&
                leftValue != null && rightValue != null) {

                Type type = leftType;

                // TODO: support JDK1.2 Comparable interface

                if (leftValue instanceof Number &&
                    rightValue instanceof Number &&
                    type.equals(rightType)) {

                    Class<?> clazz = type.getObjectClass();

                    Number lv = (Number)leftValue;
                    Number rv = (Number)rightValue;

                    if (clazz == Integer.class) {
                        int i1 = lv.intValue();
                        int i2 = rv.intValue();

                        switch (ID) {
                        case Token.EQ:
                            return new BooleanLiteral(info, i1 == i2);
                        case Token.NE:
                            return new BooleanLiteral(info, i1 != i2);
                        case Token.LT:
                            return new BooleanLiteral(info, i1 < i2);
                        case Token.GT:
                            return new BooleanLiteral(info, i1 > i2);
                        case Token.LE:
                            return new BooleanLiteral(info, i1 <= i2);
                        case Token.GE:
                            return new BooleanLiteral(info, i1 >= i2);
                        }
                    }
                    else if (clazz == Float.class) {
                        float f1 = lv.floatValue();
                        float f2 = rv.floatValue();

                        switch (ID) {
                        case Token.EQ:
                            return new BooleanLiteral(info, f1 == f2);
                        case Token.NE:
                            return new BooleanLiteral(info, f1 != f2);
                        case Token.LT:
                            return new BooleanLiteral(info, f1 < f2);
                        case Token.GT:
                            return new BooleanLiteral(info, f1 > f2);
                        case Token.LE:
                            return new BooleanLiteral(info, f1 <= f2);
                        case Token.GE:
                            return new BooleanLiteral(info, f1 >= f2);
                        }
                    }
                    else if (clazz == Long.class) {
                        long L1 = lv.longValue();
                        long L2 = rv.longValue();

                        switch (ID) {
                        case Token.EQ:
                            return new BooleanLiteral(info, L1 == L2);
                        case Token.NE:
                            return new BooleanLiteral(info, L1 != L2);
                        case Token.LT:
                            return new BooleanLiteral(info, L1 < L2);
                        case Token.GT:
                            return new BooleanLiteral(info, L1 > L2);
                        case Token.LE:
                            return new BooleanLiteral(info, L1 <= L2);
                        case Token.GE:
                            return new BooleanLiteral(info, L1 >= L2);
                        }
                    }
                    else if (clazz == Double.class) {
                        double d1 = lv.doubleValue();
                        double d2 = rv.doubleValue();

                        switch (ID) {
                        case Token.EQ:
                            return new BooleanLiteral(info, d1 == d2);
                        case Token.NE:
                            return new BooleanLiteral(info, d1 != d2);
                        case Token.LT:
                            return new BooleanLiteral(info, d1 < d2);
                        case Token.GT:
                            return new BooleanLiteral(info, d1 > d2);
                        case Token.LE:
                            return new BooleanLiteral(info, d1 <= d2);
                        case Token.GE:
                            return new BooleanLiteral(info, d1 >= d2);
                        }
                    }
                }
                else if (leftValue instanceof String &&
                         rightValue instanceof String) {

                    int result =
                        ((String)leftValue).compareTo((String)rightValue);

                    switch (ID) {
                    case Token.EQ:
                        return new BooleanLiteral(info, result == 0);
                    case Token.NE:
                        return new BooleanLiteral(info, result != 0);
                    case Token.LT:
                        return new BooleanLiteral(info, result < 0);
                    case Token.GT:
                        return new BooleanLiteral(info, result > 0);
                    case Token.LE:
                        return new BooleanLiteral(info, result <= 0);
                    case Token.GE:
                        return new BooleanLiteral(info, result >= 0);
                    }
                }
            }

            if (leftType.isNonNull() && rightType.isNonNull() &&
                leftType.getObjectClass() == Boolean.class &&
                rightType.getObjectClass() == Boolean.class) {

                if (left.isValueKnown() && leftValue != null) {
                    boolean lv = ((Boolean)leftValue).booleanValue();

                    if (right.isValueKnown() && rightValue != null) {
                        boolean rv = ((Boolean)rightValue).booleanValue();

                        if (ID == Token.EQ) {
                            return new BooleanLiteral(info, lv == rv);
                        }
                        else if (ID == Token.NE) {
                            return new BooleanLiteral(info, lv != rv);
                        }
                    }
                    else {
                        if (lv) {
                            // (true == (right)) is always (right)
                            if (ID == Token.EQ) {
                                return right;
                            }
                            // (true != (right)) is always !(right)
                            else if (ID == Token.NE) {
                                right.convertTo(Type.BOOLEAN_TYPE);
                                right = new NotExpression(info, right);
                                right.convertTo(Type.BOOLEAN_TYPE);
                                return right;
                            }
                        }
                        else {
                            // (false == (right)) is always !(right)
                            if (ID == Token.EQ) {
                                right.convertTo(Type.BOOLEAN_TYPE);
                                right = new NotExpression(info, right);
                                right.convertTo(Type.BOOLEAN_TYPE);
                                return right;
                            }
                            // (false != (right)) is always (right)
                            else if (ID == Token.NE) {
                                return right;
                            }
                        }
                    }
                }
                else if (right.isValueKnown() && rightValue != null) {
                    boolean rv = ((Boolean)rightValue).booleanValue();

                    if (rv) {
                        // ((left) == true) is always (left)
                        if (ID == Token.EQ) {
                            return left;
                        }
                        // ((left) != true) is always !(left)
                        else if (ID == Token.NE) {
                            left.convertTo(Type.BOOLEAN_TYPE);
                            left = new NotExpression(info, left);
                            left.setType(Type.BOOLEAN_TYPE);
                            return left;
                        }
                    }
                    else {
                        // ((left) == false) is always !(left)
                        if (ID == Token.EQ) {
                            left.convertTo(Type.BOOLEAN_TYPE);
                            left = new NotExpression(info, left);
                            left.setType(Type.BOOLEAN_TYPE);
                            return left;
                        }
                        // ((left) != false) is always (left)
                        else if (ID == Token.NE) {
                            return left;
                        }
                    }
                }
            }

            // Optimize tests against null.

            boolean leftIsNull = left.isValueKnown() && leftValue == null;
            boolean rightIsNull = right.isValueKnown() && rightValue == null;

            if (leftIsNull && rightIsNull) {
                if (ID == Token.EQ) {
                    return new BooleanLiteral(info, true);
                }
                else if (ID == Token.NE) {
                    return new BooleanLiteral(info, false);
                }
            }
            /* This optimization may eliminate expressions with side effects.
            else if (leftIsNull && rightType.isNonNull() ||
                     rightIsNull && leftType.isNonNull()) {
            */
            else if (leftIsNull && rightType.isNonNull() &&
                     (right instanceof Literal ||
                      right instanceof VariableRef) ||
                     rightIsNull && leftType.isNonNull() &&
                     (left instanceof Literal ||
                      left instanceof VariableRef)) {

                if (ID == Token.EQ) {
                    return new BooleanLiteral(info, false);
                }
                else if (ID == Token.NE) {
                    return new BooleanLiteral(info, true);
                }
            }

            node.setLeftExpression(left);
            node.setRightExpression(right);
            return node;
        }

        public Object visit(AndExpression node) {
            SourceInfo info = node.getSourceInfo();

            Expression left = visitExpression(node.getLeftExpression());
            Expression right = visitExpression(node.getRightExpression());

            if (left.isValueKnown()) {
                Object leftValue = left.getValue();
                if (leftValue instanceof Boolean) {
                    if ( ((Boolean)leftValue).booleanValue() ) {
                        // "And"ing with true has no effect. Simply return the
                        // right expression.
                        return right;
                    }
                    else {
                        // Short circuit result if value is false.
                        return new BooleanLiteral(info, false);
                    }
                }
            }

            if (right.isValueKnown()) {
                Object rightValue = right.getValue();
                if (rightValue instanceof Boolean) {
                    if ( ((Boolean)rightValue).booleanValue() ) {
                        // "And"ing with true has no effect. Simply return the
                        // left expression.
                        return left;
                    }
                    else {
                        // Don't short cicuit in this case.
                    }
                }
            }

            node.setLeftExpression(left);
            node.setRightExpression(right);
            return node;
        }

        public Object visit(OrExpression node) {
            SourceInfo info = node.getSourceInfo();

            Expression left = visitExpression(node.getLeftExpression());
            Expression right = visitExpression(node.getRightExpression());

            if (left.isValueKnown()) {
                Object leftValue = left.getValue();
                if (leftValue instanceof Boolean) {
                    if ( ((Boolean)leftValue).booleanValue() ) {
                        // Short circuit result if value is true.
                        return new BooleanLiteral(info, true);
                    }
                    else {
                        // "Or"ing with false has no effect. Simply return the
                        // right expression.
                        return right;
                    }
                }
            }

            if (right.isValueKnown()) {
                Object rightValue = right.getValue();
                if (rightValue instanceof Boolean) {
                    if ( ((Boolean)rightValue).booleanValue() ) {
                        // Don't short cicuit in this case.
                    }
                    else {
                        // "Or"ing with false has no effect. Simply return the
                        // left expression.
                        return left;
                    }
                }
            }

            node.setLeftExpression(left);
            node.setRightExpression(right);
            return node;
        }

        public Object visit(TernaryExpression node) {
            Expression condition = visitExpression(node.getCondition());

            Expression thenPart;
            Expression elsePart;

            // If the condition is a constant boolean...
            if (condition.isValueKnown() &&
                condition.getType().getObjectClass() == Boolean.class) {
                // ... and the condition's value is true...
                if ( ((Boolean)condition.getValue()).booleanValue() ) {
                    // ... then the then part will always execute.
                    thenPart = node.getThenPart();
                    if (thenPart != null) {
                        thenPart = (Expression)thenPart.accept(this);
                    }

                    return thenPart;
                }
                else {
                    // ... else the else part will always execute.
                    elsePart = node.getElsePart();
                    if (elsePart != null) {
                        elsePart = (Expression)elsePart.accept(this);
                    }

                    return elsePart;
                }
            }

            thenPart = node.getThenPart();
            if (thenPart != null) {
                thenPart = (Expression)thenPart.accept(this);
            }

            elsePart = node.getElsePart();
            if (elsePart != null) {
                elsePart = (Expression)elsePart.accept(this);
            }

            // if there is no then part, but there is an else part,
            // invert the condition and make the else part the then part.
            if (thenPart == null && elsePart != null) {
                thenPart = elsePart;
                elsePart = null;
                condition.convertTo(Type.BOOLEAN_TYPE);
                condition = new NotExpression(condition.getSourceInfo(),
                                              condition);
                condition.convertTo(Type.BOOLEAN_TYPE);
            }

            node.setCondition(condition);
            node.setThenPart(thenPart);
            node.setElsePart(elsePart);

            return node;
        }

        @SuppressWarnings({ "rawtypes", "unchecked" })
        public Object visit(CompareExpression node) {
            Expression left = visitExpression(node.getLeftExpression());
            Expression right = visitExpression(node.getRightExpression());

            if (left.isValueKnown() && right.isValueKnown()) {
                Object lvalue = left.getValue();
                Object rvalue = right.getValue();
                if (lvalue != null && lvalue != null) {
                    if (lvalue instanceof Comparable &&
                        lvalue.getClass().isAssignableFrom(rvalue.getClass())) {
                        int result = ((Comparable) lvalue).compareTo(rvalue);
                        return new NumberLiteral(node.getSourceInfo(), result);
                    }
                    else {
                        int result =
                            lvalue.toString().compareTo(rvalue.toString());
                        return new NumberLiteral(node.getSourceInfo(), result);
                    }
                }
            }

            node.setLeftExpression(left);
            node.setRightExpression(right);

            return node;
        }
    }
}


text:
Q: multiple Regression Analysis for categorical and continuous varibles I'm conducting a regression analysis between a dependent variable ( continuous) and two independent variable one is categorical ( nominal , yes and no value) and the other is continuous . is the multiple regression analysis the right test ? also should I use the dummy variables here for the categorical variable?

A: Introduction
Without understanding the goals of your analysis, I can't say whether multiple regression analysis is the right test or whether you should use dummy variables. However I will try to explain what information a multiple regression analysis will give you and how to interpret dummy variables and you can decide if this is appropriate for your use case.
Dummy variables
If I've understood correctly it seems as though the categorical variable is binary if it's just yes or no. If it is binary I can't see why there would be a need for a dummy variable, just encoding either yes or no to $0$ or $1$ would be appropriate.
Multiple regression
In a multiple regression analysis you're modelling the conditional mean dependent variable, lets call that $y$, given your independent variables ($x_{1}$ and $x_{2}$ in your case). This is modelled as a linear combination of the independent variables multiplied by some coefficients ($\beta_{1}$ and $\beta_{2}$) plus an intercept term $\beta_{0}$
$$\mathbb{E}[y | x_{1}, x_{2}] = \beta_{0} + x_{1}\beta_{1} + x_{2}\beta_{2}$$
This can be useful if you want to estimate the effect that a variable has on your dependent variable. It can be useful if you want to predict future values of $y$ and I'm sure plenty of other things, but these have been my primary uses.
Interpreting coefficients
After estimating the coefficients from your data, what do they actually tell you?
For the continuous variable the coefficient tells you the expected increase (or decrease if the coefficient is negative) in $y$ given $x_{1}, x_{2}$ per $1$ unit increase in $x_{1}$ if all other  variables are held constant
The binary variable interpretation is the same as above but as $x_{2}$ can only take on the values $1$ or $0$ the coefficient tells you how much $\mathbb{E}[y | x_{1}, x_{2}]$ will increase (or decrease) if $x_{2} = 1$
Prediction
You can also use these coefficients to predict values of $y$ by providing the appropriate values of $x_{1}$ and $x_{2}$.
Example
I don't have any data for this example so I'm just making this up but will hopefully tie the above together.
Let $y$ be the score achieved by a pupil on a text, $x_{1}$ be the number of hours studied and $x_{2}$ be whether they attended an additional class ($1$ if they attended $0$ otherwise. The regression model might look something like
$$\mathbb{E}[test \ score | hours \ studied, extra \ class] = 50 + (0.8)hours \ studied + (20)extra \ class$$
The interpretation is then, if someone didn't study at all and didn't attend an extra class then on average they would score $50$.
If the extra class variable is fixed at either $0$ or $1$ then for every hour studied you would increase your test score by $0.8$
Finally if the hours of study is fixed at some value then attending the extra class would increase your test score by $20$
Now if we wanted to use this model to predict the mean test score for people that study for $10$ hours and attend an extra class we simply input these values into the model
\begin{align*}
\mathbb{E}[test \ score | hours \ studied = 10, extra \ class = 1] &= 50 + (0.8)(10) + (20)(1) \\
&= 78
\end{align*}
Note on sampling
It is worth noting that any decisions made are heavily dependent on how the data is collected. Be very careful about what decisions are made of the back of this model if you don't have any background in sampling.
For example, if you only collected this data in one school I'd be cautious about inferring that the interpreted coefficients are applicable across all schools. Maybe the extra class was ran by an incredible teacher and the increase in $y$ by $20$ is only applicable to a handful of teachers with their skill. In this case your sample has biased the effect of an extra class.
Final Remarks
Hopefully this is useful and helps you decide if multiple regression is indeed useful for your use case.

redpajama_set_name: RedPajamaStackExchange


text:
using System.Linq;
using TestAssembly.Generic.Generic;
using Xunit;

namespace Photosphere.Di.IntegrationTests.Registration
{
    public class GetInstanceRegistrationByGenericTypeTests : IntegrationTestsBase
    {
        public GetInstanceRegistrationByGenericTypeTests() : base(typeof(IFooForGeneric)) {}

        [Fact]
        internal void GetInstance_ByInterfaceForGenericInterface_NotNull()
        {
            var result = NewContainer.GetInstance<IGenericService<IFooForGeneric>>();
            Assert.NotNull(result);
        }

        [Fact]
        internal void GetInstance_ByClassForGenericInterface_NotNull()
        {
            var result = NewContainer.GetInstance<IGenericService<FooForGeneric>>();
            Assert.NotNull(result);
        }

        [Fact]
        internal void GetInstance_ByClassForGenericClass_NotNull()
        {
            var result = NewContainer.GetInstance<GenericServiceClass<IFooForGeneric>>();
            Assert.NotNull(result);
        }

        [Fact]
        internal void GetInstance_ByEnumerableForGenericInterface_ExpectedCount()
        {
            var result = NewContainer.GetAllInstances<IGenericService<BarForGeneric>>().Count();
            Assert.Equal(2, result);
        }

        [Fact]
        internal void GetInstance_ByEnumerableForGenericClass_ExpectedCount()
        {
            var result = NewContainer.GetAllInstances<GenericServiceClass<BarForGeneric>>().Count();
            Assert.Equal(2, result);
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
Q: Error connecting an Android Client to a socket server in NodeJS I got a Socket Server running in NodeJS. I've connected from a Console Application with this library:
https://github.com/Gottox/socket.io-java-client
I used the example app (from the link) and it works correctly. Then, I translate that code to an Android application, but it doesn't connect to the Server. I put the Network Permissions of the app inside the "androidmanifest" file, but it didn't work either.
Bellow is the error when I run the app. Thanks in advance for the help...
02-04 00:56:51.717: D/dalvikvm(971): Late-enabling CheckJNI
02-04 00:56:51.749: D/dalvikvm(971): Debugger has detached; object registry had 1 entries
02-04 00:56:51.761: E/Trace(971): error opening trace file: No such file or directory (2)
02-04 00:56:51.837: W/dalvikvm(971): Unable to resolve superclass of Lio/socket/WebsocketTransport; (851)
02-04 00:56:51.837: W/dalvikvm(971): Link of class 'Lio/socket/WebsocketTransport;' failed
02-04 00:56:51.837: I/dalvikvm(971): Could not find method io.socket.WebsocketTransport.create, referenced from method io.socket.IOConnection.connectTransport
02-04 00:56:51.837: W/dalvikvm(971): VFY: unable to resolve static method 5178: Lio/socket/WebsocketTransport;.create (Ljava/net/URL;Lio/socket/IOConnection;)Lio/socket/IOTransport;
02-04 00:56:51.837: D/dalvikvm(971): VFY: replacing opcode 0x71 at 0x001a
02-04 00:56:51.901: I/System.out(971): an Error occured
02-04 00:56:51.901: W/System.err(971): io.socket.SocketIOException: Error while handshaking
02-04 00:56:51.901: W/System.err(971):  at io.socket.IOConnection.handshake(IOConnection.java:322)
02-04 00:56:51.901: W/System.err(971):  at io.socket.IOConnection.access$7(IOConnection.java:292)
02-04 00:56:51.901: W/System.err(971):  at io.socket.IOConnection$ConnectThread.run(IOConnection.java:199)
02-04 00:56:51.901: W/System.err(971): Caused by: java.net.ConnectException: failed to connect to /127.0.0.1 (port 3000) after 10000ms: isConnected failed: ECONNREFUSED (Connection refused)
02-04 00:56:51.905: W/System.err(971):  at libcore.io.IoBridge.isConnected(IoBridge.java:224)
02-04 00:56:51.905: W/System.err(971):  at libcore.io.IoBridge.connectErrno(IoBridge.java:161)
02-04 00:56:51.905: W/System.err(971):  at libcore.io.IoBridge.connect(IoBridge.java:112)
02-04 00:56:51.905: W/System.err(971):  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
02-04 00:56:51.905: W/System.err(971):  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459)
02-04 00:56:51.905: W/System.err(971):  at java.net.Socket.connect(Socket.java:842)
02-04 00:56:51.905: W/System.err(971):  at libcore.net.http.HttpConnection.<init>(HttpConnection.java:76)
02-04 00:56:51.905: W/System.err(971):  at libcore.net.http.HttpConnection.<init>(HttpConnection.java:50)
02-04 00:56:51.905: W/System.err(971):  at libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:341)
02-04 00:56:51.905: W/System.err(971):  at libcore.net.http.HttpConnectionPool.get(HttpConnectionPool.java:87)
02-04 00:56:51.905: W/System.err(971):  at libcore.net.http.HttpConnection.connect(HttpConnection.java:128)
02-04 00:56:51.905: W/System.err(971):  at libcore.net.http.HttpEngine.openSocketConnection(HttpEngine.java:315)
02-04 00:56:51.905: W/System.err(971):  at libcore.net.http.HttpEngine.connect(HttpEngine.java:310)
02-04 00:56:51.905: W/System.err(971):  at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:289)
02-04 00:56:51.905: W/System.err(971):  at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:239)
02-04 00:56:51.905: W/System.err(971):  at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:273)
02-04 00:56:51.905: W/System.err(971):  at libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:168)
02-04 00:56:51.905: W/System.err(971):  at io.socket.IOConnection.handshake(IOConnection.java:313)
02-04 00:56:51.909: W/System.err(971):  ... 2 more
02-04 00:56:51.909: W/System.err(971): Caused by: libcore.io.ErrnoException: isConnected failed: ECONNREFUSED (Connection refused)
02-04 00:56:51.909: W/System.err(971):  at libcore.io.IoBridge.isConnected(IoBridge.java:208)
02-04 00:56:51.909: W/System.err(971):  ... 19 more
02-04 00:56:51.909: I/io.socket(971): Cleanup
02-04 00:56:51.969: D/libEGL(971): loaded /system/lib/egl/libEGL_emulation.so
02-04 00:56:52.021: D/(971): HostConnection::get() New Host Connection established 0xb8a83f48, tid 971
02-04 00:56:52.025: D/libEGL(971): loaded /system/lib/egl/libGLESv1_CM_emulation.so
02-04 00:56:52.029: D/libEGL(971): loaded /system/lib/egl/libGLESv2_emulation.so
02-04 00:56:52.101: W/EGL_emulation(971): eglSurfaceAttrib not implemented
02-04 00:56:52.121: D/OpenGLRenderer(971): Enabling debug mode 0
02-04 00:56:52.181: D/OpenGLRenderer(971): TextureCache::get: create texture(0xb8a3c8e8): name, size, mSize = 1, 1048576, 1048576
02-04 00:56:52.557: D/OpenGLRenderer(971): TextureCache::get: create texture(0xb8a53d18): name, size, mSize = 2, 5184, 1053760
02-04 00:56:52.653: D/OpenGLRenderer(971): TextureCache::get: create texture(0xb8a3a470): name, size, mSize = 4, 20736, 1074496
02-04 00:56:52.665: D/OpenGLRenderer(971): TextureCache::get: create texture(0xb8a37848): name, size, mSize = 6, 2304, 1076800

A: You can't connect from the emulator to your local machine directly using localhost or 127.0.0.1 - you have to use a special address.
The address to connect to a server running on your local machine (from the emulator) is 10.0.2.2, as described in the developer documentation.


From the moment your baby is born, there is nothing you will enjoy more than holding your baby close. The multi award-winning Ergobaby Carrier offers front, back and hip positions. Designed to grow with your baby from birth to toddler (3.2kgs with Infant Insert to 20kgs), Ergobaby is the only carrier you'll ever need.
Start with the durable and lightweight Ergobaby Performance Carrier and combine that with our ergonomic Infant Insert to make the Ergobaby Performance Bundle of Joy. From day one, use the Infant Insert to support the head and neck of newborns and ensure they sit in the correct, ergonomic position while in the Carrier. Once your baby is 4 months old you no longer need the Infant Insert and you can comfortably carry your baby up to 20 kg.
Durable and lightweight, the Ergobaby Performance Carrier is built for adventure. Take your baby along for the fun. The outdoor-style carrier is made with a durable exterior and a breathable mesh interior for ultimate outdoor performance.
An Ergobaby Infant Insert is required for use with all Ergobaby Carriers from birth to 4/5 months or until baby has developed head control. All Ergobaby Infant Inserts are designed to work and fit with any Ergobaby Carrier.


text:
Tough Love Miami Episode Eight: Liar, Liar.... Jane Is on Fire
Stacey Russell
Stacey Russell | November 21, 2011 | 10:45am
Well, we made it. Is it just us or was a week without Tough Love Miami a little hard? Last Sunday, we watched a terrific show called The Wards Get Real and if you happen to catch it, you know they do just that week after week even when the cameras are off.
Last night, Tough Love was back with a vengeance and per usual, Steve got right to
the point. This week, he wanted the ladies and the audience to focus on
secrets and lies. This is something he says breaks up most
relationships. So, he put the girls in a scary van and took them to a
secret location. When they arrived, they found our new favorite game:
Land O' Lies.
You might be asking yourself, "what exactly is this new amazing game?" Well, Land O' Lies has been devised to determine what constitutes a white lie, and what constitutes a red lie. Sorry, what the eff is a "red lie?" Maybe it's just us, but it is a white lie or it's a big fat regular lie. Wait, is that racist?
According to Steve and his mama JoAnn, apparently dating multiple people at the same time and lying about it isn't a good thing. And if your ex calls and you tell your current boo it was the wrong number, don't worry, apparently that is OK.
Halfway into this game, it turns to Jane. And this is where it gets good. Steve asks Jane if she's ever lied about being sick so she wouldn't have to visit her boyfriend's parents. She has and no, she doesn't think it's a big deal.
The best quote had to be this, "I have lied to my ex about wanting him, just because I'm lonely." We have all been there and drunk dialed that, but that statement alone made Avonte confront Jane on the way back the house. To say Jane lost her shit when she asked if she still had a boyfriend is an understatement. This is where things got good...
When the ladies went out on their weekly dine and dash with their beaus, for the first time all season, many of the ladies got real. Leilani informed George (and vice versa) what went wrong in their last relationship. Not to get cheesy, but we saw them move to a new level. Can we call it now that they are totally still dating?
Then, there is Avonte. Oh, Avonte. If you remember from the first episode, she is on this show because dated a married man for a very, very long time. Because of her former beau, she accepted his religion that he could have more than one wife. Um, can someone say Sister Wives? Her date thinks it is weird, but she too thinks it is weird. In fact, she says she "can't believe it ever happened." Yeah bitch, us either.
When it comes to group, Leilani wins best of the week because she and George finally made out. Christine also was praised for her progress with kind-of-creepy Frank. The fact he is still here after the last dating disaster, where Christine told Frank her entire life story before they even got their drinks, is a f***ig miracle.
Who got the hot seat for the worst of the week? Jane, of course. She got there not because she lied to Arthur, her date for the last few weeks, but because she lied to Steve. Mental note: this pisses him off. Jane informs Mr. Ward she is just conflicted and confused. He follows this up with, "You haven't done anything wrong except keep the truth from me." Oh yeah, Papa Ward was mad. And per usual, some tears from Jane softened him up.
We have said it once and we will wait it again: if Steve Ward is giving you Tough Love, just start crying. We can imagine it's his one and only vice.
Follow Cultist on Facebook and Twitter @CultistMiami.

redpajama_set_name: RedPajamaCommonCrawl


text:
Q: Parsing field values using ArcGIS Field Calculator? I am using 10.0 ArcView and am trying to get the "R" in R12345678910 to drop.
The numbers are in a column in the attribute table and i've always used VB scripting.
I was using Field Calculator.

A:  >>>'R12345678910'[1:]
    '12345678910'

Appending [1:] to a string in python will remove the initial character. Look up slice in the python help.
To use this in the ArcGIS field calculator, you will need to turn on Python parsing
for the unitCode = enter
!your_field_name![1:]

A: VBScript Example:
Right( [FieldName], 11 )

This code will take the 11 characters from the right, and anything left of those 11 characters is omitted.
Python Example:
!FieldName!.lstrip('R')

This code takes a string and removes R from the left/front of it.
Both of these examples should get rid of the R in your strings.
Edit: Regan Sarwas' updated answer works great and is actually more versatile because it can handle more cases.


text:
Home/Business/Halfords forecasts H1 pre-tax profits of £55 million as cycling momentum continues
Halfords forecasts H1 pre-tax profits of £55 million as cycling momentum continues
Rebecca Morley 1st October 2020	Business
Halfords has reported continued growth in cycling, up 46% like-for-like in the five-week period to 25th September.
H1 profit before tax is expected to be in excess of £55 million, as a result of the momentum in cycling and motoring products and services.
The retailer's 20-week trading update on 8th September highlighted an improving growth trend throughout the period, reflecting continued strength in cycling and a return to growth in motoring products and services. Despite the peak cycling and staycation season coming to an end, this positive momentum has continued, Halfords said.
Group like-for-like growth in the five weeks to 25th September was 22%. The 46% rise in cycling reflects "the strength of our unique proposition and continual improvement in supply to meet unprecedented levels of demand", the retailer said.
Halfords said it now expects profit before tax for H1 FY21 to be in excess of £55 million. "We do, however, remain cautious in our outlook for H2," the retailer continued. "The potential impact of second waves of COVID-19 now seems more pronounced than just a few weeks ago, and the economic impact of an end to the furlough scheme and the outcome of Brexit negotiations remains very uncertain.
"We are well placed to address any headwinds we may face and capitalise on the tailwinds as they arise. Our balance sheet and liquidity position remain strong."
Read the October issue of BikeBiz below:
Tags bike sales data finance Halfords retail
Previous 55 miles of walking and cycling routes to be created in Greater Manchester by December 2021
Next BikeBiz October edition is now available
Lightspeed Supplier Network launches for North American retailers
Mondraker is to extend its current dealer direct programme to the UK from the start …


text:
Americans For Prosperity – Florida
AFP-FL to host summer town hall series with Ron DeSantis
Published on August 9, 2017 in 2017/Top Headlines by Staff Reports
Americans for Prosperity-Florida is hitting the road to energize activists about tax reform. The grassroots organization is scheduled to hold "Un-Rig the Economy" town hall meetings in Miami, Fort Lauderdale and Orlando in August and September to talk with activists about the current situation in Washington, D.C. and energize them for what's to come. The AFP-FL team will be joined by local leaders and members of the federal affairs team to discuss the need to enact comprehensive tax reform. Rep.…
Poll: Adam Putnam is front-runner in governor's race
It's clear that Agriculture Commissioner Adam Putnam has been running a careful race for Florida governor. And Republican voters like what
Paulson's principles: Money, money, money!
It has been said that money is the lifeblood of politics. If so, many members of the Florida congressional delegation
Chris Latvala says his dad's not the moderate in governor's race
Chris Latvala predicts the race for governor will be a campaign unlike any ever seen before in the Sunshine State,
50 Florida lawmakers earn A+ on AFP-FL scorecard
Published on July 25, 2017 in 2017/Top Headlines by Staff Reports
Fifty legislators received top marks from Americans for Prosperity-Florida, the largest number of A+ legislators since the organization began issuing its annual legislative scorecard. The organization released its 2017 Economic Freedom Scorecard, which graded 5,500 votes on 96 issues, on Tuesday. The scorecard showed 50 legislators — 11 senators and 39 representatives — received an A+. That means legislators scoring an A+ voted with AFP-FL received a score of 100 percent or higher.
Republican consultant Anthony Pedicini is the latest target of a negative mailer in the vitriolic House District 58 primary.
Tom Lee files bill to protect seniors
State Sen. Tom Lee's office announced he had again filed legislation to add financial protections for residents of continuing care retirement
Americans for Prosperity urges Marco Rubio to be 'leading voice in effort to passing pro-growth tax reform'
Published on June 29, 2017 in 2017 by Staff Reports
Americans for Prosperity wants Sen. Marco Rubio to lead the charge to pass pro-growth tax reform. The organization launched its third ad as part of a grassroots campaign urging members of Congress to "un-rig the economy by seizing the opportunity to enact pro-growth tax reform. The digital ad is part of a summer-long effort by Americans for Prosperity to push for broad, pro-growth tax reform. "Congress has a once in a generation opportunity to fix our broken tax code. Americans…
From schools to shelters, Florida is readying for an influx of people struggling for food, water and power in hurricane-damaged
Florida taxpayers, entrepreneurs winners in new budget deal, says Americans for Prosperity
Published on June 2, 2017 in Peter/Top Headlines by Peter Schorsch
Florida taxpayers will be the true winners next week as lawmakers return to Tallahassee for a special session on economic incentives and education funding in the state's budget, says Americans for Prosperity-Florida. The conservative government watchdog group is applauding Friday's announcement by House Speaker Richard Corcoran, Senate President Joe Negron, and Gov. Rick Scott that they will be meeting for a Special Session to reconcile the state's nearly $84 billion budget. As reported by FloridaPolitics.com, Scott called on the Legislature…
Raises will be provided to 16 upper-level and mid-level employees of Enterprise Florida, as the state's business-recruitment agency does away
Future Senate President Wilton Simpson brought in more than $200,000 through his political committee last month, and forked over half
Siemens, Chromalloy joint project to bring 350 new Hillsborough jobs
Two global engineering companies, Siemens and Chromalloy Gas Turbine Corporation, have chosen Hillsborough County for the headquarters of a new joint
Interests for and against 'liquor wall' legislation react to passage
Published on April 27, 2017 in Statewide/Top Headlines by Jim Rosica
The reaction to the Florida Legislature's repeal of the state's "booze wall" law continued long after Wednesday's vote. The House, on a close vote of 58-57, passed the Senate's bill (SB 106) to allow retailers to remove the 'wall of separation' between hard liquor and other goods. (Full story here.) The legislation now heads to Gov. Rick Scott. If signed into law, the state will end 82 years of mandating that retailers sell distilled spirits in a separate store from other items. Floridians for Fair Business…
Florida's western Panhandle, the one area of the state spared the impact of Hurricane Irma nearly a month ago, is
Rick Scott declares state of emergency for Nate
Gov. Rick Scott on Thursday declared a state of emergency in 29 Florida counties as Tropical Storm Nate seems headed for
Bill would add 'gender identity' to hate crimes
Legislation filed in the Florida House would add violence against an individual based on "gender or gender identity" to the
LIBRE Initiative releases Spanish-language ad calling for end of 'corporate welfare'
Published on April 25, 2017 in 2017 by Staff Reports
The LIBRE Initiative is calling on the Florida Legislature to put an end to corporate welfare. In a new Spanish-language digital ad, the organization calls on Floridians to contact their lawmakers and tell them "the game's over; end this corporate welfare." The 60-second spot is similar to one released earlier this month by Americans for Prosperity-Florida, which compared economic incentives to gambling and said the incentives "haven't paid out." Both the LIBRE Initiative and Americans for Prosperity-Florida are aligned with…
Americans for Prosperity-Florida is hitting the road to energize activists about tax reform. The grassroots organization is scheduled to hold
Fifty legislators received top marks from Americans for Prosperity-Florida, the largest number of A+ legislators since the organization began issuing
Americans for Prosperity wants Sen. Marco Rubio to lead the charge to pass pro-growth tax reform. The organization launched its
AFP-FL urges Senate to keep incentives out of Triumph Gulf Coast bill
A Northwest Florida Republican plans to amend the Senate's version of a bill to send millions of dollars to the Panhandle communities impacted by the 2010 BP oil spill to allow money to be spent on economic incentives. The Panama City News Herald reported this weekend that Sen. George Gainer said he plans to file an amendment to the bill (SB 364) so that it allows funds to be spent on economic incentives for companies in the region that provide…
Latest on the legislative staffing merry-go-round
With a tip of the hat to LobbyTools, here are the most recent movements — both on and off — of
George Gainer takes a licking on social media
Social media reaction was hard and swift this weekend against state Sen. George Gainer, the Panama City Republican who filed


text:
Video Segments
DVD & Digital
Impact Partners
defining hope
Now available on DVD and Digital
The Hollywood Reporter calls Defining Hope "A clear-eyed and compassionate conversation starter."
Defining Hope wins Best Premiere – Documentary Feature at the Heartland Film Festival
Defining Hope is named a finalist for Documentary Feature – 61st Annual CINE Golden Eagle Awards
Defining Hope is officially available for purchase on DVD or as a digital download through Kino Lorber and iTunes
Filmmaker Carolyn Jones spent four years interviewing and photographing nurses for the groundbreaking American Nurse book and film, and another year of research and interviews focused on what Dying in America looks like, all of which has led her to making this new film, the culmination of a journey, called Defining Hope.
Defining Hope is a story about people weighing what matters most at the most fragile junctures in life, and the nurses who guide them. It's a documentary that follows patients with life-threatening illness as they make choices about how they want to live, how much medical technology they can accept, what they hope for and how that hope evolves when life is threatened. It is optimistic and reminds us that we have choices in how we die.
This movie is critical and relevant right now, with our rapidly aging population and incalculable challenges in healthcare and end-of-life care. We aren't dying the way we used to. We have ventilators, dialysis machines, ICUs—technologies that can "fix" us and keep our bodies alive—which have radically changed how we make medical decisions. In our death-denying culture, no matter how sick we get, there is always "hope." The will to live is a powerful force, and eventually we will all have to make individual decisions when faced with very complex choices.
The film was released in November 2017, in honor of National Hospice and Palliative Care Month. It went on to screen over 150 times in both theatrical and community settings and in the Spring of 2018 it aired on 977 PBS stations nationwide.
Our film is a non-profit project, generously supported by the Jonas Center for Nursing and Veterans Healthcare, the American Nurses Foundation, and the generosity of individuals that believe in our mission.
It is fiscally sponsored by the New York Foundation for the Arts
"What makes life meaningful enough to go on living?"
― Paul Kalanithi, When Breath Becomes Air


Vol. I, Book VII, Chap. VII: "The Traveller on His Arrival Takes Precautions for Departure"
It was nearly eight o'clock in the evening when the cart, which we left on the road, entered the porte-cochère of the Hotel de la Poste in Arras; the man whom we have been following up to this moment alighted from it, responded with an abstracted air to the attentions of the people of the inn, sent back the extra horse, and with his own hands led the little white horse to the stable; then he opened the door of a billiard-room which was situated on the ground floor, sat down there, and leaned his elbows on a table; he had taken fourteen hours for the journey which he had counted on making in six; he did himself the justice to acknowledge that it was not his fault, but at bottom, he was not sorry.
The landlady of the hotel entered.
"Does Monsieur wish a bed? Does Monsieur require supper?"
He made a sign of the head in the negative.
"The stableman says that Monsieur's horse is extremely fatigued."
Here he broke his silence.
"Will not the horse be in a condition to set out again to-morrow morning?"
"Oh, Monsieur! he must rest for two days at least."
"Is not the posting-station located here?"
The hostess conducted him to the office; he showed his passport, and inquired whether there was any way of returning that same night to M. sur M. by the mail-wagon; the seat beside the post-boy chanced to be vacant; he engaged it and paid for it. "Monsieur," said the clerk, "do not fail to be here ready to start at precisely one o'clock in the morning."
This done, he left the hotel and began to wander about the town.
He was not acquainted with Arras; the streets were dark, and he walked on at random; but he seemed bent upon not asking the way of the passers-by. He crossed the little river Crinchon, and found himself in a labyrinth of narrow alleys where he lost his way. A citizen was passing along with a lantern. After some hesitation, he decided to apply to this man, not without having first glanced behind and in front of him, as though he feared lest some one should hear the question which he was about to put.
"Monsieur," said he, "where is the court-house, if you please."
"You do not belong in town, sir?" replied the bourgeois, who was an oldish man; "well, follow me. I happen to be going in the direction of the court-house, that is to say, in the direction of the hotel of the prefecture; for the court-house is undergoing repairs just at this moment, and the courts are holding their sittings provisionally in the prefecture."
"Is it there that the Assizes are held?" he asked.
"Certainly, sir; you see, the prefecture of to-day was the bishop's palace before the Revolution. M. de Conzie, who was bishop in '82, built a grand hall there. It is in this grand hall that the court is held."
"If Monsieur desires to witness a case, it is rather late. The sittings generally close at six o'clock."
When they arrived on the grand square, however, the man pointed out to him four long windows all lighted up, in the front of a vast and gloomy building.
"Upon my word, sir, you are in luck; you have arrived in season. Do you see those four windows? That is the Court of Assizes. There is light there, so they are not through. The matter must have been greatly protracted, and they are holding an evening session. Do you take an interest in this affair? Is it a criminal case? Are you a witness?"
"I have not come on any business; I only wish to speak to one of the lawyers."
"That is different," said the bourgeois. "Stop, sir; here is the door where the sentry stands. You have only to ascend the grand staircase."
He conformed to the bourgeois's directions, and a few minutes later he was in a hall containing many people, and where groups, intermingled with lawyers in their gowns, were whispering together here and there.
It is always a heart-breaking thing to see these congregations of men robed in black, murmuring together in low voices, on the threshold of the halls of justice. It is rare that charity and pity are the outcome of these words. Condemnations pronounced in advance are more likely to be the result. All these groups seem to the passing and thoughtful observer so many sombre hives where buzzing spirits construct in concert all sorts of dark edifices.
This spacious hall, illuminated by a single lamp, was the old hall of the episcopal palace, and served as the large hall of the palace of justice. A double-leaved door, which was closed at that moment, separated it from the large apartment where the court was sitting.
The obscurity was such that he did not fear to accost the first lawyer whom he met.
"What stage have they reached, sir?" he asked.
"It is finished," said the lawyer.
This word was repeated in such accents that the lawyer turned round.
"Excuse me sir; perhaps you are a relative?"
"No; I know no one here. Has judgment been pronounced?"
"Of course. Nothing else was possible."
"Then his identity was established?"
"What identity?" replied the lawyer. "There was no identity to be established. The matter was very simple. The woman had murdered her child; the infanticide was proved; the jury threw out the question of premeditation, and she was condemned for life."
"So it was a woman?" said he.
"Why, certainly. The Limosin woman. Of what are you speaking?"
"Nothing. But since it is all over, how comes it that the hall is still lighted?"
"For another case, which was begun about two hours ago."
"Oh! this one is a clear case also. It is about a sort of blackguard; a man arrested for a second offence; a convict who has been guilty of theft. I don't know his name exactly. There's a bandit's phiz for you! I'd send him to the galleys on the strength of his face alone."
"Is there any way of getting into the court-room, sir?" said he.
"I really think that there is not. There is a great crowd. However, the hearing has been suspended. Some people have gone out, and when the hearing is resumed, you might make an effort."
The lawyer left him. In the course of a few moments he had experienced, almost simultaneously, almost intermingled with each other, all possible emotions. The words of this indifferent spectator had, in turn, pierced his heart like needles of ice and like blades of fire. When he saw that nothing was settled, he breathed freely once more; but he could not have told whether what he felt was pain or pleasure.
He drew near to many groups and listened to what they were saying. The docket of the session was very heavy; the president had appointed for the same day two short and simple cases. They had begun with the infanticide, and now they had reached the convict, the old offender, the "return horse." This man had stolen apples, but that did not appear to be entirely proved; what had been proved was, that he had already been in the galleys at Toulon. It was that which lent a bad aspect to his case. However, the man's examination and the depositions of the witnesses had been completed, but the lawyer's plea, and the speech of the public prosecutor were still to come; it could not be finished before midnight. The man would probably be condemned; the attorney-general was very clever, and never missed his culprits; he was a brilliant fellow who wrote verses.
"Will the door be opened soon, sir?"
"It will not be opened at all," replied the usher.
"What! It will not be opened when the hearing is resumed? Is not the hearing suspended?"
"The hearing has just been begun again," replied the usher, "but the door will not be opened again."
"Because the hall is full."
"What! There is not room for one more?"
"Not another one. The door is closed. No one can enter now."
The usher added after a pause: "There are, to tell the truth, two or three extra places behind Monsieur le Président, but Monsieur le Président only admits public functionaries to them."
So saying, the usher turned his back.
"Take this to Monsieur le Président."
The usher took the paper, cast a glance upon it, and obeyed.


text:
The NWA Southeast Television Championship was a minor title in the National Wrestling Alliance's Alabama territory known as Southeast Championship Wrestling. It existed from 1977 until 1985.

Title history

See also
National Wrestling Alliance
Southeast Championship Wrestling

Footnotes

References

National Wrestling Alliance championships
Continental Championship Wrestling championships
Television wrestling championships
United States regional professional wrestling championships

redpajama_set_name: RedPajamaWikipedia


NEW YORK — Many spouses and partners around the country will likely breathe a bit easier following the Super Bowl. That's because they'll be getting their loved ones "back," at least for a few months. A recent survey finds that the average NFL fan spends 46 hours a month thinking, talking, or reading about their favorite team.
The survey, commissioned by Ticketmaster, sought to find out just how passionate NFL fans are when it comes to their beloved team. Researchers polled 2,000 fans across the country and found that 84 percent drop everything they're doing to watch the game when their team takes the field. Half would even miss a major event in their lives for tickets to see a game live.
Just how important are games to the typical fan? One in ten parents admit to missing their child's recital to watch a game. Thirty-five percent have canceled dinner plans. A quarter of respondents have skipped someone's birthday party, and one in five say they've even ditched a date for the love of the game.
NFL games also present the opportunity for an exciting road trip during the season. The survey revealed that fans travel an average of 296 miles to catch an away game, but they'll go even farther should their team make the playoffs.
Four in ten are true die-hards: they don't miss a minute of single game during the regular season. Women are also becoming more and more infatuated with football. Ticketmaster reports a 61 percent increase among females buying season ticket plans.
The survey also included a personality test to see whether fans were more likely to be "Tailgate Aces," or people who live for a good parking lot party rain or shine; "Stats Champs," who boast what seems like an infinite knowledge of their favorite team and players; "Hype Masters," who are the most likely to get their row standing, shouting, or chanting at the stadium; or "Die Hards," who have lived and breathed football since birth.
Researchers found that fans in Los Angeles led the way for Tailgate Aces, while fans in Green Bay were the Stats Champ champions. Baltimore fans were the top Hype Masters, and those in Philadelphia were most likely to be Die Hards.
As for predictions of who will win the Super Bowl next year — three quarters of respondents say they always pick their favorite team ahead of a new season.


This is a collaboration with the talented and Woolly Sokpupit who wanted to do a political track to protest the state of sock medical care.
It is a sad fact that while medical care is improving for humans in all civilized countries, and even in America, medical care for socks is almost a thing of the past. In years gone by a wounded sock could expect to be healed, or "darned", but these days they are just left to die.
This is, in part, because of cheap socks made of artificial fibre, or "Replicants" as they are known in sock circles, and partly because of the callous indifference of humans, and also because human women have found more entertaining things to do of an evening. We hope that this will raise consciousness of the apsockalypse that is going on around you!


A series of textiles made for my side brand, Beech Hall. A collaboration of three artists, our second collection of ceramics, soft goods and jewelry was called Cabana. This collection was inspired by mid-century travel, Brazilian jungles, beach days and tropical nights. The textiles I created were then silkscreened, and sewn into decorative pillows by Wade Keller.


This article explains how to add a new Group to your school. The Groups feature allows you to assign a group of learners to one or more courses.
Note that you must have courses created and learners enrolled in your school to perform this task. Click here to learn more about creating courses. Click here to learn more about adding learners.
Click Community and select Groups.
Enter a name for your group. Click Create.
Add learners to the group by typing the learners' names and selecting from the drop-down menu. Click Add Members.
Click Course Access. Assign courses to the learners by typing the course names and selecting from the drop-down menu. Click Assign Courses. All learners in the group will receive access to the assigned courses.


text:
Q: Multiple Checkbox Saving to DB 1 or 0 Creating multiple question checkboxes and I need to send two possible cases 1 or 0 to the database. However, it always sends the last one I click as 1 all the others 0. So for example, if a user clicks/checks the first one and the last I want to send to the database both 1 and the other two unchecked 0.
Controller
<?php

public function create($request)
{
    foreach ($request['options'] as $key => $option) {
        Answer::create([
            'question_id' => $this->get(),
            'text' => $option,
            'correct' => $request['correct'] == $key ? 1 : 0
        ]);
    }
}

View
@for($i = 1; $i<=4; $i++)

has('options.'.$i) ? ' has-error': '' }}" id="option{{ $i }}">

                <input id="cc" type="checkbox" name="correct" value="{{$i}}" {{ $i==1 ? 'checked' : '' }} >

            <input type="text" name="options[{{ $i }}]" value="{{ old('options.'.$i) }}"
                   class="form-control" placeholder="@lang('general.option') {{ $i }}">
            @if($errors->has('options.'.$i))

                    {{ $errors->first('options.'.$i) }}

            @endif

@endfor

A: Either mention array of control for checkbox as below
 <input  id="cc" type="checkbox" name="correct[]" value="{{$i}}" {{ $i==1 ? 'checked' : '' }}  >

change name="correct" to name="correct[]"
OR
give different name to each checkbox using incremental variable like
name="correct" to name="correct_".$i


text:
Young Fabians
Anticipations Magazine
Minutes of Young Fabian Executive Meetings
Young Fabians Constitution
Safe Space Policy
Networks signup
Finance Network
Health Network
Education Network
BAME Advocacy Group
Arts and Culture Network
Environment Network
Communications Network
Tech Network
Devolution and Local Government Network
Law Network
York Young Fabians
Education is the key to better nutrition
by Louie Woodall
Posted on 11 June, 2014 · Follow Louie on Twitter
The UK's claim to being a developed nation is increasingly fragile. We may have the sixth largest economy, a literate population, and a stable democracy, but we are failing to safeguard the health and wellbeing of millions within our own borders.
Few other scandals undermine the UK's supposed 'advanced' status more than the millions of young people and children currently suffering from poor nutrition. In England, children eat 50% more sugar than the recommended level and only 25% of their recommended levels of fruit and vegetables, according to the Faculty of Public Health. This type of diet is a key contributor to the scourge of "modern malnutrition"- diets that result in obesity and other health issues. Traditional malnutrition- in the sense of people not receiving enough food to function- is also still at large in the UK. Figures from the 2003 textbook of paediatrics revealed that 20% of hospitalised children were at risk of developing the condition.
Modern malnutrition in young people inflicts both physical and psychological damage that can escalate rapidly to severe illness and increased risk of early death later in life. The body quite literally rebels against itself if it does not receive the right fuel it needs to keep running, weakening the coronary system and reducing the body's defences against cancer. Recent studies even suggest that poor nutrition can be linked to an increased likelihood of committing anti-social behaviour. Traditional malnutrition, meanwhile, is linked to stunted growth, delayed intellectual development, and an increased risk of rickets and osteoporosis.
What are the causes of this national disgrace? As the growing queues at food banks testify, accessing food is becoming harder for hundreds of thousands of people across the country. But the problem is not just one of expense. When people do get their hands on food, it is often the 'wrong' kind in terms of nutritional value. In addition, many do not know how to prepare food in a way that maximises its benefits to the body.
Assigning blame for this widespread negligence isn't easy, but one factor must be the poor standard of food, cooking and nutrition education taught in our schools. A survey of teachers conducted by the British Nutrition Foundation (BNF) found that 88% rate nutrition education as poor or just adequate. Over half said they were concerned that weekly lessons were too short.
We know better education is a tonic to a whole range of social ills, but should never forget its value in tackling health issues as well. It is therefore welcome that the government is making cooking and nutrition education compulsory from this September. But without equipping classrooms with the necessary resources or allocating adequate time to nutrition lessons, this pledge will lack punch.
Returning to the BNF survey, 80% of teachers did not believe compulsory classes would change the time available for cooking lessons, and 86% doubted any additional technical support would be on offer.
A country is only as strong as its people, so any government claiming to work in the national interest cannot afford to ignore the physical degradation of millions of its citizens. The coalition should therefore ensure that classrooms are appropriately resourced to provide quality nutrition education and prevent generations of children growing up without knowing how to eat themselves healthy.
youngfabians
Follow @youngfabians on Twitter


text:
Transparency at Bayer
Transparency is a top priority for Bayer. We are committed to build up and strengthen trust by making information accessible from a whole range of areas.
Check out our latest Transparency Highlights
Science Collaboration Explorer
European Small Breeders Initiative
There's no trust without transparency - Bayer has therefore pledged to further strengthen its commitment to transparency.
Matthias Berninger
Global Head of Public Affairs & Sustainability at Bayer
Science is the key to solving the most pressing challenges of our time. Fighting climate change and global diseases will require innovative solutions – and it is our goal to bring them out of the lab and into the world. To garner trust in us and our products, people need to be able to grasp what we are doing and why we are doing it.
Therefore, we at Bayer are committed to building up and strengthening trust by making information about our products and how we operate easily accessible.
Taking concrete action, we have implemented the following 12 commitments promoting transparency beyond regulatory requirements and encouraging an open dialogue about our work. We will continue on this path, striving to advance transparency in the future.
Transparency for our scientific collaborations
We publicly disclose new contract-based scientific collaborations with universities, public research institutions and individuals in Germany via the Bayer Science Collaboration Explorer (BSCE).
Transparency for our scientific publications
We increase transparency and visibility of Bayer's innovative research activities within the external scientific community through our Science in Spotlight platform, listing peer-reviewed scientific publications authored by Bayer employees.
Transparency for our clinical trials
Bayer is fully committed to make information about its planned and ongoing clinical trials publicly available. This is done in line with the position of the global pharmaceutical industry associations and applicable laws and regulations. Bayer will also make results of trials in patients public and provide free access to this information on several publicly accessible Clinical Trial Registries on the internet, irrespective of whether the results of a trial for one of our products are positive or negative. Bayer is committed to sharing of study patient data with qualified researchers as a transparency measure to advance medical knowledge and public health and foster scientific discovery. Data sharing is following international standards to protect patient's data privacy.
Transparency on transfers of value to healthcare professionals
We disclose any financial commitments with healthcare professionals to ensure maximum transparency and safeguard medical integrity via our CRYSTAL database.
Transparency for our Crop Science products
We aim to remove barriers to obtaining detailed information on the safety of our products by enabling access to product safety information and regulatory submission documents in parallel with background materials and information on our rigorous crop safety standards. We are also sharing our internal product safety standards to shed light on how we determine how products can be used safely here. With our European Small Breeders Initiative we provide additional transparency for small vegetable breeding companies in the EU and facilitate their access to innovation.
Transparency in our Crop Science labs
We are opening our doors via our Crop Science OpenLabs program, allowing people to connect with our scientists and watch them carry out a safety study live in our labs and in the field.
Transparency in our business activities
We provide regular and timely information on the Group's position and significant changes in business activities to shareholders, financial analysts, the media, and the general public.
Transparency in our political activities
We disclose in-depth information on our political activities in the transparency registers operated by the European institutions and the U.S. Congress. We also publish our key political positions on our website.
Transparency in our working conditions
We are committed to respecting and fostering human rights within our business activities and in business relations and to reporting transparently on the results of our activities in this area. For more information, please see our Sustainability Report.
Transparency in our charity work
We support charitable projects that focus on achieving Health for All, Hunger for None – our donations are made transparent in our annual Sustainability Report.
Transparency about our ecological impact
In our Sustainability Report, we also showcase how our operations affect the environment and how much natural resources we consume, e.g., concerning freshwater. Our sustainability efforts are also examined by an independent Sustainability Council that regularly reports (PDF, 0,74MB) on its progress and priorities.
Transparency on the alignment with our industry associations' climate positions
We regularly assess and disclose the alignment of our industry associations' climate positions with our commitments on climate change. For more information, please see our Industry Association Climate Review 2021 (PDF, 6,3MB).
We believe that more transparency will foster a stronger, more sustainable, long-term partnership with our stakeholders and, ultimately, increase overall trust in us and our innovations. Therefore, we will continue to engage with stakeholders who are asking for more transparency and strive to further advance our efforts wherever possible in the future. This finds its limits in the protection of, inter alia, business and trade secrets or in compliance with applicable laws and regulations.
Our commitment to transparency goes beyond just Bayer as a company – we want to drive this forward together with our industry, academic, and civil society partners. As we embark on this journey, we welcome any open dialogue with interested stakeholders.
Industry Association Climate Review


text:
Great campaign tool
Dave Mastio, whom I've gotten to know working on the BlogNetNews powered Knoxville Blog Network, announced a new tool yesterday for elections.
It's incredibly cool. Here's what the North Carolina section looks like, for instance. It organizes blogging coverage of candidates in a way that tempers a search engine-type query with an editor who takes into account place and person..
I asked Mastio in an email to send me some comments on his thinking behind the project. He said he'd be blogging about that Tuesday, but he said, in part:
… I wanted to build a place where people could get information from the blogosphere where geography, local expertise and a long-term commitment to covering the subject mattered — to serve that reporter and that independent voter and to help those local bloggers get the recognition and the traffic they deserve.
The only way to do that is to combine the technological know-how of an Internet guru (BNN's Tyler Abbott — also a University of Iowa guy) and the knowledge of an editor who was willing to spend thousands of hours getting to know the bloggers in every state, finding the blogs are the must-reads focused on state and local level news (that would be me).
I think what we've created at BlogNetNews.com/Elections is something special because it isn't just blogging and it isn't just a neat tech toy and it isn't just the same old journalism. It can only exist when all three are combined in a way that I don't think they have been before on a national level.
I think he's right. This is a great journalism election tool. It's also a great tool for anyone interested in politics and elections. Bookmark it!


text:
CryptoPrices
90 API3
90 API3 to USD Calculator - How much US Dollar (USD) is 90 API3 (API3)?
So, you've converted 90 API3 to $138.6 US dollars. We used International Currency Exchange Rate. The most popular Currencies and CryptoCurrencies are added to our Calculator. You can convert API3 to other currencies. Selling 90 API3 you get $138.6 US Dollars at Mon Jan 30 2023 12:23:24 GMT+0000 (Coordinated Universal Time).
How much is 90 API3 in US Dollars?
90 API3 = $138.6
1 API3 is $1.54
Highest API3 price for 24h is $1.66($+0.12), Lowest API3 price for 24h is $1.53 ($-0.01)
Currently, it is priced at $1.54 for API3.
In the recent 24 hours the price has changed by -4.4%(-0.07$)
There are 17,595 coins in circulation.
Last update: Mon Jan 30 2023 12:17:28 GMT+0000 (Coordinated Universal Time)
API3 is down -4.4% (-0.07$) in the last 24
API3 - API3
90 API3 is $138.6
API3 (API3) is a digital crypto-asset.
API3 is ranged as 245 in the global cryptocurrency rating.
The live API3 price today is $1.54 USD for API3.
API3 is down -4.4%(-0.07$) in the last 24 hours.
Top API3 Prices
5 API3 is $7.7
10 API3 is $15.4
50 API3 is $77
100 API3 is $154
1000 API3 is $1,540
1000000 API3 is $1,540,000
Convert 90 Tokens to USD
90 NFT is $0.00004152537
90 10SET is $63.29403
90 ALI is $3.187953
90 KNC is $69.44058
90 PLA is $20.9439
90 CFX is $5.35977
90 SGB is $1.002905
90 CKB is $0.3318813
90 SLP is $0.2766564
90 RLC is $151.2
90 CTC is $52.64694
90 VGX is $37.34334
90 PUNDIX is $41.87619
90 DESO is $1,011.6
90 ANT is $263.7
90 ERG is $159.3
API3 prices next to 90 API3
9 API3 is $13.86
18 API3 is $27.72
180 API3 is $277.2
283 API3 is $435.82
900 API3 is $1,386
Our currency rankings show that the most popular United States dollar exchange rate is the USD to USD rate. The currency code for US Dollars is USD. The currency symbol is $.
The US dollar is the official currency of the United States and is used as a medium of exchange for goods and services within the country. It is also widely accepted as a form of payment in many other countries around the world, making it one of the most widely traded and used currencies in the world. The US dollar is issued and backed by the Federal Reserve, the central banking system of the United States. The value of the US dollar is determined by supply and demand in the global foreign exchange market. It is typically quoted in relation to other currencies, such as the euro or the Japanese yen.
Team X10 Chrome Extension
2023 © Developed by TeamX10 in Ukraine 💛💙
production 2.0.24


Probiotic enriched light soothing lotion with Agave Nectar and Lactobacillus for acne prone skin. Limits the growth of bacteria on skin & deeply hydrates the skin without clogging the pores.
Potent anti-ageing serum with unprecedented combination of active Vitamin C 10% and 66% active DNA for ultimate cell revival. Slows premature ageing. Reduces signs of photodamage, wrinkles, hyper-pigmentation. Makes the skin firmer, brighter and luminous.


text:
Police Briefs 12-06-2017
by Journal Staff • December 11, 2017 • 0 Comments
SUSPECT HIDING IN PORT-O-JOHN BEHIND TD GARDEN
At around 1 p.m. Wednesday, Nov. 27, Massachusetts State Police were notified that Revere Police were pursuing a 2003 Cadillac Deville with New Hampshire plates on Route 1 South towards Boston. The vehicle was wanted in connection with the unarmed robbery of the East Boston Savings Bank on Squire Road in Revere.
During the pursuit, Revere Police were advised over the radio that the suspect vehicle crashed near the Nashua Street Jail and Science Park and that the suspect fled on foot. Numerous State Police patrols from Troops A, H and E, as well as MSP K9 units, assisted in the search. Troopers and an MSP K9 Unit located the suspect at 1:26 p.m. trying to hide in a portable toilet under an off-ramp from Route 93 near the TD Garden.
Troopers turned the suspect over to Revere Police for booking.
Revere Police said the suspect entered the bank and passed a note demanding cash. He made away with about $1,000 cash, but attracted the attention of bank employees outside when a dye=pack exploded. Those employees were able to alert police and send a good description.
Revere Police immediately found the man and pursued him to Boston, where he was caught.
The suspect is identified as Steven Spolidoro, 41, of Woburn. He was arraigned in Chelsea District Court and many charges.
ARMED ROBBERY AT RODEWAY
Revere Police detectives are investigating an armed robbery at a room in the Rodeway Inn last Saturday.
Around 9 a.m., a guest who had rented a room at the hotel called police to the Inn. The guest relayed he had been robbed at gunpoint with a firearm. The assailant was known to him and got away with an undisclosed amount of cash.
Detectives are following up.
Revere Police arrested a Lynn man for driving under the influence of liquor on Sunday night when they found him crashed into the median of VFW Highway.
Around 11:10 p.m., police were called to Mahoney Circle for a man who was stopped in the circle and apparently asleep at the wheel. When police arrived, he had fled, but witnesses pointed officers towards VFW Highway.
Officers pursued and found a car crashed into the median a short distance away.
Dylan Driscoll, 28, of Lynn, was charged with operating under the influence of liquor and operating negligently.
A Revere man has been arrested after he led police on a chase from Sargent Street to Brown Circle last Thursday, Nov. 30.
Around 8:30 p.m., a citizen called in an erratic driver in Ward 6.
Police caught up to the gent on Sargent Street and attempted to pull him over, but he would not stop. He fled through the city streets as police followed him.
At Brown Circle, he stopped, but not before crashing into a cruiser.
Brayan Oliveira de Barros, 19, of 97 Warren St., was charged with failure to stop for police, negligent operation, resisting arrest, attaching plates, and unlicensed operation.
SIDESTREET SHOWDOWN
Two drivers on South Irving Street got into a beef over one another's driving habits on Wednesday, Nov. 29.
Around 2:45 p.m., two drivers got into a dispute on the street.
Then they both got out of their vehicles.
That always spells T-R-O-U-B-L-E.
The argument got physical, and one of the drivers assaulted the other, and likely vice versa.
A Nahant Avenue teen was summonsed to court after he allegedly vandalized a car on Highland Avenue with a tree branch last Saturday morning, Dec. 2.
Police said the teen seemed to pick the car at random and began beating it with a tree branch. Damage included a large dent and many scratches.
The owner saw the commotion and called police, who responded.
Adriana Marie Rodriguez, 18, of 14 Nahant Ave., was charged with malicious destruction of property over $250.
Daniel Alejandro Monsalve, 28, of 53 Centennial Ave., was arrested on two outstanding warrants.
Malika Smith, 26, of 566 Beach St., was arrested on charges of assault and battery by means of a dangerous weapon and assault and battery in a domestic situation.
Steven K. Spolidoro, 41, of Woburn, was arrested on a charge of armed robbery.
Joseph Steve Espinoza, 18, of Lynn, was arrested on an outstanding warrant.
Brayan Oliveira de Barros, 19, of 97 Warren St., was arrested on charges of failing to stop for a police officer, negligent operation of a motor vehicle, resisting arrest, attaching plates, and unlicensed operation of a motor vehicle.
Carlos X. Tetu, 18, of 39 Dashwood St., was arrested on a charge of assault and battery in a domestic situation.
Daniel Nazario, 25, of Boston, was arrested on charges of shoplifting (second offense), trespassing, disorderly conduct, and unlawful removal of a theft detection device.
Tanaja Vienna Carnes, 23, of 106 Walnut Ave., was arrested on an outstanding warrant and on a charge of shoplifting.
Tara A. Perna, 40, of Wakefield, was arrested on four outstanding warrants and on a charge of shoplifting.
Matheus Diaz, 20, of 58 Foster St., was arrested on a charge of assault and battery in a domestic situation.
← Homelessness Among Senior Citizens is a Form of 'Elder Abuse'
Tax Assessments Will Go Up in New Year →