text:
<?php

namespace App\Models\Vendor;

use App\Models\Vendor\Facades\ActivityLog;
use App\Models\Vendor\Facades\File;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Facades\DB;

class BaseModel extends Model
{
    public $enableSearch = FALSE;
    protected $writableColumns = [];
    protected $tableName = NULL;

    protected $params = [];

    // single: [filename]
    // multiple: [[name => filename, table => table]]
    // File Options: [filename => [tag => string, crop_width => num, crop_height => num, crop_auto => boolean, width => num,
    // height => num, heightRatio => num, widthRatio => num, quality => int]]
    protected $files = [];
    protected $fileOptions = [];

    protected $inputCrypt = [];
    protected $inputBooleans = [];

    protected $inputDates = [];
    protected $inputDateTimes = [];

    protected $inputIntegers = [];
    protected $inputNumeric = [];

    protected $columnHasRelations = [];
    protected $columnWhere = [];
    protected $findInSetList = [];

    protected $hasTimestamp = TRUE;

    // do not sanitize HTML codes
    protected $unClean = [];

    public function __construct(array $attributes = [])
    {
        parent::__construct($attributes);
    }

    public function getTableColumns()
    {
        return $this->getConnection()->getSchemaBuilder()->getColumnListing($this->getTableName());
    }

    public function getTableName()
    {
        return $this->getTable();
    }

    /**
     * Get THIS
     *
     * @return $this
     */
    public function self()
    {
        return $this;
    }

    /**
     * Set files
     *
     * @param $request
     * @param array $inputs
     */
    public function setFilesFromRequest($request, $inputs = []): void
    {
        foreach ($this->files as $file) {
            $inputs[$file] = $request->file($file);
        }
    }

    /**
     * Get writable columns set
     *
     * @return array
     */
    public function getWritableColumns()
    {
        return $this->writableColumns;
    }

    /**
     * Set writable column
     *
     * @param $value
     * @return BaseModel
     */
    public function setWritableColumn($value)
    {
        if (!$value) {
            return $this;
        }

        $this->writableColumns[] = $value;
        return $this;
    }

    /**
     * Remove all boolean to update
     */
    public function clearBoolean()
    {
        $this->inputBooleans = [];
        return $this;
    }

    /**
     * Remove all integer to update
     */
    public function clearInteger()
    {
        $this->inputIntegers = [];
        return $this;
    }

    /**
     * Remove all numeric to update
     */
    public function clearNumeric()
    {
        $this->inputNumeric = [];
        return $this;
    }

    /**
     * Get all data no pagination
     *
     * @param array $params
     * @return NULL
     */
    public function fetchAll($params = [])
    {
        $params['all'] = TRUE;
        $this->params = $params;
        return $this->fetch($params);
    }

    /**
     * Get data
     *
     * @param array $params
     * @return NULL
     */
    public function fetch($params = [])
    {
        $this->params = $params;
        $this->_cleanParams();
        $select[] = $this->tableName . '.*';

        // custom select
        $query = DB::table($this->tableName)->select($this->rawSelects($select));

        // where equal
        $this->rawWhere($query);

        // exclude and include
        $this->rawExcludeInclude($query);

        // search
        $this->rawSearch($query);

        // ordering
        $this->rawOrdering($query);

        // custom queries
        $this->customQueries($query);

        // add formatting
        return $this->_readyFormatting($query);
    }

    /**
     * Clean parameters
     */
    private function _cleanParams()
    {
        foreach ($this->params as $key => $value) {
            // do not clean files
            if (!in_array($key, $this->files)) {
                $this->params[$key] = !in_array($key, $this->unClean) ? dbCleanInput($value) : $value;
            }
        }
    }

    /**
     * Custom selects
     *
     * @param array $select
     * @return array
     */
    protected function rawSelects($select = []): array
    {
        foreach ($this->customQuerySelectList() as $key => $q) {
            $select[] = DB::raw('(' . $q . ') AS ' . $key);
        }

        return $select;
    }

    /**
     * List of select
     *
     * @return array
     */
    protected function customQuerySelectList(): array
    {
        return [];
    }

    /**
     * Raw where (writable columns equal, date range, current date)
     *
     * @param $query
     */
    protected function rawWhere($query): void
    {
        // do not continue if search is enabled
        if ($this->enableSearch === TRUE) {
            return;
        }

        // format table name
        $tableName = $this->tableName ? $this->tableName . '.' : '';

        // current id of the table index
        if (is_numeric($this->hasParams('id'))) {
            $query->where($tableName . 'id', $this->params['id']);
        }

        // equal fetch
        foreach ($this->writableColumns as $row) {
            // writable columns (non-custom)
            if (key_exists($row, $this->params) && !in_array($row, $this->findInSetList)) {
                if ($this->_allowNull($row) === TRUE) {
                    $query->where($tableName . $row, $this->params[$row]);
                }
            }

            // custom columns
            $defaultCustomColumn = $this->_fetchSelect($row);
            if ($this->_allowNullToVal($defaultCustomColumn) === TRUE) {
                $query->where(DB::raw($defaultCustomColumn), $this->params[$row]);
            }
        }

        // custom search
        foreach ($this->customQuerySelectList() as $key => $value) {
            if ($this->_allowNullToVal($value) === TRUE && $this->hasParams($key) !== NULL) {
                $query->where(DB::raw($value), $this->params[$key]);
            }
        }

        // FIND_IN_SET() Function
        if ($this->hasParams('find_in_set') === TRUE) {
            foreach ($this->findInSetList as $key) {
                if ($this->hasParams($key)) {
                    $query->whereRaw('FIND_IN_SET(?, ' . $tableName . $key . ')', [$this->hasParams($key)]);
                }
            }
        }

        // filter by dates
        $this->_filterByDates($query, $tableName);
    }

    /**
     * Get parameters
     *
     * @param $key
     * @return mixed|NULL
     */
    protected function hasParams($key)
    {
        return $this->params[$key] ?? NULL;
    }

    /**
     * Check if we allow NULL on filters
     *
     * @param $row
     * @return bool
     */
    private function _allowNull($row): bool
    {
        $_val = $this->params[$row] ?? NULL;
        $_allowNull = $this->params['allow_null'] ?? FALSE;

        if ($_val === NULL && $_allowNull === FALSE) {
            return FALSE;
        }

        return TRUE;
    }

    /**
     * Custom queries
     *
     * @param $key
     * @return mixed|NULL
     */
    private function _fetchSelect($key = NULL)
    {
        $queries = $this->customQuerySelectList();

        if ($key === NULL) {
            return $queries;
        }

        return $queries[$key] ?? NULL;
    }

    /**
     * Check if we allow NULL on filters with defined value
     *
     * @param $val
     * @return bool
     */
    private function _allowNullToVal($val): bool
    {
        $_allowNull = $this->params['allow_null'] ?? FALSE;

        if ($val === NULL && $_allowNull === FALSE) {
            return FALSE;
        }

        return TRUE;
    }

    /**
     * Filter by dates
     *
     * @param $query
     * @param $tableName
     */
    private function _filterByDates($query, $tableName)
    {
        // date range
        // date_range_from and date_range_to
        // custom date_range_name unless we use created_at
        // NOTE: https://www.w3schools.com/sql/func_mysql_date_format.asp
        if ($this->hasParams('date_range_from') && $this->hasParams('date_range_to')) {
            $date_name = $this->params['date_range_name'] ?? ($tableName . 'created_at');

            $query->whereBetween(DB::raw('DATE(' . $date_name . ')'), [
                sqlDate($this->params['date_range_from'], TRUE),
                sqlDate($this->params['date_range_to'], TRUE)
            ]);
        }

        // fetch today
        // if fetch_today is boolean get the data today unless specify the date
        if ($this->hasParams('fetch_today')) {
            $data_name_today = $this->params['fetch_today_name'] ?? ($tableName . 'created_at');
            $current_date = $this->params['fetch_today'] === TRUE || is_numeric($this->params['fetch_today']) ? 'CURDATE()' : sqlDate($this->params['fetch_today'], TRUE);
            $query->whereRaw('DATE(' . $data_name_today . ') = ' . $current_date);
        }

        // fetch by year e.g. 2018, 2019
        if (is_numeric($this->hasParams('raw_year'))) {
            $date_name = $this->params['raw_date_name'] ?? ($tableName . 'created_at');
            $query->whereRaw('DATE_FORMAT(' . $date_name . ', "%Y") = "' . $this->hasParams('raw_year') . '"');
        }

        // fetch by month e.g. June, February
        if ($this->hasParams('raw_month')) {
            $date_name = $this->params['raw_date_name'] ?? ($tableName . 'created_at');
            $query->whereRaw('DATE_FORMAT(' . $date_name . ', "%M") = "' . $this->hasParams('raw_month') . '"');
        }

        // fetch by day e.g. 01, 11
        if (is_numeric($this->hasParams('raw_day'))) {
            $date_name = $this->params['raw_date_name'] ?? ($tableName . 'created_at');
            $query->whereRaw('DATE_FORMAT(' . $date_name . ', "%d") = "' . $this->hasParams('raw_day') . '"');
        }
    }

    /**
     * Raw where for including and excluding
     * values: ['column_name' => [value, value, value]]
     *
     * @param $query
     */
    protected function rawExcludeInclude($query): void
    {
        $tableName = $this->tableName ? $this->tableName . '.' : '';
        $columns = $this->writableColumns;
        $columns[] = 'id';

        if ($this->hasParams('exclude')) {
            foreach ($this->_extractIncExcData($this->params['exclude']) as $key => $value) {
                if (is_array($value) && in_array($key, $columns)) {
                    $query->whereNotIn($tableName . $key, $value);
                }
            }
        }

        if ($this->hasParams('include')) {
            foreach ($this->_extractIncExcData($this->params['include']) as $key => $value) {
                if (is_array($value) && in_array($key, $columns)) {
                    $query->whereIn($tableName . $key, $value);
                }
            }
        }
    }

    /**
     * Extract data
     * string e.g. column_name:value1,value2|column_name:value1,value2
     *
     * @param $data
     * @return array|string
     */
    private function _extractIncExcData($data)
    {
        // if string e.g. column_name:value1,value2|column_name:value1,value2
        if (is_string($data)) {
            $divider = explode('|', $data);

            $clean = [];
            foreach ($divider as $extract) {
                $column = explode(':', $extract);

                if (count($column) == 2) {
                    $clean[$column[0]] = explode(',', $column[1]);
                }
            }

            $data = $clean;
        }

        return $data;
    }

