Friday, February 18, 2011

XML


XML

XML stands for extensible markup language xml is designed to carry and transport data
Where as Html is just to display data,

Xml can be categorized into 2 types they are

 1.well formed xml
 2.Validate xml

 Rules of an xml
    It should be have opening and closing tags
    Tags should have properly nested
    We can define our own tags
    The root element is called parent element and it should have some child elements(tags)
     Elements are the tag names and attributes are called their values
    
 Well fomed xml should have to follow the above rules
  Validate xml is a well formed xml and it should follow DTD rules and regulations
  Validate xml having two types they are
                                       1.DTD
                                       2.Schema
DTD example
------------------- 

<!DOCTYPE note
[
<!ELEMENT note (to,from,heading,body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
]>
      

Schema example
<xs:element name="note">
<xs:complexType>
  <xs:sequence>
    <xs:element name="to" type="xs:string"/>
    <xs:element name="from" type="xs:string"/>
    <xs:element name="heading" type="xs:string"/>
    <xs:element name="body" type="xs:string"/>
  </xs:sequence>
</xs:complexType>
</xs:element>                          
  

Thursday, February 17, 2011

HTML -REFRESH


HTML
-----

Today i just to refresh my brain i go through  the w3schools.com doctype--rules of an

language it tells the mark up langauge to browser


DTD(document type definition)

1.strict---it contains all html elements,except  font and frameset

2.Transitional--it supports all html elements and attributes except frameset

3.Frameset---it supports all elements and  attributes

why we saying before we starting any html language just go through any site it saying a
huge big 3 line statement containing

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"> like this ....any website has validated by some
webstandards the rules must follow any website as per the browser understanding the

document are coming from html and browser will parse...

For validating any website just go to http://validator.w3.org/  in that validator website

you may enter url or just copy paste your own code or website html  code it will validate

the errors and returned to you .. and then today i refresh the html language  becuase i dont

want to forget anything.


<iframe> This tag is very useful to create an certain area in browser window we can

create an  new small window in html pages we can declare  the height and width

<target> using target we can fetch the  element from one location to another location




Now the Latest version of Html is HTML-5 it  supports the
      <canvas>
      <svg>
      <video>  

new html5 supports videos the biggest challenge is in future versions of browsers we

need not depend on flash player its an heavy weight one using canvas element in html5

supports to draw  graphics and pictures in browser with the help of javascript using svg

element we can draw circles, ovals,rectangles,polygon,polyline,line etc., previously for

this we need to depend on some other plugin but now observe web becomes most user

friendly

Saturday, January 29, 2011

Today i tried to install Bitnami stack in windows !

there are lots of stacks (packs) available for developing php environment it consists of lots of many applications and like xampp,wampp,lamp,bitnami etc.,
i just explored the bitnami stack in windows !

today i go through the website bitnami its a stack consisting of (apache,php,mysql)
bitnami is an open source stack it can having so many stacks

it can having the stack of postgresql instead of(mysql)

and also like drupal and joomla and moodle more .,



BitNami Infrastructure Stacks

Infrastructure Stacks are designed for developers and system administrators and provide you a way of deploying a LAMP or Ruby environment, but do not include any extra applications. It is not necessary to download an infrastructure Stack to use an application Stack.

for more information go to www.bitnami.org website 

and download the package 

and enjoy 

and later i encountered the problem of application using port no -80 later i rectified see my blog also for solving the port no-80 





Friday, January 28, 2011

How to find out the which application is using port 80 in windows ?

How to find out the which application is using the port 80 ?

Every application that needs to talk to other applications,
needs to have a port number. Every computer can give out port numbers
ranging from 0 – 65535, and once a port number is given,
it cannot be given to another application (while it is running at least)
so, one application is to one port number.
The reason why application have port numbers is so that,
when one application (say Firefox) wants to talk to another
application (in another computer, say Apache; a web server),
Firefox needs to know that when he sends out a message,
it will be received by the intended recipient (Apache),
and this can only be done if Firefox knows exactly where
Apache is. There are 2 components that make up a unique address of
an application — one is the IP address of the machine where the
application is running, and the other component is — you guessed it,
the port number; Collectively these two (IP address and port number)
are known as a socket, but that’s another story, let’s stop here —
What’s important to know is that, port numbers are — well, important;
they determine the uniqueness of an application within a

in windows u enter the command

C:\>netstat -aon | findstr 0.0:80

the pipe symbol extracts and get the input from netstat

TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 560

and then

C:\>tasklist | findstr 560

and the culprit is none other than skype :)

Monday, January 3, 2011

Joined in Bhea

today monday i joined..bhea knowledge technologies
staying accomodation in my cousins room. sunday i departured train from chennai central railway station lalbaugh express at 3.45 pm and reached bangalore city 10.00 pm and reached to my cousin room early morning waked up 6.30 a.m and rushed through to office by bike my cousin dropped me into office thanks to him ..i hope all things will go fine ...this new year resolution for everyone hope dreams come true ...i reached office at 8.30 i met ram sir and said wishes to him ..and later i filled all the formalities of our office ...and i later technical person sanjay interviewed me about the latest web technologies and asking what is json? how u implement it and asking the oops concepts ? asking what i mentioned everything in my resume .nice experience to me ..later i met ram sir he told he can take class after lunch . later reshma (h.r) introduced us to everyone in our office..later we went to lunch with our staff members

