Selects one of the 16 units using various shapes.

@param  integer $rank2 Column index
@access protected
@return void
975912
protected function row0($rank2)
    {
        if ($rank2 == 0) {
            $this->row9(0);
            $p = new Primitive\Polygon();
            $p
                ->point(0, 0)
                ->point(self::SIZE / 4, 0)
                ->point(self::SIZE, self::SIZE)
                ->point(0, self::SIZE / 4)
                ->color($this->bg());

            $this->add($p);
        }
        if ($rank2 == 1) {
            $this->row9(1);
            $p = new Primitive\Polygon();
            $p
                ->point(self::SIZE * (3/4), 0)
                ->point(self::SIZE, 0)
                ->point(self::SIZE, self::SIZE / 4)
                ->point(0, self::SIZE)
                ->color($this->bg());

            $this->add($p);
        }
        if ($rank2 == 2) {
            $this->row9(2);
            $p = new Primitive\Polygon();
            $p
                ->point(0, 0)
                ->point(self::SIZE, self::SIZE * (3/4))
                ->point(self::SIZE, self::SIZE)
                ->point(self::SIZE * (3/4), self::SIZE)
                ->color($this->bg());

            $this->add($p);
        }
        if ($rank2 == 3) {
            $this->row9(3);
            $p = new Primitive\Polygon();
            $p
                ->point(0, self::SIZE * (3/4))
                ->point(self::SIZE, 0)
                ->point(self::SIZE / 4, self::SIZE)
                ->point(0, self::SIZE)
                ->color($this->bg());

            $this->add($p);
        }
        if ($rank2 == 4) {
            $this->row9(8);
            $p = new Primitive\Polygon();
            $p
                ->point(0, 0)
                ->point(self::SIZE / 4, 0)
                ->point(self::SIZE, self::SIZE)
                ->point(0, self::SIZE / 4)
                ->color($this->fg());

            $this->add($p);
        }
        if ($rank2 == 5) {
            $this->row9(9);
            $p = new Primitive\Polygon();
            $p
                ->point(self::SIZE * (3/4), 0)
                ->point(self::SIZE, 0)
                ->point(self::SIZE, self::SIZE / 4)
                ->point(0, self::SIZE)
                ->color($this->fg());

            $this->add($p);
        }
        if ($rank2 == 6) {
            $this->row9(10);
            $p = new Primitive\Polygon();
            $p
                ->point(0, 0)
                ->point(self::SIZE, self::SIZE * (3/4))
                ->point(self::SIZE, self::SIZE)
                ->point(self::SIZE * (3/4), self::SIZE)
                ->color($this->fg());

            $this->add($p);
        }
        if ($rank2 == 7) {
            $this->row9(11);
            $p = new Primitive\Polygon();
            $p
                ->point(0, self::SIZE * (3/4))
                ->point(self::SIZE, 0)
                ->point(self::SIZE / 4, self::SIZE)
                ->point(0, self::SIZE)
                ->color($this->fg());

            $this->add($p);
        }

        if ($rank2 == 8) {
            $this->row1(8);
            $this->row2(9);
        }
        if ($rank2 == 9) {
            $this->row1(9);
            $this->row2(8);
        }
        if ($rank2 == 10) {
            $this->row1(10);
            $this->row2(9);
            $this->get(5)->color($this->bg());
            $this->get(6)->color($this->bg());
        }
        if ($rank2 == 11) {
            $this->row1(11);
            $this->row2(8);
            $this->get(5)->color($this->bg());
            $this->get(6)->color($this->bg());
        }
        if ($rank2 == 12) {
            $this->row8(11);
            $d = new Primitive\Diamond();
            $d
                ->point(self::SIZE / 2, self::SIZE / 4)
                ->point(self::SIZE * (3/4), self::SIZE / 2)
                ->point(self::SIZE / 2, self::SIZE * (3/4))
                ->point(self::SIZE / 4, self::SIZE / 2)
                ->color($this->bg());

            $this->add($d);
        }
        if ($rank2 == 13) {
            $this->row8(12);
            $d = new Primitive\Diamond();
            $d
                ->point(self::SIZE / 2, self::SIZE / 4)
                ->point(self::SIZE * (3/4), self::SIZE / 2)
                ->point(self::SIZE / 2, self::SIZE * (3/4))
                ->point(self::SIZE / 4, self::SIZE / 2)
                ->color($this->bg());

            $this->add($d);
        }
        if ($rank2 == 14) {
            $this->row8(13);
            $d = new Primitive\Diamond();
            $d
                ->point(self::SIZE / 2, self::SIZE / 4)
                ->point(self::SIZE * (3/4), self::SIZE / 2)
                ->point(self::SIZE / 2, self::SIZE * (3/4))
                ->point(self::SIZE / 4, self::SIZE / 2)
                ->color($this->bg());

            $this->add($d);
        }
        if ($rank2 == 15) {
            $this->row8(14);
            $d = new Primitive\Diamond();
            $d
                ->point(self::SIZE / 2, self::SIZE / 4)
                ->point(self::SIZE * (3/4), self::SIZE / 2)
                ->point(self::SIZE / 2, self::SIZE * (3/4))
                ->point(self::SIZE / 4, self::SIZE / 2)
                ->color($this->bg());

            $this->add($d);
        }
    }
