Little by little

Từng ly từng tý

Help yourself

Cứ tự nhiên

Make yourself at home

Cứ tưk nhiên như ở nhà

travel on XML tree

Based on the following article, I can travel on NodeList of XML document to find the interest child.
Java Code Example groovy.util.NodeList

groovy java split string

//String str1 = "IPR031887 Serologically defined colon cancer antigen 8"
String str1 = "LTPOS"
String[] entry = str1.split(" ", 2)
if (entry.size() == 1) 
  println entry[0]
else {
println  entry[0]
println  entry[1]
}

String str = "name1, name2, name3, name4";
String[] parts = str.split(", ", 2);
String string1 = parts[0];
String string2 = parts[1];

System.out.println(string1);  // prints name1
System.out.println(string2);  // prints name2, name3, name4

import java.net.*
import java.io.*
URL oracle = new URL("ftp://ftp.ebi.ac.uk/pub/databases/interpro/entry.list")
BufferedReader br = new BufferedReader(new InputStreamReader(oracle.openStream()))
String inputLine

while ((inputLine = br.readLine()) != null)
inputLine
br.close()

© 2013 - 2026. Tung NGUYEN. Using CI version: 3.0.2 | Page rendered in 0.0189 seconds.