How to install Juniper Network Connect (VPN) on Ubuntu

You may be facing the same problem as i faced in connecting VPN through junipers network connect from Ubuntu platform.

There are two reasons behind this :

  • Java run time is not installed on your computer or if installed then you must missing the Java plugin for Firefox.
  • An error of password when it is installing the network Connect package in your system, the description is at the time of installation it asks for su/root password and when you type your  password press enter , it says password not correct try again or some msg like this.

lets start step by step :

  • The answer to first problem is very easy and common please make sure that you have installed java and java plugin for browser (Firefox). if you need any help in installing java or plugin then you can read this: Install java run time . In short run this command in terminal : sudo apt-get install sun-java6-jre sun-java6-plugin , after doing this restart your brwser now are ready to go. Wait one more thing may be you stuck on the agreement step of installation of Java, the problem is you are not able to accept it i mean you are  not able to press Ok , the clever solution is press tab at this point to highlight Ok then press Enter button.
  • Now the second problem is really more interesting , the guys who have developed this Juniper package assumed that there are only two types of super user su and root , these are common super user types for other linux providers but our Ubuntu uses sudo as super user then? Thats why it was not accepting your password at the time of installation because there is no su or root user available on your Ubuntu machine for that password. Now what we will do is create a user account on machine with the name root:

sudo passwd root
[sudo] password for irfan:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

Now your machine is ready to install Juniper Network Connect package and you can connect to VPN .

Now you can provide this password you just set,  when installing.

Remember this is one time process.

Thanks

-Irfan

Search Bugs In Bugzilla Faster !!!

Hi, There is a way in bugzilla to search bugs faster without remembering Bug Id etc, It is just few steps away to search faster than before:

  • Search for the text “Install the Quick Search plug in” in bottom of your organizations Bugzilla home page.
  • Click on this and it will add an additional search option in your Firefox search plug in on top right of your browser.

Here you can just type a topic and it will take you the bug list related to that topic. Enjoy ;)

Ajax Request

Hi, i am giving here a complete javascript code to do a ajax request that runs on any browser.This example has a text box and a div below itwhen you type a user name in text box it will fetch matching results by like query and show you rest formating you can do as u wish.

<html>
<body>

<script type=”text/javascript”>
function ajaxFunction()
{
var xmlHttp;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp=new ActiveXObject(”Msxml2.XMLHTTP”);
}
catch (e)
{
try
{
xmlHttp=new ActiveXObject(”Microsoft.XMLHTTP”);
}
catch (e)
{
alert(”Your browser does not support AJAX!”);
return false;
}
}
}

xmlHttp.onreadystatechange=function()
{
if(xmlHttp.readyState==4)
{
if(xmlHttp.status==200)
{
//alert(xmlHttp.responseText);
document.getElementById(”hint”).innerHTML=xmlHttp.responseText;
}
else
{
alert(”failure”);
}
}
}

//xmlHttp.open(”GET”,”ajax.php?username=”+document.
getElementById(’username’).value,true);

//for get
//xmlHttp.send(null);   //for get

xmlHttp.open(”post”,”ajax.php”,true);  //for post
var query=”username=”+document.getElementById(’username’).value;  //for post
xmlHttp.setRequestHeader(”Content-Type”, “application/x-www-form-urlencoded”);

//for post
xmlHttp.send(query);   //for post

}
</script>

<form name=”myForm”>
Name: <input type=”text” onkeyup=”ajaxFunction();” name=”username” id=”username”>
Hint: <div id=”hint”></div>
</form>
</body></html>

This is the html file and here is a php code for server side processing-

<?php
$username=$_REQUEST['username'];
if($mysqli=new mysqli(’localhost’,'root’,”,’test’))
{
//echo”conected”;
$query=”select login from user where login like ‘”.$username.”%’”;
$query_result=mysqli_query($mysqli,$query);
while($row=mysqli_fetch_array($query_result))
{
$query_array[]=$row['login'];
}

echo $query_array[0].’ ‘.$query_array[1];
}
else
{
echo “Sorry! Unable to connect”;
}
?>



High Level PHP Oop Concept

  • Abstract class’s abstract function cannot be declared private. It can be protected or public (default).
  • Abstract class’s non abstract method can be private.
  • To declare abstract keyword is abstract.
  • Any class’s public method can also be called like this Car::carSpeed(); , if there is no __construct declared or it is there but don’t need any arguments to initiate the class.
  • Narrowing is not allowed only widening is allowed in inheritance concept weather you are working with abstract class interface or just simple inheritance.(Narrowing:-decreasing access level like in parent it was public and in child you are changing it to the protected or private. Widening: – increasing the access level like in parent it is private and you are changing it to public or protected.)
  • Static method cannot be private it can be protected or public.
  • Interface can have static method but in that case it also should be declared static in implementing class.
  • Every method of interface must be public there is no other option.
  • Interface cannot contain any member variables, not even static, only functions are allowed.
  • Abstract class can contain any type of member variables (private, public, protected or static ).
  • When writing public static then keyword order doesn’t matter , you can write like this also static public.
  • When writing static method private or protected it will not give any error it can be. But the condition is you are using it in child class .if you will use it like this Car::carSpeed(); then it will show error.

What Is Zend Engine

Zend Engine is an open source scripting engine just like engine in a car. The Zend Engine is developed by two students Zeev Suraski and Andi Gutmans (at the Technion – Israel Institute of Technology) in 1999 for PHP4 called Zend Engine-1, and the current is for PHP5 called as Zend Engine-2. Before these engines we were using old and less powerful engine developed by the inventor of PHP Rasmus Lerdorf.

Here is the brief of zend engine, it consists of fallowing:

  • Interpreter(Run Time Compiler)
  • Executor
  • Function Module Interface

I am expecting that we all know what is interpreter so there is no need to discuss it. The latest feature is Extension Interface that makes it extensible, like  Zend Debugger,Zend Optimizer,Zend Persistent compiled Script Registry and Zend script to binary file compiler, this feature is not depicted in diagram. Executor is responsible for finally executing the code and generating output. Function module interface is used for including different functionality like   MySql,Oracle,PostgreeSQL,XML,Math,Com Components, ODBC, WDDX etc. So the conclusion is Zend Engine is just  a virtual machine that is responsible for including different modules to finally providing the output, the interpreter is just a small part of  it.