Wednesday, 28 May 2014

basic concept of cpp




 introduction of cpp.

·       Cpp programming language is developed by Bjarne stroustrup in the early 1980 at Bell Laboratories.
·       Cpp is one type of object oriented language.
·       It’s in used class is concept of structure these have first of all these called clss with c.
·       Cpp extent ion denoted improvement in c.



Give the basic concept of cpp. 

Object

·         To combine both data and function in single unite is called object
·         Object are basic runtime entities.
·         Syntax
   Class name  object name;

Class

·         Class is an expanded concept of data structure, it can hold both data and function.
·         Class classname.

Data abstraction

·         Classes use the concept of abstraction and are defined list of abstract attributes(data).

Data encapsulation

·         both data and function in single unit is called data encapsulation .

inheritance      

·         code reusability is called inheritance.

Polymorphism

·         ability to take more than one form is called polymorphism

dynamic binding

·         it is also called dad binding
·         it is run time polymorphism

message passing 

·         object communicate with each other by sending or receiving message. 



What is the disadvantages of c ?

·         In c not provide security
·         We not easily find out which data used by which function
·         Code length is more
·         Boolean data type not available.
·         Provide less functionality
·         Function have unrestricted access of global data

struts2



projectname/webcontent/webinf/web.xml

web.xml


<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>rta</display-name>
<welcome-file-list>
<welcome-file>login.jsp</welcome-file>
</welcome-file-list>
<!-- this portion use in smartbid for session menagement
<filter>
<filter-name>logFilter</filter-name>
<filter-class>com.smartbid.controller.LogFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>logFilter</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping> -->
<listener>
<listener-class>
org.apache.struts2.tiles.StrutsTilesListener
</listener-class>
</listener>
<context-param>
<param-name>tilesDefinitions</param-name>
<param-value>/WEB-INF/tiles.xml</param-value>
</context-param>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>


struts.xml
umesh sohaliya
umesh sohaliya


projectname/resource/struts.xml




<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>

<package name="default" extends="struts-default">

<result-types>
<result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" />
</result-types>


<!-- main page tiles action comming from homepage home link -->

<action name="a" class="dtb">
<result name="success" >/login.jsp</result>
</action>

<action name="log" class="logcheck" >
<result name="success" type="tiles">main.tiles</result>
<result name="error" >/login.jsp</result>
</action>

<action name="main" >
<result name="success" type="tiles">main.tiles</result>

</action>

<!-- poll -->
<action name="playpoll" class="playpoll">
<result name="success" type="tiles"> playpoll.tiles</result>
</action>

<action name="newpoll" class="newpoll">
<result name="success" type="tiles"> newpoll.tiles</result>
</action>

<action name="epoll" class="epoll">
<result name="success" type="tiles"> main.tiles</result>
</action>

<action name="Reqpoll" class="reqpoll">
<result name="success" type="tiles"> Reqpoll.tiles</result>
</action>

<action name="resultpoll" class="resultpoll">
<result name="success" type="tiles">resultpoll.tiles</result>
</action>

<action name="createpoll" class="createpoll">
<result name="success" type="tiles">main.tiles</result>
</action>

<action name="aaa" class="gopoll">
<result name="success" type="tiles">aaa.tiles</result>
</action>

<action name="findpoll" class="a">
<result name="success" type="tiles">findpoll.tiles</result>
</action>


<!-- page -->


<action name="createpage" class="createpage">
<result name="success" type="tiles">createpage.tiles</result>
</action>

<action name="findpage" class="findpage">
<result name="success" type="tiles">findpage.tiles</result>
</action>


<action name="coipage" class="coipage">
<result name="success" type="tiles">coipage.tiles</result>
</action>

<action name="epage" class="epage">
<result name="success" type="tiles">coipage.tiles</result>
</action>


<action name="boppage" class="boppage">
<result name="success" type="tiles">coipage.tiles</result>
</action>

<action name="lboppage" class="lboppage">
<result name="success" type="tiles">coipage.tiles</result>
</action>

<action name="aboppage" class="aboppage">
<result name="success" type="tiles">coipage.tiles</result>
</action>

<action name="savepage" class="savepage">
<result name="success" type="tiles">savepage.tiles</result>
</action>

<action name="show" class="show">
<result name="success" type="tiles">show.tiles</result>
<result name="error" type="tiles">owner.tiles</result>
</action>

<action name="pagesearch" class="pagesearch">
<result name="success" type="tiles">pagesearch.tiles</result>
</action>



<action name="upg" class="pgupld">
<result name="success" type="tiles">owner.tiles</result>
</action>

<!-- upload -->
<action name="umain" class="upldmain">
<result name="success" type="tiles">main.tiles</result>
</action>

<!-- search -->

<action name="abc" class="abc">
<result name="success" type="tiles"> search.tiles</result>
</action>

<!-- - create friend -->

<action name="add" class="addf">
<result name="success" type="tiles">search.tiles</result>
</action>

