Tag Archives: blog

Decision making with an Algorithm ( A Simple I/O Process )

Decision taking is always important and You’re the sole responsible for the outcome of the decision you make and should not be blaming anyone helping you in taking the right decision.

Did you ever confused in taking a right decision?

Whenever we are in trouble, we receive many advices from friends,colleagues and family but each one of them advice or suggestion based on what information they know about you and the problem you’re facing in and considering this you will not be getting a right advice.  Most importantly you’ll not be giving all your problems details or current situation you’re in to your friend or a colleague and it might be personal to you.

Then, How do you go about taking the right advice?

Now, Let’s take a look into the below picture.

 

STEP1 : (INPUT)COLLECT the DETAILS:

Many of his friends giving plenty of advices but You do not say NO or Debate with them. PLEASE DO LISTEN TO THEM and understand whant they mean

STEP2: (PROCESS)UNDERSTAND THE IMPLICATIONS OF EACH PATH:

Each way of resolving your problem or choosing a right path involves lot of thinking. You must sit and decide carefully consider your situation,risk factor of taking a particular decision and your personal life and your family.

STEP3: (OUTPUT)MAKE A DECISION ( OUTCOME / SUCCESS):

You take a decision and you must stick to it. No matter what your colleagues or friends say, once the decision is taken. Listening others after taking a decision might hurt you or asks you to take a decision again.

Remeber each step should be given a plenty of time to think and decide.

 

Did you enjoy this post?? Do not forget to leave a feedback below. Thank YOU

 

 

How to disable key board short keys in a web page using javascript

In this Article, I’ll explain how to disable some of the Keyboard short key(s) using JavaScript. In the same way you could disable almost any key in a web page

Mainly, the solution is to use key codes for each key in a keyboard.

for e.g.,

Key code for F5  is 116

Key code for backspace is 8

Don’t worry I will tell you how you can find the key code for various keys in a key board at the end !!

also you can make use of event object like event.ctrlKeyto check if ctrlKey has been pressed

Now Let’s the see the code

You would also want backspace key to work when its placed/focused in a textbox or textarea html elements in a webpage and want to disable only when its outside of those elements. Code for this is

Now, Let’s see how we can find a Key codes for all keys in a keyboard

w3c has built a web page which helps in looking up “Key and Character Codes vs. Event Types”

The below screenshot shows when a key is pressed how the various key code, event details are populated ! This page is very handy

Now block the keys and rock the web

All the Best !!!