    /**
     * Search parameters
     *
     * If errors occurred on searching please check your writable columns if exists on table
     *
     * @param $query
     */
    protected function rawSearch($query): void
    {
        $num = 0;
        $tableName = $this->tableName ? $this->tableName . '.' : '';

        if ($this->hasParams('search')) {
            // always check for values
            $query->where(function ($query) use ($num, $tableName) {
                // default columns table search
                foreach ($this->writableColumns as $row) {
                    $column_name = $tableName . $row;
                    $this->_searchQuery($num, $query, $column_name, $this->params['search']);
                    $num++;
                }

                // custom search parameters
                foreach ($this->customQuerySelectList() as $column_name) {
                    $this->_searchQuery($num, $query, DB::raw('(' . $column_name . ')'), $this->params['search']);
                    $num++;
                }
            });
        } else if ($this->hasParams('search_column')) {
            // search only for specific columns
            $search_column = $this->params['search_column'];

            if (is_array($search_column)) {
                $query->where(function ($query) use ($num, $search_column, $tableName) {
                    // custom search parameters
                    $customSearch = $this->customQuerySelectList();

                    foreach ($search_column as $column_name => $value) {
                        $column = $tableName . $column_name;

                        // default columns
                        if (in_array($column_name, $this->writableColumns)) {
                            $this->_searchQuery($num, $query, $column, $value);
                            $num++;
                        }

                        // customer search
                        if (isset($customSearch[$column])) {
                            $this->_searchQuery($num, $query, DB::raw('(' . $customSearch[$column] . ')'), $value);
                        }
                    }
                });
            }
        } else if ($this->enableSearch === TRUE) {
            $query->where(function ($query) use ($tableName) {
                // default columns table search
                foreach ($this->writableColumns as $row) {
                    if (key_exists($row, $this->params) && !in_array($row, $this->findInSetList)) {
                        if ($this->params[$row] !== NULL && $this->params[$row] !== '') {
                            $column_name = $tableName . $row;

                            if (in_array($row, $this->inputBooleans) || in_array($row, $this->columnHasRelations) || in_array($row, $this->columnWhere)) {
                                // do not use LIKE search for booleans and join data
                                $query->where($column_name, $this->params[$row]);
                            } else if (in_array($row, $this->inputDateTimes) || in_array($row, $this->inputDates) ||
                                $row === 'created_at' || $row === 'updated_at') {
                                $this->_searchQuery(0, $query, 'DATE(' . $column_name . ')', sqlDate($this->params[$row], TRUE));
                            } else {
                                $this->_searchQuery(0, $query, $column_name, $this->params[$row]);
                            }
                        }
                    }
                }

                // custom search parameters
                foreach ($this->customQuerySelectList() as $key => $column_name) {
                    if (key_exists($key, $this->params)) {
                        if ($this->params[$key] !== NULL && $this->params[$key] !== '') {
                            $this->_searchQuery(0, $query, DB::raw('(' . $column_name . ')'), $this->params[$key]);
                        }
                    }
                }

                // FIND_IN_SET() Function
                if ($this->hasParams('find_in_set') === TRUE) {
                    foreach ($this->findInSetList as $key) {
                        if ($this->hasParams($key)) {
                            $query->whereRaw('FIND_IN_SET(?, ' . $tableName . $key . ')', [$this->hasParams($key)]);
                        }
                    }
                }
            });
        }
    }

    /**
     * Search
     *
     * @param $index
     * @param $query
     * @param $column_name
     * @param $search
     * @return mixed
     */
    private function _searchQuery($index, $query, $column_name, $search): void
    {
        // check values to search must not be empty
        if ($search != '' && $search != NULL) {
            if (!$index || $index === 0) {
                $query->where(DB::RAW($column_name), 'LIKE', '%' . $search . '%');
            } else {
                $query->orWhere(DB::RAW($column_name), 'LIKE', '%' . $search . '%');
            }
        }
    }

    /**
     * Ordering
     *
     * @param $query
     */
    protected function rawOrdering($query): void
    {
        // ordering
        if ($this->hasTimestamp) {
            $orderByColumn = $this->params['order_by_column'] ?? 'updated_at';
            $orderByDirection = $this->params['order_by_direction'] ?? 'DESC';
            $query->orderBy(DB::raw($orderByColumn), $orderByDirection);
        }

        // latest
        if ($this->hasParams('order_latest')) {
            $query->latest();
        }

        // oldest
        if ($this->hasParams('order_oldest')) {
            $query->oldest();
        }

        // random
        if ($this->hasParams('random_query')) {
            $query->inRandomOrder();
        }

        // grouping
        if ($this->hasParams('group_by')) {
            if (in_array($this->params['group_by'], $this->writableColumns)) {
                $query->groupBy($this->params['group_by']);
            }
        }

        // take
        if ($this->hasParams('take_query')) {
            $query->take($this->hasParams('take_query'));
        }

        // offset
        if ($this->hasParams('offset_query')) {
            $query->offset($this->hasParams('offset_query'));
        }

        // limit
        if ($this->hasParams('limit_query')) {
            $query->limit($this->hasParams('limit_query'));
        }
    }

    /**
     * Custom filters
     *
     * @param $query
     */
    protected function customQueries($query): void
    {

    }

    /**
     * Ready for formatting data
     *
     * @param $query
     * @return mixed
     */
    private function _readyFormatting($query)
    {
        if ($this->hasParams('object')) {
            return $query;
        } else if ($this->hasParams('single')) {
            return $this->_formatting($query->first());
        } else if ($this->hasParams('all')) {
            return $this->_formatting($query->get());
        } else {
            if ($this->hasParams('pagination_show')) {
                $perPage = (int)$this->hasParams('pagination_show');
            } else {
                $perPage = (int)__settings('pagination')->value;
                $perPage = ($perPage) ? $perPage : 12;
            }

            $data = $query->paginate($perPage);
            $count = (isset($data['total'])) ? $data['total'] : 0;

            return $this->_formatting($data, $count);
        }
    }

    /**
     * Add formatting on data
     *
     * @param $query
     * @param int $count
     * @return NULL
     */
    private function _formatting($query, $count = 0)
    {
        if ($this->hasParams('single')) {
            if (!$query) {
                return NULL;
            }

            $this->dataFormatting($query);
        } else {
            foreach ($query as $row) {
                $this->dataFormatting($row);
            }

            $query->total_records = $count;
        }

        return $query;
    }

    /**
     * Add formatting to data
     *
     * @param $row
     * @return mixed
     */
    protected function dataFormatting($row)
    {
        $this->addDateFormatting($row);
        return $row;
    }

    /**
     * Add date formatting for human readable
     *
     * @param $row
     */
    protected function addDateFormatting($row)
    {
        foreach ($this->inputDates as $date) {
            $rowDate = $row->$date ?? NULL;
            $dateName = 'formatted_' . $date;
            if ($rowDate) {
                $row->{$dateName} = humanDate($row->$date, TRUE);
            } else {
                $row->{$dateName} = NULL;
            }
        }

        foreach ($this->inputDateTimes as $dateTime) {
            $rowDate = $row->$dateTime ?? NULL;
            $dateName = 'formatted_' . $dateTime;
            if ($rowDate) {
                $row->{$dateName} = humanDate($row->$dateTime);
            } else {
                $row->{$dateName} = NULL;
            }
        }

        $createdAt = $row->created_at ?? NULL;
        if ($createdAt) {
            $row->formatted_created_at = humanDate($createdAt);
        }

        $updatedAt = $row->updated_at ?? NULL;
        if ($updatedAt) {
            $row->formatted_updated_at = humanDate($updatedAt);
        }
    }

    /**
     * Store new data
     *
     * @param array $inputs
     * @param bool $checkDefaults
     * @return bool
     */
    public function store($inputs = [], $checkDefaults = TRUE)
    {
        // clean inputs
        $store = $this->_cleanInputs($inputs);

        // add defaults
        if ($checkDefaults === TRUE) {
            $store = $this->_defaultInputs($store);
        }

        // other custom action
        if (!$this->actionStoreBefore($this->tableName, $inputs)) {
            return NULL;
        }

        // formatting before saving
        $store = $this->formatStore($this->tableName, $store);

        // add dates
        $store['created_at'] = sqlDate();
        $store['updated_at'] = sqlDate();
        $save = $this->single($this->insertGetId($store));

        if ($save) {
            // process files
            $this->_processStoreFiles($inputs, $save);
            $this->actionStoreAfter($save, $store);

            // refresh data with files added
            if (isset($save->_files)) {
                return $this->single($save->id);
            }
        }

        return $save;
    }

    /**
     * Clean inputs
     *
     * @param $inputs
     *
     * @return array
     */
    private function _cleanInputs($inputs)
    {
        $data = [];

        foreach ($inputs as $key => $value) {
            if (in_array($key, $this->writableColumns) && $key !== 0 && $key !== NULL) {
                $value = ($value === '' || $value === NULL) ? NULL : $value;
                $data[$key] = !in_array($key, $this->unClean) ? dbCleanInput($value) : $value;
            }
        }

        return $data;
    }