<!-- notification -->
<action name="noti" class="noti">
<result name="success" type="tiles">main.tiles</result>
<result name="error" type="tiles">show.tiles</result>
<result name="input" type="tiles">playpoll.tiles</result>
</action>

<!-- log out -->
<action name="logout" class="logout">
<result name ="success">login.jsp</result>
</action>


<!-- profile -->

<action name="viewprofile" class="updateprofile">
<result name="success" type="tiles" >viewprofile.tiles</result>
</action>

<action name="updateprofile" class="updateprofile">
<result name="success" type="tiles">updateprofile.tiles</result>
</action>

<action name="userpro" class="userpro">
<result name="success" type="tiles">userpro.tiles</result>
</action>

<action name="savepro" class="savepro">
<result name="success" type="tiles">main.tiles</result>
</action>


<action name="about" >
<result name="success" type="tiles">about.tiles</result>
</action>



<action name="contact" >
<result name="success" type="tiles">contact.tiles</result>
</action>

</package>
</struts>





jsp

*.jsp

<%@ taglib uri="/struts-tags" prefix="s"%>

first.jsp

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


<html>
<head>
<style type="text/css">

#thumbContainter {
color:white;
background: url("images/bg.png") repeat scroll left top transparent;
bottom: 0;
box-shadow: -2px 0 10px #000000 inset;
left: 0;
margin: 0;
padding: 0 10px;
position: fixed;
bottom:20px;
width: 130px;
height: 70px;
border-radius:20px;
}
* {
margin: 0;
padding: 0;
}

</style>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title><tiles:insertAttribute name="pageTitle"></tiles:insertAttribute></title>
</head>
<body marginheight="0">
<table width="100%">
<tr >
<td colspan="3" width="100R%" > <tiles:insertAttribute name="header"></tiles:insertAttribute> </td>
</tr>
<tr height="100%">
<td width="20%" > <tiles:insertAttribute name="lhs" ></tiles:insertAttribute> </td>
<td width="60%"><tiles:insertAttribute name="content"></tiles:insertAttribute> </td>
<td width="20%"> <tiles:insertAttribute name="rhs"></tiles:insertAttribute> </td>
</tr>

<tr height="60px" ><td colspan="3"> <tiles:insertAttribute name="footer"></tiles:insertAttribute> </td></tr>


</table>
</body>
</html>


Wednesday, 18 January 2012

starting graphics with c or c++


before some time in c or c++ not support graphics it's in we only made simple dos base application 

    including graphics in c or c++ we made more flexible over application we also create animation using graphics. it's in BGI is contain some graphics driver . 

     tc have it's special screen resolution (1024*768). if over system's screen resolution not match with it's we can't able to create graphics appliction.

    you want to create application with graphics  below code is useful to your starting 

Write a program to create windmill with speed control speed up have press ‘h’ speed decrease have press ‘d’ you want to exit press ‘E’.

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
void main()
{
int ch;
int gdriver=DETECT,gmode;
int xc,yc,i,speed=250;
int stangle=0,endangle=30,radius=100;

initgraph(&gdriver,&gmode,"c:\\tc\\bgi");

xc=getmaxx()/2;
yc=getmaxy()/2;

while(1) {
stangle=0;
endangle=30;
for(i=0;i<12;i++)
cleardevice();
setfillstyle(i,i);
circle(xc,yc,10);
outtextxy(250,100,"pawanchakki");
outtextxy(10,5,"Er.UmeshSohaliya");
outtextxy(10,15,"ph-9978748582");
outtextxy(10,30,"press h to increase sped");


outtextxy(10,40,"press d to dcrease sped");
outtextxy(10,50,"press e to exit");

setbkcolor(RED);

rectangle(xc-5,yc,xc+5,yc+200);
rectangle(xc-20,yc+200,xc+20,yc+225);


pieslice(xc,yc,stangle,endangle,radius);
pieslice(xc,yc,stangle+120,endangle+120,radius);
pieslice(xc,yc,stangle+240,endangle+240,radius);
stangle=endangle;
endangle +=30;

setcolor(GREEN);

delay(speed);
if(kbhit())

{
ch=getch();
if(ch=='h')
if(speed>10)
speed -=20;
if (ch== 'd')
if(speed<1000)
speed +=10;
if(ch=='e')
exit(0);
}
setcolor(YELLOW);
 }
closegraph();
getch();
 }