741384
public function select($columns = '*')
    {
        settype($columns, 'array');

        $this->columns = array_unique(array_merge($this->columns, $columns));
        return $this;
    }
561147
protected function select()
    {
        $colNames = array_keys($this->_cols);
        $colValues = DbTable::select(
            $this->db, $this->_tableName, $colNames, $this->id
        );

        $this->_cols = [];
        foreach ($colNames as $colName) {
            $this->_cols[$colName] = $colValues[$colName];
        }

        return $this->_cols["id"];
    }
346273
public function row7($rank2)
    {
        // Circle inside other TOP
        if ($rank2 == 0) {
            $this->row4(8);
            $c = new Primitive\Ellipse(self::SIZE / 2, self::SIZE / 4);
            $c->radius(self::SIZE / 4)->color($this->bg());
            $this->add($c);
        }
        // Same as previous bu reversed
        if ($rank2 == 1) {
            $this->row1(1);
            $this->row7(0);
            $this->get(1)->color($this->bg());
            $this->get(2)->color($this->fg());
        }
        // Circle inside other RIGHT
        if ($rank2 == 2) {
            $this->row4(8);
            $c = new Primitive\Ellipse(self::SIZE * (3/4), self::SIZE / 2);
            $c->radius(self::SIZE / 4)->color($this->bg());
            $this->add($c);
        }
        // Same as previous but reversed
        if ($rank2 == 3) {
            $this->row1(1);
            $this->row7(2);
            $this->get(1)->color($this->bg());
            $this->get(2)->color($this->fg());
        }
        // Circle inside other BOTTOM
        if ($rank2 == 4) {
            $this->row4(8);
            $c = new Primitive\Ellipse(self::SIZE /2, self::SIZE * (3/4));
            $c->radius(self::SIZE / 4)->color($this->bg());
            $this->add($c);
        }
        // Same as previous but reversed
        if ($rank2 == 5) {
            $this->row1(1);
            $this->row7(4);
            $this->get(1)->color($this->bg());
            $this->get(2)->color($this->fg());
        }
        // Circle inside other LEFT
        if ($rank2 == 6) {
            $this->row4(8);
            $c = new Primitive\Ellipse(self::SIZE / 4, self::SIZE / 2);
            $c->radius(self::SIZE / 4)->color($this->bg());
            $this->add($c);
        }
        // Same as previous but reversed
        if ($rank2 == 7) {
            $this->row1(1);
            $this->row7(6);
            $this->get(1)->color($this->bg());
            $this->get(2)->color($this->fg());
        }
        if ($rank2 == 8) {
            // Moyen central
            $c = new Primitive\Ellipse(self::SIZE / 2, self::SIZE / 2);
            $c->radius(self::SIZE / 4)->color($this->fg());
            $this->add($c);
            //satellite TL
            $c = new Primitive\Ellipse(self::SIZE / 4, self::SIZE / 4);
            $c->radius(self::SIZE / 4)->color($this->fg());
            $this->add($c);
            //satellite TR
            $c = new Primitive\Ellipse(self::SIZE * (3/4), self::SIZE / 4);
            $c->radius(self::SIZE / 4)->color($this->fg());
            $this->add($c);
            //satellite BR
            $c = new Primitive\Ellipse(self::SIZE * (3/4), self::SIZE * (3/4));
            $c->radius(self::SIZE / 4)->color($this->fg());
            $this->add($c);
            //satellite BL
            $c = new Primitive\Ellipse(self::SIZE / 4, self::SIZE * (3/4));
            $c->radius(self::SIZE / 4)->color($this->fg());
            $this->add($c);
        }
        // same as previous but with central as negative
        if ($rank2 == 9) {
            $this->row7(8);
            $this->add($this->get(0)->color($this->bg()));
        }
        // same as 8, but satellites in negative
        if ($rank2 == 10) {
            $this->row7(8);
            $this->get(1)->color($this->bg());
            $this->get(2)->color($this->bg());
            $this->get(3)->color($this->bg());
            $this->get(4)->color($this->bg());
        }
        // Same as 8 with inside additionnal circles
        if ($rank2 == 11) {
            $this->row7(8);
            // small at center
            $c = new Primitive\Ellipse(self::SIZE / 2, self::SIZE / 2);
            $c->radius(self::SIZE / 8)->color($this->bg());
            $this->add($c);
            //satellite TL
            $c = new Primitive\Ellipse(self::SIZE / 4, self::SIZE / 4);
            $c->radius(self::SIZE / 8)->color($this->bg());
            $this->add($c);
            //satellite TR
            $c = new Primitive\Ellipse(self::SIZE * (3/4), self::SIZE / 4);
            $c->radius(self::SIZE / 8)->color($this->bg());
            $this->add($c);
            //satellite BR
            $c = new Primitive\Ellipse(self::SIZE * (3/4), self::SIZE * (3/4));
            $c->radius(self::SIZE / 8)->color($this->bg());
            $this->add($c);
            //satellite BL
            $c = new Primitive\Ellipse(self::SIZE / 4, self::SIZE * (3/4));
            $c->radius(self::SIZE / 8)->color($this->bg());
            $this->add($c);
        }
        if ($rank2 == 12) {
            $this->row4(8);
            $s = new Primitive\Rectangle();
            $s->point(0, self::SIZE / 2)->size(self::SIZE, self::SIZE / 2);
            $s->color($this->bg());
            $this->add($s);
        }
        if ($rank2 == 13) {
            $this->row4(8);
            $s = new Primitive\Rectangle();
            $s->point(0, 0)->size(self::SIZE, self::SIZE / 2);
            $s->color($this->bg());
            $this->add($s);
        }
        if ($rank2 == 14) {
            $this->row4(8);
            $s = new Primitive\Rectangle();
            $s->point(0, 0)->size(self::SIZE / 2, self::SIZE);
            $s->color($this->bg());
            $this->add($s);
        }
        if ($rank2 == 15) {
            $this->row4(8);
            $s = new Primitive\Rectangle();
            $s->point(self::SIZE / 2, 0)->size(self::SIZE / 2, self::SIZE);
            $s->color($this->bg());
            $this->add($s);
        }
    }