    /**
     * Default inputs
     *
     * @param array $inputs
     * @return array
     */
    private function _defaultInputs($inputs = [])
    {
        // clean dates
        foreach ($this->inputDates as $key) {
            $_date = $inputs[$key] ?? NULL;
            if ($_date) {
                if ($_date !== NULL && $_date !== '') {
                    $inputs[$key] = sqlDate($_date, TRUE);
                } else {
                    unset($inputs[$key]);
                }
            }
        }

        // clean dates with time
        foreach ($this->inputDateTimes as $key) {
            $_dateTimes = $inputs[$key] ?? NULL;
            if ($_dateTimes) {
                if ($_dateTimes !== NULL && $_dateTimes !== '') {
                    $inputs[$key] = sqlDate($_dateTimes);
                } else {
                    unset($inputs[$key]);
                }
            }
        }

        // clean integers with zero
        foreach ($this->inputIntegers as $key) {
            $_integers = $inputs[$key] ?? NULL;
            if ($_integers) {
                if ($_integers !== '' && is_numeric($_integers)) {
                    $inputs[$key] = (int)$_integers;
                } else {
                    $inputs[$key] = 0;
                }
            } else {
                $inputs[$key] = 0;
            }
        }

        // clean numeric
        foreach ($this->inputNumeric as $key) {
            $_num = $inputs[$key] ?? NULL;
            if ($_num) {
                if ($_num === '' || !is_numeric($_num)) {
                    $inputs[$key] = 0;
                }
            } else {
                $inputs[$key] = 0;
            }
        }

        // clean boolean
        foreach ($this->inputBooleans as $key) {
            $_bool = $inputs[$key] ?? NULL;
            if ($_bool) {
                $inputs[$key] = ($_bool == 1) ? 1 : 0;
            } else {
                $inputs[$key] = 0;
            }
        }

        // BCrypt
        foreach ($this->inputCrypt as $key) {
            $_crypt = $inputs[$key] ?? NULL;
            if ($_crypt) {
                if ($_crypt !== NULL && $_crypt !== '') {
                    $inputs[$key] = bcrypt($_crypt);
                } else {
                    unset($inputs[$key]);
                }
            } else {
                unset($inputs[$key]);
            }
        }

        return $inputs;
    }

    /**
     * Custom method for storing
     *
     * @param $tableName
     * @param $inputs
     * @return bool
     */
    public function actionStoreBefore($tableName, $inputs)
    {
        return TRUE;
    }

    /**
     * Custom formatting for storing
     *
     * @param $tableName
     * @param $inputs
     * @return mixed
     */
    public function formatStore($tableName, $inputs)
    {
        return $inputs;
    }

    /**
     * Get single data
     *
     * @param $id
     * @param string $column
     * @return NULL
     */
    public function single($id, $column = 'id')
    {
        if (!$id) {
            return NULL;
        }

        if (is_array($id)) {
            $inputs = array_merge($id, [
                'single' => TRUE
            ]);
        } else {
            $inputs = [
                'single' => TRUE,
                $column => $id
            ];
        }

        return $this->fetch($inputs);
    }

    /**
     * Process file uploads from store
     *
     * @param $inputs
     * @param $save
     */
    private function _processStoreFiles($inputs, $save)
    {
        $save->_files = $this->_processFile($inputs, $save);
    }

    /**
     * Process files
     *
     * @param $inputs
     * @param $_data
     * @return array
     */
    private function _processFile($inputs, $_data)
    {
        $_files = [];

        foreach ($this->files as $file) {
            if (is_array($file)) {
                if (isset($inputs[$file['name']])) {
                    $_files[] = $this->_processUploadedFile($inputs[$file['name']], $file['name'], $file['table'], $_data->id);
                }
            } else {
                if (isset($inputs[$file])) {
                    $_files[] = $this->_processUploadedFile($inputs[$file], $file, $this->tableName, $_data->id);
                }
            }
        }

        return $_files;
    }

    /**
     * Process upload file
     *
     * @param $file
     * @param $fileName
     * @param $tableName
     * @param $tableId
     * @param string $destination
     * @return array
     */
    private function _processUploadedFile($file, $fileName, $tableName, $tableId, $destination = 'private')
    {
        return fileUpload([
            'file' => $file,
            'destination' => $destination,
            'options' => $this->fileOptions,
            'tableName' => $tableName,
            'tableId' => $tableId,
            'filename' => $fileName
        ]);
    }

    /**
     * After successful save
     *
     * @param $query
     * @param $inputs
     */
    public function actionStoreAfter($query, $inputs)
    {

    }

    /**
     * Update data
     *
     * @param $id
     * @param array $inputs
     * @param bool $checkDefaults
     * @param bool $log
     * @return bool
     */
    public function edit($id, $inputs = [], $checkDefaults = TRUE, $log = TRUE)
    {
        // clean inputs
        $update = $this->_cleanInputs($inputs);

        $query = $this->rawFetch($id);
        if (!$query) {
            return FALSE;
        }

        if (!$query->first()) {
            return FALSE;
        }

        $_data = $query->first();

        // add default values
        if ($checkDefaults === TRUE) {
            $update = $this->_defaultInputs($update);
        }

        // before updating
        if (!$this->actionEditBefore($this->tableName, $_data, $inputs)) {
            return FALSE;
        }

        // formatting before saving
        $update = $this->formatEdit($this->tableName, $update);

        // update
        $update['updated_at'] = sqlDate();
        $results = (bool)$query->update($update);

        // save activity logs
        if ($log) {
            ActivityLog::log($id, $this->tableName, $this->writableColumns, $_data, $update);
        }

        // process files
        $this->_processEditFiles($inputs, $update, $this->single($query->first()->id));

        return $results;
    }

    /**
     * Raw fetch
     *
     * @param $id
     * @param NULL $columnName
     * @return bool|Builder|NULL
     */
    protected function rawFetch($id, $columnName = NULL)
    {
        $query = NULL;

        if (!$columnName) {
            $columnName = 'id';
        }

        // filters for editing
        if (!is_array($id) && is_string($columnName)) {
            $query = DB::table($this->tableName)->where($columnName, $id);
        } else if (is_array($id)) {
            $i = 0;
            foreach ($id as $key => $value) {
                if (!in_array($key, $this->writableColumns) && $key !== 'id') {
                    return FALSE;
                }

                if (!$i) {
                    $query = DB::table($this->tableName)->where($key, $value);
                } else {
                    if ($query) {
                        $query->where($key, $value);
                    }
                }

                $i++;
            }
        }

        return $query;
    }

    /**
     * Custom method for editing
     *
     * @param $tableName
     * @param $query
     * @param $inputs
     * @return bool
     */
    protected function actionEditBefore($tableName, $query, $inputs)
    {
        return TRUE;
    }

    /**
     * Custom formatting for editing
     *
     * @param $tableName
     * @param $inputs
     * @return mixed
     */
    protected function formatEdit($tableName, $inputs)
    {
        return $inputs;
    }

    /**
     * Process files for edit
     *
     * @param $inputs
     * @param $update
     * @param $_data
     */
    protected function _processEditFiles($inputs, $update, $_data)
    {
        if ($_data) {
            $_data->_files = $this->_processFile($inputs, $_data);
            $this->actionEditAfter($_data, $update);
        }
    }

    /**
     * After updating the data
     *
     * @param $query
     * @param $inputs
     */
    protected function actionEditAfter($query, $inputs)
    {

    }

    /**
     * Delete data
     *
     * @param $id
     * integer or array
     *
     * @param NULL $columnName
     * @return boolean
     */
    public function remove($id, $columnName = NULL)
    {
        // check if exists or tried to delete the users authorization
        $query = $this->rawFetch($id, $columnName);
        if (!$query) {
            return FALSE;
        }

        // before removing
        if (!$this->actionRemoveBefore($query->get())) {
            return FALSE;
        }

        // remove in db
        $save = $query->delete();

        // remove related files
        $this->_actionRemoveFiles($id, $save);

        // after removing
        $this->actionRemoveAfter($save);
        return $save;
    }

    /**
     * Before removing the data
     *
     * @param $results
     * @return bool
     */
    protected function actionRemoveBefore($results)
    {
        return TRUE;
    }

    /**
     * Remove or delete all related files
     *
     * @param $id
     * @param $save
     */
    private function _actionRemoveFiles($id, $save)
    {
        // delete and remove all files based on table name and id
        if ($save) {
            foreach (File::fetch(['table_name' => $this->tableName, 'table_id' => $id]) as $file) {
                if (fileDestroy('private/' . $file->file_name)) {
                    File::remove($file->id);
                }
            }
        }
    }

    /**
     * After removing the data
     *
     * @param $save
     */
    protected function actionRemoveAfter($save)
    {

    }

}


text:
Align Architecture
E: info@align-architecture.co.uk
Home | News | Little Sutton Primary School benefits from innovative training facility design
Little Sutton Primary School benefits from innovative training facility design
20.09.18 Architecture Education
Little Sutton Primary School required a new, visually appealing community and training facility to be used as a multi-functional space for community events. Nick Clewer, Principal Architect at Align Architecture discussed the innovative design process in detail with LABM.
Located at Worcester Lane in Sutton Coldfield, Little Sutton Primary School originally engaged Align Architecture for additional support in securing planning permission for the new facility.
The school also required creative support with designing a visually strong building and an attractive facility that would efficiently use the available space to create an additional area for training days and extra-curricular activities.
The school, which has an outstanding team of committed staff, required the additional space to continue delivering high-quality education and teaching experiences to its over 400 pupils.
The development, which is part of an ongoing programme of improvements at the school, comprises a new space for training purposes, new fenestration within the external facades and an external pergola with a decked terrace.
For the building to be multi-functional, it was crucial that the design was flexible and created with all potential uses in mind, contributing to the sustainability of the school site and educational campus as a future investment in the school's facilities.
Living up to the reputation
Little Sutton Primary School has built an enviable reputation for delivering high-quality education to its pupils – providing teaching staff with the facilities and resources needed to
"When the school engaged us to help design the modern training facility, we knew that it had to combine comfort and style – creating a proposal that would be practical for learning as well as visually appealing.
"As a company, we are committed to delivering projects that enhance the environment, while having minimal impact on its resources, and we were able to design a building using materials that would provide a high sustainable rating.
"What we proposed was a contemporary, bespoke design solution for a multi-purpose building that could assist with the school's ongoing activities – ideal for both teacher training days and shared children's activities.
"The training facility has been designed to help create a stronger sense of place and improve the relationship of the existing structures within their surroundings, and I'm certain that the school will benefit from the additional space that the development provides."
Rachel Davis, Headteacher at Little Sutton Primary School, commented: "It was important that the design made the most out of the available space within the existing courtyard curtilage of the school, while providing an attractive, practical, and thoughtful design, meeting the high-quality education standards of Little Sutton School."
"Given Align Architecture's experience helping other schools with similar projects, we felt assured that Nick and the team would deliver a thoughtful design that was both efficient and practical.
"We were very impressed with the proposal, which was both sustainable and visually appealing – the perfect combination for our school which prides itself on providing high-quality education and experiences for pupils.
"We're looking forward to seeing the design be brought to life and giving teachers and pupils the facility needed to enhance education at the school."
"All involved are looking forward to the completion of the scheme, providing teachers, pupils and the community with the facility, encouraging the enhancement of the school."
Educational excellence – Align Architecture designs classroom extension for Moor Hall Primary School
Align Architecture joins the prestigious Structural Timber Association Membership
Align Architecture assists Marston Green Infant Academy with school extension
Align Life (4)
There's nothing we like more than to talk design, architecture and buildings, so please get in touch and let's discuss your next project.
16 Regent Place
B1 3NJ
Our work on Pom's Kitchen gave us the chance to design and the opportunity to re-invigorate a vacant former restaur… https://t.co/1CpcboENBh

