Thursday, July 29, 2021

Is it possible to convert from .json format to .xlsx format?

 The easiest way to do this is to use Windows Powershell as described here. It is enough if you convert .json to .csv. File format .cssv can be opened with EXCEL and saved.

This is the .json file:

============

{

   "Name": "James Bond",

   "Age": "35",

   "Profession": "Professional Killer",

   "Location": "London, UK"

}

===================

This file, JamesBond.json  is saved on my desktop.

Let us say that is the code you need to convert to from .json to .csv format

Create the above text in Notepad and save it with the extension .json (default is .txt for Notepad)


Open the Windows PowerShell ISE




Type in the following code (try to see what else you can convert from and convert to in the above images):

Get-Content C:\Users\TestUser\Desktop\JamesBond.json | ConvertFrom-Json|ConvertTo-Csv

Run the code in the Windows PowerShell ISE

You will see this result:

==========================

"Name","Age","Profession","Location"

"James Bond","35","Professional Killer","London, UK"

---------------------------------

You get the answer as shown. 

This is in CSV format and this can be opened with EXCEL.


This can be saved as .xlsx or various other formats.






Sunday, July 25, 2021

Monday, July 19, 2021

Is Hydrogen a colorless gas?

Yes, it is colorless. This is what elementary chemistry tells you. But people may be wondering why they are adding a color attribute to hydrogen.

The color attribute of hydrogen comes about by the way it is produced on an industrial scale. There are three colors presently:

Grey hydrogen:

Basically from fossil fuels such as coal or natural gas.

https://www.coalage.com/features/hydrogen-from-coal/#:~:text=H%202%20produced%20by%20steam%20methane%20reforming%20%28SMR%29,hydrogen%20that%20includes%20carbon%20abatement%2C%20such%20as%20CCUS.

https://tinyurl.com/yey9fegt


By far most of the hydrogen presently produced/used is grey hydrogen.

Green hydrogen:

Hydrogen from Electrolysis of water.

This is completely free of carbon in its production.

http://www.chem.gla.ac.uk/cronin/media/papers/Chisholm-Chapter_16_2016.pdf#:~:text=The%20production%20of%20hydrogen%20from%20water%20via%20electrolysis,has%20two%20main%20applications%20as%20an%20energy%20vector.

or

https://tinyurl.com/4y6hektf

Blue hydrogen:

It is similar to Grey hydrogen but the carbon in the process is captured and stored (so-called carbon neutral).

https://www.msn.com/en-us/news/technology/blue-gas-could-become-a-tesla-killer/ar-BB1dOsgr#:~:text=So-called%20%27blue%27%20hydrogen%20is%20the%20name%20given%20to,water%20are%20converted%20into%20hydrogen%20and%20carbon%20monoxide.

https://tinyurl.com/e5k7zrxe

Thursday, July 15, 2021

Is there an online compiler for multiple programming languages?

 Yes. There is indeed one I recently came across. It can compile a couple of programming languages as shown here (copied from its website).


I just tested a demo SQL query. It worked.

It has a simple interface. Just enter your code and click RUN and you are done.


Just click RUN after entering your code as shown (I just modified the demo query a little bit).



The result of the query is shown. I have not tested other languages.

Here is the site where you can do it. You need to register to use this program.