Wednesday, December 28, 2011

Ruby on rails installation

http://blog.ivanbernat.com/post/10359439852/install-rails-3-on-ubuntu-10-10

Monday, October 10, 2011

Graphics.h in Ubuntu

http://www.rajivnair.in/2007/07/graphicsh-in-gnulinux.html

Friday, September 9, 2011

Just for fun

Go to Google Home page
:
:
search 'Google gravity' ,
.
open the 1st Link (i.e)-"Google gravity"
.
wait for 5 seconds and see
...what happens !!xD
.
Then Write Something in Google
Tab .. & Press Enter.

Tuesday, September 6, 2011

Video n Audio Download in Firefox + Ubuntu

KGet + FlashGot add-on in firefox for video n audio download in mozilla firefox in ubuntu...

Saturday, September 3, 2011

Git and IRC

http://git.or.cz/course/svn.html


http://www.irchelp.org/irchelp/irctutorial.html

Thursday, July 14, 2011

JavaScript Code Snippets

Detecting your browser :

The navigator object is used to detect the browser, version, and other stuff about the visitor's browser.

Code :


<html>
<body>
<div id="example"></div>

<script type="text/javascript">

txt = "<p>Browser CodeName: " + navigator.appCodeName + "</p>";
txt+= "<p>Browser Name: " + navigator.appName + "</p>";
txt+= "<p>Browser Version: " + navigator.appVersion + "</p>";
txt+= "<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>";
txt+= "<p>Platform: " + navigator.platform + "</p>";
txt+= "<p>User-agent header: " + navigator.userAgent + "</p>";

document.getElementById("example").innerHTML=txt;

</script>

</body>
</html>



Creating and using Cookies :

<html>
<head>
<script type="text/javascript">
function getCookie(c_name)
{
var i,x,y,ARRcookies=document.cookie.split(";");
for (i=0;i<ARRcookies.length;i++)
  {
  x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
  y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
  x=x.replace(/^\s+|\s+$/g,"");
  if (x==c_name)
    {
    return unescape(y);
    }
  }
}

function setCookie(c_name,value,exdays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value;
}

function checkCookie()
{
var username=getCookie("username");
if (username!=null && username!="")
  {
  alert("Welcome again " + username);
  }
else
  {
  username=prompt("Please enter your name:","");
  if (username!=null && username!="")
    {
    setCookie("username",username,365);
    }
  }
}
</script>
</head>
<body onload="checkCookie()">
</body>
</html>
 

Sunday, July 10, 2011

C++ in Ubuntu

time delay :

#include <unistd.h>
usleep(3000000); 
 
 

Graphics code snippet :

 
#include <graphics.h>
#include <iostream>
#include <unistd.h>



using namespace std;

int main()
{
 int a,gd,gm=VGAMAX;
 gd=DETECT;
 cout<<"Give a number : ";
 cin>>a;
 initgraph(&gd,&gm,NULL);
 circle(100,100,a);
 usleep(1000000);
 return 0;
} 

Getting started on UBUNTU

Things to do for graphics.h :

http://www.rajivnair.in/2007/07/graphicsh-in-gnulinux.html


eg : http://www.cplusplus.com/forum/general/19079/

Setting up LAMP :

https://help.ubuntu.com/community/ApacheMySQLPHP

Install php mail on ubuntu :
http://www.youtube.com/watch?v=dKO4MfOpDVs