Daily Learning - Day 40

Date: 13th May 2017

Topic: Notepad++ - Day 01


Follow Hashtag: #SKC100DaysofLearning

A New thing i experimented on 11th May, at work with help of stack overflow.
Not part of actual work task. But tried to enhance my job (adding extra hours to my work).

==== More Details...




There was a new thing, learnt that from Server Logs - we can get to know if any exceptions or errors tracked while performing any action.
So took help and downloaded the server log. 
  1. Download the Server Log
  2. Open the server log in Notepad++
  3. If you see any exceptions - CTRL+F: Find for "Exception" in current document
  4. You may get (7 hits)
  5. Copy the hits to another file.
  6. Remove till FileNotFoundException: DOCUMENTS/
  7. Then you will see only PDF Names
Sheet1.pdf
Sheet2.pdf
Sheet3.pdf
Sheet4.pdf
Sheet5.pdf
Sheet6.pdf
Sheet7.pdf



Next, If you have a database access / you can work with dev team where you can query against the table to find the documents to which they are assigned.

But, if there are 100 documents. It is really hard to make 100 documents to make a Query.
Thus, Stackoverflow helped in this context.

You won't be able to do it in a single replacement; you'll have to perform a few steps. Here's how I'd do it:  

  1. Find (in regular expression mode):
    (.+)
    Replace with:
    '\1'
    This adds the quotes:
    'Sheet1.pdf'
  2. 'Sheet2.pdf'
    'Sheet3.pdf'
    
    'Sheet4.pdf'
    
    'Sheet5.pdf'
    
    'Sheet6.pdf'
    
    'Sheet7.pdf'
    
  3. Find (in extended mode):
    \r\n
    Replace with (with a space after the comma, not shown):
    , 
    This converts the lines into a comma-separated list:
  4. 'Sheet1.pdf', 'Sheet2.pdf', 'Sheet3.pdf', 'Sheet4.pdf', 'Sheet5.pdf', 'Sheet6.pdf', 'Sheet7.pdf'
  5. Adding braces manually for both ends and Doing a query can give you the results to which documents are assigned.
  6. ('Sheet1.pdf', 'Sheet2.pdf', 'Sheet3.pdf', 'Sheet4.pdf', 'Sheet5.pdf', 'Sheet6.pdf', 'Sheet7.pdf')

Popular Posts

JMeter Producing Error: Windows RegCreateKeyEx(...) returned error code 5

Understanding about Contract Testing