Write a program to create windmill with speed control speed up have press ‘h’ speed decrease have press ‘d’ you want to exit press ‘E’.

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
void main()
{
int ch;
int gdriver=DETECT,gmode;
int xc,yc,i,speed=250;
int stangle=0,endangle=30,radius=100;

initgraph(&gdriver,&gmode,"c:\\tc\\bgi");

xc=getmaxx()/2;
yc=getmaxy()/2;

while(1) {
stangle=0;
endangle=30;
for(i=0;i<12;i++)
cleardevice();
setfillstyle(i,i);
circle(xc,yc,10);
outtextxy(250,100,"pawanchakki");
outtextxy(10,5,"Er.UmeshSohaliya");
outtextxy(10,15,"ph-9978748582");
outtextxy(10,30,"press h to increase sped");


outtextxy(10,40,"press d to dcrease sped");
outtextxy(10,50,"press e to exit");

setbkcolor(RED);

rectangle(xc-5,yc,xc+5,yc+200);
rectangle(xc-20,yc+200,xc+20,yc+225);


pieslice(xc,yc,stangle,endangle,radius);
pieslice(xc,yc,stangle+120,endangle+120,radius);
pieslice(xc,yc,stangle+240,endangle+240,radius);
stangle=endangle;
endangle +=30;

setcolor(GREEN);

delay(speed);
if(kbhit())

{
ch=getch();
if(ch=='h')
if(speed>10)
speed -=20;
if (ch== 'd')
if(speed<1000)
speed +=10;
if(ch=='e')
exit(0);
}
setcolor(YELLOW);
 }
closegraph();
getch();

basic sql information






SIMLE QUERY use in sql
spool g:/database/oracle/first  // save in given path
commit;//save outomatic
show pagesize;disply  pagesige
set pagesize (value);set pagesige
show linesige;show linsize
set linesize (value);set linesize
SELECT *FROM TAB;list of table
DESC tablename;Given structure
SELECT *FROM tablename; Information of define table

CQL++
·                Cql++  is editor
·                It have many user accesses all data at a time
·                Provide more  flexibility then sql
·                Database can be shared in efficient manner

DATA TYPE ->
1.           NUMBER
·                Used to store floating(real) or negative or positive value
·                Precisions can be up to 38 digit
2.           CHAR
·                Store character string or fix length
·                Maximum length is 255.
      3     VARCHAR
·                More flexible then character
·                Maximum length is 255
4                  VARCHAR2
·                it’s length is 2000
·                no default size will be consider
·                size must be specified
·                it is lover to accesses
5                  DATE
·                used to store date &time
·                standard format of   date is DD-MM-YY
6                  RAW
·                store binary type data
·                maximum size is up to 255 bytes
7                  LONG RAW
·                store large amount of binary type data
·                maximum length is up to 2 gb



SIMPLE SYNTEX USED IN SQL:

NEW CREATE TABLE-
CREATE TABLE tablename (columname1 datatype(size));
INSERT DATA/VLUES
INSERT INTO tablename values(‘&columname1’,’&columname2’);
View data in table
ALL ROW AND ALL COLOUM
SELECT *FROM tablename;
SELECTED COLOUM & ALL ROW
SELECT coloumname1,coloumname2 FROM tablename;
SELECTED ROW&ALL COLOUM
SELECT *FROM tablename WHERE condition;
SELECTED COLOUM&SELECTD ROW
SELECT coloumname1,coloumname2 FROM tablename WHERE condition;
UPDATE ROW/
UPDATE tablename SET coloumname= expretion WHERE condition;
MODIFY TABLE(coloum)
ALTERTABLE tablename MODIFY (coloumname newdatatype(size));
DROP COLOUM
ALTERTABLE tablenme DROPCOLOUM coloumname;
ADDNEW COLOUM
ALTERTABLE tablename ADD (coloumname datatype(size));
TRUNCATE &DELET
DROPTABLE tablename;
TRUNCATETABLE tablename;
DUPLICATE NOT SHOW
SELECT DISTINC coloumnme  FROM tablename;
ASCENDING/DESCENDING
SELECT *FROM tablename ORDER BY coloumname(order);//desc  --asce
DELETE PERTICULAR ROW
DELETE FROM tablename WHERE condition;
CREATE TABLE FROM ANOTHER TABLE
CREATE TABLE newtablename (coloumnamename1,coloumnname2)AS SELECT coloumnname1,coloumnname2 FROM oldtablename WHERE condition;    // where condition is use particular row have
INSERTING DATA INTO TABLE FROM ANOTHER TABLE
INSERT INTO newtablename (coloumname1,coloummname2) SELECT  coloumname1,coloumname2 FROM oldtablename WHERE condition;


Tuesday, 17 January 2012

problem of system crash


umesh sohaliya



when problem of System crash

v     See first what is problem
v     First open in normal mode
*                    See what is error report
*                    If your pc automatic shutdown you can’t see error message
v     open  in safe mode
*               see any error report or not
*               if you can’t view any report message & your computer work properly
*               but you have difficulty to why you  not able to open your computer in normal mode?
*               First solution it’s when your computer start quickly  task manager and end process which  related to graphics and other network driver
*               Second solution change your graphic driver , because your driver and your display or other graphics property does not match
*               You may be mark when you see any photos ,video or graphics when probable your system crash system.
v     If you open in safe mode and error occur
*                  See your hard disc there is damaged
*                  Not damage in your hard disc that means problem in your system.
*                  Try recover your system other not any chinches’
*                   You can’t able  recover your system sorry not other any solution.
                    Your have any other problem send mail on
                                      Umeshsohaliya85@gmail.com