redpajama_set_name: RedPajamaCommonCrawl


text:
Home » Automotive » REE to Showcase Concept EV and AV Platform in Tokyo
REE to Showcase Concept EV and AV Platform in Tokyo
By The Brake Report October 17, 2019 Updated: October 17, 2019 No Comments2 Mins Read
Source: REE
TOKYO — REE announced that its ultra-modular, advanced, corner module for electric and autonomous vehicles (EVs and AVs) will be displayed alongside a global OEM partner at the 46th Tokyo Motor Show, October 24-November 4. Details of the OEM partnership will be revealed on October 23, the first press day of the event. Visitors at this year's exhibition will see product demos of REE's corner module technology that is poised to upend automotive manufacturing.
REE brings unmatched modularity and efficiency to the electric-mobility landscape. The company has redesigned all drive vehicle components typically found on the chassis, including the motor, steering, suspension, drivetrain, data unit for AI preventative maintenance, brake, thermal systems, and electronics, and engineered them into a compact area of the wheel arches – known as corner modules.
REE's corner-module technology not only brings greater efficiency to the mobility of people and goods, but it will enable mobility players to provide advanced services never before possible, reshaping the future of e-mobility. REE's modular technology is designed from its core to support the diverse range of shapes, services and requirements the new e-mobility world brings.
"This exciting OEM collaboration is a major milestone for REE, we both share the goal to bring a more modular, innovative and efficient EV and AV solutions," said Daniel Barel, Co-Founder and CEO of REE. "Through our onsite display at the Tokyo Motor Show with this strategic OEM partner, we'll showcase the first real-world integration of our technology and provide visitors with deep understanding of what we believe to be the new standard for all EV development."
The super-efficient space allowed by REE's technology not only enables newfound vehicle design and configuration freedoms, it also allows for more batteries, safety technology, and storage to be integrated seamlessly. The reduction in weight means lower running costs and reduced environmental footprint. And because the technology is modular, maintenance is simplified and fast. REE's solution works with any electric vehicle to bring new driving value and efficiency as well as reduced vehicle development and maintenance costs to OEMs and drivers alike.
The press release can be read by clicking on this sentence.


text:
IP partner Sahira Khwaja comments on Sky v Skykick AG Opinion
United Kingdom October 21 2019
LONDON, 17 October 2019 - Sahira Khwaja, partner at Hogan Lovells, said: "In a thorough and thoughtful opinion, Advocate General Tanchev has agreed that a trade mark cannot be declared "invalid" solely because the terms used in its specification are insufficiently clear and precise. However, AG Tanchev also said that "computer software" is too broad and variable a term to be included in a mark's specification and still be compatible with the trade mark acting as an indicator of origin. As such, registration of a mark for "computer software" without any qualification was "unjustified and contrary to the public interest".
"The remaining questions referred to the CJEU concerned whether applying for a mark without any intention to use it amounted to "bad faith", and if so what effect that should have. The AG concluded that, in certain circumstances, applying to register a mark without any intention to use it for the specified goods or services might constitute an element of bad faith, particularly if it is done with the sole object of preventing a third party from entering the market."
"If the CJEU follows the AG's Opinion then holders of registrations for "computer software" will be faced with an immediate problem in determining the scope of trade mark protection afforded by those registrations. This means the scope of protection may end up being narrower than had been previously thought. Companies may need to review their brand portfolios and brand protection strategies, and make any necessary adjustments."
Hogan Lovells - Sahira Khwaja
Read all about it - agency worker had right to be informed about vacancies, not to apply for them *
Ten CIL lessons 2020 *
The effect of the Brexit Deal on data protection *
Powering our Net Zero Future - What does the Energy White Paper have in store? *
Important changes to DAC6 regime in the UK: impact on bank lending transactions *
Ting Sim
Shell Eastern Petroleum
"I would like to thank the SCCA for this excellent service! The articles included in the newsfeeds are very useful and informative, and the user-friendly format of the newsfeeds means I can quickly glance over the précis in the emails to choose what to zoom in on."


text:
Dublin, CA | Sorrento Homes for Sale
Sorrento is a master planned community located in East Dublin. It was built in 2 phases. The first phase was built by Toll Brothers between 2007 and 2012, and includes detached homes, townhomes, and one story condos.
Varese features detached homes ranging in size from 2100 sq ft to 3000 sq ft, on 3000 to 4000 sq ft lots with alley-access 2 car garages.
Trevi features townhomes ranging from 1300 sq ft to 2400 sq ft, with both 2 & 3 car garages.
Amalfi features condos ranging from 1800 sq ft to 3000 sq ft, with 2, 3, and 4 car garages.
Sorrento East was the second phase, built by several builders featuring single family homes, as well as townhouse style condos.
Lucca by Taylor Morrison was built between 2014 and 2015. These detached homes range between 2100 sq ft to over 3000 sq ft, with 2 car alley-access garages and lots in the 3000 sq ft range.
Piazza by Standard Pacific was built between 2012 and 2014. These detached homes range in size from 1966 to 2783 sq ft on lots that are 2500 sq ft.
Arrivare by DR Horton was built between 2012 and 2013, and these detached homes range from 1600 sq ft to 2100 sq ft.
Castello by Standard Pacific was built between 2012 and 2013, and these detached homes range from 2170 sq ft to over 2700 sq ft. Lots range between 3000 and 4000 sq ft.
La Solera by Taylor Morrison was built between 2012 and 2014 and features a gated community with two story detached homes that range from 2337 sq ft to 3156 sq ft.
Revelo by Shea Homes was built between 2014 and 2015. They feature one story flats and two story townhouse style condos that range in size from 1320 sq ft to 2133 sq ft.
Homes for Sale in Dublin, CA
Sorrento School Information:
Elementary School: Kolb Elementary
Middle School: Fallon Middle School
High School: Dublin High School
See Current Real Estate Listings in Dublin, CA
Which Neighborhoods in Dublin Are You Interested In?
Briar Hills
California Creekside
Dublin Greene
Dublin Hills Estates
Emerald Vista
San Ramon Village
Silvergate
Tassajara Meadows
Bordeaux Estates
Dublin Ranch
Foothill Estates
Jordan Ranch
Wallis Ranch
Hansen Hill
Schaefer Ranch
Tassajara Hills
Sorrento is a neighborhood located in Dublin, CA. If you would like additional information on real estate in Dublin and homes for sale in Sorrento, complete the contact form above, or call me, at (925) 997-7653
Note: The information about Sorrento and Dublin, CA is believed to be reliable. However, it is not guaranteed. The information is subject to change and should be verified by the user. School information should be verified with the appropriate school district to ensure accuracy. At Fine Valley Homes, we do our best to double check our information, so if you do find inaccurate information, feel free to reach out to us so we can make the website a reliable source for everyone.


text:
How To Grow Kale
Kale, also known as borecole, is one of the healthiest vegetables on the planet. A leafy green, kale is available in curly, ornamental, or dinosaur varieties. It belongs to the Brassica family that includes cruciferous...
How To Grow Flax
Flax seeds are everywhere and used in many health-conscious recipes, but the microgreen version also nutritionally packed. Full of vitamins, iron, potassium, essential amino acids, antioxidants, and protein, it's no wonder why it's such a...
How To Grow Cilantro
One of the most widely used and loved herbs and spices in the world are derived from the same plant, Coriandrum sativum. The leaves of this plant are frequently referred to as cilantro, while the...
How To Grow Dill
This annual herb grows up to a height of about 3 feet and has feathery green leaves called dill weed, marketed in both fresh and dried forms. The distinctive flavor of fresh dill weed in...
How To Grow Chives
Chives are a very popular garnishing spice in French and Chinese cooking. Chives are used fresh or dried. The light purplish flowers of chives have a light, delicate chivelike flavor. The entire length of the...
How To Grow Chervil
hat subtle, tender flavor-part anise, part parsley-that you've been trying to identify in the fish sauce, will almost certainly turn out to be chervil, the most retiring of the sister spices that make up the...
How To Grow Cabbage Sprouts
Cabbage is one of the most ubiquitous vegetables, and it comes in many varieties—red, purple, green, and Napa cabbage (the latter of which is usually found in Chinese cooking). It's one of the oldest vegetables...
How To Grow Beet Tops
One cup of boiled beet leaves has 39 calories and no fat. When served as a side dish, this makes an excellent accompaniment to a low-fat and low-calorie meal. Medicinal and Nutritional Benefits Studies have...
The name Basil is derived from the Greek word for king or royal, a nickname and reputation it earns by being the most popular culinary herb! Its popularity spans the globe since basil proves to...
How To Grow Arugula
Arugula (Eruca vesicaria sativa) is a leafy green herb of the mustard family. Known also as rocket, Italian cress, roquette, and rucola, arugula has elongated dark green leaves that are lobed like the leaves of...


Voluntary organisations make up the largest part of civil society in financial terms, accounting for the largest share of income with £47.8bn.
Universities (£30.7bn), employee owned businesses (£30bn), and co-operatives (£23.9bn) are the other major sectors in terms of income.
Civil society organisations have an estimated combined annual expenditure of £117.9bn. The real number is likely to be much higher as for some civil society organisations, including community interest companies, co-operatives and employee owned businesses, spending data is not available.
On average, civil society organisations spend 94% of their income.


Matt Summers will be demonstrating his supreme skills in a high-tech and very powerful Vans RV8. One of the rising stars of display flying, Matt's routine include some of the most difficult but spectacular means of defying gravity.
Matt's RV8 incorporates all the latest technology, a fearsomely expensive performance propeller and reinforced wings in order to cope with all the G forces. In Matt's hands the aircraft has won many air races and, you might imagine, is the product of a state of the art factory. In fact it was hand built from a kit in a garage. Thanks to the wonderful people at the Light Aircraft Association, despite being hand built it was checked every step of the way by experts and is every bit as well put together as aircraft put together in a boring factory.


