Skip to main content

Posts

The Problems and Reasons of Child Abuse

CHAPTER -2 The Problems and Reasons PROBLEMS Problems in the present context are not easy to be identified because of the fact that the solvents and gases are used in hundreds of legally available products at every shop and on very cheap rates. Such products have become in one or the other way a necessity in our day to day life. Have a look around your self and your house and you will find hundred of products lying in your house which have toxic effects and may be used as drugs or solvents if not taken care of. For example you and your family members may be using correcting fluid, paint thinner/remover, nail polish remover, hair spray, air freshener, deodorant, cleaning agent, whipped cream, Perfumes etc. The number is countless for the reason every day a new product is launched in the market with altogether a different and attractive name. All these household products are capable of inducing any child the habits of substance abuse and may also make

Abusive Impact of drugs

A SMALL ACTUAL STORY FOR THE GUIDANCE OF PARENTS I am specially inclined to explain the problem of a boy who was attaining the manhood, only because he was very close relative of mine, who suffered this problem and lost his youngest son at the age of 19 years. After having unsuccessful in studies he was humiliated by all family members( particularly one lady member of the family) at any given point of time One fine morning he promised every one that he shall come to the level of studies as expected from every body in the house. Unfortunately he developed stomach ache at mid night. Thanks God the family doctor was instantly available who injected him a pain killer known as Pethidine. This was known as a pain killer medicine . If repeated at number of times it becomes immune to its effects. In simple words it stops function as pain killer. Repeated doses regularly taken for prolonged period culminates the habit of addiction. That is what happened with this boy and he en

JAVASCRIPT FUNCTIONS

Functions are the block of code that performs specific task and often return a value. Any function can be understood as a reusable code-block that will be executed by an event, or when the function is called. A javaScript function may return zero or more parameters. Parameters can be understood as the standard technique of passing control to a function. JavaScript functions can be of two types: 1. Built-In Function: JavaScript provides a set of in built function that can be used to perform specific functions Some of them are eval(),parseInt(),parseFloat(). a. eval(): eval() function is used to convert a string expression a numeric value E.g. Evaluating a expression using eval() var a=eval(“5*5+6”); eval() function evaluates the expression and assigns 26 to variable a . Note: In case you pass a string value as a parameter eval() expression will not be generated. You need to convert the data type. This can be done using parseInt() discussed below: b. parseInt(): parseInt(

Loops in Javascript

The do...while Loop The do...while loop is just a variant of the while loop. In such loop the block of code is always executed atleast once. The loop will repeat as long as the specified condition is true. Syntax: do { // Enter here the code to be executed } while (var<=endvalue); E.g. Using do…while loop to display numbers Output: Number:0 Number:1 Number:2 Number:3 Number:4 Note: This loop will always be executed at least once, even if the condition is false, because the code is executed before the condition is tested. 4. JavaScript Break and Continue JavaScript has two special statements that can be used inside loops: a. break: The break command will break the loop and continue executing the code that follows after the loop (if any). E.g Using break statement to come out of the for loop Output: The number is 0 The number is 1 b. Continue: The continue command is used in case you need to break the current loop and continue with the nex

JAVASCRIPT BASICS continued

JavaScript Loops Very often you may want the same block of code to run over and over again. To perform such tasks most of the programming language has loop constructs. Loops in JavaScript execute the same block of code a specified number of times or while a specified condition is true. In JavaScript there are two different kinds of loops: 1. For Loop: For loop is used to loops through a block of code for a specified number of times. The for loop is used when you know in advance how many times the script should run. Syntax for (var=startvalue;var<=endvalue;var=var+increment) { // code to be executed } E.g. The example below defines a loop that starts with i=1. It will continue until i is less than, or equal to 5. i will increase by 1 each time the loop runs. Note: The increment parameter could also be negative, and the <= could be any comparing statement. Output: Number:1 Number:2 Number:3 Number:4 Number:5 2. While Loop: While loop is used when you want

JAVASCRIPT PROGRAMMING CONSTRUCTS

Most of the programming languages have a common set of programming constructs. JavaScript also provides a complete range of basic programming constructs. JavaScript Conditional Statements As in any other programming language conditional statements in JavaScript are used to perform different actions based on different conditions. While writing a code you may want to perform different actions for different decisions. For this JavaScript has following conditional statements: 1. If statement - use this statement if you want to execute some code only if a specified condition is true. Syntax if (condition) { /* code to be executed if condition is true*/ } E.g. Using if statement E.g. Note: in case If is written in lowercase letters using uppercase letters (IF) will generate a JavaScript error! 2. if...else statement:- This statement is used if you want to execute some code if the condition is true and any another code if the condition is false. Syntax: if (cond