Posts

Showing posts from April, 2022

ParseJSON

<dependency> <groupId>org.json</groupId> <artifactId>json</artifactId> <version>20090211</version> </dependency> <dependency> <groupId>com.googlecode.json-simple</groupId> <artifactId>json-simple</artifactId> <version>1.1.1</version> </dependency>  public class test { String n; public String readJSONData(String keyword) throws IOException, ParseException { JSONParser parser = new JSONParser(); JSONArray jsonArr = (JSONArray)parser.parse(resp); for(Object obj : jsonArr){ JSONObject jo = (JSONObject)obj; n = (String)jo.get(keyword); } return n; } public static void main(String[] args) throws IOException, ParseException { test e = new test(); String a = e.readJSONData("blog URL");     System.out.println(a); } }

AI900

Image
 Artificial Intelligence : AI is the ability of a machine to   replicate Natural Intelligence    ( NI is came from born like human,animal ,insects have ) :)    1. Prediction: What can happen in the future ( blind ) 2. Forecasting : Predicting future on the basis of Data ( previous events. Anomaly Detection

Any one can become expert on XPATH

Image
 Below are the XPATH axes:

File Reader Utility

// File Read Write on Note Txt File // File file = new File ( filePath ); FileReader fr = new FileReader ( file ); BufferedReader br = new BufferedReader ( fr ); while ( br . readLine () != null ){ String data = br . readLine (); System . out . println ( data ); } br . close (); File file = new File(filePath); FileWriter fw = new FileWriter(file); BufferedWriter bw = new BufferedWriter(fw); bw.writeLine("Hello"); bw.newLine(); bw.writeLine("World"); bw.close(); // File Write Feature // FileInputStream fis = new FileInputStream(filePath); Workbook wb = WorkbookFactory.create(fis); Sheet sh = wb.getSheet("SheetName); Row rw = sh.getRow(1); Cell cl = rw.getCell(1); String data = cl.getStringCellValue(); int data = cl.getNumCellValue(); // File Write Feature // FileInputStream fis = new FileInputSteam(filePath); Workbook wb = WorkbookFactory.create(fis); Sheet sh = wb.getSheet("Sheetname"); Row rw