text:
The 10th Anniversary Edition of ESPN's Body Issue Is Its Queerest (and Sexiest) Ever
Written by Alexander Kacala on June 26, 2018
This post is also available in: ไทย
The images from the 10th anniversary issue of ESPN Magazine's Body Issue dropped earlier this week and as usual, they're pretty incredible. But what's even more exciting is that ESPN Magazine has given us nude portraits featuring three beautiful queer people, including one on the cover, making it the most queer-inclusive Body Issue ever.
The LGBTQ athletes who stripped down for this anniversary issue include gay Olympic figure skater Adam Rippon, lesbian WNBA player Sue Bird and her partner, soccer star Megan Rapinoe. Bird and Rapinoe's print cover marks the first time a queer couple has ever graced the front of the Body Issue.
RELATED | PHOTOS: ESPN Magazine's 'Body Issue' Does A (Nude) Body Good
"It's pretty amazing to think about [being on the cover of the Body Issue], especially in the times we're in," Rapinoe, a midfielder for the Seattle Reign FC, told the magazine. "Just think of how far we've come, but also the current climate. Not only are we female athletes, but we're dating as well. It's kind of badass."
Sue Bird and her partner Megan Rapinoe.
Launched in 2008, the Body Issue's 10 limited-edition covers are ESPN's way of celebrating the athletic form. "The goal has always been for us to celebrate the athletic form — in every shape and size — and to allow people to stop and marvel at the works of art these bodies truly are," Alison Overholt, editor in chief of the magazine, said in a statement.
"I couldn't have done this [shoot] while I was in the closet," Rippon told the magazine. "I think that, with my experience of coming out, I felt so liberated in so many ways."
In the past, ESPN has showcased other LGBTQ athletes in the annual feature issue, including trans duathlete Chris Mosier in 2016.
You'l be able to pick up a copy of the Body Issue when it hits stands June 29th.
Adam Rippon ESPN NSFW
Some People Are Pissed at This Video of a Naked Hockey Player Walking Around the Office
New 'Elska' Issue Highlighting Queer Men of Seoul, South Korea, Proved to Be 'Most Difficult' Yet
David Beckham Sports Eye Makeup on the Cover of LOVE Magazine's Latest Issue


Streamlining office efficiency means using smart tools to their full potential: combining hardware and software that is fast, flexible and future-forward. Seartec is a proud distributor of Sharp products because their multifunction copiers are robust multi-taskers with an array of features to suit the requirements of any business, whether it is a small office environment or a global corporation.
Multifunction copiers have taken office productivity to the next level: scan, fax, copy and print from one space-saving device. However, that is just the beginning. Transform your marketing department with the professional finishing options available on several of the Sharp models, such as the MX-7500N and the Sharp MX-M904N. This copier can print brochures and reports in crisp full colour, then fold, trim and saddle stitch them for a sleek and polished end product. Fliers, banners, mailers and other marketing collateral can be stacked, folded, punched and stapled as you require. All at the touch of a button!
Sharp multifunction copiers are network-enabled, so that numerous individuals in an office environment can access one machine for convenience. However, this creates the risk of unauthorised individuals accessing sensitive information. Sharp machines have advanced multi-layered security features that prevent any kind of data leaks as well as keeping information safe from individuals outside the business. These robust features include secure network interface, port-based network protection and IP / MAC address filtering which restricts unauthorised access. Some copiers, such as the Sharp MX-M1204 can automatically encrypt any data stored on its hard drive. Password-controlled access and printing that requires a PIN, as well as several other document protection features all ensure that your information remains safe and confidential.
Need to archive documents for accurate record keeping? The Sharp MX-B382 has an on-board archiving system supported by an 80GB hard drive. Producing output in high volumes? The Polaris Pro MX-7500 can produce 75 copies and 65 printed pages per minute. Want a compact powerhouse that saves on space but is packed with features? The MX-C381 has an optional business card feature in order to create business card databases, a remote access interface and can be integrated with your business applications. Whatever you need from your multifunction copier, Seartec can help you to find a tailored Sharp solution.
Smart budgeting is critical for any business. Sharp copiers keep costs down through their energy-efficient design, with reduced warm-up times and ultra-low energy consumption in standby mode. Additionally, Seartec's innovative Fleet Manager software helps you to stay on top of your office activity and keep cost margins trim. Capture meter readings to plot copier output over time, giving you the information to assess and manage your office equipment needs. The software will also give you advance warning when you need to order toner, preventing over-ordering and the inconvenience of running out. And in the unlikely event of a maintenance issue, the software will notify you, so that Seartec's dedicated team of after-sales specialists can minimise down time. Contact Seartec today to find out more.
This entry was posted in News and tagged Sharp copiers.


text:
The Millfield Pub Nantwich
The Millfields pub opened in 1963, and was a "managed house", the pub was run by Norman and Sybil Danzey. The first customer was Kenny Carroll.
Later the pub was run by Peggy and Ernie Killick. There was an off-licence at the side of the pub.
Being a little distance from Nantwich town centre, it was very much a community pub. It had a family room and would even organise events like street parties.
The last manager was Brian Rowe, and then it became a tenanted pub.
The first tenants were Arthur and Bea Rigby who took over the Millfields on the 22/05/1978. till 1985. Arthur changed the layout, and the lounge became the sports bar – to accommodate two 7′ x 4′ pool tables, which were the first pool tables in Nantwich at that time. Besides the pool tables, there were darts teams, dominoes teams, and the ladies also had pool and darts teams. Arthur was the longest serving landlord at the Millfields Hotel. Arthur and Bea Rigby left on Armistice day 11/11/1985, the day that Bill Jones from the Wickstead on Mill Street died, (who was famous for a Men Only Bar).
The Millfields remained as a tenanted pub, until it closed its doors in 2014. It's still affectionately by the community who lived on that estate. The pub was demolished and flats have now been built on the site.


text:
Holme Pierrepont Nottinghamshire
Holme Pierrepont, Nottinghamshire
Click on the map for other historical maps of this place
In 1870-72, John Marius Wilson's Imperial Gazetteer of England and Wales described Holme Pierrepont like this:
HOLME-PIERREPONT, a parish in Bingham district, Notts; on the river Trent, 1½ mile SW of Ratcliffe r. station, and 4½ E by S of Nottingham. It contains the hamlets of Holme-Lane and Adbolton, and parts of the hamlet of Lamcote and the township of Bassingfield, the last of which has a post office under Nottingham. ...
Acres, 2, 120. Real property, £4, 011. Pop. in 1851, 179; in 1861, 150. Houses, 28. The property is divided among a few. The manor belonged formerly to the Pierreponts, Dukes of Kingston; and belongs now to Earl Manvers. Holme-Pierrepont Hall, a large Gothic mansion, is the seat of Earl Manvers. The living is a rectory, united with the chapelry of Adbolton, in the diocese of Lincoln. Value, £747.* Patron, Earl Manvers. The church is ancient; was recently restored; comprises nave, chancel, and aisle, with tower and lofty spire; and includes a magnificent mortuary chapel, containing numerous monuments of the Pierreponts and the Manverses. There are three small charities.
Holme Pierrepont through time
Holme Pierrepont is now part of Rushcliffe district. Click here for graphs and data of how Rushcliffe has changed over two centuries. For statistics about Holme Pierrepont itself, go to Units and Statistics.
GB Historical GIS / University of Portsmouth, History of Holme Pierrepont, in Rushcliffe and Nottinghamshire | Map and description, A Vision of Britain through Time.
URL: http://www.visionofbritain.org.uk/place/7460
Not where you were looking for?
Click here for more detailed advice on finding places within A Vision of Britain through Time , and maybe some references to other places called " Holme Pierrepont ".
To buy historical maps of Holme Pierrepont, click here!
Some places near Holme Pierrepont :


