Skip to main content

Posts

JavaScript : Check browser is mobile?

Nowadays, we know that it’s mobile era, so each and every website is having it’s mobile version as well. Some websites will automatically redirect to mobile version when you will try to open it on any mobile device like iPhone, iPad, Android phones etc. So how to check using JavaScript whether the hit is from mobile device or non-mobile device.   You can use the following code for this. //Example <script type ="text/javascript"> // check for the moble site (function(a){is_mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi...

Git on Windows : Directory Already exists

I just started exploring github. After handling basics of github through console I thought I will also try with GUI. So first link I was going through was “ Git on Windows for Newbs ”. While creating clone of existing repository “ https://github.com/dirtyhandsphp/test.git ” It asked me the target directory.    When I created a new one then I got the following error message. Solution is : You should select only the parent folder or directory from dialog box. Don’t use already existing folder as target directory where you want the code to reside. Write the folder name after parent path and create clone. For example :  Check Screen short 3 : I have selected parent directory with name Shiv from directory D:\ Screenshot 4 : Write the name of directory where you want your code to be there. Git will automatically create it.   Thanks!!!!!!!!! Enjoy Programming :)