898713
public function rank()
    {
        $eps = pow(2.0, -52.0);
        $tol = max($this->m, $this->n) * $this->s[0] * $eps;
        $r = 0;
        for ($i = 0; $i < count($this->s); ++$i) {
            if ($this->s[$i] > $tol) {
                ++$r;
            }
        }
        return $r;
    }
331268
public function visitSelect(\Aztech\Skwal\Query\Select $query)
    {
        $assembler = new \Aztech\Skwal\Visitor\Printer\Assembler\Select();
        
        $this->appendSelectList($assembler, $query);
        $this->appendFromClause($assembler, $query);
        $this->appendWhereClauseIfNecessary($assembler, $query);
        $this->appendGroupByList($assembler, $query);
        $this->appendOrderByList($assembler, $query);
        
        $this->queryStack->push($assembler->getAssembledStatement());
    }
386591
public function select(array $array=[]) {
		// set the main action
		$this->action('SELECT');
		// for each column
		foreach($array as $function_or_index_or_column => $column) {
			// secure the column name
			list($column, $placeholder) = Query\Convert::columnToPlaceholder($this->Quote ,$column, true);
			// if the key is function_or_index_or_column
			if(is_numeric($function_or_index_or_column)) {
				// just select the column
				$this->Selects[] = $column;
			}
			// the key contains a dot, we are trying to create a alias
			elseif(stripos($function_or_index_or_column, '.') !== false) {
				// secure the column
				list($column) = Query\Convert::columnToPlaceholder($this->Quote ,$function_or_index_or_column);
				// select the column and create an alias
				$this->Selects[] = "{$column} AS {$placeholder}";
			}
			// the key is a SQL function
			else {
				// secure the function
				list($function) = Query\Convert::columnToPlaceholder($this->Quote ,$function_or_index_or_column);
				// select the column using a function
				$this->Selects[] = "{$function}({$column}) AS {$function}_{$placeholder}";
			}
		}
		// return self to the next method
		return $this;
	}
