Posts

Why video and page loading stops when Mouse cursor or keyboard is not active in Mozilla?

video and page loading stops when Mouse cursor or keyboard is not active in Mozilla Actually i was facing same problem that it stops working when i leave my mouse cursor idle. Actually after 33 version of Mozilla  this have bug which stop these thing while cursor or keyboard is not active. So to solve this problem to page loading and video stop in Mozilla you need to follow the instruction as below; So for this you have to download 30 version of Mozilla and install this version into your computer. This will work fine. Hope this is helpfull. Please leave a comment if this works.

How to use try and catch in Error Handling?

Try and catch in Error Handling It is possible for a script to use multiple exceptions to check for multiple conditions. It is possible to use several if..else blocks, a switch, or nest multiple exceptions. These exceptions can use different exception classes and return different error messages: <?php class myException extends Exception {   public function errorMessage() {     $errMsg= 'Error on line '.$this->getLine().' in '.$this->getFile()     .': <b>'.$this->getMessage().'</b> is not a valid EMail address';     return $errMsg;   } } $email = "sagar@domain...com"; try {   //check if   if(filter_var($email, FILTER_VALIDATE_EMAIL) === FALSE) {     //throw exception if email is not valid     throw new myException($email);   }   //check for "example" in mail address   if(strpos($email, "example") !== FALSE) {     throw new Exception("$email is an example e-mail");  

What is function Overloading and Overriding in PHP?

Overloading  :-  Function overloading means you want more work or login from a function or  you can use different login in a function. You can not use same function in a class so for use this login you can use __call magic function where you can pass method name and parameter and can add login according to their parameter. Take a look on code:- class test { public function __construct() { //Your logic for constructor } public function __call($method_name , $parameter) { if($method_name == "overlodedFunction")  //Function overloading logic for function name overlodedFunction { $count = count($parameter); switch($count) { case "1": //Business log in case of overlodedFunction function has 1 argument echo "You are passing 1 argument"; break; case "2": //Incase of 2 parameter echo "You are passing 2 parameter"; break; case "3": //Incase of 2 parameter echo "You a

What is fixtures in Meteor?

Fixtures in Meteor Basically in short fixtures is js file where you can set default data which will insert automatically when the app runs. Like when you created a app and you want that when you will reset your database or delete all record from database then by default some record became inserted in collection of mongodb. like you can add some data in fixtures if (user.find().count() === 0) {   user.insert({     "name": "Industria de Diseno Textil SA",     "country": "ES",     active:false   });   userinsert({     "name": "Under Armour Inc.",     "country": "US",     active:false   });   user.insert({     "name": "Nike Inc.",     "country": "US",     active:false   }); }  So as you set code in fixures that will check if user collection does not have any record then by default it will insert three record when app

How to write MongoDB query in Meteor?

How to write MongoDB find query in Meteor? Or  How to write MongoDB update query in Meteor? First of all find query  Select symbol.yahoo from user where active='true' user.find({active:true},{fields:{'symbol.yahoo':1}}); Update query in MongoDB Meteor update user set open_at=9pm and trade_date ='2012-12-20' where symbol.yahoo='meteor'  var updata = {             open_at : '9pm',             trade_date : '20122-12-30' } user.update({'symbol.yahoo':'meteor'}, {$set:updata});

How to start Meteor APP?

Image
First of all you need a platform where you can start a Meteor APP You can use Linux or any other platform. If you will use Windows that you can face lots of technical issue of installation issue. So there is very basic tutorial from where you can easily learn Meteor. Step1: www.nitrous.io open this link and register here and login This site provide already set up meteor environment After login create a box and choose Node.js environment. Now you have box somthing like this. Click on IDE step2: You will see somthing like this On the left hand sidebar you will see the directory related to your app. In the bottom you can run linux command 3. Now you need to run in the console a command which install all remaing parts of meteor app parts install meteor Now you can follow this link for more info www.discovermeteor.com/blog/meteor-nitrous/

gzip: stdin: unexpected end of file tar: Child returned status 1 tar: Error is not recoverable: exiting now Installation failed.

While Installing Meteor i am getting this Error on my linux server or ubuntu I tried to figure out to get rid of this problem but unable to success so finally i found a solution. I think you can be stuck in this problem. Mostly this problem occurs when you try to install the  Meteor on your ubuntu or linux server. When you run this command  curl https://install.meteor.com | sh It shows some process and showed you that given error below gzip: stdin: unexpected end of file tar: Child returned status 1 tar: Error is not recoverable: exiting now Installation failed. Now here is the answer that how can you solve this problem Open your terminal where you running this command Before run this command curl https://install.meteor.com | sh You need to run this command before above command echo tlsv1 > $HOME/.curlrc Now you can run this command to install Meteor   curl https://install.meteor.com | sh Hope problem is sloved.     If this works for you then please submit a