Monday 4 August 2014

How to write recursive function in C++

// Video demonstration is on youtube : https://www.youtube.com/watch?v=9Wp_HUGJY-o
//Here is the program:
#include"stdio.h"
#include"conio.h"
void main()
{
void print_num(int);
void print_num_rev(int);
print_num(10);
printf("\n");
print_num_rev(10);
}
void print_num_rev(int n)
{
if(n<1)
return;
print_num_rev(n-1);
printf("%d,",n);
}

void print_num(int n)
{
if(n<1)
return;
printf("%d,",n);
print_num(n-1);
}

Saturday 2 August 2014

How to build menu in Oracle Forms

This is a demonstration of how to build menu in oracle forms.

1. Select menus in object browser and click on new icon in toolbar.

new menu oracle forms

2.  Double click on menu


3. Rename it to MU_MASTER.


4. Right click o MU_MASTER and select Editor. Menu layout editor will be displayed. Double click
    on it to rename it.


 5. A caption Master is given to the menu.



 6. In selected state click on create down to create sub-menu under Master.


7. As many times you click on create dow sub-menu uder master will be created.


8. Selecting master click on click right to another header menu. If you select any sub-menu of master
   and click o select right then sub-menu of that master sub-menu will be created.


   9.  Again selecting transaction if you click o click down menu then sub-menu under transaction
       will be created.


   10. Now select Master in the layout editor and press F4 or right click and click properties.
         Select command type from property palette and select PL/SQL to write trigger on this menu.


    11. After selecting PL/SQL from command type click on the button for Menu item code.








    13. Write your PL/SQL block for click event of the menu.


   14. Now create a form Test1.fmb, goto the form property palette and select File from Menu source.
         On the menu module property give the absolute path of your menu module.



    15. Press Ctrl + T to compile and make binary .fmx and ctrl+R to run the form. Build it and test it.

Friday 1 August 2014

How to install Oracle 12c database release 1 in Windows 8.

This is a simple attempt to guide you how to install Oracle 12c release 1 on Windows 8 platform.

1. Please visit oracle.com site and navigate to download page. Link can be found in the picture below.
    please make an account into oracle.com and don't forget to sign in.


oracle download site


2. Accept License agreement and click on the Microsoft Windows x64 (64bit).

Oracle download Accept license agreement

3.  Download the 2 zipped files named win64_12c_database_1of2 and win64_12c_database_2of2
     and unzip the zip files. Copy/Move  the contents on win64_12c_database_2of2 to
    win64_12c_database_1of2.

Unzip downloaded setup


4. Open the win64_12c_database_1of2 folder. Right click on setup and click on run as administrator.

run oracle 12c setup


5. Wait for the setup to initiate.

setup initiating

6. If you need to be informed about security issue you can provide your email address. If you are
    subscribed for Oracle support provide your password.

configure security updates  
    7. I preferred to skip both the step.

software updates

    8. I also preferred to skip software updates.

inittialization options

    9. Select Create and configure database from Installation option if you are doing a fresh
        installation, Select Upgrade an existing database if previous version (i.e. 11g) is already
        installed in you machine.

grid istallation option

   10. Select desktop class if you are installing in you home pc.

install type

   11. You can use existing windows user or create new user if you want a different windows login for
         oracle software. If you select create ew windows user oracle will create new user for you.

oracle home user selection

    12. Set you installation location, database edition, character set.

typical installation

   13. Set your global database name, administrative password. Avoid create as container database.

typical installation

   14.  You can ignore the password warning.

typical installation

    15. Prerequisite check is performed by Oracle. Click on next.

prerequisite check

   16. Click on install if you don't wat to change any settings, if you edit ay setting you will be drive
         back to that step and have to navigate again.

install product