1290351
protected function shouldSelect(array $columns = ['*'])
    {
        if ($columns == ['*']) {
            $columns = [$this->related->getTable().'.*'];
        }

        return array_merge($columns, [$this->getQualifiedFirstKeyName().' as laravel_through_key']);
    }
248358
public function select($columns = [])
    {
        parent::select($columns);
        $compiler = $this->connection->getCompiler();
        return $this->connection->query($compiler->select($this->sql), $compiler->getParams());
    }
406389
public function select($columns = "")
    {
        //check if columns were passed as individual string parameters

        if (func_num_args() > 1) {
            $this->columns = $this->columnize(func_get_args());
        } else {
            //check if a simgle array of columns was passed(a hack)
            $this->columns = is_array($columns) ? $this->columnize($columns)
                : self::sanitize($columns);
        }

        return $this;
    }
1231874
public function sortOrder2(int $sortOrder, bool $descendingFlag = false): void
  {
    $this->sortDirection2 = ($descendingFlag) ? 'desc' : 'asc';
    $this->sortOrder2     = $sortOrder;
  }
763664
public function row8($rank2)
    {
        // big diamond
        if ($rank2 == 0) {
            $d = new Primitive\Diamond();
            $d
                ->point(self::SIZE / 2, 0)
                ->point(self::SIZE, self::SIZE / 2)
                ->point(self::SIZE / 2, self::SIZE)
                ->point(0, self::SIZE / 2)
                ->color($this->fg());

            $this->add($d);
        }

        // small TL
        if ($rank2 == 1) {
            $d = new Primitive\Diamond();
            $d
                ->point(self::SIZE / 4, 0)
                ->point(self::SIZE / 2, self::SIZE / 4)
                ->point(self::SIZE / 4, self::SIZE / 2)
                ->point(0, self::SIZE / 4)
                ->color($this->fg());

            $this->add($d);
        }

        // small TR
        if ($rank2 == 2) {
            $d = new Primitive\Diamond();
            $d
                ->point(self::SIZE * (3/4), 0)
                ->point(self::SIZE, self::SIZE / 4)
                ->point(self::SIZE * (3/4), self::SIZE / 2)
                ->point(self::SIZE / 2, self::SIZE / 4)
                ->color($this->fg());

            $this->add($d);
        }

        // small BR
        if ($rank2 == 3) {
            $d = new Primitive\Diamond();
            $d
                ->point(self::SIZE * (3/4), self::SIZE / 2)
                ->point(self::SIZE, self::SIZE * (3/4))
                ->point(self::SIZE * (3/4), self::SIZE)
                ->point(self::SIZE / 2, self::SIZE * (3/4))
                ->color($this->fg());

            $this->add($d);
        }

        // small BL
        if ($rank2 == 4) {
            $d = new Primitive\Diamond();
            $d
                ->point(self::SIZE / 4, self::SIZE / 2)
                ->point(self::SIZE / 2, self::SIZE * (3/4))
                ->point(self::SIZE / 4, self::SIZE)
                ->point(0, self::SIZE * (3/4))
                ->color($this->fg());

            $this->add($d);
        }

        // Small CENTER
        if ($rank2 == 5) {
            $d = new Primitive\Diamond();
            $d
                ->point(self::SIZE / 2, self::SIZE / 4)
                ->point(self::SIZE * (3/4), self::SIZE / 2)
                ->point(self::SIZE / 2, self::SIZE * (3/4))
                ->point(self::SIZE / 4, self::SIZE / 2)
                ->color($this->fg());

            $this->add($d);

            $d = new Primitive\Diamond();
            $d
                ->point(self::SIZE / 2, self::SIZE * (3/8))
                ->point(self::SIZE * (5/8), self::SIZE / 2)
                ->point(self::SIZE / 2, self::SIZE * (5/8))
                ->point(self::SIZE * (3/8), self::SIZE / 2)
                ->color($this->bg());

            $this->add($d);
        }

        // reversed small TL
        if ($rank2 == 6) {
            $this->row1(1);
            $this->row8(1);
            $this->last()->color($this->bg());
        }

        // reversed small TR
        if ($rank2 == 7) {
            $this->row1(1);
            $this->row8(2);
            $this->last()->color($this->bg());
        }

        // reversed small BR
        if ($rank2 == 8) {
            $this->row1(1);
            $this->row8(3);
            $this->last()->color($this->bg());
        }

        // reversed small BL
        if ($rank2 == 9) {
            $this->row1(1);
            $this->row8(4);
            $this->last()->color($this->bg());
        }

        // Big and center reversed
        if ($rank2 == 10) {
            $this->row8(0);
            $this->row13(0);
            $this->last()->color($this->bg());
        }

        // Long VERTICAL CENTER
        if ($rank2 == 11) {
            $d = new Primitive\Diamond();
            $d
                ->point(self::SIZE / 2, 0)
                ->point(self::SIZE * (3/4), self::SIZE / 2)
                ->point(self::SIZE / 2, self::SIZE)
                ->point(self::SIZE / 4, self::SIZE / 2)
                ->color($this->fg());

            $this->add($d);
        }

        // Long HORIZONTAL CENTER
        if ($rank2 == 12) {
            $d = new Primitive\Diamond();
            $d
                ->point(0, self::SIZE / 2)
                ->point(self::SIZE / 2, self::SIZE / 4)
                ->point(self::SIZE, self::SIZE / 2)
                ->point(self::SIZE / 2, self::SIZE * (3/4))
                ->color($this->fg());

            $this->add($d);
        }

        // Long DIAGONAL TL BR
        if ($rank2 == 13) {
            $d = new Primitive\Diamond();
            $d
                ->point(0, 0)
                ->point(self::SIZE * (3/4), self::SIZE / 4)
                ->point(self::SIZE, self::SIZE)
                ->point(self::SIZE / 4, self::SIZE * (3/4))
                ->color($this->fg());

            $this->add($d);
        }

        // Long DIAGONAL TR BL
        if ($rank2 == 14) {
            $d = new Primitive\Diamond();
            $d
                ->point(self::SIZE / 4, self::SIZE / 4)
                ->point(self::SIZE, 0)
                ->point(self::SIZE *(3/4), self::SIZE * (3/4))
                ->point(0, self::SIZE)
                ->color($this->fg());

            $this->add($d);
        }

        // 4 littles
        if ($rank2 == 15) {
            $this->row8(1);
            $this->row8(2);
            $this->row8(3);
            $this->row8(4);
        }
    }
