text:
////////////////////////////////////////////////////////////////////////////////
// checkstyle: Checks Java source code for adherence to a set of rules.
// Copyright (C) 2001-2015 the original author or authors.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
////////////////////////////////////////////////////////////////////////////////

package com.puppycrawl.tools.checkstyle.checks.imports;

import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
import java.util.regex.Pattern;

import com.puppycrawl.tools.checkstyle.api.Check;
import com.puppycrawl.tools.checkstyle.api.DetailAST;
import com.puppycrawl.tools.checkstyle.api.FullIdent;
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import com.puppycrawl.tools.checkstyle.utils.CommonUtils;

/**
 *

 * Checks that the groups of import declarations appear in the order specified
 * by the user. If there is an import but its group is not specified in the
 * configuration such an import should be placed at the end of the import list.
 *

 * The rule consists of:
 *
 *

 * STATIC group. This group sets the ordering of static imports.
 *

 *
 *

 * SAME_PACKAGE(n) group. This group sets the ordering of the same package imports.
 * Imports are considered on SAME_PACKAGE group if n first domains in package name
 * and import name are identical.
 *

 *
 *

 * {@code
 * package java.util.concurrent.locks;
 *
 * import java.io.File;
 * import java.util.*; //#1
 * import java.util.List; //#2
 * import java.util.StringTokenizer; //#3
 * import java.util.concurrent.*; //#4
 * import java.util.concurrent.AbstractExecutorService; //#5
 * import java.util.concurrent.locks.LockSupport; //#6
 * import java.util.regex.Pattern; //#7
 * import java.util.regex.Matcher; //#8
 * }
 *

 *
 *

 * If we have SAME_PACKAGE(3) on configuration file,
 * imports #4-6 will be considered as a SAME_PACKAGE group (java.util.concurrent.*,
 * java.util.concurrent.AbstractExecutorService, java.util.concurrent.locks.LockSupport).
 * SAME_PACKAGE(2) will include #1-8. SAME_PACKAGE(4) will include only #6.
 * SAME_PACKAGE(5) will result in no imports assigned to SAME_PACKAGE group because
 * actual package java.util.concurrent.locks has only 4 domains.
 *

 *
 *

 * THIRD_PARTY_PACKAGE group. This group sets ordering of third party imports.
 * Third party imports are all imports except STATIC,
 * SAME_PACKAGE(n), STANDARD_JAVA_PACKAGE and SPECIAL_IMPORTS.
 *

 *
 *

 * STANDARD_JAVA_PACKAGE group. This group sets ordering of standard java/javax imports.
 *

 *
 *

 * SPECIAL_IMPORTS group. This group may contains some imports
 * that have particular meaning for the user.
 *

 *
 *

 * NOTE!
 *

 *

 * Use the separator '###' between rules.
 *

 *

 * To set Regexps for THIRD_PARTY_PACKAGE and STANDARD_JAVA_PACKAGE groups use
 * thirdPartyPackageRegExp and standardPackageRegExp options.
 *

 *
 *

 * Properties:
 *

 *

 *
name	Description	type	default value

 *
customImportOrderRules	List of order declaration customizing by user.
 *          string	null

 *
standardPackageRegExp	RegExp for STANDARD_JAVA_PACKAGE group imports.
 *          regular expression	^(java|javax)\.

 *
thirdPartyPackageRegExp	RegExp for THIRDPARTY_PACKAGE group imports.
 *          regular expression	.*

 *
specialImportsRegExp	RegExp for SPECIAL_IMPORTS group imports.
 *          regular expression	^$

 *
samePackageMatchingDepth	Number of first domains for SAME_PACKAGE group.
 *          	Integer	2

 *
separateLineBetweenGroups	Force empty line separator between import groups.
 *          	boolean	true

 *
sortImportsInGroupAlphabetically	Force grouping alphabetically,
 *          in ASCII sort order.	boolean	false

 *

 *
 *

 * For example:
 *

 *
To configure the check so that it matches default Eclipse formatter configuration
 *        (tested on Kepler, Luna and Mars):

 *

 *
group of static imports is on the top

 *
groups of non-static imports: "java" and "javax" packages
 *          first, then "org" and then all other imports

 *
imports will be sorted in the groups

 *
groups are separated by, at least, one blank line

 *

 *

 *        {@code
 * <module name="CustomImportOrder">
 *    <property name="customImportOrderRules"
 *        value="STATIC###STANDARD_JAVA_PACKAGE###SPECIAL_IMPORTS"/>
 *    <property name="specialImportsRegExp" value="org"/>
 *    <property name="sortImportsInGroupAlphabetically" value="true"/>
 *    <property name="separateLineBetweenGroups" value="true"/>
 * </module>
 *        }
 *

 *
 *
To configure the check so that it matches default IntelliJ IDEA formatter
 *        configuration (tested on v14):

 *

 *
group of static imports is on the bottom

 *
groups of non-static imports: all imports except of "javax"
 *          and "java", then "javax" and "java"

 *
imports will be sorted in the groups

 *
groups are separated by, at least, one blank line

 *

 *
 *

 *        Note: "separated" option is disabled because IDEA default has blank line
 *        between "java" and static imports, and no blank line between
 *        "javax" and "java"
 *

 *
 *

 *        {@code
 * <module name="CustomImportOrder">
 *    <property name="customImportOrderRules"
 *        value="THIRD_PARTY_PACKAGE###SPECIAL_IMPORTS###STANDARD_JAVA_PACKAGE
 *        ###STATIC"/>
 *    <property name="specialImportsRegExp" value="^javax\."/>
 *    <property name="standardPackageRegExp" value="^java\."/>
 *    <property name="sortImportsInGroupAlphabetically" value="true"/>
 *    <property name="separateLineBetweenGroups" value="false"/>
 *</module>
 *        }
 *

 *
 *
To configure the check so that it matches default NetBeans formatter
 *    configuration (tested on v8):

 *

 *
groups of non-static imports are not defined, all imports will be sorted as a one
 *         group

 *
static imports are not separated, they will be sorted along with other imports

 *

 *
 *        {@code
 *<module name="CustomImportOrder"/>
 *        }
 *
To set Regexps for THIRD_PARTY_PACKAGE and STANDARD_JAVA_PACKAGE groups use
 *         thirdPartyPackageRegExp and standardPackageRegExp options.

 *

 * {@code
 * <module name="CustomImportOrder">
 *    <property name="customImportOrderRules"
 *    value="STATIC###SAME_PACKAGE(3)###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE"/>
 *    <property name="thirdPartyPackageRegExp" value="com|org"/>
 *    <property name="standardPackageRegExp" value="^(java|javax)\."/>
 * </module>
 * }
 *

 *

 * Also, this check can be configured to force empty line separator between
 * import groups. For example
 *

 *
 *

 * {@code
 * <module name="CustomImportOrder">
 *    <property name="separateLineBetweenGroups" value="true"/>
 * </module>
 * }
 *

 *

 * It is possible to enforce
 * ASCII sort order
 * of imports in groups using the following configuration:
 *

 *

 * {@code <module name="CustomImportOrder">
 *    <property name="sortImportsInGroupAlphabetically" value="true"/>
 * </module>
 * }
 *

 *

 * Example of ASCII order:
 *

 *

 * {@code import java.awt.Dialog;
 * import java.awt.Window;
 * import java.awt.color.ColorSpace;
 * import java.awt.Frame; // violation here - in ASCII order 'F' should go before 'c',
 *                        // as all uppercase come before lowercase letters}
 *

 *

 * To force checking imports sequence such as:
 *

 *
 *

 * {@code
 * package com.puppycrawl.tools.checkstyle.imports;
 *
 * import com.google.common.annotations.GwtCompatible;
 * import com.google.common.annotations.Beta;
 * import com.google.common.annotations.VisibleForTesting;
 *
 * import org.abego.treelayout.Configuration;
 *
 * import static sun.tools.util.ModifierFilter.ALL_ACCESS;
 *
 * import com.google.common.annotations.GwtCompatible; // violation here - should be in the
 *                                                     // THIRD_PARTY_PACKAGE group
 * import android.*;}
 *

 * configure as follows:
 *

 * {@code
 * <module name="CustomImportOrder">
 *    <property name="customImportOrderRules"
 *    value="SAME_PACKAGE(3)###THIRD_PARTY_PACKAGE###STATIC###SPECIAL_IMPORTS"/>
 *    <property name="specialImportsRegExp" value="android.*"/>
 * </module>}
 *

 *
 * @author maxvetrenko
 * @author Aleksey Nesterenko
 */
public class CustomImportOrderCheck extends Check {

    /**
     * A key is pointing to the warning message text in "messages.properties"
     * file.
     */
    public static final String MSG_LINE_SEPARATOR = "custom.import.order.line.separator";

    /**
     * A key is pointing to the warning message text in "messages.properties"
     * file.
     */
    public static final String MSG_LEX = "custom.import.order.lex";

    /**
     * A key is pointing to the warning message text in "messages.properties"
     * file.
     */
    public static final String MSG_NONGROUP_IMPORT = "custom.import.order.nonGroup.import";

    /**
     * A key is pointing to the warning message text in "messages.properties"
     * file.
     */
    public static final String MSG_NONGROUP_EXPECTED = "custom.import.order.nonGroup.expected";

    /**
     * A key is pointing to the warning message text in "messages.properties"
     * file.
     */
    public static final String MSG_ORDER = "custom.import.order";

    /** STATIC group name. */
    public static final String STATIC_RULE_GROUP = "STATIC";

    /** SAME_PACKAGE group name. */
    public static final String SAME_PACKAGE_RULE_GROUP = "SAME_PACKAGE";

    /** THIRD_PARTY_PACKAGE group name. */
    public static final String THIRD_PARTY_PACKAGE_RULE_GROUP = "THIRD_PARTY_PACKAGE";

    /** STANDARD_JAVA_PACKAGE group name. */
    public static final String STANDARD_JAVA_PACKAGE_RULE_GROUP = "STANDARD_JAVA_PACKAGE";

    /** SPECIAL_IMPORTS group name. */
    public static final String SPECIAL_IMPORTS_RULE_GROUP = "SPECIAL_IMPORTS";

    /** NON_GROUP group name. */
    private static final String NON_GROUP_RULE_GROUP = "NOT_ASSIGNED_TO_ANY_GROUP";

    /** Pattern used to separate groups of imports. */
    private static final Pattern GROUP_SEPARATOR_PATTERN = Pattern.compile("\\s*###\\s*");

    /** RegExp for SAME_PACKAGE group imports. */
    private String samePackageDomainsRegExp = "";

    /** RegExp for STANDARD_JAVA_PACKAGE group imports. */
    private Pattern standardPackageRegExp = Pattern.compile("^(java|javax)\\.");

    /** RegExp for THIRDPARTY_PACKAGE group imports. */
    private Pattern thirdPartyPackageRegExp = Pattern.compile(".*");

    /** RegExp for SPECIAL_IMPORTS group imports. */
    private Pattern specialImportsRegExp = Pattern.compile("^$");

