Very Important For My LIfe!!!!!!!! 100 % party if I get a job!!!!!!

Archived from the original Sajha.com — preserved as posted, replies can no longer be added here.
Start a New Discussion
Archived Post

Last edited: 16-Aug-09 09:15 PM

micky_micky · Aug 12, 2009 11:22 PM · 15,763 views

19 Replies

As soon as i read "Write a script to print "Hello World" backwards. "  I lost any initiative to help you out.  Good luck working for them IF you somehow manage to get the job.

dekchidriver · Aug 13, 2009 12:47 AM

haina kaam pauna ramro skill nai hunu parcha kyarea after graduation hai?.....as a trainee lidaina kasailea...khai padai sakda ni kei kura ma skill na hola jasto cha...bijog cha.

csz5s · Aug 13, 2009 2:05 AM

what you mean by backword....and yeah i did some database programming but i guess i cant help you out with web portal anyway....why dont you send me whatever you made so far and i can try to work out in that.......mail me at mysteriousraj@gmail.com hope it works and we will work it out cheers...

refugeeNP · Aug 13, 2009 2:08 AM

Hey micky_micky First of all congratulatons for passing the interview though you sound not good enough to become a computer engineer or whatever. I don't know how to use CGI/Perl to write backwards but I know how to do by HTML. For the table, it's really easy but i don't have time to do it. But i would give you suggestion to do by yourself than asking help here. For help, you can visit www.w3schools.com. For the webportal, you can use HTML. I am not good at PERL.   Like i said, visit www.w3schools.com and that would help you a lot to go through this assignment.   Laterzzzzzzz Sirus_Me

sirus_me · Aug 13, 2009 2:52 AM

i will give you a perl code for the first one... rest try it yourself #!/usr/bin/perl $str = "Hello World!"; # reverse string # $rts now contains !dlroW olleH $rts = reverse($str); print "Reverse of: $str is: $rts"

thapap · Aug 13, 2009 6:28 AM