1183728
public function select($cols = array('*'))
    {
        if (!is_array($cols)) {
            $cols = func_get_args();
        }
        return new Query("SELECT", $cols, $this->connectionName);
    }
974789
public function select($columns= '*') {
        if (!is_array($columns)) {
            $columns= trim($columns);
            if ($columns == '*' || $columns === $this->_alias . '.*' || $columns === $this->xpdo->escape($this->_alias) . '.*') {
                $columns= $this->xpdo->getSelectColumns($this->_class, $this->_alias, $this->_alias . '_');
            }
            $columns= explode(',', $columns);
            foreach ($columns as $colKey => $column) $columns[$colKey] = trim($column);
        }
        if (is_array ($columns)) {
            if (!is_array($this->query['columns'])) {
                $this->query['columns']= $columns;
            } else {
                $this->query['columns']= array_merge($this->query['columns'], $columns);
            }
        }
        return $this;
    }
76098
function setColumn($index, $params)
	{
		if (isset($this->columns[$index])) $this->columns[$index] = array_merge($this->columns[$index], $params);
		else $this->columns[$index] = $params;
	}
1119782
public function useSelect2(bool $select2): self
    {
        if (!$this instanceof Attributable) {
            return $this;
        }
        
        $searchOption = 'data-selectAR';
        $select2 ? $this->setAttribute($searchOption, true) : $this->removeAttribute($searchOption);
    
        return $this;
    }
1227974
def select_highest_ranked (elements, ranks):
    
    assert is_iterable(elements)
    assert is_iterable(ranks)
    if not elements:
        return []

    max_rank = max_element (ranks)

    result = []
    while elements:
        if ranks [0] == max_rank:
            result.append (elements [0])

        elements = elements [1:]
        ranks = ranks [1:]

    return result