    /** Force empty line separator between import groups. */
    private boolean separateLineBetweenGroups = true;

    /** Force grouping alphabetically, in ASCII order. */
    private boolean sortImportsInGroupAlphabetically;

    /** List of order declaration customizing by user. */
    private final List<String> customImportOrderRules = new ArrayList<>();

    /** Number of first domains for SAME_PACKAGE group. */
    private int samePackageMatchingDepth = 2;

    /** Contains objects with import attributes. */
    private final List<ImportDetails> importToGroupList = new ArrayList<>();

    /**
     * Sets standardRegExp specified by user.
     * @param regexp
     *        user value.
     * @throws org.apache.commons.beanutils.ConversionException
     *         if unable to create Pattern object.
     */
    public final void setStandardPackageRegExp(String regexp) {
        standardPackageRegExp = CommonUtils.createPattern(regexp);
    }

    /**
     * Sets thirdPartyRegExp specified by user.
     * @param regexp
     *        user value.
     * @throws org.apache.commons.beanutils.ConversionException
     *         if unable to create Pattern object.
     */
    public final void setThirdPartyPackageRegExp(String regexp) {
        thirdPartyPackageRegExp = CommonUtils.createPattern(regexp);
    }

    /**
     * Sets specialImportsRegExp specified by user.
     * @param regexp
     *        user value.
     * @throws org.apache.commons.beanutils.ConversionException
     *         if unable to create Pattern object.
     */
    public final void setSpecialImportsRegExp(String regexp) {
        specialImportsRegExp = CommonUtils.createPattern(regexp);
    }

    /**
     * Sets separateLineBetweenGroups specified by user.
     * @param value
     *        user value.
     */
    public final void setSeparateLineBetweenGroups(boolean value) {
        separateLineBetweenGroups = value;
    }

    /**
     * Sets sortImportsInGroupAlphabetically specified by user.
     * @param value
     *        user value.
     */
    public final void setSortImportsInGroupAlphabetically(boolean value) {
        sortImportsInGroupAlphabetically = value;
    }

    /**
     * Sets a custom import order from the rules in the string format specified
     * by user.
     * @param inputCustomImportOrder
     *        user value.
     */
    public final void setCustomImportOrderRules(final String inputCustomImportOrder) {
        customImportOrderRules.clear();
        for (String currentState : GROUP_SEPARATOR_PATTERN.split(inputCustomImportOrder)) {
            addRulesToList(currentState);
        }
        customImportOrderRules.add(NON_GROUP_RULE_GROUP);
    }

    @Override
    public int[] getDefaultTokens() {
        return getAcceptableTokens();
    }

    @Override
    public int[] getAcceptableTokens() {
        return new int[] {
            TokenTypes.IMPORT,
            TokenTypes.STATIC_IMPORT,
            TokenTypes.PACKAGE_DEF,
        };
    }

    @Override
    public int[] getRequiredTokens() {
        return getAcceptableTokens();
    }

    @Override
    public void beginTree(DetailAST rootAST) {
        importToGroupList.clear();
    }

    @Override
    public void visitToken(DetailAST ast) {
        if (ast.getType() == TokenTypes.PACKAGE_DEF) {
            if (customImportOrderRules.contains(SAME_PACKAGE_RULE_GROUP)) {
                samePackageDomainsRegExp = createSamePackageRegexp(
                        samePackageMatchingDepth, ast);
            }
        }
        else {
            final String importFullPath = getFullImportIdent(ast);
            final int lineNo = ast.getLineNo();
            final boolean isStatic = ast.getType() == TokenTypes.STATIC_IMPORT;
            importToGroupList.add(new ImportDetails(importFullPath,
                    lineNo, getImportGroup(isStatic, importFullPath),
                    isStatic));
        }
    }

    @Override
    public void finishTree(DetailAST rootAST) {

        if (importToGroupList.isEmpty()) {
            return;
        }

        final ImportDetails firstImport = importToGroupList.get(0);
        String currentGroup = getImportGroup(firstImport.isStaticImport(),
                firstImport.getImportFullPath());
        int currentGroupNumber = customImportOrderRules.indexOf(currentGroup);
        String previousImportFromCurrentGroup = null;

        for (ImportDetails importObject : importToGroupList) {
            final String importGroup = importObject.getImportGroup();
            final String fullImportIdent = importObject.getImportFullPath();

            if (importGroup.equals(currentGroup)) {
                if (sortImportsInGroupAlphabetically
                        && previousImportFromCurrentGroup != null
                        && compareImports(fullImportIdent, previousImportFromCurrentGroup) < 0) {
                    log(importObject.getLineNumber(), MSG_LEX,
                            fullImportIdent, previousImportFromCurrentGroup);
                }
                else {
                    previousImportFromCurrentGroup = fullImportIdent;
                }
            }
            else {
                //not the last group, last one is always NON_GROUP
                if (customImportOrderRules.size() > currentGroupNumber + 1) {
                    final String nextGroup = getNextImportGroup(currentGroupNumber + 1);
                    if (importGroup.equals(nextGroup)) {
                        if (separateLineBetweenGroups
                                && !hasEmptyLineBefore(importObject.getLineNumber())) {
                            log(importObject.getLineNumber(), MSG_LINE_SEPARATOR, fullImportIdent);
                        }
                        currentGroup = nextGroup;
                        currentGroupNumber = customImportOrderRules.indexOf(nextGroup);
                        previousImportFromCurrentGroup = fullImportIdent;
                    }
                    else {
                        logWrongImportGroupOrder(importObject.getLineNumber(),
                                importGroup, nextGroup, fullImportIdent);
                    }
                }
                else {
                    logWrongImportGroupOrder(importObject.getLineNumber(),
                            importGroup, currentGroup, fullImportIdent);
                }
            }
        }
    }

    /**
     * Log wrong import group order.
     * @param currentImportLine
     *        line number of current import current import.
     * @param importGroup
     *        import group.
     * @param currentGroupNumber
     *        current group number we are checking.
     * @param fullImportIdent
     *        full import name.
     */
    private void logWrongImportGroupOrder(int currentImportLine, String importGroup,
            String currentGroupNumber, String fullImportIdent) {
        if (NON_GROUP_RULE_GROUP.equals(importGroup)) {
            log(currentImportLine, MSG_NONGROUP_IMPORT, fullImportIdent);
        }
        else if (NON_GROUP_RULE_GROUP.equals(currentGroupNumber)) {
            log(currentImportLine, MSG_NONGROUP_EXPECTED, importGroup, fullImportIdent);
        }
        else {
            log(currentImportLine, MSG_ORDER, importGroup, currentGroupNumber, fullImportIdent);
        }
    }

    /**
     * Get next import group.
     * @param currentGroupNumber
     *        current group number.
     * @return
     *        next import group.
     */
    private String getNextImportGroup(int currentGroupNumber) {
        int nextGroupNumber = currentGroupNumber;

        while (customImportOrderRules.size() > nextGroupNumber + 1) {
            if (hasAnyImportInCurrentGroup(customImportOrderRules.get(nextGroupNumber))) {
                break;
            }
            nextGroupNumber++;
        }
        return customImportOrderRules.get(nextGroupNumber);
    }

    /**
     * Checks if current group contains any import.
     * @param currentGroup
     *        current group.
     * @return
     *        true, if current group contains at least one import.
     */
    private boolean hasAnyImportInCurrentGroup(String currentGroup) {
        for (ImportDetails currentImport : importToGroupList) {
            if (currentGroup.equals(currentImport.getImportGroup())) {
                return true;
            }
        }
        return false;
    }

    /**
     * Get import valid group.
     * @param isStatic
     *        is static import.
     * @param importPath
     *        full import path.
     * @return import valid group.
     */
    private String getImportGroup(boolean isStatic, String importPath) {
        for (String group : customImportOrderRules) {
            if (matchesImportGroup(isStatic, importPath, group)) {
                return group;
            }
        }
        return NON_GROUP_RULE_GROUP;
    }

    /**
     * Checks if the import is placed in the correct group.
     * @param isStatic
     *        if import is static.
     * @param importPath
     *        import full path.
     * @param currentGroup
     *        current group.
     * @return true, if import placed in the correct group.
     */
    private boolean matchesImportGroup(boolean isStatic, String importPath, String currentGroup) {
        return matchesStaticImportGroup(isStatic, currentGroup)
                || matchesSamePackageImportGroup(isStatic, importPath, currentGroup)
                || matchesSpecialImportsGroup(isStatic, importPath, currentGroup)
                || matchesStandardImportGroup(isStatic, importPath, currentGroup)
                || matchesThirdPartyImportGroup(isStatic, importPath, currentGroup);
    }

    /**
     * Checks if the import is placed in the STATIC group.
     * @param isStatic
     *        is static import.
     * @param currentGroup
     *        current group.
     * @return true, if the import is placed in the static group.
     */
    private static boolean matchesStaticImportGroup(boolean isStatic, String currentGroup) {
        return isStatic && STATIC_RULE_GROUP.equals(currentGroup);
    }

    /**
     * Checks if the import is placed in the correct group.
     * @param isStatic
     *        if import is static.
     * @param importFullPath
     *        import full path.
     * @param currentGroup
     *        current group.
     * @return true, if the import is placed in the same package group.
     */
    private boolean matchesSamePackageImportGroup(boolean isStatic,
        String importFullPath, String currentGroup) {
        final String importPathTrimmedToSamePackageDepth =
                getFirstNDomainsFromIdent(samePackageMatchingDepth, importFullPath);
        return !isStatic && SAME_PACKAGE_RULE_GROUP.equals(currentGroup)
                && samePackageDomainsRegExp.equals(importPathTrimmedToSamePackageDepth);
    }

    /**
     * Checks if the import is placed in the correct group.
     * @param isStatic
     *        if import is static.
     * @param currentImport
     *        import full path.
     * @param currentGroup
     *        current group.
     * @return true, if the import is placed in the standard group.
     */
    private boolean matchesStandardImportGroup(boolean isStatic,
        String currentImport, String currentGroup) {
        return !isStatic && STANDARD_JAVA_PACKAGE_RULE_GROUP.equals(currentGroup)
                && standardPackageRegExp.matcher(currentImport).find();
    }

    /**
     * Checks if the import is placed in the correct group.
     * @param isStatic
     *        if import is static.
     * @param currentImport
     *        import full path.
     * @param currentGroup
     *        current group.
     * @return true, if the import is placed in the special group.
     */
    private boolean matchesSpecialImportsGroup(boolean isStatic,
        String currentImport, String currentGroup) {
        return !isStatic && SPECIAL_IMPORTS_RULE_GROUP.equals(currentGroup)
                && specialImportsRegExp.matcher(currentImport).find();
    }

