Monday, 18 December 2017

RegEx for Parsing nested XML



<([^\s\/>]+)\s*?(?:Unit=\"([^"]+)\"\s*?)?>([^<]+)<\/



Grep Commands

grep -Eo '[0-9]{1,19}' integration.txt >number.txt
Command to grep NC id which is 19 digit from a long test file integration.txt and save it to number.txt

How to compare two columns to find duplicates in Excel

Select the Conditional Formatting button on the Home tab
Select the optionNew Rule from the buttonConditional Formatting drop-down list.
Select ‘Use a formula to determine which cells to format‘ as a rule in the New Formatting Rulewindow.
=countif($B:$B, $A1)
Click on the buttonFormat and specify the format you want to set.

http://www.javacodegeeks.com/downloads/?dlp=2016/09/GWT-Programming-Cookbook.pdf&utm_source=javacodegeeks&utm_medium=all&utm_campaign=newsletter_signup&utm_content=GWT-Programming-Cookbook



How do I check if a file exists in Java?



There are multiple ways to achieve this.
  1. In case of just for existence. It could be file or a directory.
    new File("/path/to/file").exists();
  2. Check for file
    File f = new File("/path/to/file"); 
      if(f.exists() && f.isFile()) {}
  3. Check for Directory.
    File f = new File("/path/to/file"); 
      if(f.exists() && f.isDirectory()) {}
  4. Java 7 way.
    Path path = Paths.get("/path/to/file");
    Files.exists(path)  // Existence 
    Files.isDirectory(path)  // is Directory
    Files.isRegularFile(path)  // Regular file 
    Files.isSymbolicLink(path)  // Symbolic Link

Related Posts:

  • R Language fundamentals R tutorials Demo() help.search("term") || help(term) ||?term || ??termhelp --Help(affy) or?affy http://search.r-project.org/ htt… Read More
  • Running Kafka on Ubuntu 20.04sudo apt update && sudo apt upgradesudo apt install default-jre wget git unzip -ysudo apt install default-jdk -ywget http://www-us.apache.org/… Read More
  • Microservices JargonsRESTful API Patterns    Statelessness    Content Negotiation    URI Templates    Paginatio… Read More
  • Run Citrix on Ubuntu Issue :Citrix Workspace: Fix "You have not chosen to trust 'Entrust Root Certification Authority'… (SSL error 61)" error on Linux Fix&… Read More
  • Micro Services What Are Microservices? Microservices small targeted services   Each service has its own repository   Microservices are isolat… Read More