Tuesday, August 13, 2013

Installing Joomla Template



The first thing you need to do is to download the new Joomla template. there are many sites that you can find free templates just Google and find it.



after you download the template file login to the administrative page of  the joomla website and upload the template through extension manager. 

Then go to template manager and choose the theme you installed. 





this page you can see all the templates then change the newly installed theme as the default by just clicking the star under default column heading.





 Now refresh your joomla site , the u can see that new theme has been assign to your joomla site.

cheers !!

Sunday, August 4, 2013


Installing Joomla




  1. Download Joomla 3.0

    The first step in installing Joomla 3.0 is to actually download it. 
  2. Run the Joomla 3.0 Installation Wizard


    install-joomla-configuration1. Configuration
    On the configuration page, you'll need to select your language, enter a name and description for your site, and setup your administrative details (such as username, password, and email address). Click the screenshot to the right to see how we filled out our configuration details. Click Next to continue the installation.
    install-joomla-database-settings2. Database
    In step 2, you will configure Joomla with the database you setup in Step 3 above. On most servers, you can set the Database Type to MySQLi and set the Host Name to localhost. When finished entering your database credentials, click Next.

    install-joomla-overview3. Overview
    If this is your first time using Joomla 3.0, you may want to use the option to install sample data   This will help you learn how Joomla 3.0 works because your new Joomla website will include sample articles. Also, You can select Yes next to Email Configuration if you want to have a copy of the installation details emailed to you. When finished with this page, click the Install button.
  3. joomla-installation-successfulYou should then see a success message, stating that Joomla 3.0 has been successfully installed.

    At this point, click the Remove installation folder button. Now that you have installed Joomla 3.0, and experience the joomla with writing new post.

Monday, July 8, 2013

Creating Java Web Service
This post will teach you how to create JAVA web service using Netbeans IDE. 

1) first start new java web application.


2) then select the project and add new package . then right click on the project and go to New -> Web Service. then select the package that u want to add web service class.


3)then You can see web service class file 



4) then open the web service java class , then you can see the java web method.
 @WebMethod(operationName = "hello")

    public String hello(@WebParam(name = "name") String txt) {

        return "Hello " + txt + " !";

    }@WebMethod(operationName = "hello") - this annotation is use to show web method name in WSDL.@WebParam(name = "name") - this annotation use to show web method parameters in WSDL.



Tuesday, May 21, 2013

Object Oriented Programming - Exception handling


 Write a java source code of a program with following features:  

1) A class StudentNames that manages a String array of names of the 20 students. Include following methods: a. void addName(String name)  :  add names to the array b. void deleteName(String name) :  delete names from the array based on name c. void deleteName(int id)  :  delete names from the array based on index d. boolean search(String name)  :  search a name e. void addName(String name, int index): add name to an index   
2) Two user defined exceptions IndexNotAvailableException and IndexOutOfRangeException as subclasses of the java Exception class. Throw an IndexNotAvailableException if a name exists in the location. Throw an IndexOutOfRangeException if an index is out of range (index < 0 || index > 20) 


public class StudentsName {

    String [] names ;
    int index;
    public StudentsName() {
        names = new String[20];
        index = 0;
    }
   
    void addName(String name) throws IndexOutOfBoundsException{
       
        if(index >= 20){
            throw new IndexOutOfBoundsException();
        }else{
            names[index] = name;
            index ++;
        }
   
    }
   
    void deleteByName(String name){
        for(int i=0;i<20;i++){
            if(names[i].equals(name)){
                names[i]="";
                break;
            }
        }
   
    }
   
    void deleteByIndex(int id)throws  IndexOutOfRange{
        if(id <0 || id >=20){
        throw new IndexOutOfRange();
        }else{
            names[id]="";
        }
   
    }
   
    boolean search(String name){
     for(int i=0;i<20;i++){
            if(names[i].equals(name)){
               return true;
            }
        }
        return false;
    }
   
