Saturday, December 09, 2017

Locking Unlocking Aadhar Biometrics, Lock Unlock

Recently, there was a news item, which claimed that we can lock and unlock our Aadhar biometric details from being requested for biometric identification.

This seemed like a good feature. The news item also claimed that we can view if and when our biometric details were requested for identification.

This seems like a safety feature which the public may use to prevent misuse of their Aadhar information.

So, we went to the site address
https://resident.uidai.gov.in/biometric-lock

and filled in our Aadhar number.

So, were we able to lock our Aadhar?

Unfortunately, NO. Apparently, there was some "technical issue".

The page responded with the message "Your request cannot be processed now due to some technical issue. Please try again later."



Hopefully, the hiccup is temporary. And, will be rectified soon.

But, the fact remains that we are risking a situation of our biometric not being recognized in an important situation.

Assume that we had been able to lock our biometrics and are shown this message "Your request cannot be processed now due to some technical issue. Please try again later." when we are trying to unlock it.

So, there.

Wednesday, November 22, 2017

Nature, most benign, most benevolent!

We have this habit of blaming nature for all our ills.

Obviously, because man is the most intelligent creature on Earth and cannot go wrong.

Just imagine, what doesn't nature give us? Nature gives us light, energy, peace of mind, food, water and everything that is needed for our survival.

And, what do we do in return?

Do not let any chance to damage her physically and spiritually.

 

The better our knowledge of nature becomes, the worse becomes our treatment of her, making her angry.

What does nature do when she becomes angry?

She reacts in ways we cannot fathom.

Just let this sink in. The world has seen 2053 nuclear explosions since 1945. 


What Nature teaches us?



So, what are the lessons that we have to learn from nature.

We should all know that the benign, benevolent character of nature cannot be taken for granted. Because, our actions can change the quality of nature.

Nature or the cosmos cannot be overpowered, but it can be won over by our responsible actions which take nature into account, in all our actions.

It is not for nothing that our ancestors worshiped nature, which the modern religions rejected outright. It only shows our depredation and fall from grace.


Friday, November 17, 2017

Compressing jpg files; Which online tool is better?


Compress jpg files; Which is better?

 
We needed to place a few banner images on one of our web sites. The high resolution images were of the size of over 2MB. This is not ideal for a home page of a website. So, we decided to try a few image compression tools online.




The Image Compressing Challenge Contenders


We tried three image compression tools, such as compressjpeg.com, tinyjpg.com and compressjpg.online.

The first mentioned compressjpeg gave me a reduction of 72% from the original. To the untrained eye, there is no difference in the quality of the images.

The process was also pretty fast.

On the other hand, tinyjpg failed to upload my 2.5MB file twice and gave me a compressed file the third time.

Guess what, the online image compression tool shaved off 78% from the original image size.

Compressjpg, the third online tool that we tried, took a longer time to process the source image. The first attempt seemed to be a fail.

When trying the second time. File upload happens and there is a message which says the file was converted. But, the download link seemed like a Google adsense link.


So, of the two successful ones, the choice would be compressjpeg.com for speed and tinyjpg.com for better compression.

But, wait. There are other online tools like giftofspeed.com and jpeg-optimizer.com. Of these, jpeg-optimizer.com seems to be good choice, compressing the original image of size 2.4MB to a size of about 375K. That is cool 85% reduction in size.


giftofspeed.com, meanwhile gave a compression of about 71%.



The Image Compressing Champion


Finally, from our analysis of jpeg image compression tools, we found out that the following tools gave us image compression without apparent loss of quality. In order of compression efficiency, they would be http://www.jpeg-optimizer.com/, https://tinyjpg.com/, http://compressjpeg.com/ and https://www.giftofspeed.com/



The winner of the compression challenge would be jpeg-optimizer



Wednesday, November 08, 2017

jQuery is updating a different tab different div, Why?


jQuery is not updating the right tab, updating a different one


Sometimes, we find that our jQuery code is behaving not as we expect it to. Like, for example, we expect it to show a certain content in a certain div, but it updated the content in a different div, instead.

The first time we encountered such a situation, it was frustrating. The key to finding a solution is to persist and split the problem into different small pieces.

There is no specific error that is shown or seen in the debugger or developer tools window. So, it becomes difficult to home in on the error. What we need is a cool mind and a certain experience to troubleshoot in such a situation.

Taking time off from the task, addressing a different task and coming back at a later time helps, almost in all situations.

The most probable reason is that the div that is getting updated is not closed. Some of the closing tags are missing.

So, the div that you are updating is actually part of the previous named div and so the previous div is getting updated and not the one that you intended.

Solution: Close the previous div properly to create the differentiation. Check and compare the opening tags with the closing tags.