This is Jeff Carmichael from the Univ. of North Dakota (UND).I have been teaching for about 12 years and spend most of my time with the introductory biology program.I teach most of the sections of our general bio classes and coordinate the labs.Each class typically enrolls 200 students (many of which are pre-meds).My background is in plant biology so I also teach an upper level course in plant form and function.I will also teach our senior-capstone course starting this fall.
I am especially interested in learning about effective direct assessment strategies.I have been using team-based learning (TBL) in my classes and really love it as an instructional approach.I hope to refine my TBL approaches and develop effective assessment techniques.Part of my long term goal for the Bio Scholars Program would be to increase my skills in statistics.
Outside of work, I spend as much time with my wife and son (11 yrs old) as possible.We love the outdoors (camping, biking, kayaking, etc.).I'm currently reading "Closer to the Light"- a book about near death experiences in children.Favorite recent book- Three Cups of Tea.
I have taken a team-based learning (TBL) approach in my large enrollment introductory biology classes this past year and have come to appreciate it as an effective way to promote student-student and student-professor interactions. I incorporate learning assignments for every chapter and in-class quizzes that students take individually and as teams (I use clickers to record individual quiz responses and IF-AT scratch-off forms for the team quizzes).My TBL classes are far more lively and engaging than my strictly lecture-based classes.Results from last year indicate that TBL increases student learning and performance when compared to lecture-based learning.My goal this year is to probe the effectiveness of TBL a bit deeper than I have in the past and refine my learning assignments and in-class quizzes.In particular, I'm interested in seeing what types of students benefit the most from TBL and if TBL promotes long-term understanding of fundamental concepts in biology.
I found several noteworthy points in the assigned readings.Bass (on the first page) mentions the perspective of a problem in teaching as something that we try to avoid having.Nevertheless, I personally find that I always have "problems" in teaching and will continue to for the rest of my career.After all, we all have days that we feel a bit dissatisfied with our teaching effectiveness and are always looking for ways to improve.I also find Bass' description of the inverted pyramid to be quite meaningful.I often reflect at the end of a semester and ask myself if I did indeed spend adequate time on the goals I value most.I'm not always satisfied with the answer I come up with.Benson addresses the historical background of the primary roles of educational institutions.I tend to think that we (as faculty members) are there primarily for the benefit of our students.That might mean teaching for some of us and research for others, but we should always keep the students best interest at the forefront of our efforts (that is to say, a top-notch researcher who can't teach well and isn't interested in involving students in research may not be well suited to a career as a professor).
Benson's twelve properties are a constructive way to think about the SoTL in science education.Although they all ring true, I tend to identify primarily with goal number eight (SoTL is problem centric; it seeks to understand, solve, or advance knowledge about a problem).This property seems to encompass all the other properties listed.
I predict that many of my intangible products (e.g., becoming more familiar with the literature; thinking about SoTL in a more constructive way) will be just as valuable as any tangible products that will arise over the next twelve months. However, I will be teaching two classes this fall (one via TBL and the other via traditional lecture format) and hope to end up with an article that examines the effectiveness of TBL over lecture-based classes.This article will also probe student attitudes toward TBL and learning in general.
These results will be presented at ASMCUE next summer (and possibly a workshop on TBL if the opportunity arises!).
My overall interests this year will focus on the assessment of team-based learning (TBL) in large enrollment introductory biology.I will be teaching two sections of introductory biology this fall- one with the traditional lecture based format and one with TBL.I hope to probe the effectiveness (based on a variety of measurements) of TBL versus lecture.The articles mentioned below relate to collaborative learning in general or provide good examples of different ways to assess student learning or performance.
Tessier, J.2007.Small-group peer teaching in an introductory biology classroom.Journal of College Science Teaching, 36 (4): 64-69.
The author of this study examined the effectiveness of different teaching approaches in a moderate sized (~70 students) Concepts of Biology class designed for students seeking certification as elementary school teachers (the students were not biology majors).The teaching approaches included: traditional lecture; self-taught (where students had to figure out answers on their own to questions provided by the instructor); and peer-taught (where students in small groups had to teach each other, again based on the answers they found to questions provided by the instructor).Students performed better on exam questions that focused on the self-taught and peer-taught topics than they did on lecture-based topics.The small group peer teaching also seemed to help students with lower overall final grades—their performance on the self and peer-taught topics increased more throughout the semester than did their performance on lecture-based topics.I enjoyed this paper because it demonstrates an effective approach to direct assessment of small group learning.
Cotner, S., Baepler, P., and Kellerman, A.2008.Scratch this!The IF-AT as a technique for stimulating group discussion and exposing misconceptions.Journal of College Science Teaching, 37 (4): 48-53.
I use the IF-AT forms in my classes (and love them!) and was happy to see this recent paper on their effectiveness (based on student perceptions).Although this article isn't rich in data, it does serve as a good introduction to the IF-AT forms.I encourage you to check these out as a means of promoting group discussions.These forms are a useful component of TBL.The authors of this article found that students found the IF-AT forms more useful (i.e., they remembered them more) than all other learning activities used throughout the semester.
Knight, J. and Wood, W.2005.Teaching more by lecturing less.Cell Biology Education, 4: 298-310.
Not only does this paper have a great title, it was written by one of the current bioscholars and represents a thorough examination of the effectiveness of interactive classroom techniques over the traditional lecture approach.The authors examined student performance over three semesters.The course was taught in traditional lecture format during the first semester.The subsequent two semesters incorporated more in class interactive approaches (e.g., student participation, quizzes, cooperative problem solving).The authors used pre- and posttests as part of their assessment and found that average scores in the interactive courses were significantly higher than in the lecture course.Normalized learning gains based on pre- and posttest scores (actual gain divided by possible gain expressed as a percentage) were also significantly higher in the interactive courses than in the lecture course.Clickers were used as an integral part of the interactive courses and the authors describe how student attitudes toward the use of clickers changed over the course of a semester (students tended to appreciate clickers more as the semester progressed).The authors also include a thorough discussion of some of the concerns that instructors should be aware of.Appendices include questions on the pre- and posttests as well as some of the clicker questions used in class (both of which are helpful).
Lord, T.R.2001. 101 Reasons for Using Cooperative Learning in Biology Teaching.The American Biology Teacher 63 (1): 30-38.
The author was intrigued that numerous studies have either supported or refuted cooperative learning as an effective means of instruction in high school and college (all seemed to be based on good evidence).He then perused the literature as much as possible and ultimately read over 300 articles dealing with cooperative learning.He kept track of all the positive reasons for using cooperative learning and found hundreds of outcomes supportive of collaborative learning.He combines these outcomes into eleven categories (e.g., science thinking, attitudes, instruction, practical skills, reading and writing skills) and reviews studies that address each category.He tried collaborative learning in his courses and found that indeed, students started performing better on exams than they had previously.He has become a strong advocate of collaborative learning.
Handelsman, J. et al., 2004.Scientific Teaching.Science, 304: 521-522.
This is a short policy forum published recently in Science- it is worth checking out if you haven't seen it yet.It makes the case that college instructors should teach via approaches with proven track records of effectiveness (e.g., more interactive learning and less lecturing).The authors discuss the SCALE-UP program at NC State University where students sit at tables in groups of 5-7 and discuss issues pertinent to biology.Each group has a laptop and is able to project web sites of interest to the entire class (a standard class might hold 99 students).This format focuses on discussion and analysis and places far less emphasis on memorization.We hope to implement a similar program at my institution in the near future.This article discusses how universities might promote change in the way that instructors teach and it has been a cornerstone of my approach to thinking about how to better present my courses in the future.
The strength of your project is that it has a good focus and a clear experimental design. The weakness, as we discussed in the group, is that you didn't use the quizzes in the lecture-only class. Attention to the types of questions your students are able to answer will really enhance your analysis.


text:
The Culture War and Issue Salience: An Analysis of American Sentiment on Traditional Moral Issues
Wroe, Andrew, Ashbee, Edward, Gosling, Amanda (2014) The Culture War and Issue Salience: An Analysis of American Sentiment on Traditional Moral Issues. Journal of American Studies, 48 (2). pp. 595-612. ISSN 0021-8758. E-ISSN 1469-5154. (doi:10.1017/S0021875813001989)
PDF - Publisher pdf
http://journals.cambridge.org.chain.kent.ac.uk/act...
Despite much talk of a culture war, scholars continue to argue over whether the American public is divided on cultural and social issues. Some of the most prominent work in this area, such as Fiorina's Culture War?, has rejected the idea. However, this work has in turn been criticized for focussing only on the distribution of attitudes within the American public and ignoring the possibility that the culture war may also be driven by the increasing strength with which sections of the population hold their opinions. This paper tests the strength, or saliency, hypothesis using individual-level over-time data and nonlinear regression. It finds (1) that there was a steady and significant increase in concern about traditional moral issues between the early 1980s and 2000, but (2) that the over-time increase was driven by an upward and equal shift in the importance attached to traditional moral issues by Republicans and Democrats, conservatives and liberals, evangelicals and non-evangelicals, and frequent and infrequent worshippers alike. While the first finding offers support for the saliency hypothesis and the culture war thesis, the second challenges the idea that Americans are engaged in a war over culture. Both findings enhance but also complicate our theoretical understanding of the culture war, and have important real-world consequences for American politics.
E History America
E History America > E151 United States (General)
F History United States, Canada, Latin America
J Political Science
Faculties > Social Sciences > School of Politics and International Relations
Andrew Wroe
07 Mar 2014 12:01 UTC
Wroe, Andrew:


text:
On the Salesforce Platform, you can get a Developer Edition licensed instance (which is sometimes called an org, short for organization).  This instance is completely free and never expires, meaning that you can build your applications without a risk of cost.

In order to get a Developer Edition instance, go here:

[http://developer.force.com/join ](http://developer.force.com/join)

## Creating a Connected App Definition on Force.com
For a third party application to communicate with Salesforce API's
securely, they must have a Connected App definition.  This will give
the app the keys required to identify itself  and allow a Salesforce
admin to control it:

1. Log into your Developer Edition Org.
2. Open the Setup menu by clicking [Your Name] > Setup.
3. Create a new Connected App by going to App Setup > Create > Apps.
4. Click the 'New' button in the Connected Apps list.
5. Fill out all required fields and click 'Save':
6. Connected App: YourAppName
7. Developer Name: YourAppName
8. Contact Email: Your email
9. Callback URL: com.sample.salesforce:/oauth2Callback

You will need to hand the resulting Consumer Key and Callback URL to the Salesforce client when you initialize it.

redpajama_set_name: RedPajamaGithub


text:
Q: How to iterate through gherkin steps in scenario without browser instance restart I have case to check filtering in table but its not necessary to restart browser each field value check. How can I do that in loop without loosing test result for each field?
I have something like that:
Background:
    Given I started app and logged in
    And I go to page with table

Scenario Outline: Filter tests
    When I clear filters
    And I filter by field value equals <FieldValue>
    Then I check if all rows has <FieldValue> in table

    Examples:
    | FieldValue |
    | val1       |
    | val2       |
    | val3       |
    | val4       |

I want to repeat X times 'Scenario Outline' without app restart.
Driver initialize:
[BeforeScenario]
        public void Initialize()
        {
            Driver = _factory.Value.GetBrowser(GlobalSettings.browserType);
            var login = new Login(Driver);
            try
            {
                login.TryToLoginAgainIfUserIsNotLoggedIn(10);
            }
            catch (WebDriverTimeoutException)
            {
                Driver.WebdriverCustom.Refresh();
                login.LogIn();
            }
            _objectContainer.RegisterInstanceAs(Driver);
        }

[AfterScenario]
        public void CleanUp()
        {
            try
            {
                if (TestContext.CurrentContext.Result.Outcome.Status != ResultState.Success.Status)
                {
                    string filePath = Driver.Utils.TakeScreenshot();
                    TestContext.AddTestAttachment(filePath);
                    CloseAndQuit();
                }
                else
                {
                    CloseAndQuit();
                }
            }
            catch (Exception)
            {
                string filePath = Driver.Utils.TakeScreenshot();
                TestContext.AddTestAttachment(filePath);
                CloseAndQuit();
            }
        }

A: Tag your scenario with something appropriate and repeatable to track it doesn't use a new browser each iteration.
@SingleBrowserInstance
Scenario Outline: Filter tests
    When I clear filters
    And I filter by field value equals <FieldValue>
    Then I check if all rows has <FieldValue> in table

    Examples:
    | FieldValue |
    | val1       |
 ...etc

For your generic catch-all [before], add a constructor to the class to pull through the scenario context object then filter out this new tag. This saves you adding tags to all your other tests to compensate for this new approach.
[Binding]
    public class WhateverYourHooksClassIsCalled
    {
        ScenarioContext _scenarioContext;
        public WhateverYourHooksClassIsCalled(ScenarioContext scenarioContext)
        {
            _scenarioContext = scenarioContext;
        }

        // This is your existing before scneario
        [BeforeScenario]
        public void Initialize()
        {
            if(_scenarioContext.ScenarioInfo.Tags.Contains("SingleBrowserInstance"))
                return; // we don't want it to run...

            // etc...  rest of your init.
        }
}

Create another couple of hooks just for this tag:
//note this is before/after FEATURE
[BeforeFeature("SingleBrowserInstance")]
public void CleanUpSingleBrowser()
    {
        //initialise your browser.
        // As you filter it out in the before scenario you'll need to
        // refactor the original init into a reusable component (ask if you want help)
    }

[AfterFeature("SingleBrowserInstance")]
public void CleanUpSingleBrowser()
    {
        CleanUp();
    }
]