    /**
     * Checks if the import is placed in the correct group.
     * @param isStatic
     *        if import is static.
     * @param currentImport
     *        import full path.
     * @param currentGroup
     *        current group.
     * @return true, if the import is placed in the third party group.
     */
    private boolean matchesThirdPartyImportGroup(boolean isStatic,
        String currentImport, String currentGroup) {
        return !isStatic && THIRD_PARTY_PACKAGE_RULE_GROUP.equals(currentGroup)
                && thirdPartyPackageRegExp.matcher(currentImport).find()
                && !standardPackageRegExp.matcher(currentImport).find()
                && !specialImportsRegExp.matcher(currentImport).find();
    }

    /**
     * Checks compare two import paths.
     * @param import1
     *        current import.
     * @param import2
     *        previous import.
     * @return a negative integer, zero, or a positive integer as the
     *        specified String is greater than, equal to, or less
     *        than this String, ignoring case considerations.
     */
    private static int compareImports(String import1, String import2) {
        int result = 0;
        final String separator = "\\.";
        final String[] import1Tokens = import1.split(separator);
        final String[] import2Tokens = import2.split(separator);
        for (int i = 0; i < import1Tokens.length && i != import2Tokens.length; i++) {
            final String import1Token = import1Tokens[i];
            final String import2Token = import2Tokens[i];
            result = import1Token.compareTo(import2Token);
            if (result != 0) {
                break;
            }
        }
        return result;
    }

    /**
     * Checks if a token has a empty line before.
     * @param lineNo
     *        Line number of current import.
     * @return true, if token have empty line before.
     */
    private boolean hasEmptyLineBefore(int lineNo) {
        //  [lineNo - 2] is the number of the previous line
        //  because the numbering starts from zero.
        final String lineBefore = getLine(lineNo - 2);
        return lineBefore.trim().isEmpty();
    }

    /**
     * Forms import full path.
     * @param token
     *        current token.
     * @return full path or null.
     */
    private static String getFullImportIdent(DetailAST token) {
        if (token == null) {
            return "";
        }
        else {
            return FullIdent.createFullIdent(token.findFirstToken(TokenTypes.DOT)).getText();
        }
    }

    /**
     * Parses ordering rule and adds it to the list with rules.
     * @param ruleStr
     *        String with rule.
     */
    private void addRulesToList(String ruleStr) {
        if (STATIC_RULE_GROUP.equals(ruleStr)
                || THIRD_PARTY_PACKAGE_RULE_GROUP.equals(ruleStr)
                || STANDARD_JAVA_PACKAGE_RULE_GROUP.equals(ruleStr)
                || SPECIAL_IMPORTS_RULE_GROUP.equals(ruleStr)) {
            customImportOrderRules.add(ruleStr);

        }
        else if (ruleStr.startsWith(SAME_PACKAGE_RULE_GROUP)) {

            final String rule = ruleStr.substring(ruleStr.indexOf('(') + 1,
                    ruleStr.indexOf(')'));
            samePackageMatchingDepth = Integer.parseInt(rule);
            if (samePackageMatchingDepth <= 0) {
                throw new IllegalArgumentException(
                        "SAME_PACKAGE rule parameter should be positive integer: " + ruleStr);
            }
            customImportOrderRules.add(SAME_PACKAGE_RULE_GROUP);

        }
        else {
            throw new IllegalStateException("Unexpected rule: " + ruleStr);
        }
    }

    /**
     * Creates samePackageDomainsRegExp of the first package domains.
     * @param firstPackageDomainsCount
     *        number of first package domains.
     * @param packageNode
     *        package node.
     * @return same package regexp.
     */
    private static String createSamePackageRegexp(int firstPackageDomainsCount,
             DetailAST packageNode) {
        final String packageFullPath = getFullImportIdent(packageNode);
        return getFirstNDomainsFromIdent(firstPackageDomainsCount, packageFullPath);
    }

    /**
     * Extracts defined amount of domains from the left side of package/import identifier
     * @param firstPackageDomainsCount
     *        number of first package domains.
     * @param packageFullPath
     *        full identifier containing path to package or imported object.
     * @return String with defined amount of domains or full identifier
     *        (if full identifier had less domain then specified)
     */
    private static String getFirstNDomainsFromIdent(
            final int firstPackageDomainsCount, final String packageFullPath) {
        final StringBuilder builder = new StringBuilder();
        final StringTokenizer tokens = new StringTokenizer(packageFullPath, ".");
        int count = firstPackageDomainsCount;

        while (tokens.hasMoreTokens() && count > 0) {
            builder.append(tokens.nextToken()).append('.');
            count--;
        }
        return builder.toString();
    }

    /**
     * Contains import attributes as line number, import full path, import
     * group.
     * @author max
     */
    private static class ImportDetails {
        /** Import full path. */
        private final String importFullPath;

        /** Import line number. */
        private final int lineNumber;

        /** Import group. */
        private final String importGroup;

        /** Is static import. */
        private final boolean staticImport;

        /**
         * @param importFullPath
         *        import full path.
         * @param lineNumber
         *        import line number.
         * @param importGroup
         *        import group.
         * @param staticImport
         *        if import is static.
         */
        ImportDetails(String importFullPath,
                int lineNumber, String importGroup, boolean staticImport) {
            this.importFullPath = importFullPath;
            this.lineNumber = lineNumber;
            this.importGroup = importGroup;
            this.staticImport = staticImport;
        }

        /**
         * Get import full path variable.
         * @return import full path variable.
         */
        public String getImportFullPath() {
            return importFullPath;
        }

        /**
         * Get import line number.
         * @return import line.
         */
        public int getLineNumber() {
            return lineNumber;
        }

        /**
         * Get import group.
         * @return import group.
         */
        public String getImportGroup() {
            return importGroup;
        }