Thursday, December 30, 2010

Interview with Ram sir in slashprog

/today time at 5.30 interview with Ram sir bhea technologies (M.D) in our office
http://slashprog.com/
slashprog ..its such a nice experience he talking about the various technologies

and office timings and working culture finally they selected me yogesh and satya

also selected. we are decided to move bangalore they called to join and report

on monday ..

Wednesday, December 29, 2010

PHP array functions

today myblog

date 29/12/2010

today i learning array functions in php


array_change_key_case
-----------------------

<?php


$x=array('name'=>'john','age'=>25,'city'=>'mumbai');


print_r(array_change_key_case($x,CASE_UPPER));


?>

the output for the above programme is ---->


Array ( [NAME] => john [AGE] => 25 [CITY] => mumbai )




array_combine
----------------------
 
              this array function will taking this arguments as first array treating as array keys and the second array treated as values
                 so automatically the output will get an associative array


<?php


$a=array('name','age','city');

$b=array('john',25,'chennai');


$c=array_combine($a,$b);

print_r($c);

?>


the output for the above code is
Array ( [name] => john [age] => 25 [city] => chennai )



array_merge
------------


 this function will combine and merge the two arrays

<?php


$x=array('name'=>'john','city'=>'chennai');

$y=array('age'=>25,'class'=>'students');


$z=array_merge($x,$y);


print_r($z);

?>

output for the above code is

Array ( [name] => john [city] => chennai [age] => 25 [class] => students )


array_count_values
--------------------

this function returns the same values how many times appeared in that array

<?php


$x=array('city','chennai','welcome','resource','gandhi','freedom','chennai','welcome','chennai','resource','city');


print_r(array_count_values($x));


?>

output for the above program is

Array ( [city] => 2 [chennai] => 3 [welcome] => 2 [resource] => 2 [gandhi] => 1 [freedom] => 1 )


array_diff_assoc
-------------------

      this array function comparises two arrays and it eliminates the same values in both array and prints the odd values

    <?php


$x=array('chennai','city','welcome','source');

$y=array('chennai','city','welcome');

$z=array_diff_assoc($x,$y);

print_r($z);

?>

output for the above programme is

                    Array ( [3] => source )


array_diff_key
-----------------

                    in this array function it will intersect the both array keys and eliminates them and print the odd keys  first argument array key values



<?php
$array1 = array('blue'  => 1, 'red'  => 2, 'green'  => 3, 'purple' => 4);
$array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan'   => 8);

print_r(array_diff_key($array2, $array1));

?>

o/p

                Array ( [yellow] => 7 [cyan] => 8 )


array_fill_key
---------------

                this function will fills the key values to the array keys

                      <?php

                $keys=array('name','school','welcome');
               
                $y=array_fill_keys($keys,'oniorns');

                print_r($y);

                       ?>
output:-
--------------

                       Array ( [name] => onions [school] => onions [welcome] => onions )



array_fill
--------------

               this function fills insert values into the arrays

array_flip
-------------

              this function returns the values as keys and keys as values  funny interesting thing to change  the keys and values

          <?php



$x=array('name'=>'kiran','age'=>25,'city'=>'chennai');


$y=array_flip($x);

print_r($y);

?>

output:--
------------

           Array ( [kiran] => name [25] => age [chennai] => city )



array_intersect_assoc
----------------------

              this function intersects both the arrays and it will print the common elements in both the arrays

              <?php


         $x=array('x'=>45,'y'=>25,'z'=>65);

         $y=array('x'=>42,'z'=>65);

         $z=array_intersect_assoc($x,$y,);

         print_r($z);

         ?>

output of the code

              Array ( [z] => 65 )

array_intersect_key
------------------------

<?php
$array1 = array('blue'  => 1, 'red'  => 2, 'green'  => 3, 'purple' => 4);
$array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan'   => 8);

print_r(array_intersect_key($array1, $array2));
?>


output for the code is
---------------------------

         Array ( [blue] => 1 [green] => 3 )


array_intersect
            this function returns the intersection of both the arrays


array_key_exists
----------------
                this code will check whether the key exists or not in the programme

     <?php

$x=array('name'=>'kiran','city'=>'chennai');

if(array_key_exists('city',$x))
{
     echo "find in the array";
   
 }
 else
   echo "not found in the array";
  
   ?>

    output :=  find in the array

array_keys
------------
             it will print the array keys

array_map
-------------

                <?php


function scope($x)

{
   
    return($x*$x*$x);
   
}


$a=array(4,5,8,9);

$b=array_map("scope",$a);

print_r($b);

?>

the above code represents the array_map it getting the value from the array and pass it to another array for calucalting the function

output is
    Array ( [0] => 64 [1] => 125 [2] => 512 [3] => 729 )