Most of the information you need is here.
Final comment is to expect that each row of your table can impact the others. A single browser instance means that application state will now persist between tests. These tests are no longer isolated. Changing the order of the data, adding and removing data table rows can alter the overall result. Granted it's unlikely but it's something to be aware of.

redpajama_set_name: RedPajamaStackExchange


His previous role on Broadway was in the 2011 revival of "The Normal Heart."
Theater fans were ecstatic when it was announced that the National Theatre production of Angels in America would be making the transfer to Broadway next year, but it was bittersweet when it was revealed that Russell Tovey would not be joining his other famous co-stars like Andrew Garfield and Nathan Lane when the show hops the pond.
Today it was announced that Lee Pace would be replacing Tovey as closeted mormon Joe Pitt. Pace is most known for his roles on TV series like Pushing Daisies and Halt and Catch Fire, and in the series of The Hobbit movies and Guardians of the Galaxy.
He made his Broadway debut in the 2011 revival of The Normal Heart, playing the role of Bruce Niles.
Performances of Angels in America will begin February 23 for a limited 18-week engagement at the Neil Simon Theater with opening night scheduled for Wednesday, March 21.


On Sunday 6th May 2012 the Freesia Group held its 8th Annual Fun Run on the Salou sea front. Some 650 runners participated in the 10 km, 4km races and a short run for the little ones. It was a great morning out and almost 8,000 euros was raised.
A huge thanks to all the volunteers and donors for their help again – well done!
"A group of like minded people of all nationalities interested in raising money for cancer charities in Spain". Everyone who wishes to support the group's aims is welcome to join and participate in all activities.
The committee, which is elected annually, consists of a minimum of 5 members and not more than 7 who will meet on a monthly basis to discuss ideas and events and fine tune any points raised at monthly general meetings or arising in between.
Where possible a vice president and a publicity/ marketing person (spokesperson) plus other members who are at all times accountable to Freesia Group as a whole.
Committee members will ideally serve in any of the above positions for no more than three consecutive years. However, if there are insufficient (suitable) new members to fill the committee vacancies at the AGM this may be waived (2). The committee may co-opt extra people to serve as and when needed, those persons then have the option to be voted in, or alternatively stand-down at the next AGM. To maintain continuity ideally up to a third of existing committee members should be re-elected at the AGM.
President/Chairperson – Chair the meetings and be the first point of contact and spokesperson for the group whenever possible.
Secretary – Take notes at each meeting and feedback written information, keep an up-to-date list of all interested parties, their names addresses, tel. nos. etc. Co-ordinate minutes of meetings and circulate to committee and other interested parties. Co-ordinate Freesia Group literature/information/circulars and letters, including website, etc.
Treasurer – Check, control and bank incoming funds, facilitate money float when necessary for events, keep a legible record of all monies incoming and outgoing. Liaise with bank/Gestoria and facilitate all necessary information as required. Communicate all of the above with the chairperson/vice-chairperson – both signatures always necessary for withdrawing money/transfers.
Vice President – Chair the meetings and be first point of contact in absence of Chairperson (this position can be held by any other committee member).
SHARING AND BECOMING INVOLVED IN other necessary tasks arising from meetings – standing in for the above 5 members when necessary, continually trying to find new interested parties and ideas and maintain contact with existing "members" on a regular basis. Committee members are expected to attend all committee meetings. Missing more than two consecutive meetings will be deemed as resignation from the committee (unless extenuating circumstances prevail).
Committee resignations for other reasons – to be given in writing to any other committee member, to be presented at the following committee meeting.
General meeting – to which all members are welcome, to be held on a monthly basis (usually the first Wednesday of the month – except on holiday days). All suggestions and proposals raised at a general meeting will be discussed in committee, voted on and the results reported to the following general meeting.
Annual General Meeting (AGM). Elect or re-elect committee members, etc. Existing members should make it known at the previous general meeting if they wish to stand again, and other members should make it known if they wish to stand and give genuine reasons as to why they feel they should be voted in.
AGM decides how money raised during the following 12 months will be allocated – currently it is divided 50/50 between the Tarragona branch of AECC (Asociación Española Contra el Cáncer) and CNIO (Centro Nacional de Investigaciones Oncológicas) in Madrid, these amounts are passed over during the months of July and December.
Proposed and accepted March 2008 that an amount to be decided by the committee would be given to the Tarragona branch of AFANOC (Childrens cancer association).
Should the group dissolve at any time, the existing assets shall be divided between the agreed charities.
5. Extra-ordinary meeting – can be conveened by president or min. 35% existing committee.
Freesia Group Membership – it is necessary for our registration as a non-profit making organisation that all members be registered as actual members of the Freesia Group. It is proposed that all members fill in the attached form, with necessary details and that the annual membership fee be paid. This fee is held in reserve to pay any surplus of administration fees not covered by our gestoria. Annual membership is payable at the AGM, or the following month.
All committee members can receive monies from other members of the group or from donations, these monies must be banked in the designated bank account as soon as possible. No member of the committee must hold more than 100 Euros of Freesia Group money at any time – the one exception may be the treasurer with agreement from the president.
Any new sub-group can only be formed with the full approval of the Central Freesia Group committee and by a member who has served on the Central Freesia Group committee for a minimum of 1 year. The voting in of new members is to be done at the newly formed branch AGM in September of each year, after the branch has been functioning for 1 year (Sept to Sept) future members can be voted in from the general membership of this branch, the confirmation of these new members is subject to ratification from the main committee. (Central Freesia Group).
All general constitution rules apply to the branch group.
Any problems arising within the group should be dealt with at local level at a members meeting and local committee meeting, if this is not resolvable it should be brought to the attention of the Central Freesia Committee to aid with a solution.
As with the Freesia Group committee, the key posts of President/Chairperson, Secretary and Treasurer can only be held by a person who has served on the committee for 1 year or more. The exception would be the first year of formation when there may be insufficient members having served on the Central Freesia Committee.
A Freesia Branch group committee member MUST attend the Central Freesia group meetings once every quarter.
A member of the Freesia Group central committee must attend the sub-group meetings once every quarter.


Js! offers comfortable, safe, and friendly lodging. Located in Greeley, enjoy close access to Garden City just 3 miles away. Each of the four private rooms has keyed entry and shared use of a central commons area with full kitchen. This room has a queen bed, small fridge, table and 2 chairs. Measures appx 15x9.5.


Some motivation required for you to exercise Funny desktop wallpaper, Exercise wallpaper, Funny wallpaper - Funny no. 49629. Download this Some motivation required for you to exercise Exercise desktop wallpaper in multiple resolutions for free.


text:
require 'rubygems'
require "bundler"
Bundler.setup
ENV['RAILS_ENV'] ||= 'test'

$:.unshift(File.dirname(__FILE__) + '/../lib')
require 'nagios'

require 'nagios_support'

def Nagios.rails_root
  File.join(File.dirname(__FILE__), %w{ .. })
end


text:
Q: CustomAction: UrlAction to open link in a new window I have added a menu item to the Personal Actions menu by creating a CustomAction like so:
<CustomAction
    Id="myCustomAction"
    GroupId="PersonalActions"
    Location="Microsoft.SharePoint.StandardMenu"
    Sequence="1000"
    Title="My Link"
    Description="This is my custom link."
>
    <UrlAction Url="http://www.example.com/" />
</CustomAction>

I want that URL to open in a new window. I have tried this in the UrlAction,
<UrlAction Url="javascript:window.open('http://www.example.com/', '_blank');" />

but it causes the first window's content to be replaced with the text "[object]". Is there a better way to do this?
EDIT: When I run it with Firebug open, the behavior is slightly different. The first window's URL changed to "javascript:window.open('http://www.example.com/', '_blank');" and its content changed to "[object Window]".

A: It should work:
<UrlAction Url="javascript:void(window.open('http://www.google.com','_blank'))"/>

A: Here is an excerpt from the msdn page that seems to achieve what you are looking to do
 <CommandUIHandler Command="{4E2F5DC0-FE2C-4466-BB2D-3ED0D1917763}" CommandAction="javascript:window.open('http://www.bing.com/search?q='.concat(escape(document.title)))" />

And this is the link to where I found it
http://msdn.microsoft.com/en-us/library/hh500259(v=office.14).aspx#odc_sp14_ta_AddCustomActiontoDisplay_CustomActionElements
Hope its what you need


Sen. Al Franken's (D-MN) tribute to David Letterman will be cut from Monday night's PBS special honoring the longtime comedian, according to a PBS spokesperson, who said including Franken would be a distraction in the wake of sexual misconduct allegations against the senator.
The PBS special was recorded in October and will feature a variety of A-list comedians, like Jimmy Kimmel, Bill Murray, Amy Schumer and Martin Short. The show will be broadcast Monday night at 8 p.m EST, without Franken, who was a comedian before he became a senator.
Two women have come forward with different allegations of sexual misconduct by Franken. Last week, LA radio host Leeann Tweeden accused Franken of "aggressively" kissing her and groping her while she was sleeping back in 2006 when the two were performing in a USO tour together. She published a photo with her account of the accusations, which appears to show Franken grabbing toward her chest. Franken apologized in two separate statements and asked for the Senate Ethics Committee to probe the incident.
A second woman came forward on Monday, telling CNN that Franken allegedly grabbed her rear while the two posed for a photo together at the Minnesota State Fair in 2010. In a statement, Franken — who has been outspoken about combatting violence and harassment against women as a senator — said he was sorry the woman, Lindsay Menz, felt "disrespected" by their encounter, but said he didn't remember taking the photo.


