if valud of the column of the row is `1`,  it will be added to the array.
548197
def __get_switch_arr(work_sheet, row_num):
    '''
    
    '''

    u_dic = []
    for col_idx in FILTER_COLUMNS:
        cell_val = work_sheet['{0}{1}'.format(col_idx, row_num)].value
        if cell_val in [1, '1']:
            # Appending the slug name of the switcher.
            u_dic.append(work_sheet['{0}1'.format(col_idx)].value.strip().split(',')[0])
    return u_dic
564277
def add_row(row)
      case
        when row.is_a?(Array)
          @rows << Hash[@parameters.zip(row.collect { |value| value.strip })]
          @row_elements << Row.new("|#{row.join('|')}|")
        when row.is_a?(Hash)
          @rows << row.each_value { |value| value.strip! }
          @row_elements << Row.new("|#{ordered_row_values(row).join('|')}|")
        else
          raise(ArgumentError, "Can only add row from a Hash or an Array but received #{row.class}")
      end
    end
128381
def AddRow(self, values):
    
    if self._number_of_columns and len(values) != self._number_of_columns:
      raise ValueError('Number of values is out of bounds.')

    self._rows.append(values)

    if not self._number_of_columns:
      self._number_of_columns = len(values)
735940
public T getValue(E row, E col) {
		if(!rowKeys.containsKey(row))
			return null;
		if(!colKeys.containsKey(col))
			return null;
		try{
			get(rowKeys.get(row)).get(colKeys.get(col));
		} catch(IndexOutOfBoundsException e){
			return null;
		}
		return get(rowKeys.get(row)).get(colKeys.get(col));
	}
1084328
protected function addRow()
    {
        $arguments = func_get_args();

        // store the longest column so we can pad out to it on render
        foreach ($arguments as $key => $value) {
            $columnLength = strlen($value);

            if (!isset($this->columnLengthMax[$key]) || $columnLength > $this->columnLengthMax[$key]) {
                $this->columnLengthMax[$key] = $columnLength;
            }
        }

        $this->rows[] = $arguments;
    }
8442
public void setRow(int row, double[] values) {
        checkIndices(row, values.length - 1);

        values[row] = values[row];
    }
1155663
void addValue(int columnIndex, String value)
    {
        if ( (columnIndex < 0) || (columnIndex >= data.size()) )
        {
            throw new IllegalArgumentException();
        }

        List<String> stringList = data.get(columnIndex);
        stringList.add(value);
    }
796055
def increment(d, key, val=1):
    
    if key in d:
        d[key] += val
    else:
        d[key] = val
192654
private void addColumn(String storeName, String rowKey, String colName, byte[] colValue) {
        Map<String, Map<String, byte[]>> rowMap = m_columnAdds.get(storeName);
        if (rowMap == null) {
            rowMap = new HashMap<>();
            m_columnAdds.put(storeName, rowMap);
        }
        
        Map<String, byte[]> colMap = rowMap.get(rowKey);
        if (colMap == null) {
            colMap = new HashMap<>();
            rowMap.put(rowKey, colMap);
        }
        
        byte[] oldValue = colMap.put(colName, colValue);
        if (oldValue == null) {
            m_totalUpdates++;
        } else if (!Arrays.equals(oldValue, colValue)) {
            m_logger.debug("Warning: duplicate column mutation with different value: " +
                           "store={}, row={}, col={}, old={}, new={}",
                           new Object[]{storeName, rowKey, colName, oldValue, colValue});
        }
    }
1117279
function arrayHasValue(arr, value) {
        var idx = arr.indexOf(value);
        if (idx !== -1) {
            return true;
        }
        return false;
    }
870540
public void unitize1() {
        for (Datum<SparseArray> row : this) {
            double sum = 0.0;

            for (SparseArray.Entry e : row.x) {
                sum += Math.abs(e.x);
            }

            for (SparseArray.Entry e : row.x) {
                e.x /= sum;
            }
        }
    }
815405
public void add( int row , int col , double value ) {
        if( col < 0 || col >= numCols || row < 0 || row >= numRows ) {
            throw new IllegalArgumentException("Specified element is out of bounds");
        }

        data[ row * numCols + col ] += value;
    }
781405
int getIndex(int row, int column) {
        check(row, column);
        return row + (2 * n - (column + 1)) * column / 2;
    }
143690
function addCol($col_data, $col_id = 0, $row_id = 0) {
        foreach ($col_data as $col_cell) {
            $this->_data[$row_id++][$col_id] = $col_cell;
        }

        $this->_updateRowsCols();
        $this->_max_cols = max($this->_max_cols, $col_id + 1);
    }
338197
function guessColumn(data, c) {
      var numeric = true;
      var vs = [];
      for(var i=0,n=data.length;i<n;i++) {
        var v = data[i][c];
        vs.push(v);
        if(isNaN(v)) numeric = false;
      }
      var u = vs.unique();
      if(!numeric) {
        // if we have a non-numeric we will map it through uniques to an index
        return {numeric:numeric, num:u.length, uniques:u};
      } else {
        return {numeric:numeric, num:u.length};
      }
    }
1191323
function (columns) {
        var i, j, k,
            totalCol = 0,
            flag = [];

        for (i = 0; i < columns[0].length; i++) {
            totalCol += columns[0][i].colspan || 1;
        }

        for (i = 0; i < columns.length; i++) {
            flag[i] = [];
            for (j = 0; j < totalCol; j++) {
                flag[i][j] = false;
            }
        }

        for (i = 0; i < columns.length; i++) {
            for (j = 0; j < columns[i].length; j++) {
                var r = columns[i][j],
                    rowspan = r.rowspan || 1,
                    colspan = r.colspan || 1,
                    index = $.inArray(false, flag[i]);

                if (colspan === 1) {
                    r.fieldIndex = index;
                    // when field is undefined, use index instead
                    if (typeof r.field === 'undefined') {
                        r.field = index;
                    }
                }

                for (k = 0; k < rowspan; k++) {
                    flag[i + k][index] = true;
                }
                for (k = 0; k < colspan; k++) {
                    flag[i][index + k] = true;
                }
            }
        }
    }
1071279
function (page = 1, listRows) {
    if (lib.isArray(page)) {
        listRows = page[1];
        page = page[0];
    }
    return { page: page, num: listRows || 10 };
}