Author: Ghazal Taimur

NodeJs
Programming
Troubleshooting

Create your own custom mixin in LoopBack NodeJs

A mixin is nothing more than a method of two parameters: function(Model, options): “Model” is the model on which the mixin will be applied “options” are the options that may be defined in the model.json under themixins key. To add a mixin you only need to add mixinName: true. If instead of true you provide […]

Read More
NodeJs
Programming
Troubleshooting

Create your own BelongsTo Required relation Mixin in loopback NodeJs

A mixin is nothing more than a method of two parameters: function(Model, options): “Model” is the model on which the mixin will be applied “options” are the options that may be defined in the model.json under themixins key. To add a mixin you only need to add mixinName: true. If instead of true you provide […]

Read More
NodeJs
Programming
Troubleshooting

How to remove flow issues in node modules?

During run flow command, we were facing flow issues in node modules. Error is something like this: Errors Error: node_modules/bcryptjs/src/bower.json:4 4: “version”: /*?== VERSION */, ^ Unexpected token , Error: node_modules/strong-globalize/test/fixtures/extract013/intl/en/messages.json:2 2: “msgPredefined”: “This is a predefined message in a broken json ^ Unexpected token ILLEGAL Found 42 errors npm ERR! code ELIFECYCLE npm ERR! […]

Read More
Interview questions
PHP
PHP interview questions
Programming

What is the difference between $_GET and $_POST

GET: Transfers the form data through http head location & it displays the data on URL address bar. Data can be cached. Is unsecured. URL are saved in browser history. URL can be bookmarked. Transfers limited amount of data. Can’t upload the file. POST: Transfers the form data through document body. Data can not be […]

Read More
PHP
Programming

Don’t Copy Extra Variables

Some people use predefined variables to smaller-named variables to make their code appealing. This is redundant and could increase the memory of your script. Examples of variable usage: Good Approach: <?php echo strip_tags($_POST[‘myVariable’]); ?> Bad Approach: <?php $myVariable = strip_tags($_POST[‘myVariable’]); echo $myVariable; ?>

Read More
PHP
Programming
Wordpress

Insert Adsense Code Between WordPress Posts

Best place for adsense codes is between the post where it can click more. Mostly wordpress blogers use plugins for this but you can place the below code in your functions.php theme file before end of PHP “?>” tag. function ad_content($content) {     $postParas = explode(“</p>”, $content);     $content = ”;     for ($i = […]

Read More
Wordpress

The7 – Responsive Multi-Purpose WordPress Theme

The7 v3.0.0 – Responsive Multi-Purpose WordPress Theme – ThemeForest The7 is perfectly scalable, performance and SEO optimized, responsive, retina ready multipurpose WordPress theme. It will fit every site – big or small. From huge corporate portals to studio or personal sites – The7 will become a great foundation for your next project! v.3.0.0: 1. New […]

Read More
Wordpress

WordPress theme Shuttershot

WordPress theme: Shuttershot Shuttershot is a fullscreen slideshow template.  Shuttershot theme is ideal for photography websites or for their portfolio in style.The theme has option to use a full screen slideshow on the homepage or a regular blog with image slideshow as the background. If use slideshow on homepage, set custom page template as the […]

Read More
Wordpress

What is wordpress?

WordPress is free and open source tool and content management system (CMS). It is  based on PHP and MySQL.It runs on a web hosting service. Features include plug-in and a template system. WordPress is used more than 18.9% of top 10 million websites. WordPress is the most popular blogging system in Web and used in […]

Read More
Interview questions
PHP interview questions

What are the differences between require and include?

There are following difference between require and include. require will produce a fatal error and stops the script include will only produce a warning and the script will continue. PHP include Function The include function is used in PHP when you want to include a file with in the process. It takes one argument which […]

Read More