    void addname(String name , int index) throws IndexOutOfRange, IndexNotAvailable{
        if(index < 0 || index >= 0){
            throw  new IndexOutOfRange();
        }else if(!names[index].isEmpty()){
            throw  new IndexNotAvailable();
        }else{
       
        }
    }
     
}



class IndexNotAvailable extends Exception{

    public IndexNotAvailable() {
        System.out.println("Entered index is not available !!");
    }
   

}

class IndexOutOfRange extends Exception{

    public IndexOutOfRange() {
        System.out.println("Entered index is not in range !!");
    }


}

Sunday, January 20, 2013

Practicle test help

1)Create function to take two integer arguments and compare them and if no1 > no2 then swam them.

                 void swapGreater(int number1, int number2);

2)Create function to take an array as a input argument and shift larger walue in to the last array element.

                 void arraySort(int *array);


                 first array look - 12, 300 ,4 ,56 , 67, 3
                 after swap  - 12 , 4,56,67,3,300


3) Create function to read values to array from key board.

                void takeInputs(int *array);

4) Create function to dsplay values from array .

                void displayValues(int *array);

5)
 Create the main mehod and do the following.

                      create array with 6 elements;
                      take values from keybord using takeInputs function.
                     do 5 times arraySort function call to the array.
                     display the array using displayValues function

** this question is 100% not the same , but the program u have to write for this problem is same as the practical test.

ANSWER..............

#include<stdio.h>

void swapGreater(int *no1, int *no2);

void arraySort(int array[]);

void takeInput(int *array);

void display(int *array);


main(){


int array[6],i;

takeInput(array);

printf("before sort !! \n");

display(array);

for(i=0;i<5;i++){

arraySort(array);

}

printf("after sort !! \n");

display(array);


}


void swapGreater(int *no1, int *no2){

int temp;

if(*no1 > *no2){

temp = *no1;

*no1 = *no2;

*no2 = temp;

}



}


void arraySort(int array[]){

int i;

for(i=0;i<5;i++){

swapGreater(&array[i],&array[i+1]);

}



}


void takeInput(int *array){

int i;

printf("enter 6 values \n");

for(i=0;i<6;i++){

scanf("%d",&array[i]);

}


}


void display(int *array){

int i;

for(i=0;i<6;i++){

                printf("%d \n",array[i]);

        }


}



Thursday, November 29, 2012

Exercises (arrays, pointers, functions).

Exercises (arrays, pointers, functions).


1. Write a program to update the value of the double variable flt_num from 123.45 to 543.21 by
using a double pointer.

2. Given a character variable ch and ch = ‘A’, write a program to update the value of ch to
character 'a' by using a pointer.

3. Given an integer array initialized as (int niceArray[]={23,4,4,56,45,5,6,1,34,787};), write a
program to increase each array element by 1000 using a nother pointer.

4. Write a function to calculate a factorial value. Then use that function to calculate 6C2 (possible
combinations in selecting 2 out of 6) and display the value.
(Hint: int factorial(int f1); combinations=factorial(6)/(factorial(2)*factorial(4)); )

5. Write seperate functions,
1. to read an integer value from the keyboard, (int readNumber(); )
2. to display two integer values, (void display(int a,int b); )
3. to swap two integer values, (void swap(int *c,int *d); )
Write a program to read two integer values to two variables, display them
before their values are swaped between them then swap those values and
finally display the two variables. (Hint: Use above functions)

Thursday, November 22, 2012

Loop Assignment Answers

Loop Assignment Answers


1) Write a program to display numbers from 1 to 250.

2) Write a program to calculate the sum of all the numbers less than a given number n.
ex: output
Enter number : 3
6
Enter number : 5
15




3) Write a program to display “hello world” for every time we enter the character 'y' and stop the
program when we enter the character 'n'. For any other character program should not stop or
display anything.

4) Write a program to calculate the factorial value for a given number N.

5) Write a program to calculate number of possible combinations that we can have when we
selecting r number of elements from n number of different elements. This can be calculated by
calculating the value n!/(r!*(n-r)!).