Thanks everyone for replying and trying to help me out. I have developed everything and submitted to the manager and he is very happy to see that he said everything you have done is great but He wants me to change something which I dont know........he said the starting perl script, and sql part is excellent but in later part asked me to change it into MVC Framework in Perl i.e. He wants me to do in using CGI::Application and HTML::Template and I have done using plain cgi and HTML.. I am going to paste my code here Please Pleaseeeeeeeee Anyone who have knowledge of CGI::Application and HTML::Template could you pelase Help me out........ Seems like he likes me and I will get hired if I can convert this part and My life will be better Here is my complete code Login Form <html> <head> <title>Log In Form</title> <script language="JavaScript" type="text/javascript"> function form_validation() { if (login.User_Name.value == "") { alert( “Please enter your user name" ); login.User_Name.focus(); return false ; } elsif (login.Password.value==””) { alert (“Please enter your Password”); login.Password.focus(); return false; } else { return true; } </head> <body> <form name = "login" action = "logincheck.cgi " method = "POST"> <table> <tr> <td>User Name<br /></td> <td>Password<br /></td> </tr> <tr> <td><input type = "text" name = "User_Name" id = "User_Name" size = "20" maxlength = "20" tabindex = "0" /></td> <td><input type = "password" name = "Password" id = "Password" size = "20" maxlength = "20" tabindex = "1" /></td> </tr> <tr> <td><input type = "submit" value = "Login" tabindex = "2" /></td> </tr> </table> </form> </body> </html> 2)Logincheck.cgi #!/usr/bin/perl use strict; use DBI; use CGI qw(:standard); use CGI::Carp qw(warning's fatalsToBrowser); $database = “Oracle”; $db_server = “ECAT01B”; $user = ”ECSTWEB”; $password = “ECSTWEB”; My $cgi=CGI->new print $cgi->header; print $cgi->start_html(-title=>'Login Check Form'); my $dbh = DBI->connect (‘DBI: $database: $db_server ','$user ','$password ', { RaiseError => 1, AutoCommit => 0 } ) || die "Database connection not made: $DBI::errstr"; my $User_Name = param('User_Name'); my $Password = param('Password'); my $SEL = “select User_Name, Password from User_Info where User_Name = $User_Name and Password = $Password”; my $sth = $dbh->prepare($SEL) or die “ Couldn’t prepare the query: $dbh->errstr”; my $rv = $sth ->execute or die “Couldn’t execute query: $dbh ->errstr”; while (($SQLUser_Name, $SQLPassword) = $execute -> fetchrow_hashref()) { if (($password eq “$SQLPassword”) and ( $User_Name eq “$SQLUser_Name”)) { print $cgi->redirect( location=>"display.cgi"); } else{   print $cgi-><form name = "error" action = "login.cgi " method = "POST"> print “Login Error!! Please Login Again, UserName Or Password Incorrect”; print $cgi->table({border=1}); print <tr><td> <input type = "submit" value = "Try Again"/></td></tr> print $cgi->end_table; print $cgi-></form>  location=>"login.cgi" } $dbh->disconnect; print $cgi->end_html; } display.cgi #!/usr/bin/perl use strict; use DBI; use CGI qw(:standard); use CGI::Carp qw(warning's fatalsToBrowser); $database = “Oracle”; $db_server = “ECAT01B”; $user = ”ECSTWEB”; $password = “ECSTWEB”; My $cgi=CGI->new print $cgi ->header; print $cgi->start_html(-title=>'Login Check Form'); my $dbh = DBI->connect (‘DBI: $database: $db_server ','$user ','$password ', { RaiseError => 1, AutoCommit => 0 } ) || die "Database connection not made: $DBI::errstr"; my $SEL = “SELECT First_Name, Last_Name, Address, User_Name, Status, University FROM User_Info a, Admission_Code b, Univ_Code c, User_Admission_Status WHERE a.User_Name=d.U_Name and b.Adm_Code=d.Admission_Code and c.Univ_Code=d.Univ_Code and a.User_Name='form.User_Name'”; my $sth = $dbh->prepare($SEL) or die “ Couldn’t prepare the query: $dbh->errstr”; my $rv = $sth ->execute or die “Couldn’t execute query: $dbh ->errstr”; print $cgi->table({border=1}); print"<tr><td>First_Name</td><td>Last_Name</td><td>Address</td><td>User_name</td><td>Status</td><td>University</td></tr>;   while (my @row = $sth->fetchrow_array) { print"<tr><td>$row[0]</td><td>$row[1]</td><td>$row[2]</td><td>$row[3]</td><td>$row[4]</td><td>$row[5]</td></tr>\n"; } print $cgi->end_table; print $cgi->end_html; ------------------   Thanks ALot I will appreciate any help which can make my life

micky_micky · Aug 14, 2009 3:19 PM

http://www.sajha.com/sajha/htm... is this Micky micky..Said u just got the Visa and Joining the Texas Tech univ ..What bullshit is this...Clarify 

pyaradeshbasiharu · Aug 14, 2009 3:41 PM

Mr Pyaradeshbashharu,,,,,,,,,,, I don't see the need for me to clarify because of the way you have asked me but I am still explainning as I got help from many nice people. Yeah thats true but its for one of my friend. She got VISA and going to be there. Asked me if I know someone but I dint know anyone thats why I posted for her and told her to check the thread and have some more information.   Good that she found the place and everything and will be there soon I guess. If you can help me with current problem which I have posted that is more important that anything else in this world right now for me. Micky  

micky_micky · Aug 14, 2009 3:56 PM

U have everything ready with u...now time to put it  as MVC pattern. Even I would have done the same way as you have done if some one would have asked to write perl script for it. I have never used MVC pattern for perl. I was googling and found out if u already know perl, then its not that tough.. Here is a simple example:  src:http://www.redantigua.com/cgi-... I guess you should learn this, if u get job u'll need this anyway...so here is the tuorial for it http://www.perlmonks.org/?node... hope that helps We can use the same template as in the HTML::Template tutorial, helloworld.tmpl.html: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <title><TMPL_VAR NAME=THAT_FAMOUS_STRING></title> </head> <body> <b><TMPL_VAR NAME=THAT_FAMOUS_STRING></b> </body> </html> Then we create the module HelloWorldCgiApp.pm where we put all the code (thanks to Cory Trese for valuable comments!): # HelloWordCgiApp.pm package HelloWorldCgiApp; use lib qw(/home/redanti/perl); use base 'CGI::Application'; use HTML::Template; use strict; # Run at startup sub setup { my $self = shift; $self->start_mode('mode1'); $self->run_modes( 'mode1' => 'helloworld_cgi_app', ); # Use current path as template path, # i.e. the template is in the same directory as this script $self->tmpl_path('./'); } # HTML::Template-style "Hello, World!" sub helloworld_cgi_app { # The application object my $self = shift; # The message my $that_famous_string = 'Hello, world!'; # Open the html template # NOTE 1: load_tmpl() is a CGI::Application method, not a HTML::Template method. # NOTE 2: Setting the 'cache' flag caches the template if used with mod_perl. my $template = $self->load_tmpl( 'helloworld.tmpl.html', cache => 1, ); # Fill in some parameters $template->param( THAT_FAMOUS_STRING => $that_famous_string, ); # Parse the template my $html_output = $template->output; return $html_output; } 1; # so the 'require' or 'use' succeeds Finally we need a 'wrapper', helloworld.cgi-app.pl, which creates an object of our application and runs it: #!/usr/bin/perl -wT ## ## CGI Application Hello World ## use strict; use lib qw(.); use HelloWorldCgiApp; my $helloworld = HelloWorldCgiApp->new(); $helloworld->run();

techGuy · Aug 14, 2009 4:33 PM

Thanks techguy for your response, I have gone through that example but dint get much. Yeah of course I know perl that script whatever I have pasted above is written by me of course I took some online help but I can write perl codes. May be I am so exhausted or fraustrated or mentally tired dont know why I couldnt get much from that code. Normally I understand preey quick looking at those examples. Looks like you are good in perl too. Is there any way you can conver that for me plzzz, or do you know anyone who can do this as I always have the code ready. for the ones who know hwo to do should not take long. its not like I dont want to try or im not trying but I want to make sure I do it so that I have some hope for my life..I desparately need job and I may or maynot get good chance like this ever again. Thanks ALot TechGUy Micky

micky_micky · Aug 14, 2009 4:54 PM

I think this site has some more information about how to use http://search.cpan.org/~markst...  

micky_micky · Aug 14, 2009 5:21 PM

anyone anything on this?

micky_micky · Aug 16, 2009 8:47 PM

Shame on u..u don't deserver to get the Job..

pyaradeshbasiharu · Aug 16, 2009 9:00 PM

I can't believe that you are posting the questions online. I hope the employer is dumb enough not to do a google search.

HowardRoark · Aug 16, 2009 9:06 PM

thanks howard. u r so right and also  sorry sabai saathi haru lai coz maile thread ma bhayeko kura haru delete gareki chu ......... sabailai dhanyabaad sahayog ko lagi tara im so sorry coz maile dheraiko thread haru delete gareki chu so that mero kaam dine maanchele khojyo bhane patta nalagayos

micky_micky · Aug 16, 2009 9:34 PM

bitch u missed the cache

pyaradeshbasiharu · Aug 16, 2009 9:59 PM

I love you Pyaradeshbashiharu......I learned from childhood that hatred can be changed by loving them

micky_micky · Aug 16, 2009 10:15 PM

Oh yeah, Mr Gandhi..don't u have any self respect whatsoever

pyaradeshbasiharu · Aug 16, 2009 10:23 PM

looks like you dont have the one thats why you keep on finger pointing other people handsome

micky_micky · Aug 17, 2009 4:01 PM

This conversation is preserved exactly as it was on the original Sajha.com and can't accept new replies.

Start a New Discussion

You might be interested in...

Recent Classifieds View all
Upcoming Events View all
Service Providers View all