$( "#home" ).removeClass("active");
$( "#one" ).removeClass("active");
$( "#menu1" ).html( text );
$( "#menu1" ).addClass("fade in active");
$( "#two" ).addClass("active");
 

In the above jQuery script, dive menu1 is updated with some html content.

Then the div with id menu1 is made active. Then #two is made active. #two here is a tab visualization. Two different tabs are created in this example to provide the visitor a feel of viewing two different screens.

In normal situations, this should provide the impression that a different tab is being viewed.

But, in our case, it did not happen.

Because, our code looked something like this

<div id="home">
      <div id="menu1">
      </div>
</div>

In this case above, "menu1" becomes a subset of "home" and thus any update of the menu1 is reflected in "home".

The right code would have been

<div class="container">
     <div id="home">
     </div>
</div>

<div class="container">
     <div id="menu1">
     </div>
</div>

Proper closing of the tags, is very important.

A simple solution for jQuery is not updating the right tab, but updating a different one.

It is frustrating till we understand and identify it; then it becomes easier to make the update of the right div or tab using jQuery.

Tuesday, October 10, 2017

How to not print columns on display while printing on paper

Many of you may or may not be aware of a javascript code that is capable of printing page content.

We had created a report which looked something similar to the one shown below.
  

Notice that there are two columns that display "No" in orange colour. We want to print the report, but we do not want the "NO" columns to be printed on paper.


Hiding columns from a table using jQuery



jQuery has a simple command which can hide any number of cells based on their class names. That command to hide a class is given below.

$('.className').hide();


This command was given in the jQuery code, to be called when the print command was called.

Let us assume that we gave the classname "noprint" to all those cells in those two columns, which we do not want to print.

In the code loop, we added an additional classname called "noprint" to the content, like so.



 If you see, the  class "noprint" has been added. Now, when I give the command 

All cells that need to be hidden, have to be given the classname "noprint".

$('.noprint').hide();

All those cells that have noprint class in them are hidden from view.

We are using "class" and not "id" because of obvious reasons, the reasons being the "id" can appear only once in an entire page.


Printing using the system dialogue from web application


Now, the Print command may be used to call the system's print dialogue and get our page printed. See below for the code.




Solved.










Friday, October 06, 2017

mdbootstrap css and the invisible uncolored button

mdbootstrap css not working as expected

This document can otherwise be called btn-success vs btn_success Bootstrap css. This is because, a simple oversight resulted in a confusion that left our imagination flying at the speed of a mythical spaceship.

Recently, we were working on a page, where certain page elements were to be painted dynamically in the course of the program.

CSS not updating cell as expected

When the program was run, the color of the cell did not change. On analysis, we found the  css class to be present in the code.

After many rounds of analysis, we found out the problem to be an innocuous "_" symbol.

btn-success explained

To put it simply, the class that we called was btn_success,  whereas what we should have called or referred to would have been "btn-success".

Notice that the character "_" in place of "-". Though they seem similar, it is easy to overlook them when they are part of a larger group of words, in this case, a program.

We are recording it here so it may be useful to another set of desperate souls who want color in their mdbootstrap css.

btn-success In a nutshell

btn-success is a bootstrap class, which highlights the cell green. If you use btn_success instead of btn-success, your cell will not be highlighted in green.

Usage of btn-success

 

In the above example, a ? is displayed with in a button, which has the background color green.

Wednesday, October 04, 2017

Learning HTML Online, Fast and FREE



A FREE Online Course for Web Development


Yes! It is true. Though, it was a serendipitous discovery. There aren't many sites that offer you the best quality training on the web. And that too, for no cost.


A run through of the syllabus and the course structure has not failed to amaze us. Such is the smooth and easy flow of the lessons, which will take the student through all the aspects of the course.


FreeCodeCamp is my first choice if you want to learn a new subject, such as web development.


According to their website, they are a community that helps you learn to code, then get experience by contributing to open source projects used by nonprofits.


Established in 2014, freeCodeCamp has helped over 14,000 people get jobs or get better offers. They have helped over 30 non-profit organizations with their web sites too.


For the student, in addition to the course content, they also have a Youtube channel, which contains classroom sessions, which can be utilized by the student to improve their techniques.


You can follow them on twitter, facebook, Subreddit and 


Their LinkedIn University page is here


So, if you are looking to learn JavaScript, jQuery, HTML5 and web development online for FREE, freecodecamp is where you need to go.

Locking Unlocking Aadhar Biometrics, Lock Unlock

Recently, there was a news item, which claimed that we can lock and unlock our Aadhar biometric details from being requested for biometric ...

Copyrighted.com Registered & Protected DWYE-NHTO-NBNH-7FFM