The following code is written for Yii2 framework, but except for the first line of the function that fetches the path to the root directory of project, it works with other PHP frameworks or without a framework.
Ticker is where you specify the Scrip ID of the stock , be it IRCTC, JSL, TATAMOTORS etc. You should use both the exchange symbol and scrip id seperated by a colon to avoid ambiquity. For example, if you are fetching data of IRCTC stock from NSE, ticker parameter should be NSE:IRCTC
Attribute is an optional parameter. This is where you specify the type of information you need about the selected stock. If you leave it blank, it will return the price by default. As this is a string, you need to enclose the value in quotes.
Supported attributes include
price – The current market price (CMP) of the stock
Start_date is also optional. The start date when you are fetching historical data.
End_date|num_days is another optional parameter. You can either specify an end_date or number of days from start_date when you are fetching historical data.
Interval, The final parameter is also optional and is used to specify the frequency of returned data. The supported values are DAILY and WEEKLY.
Example 1: Fetch current market price of IRCTC (NSE)
=GOOGLEFINANCE( "NSE:IRCTC", "price")
Example 2: Fetch Price to Earnings (P/E) ratio of IRCTC (NSE)
=GOOGLEFINANCE( "NSE:IRCTC", "pe")
To fetch the Scrip ID from a cell , so that you can apply the same function to other rows as well, as seen in the screenshot, change the function to
Nautilus offers an easy way to batch rename files. I used to do this using some bash script, until I’ve recently discovered this. It’s pretty straightforward.
Go to the folder which contains the files you want to rename, and select those files. Then right click and select rename, as you would do for a single file.
‘Rename using a template’ is the default option. Add an optional prefix, and then click Add button next to the text box. Select a pattern here, for example 1,2,3,4.
Now click rename. Your files are now renamed to n1, n2, etc.
Now, in this example, the extensions are ‘JPG’. I want to change it to ‘jpg’ for all the files. For this, use the ‘Find and replace text’ option.