Skip to main content

Posts

Showing posts from July, 2016

Make page reload in angular if the dom is having problem with jquery javascript ot require js anything in dom is not working.

Make page reload in angular if the dom is having problem with jquery javascript ot require js anything in dom is not working. myApp.controller('mainController', ['$scope', '$rootScope', '$location', '$log', '$route', '$cookieStore', '$interval', function($scope,$rootScope,$location,$log,$route,$cookieStore,$interval){       $rootScope.hideit = false;               var startTime = new Date();       var firstR = new Date($cookieStore.get('firstreload'));       var diff = startTime - firstR;       var finalDiffToCheck = diff/1000;       if($cookieStore.get('firstreload') === undefined){         $log.info("case page has not been loaded at all");       }       if(finalDiffToCheck > 4){         $log.info("case page has to be reloaded");         window.location.reload();       }             //$log.info("first reload : "+$cookieStore.get('firstreload'));

How to install sass for desiger scss.

How to install sass for desiger scss. 1. Google ruby 2. http://rubyinstaller.org/ 3. then open cmd 4. gem install sass 5. then run command c:\sass Then cd where your css will be then create a file .scss Then run command c:\path\sass --watch C:\wamp\www\sasstut\style.scss:C:\wamp\www\sasstut\style.css Then write your sass in scss file and enjoy sass

How to remove file from git?

How to remove file from git? Use  git rm : git rm file1.txt git commit -m "remove file1.txt" But if you want to remove the file only from the Git repository and not remove it from the filesystem, use: git rm --cached file1.txt

Get element and child or sibling with javascript without jquery

Get element and child or sibling with javascript without jquery   <script type="text/javascript">        function myFunction(ele,condition) {             var x = ele;             var a;             for (a = 0; a < x.length; a++){                 if(x[a].nodeName == condition){                   return x[a];                 }             }                return false;        }         function changeArrow(ele){                 var nextchildele = ele.childNodes;         var parentele = ele.parentElement;         var nextele = parentele.nextSibling;         console.log(nextchildele);         var i = 1;         var eleNow;         while (nextele) {           console.log(i + '. ' + nextele.nodeName);           if(nextele.nodeName == 'DIV'){             eleNow = nextele;             if(hasClass(eleNow, 'in') === true){                                 var res = myFunction(nextchildele,'H4');                 va

Create a .bat file in windows to run a looping command sometimes needed for php to execute a script without apache memory limit and execution time is not implemented here

Create a .bat file in windows to run a looping command sometimes needed for php to execute a script without apache memory limit and execution time is not implemented here @echo off setlocal enableextensions enabledelayedexpansion set /a "x = 0" :while1     if %x% leq 5 (         echo %x%         php c:\wamp\www\deamon.php         timeout 1         set /a "x = x + 0"         goto :while1     ) endlocal

How to make wamp server online

How to make wamp server online http://www.simonewebdesign.it/how-to-put-online-your-wampserver/ 6 down vote accepted It should have been a simple case of left clicking the WAMPManager menu and clicking  Put online . What that would have done is changed this section of  httpd.conf  from this: If using Apache 2.2.x # onlineoffline tag - don't remove Order Deny,Allow Deny from all Allow from 127.0.0.1 ::1 localhost To this: # onlineoffline tag - don't remove Order Allow,Deny Allow from all If using Apache 2.4.x # onlineoffline tag - don't remove Require local To this: # onlineoffline tag - don't remove Require all granted And strictly thats all you should have needed to do! But as you have done some manual messing with httpd.conf here are some things you need to check. I am assuming you wanted to change the port to 8080 rather than thinking you had to for some reason. If you didnt want to change port number