Posts

Showing posts from 2014

Laravel Composer main Command

Laravel Composer main Command These are the main composer command which is necessary when you install first time a Laravel Project. composer self-update - It will self update the composer composer update - It will update the all library or packages for laravel project composer dump-autoload - This will update the autoload, If any file is update or class added composer dumpautoload - This is same function as above

What is best configuration for desktop PC under 80000?

Best configuration for desktop PC under 80000 According to me this should be the best configuration which is under 80000. For Heavy/Personal and Gaming Use this PC give you 100%  Performance. Here are the specification for Desktop PC 17190 - ASUS Z97PRO WIFI (1150) 5,428 - Corsair Vengeance DDR3 8 GB (1 x 8 GB) PC RAM (CMZ8GX3M1A1600C10) 5,000 - Sandisk ultra ssd 120 21490 - Intel Core I7-4790k Processor (8m Cache, Up To 4.40 Ghz) (i-7 4790k) 13000 - 22" moniter DELL 24" LED (ST 2440 L) 1,470 - Logitech MK260 Combo Wireless Keyboard and Mouse Combo 3,990 - CORRSAIR VS-650 SMPS 5,800 - Any Cooler Master Cabinet 4,875 - Corsair H60 Cooler ------------------------------------ 78243 ------------------------------------ All price are in Rupees and price can be UP and DOWN. According to your configuration, you can add Graphic Card too but for now there is not any need to add. When you have extra money to burn then you can have it. Please Note:- Before to buy the

How to use Sass or Scss in a Meteor app?

Use Sass or scss in Meteor app To use Sass or Scss file in Meteor First of all you need to add scss or sass package in Meteor Run this command first: mrt add scss Now create a scss file inside your stylesheet folder or anywhere you want to add Like scss_style.scss You can add a css style code to test like h1{ color:red !important; } Now restart your app. I hope it is working now. But this will not work after 0.8 version of meteor Please comment or share this post to inspire me :)

What is WebSockets in HTML5?

WebSockets in HTML5 Web Sockets is a next-generation communication technology for web applications by which you can send or receive data from server like ajax get post method. You have already used like this type of code in jQuery $.post() Or $.get() or $.ajax() etc What these function do? These function used for send and receive data from server to client or client to server. Same as WebSockets works. Syntax: var Socket = new WebSocket(url, [protocal] ); Example: <script type="text/javascript"> function WebSocketCheck() { if("WebSocket" in window) { alert("WebSocket is supported by your Browser!"); // Lets open a web socket var ws = new WebSocket("www.url.com/para"); ws.onopen = function() { // Web Socket is connected now, send data using send() Method ws.send("Message to send server"); alert("Message is sent now."); }; ws.onmessage = function (evt) { var received_msg = evt.data; alert(&

How to show index for an array in loop in the template of Meteor?

Show indexing in template of Meteor for a list of array in loop You can use something like this: Like you have a template name home.html with home template name Now you can write this code for indexing or index to show listing home.js var tot = 0; Template.home.helpers({   listIndex: function(num){     tot = tot+num;     return tot;   }  }); Template.home.destroyed  = function(){   tot = 0; }; Now you can call this function from your template home.html like this: {{listIndex 1}} Hope this will work for you :)

How to use if else condition in Meteor Template?

You can use if else condition in Meteor HTML Template by other option Here is one option to use it Like: You can use Helpers of meteor to use if else condition which you can use in your HTML file. Here is Example: Project/helpers/Spacebars.js You can write this code in this helper UI.registerHelper('addChangeClass', function(valchange) { if(valchange>1) { return "<span style='color:green;'>Yes</span>"; }else { return valchange; } });  Now you can use this function in your template HTML file <td align="right">{{{addChangeClass -34}}}</td> or <td align="right">{{{addChangeClass number}}}</td> I used {{{ three curly bracket to render HTML in Meteor HTML Template.   

How to Return HTML in Meteor Template?

Render HTML in Meteor Template Use {{{variable}}} instead of {{variable}} to make sure there should not escape. With the three curly brackets you can render HTML in meteor template.

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");