Saturday, 29 September 2012

Show error message if Java run-time not installed in client mechine through JavaScript

By using Follow code, it is possible to show error message if java run-time not installed in client mechine <!DOCTYPE html><html><body><script>if (navigator.javaEnabled()) {    //Java is enabled}else{document.write("Error:Java is Disabled or Java Not Installed<br>Download and Insatall...
Read More

Wednesday, 26 September 2012

Solution SSH Connection Refused Problem in Linux - Backtrack

If your system unable to SSH from another System means 1. SSH server Not Running. So start SSH Server     To start SSH server goto Applications->Backtrack->Services->SSHD->sshd start If It is Running, and unable to SSH...
Read More

Monday, 24 September 2012

Solution to Endianness Problems in Linux Networking

There are two types of Endians 1.Big-Endian 2.Little-Endian In real world Networks generally use Big-Endian Ethernet is Big-endian IP's byte order also is Big-endian A common solution to the endianness problem associated with networking can be handled by below functions htons(): Convert 16-bit unsigned value from...
Read More

Saturday, 22 September 2012

Send ajax post which contains '&' to PHP

Send '&' through Ajax Post method to PHP File   var strnew = encodeURIComponent("My & My");   Now At PHP Side no need to any thing If problem in PHP Side reading data try below functions urlencode() urldecode()...
Read More

Friday, 21 September 2012

Turning off spell check on Komodo Edit ( red lines )

To turn off red underlines (looks like Spell Check Problem) under Code in Komodo Edit, follow below steps step1- goto Edit->Preferences step2- In Preferences goto Syntax Checking step3- turn off Enable checking of mixed end-of-lines (EOL) Characters...
Read More

Find string with in another string in PHP

By using Below Code it is possible to found that whether a string has searching String <?php  $str = "Hi Me Find";  $find = "Me";   if(sizeof(explode($find,$str))>1)  {    echo "Me Found";  }  else  {     echo "Me Not Found";   }  ?>...
Read More

Thursday, 20 September 2012

Change proxy in linux through commands

Run below Commands as root in Linux terminal   [root@xyz~]# export http_proxy='http://12.12.12.12:3128/'   Check Proxy    [root@xyz~]# echo $http_proxy  http://12.12.12.12:3128/   ...
Read More

Display errors in PHP

Add below two lines to your PHP file to display errors error_reporting(E_ALL); ini_set('display_errors', '1'); Example: <?php error_reporting(E_ALL); ini_set('display_errors', '1'); //remaining code ............. ............. ............. ?>...
Read More

Solution How replace slach in PHP

You can replace '\' with '/' and '/' with '\' in PHP Example replace \ with / echo str_replace('\\','/','Hi\Mi'); output: Hi/Mi replace / with \ echo str_replace('/','\\','Hi/Mi');   output: Hi\...
Read More

PHP equivalent for unescape()

urlencode() and urldecode() can be used Examples: urlencode() echo urlencode("Hi+Me"); output: Hi%2BMe urldecode() echo urldecode("Hi+Me"); output: Hi ...
Read More

Solution to getVideoRatingInfo() returning array in PHP youtube API

If you are using PHP for Youtube API then you may face problem of getVideoRatingInfo() returning array Problem echo "Rating: ".$videoEntry->getVideoRatingInfo(); output: Array Solution $a = array(); $a = $videoEntry->getVideoRatingInfo(); echo "Rating: " . $a['average'] . "\n"; output:3.5 (example)...
Read More

Steps to Install MYPLC successfully with out any problems

Below are the steps to install MYPLC ( planet-lab ) With out any problems Step1 : Download and Install Fedora 12 Download Fedora Linux 12 CD 32 bit i386 (694M) Download Fedora Linux 12 CD 64 bit (698M) Step2 : After Install  yum update Step3 : Add myplc repo [root@xyz~]# cd /etc/yum.repos.d/ [root@xyz yum.repos.d]#...
Read More

Wednesday, 19 September 2012

Disable or Turnoff IPTables ( Firewall ) in Linux

Below Steps show how to disable IPTABLES ( Firewall ) in Linux Check IPTABLES are running [root@xyz ~]# service iptables status Table: mangle Chain PREROUTING (policy ACCEPT 1169 packets, 809K bytes) num   pkts bytes target     prot opt in     out     source              ...
Read More

Disabling SELINUX in Fedora

Below steps show how to disable SELINUX To test SeLinux is running or not [root@center /]# selinuxenabled && echo enabled || echo disabled enabled So SELINUX is Enabled To stop temporary [root@xyz~] sudo setenforce 0 To stop SELINUX permanently [root@center /]# vim /etc/selinux/config #And change SELINUX=enforcing to SELINUX=disabled Save...
Read More

Adding Repo file in Fedora - example myplc repo

Below Steps will guide how to add repo file and how to install software  [root@xyz~]# cd /etc/yum.repos.d/ [root@xyz yum.repos.d]# vim myplc.repo #Add Following Lines to myplc.repo [myplc] name= MyPLC baseurl=http://build.onelab.eu/5.0/rc22/onelab--5.0-rc22-f12-32/RPMS enabled=1 gpgcheck=0 [root@xyz yum.repos.d]# yum...
Read More
Here We Write The Problems we face at different situations and Solutions to those problems.