Reads in the values from a particular column of {@code filename}, as
delimited by {@code delimiter}.

@param filename
@param columnNumber
@param delimiter
@return
483389
public static List<String> readColumnFromDelimitedFile(String filename, 
      int columnNumber, String delimiter) {
    List<String> columnValues = Lists.newArrayList();
    try {
      BufferedReader in = new BufferedReader(new FileReader(filename));
      String line;
      while ((line = in.readLine()) != null) {
        String[] parts = line.split(delimiter);
        columnValues.add(parts[columnNumber]);
      }
      in.close();
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
    return columnValues;
  }
1181278
public String mkString(NumberFormat formatter, String delimiter) {
        StringBuilder sb = new StringBuilder();
        VectorIterator it = iterator();

        while (it.hasNext()) {
            double x = it.next();
            int i = it.index();
            sb.append(formatter.format(x))
                    .append((i < length - 1 ? delimiter : ""));
        }

        return sb.toString();
    }
541562
@SuppressWarnings("SameParameterValue")
  static CodeBlock join(Iterable<CodeBlock> codeBlocks, String delimiter) {
    CodeBlock.Builder builder = CodeBlock.builder();
    Iterator<CodeBlock> iterator = codeBlocks.iterator();
    while (iterator.hasNext()) {
      builder.add(iterator.next());
      if (iterator.hasNext()) {
        builder.add(delimiter);
      }
    }
    return builder.build();
  }
954293
def get_column_list_from_select(self, txt, col_delim=','):
        
        return [c.strip().strip(',') for c in txt.split(col_delim)]
904331
def read_csv(filename, delimiter=CSV_DELIMITER):
    
    with open(filename, 'r') as file:
        return list(csv.reader(file, delimiter=delimiter))
634052
public static List<String> buildListWithDelimiter(
            String stringWithDelimiter, String delimiter) {
        return buildTokenStream(stringWithDelimiter, delimiter)
                .collect(toList());
    }
397332
public int readFile(String filename, boolean validate) {
    int result = 0;

    try {
      if (Files.exists(Paths.get(filename))) {
        data = new TiffInputStream(new File(filename));

        tiffModel = new TiffDocument();
        validation = new ValidationResult(validate);
        tiffModel.setSize(data.size());
        boolean correctHeader = readHeader();
        if (correctHeader) {
          if (tiffModel.getMagicNumber() < 42) {
            validation
                .addError("Incorrect tiff magic number", "Header", tiffModel.getMagicNumber());
          } else if (tiffModel.getMagicNumber() == 43) {
            validation.addErrorLoc("Big tiff file not yet supported", "Header");
          } else if (validation.isCorrect()) {
            readIFDs();

            if (validate) {
              BaselineProfile bp = new BaselineProfile(tiffModel);
              bp.validate();
              getBaselineValidation().add(bp.getValidation());
            }
          }
        }

        if (getBaselineValidation().getFatalError()) {
          tiffModel.setFatalError(true, getBaselineValidation().getFatalErrorMessage());
        }

        data.close();
      } else {
        // File not found
        result = -1;
        tiffModel.setFatalError(true, "File not found");
      }
    } catch (Exception ex) {
      // IO exception
      result = -2;
      tiffModel.setFatalError(true, "IO Exception");
    }

    return result;
  }
1143446
public int columnIndex(final int _tableIndex, final String _columnName)
    {
        final Optional<Column> colOpt = getColumns().stream()
                        .filter(column -> column.tableIndex == _tableIndex && column.columnName.equals(_columnName))
                        .findFirst();
        final int ret;
        if (colOpt.isPresent()) {
            ret = getColumns().indexOf(colOpt.get());
        } else {
            columns.add(new Column(tablePrefix, _tableIndex, _columnName));
            ret = getColumnIdx();
        }
        return ret;
    }
1077928
public CharSequence readSource(JavaFileObject filename) {
        try {
            inputFiles.add(filename);
            return filename.getCharContent(false);
        } catch (IOException e) {
            log.error("error.reading.file", filename, JavacFileManager.getMessage(e));
            return null;
        }
    }
119921
public static String[] splitFileName(String fileName) {
	int pos = fileName.lastIndexOf('.');
	if (pos == -1) {
	    return new String[] { fileName };
	}
	return new String[] { fileName.substring(0, pos), fileName.substring(pos + 1) };
    }
808355
public NClob getNClob(int columnIndex) throws SQLException {
        try {
            NClob clob = rsetImpl.getNClob(columnIndex); 
            if (clob != null && freeResourcesOnClose)
                clobs.add(clob); 
            return clob; 
        } catch (SQLException sqlX) {
            FFDCFilter.processException(
                                        sqlX, getClass().getName() + ".getNClob", "1621", this);
            throw WSJdbcUtil.mapException(this, sqlX);
        } catch (NullPointerException nullX) {
            // No FFDC code needed; we might be closed.
            throw runtimeXIfNotClosed(nullX);
        } catch (AbstractMethodError methError) {
            // No FFDC code needed; wrong JDBC level.
            throw AdapterUtil.notSupportedX("ResultSet.getNClob", methError);
        } catch (RuntimeException runX) {
            FFDCFilter.processException(
                                        runX, getClass().getName() + ".getNClob", "1637", this);
            if (tc.isDebugEnabled())
                Tr.debug(this, tc, "getNClob", runX);
            throw runX;
        } catch (Error err) {
            FFDCFilter.processException(
                                        err, getClass().getName() + ".getNClob", "1644", this);
            if (tc.isDebugEnabled())
                Tr.debug(this, tc, "getNClob", err);
            throw err;
        }
    }
999827
def _getFilename(self, fileNumber):
        
        cur = self._connection.cursor()
        cur.execute('SELECT name FROM files WHERE id = ?', (fileNumber,))
        row = cur.fetchone()
        if row is None:
            return None
        else:
            return row[0]
829136
public static String join(final String[] seq, final String delimiter) {
    if (null == seq || seq.length < 1) return "";
    Assert.notNull(delimiter);
    StringBuilder aim = new StringBuilder();
    for (int i = 0; i < seq.length; i++) {
      if (aim.length() > 0) aim.append(delimiter);
      aim.append(seq[i]);
    }
    return aim.toString();
  }
117239
public static int getNumberOfColumnsInFile(String filename, String delimiter) {
    try {
      BufferedReader in = new BufferedReader(new FileReader(filename));
      String line;
      while ((line = in.readLine()) != null) {
        String[] parts = line.split(delimiter);
        in.close();
        return parts.length;
      }
      in.close();
      // File is empty.
      return 0;
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }
1003525
public static String join2(final Collection<String> list, final String delimiter) {
    final StringBuffer buffer = new StringBuffer();
    boolean first = true;
    for (final String str : list) {
      if (!first) {
        buffer.append(delimiter);
      }
      buffer.append(str);
      first = false;

    }

    return buffer.toString();
  }
1220195
public Csv lineDelimiter(String delimiter) {
		Preconditions.checkNotNull(delimiter);
		internalProperties.putString(FORMAT_LINE_DELIMITER, delimiter);
		return this;
	}
398956
def infer_delimiter(filename, comment_char="#", n_lines=3):
    
    lines = []
    with open(filename, "r") as f:
        for line in f:
            if line.startswith(comment_char):
                continue
            if len(lines) < n_lines:
                lines.append(line)
            else:
                break
    if len(lines) < n_lines:
        raise ValueError(
            "Not enough lines in %s to infer delimiter" % filename)
    candidate_delimiters = ["\t", ",", "\s+"]
    for candidate_delimiter in candidate_delimiters:
        counts = [len(re.split(candidate_delimiter, line)) for line in lines]
        first_line_count = counts[0]
        if all(c == first_line_count for c in counts) and first_line_count > 1:
            return candidate_delimiter
    raise ValueError("Could not determine delimiter for %s" % filename)