Pages

How to add math equations in blogger using LaTeX or MathJax?

Here is the website mathjax.org website and you can find the demo here.

In the demo page, you can see following equation written in latex or mathjax equation. 

When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are

If you write $x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$,


you will get follwing formatted equation.

When $$a \ne 0$$ there are two solutions to \(ax^2 + bx + c = 0\) and they are $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
To write such beautiful equations using either mathax or LatTeX in your blogger post or blogspot domain blog, you can do following steps. This is also true for any website if you want to write a code using HTML and other programming languages.
  1. Go to this MathJaX getting started page and copy the code (or simple copy the code below)
  2. Go to Themes in your blog on blogger
  3. Chose Edit HTML
  4. Paste the code (copied from mathjax.org) just below <head> tag[The <head> tag probably will be within 10 lines of code in there]
  5. Save and you are now ready to write LaTeX code or MatJaX code in Blogger.
The code is here [If you want copy this too.

<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>

Now, you are ready to write beautiful math equations using either LaTeX or MathJax.

If this post is useful you can comment here for visibility of this post as well as this blog.

Do you have any other suggesstions? You can add here.

Thanks. 


They do better by going to school less!

The schools in Finland are the model for the entire world. They do better by spending less in the school.   

   

What are the languages they speak? Most students name atleast two languages.
  • English 
  • Swedish
  • Finnish
  • German
  • French

  • How these students are able to learn this may languages despite spending less time in school than many countries? 

    Strange and counter intutive points from here.

    1. Less home work
    2. Say no to multiple choice questions
    3. School is about finding your happiness finding what you know, finding what you learn and what makes you happy
    4. Teach everything to kids: music, singing, art, drawing, etc.
    5. When you move to a new city, we don't ask for the best school. It is never a question. Because all schools are same.
    5. There is nothing different from one school to another in the entire country. They are all the same. 
    6. It is illegal in Finland to set up a school and charge tution. This makes sure that the rich parents have to make sure that the public schools are great.

    The one thing i disagree in this video is about what to tell people on what they want to be. I defer from what the teacher at 7:10 says telling that you can be anything you want to be when you grow up is a lie. Even though it is a lie, at very young age (atleast 15 years old) the interest of the students should as diverse as possible. They should not be forced to focus on a single thing unless the wanted. Isn't completely different from the core idea of the video?

    What makes the students to like something or unlike something? It is entirely based on the way they are brought up, the people they meet, the environment. In such environment, it is not a correct way to focus on what the students want. I am not sure at what age the students focus should be narrowed down. 

    The end of the video says very important points.

    1. Try to teach kids to think for themselves
    2. Be critical to what you learn
    3. Try to teach student sto be happy person 
    4. Teach to respect to others and themselves.

    Another followup video (which Youtube suggested after watching the above video)

    What if Finland's great teachers taught in your schools?


    Why we need to spend more money on energy related projects?

    You can calculate the amount of money each country spends (each year) on gasonline (petrol or diesel or gas). Surely, it will be in many 10s of billions. Now, calculate last year's budget on energy research. If you compare these amounts, surely the later will be insignificant. Are the we ignorants? 

    Here is a short video by Bill Gates. 


    This is is really mind blowing. Are you satisfied with what your country spends on energy related research? Comment here.

    Working with Matplotlib and Pandas (Python package for graphs)

    import pandas as pd
    import matplotlib.pyplot as plt

    file = pd.read_excel('/full/path/to/file.xlsx')

    When you run this, you may get following error.

    ImportError: Install xlrd >= 0.9.0 for Excel support
    To proceed further, install xlrd package using
    
    pip install xlrd or pip3 install xlrd



    For mentioning the sheet number in the excel sheet import.

    df =pd.read_excel('fileName.xlsx', sheet_name='Sheet4')


    Python Class: A simple and clear explanation.

    I have been trying to understand class in python and failed to use it any useful purpose. Then, I came across this  webage where I got a clear understanding of Class in Python. To understand this, I went through so many pages and blogposts. But I didn't get it. 

    https://micropyramid.com/blog/understand-self-and-__init__-method-in-python-class/

    See the code blow (taken from above link). 


     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    class Car(object):
      """
        blueprint for car
      """
    
      def __init__(self, model, color, company, speed_limit):
        self.color = color
        self.company = company
        self.speed_limit = speed_limit
        self.model = model
    
      def start(self):
        print("started")
    
      def stop(self):
        print("stopped")
    
      def accelarate(self):
        print("accelarating...")
        "accelarator functionality here"
    
      def change_gear(self, gear_type):
        print("gear changed")
        " gear related functionality here"
    

    This code is an example for a class in python language.

    As you can see, this is a collection of functions (def) grouped in a class named Car. 

    What is the use of Class?

    Class is used to collect list of definitions and provide a functionality to crosscommunicate with all other definitions inside the Class. 

    What is the best explanation for Class? Do you have any link? 

    Comment and provide link here. 

    Thanks. 

    You may be interested in these posts

    Error in image file conversion: convert-im6.q16: not authorized `test.eps' @ error/constitute.c/WriteImage/1037.

    This error is because of the vulnerability. This allows remote execution of code using image formats. So, some Linux distributions by defaul...