The +1 832 226 area code numbers are located in Dickinson, Texas. This serviced is provided by Gte-sw DBA Verizon Sw Inc.-tx for Landline phone numbers. Retrieve caller information for 832226, we offer a full reverse phone number report for (832) 226 numbers in Texas.
Reverse Phone Number information for 1-832-226 numbers!
Dickinson may refer to: Contents. 1 People; 2 Place names; 3 Education; 4 Other uses; 5 See also. People. Dickinson (name). Place names.


text:
package org.keycloak.storage.ldap.mappers;

import org.jboss.logging.Logger;
import org.keycloak.models.UserModel;
import org.keycloak.models.utils.UserModelDelegate;
import org.keycloak.storage.ldap.LDAPStorageProvider;
import org.keycloak.storage.ldap.idm.model.LDAPObject;

/**
 * @author Marek Posolda
 */
public abstract class TxAwareLDAPUserModelDelegate extends UserModelDelegate {

    public static final Logger logger = Logger.getLogger(TxAwareLDAPUserModelDelegate.class);

    protected LDAPStorageProvider provider;
    protected LDAPObject ldapUser;

    public TxAwareLDAPUserModelDelegate(UserModel delegate, LDAPStorageProvider provider, LDAPObject ldapUser) {
        super(delegate);
        this.provider = provider;
        this.ldapUser = ldapUser;
    }

    protected void ensureTransactionStarted() {
        LDAPTransaction transaction = provider.getUserManager().getTransaction(getId());
        if (transaction.state == LDAPTransaction.TransactionState.NOT_STARTED) {
            if (logger.isTraceEnabled()) {
                logger.trace("Starting and enlisting transaction for object " + ldapUser.getDn().toString());
            }

            this.provider.getSession().getTransactionManager().enlistAfterCompletion(transaction);
        }
    }

}


text:
The Lux Company's Soap Marketing Project
Topic: Business Words: 592 Pages: 3 Updated: Oct 1, 2021
Organization Introduction
Current Target market
The LUX Company is a major global player in the field of cosmetics and beauty soap products. It was originally established in 2001 and is based at Dubai, United Arab Emirates. The company started as a small company, but has now grown to become one of the world's renowned companies. It has many branches all over the world. For instance, more than 100 countries across the world enjoy the LUX Company products. It is registered as a trading company, an agent, and a distributor or wholesaler. The company is one of the best performing cosmetic, fragrance, and beauty products companies in the world. It also offers a wide array of products, which include energy drinks, soft drinks, confectionery items, and snack items among others. The LUX Company has many subsidiaries, which keep monitoring its marketing and distribution activities of its range of products. It employs marketing strategies in its operations in order to gain a competitive advantage. The company aims at delivering appropriate results to customers profitably.
Both macro and micro factors affect any business environment. The macro environmental factors include political, economic, social, and technological factors (Pillai & Bagavathi, 2009). As for the political factors, the LUX Company has to comply with the rules and laws governing businesses in the UAE. Failure to do this will result in huge fines or bad market reputation. The economic factor is determined by the purchasing power of customers both locally, nationally and internationally (Ferrell & Hartline, 2011). It is clear that most of the LUX products come after the target communities meet their basic needs. Therefore, the Lux soap of the company may not do well if the marketers target the low and middle income earners. Social and cultural factors could also restrict marketing of the Lux soap. In addition, the LUX Company will need to invest intensively in IT in order to improve its R&D practices and increase its sales, profits and revenues.
The micro factors include the internal environmental forces (Pride, 2011). In the case of the LUX Company, the internal forces include the employees, machinery, capital, and distribution agencies, among others. The top corporate management of the LUX Company needs to arrange strategies to tackle challenges resulting from the aforementioned forces. This can help the company introduce the Lux soap in the market successfully.
In order to meet the customers' needs and preferences, the LUX Company employs market segmentation strategies. These include psychographic, geographic, demographic and behavioral segmentation strategies (McDonald & Dunbar, 2012). Geographically, the marketers of the LUX Company need to make sure that the potential customers in different places access the Lux soap at any time. Demographically, the company needs to segment the market for its Lux soap, basing on age, life-cycle stage, income, and social class. In reference to psychographic segmentation, the company needs to group its target audience basing on their lifestyle, personality, and values. As for the behavioral segmentation, the marketers need to observe keenly how people perceive the new Lux soap. This will enable them to employ the best tactics to convince customers to try the product.
Women aged between 16 and 60 years are the primary target audience for this product (Lux soap). According to researchers, the urban and sub-urban middle class are the largest part of the UAE. These classes take the highest population in the country. These people are more likely to demand the Lux soap, which is affordable and has good quality. Therefore, the LUX Company will target this audience for its product.
Ferrell, O. C., & Hartline, M. D. (2011). Marketing strategy. Australia: South-Western Cengage Learning.
McDonald, M., & Dunbar, I. (2012). Market segmentation: How to do it and how to profit from it. Chichester: John Wiley & Sons.
In only 3 hours we'll deliver a custom The Lux Company's Soap Marketing Project essay written 100% from scratch
Pillai, R. S. N., & Bagavathi, D. (2009). Modern marketing: Principles and practices. New Delhi: S Chand.
Pride, W. M. (2011). Marketing principles. South Melbourne, Vic: Cengage Learning.
Hardy Candy Shop Marketing Plan
Marketing Mix Concept
StudyKraken. (2021, October 1). The Lux Company's Soap Marketing Project. Retrieved from https://studykraken.com/the-lux-companys-soap-marketing-project/
StudyKraken. (2021, October 1). The Lux Company's Soap Marketing Project. https://studykraken.com/the-lux-companys-soap-marketing-project/
"The Lux Company's Soap Marketing Project." StudyKraken, 1 Oct. 2021, studykraken.com/the-lux-companys-soap-marketing-project/.
1. StudyKraken. "The Lux Company's Soap Marketing Project." October 1, 2021. https://studykraken.com/the-lux-companys-soap-marketing-project/.
StudyKraken. "The Lux Company's Soap Marketing Project." October 1, 2021. https://studykraken.com/the-lux-companys-soap-marketing-project/.
StudyKraken. 2021. "The Lux Company's Soap Marketing Project." October 1, 2021. https://studykraken.com/the-lux-companys-soap-marketing-project/.
StudyKraken. (2021) 'The Lux Company's Soap Marketing Project'. 1 October.
Functional vs. Project Manager and Coordination
Distribution Networks in Supply Chain
Defining Strategic Processes in Organizations
International Business: Corporate Social Responsibility
IBM, Dell and McDonald's: Organizational Behavior
Monster Energy Product's Marketing Mix
Uwear & Paledenim's Code of Conduct Policies
Google Company: Performance Management Systems
Blackberry Company's Strategic Marketing
Construction Company's Leadership Style: Fiedler's Theory


text:
Group calls on city to expropriate lands for affordable housing proposal
Joshua Freeman, CP24.com
Published Wednesday, July 3, 2019 12:21PM EDT
Last Updated Wednesday, July 3, 2019 1:21PM EDT
A coalition of anti-poverty activists has put forward a proposal that calls on the city to expropriate privately held vacant lands in order to build affordable housing units in a downtown neighbourhood.
The proposal unveiled Wednesday by The Ontario Coalition Against Poverty (OCAP) and Open Architecture Collaborative Toronto (OACTo), calls on the city to purchase a series of seven adjacent properties at 214-230 Sherbourne Street in the City's Garden District.
The proposal envisions a 22-storey building with 150 to 260 units of publicly-owned, rent-geared-to-income units to house poor and homeless people, with onsite meal and health services.
According to its proponents, the proposal is a reaction to a "deadly" housing crisis in Toronto, where vacancies are low, rents are high and most new developments are for private condos.
"The significance of the development proposal that we're launching today is that it will radically transform Dundas and Sherbourne into a vibrant community, but for the benefit of its most marginalized residents rather than at their expense," said OCAP organizer Yogi Acharya.
The buildings were listed for sale in 2018, but were taken off the market. OCAP claims that the owners delisted the property in response to interest from the city, choosing to hold out for a better offer from developers.
OCAP has been targeting the property for expropriation for years, charging that the vacant properties on Sherbourne "taunt the homeless while tempting property speculators" in the midst of a housing crisis.
The owners of the property did not immediately respond to a request for comment through their lawyers.
To make their point, the group dumped dirt at the door of Mayor John Tory's office at city hall last month.
#OCAP is calling for the property at 214-230 Sherbourne Street be taken over by the City and turned into #socialhousing. A mass OCAP delegation brought a wheelbarrow full of earth the the Mayor's office to drive home the demand. pic.twitter.com/MmgiulmEQk
— John Clarke (@JohnOCAP) June 15, 2019
Responding to the demand for expropriation, Tory told reporters that expropriation constitutes a "great power" that the city has at its disposal and cannot be used lightly.
"This will have to go through an orderly process, "Tory said. "I'm sure someone will look at the Sherbourne Street site as one possibility in that regard."
He noted that the city has already set aside 11 of its own properties for conversion to affordable housing and said a staff report expected this coming fall is expected to identify other possible sites where the city could build affordable housing.
As OCAP announced the proposal for the Sherbourne site Wednesday, Tory tweeted that the city's planning and housing committee will approve a plan to fund an additional 3,200 housing subsidies.
The subsidies provide a fixed-amount housing benefit to eligible households, usually those in the private rental market, to bridge the gap between income and rent. More than 5,400 households in the city already receive the allowances. The new subsidies will be funded through a $159.8 million partnership with the federal and provincial governments.
A model for a possible affordable housing building on Sherbourne Street is unveiled by the Ontario Coalition Against Poverty (OCAP) and Open Architecture Collaborative Toronto Wednesaday July 3, 2019.
A vacant lot on Sherbourne Street near Dundas Street is pictured. The lot is part of a parcel of land that anti-poverty activists would like to see expropriated in order to build affordable housing. (Brandon Rowe /CTV News Toronto)