        /**
         * Checks if import is static.
         * @return true, if import is static.
         */
        public boolean isStaticImport() {
            return staticImport;
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
Christian agencies laud government aid match
Thu, 6th October 2011
Christian aid agencies in Australia welcomed a federal government pledge to match until November 30 every dollar donated to groups working to relieve drought and famine in the Horn of Africa.
Half of the 16 agencies eligible are from Anglican, Catholic, Lutheran and Uniting churches, plus Christian aid agencies TEAR Australia and World Vision.
Foreign Minister Kevin Rudd announced the plan outside Tecoma Uniting Church in Melbourne on October 5 and said no limits would be set.
Speaking of the Church, Rudd said, "I'm proud of the Uniting Church and what it does locally, nationally, and with partners overseas."
World Vision Australia chief executive the Rev. Tim Costello asked Rudd three weeks ago to set up the dollar-for-dollar partnership between the government and aid organisations seeking to alleviate the effects of the worst drought in 60 years in parts of Kenya, Ethiopia and Somalia.
Costello, a former National President of the Baptist Union, said more malnourished children will get life-saving nutritional supplements as the government initiative will double the impact of donations.
"More lives will be saved in East Africa thanks to the government's new program. At a time when some 13 million people in the region are facing severe food shortages, drought and conflict, support is needed more than ever."
Misha Coleman, head of Anglican Church aid arm Anglicord, said the initiative was not about "band-aid solutions" but early recovery for immediate assistance "to make sure that we are right there with our friends in Africa, helping them to rebuild so that when the next natural disaster or global financial downturn comes, they'll be in a better position to weather it."
Australia has donated $128 million (US$123.2 million) so far to the crisis, according to the Australian government.
By David Crampton, Ecumenical News International
PrevPreviousIndonesian governor calls for religious peace against backdrop of violence and disorder
NextCatholic opinion divided on gay marriageNext
Thomas Mayor on What Synod support for the Statement from the Heart means

redpajama_set_name: RedPajamaCommonCrawl


A man who just finished jogging from Alaska to Florida popped a bottle of champagne as soon as he completed the nearly 54-hundred mile run. Thirty-one-year-old Pete Kostelnick says he kept a strong and steady pace. He began his journey on July 31st at Anchor Point on Alaska's Kenai Peninsula, the westernmost point of the North American highway system. He finished it yesterday as he arrived at the marker in Key West that designates the southernmost point in the continental United States. Kostelnick is apparently the first person to complete a self-supported run, without relying on an accompanying support vehicle, from Alaska to Florida.


If I tell you: Bohemia, Moravia, Silesia, what do you think about? These three mythical regions form our beautiful country: the Czech Republic.
Farm Sissi is a family-run guest house offering pleasant and peaceful accommodation in the center of Smržice. You can stay in three apartments with their own courtyard entrance. The apartments are non-smoking. They have a kitchenette, Wi-Fi, SAT-TV, bathroom with shower or bath and toilet. The hotel's attractions include a large garden with a pond and a children's playground.
Smržice is the largest village in the Haná region. It is situated between Prostějov and Olomouc in Central Moravia. Central Moravia will appeal to you in particular by its diversity. You will find everything you may be interested in. Historical sights, natural attractions, sports, typical folklore and rich gastronomy.


Make sure you remove the beef from the fridge at least an hour before cooking.
Scatter the chopped carrot and onion over the bottom of the roasting tray with any beef trimmings. Season the beef with salt and pepper. Rub this in well.
Place the beef on top of the vegetables and cook in the pre-heated oven for 30 minutes.
Pour in 600ml of the water and continue to cook for 1.5 hours.
Remove from the oven, leave to stand for at least 30 minutes and up to 2 hours.
Add the remaining water and scrape off the caramelised juices from the bottom of the pan and pass through a fine sieve into a saucepan, and reduce by half. Reserve for the red wine jus.
On a medium heat, soften the shallots in the butter for 2-3 minutes, add the mushrooms and soften for a further 2 minutes.
Pour in the red wine and reduce by half.
Add the stock, reserved pan juices and continue to reduce by half.
Taste, correct the seasoning if required and infuse the tarragon for five minutes.
Carve the beef on the table in front of your guests and serve with the red wine sauce and some warm celeriac purée.
Choose a rich full bodied wine but don't spend more than £4-£5.


text:
Audiobooks > Juvenile Fiction > Boys & Men > Guys Read: The Klack Bros. Museum: A Short Story from Guys Read: Other Worlds
Download Guys Read: The Klack Bros. Museum: A Short Story from Guys Read: Other Worlds Audiobook
Author: Kenneth Oppel Narrator: Todd Haberkorn Publisher: HarperCollins Format: Unabridged Audiobook Delivery: Instant Download Audio Length: 0.75 hours Series: The Guys Read Library of Great Reading Release Date: September 2013 ISBN: 9780062305749
0.00 (0 ratings) (rate this audio book)
FlexPass™ Price: $9.95$7.95$7.95 for new members!
A train gets waylaid in the middle of nowhere, and Luke and his dad find themselves with four hours to kill before it's fixed. Just enough time for a trip to the mysterious, decrepit old museum on the edge of town. A short story from Guys Read: Other Worlds, edited by Jon Scieszka.
Be the first to write a review about this audiobook!
Kenneth Oppel is the author of numerous books for young readers. His award-winning Silverwing trilogy has sold over a million copies worldwide and been adapted as an animated TV series and stage play. Airborn won a Michael L. Printz Honor Book Award and the Canadian Governor General's Literary Award for children's literature; its sequel, Skybreaker, was a New York Times bestseller and was named Children's Novel of the Year by the Times. Born on Canada's Vancouver Island, he now resides in Toronto with his wife and children.
Todd Haberkorn is an actor and winner of seven AudioFile Earphones Awards. He has created unique voices for a variety of characters for cartoons and video games. Add to this a healthy production life in front of and behind the camera as well as partaking in theater arts on stage, and he has had the pleasure of a wonderful career in the entertainment industry thus far. When he isn't working on a production of some kind, he travels the globe talking about those productions.


text:
Mudge v. Saul
IDA L. MUDGE, Plaintiff,
ANDREW SAUL, Comm'r of Soc. Sec., Defendant.
CHRISTOPHER A. BOYKO United States District Judge
This matter comes before the Court upon Plaintiff's Objections (ECF #16) to the Report and Recommendation (ECF #15) of Magistrate Judge Thomas M. Parker, who recommends that the Court affirm the Commissioner's decision denying Plaintiff's claim for Supplemental Security Income ("SSI") under 42 U.S.C. §§ 405(g), 1383(c)(3). For the following reasons, the Court ADOPTS the Magistrate Judge's Report and Recommendation and AFFIRMS the Commissioner's denial of Plaintiff's Claim.
The following is a procedural synopsis of Plaintiff's Claim. The Magistrate Judge's Report and Recommendation contains a more detailed discussion of the facts. For a complete overview of Plaintiff's medical history, see the Magistrate Judge's Report and Recommendation, which refers to the original Complaint and incorporates all documents related to the dispute.
On May 22, 2014, Plaintiff filed an application for SSI, alleging she became disabled on November 30, 2002 due to"heart murmur, a benign brain tumor, depression, asthma, [and] anxiety." (Transcript of Proceedings before the Social Security Administration, 57). Plaintiff later amended her date of disability, alleging her disability began on May 22, 2014. (Tr. 11). Plaintiff's application was denied by the Social Security Administration initially and upon reconsideration. (Tr. 56-88). After the denial, Plaintiff timely requested an administrative hearing. (Tr. 103-105). An Administrative Law Judge ("ALJ") heard Plaintiff's case on October 25, 2016. A Vocational Expert ("VE") testified at the hearing. After the hearing, the ALJ denied Plaintiff's claim on March 29, 2017. (Tr. 8-50). On February 12, 2019, the Social Security Appeals Council denied further review, thus rendering the ALJ's decision the final decision of the Commissioner. (Tr. 1-5).
On April 10, 2018, Plaintiff filed her Complaint seeking judicial review of the Commissioner's decision. (ECF #1). On February 28, 2019, the Magistrate Judge issued his Report and Recommendation. (ECF #15). On March 14, 2019, Plaintiff timely filed her Objections to the Magistrate Judge's Report and Recommendation. (ECF #16). On March 28, 2019, Defendant timely filed his Response to Plaintiff's Objections. (ECF #17).
When a court reviews a magistrate's report and recommendation, it makes a de novo determination regarding the portions to which an objection is made. 28 U.S.C. § 636(b)(1). A review of the Commissioner's decision, however, is not de novo. Norman v. Astrue, 694 F.Supp. 2d. 738, 740 (N.D. Ohio 2010). The district court's review of social security disability cases is limited to whether substantial evidence in the record supports the ALJ's findings of fact and whether the ALJ applied the correct legal standards. 42 U.S.C. § 405(g); Norman, 694 F.Supp. 2d. at 740 (citing Longworth v. Comm'r of Soc. Sec., 402 F.3d 591, 595 (6th Cir. 2005)).
A decision must be affirmed if the ALJ's inferences are reasonably drawn from the record or supported by substantial evidence, even if that evidence could support a contrary decision. Elam v. Comm'r of Soc. Sec., 348 F.3d 124, 125 (6th Cir. 2003). Substantial evidence has been defined as "more than a mere scintilla" of evidence. Wright v. Massanari, 321 F.3d 611, 614 (6th Cir. 2003). Further, substantial evidence is evidence a reasonable person would accept as adequate to support the conclusion. Id. Therefore, if the record contains information where "a reasonable mind might accept it as adequate to support" the Commissioner's final conclusion, then the determination should be affirmed. Id.; Kirk v. Sec'y of Health & Human Servs., 667 F.2d 524, 535 (6th Cir. 1981). This substantial evidence standard "presupposes that there is a zone of choice within which the decisionmakers can go either way, without interference by the courts." Blakley v. Comm'r of Soc. Sec., 581 F.3d 399, 406 (6th Cir. 2009) (quoting Mullen v. Brown, 800 F.2d 535, 545 (6th Cir. 1986)).
A claimant is entitled to SSI benefits only when they have established disability under the meaning of the Social Security Act. See 42 U.S.C. § 423. Disability may be established by demonstrating an "inability to engage in substantial gainful activity by reason of any medically determinable physical or mental impairment which can be expected to result in death or which has lasted or can be expected to last for a continuous period of not less than 12 months." 42 U.S.C. § 423(d)(1)(A); 20 C.F.R. § 416.905(a).
To determine disability, the Commissioner must follow a five-step sequential analysis. This may be summarized as follows:
(1) If the claimant is doing substantial gainful activity, he is not disabled.
(2) If the claimant is not doing substantial gainful activity, his impairment must be severe before he can be ...


text:
Q: Only display icon in parent if there's the relevant data in child component, but in order to have the data I must click on that icon Alright, it took me awhile to even formulate the question for this. This is more related to a design strategy rather than anything.
I have a view that contains a table that displays a list of all users.Each row of the table has an icon on the left that will expand (or collapse) a component called UsersTrainingSummary that just brings a summary of some specific data. See image:

Here is the full code of this view component:
import React from 'react';
import { Card, CardContent, CardHeader, Chip, Divider, Grid, Typography } from '@material-ui/core';
import { gridSpacing } from '../../../store/constant';
import TableContainer from '@material-ui/core/TableContainer';
import Table from '@material-ui/core/Table';
import TableHead from '@material-ui/core/TableHead';
import TableRow from '@material-ui/core/TableRow';
import MuiTableCell from '@material-ui/core/TableCell';
import TableBody from '@material-ui/core/TableBody';
import { makeStyles,  withStyles } from '@material-ui/core/styles';
import {Link} from "react-router-dom";
import IconButton from '@material-ui/core/IconButton';
import KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';
import KeyboardArrowUpIcon from '@material-ui/icons/KeyboardArrowUp';
import moment from 'moment';

import UsersTrainingSummary from './UsersTrainningSummary';
import useLocalStorage from 'react-use-localstorage';
import { useQuery } from '@apollo/client';
import ALL_USERS from '../../../graphql/AllUsers';
import Loader from '../../../component/Loader/Loader';

const useStyles = makeStyles({
    table: {
        minWidth: 350,
    },
});

const TableCell = withStyles({
    root: {
        borderBottom: "none"
    }
})(MuiTableCell);

function createData(userId, username, firstName, lastName, dateJoined, lastLogin, email, isActive, trainings ) {
    return { userId, username, firstName, lastName, dateJoined, lastLogin, email,isActive, trainings };
}

const UserDashboard = () => {
    const classes = useStyles();
    const [storage, setStorage] = useLocalStorage('orgId');
    const orgId = storage
    const { data, error , loading} = useQuery(ALL_USERS, {
        variables: {
            orgId: Number(orgId)
        },
    });

    function Row(props){
        const { row } = props;
        const [open, setOpen] = React.useState(false);
        return (
            <React.Fragment>
                <TableRow key={row.userId}>
                    <TableCell>
                        <IconButton aria-label="expand row" size="small" onClick={() => setOpen(!open)}>
                            {open ? <KeyboardArrowUpIcon /> : <KeyboardArrowDownIcon />}
                        </IconButton>
                    </TableCell>
                    <Link to={{pathname: `/users/${row?.userId}`, state: { user: row}}}
                          style={{ textDecoration: 'none' }}>
                        <TableCell
                            className={classes.root} hover={true}
                            component="th" scope="row">{row?.username}
                        </TableCell>
                    </Link>
                    <TableCell>{row.firstName}</TableCell>
                    <TableCell>{row.lastName}</TableCell>
                    <TableCell>{moment(row?.dateJoined).format('MM/DD/YYYY')}</TableCell>
                    <TableCell>{moment(row?.lastLogin).format('MM/DD/YYYY')}</TableCell>
                    <TableCell>{row?.email}</TableCell>
                    <TableCell>{row?.isActive? <React.Fragment>Yes</React.Fragment> : <React.Fragment>No</React.Fragment>}</TableCell>
                </TableRow>
                <TableRow>
                    <TableCell style={{ paddingBottom: 0, paddingTop: 0 }} colSpan={6}>
                        {open && <UsersTrainingSummary userId={row.userId} trainings={row.trainings}/>}
                    </TableCell>
                </TableRow>
            </React.Fragment>
        )
    }
    if(data) {
        let userList = data.organization?.user
        const rows = [];
        if (userList) {
            userList.map((user) => {
                rows.push(createData(user.id, user.username, user.firstName, user.lastName, user.dateJoined, user.lastLogin,
                    user.email, user.isActive, user.trainings))
            })
        }
        return (
            <Grid container spacing={gridSpacing}>
                <Grid item xs={12}>
                    <Card>
                        <CardHeader
                            title={
                                <Typography component="div" className="card-header">
                                    List of all trainees
                                </Typography>
                            }
                        />
                        <Divider/>
                        <CardContent className="p-0">
                            <TableContainer>
                                <Table className={classes.table} aria-label="simple table">
                                    <TableHead>
                                        <TableRow>
                                            <TableCell></TableCell>
                                            <TableCell>Username</TableCell>
                                            <TableCell>First Name</TableCell>
                                            <TableCell>Last Name</TableCell>
                                            <TableCell>Date Joined</TableCell>
                                            <TableCell>Last Login</TableCell>
                                            <TableCell>Email</TableCell>
                                            <TableCell>Is Active</TableCell>

                                        </TableRow>
                                    </TableHead>
                                    <TableBody>
                                        {rows?.length > 0 && rows.map((row) => (
                                            <Row key={row?.userId} row={row}/>
                                        ))}
                                    </TableBody>
                                </Table>
                            </TableContainer>
                        </CardContent>
                    </Card>
                </Grid>
            </Grid>
        );
    }
    else
        return ( <Loader />)
}

export default UserDashboard

Because the query that brings the summary data can be quite slow if you try to bring for too many users at once due to the involved tables in the DB having a huge amount of data, and because most of the time you will only need for one or a few users, I decided to use a lazy strategy: only when the user clicks on that arrow icon, the component UsersTrainingSummary is rendered and there I have the graphql query that brings the data from the backend and
also do all the necessary logic to render that Collapse component.
What I am trying to achieve now is to only display that icon for users that actually have something to show e.g query does not bring empty results from BE, because as user it feels a little misleading to me to have that icon just so you can click and see a message "oh...nothing here". However, since I need to execute the query first in order to know if there's something to display, it doesn't seem possible to me unless I perform that query first for all users, which is something I really don't wanna do, as the weight on performance is much bigger than the weight on user friendly interface.
Or, is there a way I can achieve this?

A: As mentioned in the comment, an alternative to querying the DB in order to find all users who have additional information, could be managing the issue on back-end side, by adding a boolean field (e.g. "hasMoreInfo") to the table that you use to populate the first view and use that value to decide whether to render or not the icon.

redpajama_set_name: RedPajamaStackExchange


Another potentially monumental Hollywood deal may actually go through to kick off the New Year. Deadline is reporting, with confirmation via The Wrap, that Lionsgate is moving to seal the deal on a $700 million purchase of Summit Entertainment, the studio that is already raking in the cash with the Twilight series and other hits like RED and 50/50. "As the merger talks between two of Hollywood's largest independent movie studios morphed into takeover talks and went down to the wire," many places reported it was about to blow up, but now it's likely to come through. Wow, this will be huge, and something I'm intrigued to see.
This entire purchase pretty much came out of nowhere late last year, when early rumors of it first hit via Bloomberg. We didn't report on it at the time, expecting it would either take forever to actually come together or would blow up before it could happen. Now it's all coming together. That $700 million that Lionsgate will be paying for Summit, beating out Colony Capital, is roughly $400 million in cash, and the rest covering most of Summit's debt. Lionsgate is getting the money to do this from a loan from JP Morgan. It's a huge deal for both and one which will bring two very experienced, powerful "smaller" studios together.
I'm kind of excited to see this actually happen as it means that Summit and Lionsgate can merge to become the major studio they both deserve to be. While I think they're both on a bit of rocky ground at the moment, each needing some fixes, maybe this is the big deal they need. Details get sketchy on how the new company will be managed, with some reports saying that Summit CEOs Patrick Wachsberger and Rob Friedman might not continue working, though others say they'll be worked into "the Lionsgate structure." This deal isn't too much of a last minute surprise, as Lionsgate & Summit have apparently been in talks before, but the negotiations broke down over price and control issues, of course. Now it seems to have been worked out.
This is definitely a major piece of news we'll keep an eye on, as the merger continues and plans get finalized. Both of these studios have a bright future and lots of exciting movies on the horizon. Lionsgate has The Hunger Games coming up in March, along with Drew Goddard's Cabin in the Woods, Simon West's The Expendables 2, Alex Garland's Dredd with Karl Urban, and Kim Jee-woon's The Last Stand. Summit has the final (thank goodness!) Twilight: Breaking Dawn this year, along with Jonathan Levine's Warm Bodies, Louis Leterrier's Now You See Me and Gavin Hood's sci-fi Ender's Game. If these two can stay on this track, it should mean great things for the both of them - or soon, the one of them.
Wow. I think this is smart move. Summit Ent. was a joke a few years ago, but now they have made some staggering successful movies. And well, Lionsgate has always been one to "take risks" as far as their productions are concerned. Whoever wins, We win!!!
'Red' was a hit? Gosh it sucked!
This is intriguing news, indeed. Both studios have been taking risks on projects and actors that the BIG studios have passed on! This deal only makes sense because Lionsgate has always had the potential to be a power player! Sure, there are some issues to iron out and if both sides are able to keep Carl Icahn out of the meetings, then things can give way more smoothly. If this deal comes to fruition, Lionsgate/Summit will be a huge force to reckon with and I'm quite sure we will see a resurgence of more of our favorite forgotten/semi-forgotten stars gracing the silver screen once again and maybe, even headlining their own starring vehicles once again (as long as the flicks are GOOD)! ... I can sense Universal Studios honchos shaking in their boots!


text:
Tag: mocatv
Paul Insect and Sweet Toof (and Sope)
For me, school is back in session. Hopefully everyone else out there is still enjoying the tail end of the summer. Here's some art to keep your weekend interesting:
Martha Cooper and I have announced our picks for the MOCAtv Upload More Art challenge. You uploaded your street art videos, and we selected our favorites. I used the opportunity to highlight videos of Enzo & Nio and A.CE. As you can probably guess when you watch me explain my picks, I made those picks during Illegal August, so those sorts of thoughts were on my mind. Martha Cooper also selected two videos to highlight.
Just because Colossal Media paints murals based on designs by people like KAWS and Faile doesn't mean there should be any love for them. They paint advertisements. That is their business. If they paint some murals on the side, that doesn't excuse billboards invading public space. Unless you think BP sponsoring art exhibits excuses oil spills and pollution…
Also what's up with KAWS' work being used for a mural (I hesitate to say he did a mural, since it appears all he did was license his imagery)? He's spent the better part of this site's existence distancing himself from street art and graffiti and his public art has consisted of sculptures and flyposted advertisements (if you consider that public art).
Maybe I'll be able to ask KAWS about all this myself soon, since presumably he'll be in Philadelphia for his show at the Pennsylvania Academy of the Fine Arts. Arrested Motion has a bit of a preview, but I think the link really worth checking is PAFA's website (and this archived version of the same page from mid-August) because of this section of the show description which has since been removed: "Placing KAWS' sculptural works throughout PAFA's historic galleries will further the 'graffiti effect,'" and the edit of (emphasis added) "KAWS grew up in Jersey City, where he emerged as a graffiti artist in the early 1990s." to "KAWS grew up in Jersey City, where he emerged as an artist in the early 1990s." So that's interesting.
I've never been a big fan of Elle's work, but I do love this ad takeover.
And here are more ad takeovers, these from Jordan Seiler.
So many nice graffiti pieces on Ekosystem today.
I really like this new print from Shepard Fairey.
Pablo Delgado tiny pieces alway makes me smile.
Speak of small street art, here's BSA's take on the subject.
FAME Festival is no more, although ad hoc projects will continue to be organized in the town of Grottaglie, Italy by festival organizer Angelo Milano. It's definitely sad news, but Angelo is always ahead of the times. Maybe this glut of street art festivals is just too much. Maybe it's time for something different. Let's hope Angelo figures it out. I can't wait to see what he tries next.
Photo by Alex Ellison
Submit your video to the MOCAtv YouTube channel
Yesterday MOCAtv (MOCA Los Angeles' YouTube channel) announced an open call for content for the channel. Jeffrey Deitch, Carlo McCormick, Martha Cooper, Ethel Seno, and I will be reviewing content on YouTube with "#MOCATVUPLOAD" in the video title and then selecting the best of those films for inclusion on MOCAtv. Read more about the project here.
I can't wait to see what gets submitted.
"Dominant Species" Roa
This video is spellbinding. Roa's show Dominant Species ran from September 15th to November 3rd in San Fransisco's 914 Geary Gallery and MOCAtv produced this video as one in a series of artist biopics for the Art in the Streets section. It's cool to get some context of Roa's work and to hear his thought process. The gallery has great photos of the show.
There's another cool video including Martha Cooper talking about Roa's work in South Africa for I Art Joburg and Roa himself speaking about his time there.


Karl August Almgren established a silk mill in Stockholm in 1833, and it subsequently grew into a sizeable manufacturing complex, with some four-storey buildings. Some of the Jacquard looms that he installed are still in situ and still working. Visitors to the mill are able to see all aspects of silk production. Almgren and his descendants were paternalistic employers, encouraged the opening of a co-operative shop in 1867, and subsequently introduced health and retirement insurance schemes.


Since last season, the team of Jonathan Vaughters has been riding under the patronage of EF Education – a global provider of education and travel services. The cycling team of the Lucerne-based Swedish company rides in an eye-catching pink and violet jersey. The bold design by Rapha made waves in the cycling world at the start of the season.
Last season, it was the Canadian Michael Woods, in particular, who attracted attention with his stage win at the Vuelta in Spain and third place at the World Championships in Innsbruck. Former U23 Paris-Roubaix winner Taylor Phinney also stood out at the Tour de Suisse with his witty, laid-back nature and outlandish fashion accessories.
And in Rigoberto Uran, the team has an experienced leader among its ranks: the Colombian has twice come within touching distance of overall victory at the Giro d'Italia and has also finished on the second step of the podium in Paris.
A new addition for the 2019 season is the American Tejay Van Garderen, who won the seventh stage of the Tour de Suisse to Sölden in 2016.


text:
Q: Using angular.element containing a directive appears to ignore the transcluded content Let's say I have a directive that I need to dynamically produce:
var windowEl = angular.element("<window>Transcuded content....</window");

$compile(windowEl)(scope);

$element.append(windowEl);

What happens is the myWindow directive is successfully created and attached to the dom, however the transcluded content is lost. I do have transclude: true set in the directive object. Is there something I'm missing here? If not, any ideas on a workaround?
Here's my windowDirective.js
define(['app'], function (app) {
  app.directive('window', function () {
    return {
      restrict: 'E',
      transclude: true,

      templateUrl: 'app/shared/windows/windowView.html',

      link: function (scope, element, attrs) {
        scope.closeWindow = function () {
          $(".window").hide();
        }
      }
    }
  });
});

A: I checked your code and seems to work check this example in that case i do the same has you, the only difference is that if you are using a directive to inject dynamically your window should be:
 angular.module('App').directive('myDirective', function () {
    return {
      restrict: 'E',
      transclude: true,
      templateUrl: 'my-directive.html',
      controller: function ($scope,$compile,$element) {
        var windowEl = angular.element("<window>Transcuded content....</window");
        $compile(windowEl)($scope);
        $element.append(windowEl);
      }
    }
  });

However just like @Andrew Eisenberg i don't recommend you to inject dynamically html, probably there is a better approach but we need to understand your scenario better. If doesn't work please update a plunker.


Gas Fireplaces offer the look of real wood fireplaces without the hassle. Remote control options make the gas fireplace the top choice for comfort and convenience. Gas fireplaces can be integrated into almost anything, wall mounted, or built into a masonry surround.
At Arizona Fireplaces, we carry both Direct-Vent and B-Vent units. Depending on your budget as well as personal needs (i.e. size of living space and layout); you will need to choose accordingly. If you are unsure what type to select, feel free to give us a call. Our staff will be glad to assist you, so you don't end up buying the wrong fireplace.
What is the difference between Direct-Vent and B-Vent gas fireplaces?
Direct-Vent units are closed, which means they have two pipes that can be installed vertically or horizontally in your walls. One pipe brings in air for combustion, and the other emits the fumes.
B-Vent units are smaller and cannot be installed horizontally; they contain one pipe and use the air from inside your home for combustion purposes.
Direct-Vent offer better heat efficiency, but tend to be more costly than B-Vents. Also, they are not recommended for smaller rooms, as they can generate a significant amount of heat.
The downside of B-Vents is that drafting can occur from the flue, as it must be installed through the roof. However, you don't need to worry about precise firewood placement as you would with a Direct-Vent fireplace. The latter will not combust properly unless the wood is positioned just right.
Ultimately, Direct-Vent and B-Vent gas fireplaces are a better solution than a traditional wood-burning stove, if heat efficiency is what you are after. The important thing to keep in mind is that while Direct-Vent units do reduce heat loss, this is not always a good thing for smaller homes. If you are unsure of what will work best, contact us before buying.


text:
Homepage Plays Funded Richmond
The Richmond Passion was performed on the upper river terraces beside Richmond Bridge and the War memorial square known as Whittaker Avenue. It also used the overlooking balcony of the Old Town hall and a public archway and tunnel which was for the burial tomb.
Three large stages were constructed on the river terraces to contain scenes for the last supper, Gethsemane and crucifixion, and the entry to Jerusalem and the trial scenes were placed on a 2.5 m high stage in the Whittaker Ave. Square. The construction of the stages enabled the whole crowd to see nearly all the action as they moved between upper and lower play sites.
It is thought that the crowd on a beautiful sunny morning was about 2,500. The cast processed through the centre of town in both directions from 11.15am arriving back at the play site at midday. The good weather allowed a substantial number of people to remain and listen to a gospel message and receive the offer of prayer from cast and crew at the River terraces.
There was significant response and a number of onlookers requested prayer and remained to talk.
Facebook: https://www.facebook.com/thepassionrichmond/?fref=nf
'It's a glorious sunny day and to see the river and the community together is absolutely fantastic' – Cast member.
'My favourite part is that he came alive again' – Child in the audience.
'By dying and rising again, there's hope in the story…the word hop is a main word today, that people should come away from this and realise there is hope in the world' – Audience member.


The deadline for entries will be the 20th of June 2019.
To submit films for the Festival 2019 is possible until 20th of June 2019. Please use the portal filmfestivals4u.net (There you can submit your films also to other festivals.) We do not charge entry fee.
We accept videos as download-links. For download we accept files in mpeg4, or h264, which must not exceed 100 MB per minute of video. Download-links have to be valid until the end of the festival. We don't accept links without possibility for a download (Youtube is accepted if there are no restrictions of rights, i.e. a download is possible). We don't accept links for download, where it is necessary to register the REC Filmfestival to any provider (for example "Dropbox").
takes place from the 18th to the 22nd of September 2019.
We invite all young filmmakers to take part in the REC-Filmfestival Berlin. Everyone from age 16 to 27 who has made films – on his own or in a group – is welcome to participate in the REC-Filmfestival Berlin. The age of the filmmaker in the year of origin of the production matters. Multiple entries are allowed, provided that the film has been made between 2017 and 2019. There is no thematic or formal restriction, nor limit of length. The films should be in english language or english subtitled. (For submitting an english dialog list will also do, but for screening we need an english version or english subtitles.) We do not charge entry fee.
Submit every film with a completed entry form. Fill in the entry form at: filmfestivals4u.net After submitting your data at filmfestivals4u.net, you can provide your films as downloads. Deadline for entries is the 20th of June 2019.
For viewing we need standard-files like mpeg4, or h264. The files shouldn't exceed 100 MB per minute of video. If we will select the film for the program and we need a higher resolution, we will contact you.
For every film that will be in our program we will give a financial aid for accommodation for one filmmaker during the festival. For the filmmaker and further guests we can recommend cheap accommodation on request.


text:
namespace silk
{
namespace node
{

Pressure_Velocity::Pressure_Velocity(HAL& hal)
    : m_hal(hal)
    , m_descriptor(new hal::Pressure_Velocity_Descriptor())
    , m_config(new hal::Pressure_Velocity_Config())
{
    m_output_stream = std::make_shared<Output_Stream>();
}

ts::Result<void> Pressure_Velocity::init(hal::INode_Descriptor const& descriptor)
{
    QLOG_TOPIC("Pressure_Velocity::init");

    auto specialized = dynamic_cast<hal::Pressure_Velocity_Descriptor const*>(&descriptor);
    if (!specialized)
    {
        return make_error("Wrong descriptor type");
    }
    *m_descriptor = *specialized;

    return init();
}
ts::Result<void> Pressure_Velocity::init()
{
    m_output_stream->set_rate(m_descriptor->get_rate());
    return ts::success;
}

ts::Result<void> Pressure_Velocity::start(Clock::time_point tp)
{
    m_output_stream->set_tp(tp);
    return ts::success;
}

auto Pressure_Velocity::get_inputs() const -> std::vector<Input>
{
    std::vector<Input> inputs =
    {{
        { stream::IPressure::TYPE, m_descriptor->get_rate(), "pressure", m_accumulator.get_stream_path(0) }
    }};
    return inputs;
}
auto Pressure_Velocity::get_outputs() const -> std::vector<Output>
{
    std::vector<Output> outputs =
    {{
        { "velocity", m_output_stream },
    }};
    return outputs;
}

void Pressure_Velocity::process()
{
    QLOG_TOPIC("Pressure_Velocity::process");

    m_output_stream->clear();

    std::chrono::duration<float> dt(m_output_stream->get_dt());
    float dts = dt.count();

    m_accumulator.process([this, dts](stream::IPressure::Sample const& sample)
    {
        if (sample.is_healthy)
        {
            float alt = static_cast<float>((1.0 - std::pow((sample.value / 101.325), 0.190284)) * 44307.69396);
            float speed = (m_last_altitude) ? ((alt - *m_last_altitude) / dts) : 0.0;
            m_last_altitude = alt;

            math::vec3f enu_velocity(0.f, 0.f, speed);
            m_output_stream->push_sample(enu_velocity, true);
        }
        else
        {
            m_output_stream->push_last_sample(false);
        }
    });
}

ts::Result<void> Pressure_Velocity::set_input_stream_path(size_t idx, std::string const& path)
{
    return m_accumulator.set_stream_path(idx, path, m_output_stream->get_rate(), m_hal);
}

ts::Result<void> Pressure_Velocity::set_config(hal::INode_Config const& config)
{
    QLOG_TOPIC("Pressure_Velocity::set_config");

    auto specialized = dynamic_cast<hal::Pressure_Velocity_Config const*>(&config);
    if (!specialized)
    {
        return make_error("Wrong config type");
    }
    *m_config = *specialized;

    return ts::success;
}
auto Pressure_Velocity::get_config() const -> std::shared_ptr<const hal::INode_Config>
{
    return m_config;
}

auto Pressure_Velocity::get_descriptor() const -> std::shared_ptr<const hal::INode_Descriptor>
{
    return m_descriptor;
}
ts::Result<std::shared_ptr<messages::INode_Message>> Pressure_Velocity::send_message(messages::INode_Message const& message)
{
    return make_error("Unknown message");
}

}
}


text:
"In The Days Ahead"
Biodiversity conservation, animal rights, deep ecology, ethical vegetarianism, and global sustainability are some of the concerns that need to be activated so that all life forms may live together in harmony. Biodiversity conservation, animal rights, deep ecology, ethical vegetarianism, and global sustainability are some of the concerns that need to be activated so that all life forms may live together in harmony.
By Dr. Michael Tobias
Nothing so becomes a civilization as its love affair with what is generally called "nature." In classical Greek, the love of nature was termed physiolatry, whose ripple effects were everywhere in Greek life and philosophy, from Thales' worship of water, to Aristotle's sophisticated biological studies, with their emphasis on human happiness. A more recent incarnation of this sensibility emerged under the scientific guise of biophilia, that universal impulse, discernible in all species, which craves affiliation with other life forms. When a gorilla named Koko fell in love with a kitten, or two tsunami refugees on a beach in Somalia — one an old, wise turtle, the other, a young hippo — became best friends, that, too, is biophilia.
Biodiversity conservation, animal rights, deep ecology, ethical vegetarianism, global sustainability ... these are points of the same compass that elevate all life forms into a choreography that either succeeds, perpetuating biology in a quiet, blue corner of the Milky Way, or fails, condemning trillions of dreaming, aspiring, breathing individuals to torment and oblivion. The stakes, therefore, are enormous. Not only life, or death, but the terrible pain that accompanies failed experiments.
No other experiment has so challenged human beings as their ability, or not, to sustain life in the greater picture at all costs. By that mandate we have not been granted any unusual dispensation: every participant in evolution is equal. But the shadow cast by Helm's Butterfly, or Fiji's critically endangered red-throated parakeet, will not come anywhere near the grim pattern of destruction unleashed by us humans. That this has become law, a self-evident cliché in an age of ecological Armageddon only escalates the tragedy that accompanies our ho-hum protests and mundane psychoanalyses. Scientists, theologians, those of us struggling between doubt, despair, and indifference, must convene with renewed vigor to remind ourselves of the promise we made when we were born. That contract with nature is the gift we have been granted, without which our fleeting moment on Earth is nothing more than the accumulation of dust philosophers have long labeled as destiny. It need not be.
In the heart of this ancient web of biophilia exists the simple lessons of non-violence, respect, dignity, and unconditional love. Their translations in the 21st century invoke a focused embrace of restraint, and selfless service, as Gandhi described his own callings.
These are broad strokes, of course. But in the details are basic, urgent necessities that involve, among other things, international family planning at a systematic level to combat a systemic disease, namely, our runaway population explosion. No other species has ever gone so far out of balance as Homo sapiens. The reasons are inexplicable given the myriad death knells associated with our transparently deceptive biological success as a species. As I outlined years ago in my book and film, "World War III," our billions of comrades do not make for any blue ribbons. Indeed, if current fertility trends continue our species is likely to attain the staggering number of 10 or 11 billion by the end of this century, despite more moderate assessments by the World Bank and United Nations.
But what is clear is the fuel responsible for this conflagration, and that is human numbers, our consumptive fanaticism, and the greed that has tainted the human heart.
At 11 billion I doubt human beings will be recognizable. For centuries our true identities have been biologically obscured by the heavy handedness we today read in the form of Holocausts, serial killing, and the global rampage responsible for the loss of more than 50 percent of all photosynthetic land cover, as well as the destruction of most known marine groups. The numbers, which are bandied about like ping pongs, attest to our flailing in the face of self-destruction. But what is clear is the fuel responsible for this conflagration, and that is human numbers, our consumptive fanaticism, and the greed that has tainted the human heart. These are not condemnations, as such, but self-analysis. We are all one, which underscores the reality of what, in Jain tradition is described as "parasparopagraho jivanam," the interdependence of the human soul with all other life forms.
That said, we need not just manifest individual blueprints to get there, but also must configure a veritable parliament of souls whose unambiguous authority stems not necessarily from expediency, pragmatism, compromise, or negotiation, but from human goodness. That is a sentiment that has long been driven underground by presumptions about human nature that are probably erroneous, much like the mythology of gun-slinging cowboys and oil billionaires. Their mandates were not, are not, human goodness. Nor were these driven mavericks, aka captains of industry, the stuff of human nature. The paleontological record confirms symbiosis, courtesies of every race. More and more data sheds remarkable testimony to our vegetarianism and lack of aggression as a species. Those naysayers who ridicule philosophies of non-violence and goodness are, themselves, meat eaters, hunters, obsessive buffs of blood splattered chronicles, and their opinions are enraged, if not entirely undermined by a bias of centuries. Yet, we must address their feeble attempts to exploit innocence because such voices have marred an otherwise pure past, and continue to rush humanity and all other species towards darkness.
Governance has little sway over the divides that conquer neighbors, betray quiet solace, or march unobstructed into the hells of historic hatred. To combat these spasms of bravado, collaborative efforts are indeed necessary. But to be successful they must adhere to the courage of nonviolence in an age of unprecedented destruction. It is not easy. No one argues that it is. But our capacity for love has been tested over millennia, and we have seen it rise to remarkable occasions and heights.
The Mount Everest of love will be our ability to cease killing, which is every child's understanding of life. You do not take life, you cherish it. No other preamble was necessary after "Thou Shalt Not Kill." That we have continued to ignore the Jewish summons suggests that we are a suicidal species, as socio-entomologist E O.Wilson once described in a New York Times cover story. Paul Ehrlich furthers the logic by having reminded me, once, that we are likely to be the shortest lived species in biological annals. Others plead that the sooner we destroy ourselves the better.
But there is no comfort in these calmly-uttered mass graves because they necessarily involve the obliteration of all other species, who have every idea, but no defense against what we are doing. Dinosaurs looked up at the heavens with wondrous dread, I imagine, 65 million years ago. But we are no colliding asteroid or supernova, and to think in such cosmic terms does nothing for tonight's hundreds of millions of hungry children, and the ten billion animals that will be slaughtered under Auschwitz-like conditions next year in the United States.
Our solutions must re-ignite that Biblical summons to put down our weapons, our hatred, our greed. To respect all life, and treat each other as we would wish to be mothered. Let governments take heed of their mothers; let children run for office and animal legislation confirm their independent standing in any court of law. When a donkey's testimony resolved a dispute between two neighbors in a Dallas courtroom in April 2007 ("Cantrell vs. Shamoun") there was again the proof of an ethological consciousness gaining ground on the monoliths of heavy human hegemony, usurping wrath with a child's imaginative joy. We are able to be virtuous. We can formulate maxims from fairy tales with all the megatonnage of our conscience, and demonstrate choices that do no condemn but, rather, liberate us.
Animal liberation is a prelude to the visitation of love upon the remaining forests of the world; the salvation of wetlands and all of the nearly 400,000 known vascular plant species. The love of pollination, of birds and bats, bees and wasps; the respect of those tens-of-millions of insect species we have not yet discovered; the rescue of every puppy and kitten, lamb and pigeon, turkey and pig; cow and chicken, emu and horse, fish and lobster.
Vegetarianism, inspired, accessible family planning, and animal liberation: these are the hallmarks of 21st century biodiversity conservation which is, in turn, the essence of good government, and progressive, sustainable, economics.
In the Kingdom of Bhutan, the Fourth King invited consideration of a new economic index, Gross National Happiness, a measure of sustainability that incorporated human rights, other animal rights, and a policy of forest preservation that mandated no fewer than 60% of the country to be covered in primary forest habitat. In South India, the Todas of the Nilgiris are vegetarian and maintain the most biologically rich, and oldest protected area in all of the Indian subcontinent. The Todas worship their buffalo, just as the Bishnois of India's Thar Desert in Rajasthan worship an ecological hero of the Indian Renaissance, Jamboje, whose environmental edicts have become the Bible for the more than one million vegetarian tribal peoples of that region. Elsewhere, from Mindinao in the Philippines to Tanzania, tens-of-millions of people are becoming vegetarian and vegan, the barometer for non-violence most applicable to a world in which the vast majority of killing occurs over the otherwise casual human dinner tables. It need not be so. Pushkar, a town of 30,000 people in Rajasthan, 350 kilometers southeast of the nation's capital, New Delhi, is a living tribute to vegetarian ethics. No killing is allowed. Police enforce a policy that forbids alcohol and any non-vegetarian food anywhere in the city. Over 1.5 million eco-tourists flock to Pushkar each year, many in order to be bathed in the spiritual and emotional cleansing of a non-violent city. It is possible. And the economic benefits are undeniable.
Vegetarianism, inspired, accessible family planning, and animal liberation: these are the hallmarks of 21st century biodiversity conservation which is, in turn, the essence of good government, and progressive, sustainable, economics. Without turning back the tide of human over-population with zero population growth or, at most, one loved child per family, preferably an adopted child, there can be no fine-tuning of an engine that is blowing up. Without a concerted effort to teach non-violence in our schools, and the love of life, there will be yet another generation of mobsters, ganging up on the innocent, reaping benefits that are actually another name for small holocausts on every street corner. We need courageous, gentle people, not bullfighters. We need to remember Saint Francis and Mahavira, Buddha and Christ as examples of what we can be, people who are alive, not mere faded memories of all that has since been broken; of mortals turned into myth.
Our mortality is the world's mortality; our joy, its joy, and our suffering, the end of nature. Knowing this interdependency to be excruciatingly real is what must first and foremost school our cultures, our dreams and aspirations. We are a people who live inside nature. Our economies, our fleeting empires... these are all moments within nature. It is not the other way round. The depth of our empathy is the truest earth science and the one dependability in a sea of human turbulence. Such islands of faith are what give us our strength in the hard days ahead.
Dr. Michael Tobias, President of the Dancing Star Foundation, is a global ecologist, author and filmmaker.
Tobias is the author of 35 books. Two of his better known works are: "World War III: Population and the Biosphere at the End of the Millennium" and "A Vision of Nature: Traces of the Original World."


A dedication to gallant times (think Tudor and Holbein) when gentleman bachelors would sit to have a portrait painted. A red carnation would be featured in the painting to hint at the intentions of the model.
Sweet William is a spicy woody perfume. Pepper, cardamom, cinnamon and tobacco are mixed with a few drops of rosewater, orris butter and a pinch of vanilla.
The Sniff on Sweet William: "In the heart, [this perfume] really reveals its spicy secrets. There is warm and robust cardamon and cinnamon here which work wonderfully alongside the pepper; the scent starts off almost itchy in the way it feels in the nose (like smelling pepper does) and then gently revolves into warm spices as the scent wears. It's a beautiful transition that gives a sense of a story evolving as the perfume progresses – it's the thread that is visible all the way through that ties one phase to the next perfectly."


Testing is one of the most important phases of the development process. Whatever type of project you are working on, testing is key if you want to deliver applications with high quality and make your users happy.
Just imagine what would happen if your favorite taxi application makes your driver take you to the wrong place or the price of your trip is higher than it's supposed to be? This embarrassing bug will undoubtedly produce a series of catastrophic events that will damage the reputation of the application and, worse still, the company reputation.


text:
Q: Why does wrapping this in a function take 10x longer to run? Can anyone explain why the time jumps by an order of magnitude simply by wrapping this in a function?
user> (time (loop [n 0 t 0]
              (if (= n 10000000)
                t
                (recur (inc n) (+ t n)))))
"Elapsed time: 29.312145 msecs"
49999995000000

user> (defn tl [r] (loop [n 0 t 0]
                    (if (= n r)
                      t
                      (recur (inc n) (+ t n)))))
#<Var@54dd6004: #object[user$eval3462$tl__3463 0x7d8ba46 "user$eval3462$tl__3463@7d8ba46"]>

user> (time (tl 10000000))
"Elapsed time: 507.333844 msecs"
49999995000000

I'm curious how a simply iteration like this can be made much faster. For example, a similar iterative loop in C++ takes less than 1 ms in Release mode, or about 20 ms in Debug mode on the same system as this Clojure code.

A: This happens because in second case passed argument is being boxed. Add type hint to fix this:
user> (defn tl [^long r]
  (loop [n 0 t 0]
    (if (= n r)
      t
      (recur (inc n) (+ t n)))))

user> (time (tl 10000000))
"Elapsed time: 20.268396 msecs"
49999995000000

UPD:
1, 2) In the first case you operate with java primitives, that's why it's so fast. ^Integer won't work here, because it's type hint for boxed type java.lang.Integer (that's why it's capitalized). ^long is type hint exactly for java long primitive. For function parameters you may do only ^long and ^double primitive type hints (others are not supported besides of these you may do type hints for all kinds of primitive arrays, like ^floats, ^bytes etc.).
3) Since passed argument is boxed this forces generic aritmethics for all operations. In other words, every + and inc operation will create new object on heap (in case of primitives, they will remain on stack).
UPD 2:
As an alternative to type hinting you may explicitly convert passed argument to primitive before the loop:
user> (defn tl [r]
  (let [r (long r)]
    (loop [n 0 t 0]
      (if (= n r)
        t
        (recur (inc n) (+ t n))))))

user> (time (tl 10000000))
"Elapsed time: 18.907161 msecs"
49999995000000


text:
150 Greatest National Champions: 9
9. 2021 Georgia (14-1)
All-Time Season Score: 30.69
Key Season Score Element: 153 points allowed (10.2 per game)
Best Win: Georgia 33, Alabama 18 (College Football Playoff National Championship)
Worst Game: Alabama 41, Georgia 24
The tone was set from the start.
It was supposed to be the biggest non-conference game of the 2021 season, and in terms of intensity it lived up to the billing. The offense didn't do much in the 10-3 win over Clemson, but the defense came up with a pick six, didn't allow a touchdown, and the program's first national championship run since 1980 was off and rolling.
The D didn't allow more than 13 points in any of the first nine games, gave up 17 to Tennessee, and finished the regular season giving up fewer than 14 in 11 of 12 games.
And then Alabama went off. The Dawgs lost the SEC Championship, but came back and rolled against Michigan in the College Football Playoff semifinal before getting revenge on the Crimson Tide with one final great defensive performance in the 33-18 win for the national championship.
Bowls don't matter? Auburn, Florida, and Missouri all lost their bowl games to finish with losing seasons. Had they all won, the Georgia wins would've been more impressive – they all would've been Quality Wins – and 2021 would've been much, much higher in the Season Ranking list.
Wins (14): Clemson (10-3), UAB (56-7), South Carolina (40-13), at Vanderbilt (62-0), Arkansas (37-0), at Auburn (34-10), Kentucky (30-13), Florida (34-7), Missouri (43-6), at Tennessee (41-17), Charleston Southern (56-7), at Georgia Tech (45-0), Michigan (34-11, Orange Bowl/College Football Playoff), Alabama (33-18, College Football Playoff National Championship)
Losses (1): Alabama (41-24, SEC Championship)
Quality Wins (8): Clemson, UAB, South Carolina, Arkansas, Kentucky, at Tennessee, Michigan (Orange Bowl), Alabama (CFP National Championship)
Elite Wins (3): Clemson, Michigan (Orange Bowl), Alabama (CFP National Championship)
Bad Wins (3): at Vanderbilt, Charleston Southern, at Georgia Tech
NEXT: 150 Greatest National Champions: No. 8 2009 Alabama


text:
I.T.A. No. 630/AHD/2010, (Assessment Year: 1998-1999). Case: Gujarat Transport Services Vs The A.C.I.T.. ITAT (Income Tax Appellate Tribunal)
Case Number I.T.A. No. 630/AHD/2010, (Assessment Year: 1998-1999)
Counsel For Appellant: M.K. Patel, A.R. and A.R. Shah and For Respondents: Sonia Kumar, Sr. D.R.
Judges G.C. Gupta, Vice President and Anil Chaturvedi, Member (A)
Issue Income Tax Act
Judgement Date August 07, 2014
Court ITAT (Income Tax Appellate Tribunal)
Anil Chaturvedi, Member (A), (ITAT Ahmedabad 'D' Bench)
This appeal is filed by the Assessee against the order of CIT(A)-V, Baroda dated 16.12.2009 for A.Y. 1998-99.
The facts as culled out from the material on record are as under.
Assessee is a partnership firm stated to be engaged in the business of transportation. Assessee file its return of income for A.Y. 98-99 on 31.10.98 showing total income of Rs. 2,40,637/-. Assessment was framed u/s. 143(3) vide order dated 2.03.2001 and the total income was determined at Rs. 55,01,680/-. While framing the assessment A.O. estimated gross profit at 18% of the gross receipts received from KRIBCO and made addition of Rs. 50,92,838/-. Aggrieved by the order of A.O. Assessee carried the matter before CIT(A) who reduced the estimation of gross profit from 18% to 3% and thus the addition on account of gross profit was reduced to Rs. 8,48,806/-. Aggrieved by the order of CIT(A), Assessee as well as Revenue preferred appeal before Tribunal where both the appeals were dismissed. On the addition of Rs. 8,48,806/- which was confirmed by CIT(A), A.O. vide penalty order dated 29.06.2009 levied penalty u/s. 271(1)(c) of Rs. 2,97,100/-. Aggrieved by the order of A.O. Assessee carried the matter before CIT(A). CIT(A) dismissed the appeal of the Assessee by holding as under:-
4.3. I have carefully considered the facts of the case, the submissions of the appellant, the assessment and penalty order and the quantum appeal orders of CIT(A) and Hon'ble ITAT. It is noticed that during the course of assessment proceedings the AO had recorded the statement of Shri Jayantilal Patni, Managing Partner who admitted in reply to Q. No. 21 that certain expenses were bogus. Further, in reply to Q. No. 19, it was stated that certain payment for hiring trucks were also bogus payments. In regard to Q. No. 13, the assessee admitted that certain Bhada Chitties were fictitiously signed assessee's own men. It was also admitted before the AO that certain expenses were debited which pertained to the earlier period. On these facts, the CIT(A) and the Hon'ble ITAT confirmed the GP addition to the extent of Rs. 5,01,627/-. It was the specific admission of the partner in regard to claim of various bogus expenses that the income was estimated and this fact was also recognized by the higher appellate authority. In the case of CIT vs. T Mathai 269 ITR 492 (Kerala) and CIT vs. Shakuntaladevi 270 ITR 590 (Rajasthan) the penalty on...


text:
Chat Call For Best Price:
IRA/401K
Free IRA/401K Rollover Kit
Eligible Metals
Rebalancing Your Portfolio
Precious Metals News & Tips
High Relief Coins
Gold Buying Basics
Bullion vs Investment Grade
Mint State vs Proof Coins
How Big Is a Gold Bar?
Investing News & Tips
Precious Metals Glossary
Free Metals Investor Guide
Smart Allocation Strategy
Diversification Strategies
Open a Purchasing Account
Request a Phone Consultation
Sign up for Market Alerts
Track Your Portfolio
Sales Packages by Investor
2020 Gold Eagle PF70 Set
2019 Gold Buffalo PF70 Coin
2020 Platinum Eagle PF70 Coin
2020 Silver Eagle PF70 Coin
Retirement News & Tips
Why U.S. Gold Bureau?
Buy-Back Guarantee
Media/Press Queries
1880-S $1 Morgan Silver Dollar - PCGS MS63
Any $57.12 $59.50
Sign Up For Back In Stock Alert
Investor's Guide
1880-S $1 Morgan Silver Dollar - PCGS MS63 Description:
Morgan Dollars were minted from 1878 to 1921. The coins weigh 26.73 grams (.859 troy ounces) and they are 90% silver, so each coin contains 0.77344 troy ounces of silver. Dates and mint marks are our choice. Based on availability. All coins are in AU or better condition.
In 1873, the then-current American dollar coin was legislated out of existence. No one seemed to mourn its passing. When a new silver dollar arrived on the scene in 1878, no one seemed to welcome its return. There simply was not much clamoring among the American public for a heavy, nearly palm-sized dollar coin. But the Morgan Dollar was never a people's coin.
The first Morgan Dollars were struck on March 11, 1878, less than two weeks after the coin was authorized by Congress, at 3:17 in the afternoon on Press #4 in Philadelphia. It is currently is on display at the Hayes Library and Museum in Fremont, Ohio. It had a metallic content of 90% silver and 10% copper. While most of the Morgan Dollars were minted in Philadelphia, a small mint was established in Carson City, Nevada to also press the coins near the source of the Comstock lode. The mine, however, played out shortly thereafter and the Carson City mint closed forever in 1893. The Morgan Dollars minted in Carson City are rare and highly collectible today.
More than 500 million Morgan Dollars were minted until production stopped in 1904, after the statuary 25-year run for a coin design. The silver dollars were never really popular - most were circulated in the sparsely populated West - and huge stockpiles were on hand. In 1918, more than 270 million Morgan Dollars were melted down to provide war-time silver for Great Britain. In 1921 another 86 million Morgan Dollars were coined but production was halted in 1922 for the commemorative Peace Dollar to mark the end of World War I. The design was so popular it became the regular silver dollar and no more Morgan Dollars were ever minted.
Now the Morgan Dollar had genuine star status in the coin world. The dealers who purchased the Redfield hoard gradually dispersed the silver dollars into the collecting community, further stimulating interest in the coin. Today, the Morgan Dollar, ignored in circulation, is one of the most famous and desired American coins in existence.
U.S. Mint - San Francisco
Investment Grade
Pre-64
$250 Face value 90% Pre-65 - "Junk Silver"
$500 Face Value Pre-65 Silver
1922-1935 Peace Dollars MS-64 NGC
Gold & Silver Shortages Up Ahead
Written By: Bill Stack
2021 Precious Metals Outlook
Metals Minute: Precious Metals Price Update
Inflation Insurance of Gold & Silver
Opinion: Dow Tops 30,000 While Gold Drops
Written By: Nathan Lewis, Op-Ed Contributor
Gold , Precious Metals , Silver
Free Consultation: (800) 775-3504
United States Gold Bureau (USGB) is a private distributor of Gold, Silver & Platinum coins from the U.S. Mint and is not affiliated with the U.S. Government. Information on this website is intended for educational purposes only and is not to be used as investment advice or a recommendation to buy, sell, or trade any asset that requires a licensed broker. As with all investments there is risk and the past performance of a particular asset class does not guarantee any future performance. The United States Gold Bureau, principals, and representatives do not guarantee to clients that they will realize a profit or guarantee that losses may not be incurred as a result of following its coin collecting recommendations, or upon liquidation of coins bought from the United States Gold Bureau. All content and images are owned by USGB and may not be reproduced without written authorization.
Copyright © 2021 USGB, LLC. All rights reserved.


For information pertaining to the local Goodwill in your community, see Texas Corporate Headquarters Locations.
Please note: The association has no jurisdiction or authority over any Goodwill or store. All feedback regarding services and stores should be directed to the corporate office for that store or service area. See Texas Corporate Headquarter Locations for more information.


text:
#Naxalites
Naxals using levy amounts to fund terror, attack security forces, kill innocents: NIA
Naxal wanted in over 18 cases arrested in Jharkhand
Elgar Parishad: Accused inculcated Maoist sympathies in Delhi students says NIA
WB govt protecting terrorists, naxalites: Kailash Vijayvargiya
Cops up ante as big movement of naxals seen from Chhattisgarh to Telangana
How wives of this top naxal formed dubious companies to deposit demonetised currency
Failing ideology, reduction of geographic spread led to regime change in naxal leadership
| Published: Thursday, November 8, 2018, 16:35 [IST]
New Delhi, Nov 8: The big news in the naxalite circle was the taking over of the new chief. A man in charge of the military operations replaced an ideological head, clearly sending across a message that there is going to be a big shift in strategy.
Muppala Lakshman Rao alias Ganapathy who was heading the naxalites since 2004 was replaced by Nambala Keshava Rao alias Basavaraju. Rao took over as the chief of the CPI (Maoist), which was formed in 2004, following the merger with the Peoples' War Group, CPI (Marxist-Lennist) and the Maoist Communist Centre of India.
Who is Nambala Keshav Rao, the new aggressive chief of the naxalites
Rao, an aggressive planner and strategist hails from Andhra Pradesh.
Commenting on the developments, a senior official tells OneIndia that this was in the offing since the past one year. Many had been leaving the outfit on the ground that they were unhappy with the ideology. Most had said that they were disgruntled and hence wanted to quit the outfit.
Further the naxalites were also facing heavy losses in several of their bastions. Home Ministry records speak about the reduction in the geographical spread of the naxalites all these factors in fact led to a change in leadership. More importantly the naxalites decided to go with a combat man at their head and this could signal that they would look to get more aggressive.
Keshav Rao unlike his former boss, Ganapathy specialises in combat. He is an engineering graduate from the Regional Engineering College, Warrangal, which is now called the National Institute of Technology. He has been a second in command to Ganapathy and headed the Central Military Commission of the CPI (Maoists).
Intelligence Bureau officials describe him as an aggressive cadre and a key strategist. He specialises in use of improvised explosive devices. He has been responsible for training several cadres in the use of IEDs.
With a new chief at the helm, why the naxalites will get extremely aggressive now
As the head of the CMC or Central Military Commission, he was responsible for planning and directing guerrilla activity. He was also in charge of chalking out the strategy and source arms and ammunition. He was also the overall in charge of the sub committees such as the Zonal Military Committee and Special Area Military Committee.
He is also well versed with the key areas that the naxals control in Andhra Pradesh, Odisha and Chattisgarh.
More NAXALITES News
NIA arrests key aide of naxalites in Hyderabad
Activist spearheading CAB protest in Assam closely linked to naxals
Coimbatore: Naxal trainer remanded in judicial custody
Chhattisgarh: Woman Naxal killed in Sukma, Insas rifle which was looted from CRPF recovered
NCP leader held in connection with Gadchiroli naxalite attack
Chhattisgarh: In a first, 30-member all women Anti-Naxal Commando unit deployed
In a positive development 30 surrendered lady naxals recruited into police force
Gadchiroli attack: Naxals were aware security forces hired private vehicle
Justice done: 2 naxals who killed BJP MLA gunned down
As India polls today, high alert against naxals in Odisha, Telangana
Naxals had frighteningly specific details on BJP MLAs convoy
A day before killing BJP MLA, naxals extended support to Pakistan backed group
naxalites military operations ideology maoists
Story first published: Thursday, November 8, 2018, 16:35 [IST]