Hoisting in javascript?
Variable and function declarations are hoisted to the top of the function scope. In detail: The flow of execution of program is known as execution context. Global code –Initial section of program execution is known as global code. Function code – Once the execution enters into a function call. <script> var a=”Global execution”; // Global…
Expansion of “RBGA” colors in css?
Red,Blue, Green colors with opacity(alpha channel. rgba(255,0,0,1.0) css property: background-color:rgba(255,0,0,1.0);
The context (execution context) in JavaScript?
The flow of execution of program is known as execution context. Global code –Initial section of program execution is known as global code. Function code – Once the execution enters into a function call. <script> var a=”Global execution”; // Global context function myfun(){ var b=”Global execution”; } myfun(); // Functional context </script> Execution Context Stack…
What is importance of ‘this’ keyword in javascript?
‘this’ always point to an object. when a function executes inside an object , it gets the this property and its value. alert(this); // will return object window, because it is executing in global object. var person = { firstName :”john”, lastName :”johny”, myname:function () { alert(this); // will return person object beacuse myname function…
Php mascot
A blue elephant with “php” in its body. Its name is elePHPant More about elePHPant is : http://php.net/elephpant.php
What does “p” stands for php
Php is a server side programming language Created in 1994 by Rasmus Lerdorf. Usually used to enhance the HTML page’s look and feel and for building desktop application . Initially php stands for “Personal Home Page”. Now its stand for Hypertext Pre-proccessor. First “p” stands for its old name. Php available as open source also cross…
Facebook og title , image, and description adding in wordpress without plugin:
In ‘wp-head’ hook we need to set the og:title, descripts etc… add_action(‘wp_head’, ‘og_details’); function og_details() { global $post; if(is_single()) { if(has_post_thumbnail($post->ID)) { $ogimg =get_the_post_thumbnail_url($post->ID,’full’); } if($desc = $post->post_content) { $desc = strip_tags($desc); $desc= str_replace(“”, “‘”, $desc); } ?> <meta property=”og:title” content=”<?php echo the_title(); ?>”/> <meta property=”og:description” content=”<?php echo $desc; ?>”/> <meta property=”og:image” content=”<?php echo $ogimg;…
Malayalam Unicode issues while displaying some characters (code in php)
When we use malayalam unicode in social share titles or description or any where, some of the characters like ‘Chillu’ look like wrong. Usually malayalam “chillaksharam” causes problems. To correct this, use the below code in php. Here we replacing split characters with single character. You can see the difference once you copied this code…