tag:blogger.com,1999:blog-78586722345345553892024-02-18T19:37:23.931-08:00HelpopediaHelpopedia provides valuable information on a variety of topics such as computer hardware, graphics, web development, networking and the like. You can also post your problems and get them solved at the touch of a button. Also, if you are interested in sharing and writing, please contact us on the following e-mail address:
dihaz09@gmail.com
We look forward to your active participation and suggestions.
Helpopedia™Dihazhttp://www.blogger.com/profile/07142367990636982434noreply@blogger.comBlogger52125tag:blogger.com,1999:blog-7858672234534555389.post-52216522886495616772009-10-29T21:33:00.000-07:002009-10-29T22:30:25.434-07:00Vector Masking using Adobe Fireworks.<span style=";font-family:arial;font-size:100%;" >Wow fireworks make's vector masking a child's play, first of all I have to tell you what is vector mask "vector mask is a gradient mask which used to hide a portion of image with some solid color, this solid color have two transparency points in first point the opacity is 100 % and in second point the opacity level is on O% percent, the revealed area of the image is under 0% opacity”. Vector mask are usually used to merge more than two images in a single image.</span><span style="font-size:100%;">
<br /></span><span style=";font-family:arial;font-size:100%;" >Now we start this tutorial.</span>
<br />
<br /><meta equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CSHAHID%7E1.VSO%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///C:%5CDOCUME%7E1%5CSHAHID%7E1.VSO%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///C:%5CDOCUME%7E1%5CSHAHID%7E1.VSO%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><!--[if gte mso 9]><xml> <w:worddocument> <w:view>Normal</w:View> <w:zoom>0</w:Zoom> <w:trackmoves/> <w:trackformatting/> <w:punctuationkerning/> <w:validateagainstschemas/> <w:saveifxmlinvalid>false</w:SaveIfXMLInvalid> <w:ignoremixedcontent>false</w:IgnoreMixedContent> <w:alwaysshowplaceholdertext>false</w:AlwaysShowPlaceholderText> <w:donotpromoteqf/> <w:lidthemeother>EN-US</w:LidThemeOther> <w:lidthemeasian>X-NONE</w:LidThemeAsian> <w:lidthemecomplexscript>X-NONE</w:LidThemeComplexScript> <w:compatibility> <w:breakwrappedtables/> <w:snaptogridincell/> <w:wraptextwithpunct/> <w:useasianbreakrules/> <w:dontgrowautofit/> <w:splitpgbreakandparamark/> <w:dontvertaligncellwithsp/> <w:dontbreakconstrainedforcedtables/> <w:dontvertalignintxbx/> <w:word11kerningpairs/> <w:cachedcolbalance/> </w:Compatibility> <m:mathpr> <m:mathfont val="Cambria Math"> <m:brkbin val="before"> <m:brkbinsub val="--"> <m:smallfrac val="off"> <m:dispdef/> <m:lmargin val="0"> <m:rmargin val="0"> <m:defjc val="centerGroup"> <m:wrapindent val="1440"> <m:intlim val="subSup"> <m:narylim val="undOvr"> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"> <w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"> <w:lsdexception locked="false" priority="39" name="toc 1"> <w:lsdexception locked="false" priority="39" name="toc 2"> <w:lsdexception locked="false" priority="39" name="toc 3"> <w:lsdexception locked="false" priority="39" name="toc 4"> <w:lsdexception locked="false" priority="39" name="toc 5"> <w:lsdexception locked="false" priority="39" name="toc 6"> <w:lsdexception locked="false" priority="39" name="toc 7"> <w:lsdexception locked="false" priority="39" name="toc 8"> <w:lsdexception locked="false" priority="39" name="toc 9"> <w:lsdexception locked="false" priority="35" qformat="true" name="caption"> <w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"> <w:lsdexception locked="false" priority="1" name="Default Paragraph Font"> <w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"> <w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"> <w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"> <w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"> <w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"> <w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"> <w:lsdexception locked="false" unhidewhenused="false" name="Revision"> <w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"> <w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"> <w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"> <w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"> <w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"> <w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"> <w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"> <w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"> <w:lsdexception locked="false" priority="37" name="Bibliography"> <w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"> </w:LatentStyles> </xml><![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;} </style> <![endif]--><span style=";font-family:arial;font-size:130%;" >Step 1:</span>
<br />
<br /><span style="font-size:100%;"><span style="font-family:arial;">Select an image</span></span>
<br />
<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEif3GilnT9lZev0qRxuelzhK_H-F1GoVJrizOKiv4hjSlG3YCQc9Qv9P7uNMxRlvFTW2pKAMpQLdO2EgEL3syJYBS5yYifWH0B19MuBNiIqI4aOSVNBk2wtLZlQtm5j1VoNkbyv09Syhe26/s1600-h/1.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 226px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEif3GilnT9lZev0qRxuelzhK_H-F1GoVJrizOKiv4hjSlG3YCQc9Qv9P7uNMxRlvFTW2pKAMpQLdO2EgEL3syJYBS5yYifWH0B19MuBNiIqI4aOSVNBk2wtLZlQtm5j1VoNkbyv09Syhe26/s400/1.jpg" alt="" id="BLOGGER_PHOTO_ID_5398247284770778706" border="0" /></a>
<br /><span style=";font-family:arial;font-size:130%;" >Step 2:</span>
<br />
<br /><span style="font-size:100%;"><span style="font-family:arial;">Place a rectangle block using Rectangle Tool (or press U) behind the image, which is equal to the desired banner width.</span></span>
<br />
<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhorXCpcHi3yvf6WUP7bO8tE1-szcpwo7Xs9XSBDt_x4JL74ESnvkHdxPLmQ08OwcAPUuznGDekhFD46ez0e7lwnEGEOLDc-xC5ip4onfGzxVl9uyqTNWbiODNP9YsXSpp28vBxO_wGRAl/s1600-h/2.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 209px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhorXCpcHi3yvf6WUP7bO8tE1-szcpwo7Xs9XSBDt_x4JL74ESnvkHdxPLmQ08OwcAPUuznGDekhFD46ez0e7lwnEGEOLDc-xC5ip4onfGzxVl9uyqTNWbiODNP9YsXSpp28vBxO_wGRAl/s400/2.jpg" alt="" id="BLOGGER_PHOTO_ID_5398247286893115746" border="0" /></a><span style=";font-family:arial;font-size:130%;" >Step 3:</span>
<br />
<br /><span style="font-size:100%;"><span style="font-family:arial;">Toggle image and rectangle block position, by using layer palette or Ctrl +</span> keys</span>
<br />
<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5nBVEdx0e6Lz2noYLLZdfrmvuVUY6FxykON1pL3qye3bIWgcNDg1O5clczuLQniw4aoWKS2ORQfU8WsItedXriFOM3gtdpX9eY0pxvg-zcd81r0rvJn0zCZE7moo5v6zaHD6N6_uQa8EH/s1600-h/3.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 289px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5nBVEdx0e6Lz2noYLLZdfrmvuVUY6FxykON1pL3qye3bIWgcNDg1O5clczuLQniw4aoWKS2ORQfU8WsItedXriFOM3gtdpX9eY0pxvg-zcd81r0rvJn0zCZE7moo5v6zaHD6N6_uQa8EH/s400/3.jpg" alt="" id="BLOGGER_PHOTO_ID_5398249947408441202" border="0" /></a><span style=";font-family:arial;font-size:130%;" >Step 4:</span>
<br />
<br /><ul><li><span style="font-size:100%;"><span style="font-family:arial;">Use Marquee tool to select area of the image and crop it, we used ruler to make sure that we select required height.</span></span></li><li><span style="font-size:100%;"><span style="font-family:arial;">Under properties panel we have all properties of a Marquee, which we can adjust as per our requirement.</span></span></li></ul>
<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifVulBDlKMWkRxVkHxQKpWF-POzCzM453kPHFOQ2qv6ZQ69R3r3JiSZYJ4gNRwKAUwe8y-s9JZv4FXXGOXCBFibQPh1_EGI49Zm2aFHVFEyn5vIaDTTxO-JkZsulNiUABfCyIYfS1W9inU/s1600-h/4.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 287px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifVulBDlKMWkRxVkHxQKpWF-POzCzM453kPHFOQ2qv6ZQ69R3r3JiSZYJ4gNRwKAUwe8y-s9JZv4FXXGOXCBFibQPh1_EGI49Zm2aFHVFEyn5vIaDTTxO-JkZsulNiUABfCyIYfS1W9inU/s400/4.jpg" alt="" id="BLOGGER_PHOTO_ID_5398247295731378674" border="0" /></a><span style="font-size:100%;"><span style="font-family:arial;">After Cropping we have this result.</span></span>
<br />
<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja05nvaTnFWKuvZNFCWtXH_GX2hVaGECrJBSwCzFvRS3amos8MAXQuzn8p5KXljSBAMZZF3QDm7kb-NEGaZET-8Ljc2BHX0kRKcnZD-AxujCXDuKDhH-1YsR9Kcuz2gBLsYmQQGyb-xKx0/s1600-h/5.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 290px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja05nvaTnFWKuvZNFCWtXH_GX2hVaGECrJBSwCzFvRS3amos8MAXQuzn8p5KXljSBAMZZF3QDm7kb-NEGaZET-8Ljc2BHX0kRKcnZD-AxujCXDuKDhH-1YsR9Kcuz2gBLsYmQQGyb-xKx0/s400/5.jpg" alt="" id="BLOGGER_PHOTO_ID_5398247305150090114" border="0" /></a><span style=";font-family:arial;font-size:130%;" >Step 5</span>
<br />
<br /><span style="font-size:100%;"><span style="font-family:arial;">Go to command select creative option then select Auto Vector mask.</span></span>
<br />
<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhemX1IYVh4ovzZLthgaoHj5JAORM-NX4CUOy3oAIOzfcBdkHcJxCSwYtDfsCAvoqLVsFfWRIS5y94cKX9sGoP7w35nUF7hrXUSKV6H6kTwG5O7snBlkrBP8gf2pcfgQLVEYj1wDja3hX_B/s1600-h/6a.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 289px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhemX1IYVh4ovzZLthgaoHj5JAORM-NX4CUOy3oAIOzfcBdkHcJxCSwYtDfsCAvoqLVsFfWRIS5y94cKX9sGoP7w35nUF7hrXUSKV6H6kTwG5O7snBlkrBP8gf2pcfgQLVEYj1wDja3hX_B/s400/6a.jpg" alt="" id="BLOGGER_PHOTO_ID_5398247614548615698" border="0" /></a><span style="font-size:100%;"><span style="font-family:arial;">After selecting Auto vector mask a panel open with following mask options</span></span>
<br />
<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlvrCv5W3BBhxeAkrHVeqz1kWFK7aAmVsl-c78i96FQPNr7flREQzC5yJRZJgBy6pfsSzlGFkEGxlvv0D9sKKMu3izaA6wMnS3DUz7H5ZO07EEiLbCi3zbm0shJMczOHZMvxqjCgulodvC/s1600-h/6.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 289px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlvrCv5W3BBhxeAkrHVeqz1kWFK7aAmVsl-c78i96FQPNr7flREQzC5yJRZJgBy6pfsSzlGFkEGxlvv0D9sKKMu3izaA6wMnS3DUz7H5ZO07EEiLbCi3zbm0shJMczOHZMvxqjCgulodvC/s400/6.jpg" alt="" id="BLOGGER_PHOTO_ID_5398247608911473538" border="0" /></a><span style="font-size:100%;"><span style="font-family:arial;">Select your desired mask option and press Apply button.</span>
<br /><span style="font-family:arial;">OK below image I have done few steps together but below image help you to find out what all I have done.</span>
<br /><span style="font-family:arial;">These two handles visible on image (we also pointed one of them a circle) are used to control mask position and opacity level.</span>
<br /><span style="font-family:arial;">Under the properties panel we have all vector mask options.</span>
<br /><span style="font-family:arial;">Vector mask layer is also highlighted in Layer Palette.</span></span>
<br />
<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifkuK51c48VdTEVX6gf80EEPAJkJC_SlIC40YLCBoBuidyKzAmcbjLQlgsttYYjS1QdIucGPwFXoGMv5OJ0m7Ii9RqzI72pEhu62PpPVgmOTRHgNxzd2IS056h0qnlVa_j7Aj_eo_1bFb8/s1600-h/7.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 288px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifkuK51c48VdTEVX6gf80EEPAJkJC_SlIC40YLCBoBuidyKzAmcbjLQlgsttYYjS1QdIucGPwFXoGMv5OJ0m7Ii9RqzI72pEhu62PpPVgmOTRHgNxzd2IS056h0qnlVa_j7Aj_eo_1bFb8/s400/7.jpg" alt="" id="BLOGGER_PHOTO_ID_5398247616585033234" border="0" /></a><span style=";font-family:arial;font-size:130%;" >Step 6:</span>
<br /><span style="font-size:100%;">
<br /><span style="font-family:arial;">After final adjustment of Vector mask, we put some text on Banner.</span>
<br /><span style="font-family:arial;">Good Luck, I hope that you will learn Vector mask with this simple Tutorial. Please give your feedback to help me to make things better. </span></span>
<br />
<br />
<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivXdBUQADK5EnCQJorv992EDyi1zmzmXJZm2CwO65JBkwxqT2OhLSRGTWmG69PXuFQsBQ7fOwKxmWf9Fz8zmxeYWOjJTwkvNuZ7xRT1OBWVOqcwDpG9zhiiKYYFkqgDASi5A_NZqXOb73T/s1600-h/8.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 119px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivXdBUQADK5EnCQJorv992EDyi1zmzmXJZm2CwO65JBkwxqT2OhLSRGTWmG69PXuFQsBQ7fOwKxmWf9Fz8zmxeYWOjJTwkvNuZ7xRT1OBWVOqcwDpG9zhiiKYYFkqgDASi5A_NZqXOb73T/s400/8.jpg" alt="" id="BLOGGER_PHOTO_ID_5398251155337213954" border="0" /></a>
<br /><span style="font-size:85%;">
<br /><span style="font-weight: bold;font-family:arial;" >At the end of this tutorial i am thank full to Makeup Forever for their image contribution and Dafont.com for their fonts. </span></span>
<br />
<br />
<br />
<br />
<br />Muhammad Shahid Akramhttp://www.blogger.com/profile/16065852295278017320noreply@blogger.com0tag:blogger.com,1999:blog-7858672234534555389.post-67100963243792767182009-10-20T04:13:00.000-07:002009-10-20T04:45:28.788-07:00Building a Java Desktop Database Application<!-- Begin Content Area --><br /><br />This tutorial shows how to create a desktop Java application through which you canaccess and update a database. The tutorial takes advantage of support inNetBeans IDE for the following technologies:<br /><ul><br /><li>The Java Persistence API (JPA), which helps you use Java code to interact with databases.</li><br /><li>Beans Binding (JSR-295), which provides a way for different JavaBeans components<br /> to have property values that are synchronized with each other. For example, you can use beans<br /> binding to keep the values of cells in a JTable visual component in<br /> synch with the values of fields in an entity class. (In turn, the entity class<br />represents the database table.)</li><br /><li>The Swing Application Framework (JSR-296), which provides some useful<br /> building blocks for quickly creating desktop applications.<br /></li><br /></ul><br /><br /><p>We will create a database CRUD (create, read, update, delete)<br />application with a custom component used for visualizing the data (car design preview).</p><br /><br /><p>This tutorial is largely based on a screencast that was based on a development build.<br />Some of the user interface has changed since that demo<br />was made, so you might notice some differences between this tutorial and the demo.<br />You can <a href="http://www.netbeans.org/download/flash/netbeans_6_gui_builder/netbeans_6_gui_builder.html">view the demo (about 9 minutes) now</a><br />or <a href="http://www.netbeans.org/files/documents/4/1714/netbeans_6_gui_builder.zip">download a zip<br />of the demo</a>.</p><br /><div class="indent"><h3 class="tutorial"><a name="setup-db">Setting Up the Database</a></h3><br /><p>Before you begin creating a desktop CRUD (create, read, update, delete) application<br /> in the IDE, you should already have the IDE connected to the database that<br /> your application will use. Having this connection set up in advance will<br /> allow you to take advantage of IDE features that automate the binding of the<br />database to your application.</p><br /><br /><p>In this tutorial, we provide instructions for using a Java DB database, since<br /> there is a convenient interface for starting and stop the Java DB database server from the IDE.<br /> However, you can use a different database server without too much difficulty.<br /><!-- TODO P3 - point to other tutorial - MYSQL --></p><br /><p>First verify that you have Java DB registered in the IDE.<br /> Java DB is<br /> automatically registered in the IDE in a number of cases, such as when<br /> you have Sun Java System Application Server registered in the IDE<br />or when you are running on JDK 6. If Java DB is not registered in the IDE,<br />register it manually.</p><br /><br /><p><b>To verify whether Java DB is registered in NetBeans IDE 6.1:</b></p><br /><ol><br /> <li>Open the Services window.</li><br /> <li>Right-click the Databases > Java DB node and choose Properties.<br /> <p>If Java DB is registered, the Java DB Installation and Database Location<br />fields will be filled in.</p><br /><br /><p>If Java DB is not registered, fill in the following two fields:</p><br /><ul><br /> <li><b>Java DB Installation</b>. Enter the path to the database server. </li><br /> <li><b>Database Location</b>. Enter the folder where you want the databases to be stored.</li><br /></ul></li><br /> <li>Click OK.<br /></li></ol><br /><br /><p><b>To verify whether Java DB is registered in NetBeans IDE 6.0:</b></p><br /><ol><br /> <li>Choose Tools > Java DB Database > Settings.</li><br /> <p>If Java DB is registered, the Java DB Installation and Database Location<br />fields will be filled in.</p><br /><p>If Java DB is not registered, fill in the following two fields:</p><br /><br /><ul><br /> <li><b>Java DB Installation</b>. Enter the path to the database server. </li><br /> <li><b>Database Location</b>. Enter the folder where you want the databases to be stored.</li><br /></ul><br /> <li>Click OK.<br /></li></ol><br /><br /><br /><h3 class="tutorial"><a name="starting-db">Starting the Server and Creating a Database</a></h3><br /><br /><p>Once Java DB is registered with the IDE, you can easily start and stop<br />the database server, as well as create a new database. </p><br /><p><b>To start the database server in NetBeans IDE 6.1:</b></p><br /><ul><br /> <li>In the Services window, right-click Databases > Java DB and<br /> choose Start Server.<br /> <p>If you do not already have a location set for the database, the Set Database Location<br /> dialog box appears. Enter a location for the database server to store the databases. You can create<br /> a new folder there if you wish.</p><br /><br /> </li><br /></ul><br /><p><b>To start the database server in NetBeans IDE 6.0:</b></p><br /><ul><br /> <li>Choose Tools > Java DB Database > Start Server.<br /> <p>If you do not already have a location set for the database, the Set Database Location<br /> dialog box appears. Enter a location for the database server to store the databases. You can create<br /> a new folder there if you wish.</p><br /><br /> </li><br /></ul><br /> <p>Once the server is started, Java DB Database Process tab opens in the<br /> Output window and displays a message similar the following:</p><br /> <pre>Apache Derby Network Server - 10.2.2.0 - (485682) started and ready<br /> to accept connections on port 1527 at 2007-09-05 10:26:25.424 GMT</pre><br /><br /><br /><br /><p><b>To create the database in NetBeans IDE 6.1:</b></p><br /><ol><br /><br /> <li>In the Services window, right-click Databases > Java DB and<br /> choose Create Database.</li><br /> <li>For the Database Name text field, type <tt>car_database</tt>. Also set the User Name and<br /> Password to nbuser. </li><br /> <li>Click OK.</li><br /></ol><br /><br /><p><b>To create the database in NetBeans IDE 6.0:</b></p><br /><ol><br /> <li>Choose Tools > Java DB Database > Create Database. The<br /> Create Java DB Database dialog opens.</li><br /> <li>For the Database Name text field, type <tt>car_database</tt>. Also set the User Name and<br /> Password to nbuser. </li><br /><br /> <li>Click OK.</li><br /></ol><br /><br /><h3 class="tutorial"><a name="connecting">Connecting to the Database</a></h3><br /><br /><p>So far, we have successfully started the the database server and created a database.<br /> However, we still need to connect to the new database before we can<br />start working with it in the IDE. To connect to the <tt>car_database</tt> database:</p><br /><br /><ol><br /> <li>Switch to the Services window (Ctrl+5) and expand the Databases node to see<br /> your new database.</li><br /><br /> <li>Right-click the database connection node<br /> (<tt>jdbc:derby://localhost:1527/car_database[nbuser on NBUSER]</tt>) and choose<br /> Connect.<br /> <p>The connection node icon should now appear whole (<img src="http://www.blogger.com/images/articles/derby/55/connection-node-icon.png" alt="connection node icon" />), which signifies that the connection was successful.</p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZq6OhF5apQqI2vT2kkgYnsBzaAW2vLOc4Rl0jm0EHMeE3q3ArVx8A2UFArEmwgQ3xnZI3HCyB2zjwNDlWVckbdgOPSkUiryTaIofdNCos1DzXgRvt0YmSqSrNJpQ-0Mft24XTc7Paa5Y/s1600-h/services-db-node.jpg"><img style="cursor: pointer; width: 394px; height: 212px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZq6OhF5apQqI2vT2kkgYnsBzaAW2vLOc4Rl0jm0EHMeE3q3ArVx8A2UFArEmwgQ3xnZI3HCyB2zjwNDlWVckbdgOPSkUiryTaIofdNCos1DzXgRvt0YmSqSrNJpQ-0Mft24XTc7Paa5Y/s400/services-db-node.jpg" alt="" id="BLOGGER_PHOTO_ID_5394646881370849730" border="0" /></a><br /><br /><br /><br /> </li><br /> <li>Expand the connection node, right-click its Tables subnode, and choose Execute Command.</li><br /> <li>Copy the contents of the<br /> <a href="http://usersguide.netbeans.org/files/documents/40/1423/car.sql">car.sql</a> file<br /> and paste them into the SQL Command 1 tab of the Source Editor.<br /> <p>This is the SQL script which will populate the database with data about cars.</p><br /> </li><br /> <li>Click the Run SQL button (<img src="http://www.blogger.com/images/articles/ide-gui-db-prev/execute-sql.png" alt="Run SQL button" />)in<br /> the toolbar of the Source Editor to run the script.</li><br /><br /></ol><br /><br /><h3 class="tutorial"><a name="create-app">Creating the Application</a></h3><br /><ol><br /> <li>Choose File > New Project.</li><br /> <li>In the first panel of the wizard, expand the Java category and select the Java Desktop Application template. Click Next.<br /> <p>The Java Desktop Application template provides many basics of a visual application, including basic menu items and commands.</p></li><br /><br /> <li>In the Name and Location page of the wizard, do the following things:<br /> <ol><br /> <li>In the Project Name field, type <tt>CarsApp</tt>. The value of this field sets the display name for the project in the Projects window. </li><br /> <li>Select the Set As Main Project checkbox.</li><br /> <li>Optionally, edit the Project Location field to change the location of your project metadata.</li><br /> <li>In the Choose Application Shell field, select Database Application.</li><br /><br /> <li>Click Next.</li><br /> </ol></li><br /> <li>In the Master Table page of the wizard, select the database connection for the <tt>CAR</tt> database.<br /> The listing for the database should look something like the following: <tt>jdbc:derby://localhost:1527/car_database[nbuser on NBUSER]</tt></li><br /> <li>Fill in the password (<tt>nbuser</tt>) for the database and select the<br /> Remember Password During This Session checkbox.<br /> <p>After the connection to the database is established, the Database Table field<br /> should display <tt>CAR</tt> and<br /> the Columns to Include list should include the names of<br /> 10 columns for the CAR database. For now, we will use only five of them in the application.<br /><br /> </p></li><li>Select the bottom five column names (beginning with<br /> <tt>SUN_ROOF</tt> and ending with <tt>MODERNNESS</tt>) and click the <tt><</tt> button<br /> to move them to the left column. Click Next.<br /> </li><br /> <li>In the Detail Options panel, click Finish.<br /> <p>The wizard then generates the a basic user interface with a table and a<br /> database connection. This might take a few seconds as the IDE generates the<br /> project and the code..</p></li><br /> <!--TODO P3: provide info on what you can do here On the next panel note the icon showing the detail part of the form (set of text fields for selected row of the table)--><br /></ol><br /><br /><br /><br /><h3 class="tutorial"><a name="run-generated-app">Running the Generated Application</a></h3><br /><p>At this point, you have a basic running application with a<br />graphical user interface (GUI) that has the following features:</p><br /><ul><br /> <li>Ability to view and modify values in five columns of the CAR database.</li><br /> <li>Basic menu items.</li><br /><br /> <li>Persistence of its window state between sessions. When you<br /> close the application, the window position and size are remembered. So<br /> when you reopen the application, the window opens in the same position as<br /> it was when you closed it.</li><br /> <li>An About dialog box, which you can easily customize.</li><br /> <li><tt>.properties</tt> files containing the labels in the user interface. Using<br /> <tt>.properties</tt> files is a good way to keep the logic of your code separate from the<br /> text that appears in the user interface of your application. Such separation is useful<br /> for making it easier to localize your program, among other reasons.</li><br /></ul><br /><br /><p><b>To see some of the features that are already built into the application, follow these steps:</b></p><br /><ol><br /> <li>Right-click the project's node and choose Run.<br /> <p>After a few seconds, the application stars and a window called Database Application Example appears.<br /> This window contains a table and several controls that enable you to edit the CARS database.</p></li><br /> <li>Select the first record in the table (for the Acura).</li><br /> <li>Select the Price text field and replace the existing value with <tt>46999</tt>. Then press Enter.<br /> <p>The value should appear updated in the table. (However, that value will<br /> not be reflected in the database until you click Save.)</p><br /><br /> <p>Similarly, you can update any other values in the table.</p></li><br /> <li>Click New to create a new record. Then fill in values for each of the fields (Make, Model, Price, Body Style, Color). For example, you can fill in<br /> <tt>Trabant</tt>, <tt>Classic</tt>, <tt>1000</tt>, <tt>wagon</tt>, and <tt>blue</tt>. Click Save to<br /> save the entry in the database.</li><br /> <li>Click the Database Application Example title bar and drag the application to a different place on your screen.</li><br /><br /> <li>Click the left border of the Database Application Example window and drag to the left to increase the size of the window.</li><br /> <li>In the Database Application Example menu bar, choose File > Exit.</li><br /> <li>In the IDE, right-click the project's node and choose Run Project.<br /> <p>The Database Application Example window will open in the same size and position it was in when you<br /> closed the application.</p></li><br /><br /></ol><br /><br /><h3 class="tutorial"><a name="review-gen-app">Reviewing the Generated Parts of the Application</a></h3><br /><br /><p>The connection between the master table (a JTable component) and the database is<br /> handled with a combination of the following mechanisms, all of which have been<br />generated by the IDE:</p><br /><ul><br /><br /> <li>The <tt>Car.java</tt> entity class, which is used to read and write data to<br /> the CAR database table. Entity classes are a special type of class<br /> that enable you to interact with databases through Java code.<br /> Entity classes use Java annotations to map class fields to database columns. <!--TODO P3: maybe explain annotations-->.</li><br /> <li>The <tt>META-INF/persistence.xml</tt> file, which defines a connection between<br /> the database and the entity class. This file is also known as the persistence unit.</li><br /><br /> <li>Using <i>beans binding</i> to connect the properties of the entity class<br /> with the properties of the JTable component. Beans binding is a new technology<br /> based on JSR 295 and which will probably be included in a future Java SE release.</li><br /> <li>The <tt>entityManager</tt>, <tt>query</tt>, and <tt>list</tt><br /> objects, which are defined in the <tt>CarsAppFrame</tt> class and<br /> which are listed in the Inspector window.<br /> <ul><br /><br /> <li>The entity manager object is used to retrieve and commit data<br /> within the defined persistence unit scope.</li><br /> <li>The query object defines how the particular data collection is retrieved from<br /> the entity manager. (You can change the way that the query object works by selecting the<br /> query object in the Inspectory window and changing the <tt>query</tt> property in the property sheet.<br /> The <tt>query</tt> property uses JPA query language.</li><br /> <li>The list object is an observable collection that holds the data from the query. An<br /> observable collection is a special kind of collection on which you can place a listener to<br /> find out when changes to the collection have been made.</li><br /> </ul><br /><br /> </li><br /></ul><br /><br /><p>Using the Inspector window and the property sheet, you can follow these steps to see how<br />the JTable is bound to data:</p><br /><ol><br /> <li>In the Inspector window, select the<br /> mainPanel[JPanel] > masterScrollPane [ScrollPane] > masterTable [JTable]<br /> node.<br /> Then click the Binding tab in the Properties window.</li><br /><br /> <li>Look at the elements property to confirm that it is bound to a list.<!--TODO P3 talk about observable list--></li><br /> <li>Click the ellipsis [...] button to open the Bind masterTable.elements customizer, where you can<br /> further customize the binding between the table and the database. For example, you can see that the<br /> customizer enables you to specify which table columns are bound.</li><br /></ol><br /><p>Besides the Binding category in property sheet you can also use the<br />Bind menu in context menu.</p><br /><!-- TODO P3: Note that it is bound to a selected element's attribute. All "detail" components are bound to the selected ("master") element taken from the table.--><br /><br /><br /><h3 class="tutorial">Adding More Controls</h3><br /><br /><p>We will now add controls to the form for some of the attributes we initially excluded.<br /> Instead of using a table, we will add JSlider components (for the tire size and<br />modernness attributes) and JCheckbox components (for the sun roof and the spoiler).</p> <p><b>Follow these steps to add the additional components:</b></p> <ol><br /> <li>Add the first slider by clicking the Slider button in the Palette window and<br /> then clicking in the form just above the New button. Before clicking in the form<br /> to insert the slider, make sure that no horizontal slotted guiding lines are shown.<br /> These lines indicate that the slider will be inserted in the same line as the<br /> fields or the buttons. See the figure below to see where you should drop the<br /> slider into the form.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP7ZYd5IfGbjkZYgHrh8BkJ6IXmuHafvLoK9EBkNjdPneYdgjEmWqAeOV_cYcN5SIJsBZmL1qU3tIsO9SXdaFXovtxKvVxcD_W_sRMpN8D8jDzzCLswmrzrhtHXlO2SxRN7x0av_2NbEM/s1600-h/add-slider.png"><img style="cursor: pointer; width: 367px; height: 93px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP7ZYd5IfGbjkZYgHrh8BkJ6IXmuHafvLoK9EBkNjdPneYdgjEmWqAeOV_cYcN5SIJsBZmL1qU3tIsO9SXdaFXovtxKvVxcD_W_sRMpN8D8jDzzCLswmrzrhtHXlO2SxRN7x0av_2NbEM/s400/add-slider.png" alt="" id="BLOGGER_PHOTO_ID_5394645842592636210" border="0" /></a><br /><p><b>Note:</b> If you drop the component in a place you do not want and thus<br /> cause several undesired layout changes, you can use the Undo command<br /> to reverse the changes. Choose Edit > Undo or press Ctrl-Z.<br /> </p><br /><br /> </li><br /> <li>If necessary, stretch the slider to the left to align it with the left side of the text field components.</li><br /> <li>Stretch the slider to the<br /> right to span the whole form width.</li><br /> <li>Add a label to the left of the slider and set its text to <tt>Tire Size</tt>.<br /> (Click the label to make it editable.)</li><br /> <li>Add another slider below the first slider, and adjust its width and alignment where necessary.</li><br /> <li>Add another label below the Tire Size label and set its text to <tt>Modernness</tt>.</li><br /><br /> <li>Add two checkboxes below the sliders. Set their text to <tt>Spoiler</tt> and <tt>Sun Roof</tt>.<br /> (Make the display text editable by clicking the checkbox once, pausing, and then clicking<br /> the checkbox again. You can also right-click the checkbox and choose Edit Text.)</li><br /></ol><br /><p>The form should look like the screenshot shown below.</p><br /><br /><img src="http://www.blogger.com/images/articles/60/java/gui-db/all-controls-added.png" alt="A screenshot of the design area with all controls added" width="463" height="485" />"<br /><br /><h3 class="tutorial">Binding Controls to Values in the Table</h3><br /><br /><p>We will now use beans binding features to tie the values shown in table cells to<br /> the state of the controls we have added. This will allow you to change the values<br />of cells in the table by using the sliders and checkboxes.</p><br /><!-- <p>Since no record is selected when the application starts, we also need to<br /> set a default value for the source of the binding expression. For the sliders,<br />we will do this through the Advanced tab of the Binding dialog box. For the<br />checkboxes, we will add the code manually in the Customize Code dialog box.</p>--><br /><p><b>To bind the sliders to their corresponding table elements:</b></p><br /><ol><br /> <li>In the form, right-click the Tire Size slider and choose Bind > value.</li><br /> <li>In the Binding Source drop-down list of the Binding dialog box, select masterTable.</li><br /><br /> <li>In the Binding Expression drop-down list, select the selectedElement > tiresize node.</li><br /> <!-- <li>Click the Advanced tab.</li><br /> <li>Select the Unreadable Source Value checkbox.</li><br /> <li>Click the ellipsis (...)button that is next to the Unreadable Source Value checkbox.</li><br /> <li>In the Incomplete Path Value dialog box, select Custom Code from the<br /> drop-down list. Then type the integer <tt>0</tt>.</li><br /> <li>Click OK to close the Incomplete Path Value dialog box.<br /> Then click OK to close the Bind dialog box.</li>--><br /><br /> </ol><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX47BzuSqSqmF9RjGPf-89rhc-UTdip2x3KzIx8lHxCgn9L2vZqXgMbhxOdE5NSy8DBOJwOswj_W9e2Z9JZPo4OQ66S1tHpkyKhvtID2HrMkT21wIZea5I0bNQg99Rlw7jQuuavQtq1cw/s1600-h/bind-dialog.png"><img style="cursor: pointer; width: 370px; height: 367px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX47BzuSqSqmF9RjGPf-89rhc-UTdip2x3KzIx8lHxCgn9L2vZqXgMbhxOdE5NSy8DBOJwOswj_W9e2Z9JZPo4OQ66S1tHpkyKhvtID2HrMkT21wIZea5I0bNQg99Rlw7jQuuavQtq1cw/s400/bind-dialog.png" alt="" id="BLOGGER_PHOTO_ID_5394645825477776466" border="0" /></a><ol>"<br /><br /> <li>In the form, right-click the Modernness slider and choose Bind > value.</li><br /> <li>In the Binding Source drop-down list of the Binding dialog box, select masterTable.</li><br /><br /> <li>In the Binding Expression drop-down list, select selectedElement > modernness.</li><br /> <!-- <li>Repeat steps 4 through 8 to set the Incomplete Path Value.</li>--><br /></ol><br /><p><b>To bind the checkboxes to their corresponding table elements:</b></p><br /><ol><br /> <li>In the form, right-click the Spoiler checkbox and choose Bind > selected.</li><br /><br /> <li>In the Binding Source drop-down list of the Binding dialog box, select masterTable.</li><br /> <li>In the Binding Expression drop-down list, select selectedElement > spoiler.</li><br /> <li>Click OK to exit the Bind dialog box.</li><br /> <!-- <li>Right-click the Spoiler checkbox again and choose Customize Code.</li><br /> <li>In white line under the <tt>bindingGroup.addBinding(binding)</tt> line, type:<br /> <pre class="examplecode">binding.setSourceUnreadableValue(false);</pre><br /> <li>Click OK to close the Customize Code dialog box.</li>--><br /> <li>In the form, right-click the Sun Roof checkbox and choose Bind > selected.</li><br /><br /> <li>In the Binding Source drop-down list of the Binding dialog box, select masterTable.</li><br /> <li>In the Binding Expression drop-down list, select selectedRow > sunRoof.</li><br /> <li>Click OK.</li><br /> <!-- <li>Repeat steps 5 through 7 for the second checkbox.</li>--><br /></ol><br /><br /><p>You should now be able to change database entries using the slider and<br />checkboxes.</p><br /><br /><p><b>To verify that the sliders and checkboxes work:</b></p><br /><ol><br /> <li>Open the Services window.</li><br /> <li>Make sure the IDE has a connection to the database by right-clicking<br /> Databases > jdbc:derby;//localhost:1527/car_database and choosing Connect.</li><br /> <li>Right-click the Databases > jdbc:derby;//localhost:1527/car_database > Tables > node<br /> and choose View Data.</li><br /><br /> <li>Look at the SUN_ROOF, SPOILER, TIRE_SIZE, and MODERNNESS values<br /> for the first record.</li><br /> <li>Choose Run > Run Main Project to execute the application.<br /> <p>The running application should look similar to the screenshot shown below.</p><br /><br /> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOz5ql9eNhWsLO9zuvRNI3siH6CPZGDzpq8retwRjiMmpNhW5XnwcBhcN8068Jb6g1EoqA85O3cc1mTRebRHPaDKeXsCjN4Si5IjlIMzD1MdnDkn2mdskPmRF11vUG5LBXoOqJRN6O2y0/s1600-h/run-after-binding-controls.png"><img style="cursor: pointer; width: 382px; height: 400px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOz5ql9eNhWsLO9zuvRNI3siH6CPZGDzpq8retwRjiMmpNhW5XnwcBhcN8068Jb6g1EoqA85O3cc1mTRebRHPaDKeXsCjN4Si5IjlIMzD1MdnDkn2mdskPmRF11vUG5LBXoOqJRN6O2y0/s400/run-after-binding-controls.png" alt="" id="BLOGGER_PHOTO_ID_5394645812358809986" border="0" /></a>"<br /> </li><br /> <li>In the running application, select the first record.</li><br /> <li>Move the sliders and change the checkbox selections.</li><br /><br /> <li>Click Save to save the changes into the database.</li><br /> <li>In the Services window, use the View Data command again.<br /> <p>The values in the database should reflect changes that you have made.</p></li><br /><br /></ol><br /></div>Dihazhttp://www.blogger.com/profile/07142367990636982434noreply@blogger.com0tag:blogger.com,1999:blog-7858672234534555389.post-1449232061607485332009-09-23T14:11:00.000-07:002009-09-23T14:17:57.775-07:00"Header already sent" error and other use of Header function in PHP<span style="font-weight: bold;"><br />Using the Header() function you can do the following things</span><br /><br />1) Redirect your user to some other page.<br /><br />2) Tell the browser not to cache your files<br /><br />3) Content Disposition.<br /><br /><br /><span style="font-weight: bold;">"Header already sent" error</span><br /><br /><br />Most of the PHP learner (including me) has spent hours in debugging this problem. This problem happens while using session variables. While using session variables you must initialize the session using the function session_start(), and the problem occurs here.<br /><br />This problem has got an unbelievably simple solution, just start the PHP block (where you have written the session_start() at the very first line of the page.<br /><br /><br /><span style="font-weight: bold;">To illustrate this</span><br /><br /><?php<br />session_start();<br />?><br /><br /><span style="font-weight: bold;">is OK. But</span><br /><br /><HTML><br /><?php<br />session_start();<br />?><br /><br /><span style="font-weight: bold;">is wrong.</span><br /><br /><span style="font-weight: bold;">Again , you can not even leave a blank line above the PHP code as it is considered as HTML code</span><br /><br /><br /><?php<br />session_start();<br />?><span style="font-weight: bold;"><br />As you can see there is a blank line above the PHP block , this will raise error.</span><br /><br /><span style="font-weight: bold;">Another example ,</span><br /><br /><?php<br />echo 'Hello';<br />session_start();<br />?><span style="font-weight: bold;"><br /><br />will give error as the statement "echo 'Hello' output an HTML on the page before "session_start();" is executed .</span><br /><br /><span style="font-weight: bold;">So , the bottom line is do not output anything before the session_start() is executed.</span><br /><br />1) Redirect your user to some other page.<br /><br /><span style="font-weight: bold;">You can redirect you user to some other page using the code "Location" parameter of header() function.</span><br /><br /><br /><?php<br />header ( "Location: http://www.koderguru.com/" ); /* Redirect browser */<br />/* Make sure that code below does not get executed when we redirect. */<br />exit;<br />?><br /><br /> <span style="font-weight: bold;">This code will redirect your user to the page http://www.example.com.</span><br /><br />Warning : The statement<br />"header ( "Location: http://www.example.com/" );"<br /><br />does not generate 302 response, that mean the page will be redirected but it will not be counted as a hit to "www.koderguru.com", so the target page looses a hit count. To avoid this use the following code.<br /><br /><?php<br />header ('HTTP/1.1 301 Moved Permanently');<br />header ('Location: http://www.koderguru.com');<br />?><br /><br /><span style="font-weight: bold;">This code generates a 301 status and hit count of "www.koderguru.com" will increase.</span><br /><br /><span style="font-weight: bold;">Also , you can redirect after some interval , using the code</span><br /><br /><br />// Redirects the browser after $sec seconds<br />header("Refresh: $sec; http://www.koderguru.com" );<br />should be:<br />header("Refresh: $sec; url= http://www.koderguru.com" );<br /><br /><br /><span style="font-weight: bold;">2) Force the browser not to cache the pages.</span><br /><br />You can do this with the code<br /><br /><?php<br />// Date in the past , tels your browser the cache has already expired<br />header ( "Expires: Wed, 06 Jul 2006 05:00:00 GMT" );<br />// Here the line tells the browser that the last modification date of this page is right now<br />//So it must reload the page<br />header ( "Last-Modified: " . gmdate ( "D, d M Y H:i:s" ) . " GMT" );<br />// HTTP/1.1<br />header ( "Cache-Control: no-store, no-cache, must-revalidate" ); // do not cache/store this page<br />header ( "Cache-Control: post-check=0, pre-check=0" , false );<br />// HTTP/1.0<br />header ( "Pragma: no-cache" );<br />?><br /><br /><br /><span style="font-weight: bold;">3) Content Disposition.</span><br />You can also generate different type of content other than html , using Header() function<br /><br /><?php<br />// We'll be outputting a PDF<br />header ( 'Content-type: application/pdf' );<br />// It will be called downloaded.pdf<br />header ( 'Content-Disposition: attachment; filename="downloaded.pdf"' );<br />// The PDF source is in original.pdf<br />readfile ( 'original.pdf' );<br />?><br /><br /><br /><span style="font-weight: bold;">The above code tells the browser the type of document is PDF.</span><br /><br /><br />So , that's all for now. I hope you find this tutorial useful. Thank You.Dihazhttp://www.blogger.com/profile/07142367990636982434noreply@blogger.com0tag:blogger.com,1999:blog-7858672234534555389.post-28029403492893564992009-09-23T13:38:00.000-07:002009-09-23T13:43:30.890-07:00Hide .php extension with url rewriting using .htaccessUsing this technique you will see product.html in the address bar of the browser but the actual file name remains product.php and you don’t need to rename the file extension. Furthermore you can rewrite the URL like product.php?id=5 to product-5.html.<br /><br /><span style="font-weight: bold;">what is the benefits of rewriting URL?</span><br /><br />When a search engine visits the dynamic url like product.php?id=5 it does not give much importance to that URL as search engine sees “?” sign treat it as a url which keeps on changing. so we’re converting the dynamic URL like the product.php?id=5 to static url format like product-5.html. We’ll rewrite the url in such a way that in browser’s address bar it will display as a product-5.html but it actually calls the file product.php?id=5. So that why these kind of URL also named as SEO friendly URL.<br /><br /><span style="font-weight: bold;">what is required for URL rewriting ??</span><br /><br />To rewrite the URL you must have the mod_rewrite module must be loaded in apache server. And furthermore, FollowSymLinks options also need to be enabled otherwise you may encounter 500 Internal Sever Error. If you don’t know much about mod_rewrite module then please check this post to know how to check and enable mod_rewrite module in apache?<br />Examples of url rewriting for seo friendly URL<br /><br />For rewriting the URL, you should create a .htaccess file in the root folder of your web directory. And have to put the following codes as your requirement.<br /><br /><span style="font-weight: bold;">1)Rewriting product.php?id=12 to product-12.html</span><br /><br />It is a simple redirection in which .php extension is hidden from the browser’s address bar and dynamic url (containing “?” character) is converted into a static URL.<br /><br />RewriteEngine on<br />RewriteRule ^product-([0-9]+)\.html$ product.php?id=$1<br /><br /><span style="font-weight: bold;">2) Rewriting product.php?id=12 to product/ipod-nano/12.html</span><br /><br />SEO expert always suggest to display the main keyword in the URL. In the following URL rewriting technique you can display the name of the product in URL.<br /><br />RewriteEngine on<br />RewriteRule ^product/([a-zA-Z0-9_-]+)/([0-9]+)\.html$ product.php?id=$2<br /><br /><span style="font-weight: bold;">3) Redirecting non www URL to www URL</span><br /><br />If you type yahoo.com in browser it will be redirected to www.yahoo.com. If you want to do same with your website then put the following code to .htaccess file. What is benefit of this kind of redirection?? Please check the post about SEO friendly redirect (301) redirect in php and .htaccess.<br /><br />RewriteEngine On<br />RewriteCond %{HTTP_HOST} ^optimaxwebsolutions\.com$<br />RewriteRule (.*) http://www.optimaxwebsolutions.com/$1 [R=301,L]<br /><br /><span style="font-weight: bold;">4) Rewriting yoursite.com/user.php?username=xyz to yoursite.com/xyz</span><br /><br />Have you checked zorpia.com.If you type http://zorpia.com/roshanbh233 in browser you can see my profile over there. If you want to do the same kind of redirection i.e http://yoursite.com/xyz to http://yoursite.com/user.php?username=xyz then you can add the following code to the .htaccess file.<br /><br />RewriteEngine On<br />RewriteRule ^([a-zA-Z0-9_-]+)$ user.php?username=$1<br />RewriteRule ^([a-zA-Z0-9_-]+)/$ user.php?username=$1<br /><br /><span style="font-weight: bold;">5) Redirecting the domain to a new subfolder of inside public_html.</span><br /><br />Suppose the you’ve redeveloped your site and all the new development reside inside the “new” folder of inside root folder.Then the new development of the website can be accessed like “test.com/new”. Now moving these files to the root folder can be a hectic process so you can create the following code inside the .htaccess file and place it under the root folder of the website. In result, www.test.com point out to the files inside “new” folder.Dihazhttp://www.blogger.com/profile/07142367990636982434noreply@blogger.com0tag:blogger.com,1999:blog-7858672234534555389.post-50450870379843433782009-09-02T09:14:00.000-07:002009-09-02T09:16:12.607-07:00BCS Comsats TimetableTimetable for all classes of BCS Comsats is finalized.<br /><br /><a href="http://helpopedia.ueuo.com/tt.xls">Download Complete Timetable<br /></a>Dihazhttp://www.blogger.com/profile/07142367990636982434noreply@blogger.com0tag:blogger.com,1999:blog-7858672234534555389.post-2607786953294775142009-08-16T07:28:00.000-07:002009-08-16T07:45:53.869-07:00Watch TV on your ComputerHey people Readon has made Best Web TV for the people how use computer and want to see TV on the Computer. Some people buy a device so that it can work both as computer and TV but now Readon give a nice Internet TV.<br /><br /><br /><br />Respect to Readon.<br /><br /><br /><br />Use there TV and enjoy almost all the TV channals according to the location.<br /><br /><br /><br />For that i have uploaded its setup you can download it from following link:<br /><br /><a href="ftp://helpopedia.ueuo.com@helpopedia.ueuo.com/Softwares/setupTV.zip">ftp://helpopedia.ueuo.com@helpopedia.ueuo.com/Softwares/setupTV.zip</a><br /><br />Note : Always use the Positive part of every thing.<br /><br />Regards<br /><br />UmairUmairhttp://www.blogger.com/profile/04687596441592437459noreply@blogger.com0tag:blogger.com,1999:blog-7858672234534555389.post-21212334829962442642009-08-15T22:56:00.000-07:002009-08-15T23:01:14.950-07:00A simple code to handle Time<pre><br /><br />$time="08:05:00"; //for sake of example .initial time<br />$curtime="01:05:00";//end time<br /><br />$t=explode(':',$time);<br />$h=intval($t[0]);<br />$m=intval($t[1]);<br /><br />$add=1;<br /><br />while($ntime!=$curtime)<br />{<br /> $h=intval($h);<br /> $m=intval($m);<br /> $m+=$add;<br /><br /> if($m>=60)<br /> {<br /> $h++;<br /> $m=$m-60;<br /> }<br /> if($h>23)<br /> $h=0;<br /><br /> if($h<10)<br /> {<br /> $h="0".$h;<br /> }<br /> if($m<10)<br /> {<br /> $m="0".$m;<br /> }<br /><br /> $ntime=$h.":".$m.":00";<br /> echo $ntime."<br />"; //it will echo each minute<br />}<br /></pre>Dihazhttp://www.blogger.com/profile/07142367990636982434noreply@blogger.com0tag:blogger.com,1999:blog-7858672234534555389.post-90398087766409893142009-08-06T03:40:00.000-07:002009-08-08T02:21:17.268-07:00Publish Your Website in 3 Steps.<div><b><span class="Apple-style-span" style="font-size:x-large;"><span class="Apple-style-span" style="text-decoration: underline;"><br /></span></span></b></div><div><br /></div><div>The three essential steps to publish your website onto the web are:</div><div><br /></div><div><b><span class="Apple-style-span" style="font-size:large;">1. Creating your website</span></b></div><div><b><br /></b></div><div>First you have to create a website. Depending on your level on knowledge in web development you have the following options. Either you can create the site yourself through manual programming in an editor program like DreamWeaver, EditPlus or Notepad. Otherwise there are a number of open source alternatives available without any requirement of prior programming knowledge.</div><div><br /></div><div><b>Using Wordpress</b></div><div><br /></div><div>Wordpress.org is one free content management system that is used by millions of blogging laymen. With it comes a whole system that makes it easy to add new content to your site and already made web design themes for you to choose between. If interested, learn more about how to create your own Wordpress theme.</div><div><br /></div><div><b>Using JOOMLA</b></div><div><br /></div><div>Joomla is another free CMS software which basically creates the site for you and eases the task of content administration. The only thing you have to do is to install it properly. In addition to this, you are also normally granted free access to site-building tools when you sign up for a hosting plan. </div><div><br /></div><div><b><span class="Apple-style-span" style="font-size:large;">2. Get a hosting plan</span></b></div><div><b><br /></b></div><div>Next step is to find somewhere online to put your website files and assign an address to that somewhere. Any given hosting plan include storage space on a web server and a domain name registration. Depending on what size your website has and potential traffic volume it's going to generate, you get a hosting plan based on three factors - storage space, bandwidth and CPU. Nowadays, there are many qualitative and cheap web hosting plans to choose between.</div><div>For all of you into blogging, there are also many great WordPress web hosts offering cheap hosting that is tailored to support this CMS.</div><div><br /></div><div><b><span class="Apple-style-span" style="font-size:large;">3.Upload your files/Publish your website</span></b></div><div><b><br /></b></div><div>Upload your files to the root directory of your purchased web hosting server space. You can do this either by using your hosting account's inhouse file manager, but those are often slow and manage large file volume poorly. Our recomendation is to get your hands on a FTP client. More specifically, a FireFox add-on by the name FireFTP. It will allow you to access your hosting account directly in the web browser and transfer website files with ease.</div>wAsIfhttp://www.blogger.com/profile/10446859174199086273noreply@blogger.com0tag:blogger.com,1999:blog-7858672234534555389.post-36695739632749609712009-08-01T15:43:00.001-07:002009-08-01T23:40:01.342-07:00How To Interpret DreamsThe idea that dreams have meanings is not new. But despite this, dream interpretation continues to attract interest from a lot of people. Besides, it is really interesting to know what it means to dream of a lilac flower, big tidal waves, or snakes. So, how can one interpret dreams? The answer to that is as complicated as the dream itself. But one thing is for sure, dream interpretation varies from one person to another.<br /><br />If you really want to have the best interpretation for your dreams, then following the guide from psychics is the best you can do.<br /><br /> <span style="font-weight: bold;">1.</span> Create a journal for your dreams. Just write everything you remember, from the most obvious to the most obscure, in this journal. It is best to write dream journals as soon as you can so you still have all the dream details in mind.<br /><br /> <span style="font-weight: bold;">2.</span> Write down how you felt when the dream happened. For example, were you scared or not when a snake appeared in your dream?<br /><br /> <span style="font-weight: bold;">3.</span> Interpret the meaning of each object in your dream. What does the snake mean to you? If it's your greatest fear, then why did it appear in your dream? Perhaps you saw a snake in your garden and that made you feel so afraid. But dream interpretation will be a lot more complicated if there are more than two objects in your dream. For example, aside from the snake, your dream may have shown your child, a city, flowers, and a hut. Each of these objects must be representing something in your life. Try to give each object your own interpretation. Flowers could be a peaceful place. Your child could mean a reminder of your obligation as a parent. The hut and the city could mean your want to travel the world. These objects may have also appeared in other people's dreams. But their interpretation can be different from you because each of these objects could have different personal meanings.<br /><br /> <span style="font-weight: bold;">4.</span> Rewrite your dream with your own interpretation. For the example above, it could mean you want to go out and explore the world. However, you have the fear to leave your child alone because you know that she is your responsibility. If in real life you really want to travel but your responsibility hinders you, then that interpretation makes sense. Perhaps the snake in your dream is a reality bite telling you that you can't travel because you have to prioritize your obligations.<br /><br />Telling your dream to someone else, like a psychic friend, can help in interpreting your dreams, too. Also, it's good to know that there are two kinds of dreams: physical or mystical. But they're more often physical than mystical. The latter happens very rarely for each person, once or sometimes never in a lifetime.<br /><br />Some psychics even claim that mystical dreams are usually out-of-body experiences. If you believe that the soul is separate from the body, then you must believe that having this mystical experience is possible through dreams.<br /><br />Keep in mind also that this dream interpretation guide is not new. It has been used by many psychics and just like them, you can be expert in interpreting dreams. You only need constant practice to do that.Dihazhttp://www.blogger.com/profile/07142367990636982434noreply@blogger.com0tag:blogger.com,1999:blog-7858672234534555389.post-27727137703257312862009-08-01T15:32:00.000-07:002009-08-01T23:30:16.297-07:00Why We Dream?<div style="text-align: center;"><br /></div><br /><div style="text-align: justify;"><div style="text-align: center;"><div style="text-align: left;">Everyone needs and wants to sleep. With sleeping you can revive your energy that you used throughout the day. Part of sleeping is having a dream. You may experience a very nice and beautiful dream like dreaming about your special someone or your goals in life but you may also have a tremendously bad dream, which is usually called as nightmare. You may wonder why people dream or where dreams came from or if your dream has any meaning.<br /><br /></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8M1grxZvHMn6ZlWAnHBReDBmvEl_w-DdxaoAdc89tM4EFiMc0Y1KhN0wmni73Zto3OZxZPReijTlgYqLiP_VSAXScmBOyatiVpg0zOdCZIwSkSoRZDwO4_hVcMVMTqIZIhSQhx6KKHoY/s1600-h/704dream.jpg"><img style="cursor: pointer; width: 270px; height: 282px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8M1grxZvHMn6ZlWAnHBReDBmvEl_w-DdxaoAdc89tM4EFiMc0Y1KhN0wmni73Zto3OZxZPReijTlgYqLiP_VSAXScmBOyatiVpg0zOdCZIwSkSoRZDwO4_hVcMVMTqIZIhSQhx6KKHoY/s400/704dream.jpg" alt="" id="BLOGGER_PHOTO_ID_5365249876100833570" border="0" /></a><br /><br /></div><br /> You dream because you have a brain—a dream is just an output of your brain activity while you are sleeping. Your brain is in constant activity even when you're sleeping, so you dream. When your mind and brain are at rest, the brain tends to review your emotions, thoughts, ideas, actions and interactions stored in your short term memory. At the same time your mind is also processing your beliefs, principles and psychic intuitions. When you're in the subconscious stage this data is processed so it forms a mini screen play which is what you call a dream. Some may call professionals just to interpret their dreams but this article will clear the fog on your mind about dreams.<br /><br /><span style="font-weight: bold;">1.</span> A dream is a chain of images, ideas, experiences, emotions and much more; though dreams don't have consistent series of images, experiences and scenarios. It usually portrays a different scenario from time to time; however, there are some people that dream about the same picture every time they sleep but still this phenomena doesn't last long. People who experience it may just think same thing is on their mind every time they sleep so the tendency is that their dreams re-occur.<br /><br /><span style="font-weight: bold;">2.</span> Based on ancient time, dreams seem to be meaningful and a sign from God. Our ancestors believed that through dreams, they could discover the spiritual message of God or maybe predictions of the future.<br /><br /><span style="font-weight: bold;">3.</span> Dreams are subjective, so contrary to what Sigmund Freud and ancient people believed, dreams don't have any symbols hidden, so no one can interpret your dreams. You're the only one who can discover why you dream a certain kind of vision. You may have a dream about past experiences or about your desires or even dream about weird things; all of these depend on you and the capacity of your brain and mind to process data.<br /><br /><span style="font-weight: bold;">4.</span> A dream is just a product of constant activity of the brain so dreams can also be defined as the unity of body, state of being, mind, beliefs and religion while you sleep.<br /><br />Don't be too intrigued about your dreams. It may or may not give you a significant meaning, but it's still a dream. What is more important is that you wake up each morning and fill your minds with some new, happy memories. Being alive and experiencing the blessings in this world are much more wonderful experiences than dreaming about your desires and goals. So don't just dream, do something to chase your dreams and you will definitely be happy.</div>Dihazhttp://www.blogger.com/profile/07142367990636982434noreply@blogger.com0tag:blogger.com,1999:blog-7858672234534555389.post-70525959438885224312009-07-31T15:33:00.000-07:002009-07-31T23:19:55.134-07:00How to Create a Wordpress Theme<div style="text-align: center;"><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcOz3L3Kp257Cjz6VUX7O5UvWC0qDjF14JKA_qvSubCynWSa0EdDY_Oa5QN5Rd8nJefWJ_sSFHZZpGta2dOAnoYjd5WhQFTozUv64tQlbi5YED0pIruvie13Qs2ieoKkk9V8usb9IsoD0/s1600-h/http+_www2.macleans.ca.jpg"><img style="cursor: pointer; width: 240px; height: 180px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcOz3L3Kp257Cjz6VUX7O5UvWC0qDjF14JKA_qvSubCynWSa0EdDY_Oa5QN5Rd8nJefWJ_sSFHZZpGta2dOAnoYjd5WhQFTozUv64tQlbi5YED0pIruvie13Qs2ieoKkk9V8usb9IsoD0/s400/http+_www2.macleans.ca.jpg" alt="" id="BLOGGER_PHOTO_ID_5364760541331679442" border="0" /></a><br /></div><p>This tutorial is especially for:</p> <p>1. People interested in learning how to build a Wordpress theme from scratch or, more specifically, for those interested in taking an existing design and converting it into a beautifully working Wordpress theme.</p> <p>2. People interested in integrating Wordpress with their existing website. As touched on lightly in my first tutorial, the best way to go about integration, in my experience, is to take your existing website and build a Wordpress theme out of it, then apply that theme to your Wordpress blog and voila, if all has gone well you have a perfect integration. It can require some handiness with CSS, but the principles covered in this tutorial will get you well on your way.</p><div style="text-align: center; font-weight: bold;"><span style="font-size:130%;"><a href="http://jonathanwold.com/tutorials/wordpress_theme/">For More....</a><br /><br /></span></div>Dihazhttp://www.blogger.com/profile/07142367990636982434noreply@blogger.com0tag:blogger.com,1999:blog-7858672234534555389.post-11242812555494063302009-07-26T04:50:00.000-07:002009-08-10T07:38:01.487-07:00Download Songs from a Collection of Audio/Video Songs (Pakistani)Some of songs which are very good and specially the songs by Roxen can be download form a collection of Audio/Video song. its free to download and no restrection. and there you can download the video of:<br />Allah hu and lal meri by junoon live in concert in central park in good qulity which rear on internet<br />To download and to see that collection list Visit:<br /><br /><a href="http://bad-boy-4-roxen.ueuo.com/">http://bad-boy-4-roxen.ueuo.com/</a><br /><br />EnjoyUmairhttp://www.blogger.com/profile/04687596441592437459noreply@blogger.com0tag:blogger.com,1999:blog-7858672234534555389.post-77818948509574567442009-07-24T21:38:00.000-07:002009-07-25T00:41:54.570-07:00How to Extract Audio (.mp3) From a Video<div align="center"><span style=";font-family:trebuchet ms;font-size:100%;" ><strong><u><br /></u></strong></span></div><div align="left"><span style="font-size:100%;"><strong></strong></span> </div><div align="left"><span style=";font-family:Trebuchet MS;font-size:100%;" >It's as easy as 1, 2, 3 because i JUST tried this software out. Now you can extract the audio from the videos of your favourite songs which you cannot find in .mp3 format anywhere else!<br /><br /></span></div><div align="left"><span style=";font-family:Trebuchet MS;font-size:100%;" ></span> </div><div align="left"><span style=";font-family:Trebuchet MS;font-size:100%;" ><span style="font-weight: bold;">1.</span> First of all go to <a href="http://www.dvdvideosoft.com/">www.dvdvideosoft.com</a>. Under the free audio/video conversion softwares, click on download link infront of "<span>Free Video to MP3 Converter 3.1.3.51".<br /><br /></span></span></div><div align="left"><span style=";font-family:Trebuchet MS;font-size:100%;" ><span></span></span> </div><div align="left"><span style=";font-family:Trebuchet MS;font-size:100%;" ><span><span style="font-weight: bold;">2.</span> Click on the download link. A window will appear. Click on "Run". Another window will appear telling you that the publisher could not be verified. Ignore it. Click on "Run" again.<br /><br /></span></span></div><div align="left"><span style=";font-family:Trebuchet MS;font-size:100%;" ><span></span></span> </div><div align="left"><span style=";font-family:Trebuchet MS;font-size:100%;" ><span><span style="font-weight: bold;">3.</span> Now comes the part of installing the software. And trust me installing a software is not as hard as you think. A 5-year old can do it. Its only a process that asks you to click on the following: "next-next-I Accept-next-install-finish". So on the window that appears next has a next button. Click on it.<br /><br /></span></span></div><div align="left"><span style=";font-family:Trebuchet MS;font-size:100%;" ><span></span></span> </div><div align="left"><span style=";font-family:Trebuchet MS;font-size:100%;" ><span><span style="font-weight: bold;">4. </span>Then comes the location of the file. If you want to change it click on 'browse' and choose the location where you want to put the folder for this software. Click on Next.<br /><br /></span></span></div><div align="left"><span style=";font-family:Trebuchet MS;font-size:100%;" ><span></span></span> </div><div align="left"><span style=";font-family:Trebuchet MS;font-size:100%;" ><span><span style="font-weight: bold;">5.</span> Click on "Install". It'll start installing. Click on finish and the software will be launched.<br /><br /></span></span></div><div align="left"><span style=";font-family:Trebuchet MS;font-size:100%;" ><span></span></span> </div><div align="left"><span style=";font-family:Trebuchet MS;font-size:100%;" ><span><span style="font-weight: bold;">6.</span> Click on the browse button beneath the Input Files. Select the video file you want to convert to mp3. Beneath the output folder, the location of the mp3 version will be given. If you want to change it click on browse and select another location. Under Presets there are different quality types in which the output will come out as. I prefer standard quality. Choose as you like and click on convert.<br /><br /></span></span></div><div align="left"><span style=";font-family:Trebuchet MS;font-size:100%;" ><span></span></span> </div><div align="left"><span style=";font-family:Trebuchet MS;font-size:100%;" ><span><span style="font-weight: bold;">7.</span> Voila!! Enjoy the audio version.<br /><br /></span></span></div><div align="left"><span style=";font-family:Trebuchet MS;font-size:100%;" ><span></span></span> </div><div align="left"><span style=";font-family:Trebuchet MS;font-size:100%;" ><span>Cheers!! :)<br /><br /></span></span></div>Syeda Sidra Shabbirhttp://www.blogger.com/profile/12095179972285352782noreply@blogger.com1tag:blogger.com,1999:blog-7858672234534555389.post-46665957415562247642009-07-24T17:19:00.000-07:002009-07-25T00:48:59.030-07:00How To Validate Your Copy of Windows XP<div align="center"><span style="font-size:100%;"><strong></strong><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbDX4WvRNWv6y8CxC-566eWzHTWzeu465ct1RdnR-_nktOi0rggI7naUkBkngOAoLYRMeKIDHceNOS3FvVcMT76WesAkqDPAgkxIq6lufV3SVHzUcd9nVI5zoHpxd98Ljqwdjwbni-_sxr/s1600-h/5868_imgcache.png"><span style=";font-family:trebuchet ms;" ><img id="BLOGGER_PHOTO_ID_5362187917908068226" style="margin: 0px auto 10px; display: block; width: 158px; height: 139px; text-align: center;" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbDX4WvRNWv6y8CxC-566eWzHTWzeu465ct1RdnR-_nktOi0rggI7naUkBkngOAoLYRMeKIDHceNOS3FvVcMT76WesAkqDPAgkxIq6lufV3SVHzUcd9nVI5zoHpxd98Ljqwdjwbni-_sxr/s200/5868_imgcache.png" border="0" /></span></a><br /></span><div align="justify"><span style=";font-family:trebuchet ms;font-size:100%;" >When you haven't installed an original copy of Windows XP [which you obviously haven’t because you got it from a Rs. 35 pirated CD :P], after a while you get a notification asking you to either validate it or get a genuine windows.</span></div><span style="font-size:100%;"><br /></span><div align="justify"><span style=";font-family:trebuchet ms;font-size:100%;" ></span></div><div align="justify"><span style=";font-family:trebuchet ms;font-size:100%;" >How to validate Windows XP without actually buying one is what I’m going to tell you in 10 simple steps:</span></div><span style=";font-family:trebuchet ms;font-size:100%;" ><div align="justify"><br />1. Go to <strong>RUN </strong>by clicking on the <strong>START</strong> button, and type <strong>REGEDIT</strong>. A window will open.<br /><br />2. Now expand <strong>HKEY LOCAL MACHINE</strong> on the left hand corner.<br /><br />3. Then expand SOFTWARE<br />then <strong>MICROSOFT<br /></strong>then <strong>WINDOWSNT</strong><br />then <strong>CurrentVersion</strong><br />and then <strong>WPAEvents<br /></strong><br />4. Now on the right side of the windows, double-click on <strong>OBETimer</strong><br /><br />5. Another window will open. In the window, select everything and press delete. Then exit.<br /><br />6. Go to <strong>RUN</strong> and type: <strong>%systemroot%\system32\oobe\msoobe.exe /a<br /></strong>[there's a space between exe and /a]<br /><br />7. A windows will open entitled 'Activate Windows'. Choose <strong>Yes, I wish to call.</strong><br /><br />8. Click on <strong>Modify Product Key</strong> button which appears at the base of this window.<br /><br />9. Type: <strong>THMPV - 77D6F - 94376 - 8HGKG - VRDRQ</strong> in the given key space and click on <strong>Update</strong>. Press 'Remember Later' on the windows that appears next and Restart your windows.<br /><br />10. After restarting, perform the 6th step again. You'll see a message telling you that your Windows is activated!! :D</div><br /><p align="justify"><span style=";font-family:trebuchet ms;" >This is how i activated my copy of windows and it's still in working condition! Hope it works for you as well :) If it doesn't, leave a comment and i'll attend to it as soon as i can.</span><span style=";font-family:trebuchet ms;" ></span></p></span><span style=";font-family:trebuchet ms;font-size:100%;" ><div align="justify">Cheers!</div></span></div>Syeda Sidra Shabbirhttp://www.blogger.com/profile/12095179972285352782noreply@blogger.com0tag:blogger.com,1999:blog-7858672234534555389.post-8342204187225703022009-07-19T12:39:00.000-07:002009-07-19T12:42:31.764-07:00How To Use PHP to Interact with MySQL<span style="font-weight: bold;"> 1. Introduction.</span> This article will discuss how to connect PHP and MySQL, to create a dynamic database-driven website. I will assume that you already have a PHP and MySQL copy installed on your system and they all work. I will also assume that you have basic knowledge about PHP including PHP syntax and how to run a PHP script.<br /><br /><span style="font-weight: bold;"> 2. PHP and MySQL. </span> PHP already includes a MySQL module in its distribution, so you won't need to install an additional software module.<br /><br /> <span style="font-weight: bold;">3. Create MySQL user.</span> <br /><br />To create a username and password for your script execute the MySQL console application. You must login as root, then execute this SQL statement:<br /><br /> CREATE DATABASE db_test;<br /> USE db_test;<br /> CREATE TABLE tbl_phonebook<br /> (<br /> phone_id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,<br /> phone_name VARCHAR(40),<br /> phone_number VARCHAR(40),<br /> INDEX phone_name_idx (phone_name),<br /> INDEX phone_number_idx (phone_number)<br /> );<br /> GRANT SELECT,UPDATE,DELETE,INSERT TO db_test.*<br /> TO 'test_user' IDENTIFIED BY 'test_user';<br /><br /> After you execute those SQL commands, MySQL will create a database called db_test which contains one table called tbl_phonebook. We will use this table for our sample web application.<br /><br /><span style="font-weight: bold;"> 4. Connecting to MySQL database.</span><br /><br /> To establish connection to a MySQL database, you need to call mysql_connect() or mysql_pconnect(). Basically they're all similar except the second one will create a persistent connection. A persistent connection is a connection that persists even if connection is closed.<br /><br /> <?php<br /> $link=mysql_connect('localhost','test_user','test_user');<br /> $persist_link=mysql_pconnect('localhost','test_user','test_user');<br /> ?><br /><br /> mysql_pconnect() is faster than mysql_connect() because it eliminates overhead to establish a connection to the MySQL database. If mysql_pconnect() finds that a persistent connection is already available for a user, it will use it, otherwise it creates new connection.<br /><br /> Upon connection completion, mysql_connect() and mysql_pconnect() returns a handle to connection.<br /><br /><br /> <span style="font-weight: bold;">5. Selecting a database to use. </span>To select database to use, use must call mysql_select_db(). This function requires a database name and optional handle of database connection. If you omit the handle of connection, it will use the currently open connection.<br /><br /> <?php<br /> $link=mysql_connect('localhost','test_user','test_user');<br /> mysql_select_db('db_test',$link);<br /> ?><br /><br /> Selecting a database is an optional step, which you can skip. However, if you do skip it, you must include the database name and table name to access a table. For example, to access tbl_phonebook you must provide the complete name db_test.tbl_phonebook instead of tbl_phonebook. Please note, you must use a period to separate the database name and table name.<br /><br /> <span style="font-weight: bold;"> 6. Execute SQL statement.</span> After you have a valid connection and have selected an active database, you are ready to execute the SQL statement to do some data manipulation. To execute the SQL statement, use mysql_query() function.<br /><br /> This function requires at least one parameter, which is the SQL command you want to execute. The second paramater is the connection you want to use. This parameter is optional. If you omit it, the currently open connection is used. If there is no open connection, this function will try to establish a new connection.<br /><br /> <?php<br /> mysql_connect('localhost','test_user','test_user');<br /> mysql_select_db('db_test');<br /> $sql="SELECT * FROM tbl_phonebook";<br /> mysql_query($sql);<br /> ?><br /><br /> <span style="font-weight: bold;">7. Inserting new data into the database.</span> To insert a new record into the database, you must execute the INSERT statement. For example:<br /><br /> <?php<br /> mysql_connect('localhost','test_user','test_user');<br /> mysql_select_db('db_test');<br /> $sql="INSERT INTO tbl_phonebook<br /> (<br /> phone_name,<br /> phone_number<br /> )<br /> VALUES<br /> (<br /> 'Johny Greenwood' ,<br /> '+6281455632112'<br /> ) ";<br /> mysql_query($sql);<br /> ?><br /><br /> For the INSERT operation, to know whether the execution succeeded or failed, we use value return by mysql_query(). It returns boolean value, i.e, TRUE if it succeeded or FALSE if it failed.<br /><br /> To know how what records were affected by the execution of this SQL command, we call mysql_affected_rows(). This function needs one optional connection parameter. If it is omitted then the curently open connection will be used. This function returns the number of rows affected.<br /><br /> <?php<br /> mysql_connect('localhost','test_user','test_user');<br /> mysql_select_db('db_test');<br /> $sql="INSERT INTO tbl_phonebook<br /> (<br /> phone_name,<br /> phone_number<br /> )<br /> VALUES<br /> (<br /> 'Johny Greenwood' ,<br /> '+6281455632112'<br /> ) ";<br /> mysql_query($sql);<br /> print('Number of rows affected : '.mysql_affected_rows());<br /> ?><br /><br /> <span style="font-weight: bold;">8. Retrieving data from a database.</span> To retrieve data from a database, we use SELECT command. This example was displayed previously. Here, we show it again.<br /><br /> <?php<br /> mysql_connect('localhost','test_user','test_user');<br /> mysql_select_db('db_test');<br /> $sql="SELECT * FROM tbl_phonebook";<br /> mysql_query($sql);<br /> ?><br /><br /> The above piece of code did nothing useful. To make data available for viewing, we must fetch rows. If we use mysql_query() for the SELECT operation, it will return resources to rows by the SELECT statement. To fetch data from this resource we use mysql_fetch_row(), mysql_fetch_assoc(), mysql_fetch_array() or mysql_fetch_object. Everytime mysql_fetch_***() is called, the database cursor is increment to the next data. If these return NULL, the cursor is at the end of file (EOF), so there is no more data to return.<br /><br /> mysql_fetch_rows() will fetch data and return data as a numeric array. For example:<br /><br /> Use of mysql_fetch_rows():<br /><br /> <?php<br /> mysql_connect('localhost','test_user','test_user');<br /> mysql_select_db('db_test');<br /> $sql="SELECT * FROM tbl_phonebook";<br /> $res=mysql_query($sql);<br /> if ($res)<br /> {<br /> while ($data=mysql_fetch_row($res))<br /> {<br /> print("<p>Name : ".$data[1]);<br /> print("Phone : ".$data[2]."</p>");<br /> }<br /> mysql_free_result($res);<br /> }<br /> ?><br /><br /> Data from the phone_name field is returned in index number 1, because we selected all fields. So index 0 will contain data of phone_id field whereas phone_number field will be returned in index 2.<br /><br /> mysql_free_result() frees resources returned by mysql_query(). PHP automatically frees all resources when the script is finished, so calling mysql_free_result() is optional, but surely a good programming habit.<br /><br /> mysql_fetch_row() will fetch data and return data as an associative array. For example:<br /><br /> Use of mysql_fetch_assoc():<br /><br /> <?php<br /> mysql_connect('localhost','test_user','test_user');<br /> mysql_select_db('db_test');<br /> $sql="SELECT * FROM tbl_phonebook";<br /> $res=mysql_query($sql);<br /> if ($res)<br /> {<br /> while ($data=mysql_fetch_assoc($res))<br /> {<br /> print("<p>Name : ".$data['phone_name']);<br /> print("Phone : ".$data['phone_number']."</p>");<br /> }<br /> mysql_free_result($res);<br /> }<br /> ?><br /><br /> Note that the name of the field is used to index the array.<br /><br /> mysql_fetch_array() is a combination of mysql_fetch_row() and mysql_fecth_assoc(). It returns a numeric array as well as an associative array.<br /><br /> mysql_fetch_object() fetches rows and returns data as an object. For example:<br /><br /> <?php<br /> mysql_connect('localhost','test_user','test_user');<br /> mysql_select_db('db_test');<br /> $sql="SELECT * FROM tbl_phonebook";<br /> $res=mysql_query($sql);<br /> if ($res)<br /> {<br /> while ($data=mysql_fetch_object($res))<br /> {<br /> print("<p>Name : ".$data->phone_name);<br /> print("Phone : ".$data->phone_number."</p>");<br /> }<br /> mysql_free_result($res);<br /> }<br /> ?><br /><br /> To know how many rows have been returned by mysql_query(), you call mysql_num_rows(). It requires one parameter, i.e, resource returned by mysql_query().<br /><br /> $tot_record=mysql_num_rows($res);<br /><br /> <span style="font-weight: bold;">9. Updating data. </span> To update data you execute the UPDATE command.<br /><br /> <?php<br /> mysql_connect('localhost','test_user','test_user');<br /> mysql_select_db('db_test');<br /> $sql="UPDATE tbl_phonebook SET phone_number='0135928549' WHERE phone_id=1";<br /> $res=mysql_query($sql);<br /> if ($res)<br /> {<br /> print('Update succeed');<br /> } else<br /> print('Update failed');<br /> ?><br /><br /> Similar to INSERT, the UPDATE command doesn't generate a result set but only the boolean value; TRUE if it succeeds of FALSE otherwise. To find out how many rows are affecteded by the UPDATE command, use mysql_affected_rows().<br /><br /><br /> <span style="font-weight: bold;">10. Removing data</span>. To remove a record you can use the DELETE command:<br /><br /> <?php<br /> mysql_connect('localhost','test_user','test_user');<br /> mysql_select_db('db_test');<br /> $sql="DELETE FROM tbl_phonebook WHERE phone_id=1";<br /> $res=mysql_query($sql);<br /> if ($res)<br /> {<br /> print('Phone ID =1 deleted');<br /> } else<br /> print('Unable to delete');<br /> ?><br /><br /><br /> <span style="font-weight: bold;"> 11. Closing connection.</span> To close what we have opened, we call mysql_close(). It requires an optional parameter, i.e. a connection to close. If we wanto to close the currently open connection, omit the optional parameter.<br /><br /> <?php<br /> $link=mysql_connect('localhost','test_user','test_user');<br /> mysql_select_db('db_test',$link);<br /> $sql="SELECT * FROM tbl_phonebook";<br /> $res=mysql_query($sql,$link);<br /> if ($res)<br /> {<br /> while ($data=mysql_fetch_object($res))<br /> {<br /> print("<p>Name : ".$data->phone_name);<br /> print("Phone : ".$data->phone_number."</p>");<br /> }<br /> mysql_free_result($res);<br /> }<br /> mysql_close($link);<br /> ?><br /><br /><br /> <span style="font-weight: bold;">12. Conclusion. </span> We have discussed basic steps to let PHP interact with MySQL, including how to establish a database connection, how to select an active database, and how to execute an SQL command.Dihazhttp://www.blogger.com/profile/07142367990636982434noreply@blogger.com0tag:blogger.com,1999:blog-7858672234534555389.post-16505966890421996572009-07-19T12:32:00.000-07:002009-07-19T12:36:34.650-07:00How to Avoid Photo Red Eye"Red eye" is caused by flash lighting reflecting off the back of the retina.<br /><br />Red Eye can be avoided in Photos by :<br /><br /><ol id="intelliTxt"><li> <p>Turn on the lights in the room so that your subjects' pupils will decrease in size.<span></span></p> </li><li> <p>Ask them to look to the side of your camera rather than straight at the camera when you snap the picture.</p></li><li>Divert babies or pets so that they look away from the camera.</li></ol>Dihazhttp://www.blogger.com/profile/07142367990636982434noreply@blogger.com0tag:blogger.com,1999:blog-7858672234534555389.post-44134486640827151172009-07-19T12:09:00.000-07:002009-07-20T00:07:05.326-07:00Program a Fake Computer Virus in 60 Seconds =)Today we will create a Program which is a fake virus that will reboot your system even bypassing Anti virus.<br /><br /><span style="font-weight: bold;"> 1. </span>Open your <span style="font-weight: bold;">notepad</span> and write down the following code, <span style="font-weight: bold;">shutdown -r -t 5 -c "Your computer is diseased.LaLalaLALALaLlala.Byeeee!! Byee!!!" </span><br /><br /><ul><li>The " -r" tells your computer system to restart or reboot.</li><li>the " -t" command determines how much countdown time before system reboot, the number that follows the command in " -t 5" is the specified time in seconds you allot before the system automatically reboots. The number could be anything you want to specify like 10 seconds, in this example we put in a 5 second countdown.</li><li> The " -c" command in the program, lets you create your custom error message, think of something that would alarm the owner of the computer.</li></ul><br /><br /><span style="font-weight: bold;"> 2. </span>Save the program. Select file on your notepad and click "save as." On the dialogue box think of a file name that would catch a person's curiosity and compel that person to click on our little program. In this example we'll use "secrets", and then you need to append the name with ".bat", so you'll saving the program like this, secrets.bat. Click the save button.<br /><br /><span style="font-weight: bold;"> 3. </span>Test the fake computer virus. Click the shortcut or icon of the program you just saved to run the program. You'll get the custom error message you created and a countdown timer. At the end of the countdown your computer will automatically reboot.<br /><br /> <span style="font-weight: bold;">4.</span> To stop the program select Start then click Run. You can stop the program from rebooting your computer by selecting Start then select Run. In the dialogue box type in "shutdown -a", this will prevent the program from continuing.<br /><br />This fake computer virus is a harmless prank you can pull on your friends. Copy and transfer the file to their computer, hide it somewhere other than the desktop. Once it is hidden, right-click the file and choose "Send To" then select "Desktop (create shortcut). Go to the shortcut you created on the desktop then right-click it and select properties. On the Shortcut tab click the "Change Icon" button and choose an icon like the internet explorer icon. This will make it look like an innocent icon =))<br /><br />Or you can attach this program with startup of users computer. User will never b able to start his/her computer or you can attach it in autorun.inf file of any drive or Flash Drive wheneva user will click on drive his/her PC will restart =)) i m saving this for next tutorial =D<br /><br /><span style="font-weight: bold;">P.S. batch files can be very dangerous Programs. They Can shutdown, Restrat, or even Format Your Hard Drive with out and prompt message. I m not sharing format commands as they can be dangerous. Just Enjoy with these fun commands.<br /><br /></span>Dihazhttp://www.blogger.com/profile/07142367990636982434noreply@blogger.com0tag:blogger.com,1999:blog-7858672234534555389.post-28090212165700215322009-07-19T11:50:00.000-07:002009-07-19T11:52:16.386-07:00Install a Free Message Board PHP Script<div style="text-align: justify;">Having your own website is a good way to get your message or opinions out and share them with other people. You can market your own products through your website or offer services. For whatever reason you want to have a website, it is always good to have a way for people to communicate their thoughts and opinions with you and to others who may find their way to your website. In the old days offices, institutions, clubs or schools would have a bulletin board or a message board for people to post anything they want to share with other people. But now as we use the computer and the Internet more often, message boards take on a new venue, one where the whole world can join in. People on the Internet can post topics and get a discussion online when people reply to the topics. To put up a message board on your website you can install a free message board PHP script.<br /><br /> 1. Download a free message board PHP script. Find websites offering free message boards to download. You will find numerous sites with free download-able message boards, pick the one you prefer and download the files to your desktop. Once it is downloaded to your computer, open the folder containing the files and search for the read me file. It will contain the instructions you need to install the message board to your website. Follow the instructions to set up the settings, like the administrative password, the title and URL of your website in your text editor.<br /><br /> 2. Upload the message board through FTP. You’ll to open your FTP program to upload the message board files on to your server. Create a folder and name it board in your server<br /> ’s directory. Publish or transfer the message board files to the board folder you created on your server.<br /><br /> 3. Create a directory called msg. Once you have all the files on your server, create another folder called “msg” then right click the folder to change the folder’s file attribute giving it a 777 numeric value. Locate the threads.txt and count.txt, give it a 666 numeric value in the file attributes for each.<br /><br />You can now text the message board on your website. You can customize the message board through the CSS file in the mboard.php file.<br /><br />Downloading and installing a free message board PHP script on your website is the best way to have a simple and effective message board on your website, and as a bonus it won’t take up too much space on your server.</div>Dihazhttp://www.blogger.com/profile/07142367990636982434noreply@blogger.com0tag:blogger.com,1999:blog-7858672234534555389.post-3055603739908915502009-07-19T11:44:00.000-07:002009-07-19T11:47:34.630-07:00Learn PHP on 15 Minutes<span style="font-weight: bold;">Step 1:</span>
<br />
<br />To be able to execute PHP scripts, you need at least a working PHP installation+ web server. Linux, Apache, MySQL and PHP are the best combinations. PHP also can run under Microsoft Windows, too.
<br />
<br />PHP installation and configuration can be made easy with tools such as Apache2Triad or XAMPP which automate web server and PHP installation.
<br />
<br />PHP script is stored in text format file so you need text editor. Notepad and Notepad++ are enough for your PHP development needs. However, you may opt to invest in more advanced tools such Dreamweaver or Eclipse.
<br /><span style="font-weight: bold;">Step 2:</span>
<br />
<br />PHP script is anything between <?php .. ?> pair. You can also use <? .. ?>. The first is most widely used.
<br />
<br /><html>
<br /><head></head>
<br /><body>
<br /> <?php
<br /> print '<h1>Hello this is my first script</h1>';
<br /> ?>
<br /></body>
<br /></html>
<br />
<br />Output of the following code will be same as the previous code:
<br />
<br /><?php
<br />print '<html>
<br /><head></head>
<br /><body>
<br /> <h1>Hello this is my first script
<br /></body>
<br /></html>';
<br />?>
<br />
<br /><span style="font-weight: bold;">Step 3:</span>
<br />
<br />The power of PHP lies on the capability to change how HTML code will output. The following code will output different HTML codes when you change the name.
<br />
<br /><html>
<br /><head></head>
<br /><body>
<br /><?php
<br />$aname=$_GET['name'];
<br />print '<h1>Hello <b>'.$name.'</b> this is my first script</h1>'; ?>
<br /></body>
<br /></html>
<br />
<br />
<br />Save this script as welcome.php in the document root directory (for Apache web server, this is usually htdocs directory). Open your web browser and type http://localhost/welcome.php?name=Zamrony
<br />
<br /><span style="font-weight: bold;">Step 4:</span>
<br />
<br />$_GET is a predefined variable which stores lists of parameters passed to the script. It is an array. If you change http://localhost/welcome.php?name=zamrony&country=Indonesia, $_GET will contain more items.
<br />
<br /><html>
<br /><head></head>
<br /><body>
<br /><?php
<br /> $aname=$_GET['name'];
<br /> $acountry=$_GET['country'];
<br /> print '<h1>Hello <b>'.$name.'</b> from '.$acountry.' .
<br /> this is my first PHP script</h1>';
<br />?>
<br /></body>
<br /></html>
<br />
<br />It will print Hello Zamrony from Indonesia. This is my first PHP script.
<br />
<br /><span style="font-weight: bold;">Step 5:</span>
<br />
<br />$aname, $acountry and $_GET are all variables in PHP. Any variables in PHP should be prefixed with dollar sign. Variable names must only contain alphanumeric and underscore characters where the first character in variable names should be alphabet characters or underscores.
<br />
<br />This is invalid variable name:
<br />
<br />$123
<br />$1aname
<br />$*jskk
<br />
<br />This is valid variable name:
<br />
<br />$k123
<br />$j
<br />$_
<br />$_test
<br />$k123k
<br />$KK
<br />
<br />
<br />PHP is case sensitive. Variable $kk is not $KK.Dihazhttp://www.blogger.com/profile/07142367990636982434noreply@blogger.com0tag:blogger.com,1999:blog-7858672234534555389.post-14953144167882756602009-07-19T06:26:00.000-07:002009-07-19T06:29:44.315-07:00How to Create a Basic Login Script in PHPInterested in creating your own forum page, blog, or even a shopping cart? A login area is the first step. Here is how to create a script for it in PHP.
<br />
<br /><span style="font-weight: bold;">Steps:</span>
<br />
<br /> <span style="font-weight: bold;"> 1.</span> Create the login database and table. For the purposes of the code examples below, we will assume the database name to be "test" and the table name to be "members". The database and table can be created through the control panel of your webhost. The "members" table will store the username and the passwords of all the people would be allowed access via this login script. The table should have a unique id field as the primary key, a username field, and a password field.
<br />
<br />
<br /> <span style="font-weight: bold;">2</span>. Create the login interface. This is an html page containing a form, two text boxes for the user name and password, and a submit button. As long as you have these elements, you may design the layout however you wish.
<br />
<br /> Example:
<br />
<br /> <form name="form1" method="post" action="checklogin.php">
<br /> <strong>Member Login </strong>
<br /> Username: <input name="myusername" type="text" id="myusername">
<br /> Password: <input name="mypassword" type="password" id="mypassword">
<br /> <input type="submit" name="Submit" value="Login"></form>
<br />
<br /> <span style="font-weight: bold;"> 3</span>. Create the php script that will check the login input against the database. This script will connect to the database, send a query and retrieve the result, check to see if the username and password is correct and send you to the next page depending on the result of the comparison.
<br />
<br /> Example (connecting to the database):
<br />
<br /> <?php
<br /> $host="localhost"; // Host name
<br /> $username=""; // username
<br /> $password=""; // password
<br /> $db_name="test"; // Database name
<br /> $tbl_name="members"; // Table name
<br />
<br /> // Replace database connect functions depending on database you are using.
<br /> mysql_connect("$host", "$username", "$password");
<br /> mysql_select_db("$db_name");
<br />
<br />
<br /> Example (submitting query and retrieving results):
<br />
<br /> // username and password sent from form
<br /> //NEVER Remove the mysql_real_escape_string. Else there could be an Sql-Injection!
<br /> $myusername=mysql_real_escape_string($_POST['myusername']);
<br /> $mypassword=mysql_real_escape_string($_POST['mypassword']);
<br />
<br /> $sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'";
<br /> $result=mysql_query($sql);
<br />
<br />
<br /> Example (checking results):
<br />
<br /> // Replace counting function based on database you are using.
<br /> $count=mysql_num_rows($result);
<br /> // If result matched $myusername and $mypassword, table row must be 1 row
<br />
<br />
<br /> Example (direct user based on result):
<br />
<br /> if($count==1){
<br /> // Register $myusername, $mypassword and redirect to file "login_success.php"
<br /> session_register("myusername");
<br /> session_register("mypassword");
<br /> header("location:login_success.php");
<br /> } else {
<br /> echo "Wrong Username or Password";
<br /> }
<br />
<br /> <span style="font-weight: bold;"> 4.</span> Create the page that will display after login success. This script will start your session and display an html message of your choosing.
<br />
<br /> Example:
<br />
<br /> // Check if session is not registered , redirect back to main page.
<br /> <?
<br /> session_start();
<br />
<br /> if(!session_is_registered(myusername)){
<br /> header("location:main_login.php");
<br /> }
<br /> ?>
<br />
<br /> <html>
<br /> <body>
<br /> Login Successful
<br /> </body>
<br /> </html>
<br />
<br /> <span style="font-weight: bold;">5.</span> Create logout script. This step is optional as sessions can time out. If you wish to create one, you will need a button or link to initiate the script and a message to confirm the success of logging out.
<br />
<br /> Example:
<br />
<br /> <?
<br /> session_start();
<br /> session_destroy();
<br /> ?>
<br />
<br />
<br /><span style="font-weight: bold;">Tips</span>
<br />
<br /> * Replace the database functions in your script with the appropriate functions for the database you are using (e.g. SQLITE, Microsoft SQL, etc.)
<br />
<br /> * Depending on your requirements, add security checks to your script.
<br />
<br /> * Try using CSS and various HTML elements to create an interesting look for your login and message pages.
<br />
<br />
<br />Dihazhttp://www.blogger.com/profile/07142367990636982434noreply@blogger.com0tag:blogger.com,1999:blog-7858672234534555389.post-15327275842393880332009-07-19T06:17:00.000-07:002009-07-19T06:20:17.723-07:00How To Make Your Lipstick Last Longer<div style="text-align: justify;"><br />Applying lipsticks can definitely accentuate your lips. However, you need to choose the right shade and brand that will suit you. Now, if you already have the right lipstick, the next challenge is making it stay longer without constantly re-applying. You want to look fresh the whole day, but you might not always have the opportunity to reapply lipstick after each meal or snack.<br /><br />As a solution, most manufacturers have come up with lipstick products that are made to last longer than the regular products. However, if your favorite lipstick is not specially formulated to last long, here are some tips to help you.<br /><br /> * <span style="font-weight: bold;">Exfoliate your lips.</span> Your lips also have dead skin cells, and it is important for you to remove these before applying lipstick. This will result in a smoother finish, and will definitely make your lipstick last longer. To exfoliate, gently swab your lips using a sponge or a soft brush.<br /> <br /> * <span style="font-weight: bold;">Use powder</span>. One of the best ways to make your lipstick stay longer is by applying a thin layer of loose powder on your lips before applying the lipstick. The powder helps prevent smudging and will keep your lipstick in place. Dab a bit of loose powder on a cotton swab or sponge and apply to your lips, including the lip line. You may remove excess powder using facial tissue.<br /><br /> * <span style="font-weight: bold;">Use a lip liner.</span> Using a lip liner will help in precisely outlining your lips. This is also a good way to make your lipstick last longer. The lip liner is usually made of material that is drier than lipstick, to prevent it from smudging. It is important to choose the right lip liner for your lipstick and make sure that it will blend well. If possible, use the same lip liner brand as your lipstick. Or, choose a skin-colored or nude colored lip liner so you can use it with any of your lipstick colors.<br /><br /> * <span style="font-weight: bold;">Use tissue</span> to remove excess lipstick. To remove the excess lip stick, get a tissue and place it in between your lips. Then, apply a second layer of lipstick. This layering will result in longer lasting lipstick, so you don't have to reapply often.<br /><br /> * <span style="font-weight: bold;">Choose a good brand.</span> A lot of brands are available and you need to choose a brand that provides a good quality of gloss and longevity. Although a good brand would cost more, in the long run, you can actually save because these will last longer, and you won't have to constantly reapply, as with cheaper brands.<br /><br /> * <span style="font-weight: bold;">Store your lipstick properly</span>. Storing your lipstick properly will help maintain its quality. You need to make sure that the temperature where you store it is regulated. Keep it away from direct sunlight, extreme temperatures and extreme humidity.<br /><br />Wearing lipstick may not exactly be challenging. But reapplying every so often can be a hassle, especially if you're busy with work. Making your lipstick last longer may be a minor thing, but if it can help reduce your worries about how you look, then it's a good thing to try these simple tips.</div>Dihazhttp://www.blogger.com/profile/07142367990636982434noreply@blogger.com0tag:blogger.com,1999:blog-7858672234534555389.post-41968230257033016512009-07-14T09:45:00.000-07:002009-07-14T09:54:19.720-07:0050 Intresting Facts<p><br /></p><p><br /></p><p>1. If you are right handed, you will tend to chew your food on your right side. If you are left handed, you will tend to chew your food on your left side.</p> <p>2. If you stop getting thirsty, you need to drink more water. For when a human body is dehydrated, its thirst mechanism shuts off.</p> <p>3. Chewing gum while peeling onions will keep you from crying.</p> <p>4. Your tongue is germ free only if it is pink. If it is white there is a thin film of bacteria on it.</p> <p>5. The Mercedes-Benz motto is “Das Beste oder Nichts” meaning “the best or nothing”. </p> <p><span id="more-387"></span></p> <p> 6. The Titanic was the first ship to use the SOS signal.</p> <p>7. The pupil of the eye expands as much as 45 percent when a person looks at something pleasing.</p> <p>8. The average person who <a id="KonaLink0" target="undefined" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://www.hemmy.net/2006/04/30/50-interesting-facts/#"><span style="color: rgb(255, 0, 0) ! important; font-family: Verdana,Arial,sans-serif; font-weight: 400; font-size: 11.5167px; position: static;color:#ff0000;" ><span class="kLink" style="border-bottom: 1px solid rgb(255, 0, 0); color: rgb(255, 0, 0) ! important; font-family: Verdana,Arial,sans-serif; font-weight: 400; font-size: 11.5167px; position: static; background-color: transparent;">stops </span><span class="kLink" style="border-bottom: 1px solid rgb(255, 0, 0); color: rgb(255, 0, 0) ! important; font-family: Verdana,Arial,sans-serif; font-weight: 400; font-size: 11.5167px; position: static; background-color: transparent;">smoking</span></span><span style="position: relative;" id="preLoadWrap0"><div style="position: absolute; z-index: 4000; top: -32px; left: -18px; display: none;" id="preLoadLayer0"><img style="border: 0px none ;" src="http://kona.kontera.com/javascript/lib/imgs/grey_loader.gif" /></div></span></a> requires one hour less sleep a night.</p> <p>9. Laughing lowers levels of stress hormones and strengthens the immune system. Six-year-olds laugh an average of 300 times a day. Adults only laugh 15 to 100 times a day.</p> <p>10. The roar that we hear when we place a seashell next to our ear is not the ocean, but rather the sound of blood surging through the veins in the ear.</p> <p>11. Dalmatians are born without spots.</p> <p>12. Bats always turn left when exiting a cave.</p> <p>13. The ‘v’ in the name of a court case does not stand for ‘versus’, but for ‘and’ (in civil proceedings) or ‘against’ (in criminal proceedings).</p> <p>14. Men’s shirts have the buttons on the right, but women’s shirts have the buttons on the left.</p> <p>15. The owl is the only bird to drop its upper eyelid to wink. All other birds raise their lower eyelids.</p> <p>16. The reason honey is so easy to digest is that it’s already been digested by a bee.</p> <p>17. Roosters cannot crow if they cannot extend their necks.</p> <p>18. The color blue has a calming effect. It causes the brain to release calming hormones.</p> <p>19. Every time you sneeze some of your brain cells die.</p> <p>20. Your left lung is smaller than your right lung to make room for your heart.</p> <p>21. The verb “cleave” is the only English word with two synonyms which are antonyms of each other: adhere and separate.</p> <p>22. When you blush, the lining of your stomach also turns red.</p> <p>23. When hippos are upset, their sweat turns red.</p> <p>24. The first Harley Davidson motorcycle was built in 1903, and used a tomato can for a carburetor.</p> <p>25. The lion that roars in the MGM logo is named Volney.</p> <p>26. Google is actually the common name for a number with a million zeros.</p> <p>27. Switching letters is called spoonerism. For example, saying jag of Flapan, instead of flag of Japan.</p> <p>28. It cost 7 million dollars to build the Titanic and 200 million to make a film about it.</p> <p>29. The attachment of the human skin to muscles is what causes dimples.</p> <p>30. There are 1,792 steps to the top of the Eiffel Tower.</p> <p>31. The sound you hear when you crack your knuckles is actually the sound of nitrogen gas bubbles bursting.</p> <p>32. Human hair and fingernails continue to grow after death.</p> <p>33. It takes about 20 seconds for a red blood cell to circle the whole body.</p> <p>34. The plastic things on the end of shoelaces are called aglets.</p> <p>35. Most soccer players run 7 miles in a game.</p> <p>36. The only part of the body that has no blood supply is the cornea in the eye. It takes in oxygen directly from the air.</p> <p>37. Every day 200 million couples make love, 400,000 babies are born, and 140,000 people die.</p> <p>38. In most watch advertisements the time displayed on the watch is 10:10 because then the arms frame the brand of the watch (and make it look like it<br />is smiling).</p> <p>39. Colgate faced big obstacle marketing toothpaste in Spanish speaking countries. Colgate translates into the command “go hang yourself.”</p> <p>40. The only 2 animals that can see behind itself without turning its head are the rabbit and the parrot.</p> <p>41. Intelligent people have more zinc and copper in their hair.</p> <p>42. The average person laughs 13 times a day.</p> <p>43. Do you know the names of the three wise monkeys? They are:Mizaru(See no evil), Mikazaru(Hear no evil), and Mazaru(Speak no evil)</p> <p>44. Women blink nearly twice as much as men.</p> <p>45. German Shepherds bite humans more than any other breed of dog.</p> <p>46. Large kangaroos cover more than 30 feet with each jump.</p> <p>47. Whip makes a cracking sound because its tip moves faster than the speed of sound.</p> <p>48. Two animal rights protesters were protesting at the cruelty of sending pigs to a slaughterhouse in Bonn. Suddenly the pigs, all two thousand of them, escaped through a broken fence and stampeded, trampling the two hapless protesters to death.</p> <p>49. If a statue in the park of a person on a horse has both front legs in the air, the person died in battle; if the horse has one front leg in the air, the person died as a result of wounds received in battle; if the horse has all four legs on the ground, the person died of natural cause.</p> <p>50. The human heart creates enough pressure while pumping to squirt blood 30 feet!!<br /></p><p><br /></p><p><br /></p>Dihazhttp://www.blogger.com/profile/07142367990636982434noreply@blogger.com4tag:blogger.com,1999:blog-7858672234534555389.post-20360094798582278392009-07-14T04:01:00.000-07:002009-07-19T11:53:57.717-07:00Pakistan's Rich List of 2008<div style="text-align: justify;">Short-listing Pakistan's most influential business magnates or Groups has<br />never been an easy task because there are the people who have been very<br />powerful in nearly every regime that has held this country's reins since<br />the last 60 years and then we have had those seasonal species that<br />maneuvered their voice to be heard better than most within the power<br />corridors, but later vanished into the oblivion for one reason or the<br />other. We have selected only those tycoons who have made their presence<br />felt for a better part of country's history, have earned consistently, have<br />been setting up units at regular intervals or have been legends in stocks,<br />currency or real estate business.<br /><br />The list excludes many names that have previously qualified and all of<br />Pakistan's most prominent feudal land lords who would definitely make it to<br />the top 10, expect the few land owners which have declared their assets and<br />work force and registered with the CBR Islamabad. In order to promote the<br />new and "unknown" Pakistani magnates we have excluded in previous entities.<br /><br />Unfortunately, our extensive research does not currently include the names<br />of a few stars that shone brightly amidst the galaxy of the influential<br />creed of yesteryear like C.M.Latif of BECO- the Steel Man of Pakistan- who<br />did make a lot of name once, but then got gifted with contentment somehow,<br />although the late business wizard got very badly hit by Bhutto's<br />nationalization of 1970 which had inflicted an astounding thud to everybody<br />in business then. Had it not been the case, many of our tycoons may well<br />have managed to gain the kind of status greeting the likes of Birlas and<br />Tatas in India today, if not the one saluting Bill Gates or Warren Buffet.<br />Among these gifted individuals, you will find<br />politicians-turned-businessmen, businessmen-turned-politicians or even the<br />businessmen-cum-politicians. With malice towards none and with no intention<br />to decorate somebody, We thus takes the pride of announcing these names. We<br />hope this document will go a long way in serving as the most authentic<br />endeavor of its kind for a very long time to come. It has been prepared<br />very carefully in consultation with leading real estate barons, stock<br />moguls, business leaders of virtue and senior bureaucrats at the Central<br />Board of Revenue.<br /><br /><br /><span style="font-weight: bold;">1 - Mian Muhammad Mansha Yaha Pakistan</span><br /><br /><br />Ranking: 1 Worth: £1.25b ($2.5billion)Industry: Businessman<br /><br /><br />Mansha has around 40 companies on board. Mansha, who owns the Muslim<br />Commercial Bank is also setting up a $ 17m paper mill. He is one of the<br />richest Pakistanis around. Nishat Group was country's 15th richest family<br />in 1970, 6th in 1990 and Number 1 in 1997. Mansha is on the board of nearly<br />50 companies. He is deemed to have made investments in many bourses,<br />currency and metal exchanges both within and outside Pakistan. He could<br />have bought the United Bank too, but then who doesn't have adversaries.<br />Nishat Group comprises of textiles, cement, leasing, insurance and<br />management companies. If Mansha was bitten by Bhutto's nationalization<br />stint of 1970, his friends think he was compensated by Nawaz Sharif's<br />denationalization programme to a very good effect. There is no stopping<br />Mansha and he is still on the move.<br /><br /><br />Nishat group assets are $4.4Billion. He is sometimes even regarded as the<br />richest Pakistani around by his friends claiming he does not "show it off".<br /><br /><br /><span style="font-weight: bold;">2 - Asif Ali Zardari Pakistan</span><br /><br /><br />Ranking: 2 Worth: £900m ($1.8billion) Industry: Politics<br /><br /><br />Asif Zardari dubbed "Mr 10%" an unknown happy-go-lucky son of a small-time<br />businessman who struck gold by marrying one of the worlds most glamorous<br />women Former Prime Minister of Pakistan Benzair Bhutto. Taking advantage of<br />his wife's authority he is known to have taken kickbacks from many deals<br />inside and outside of Pakistan. The most famous was a $4 billion deal to<br />buy 32 Mirage jets from the French company Dassault. Documents, which<br />include letters from Dassault executives, indicate an agreement was reached<br />to pay a 5% "remuneration" - about $200m - to Marleton Business, a BVI<br />company controlled by Zardari. Besides these many more kickback deals were<br />taken with companies such as ARY Gold, Société Général de Surveillance<br />(SGS), Cotecna, and ZPC Ursus, a Polish tractor company.<br /><br /><br />Zardari assets holding amount into hundreds of millions of dollars easily,<br />Having 8 prime properties in the UK, of which once is the famous Rockwood<br />Estate 365 acres in Surrey, worth £4.35m has now been sold and money sent<br />back to the Govt. of Pakistan. Also 14 multi-million dollar mansions in the<br />USA, including owning Holiday Inn hotel Houston, Texas Owned by "Mr 10%"<br />and Iqbal Memon and Sadar-ud-Din Hashwani.<br /><br /><br />They (Zardari and B.Bhutto) also have huge business ventures in the Middle<br />East running into hundreds of millions if not billion mark. Mr Zardari also<br />has huge stakes in sugar mills all over Pakistan,which include: Sakrand<br />Sugar Mills, Nawabshah, Ansari Sugar Mills, Hyderabad, Mirza Sugar Mills,<br />Badin, Pangrio Sugar Mills, Thatta and Bachani Sugar Mills, Sanghar.<br /><br /><br /><span style="font-weight: bold;">3 - Sir Anwar Pervaiz UK</span><br /><br /><br />Ranking: 3 Worth: £750m ($1.5billion) Industry: Businessman<br /><br /><br />Chairman of Bestway Group. The Bestway Group started in 1976 with its first<br />Bestway cash and carry warehouse opened in London. Today the have in total<br />around 50 Cash and Carry's. Including their recent takeover of rival group<br />Batleys for around £100m. Bestway Group ventured into Pakistan's huge the<br />cement business in 1995 and set up cement manufacturing plant in Pakistan<br />at a cost of $120 million.<br /><br /><br />Taking Advantage of Pakistan growing economy they also acquired a 25.5%<br />stake in United Bank Limited in 2002. Today, the Bestway Group has<br />interests in cash & carry wholesale, property investments, retail outlets,<br />milling of rice, lentils and pulses, cement production and more recently<br />into banking. The group's total sales amounted to in excess of £ 2 billion.<br />The group provides direct employment to thousands in the UK and Pakistan.<br />The have many interests in Pakistan too. Sir Anwar Pervaiz and his his<br />partners sheer hard work has bought them to outstanding international<br />levels, which definitely makes him an ideal role model for many young<br />Pakistanis today. He still on the move!<br /><br /><br /><span style="font-weight: bold;">4 - Nawaz Sharif & Shahbaz Sharif family Saudi Arabia/Pakistan</span><br /><br /><br />Ranking: 4 Worth: £700m ($1.4billion) Industry: Politics/Businessman<br /><br /><br />Mr Sharif Businessman turned politician the former Prime Minister of<br />Pakistan. He was ousted in a military coup in 1999 and was forced to<br />forfeit $9million dollars and some of his assets including his $5m Mansion<br />is Raiwind near Lahore. Before becoming PM he was a major share holder<br />along with his brother and cousins of Ittefaq Group, having assets well in<br />excess of £50m in the 90's. However he got richer when he took commissions<br />from foreign companies for construction in Pakistan. He build the first<br />motorway and many new roads and took heavy kickbacks. He then also stole<br />$100m from the Iqra funds, he started a new scheme "Ghar Apna" in which he<br />again looted around $40m, the "Mulk swaaro" scheme involving public & govt.<br />money collections to help pay pf Pakistan's debts also was pocketed. Today<br />he lives in exile in Saudi Arabia where it is known he has a new huge<br />business empire in various sectors.<br /><br /><br /><br /><span style="font-weight: bold;">5 - Saddaruddin Hashwani Pakistan</span><br /><br /><br />Ranking: 5 Worth: £550m ($1.1billion) Industry: Businessman<br /><br /><br />Saddaruddin Hashwani is Chairman Hashoo Group is known for his dominance in<br />Pakistan's hotel industry, though Hashwanis are have huge strength in real<br />estate business too. Hashwanis are involved in trading of cotton, grain and<br />steel and till the nationalization of cotton export in 1974, they were<br />widely being dubbed as the Cotton Kings of Pakistan. Today, this group has<br />excelled in export of rice, wheat, cotton and barley. It owns textile<br />units, besides having invested billions in mines, minerals. hotels,<br />insurance, batteries, tobacco, residential properties, construction,<br />engineering and information technology. In 1984, Hashwani defeated the<br />Lakhanis in the bid for Premier Tobacco but was arrested along with his<br />brother Akbar in 1986 for allegedly evading customs duty on cigarettes.<br />Sadarduddin's brother Akbar and the children of another late brother Hassan<br />Ali Hashwani together manage around 45 companies. Akbar runs the second<br />Hashwani Group. He is one of the most well-known magnates in Pakistan who<br />is a regular invitee at the Diplomatic Enclave. The list of local and<br />international bigwigs known personally to Hashwani is unending.<br /><br /><br /><span style="font-weight: bold;">6 - Nasir Schon & family U.A.E/Pakistan</span><br /><br /><br />Ranking: 6 (tied at 6) Worth: £500m ($1billion) Industry: Businessman<br /><br /><br />Nasir Schon is a prominent business leader of Pakistan and the CEO of Schon<br />Group. Nasir Schon is the son of Captain Ather Schon Hussain, an ex-pilot<br />of PIA. The Schon family is one of the few striving Muhajir Urdu business<br />families in Pakistan. Starting off in Singapore in 1982, the peek of Schon<br />group was in 1995 when they owned National Fibres, Schon Bank, Schon<br />Textiles and Pak-China Fertizilers. Famous for the trend-setting<br />roundabout, Schon Circle, Nasir Schon is also known to be one of the first<br />people to have a Rolls-Royce in Pakistan. Directors of Schon group flew to<br />Dubai in 1997 in exile after the dismissal of ex-Prime Minister Benazir<br />Bhutto. The directors of Schon group were known to have close contacts with<br />the husband of former Prime Minister, Asif Zardari. Many assets of the<br />Schon group were auctioned by the Nawaz Sharif government. Schon Group is<br />the only group in Pakistan who has paid the government over 3 billion<br />rupees ($65m) in order to return from exile. Living in Dubai gave Nasir<br />Schon an opportunity to start businesses there. Currently working on an<br />$830 million real estate project known as Dubai lagoon, Schon group is also<br />fighting to get back the assets they once lost. Currently, the Schon group<br />operates a pilot training center in Pakistan known as Schon Air.<br /><br /><br /><span style="font-weight: bold;">7 - Abdul Razzaq Yakoub & family U.A.E</span><br /><br /><br />Ranking: 6 (tied at 6) Worth: £500m ($1billion) Industry: Businessman<br /><br /><br />Mr Yakoub is a prominent Pakistani expatriate businessman based in Dubai.<br />He is the president ARY group ($1.5Billion turnover) and World Memon<br />Organization (WMO). He is one of Pakistan's biggest media barons<br />controlling around 7 channels. Besides this he has a huge property holdings<br />in Karachi, Islamabad and Dubai amounting to over $200m. He is major in the<br />gold market also having around 20 outlets in Asia. He has also been<br />involved in paying Asif Zardari $5m in 1990's for allowing him to<br />import/export gold. Which he denies and claim's is government forgeries.<br /><br /><br /><span style="font-weight: bold;">8 - Rafiq Habib & Rasheed Habib Pakistan</span><br /><br /><br />Ranking: 7 Worth: £450m ($900) Industry: Businessman<br /><br /><br />Legend has it that the Goddess of Wealth has been in love with the seasoned<br />Habibs more than anybody else in Pakistan. Most pundits believe that Habibs<br />own at least 100 companies throughout the world, but these content<br />mega-tycoons never boast off, something which has made it uphill for most<br />to predict about their financial standing. This industrial group was<br />founded by Seth Habib Mitha, born in 1878 to Esmail Ali-a factory owner in<br />Bombay. The financial strength of the Habibs can be gauged from the fact<br />that Muhammad Ali Habib gave a cheque of Rs 80 million to Quaid-e-Azam in<br />1948 at a time when Pakistan government was penniless owing to delay in<br />transfer of Pakistan's share of Rs. 750 million by the Reserve Bank of<br />India. They had offices in Europe in 1912. They incorporated the Habib Bank<br />in 1941. They own the Habib Bank A.G Zurich, Bank Al-Habib, Indus Motors<br />assembling Corolla cars and many dozens of units in sectors such as jute,<br />paper sack, minerals, steel, tiles, synthetics sugar, glass, construction,<br />concrete, farm autos, banking, oil, computers, music, paper, packages,<br />leasing and capital management. Habibs today are headed by Rafiq Habib and<br />Rashid Habib in two distinct groups. What makes them extremely influential<br />players of all times is the fact that for dozens of top businessmen today,<br />Habib were a myth once.<br /><br /><br /><span style="font-weight: bold;">9 - Tariq Saigol & Nasim Saigol Pakistan</span><br /><br /><br />Ranking: 8 Worth: £425m ($850) Industry: Businessman<br /><br /><br />Hailing from Jhelum. The pioneer of the Saigol dynasty in 1890 was Amin<br />Saigol who established a shoe shop that eventually transformed into<br />Kohinoor Rubber Works. And then times saw them shining literally like the<br />Kohinoor until their progress was halted by Nationalization in which they<br />lost two-thirds of their wealth. Saigols got trifurcated in 1976 and 15<br />descendents of Amin Saigols four sons got a share. The name of the Saigols<br />has been used in this part of the world as similes describing quantum of<br />wealth. Yousaf Saigol, along with his brothers Sayeed Saigol, Bashir Saigol<br />and Gul Saigol then nourished an excellent crop. In 1948, Saigols<br />established the Kohinoor Textile Mills with a cost of Rs 8 million and this<br />group happens to be the first to open an LC with the State Bank of<br />Pakistan. They bought the United Bank in 1959 and then witnessed five of<br />their units getting nationalized. They lived in Saudi Arabia during the<br />Bhutto regime. Today, cousins Tariq and Nasim are holding the family's fort<br />together and have risen to unprecedented heights in individual capacities.<br />NAB did haunt Nasim but Tariq spent more time either accepting or refusing<br />prized slots everywhere. Tariq is the one of the finest business brains<br />around.<br /><br /><br /><span style="font-weight: bold;">10 - Dewan Yousaf Farooqui Pakistan</span><br /><br /><br />Ranking: 9 (tied at 9) Worth: £400m ($800) Industry: Businessman<br /><br /><br />Mr Farooqui. The mentor of this group has been the Sindh Minister for Local<br />Bodies. Industries, Labour, Transport, Mines & Minerals. Dewan Mushtaq<br />Group is one of the Pakistan's largest industrial conglomerates in sectors<br />like polyester acrylic fiber, manufacturing and automotives. Six of their<br />companies are listed at the Karachi & stock Exchange and one at the<br />Luxembourg bourse. Dewan Farooqui Motors assembles around 10,000 cars<br />annually under technical license agreement with Hyundai and Kia Motors of<br />Korea. The Dewan Salman Fiber is the pride of this empire as it ranks 11th<br />in the world in total production capacity. The group owns three textile<br />units, a motorcycle manufacturing concern and the largest sugar unit in the<br />country. Dewans also have business interests in India. They possess dozens<br />of millions of shares of Saudi Cement and Pak land Cement. They also have<br />the franchise licence for BMW in Pakistan and now Rolls Royce showrooms.<br /><br /><br /><span style="font-weight: bold;">11 - Sultan Ali Lakhani & family Pakistan</span><br /><br /><br />Ranking: 9 (tied at 9) Worth: £400m ($800) Industry: Businessman<br /><br /><br />The Lakhanis are currently having a hard time at the hands of NAB. Sultan<br />Lakhani and his three brothers run this prestigious group and the chain of<br />McDonald's restaurants in Pakistan. NAB has alleged the Lakhanis of having<br />created phoney companies through worthless directors and raised massive<br />loans from various banks and financial institutions. Sultan is currently<br />abroad after having served a jail term with younger sibling Amin, though<br />the latter was released much earlier. NAB had reportedly demanded Rs 7<br />billion from Lakhanis, but later agreed they pay only Rs 1.5 billion over a<br />10-year period. Lakhanis, like their arch-rivals Hashwanis, are the most<br />well-known of all Ismaeli tycoons. Their stakes range from media, tobacco,<br />paper, chemicals and surgical equipment to cotton, packaging, insurance,<br />detergents and other house-hold items, many of which are joint ventures<br />with leading international conglomerates. Though Lakhanis are in turbulent<br />waters currently, the success that greeted them during the last 25 years<br />especially has been tremendous. They have rifts with large business empires<br />despite being known fur their genteel nature. Whether it is any government<br />in Sindh or at the Federal level, Lakhanis have had trusted friends<br />everywhere, though the present era has proved a painful exception.<br /><br /><br /><span style="font-weight: bold;">12 - Malik Riaz Hussain Pakistan</span><br /><br /><br />Ranking: 9 (tied at 9) Worth: £400m ($800) Industry: Businessman<br /><br /><br />Malik Riaz Hussain heads the massive project which is currently developing<br />state-of-the-art schemes in Lahore, Karachi and Rawalpindi/Islamabad.<br />Emerging out of the blue, this developer has reportedly developed<br />tremendous connections where it matters in Pakistan-One of the few reasons<br />why his constructed projects get completed in time without hindrance.<br />Whether he has gifted bungalows free of cost of country's bigwigs or<br />offered them at highly concessional rates, the reality on the ground is<br />that Malik has managed to mesmerize most through his generous wallet. His<br />land-holdings both within and outside Pakistan amounts to nearly a billion<br />dollar. He is the man behind the Bahria Town. Irrespective of who is in<br />power; he continues to build house after house-swelling his wealth. He is<br />also the first man to drive a Bentley car on Pakistani soil.<br /><br /><br /><span style="font-weight: bold;">13 - Sheikh Abid Hussain alias Seth Abid Pakistan</span><br /><br /><br />Ranking: 10 Worth: £390m ($780) Industry: Businessman<br /><br /><br />Sheikh Abid Hussain alias Seth Abid. He is one of the most resourceful<br />developers/builders in the country owning vast stretches of land in major<br />cities. On this land worth many billion of rupees, Seth has constructed<br />residential schemes under the brand name of "Green Fort." Seth came into<br />this business after decades of notoriety as being one of the spearheads in<br />cross-border smuggling. While many remember Seth for his allegedly illegal<br />trading stints, a lot of informed circles still say with conviction that<br />he, along with Dr.Qadeer and former Premier Bhutto, was the brain behind<br />the success of Pakistan's nuclear programme. About three dozen of Seth's<br />very close relatives, friends and nephews are members of country's bourses<br />and for many years now, the Seth Abid group assumes the role of king-makers<br />during the annual polls of these stock exchanges. He is a leading investor<br />in stocks, metals and currency but what gives him immense pleasure is his<br />philanthropic institution Hamza Foundation that he sponsors for the welfare<br />of deaf and dumb children. Pakistan has not had a single ruler, politician,<br />bureaucrat or Army General who doesn't know the Seth who is more of a myth<br />for most. The Seth, throughout his life, has avoided publicity-a fact known<br />to most journalists.<br /><br /><br /><span style="font-weight: bold;">14 - Mian Mohammed Latif Pakistan</span><br /><br /><br />Ranking:11 Worth: £350m ($700) Industry: Businessman<br /><br /><br />Chenab Group Mian Muhammad Latif supervises this group along with his<br />brother Mian Ashfaque- a legislator in the National Assembly of Pakistan.<br />Founded in 1975, Chenab Limited set up its first fashion outlet "Chen One."<br />Chen One has seven outlets throughout Pakistan. After establishing its<br />retail chain stores in various cities of Saudi Arabia, the group is now<br />planning to establish its new retail chains in Bahrain, UA.E, Qatar, Kuwait<br />and Central Asian Republics. While Chenab Group is an eight-time Export<br />Trophy winner, its Chief Mian Latif has won the 'Businessman of the Year<br />award on four different occasions from various business bodies. Chenab is<br />principally engaged in manufacture and distribution of clothing, furniture<br />goods, including non-iron suit, quilt cover and curtains etc. Chenab<br />processes 50 million square metres fabric weaving and 75 million square<br />metres fabric dyeing every year and has established a global sales network<br />spanning across five continents. Chenab is licensed to the Swedish Texcote<br />Technology in the manufacturing and sale of textile materials, garments and<br />textile house-hold goods. The group's textile products have been awarded<br />the Oekotex 100 accreditation.<br /><br /><br /><span style="font-weight: bold;">15 - Haji Abdul Ghafoor & Haji Bashir Ahmed Pakistan</span><br /><br /><br />Ranking: 12 Worth: £330m ($660) Industry: Businessman<br /><br /><br />Sitara Group Started its activity with textile weaving as early as 1956,<br />under brothers Haji Abdul Ghafoor and Haji Bashir Ahmed. It is now its<br />textile cloth finishing and processing, textile spinning, chlor-alkali<br />sector and in power generation. The units owned by this establishment<br />include Sitara Chemicals, Sitara Chemicals (Textile Division 1) and Sitara<br />Chemicals (Textile Division 11), Sitara Textiles, Sitara Energy and Yasir<br />Spinning. The charities being managed under the aegis of Sitara group are<br />Aziz Fatima Hospital, Ghafoor Bashir Children Hospital and Aziz Fatima<br />Girls School. Sitara's name with the industrial City of Faisalabad is<br />synonymous. They are the decades-old veterans in business, who have<br />excelled in leaps and bounds. At their units, the owners of Sitara use<br />technology imported from Japan, UK and Germany and are export leaders in<br />bedding and fabric collection to South America, USA, Canada, New Zealand<br />and Europe. Their textile divisions together operate at strength of 33,984<br />spindles. The Sitara (group, to a common man, is more famous for its lawn<br />brands like Sitara Sapna and Mughal-e-Azam. The men at helm of affairs in<br />Sitara hardly believe in setting up dozens of units, of which they are<br />otherwise very much capable of.<br /><br /><br /><span style="font-weight: bold;">16 - Sheikhani Family Pakistan</span><br /><br /><br />Ranking: 13 Worth: £300m ($600) Industry: Businessman<br /><br /><br />They are one of the most reputed land developers in the country. The<br />Sheikhani, although not a very big industrial establishment by any means,<br />are led by Abu Bakar Sheikhani. The Sheikhanis are famous for their<br />construction and land development-related errands. Abu Bakar is deemed to<br />be one of the largest investors in real estate trade at Gwadar Port. He has<br />all the right connections that are required to be in such business. Despite<br />being well known to the national political circles, the man in street knew<br />more of him during March/April 1991 when he surfaced as the single largest<br />contributor to then Premier Nawaz Sharif's Debt Retirement Fund with a<br />donation of $ 8million. Today, his adversaries dub him a land mafia man,<br />alleging him for selling his Gwadar land at only $ 4000 per acre only to<br />senior Army officials while the same was being sold at $ 2,50,000 per acre<br />to ordinary investors. But that is the way Sheikhani runs his vast<br />land/construction empire. Accusations don't disturb Sheikhani, who<br />according to many large developers is a man who has managed to create<br />tremendous impression in land business. The rumours of his landing in any<br />Pakistani City for land acquisition purposes, helps the price of real<br />estate surge unprecedented overnight<br /><br /><br /><span style="font-weight: bold;">17 - Razzaq Dawood Pakistan/UAE</span><br /><br /><br />Ranking: 14 (tied at 14) Worth: £250m ($500) Industry: Businessman<br /><br /><br />Razzaq presently heads one of Pakistan's biggest construction and<br />engineering conglomerate know as Dawood group/Descen group. With a roaster<br />of impressive clients. His group has won many contracts in Dubai, Saudi<br />Arabia and Iraq and employ's over 1,000 people directly. His name was more<br />prominent among the top 22 richest families in 1970 until the Bhutto<br />nationalization which then made him set up abroad, he returned to Pakistan<br />in the early 90's and started from scratch and today makes it in the top<br />easily. The group also has investment of $300m in Bangladesh in investments<br />in fertiliser, energy and infrastructure and development sectors.<br /><br /><br /><span style="font-weight: bold;">18 - Byram Dinshawji Avari Pakistan</span><br /><br /><br />Ranking: 14 (tied at 14) Worth: £250m ($500) Industry: Businessman<br /><br /><br />Byram Dinshawji Avari is a prominent Pakistani Parsi tycoon in Karachi,<br />Sindh, Pakistan. Together with his sons Dinshaw and Xerxes and their direct<br />families, he owns and operates the Avari Group of companies, of which he is<br />the chairman. Hotel management is the Avari Group's core business. In<br />Pakistan, the group owns and operates Avari Hotels which includes 5-star<br />deluxe hotel in Lahore, the 5-star Avari Towers and the seafront Beach<br />Luxury Hotel in Karachi. The group is also actively pursuing opportunities<br />for owning and/or managing 3 and 4-star properties elsewhere in Pakistan.<br />The Avari Group is the first Pakistani company to have obtained<br />international hotel management contracts: they operate the 200-room 4-star<br />hotel in Dubai in United Arab Emirates and manage the 200-room Ramada Inn<br />in Toronto at Pearson Airport in Canada.<br /><br /><br /><br /><span style="font-weight: bold;">19 - Rafiq Rangoonwala Pakistan</span><br /><br /><br />Ranking: 15 (tied at 14) Worth: £240m ($480) Industry: Businessman<br /><br /><br />Mr. Rafiq Rangoonwala, Chief Executive Officer Cupola Group of Companies,<br />was born in Karachi, did BA (Hons.) from University of Karachi, went to<br />United States of America in 1979, and did Executive Development Course from<br />Whittemore School of Business, University of New Hampshire along with<br />several management courses from U.K, U.S, Canada, Australia and Singapore.<br />In 1980, he started his career in Fast Food restaurants from KFC in<br />Houston. Since then he has managed several other brands alongside KFC like<br />Pizza Hut, Harry Ramsden's, TGI Fridays, Pizza Express etc. e joined Artal<br />Restaurants International as CEO in October 1999 and is currently heading<br />Cupola Group of Companies who has franchise rights in Pakistan for KFC,<br />Indulge, Freshens and Casa. The associate Investment Company of Cupola is<br />AL ABRAJ, with approximately US $400 million under management.<br /><br /><br /><span style="font-weight: bold;">20 - Shimmy Querishi USA</span><br /><br /><br />Ranking: 15 (tied at 15) Worth: £240m ($480) Industry: Businessman<br /><br /><br />A jet-setting international businessman who fly's by jet and swings a polo<br />mallet with some of the world's top players, Qureshi seems a model of<br />successful enterprise. Shimmys business interests are mainly property,<br />which with the boom and his holidings has took his wealth to a new level.<br />Although people may remember him for his stunt in the early 90's with<br />George Lindemann, the billionaire founder of Cellular One, when Lindemann<br />took him to court claiming he has cheated them in to a deal to buy their<br />home on Hurlingham Drive in Wellington for $3.5 million. A year before the<br />Lindemanns filed their suit, Qureshi bartered with another wealthy family -<br />the al-Thanis, who rule the Arab country of Qatar - to buy Gulf Union Bank<br />in the Cayman Islands.<br />In May 1997, the al-Thanis agreed to sell Gulf Union to International<br />Business Holdings - a Cayman Islands company owned by Qureshi - for $4.5<br />million, according to court records.<br /><br /><br />While Cayman Islands officials were reviewing the deal, Qureshi named an<br />associate, Kazmi, to run Gulf Union and a subsidiary, First Cayman Bank.<br />Within three months, Kazmi, acting at Qureshi's direction, had shunted more<br />than $5 million from First Cayman into his own account and into accounts<br />held by Qureshi and the al-Thanis. Shimmy Qureshi also fully manages all<br />the properties in the USA owned by Asif Zardari.<br /><br /><br /><span style="font-weight: bold;">21 - Faruque Khan Pakistan</span><br /><br /><br />Ranking:15 (tied at 15) Worth: £240m ($480) Industry: Businessman<br /><br /><br />The late Khan Bahadur Ghulam Faruque Khan (1899-1992) was a politician and<br />industrialist of Pakistan. He belonged to the village Shaidu in Nowshera<br />District, Nowshera is the home of the famous Pashtun Tribe the Khattaks of<br />the NWFP Province in Pakistan. Because of his contribution to Pakistan's<br />Industrial development he is sometimes described as "The Goliath who<br />Industrialized Pakistan., today his family own Cherat Cement Company Ltd.<br />Cherat Papersack Ltd. Cherat Electric Ltd. Mirpurkhas Sugar Mills Ltd.<br />Faruque (pvt) Ltd Greaves Air-Conditioning(pvt) Ltd Greaves Engineering<br />Services(pvt) Ltd Unicol Ltd.- A JV Company Madian Hydro Power Ltd. - A JV<br />Company Zensoft (pvt) Ltd and prime properties around Pakistan<br /><br /><br /><br /><br /><br /><span style="font-weight: bold;">22 - Shahid Luqman UK</span><br /><br /><br />Ranking: 16 (tied at 16) Worth: £230m ($460) Industry: Businessman<br /><br /><br />Shahid Luqman, born in Gujrat, is a financier from Manchester and has<br />founded 'Pearl Holdings' for the property finance market He is a prominent<br />property developer in the UK and in Pakistan is projects run into<br />multi-million pounds. He also runs a loan facility. Although in the past it<br />has been noticed of him filling bankruptcy and pocketing huge unpaid loans.<br /><br /><br /><span style="font-weight: bold;">23 - Mukhtar Ahmed Pakistan</span><br /><br /><br />Ranking: 16 (tied at 16) Worth: £230m ($460) Industry: Businessman<br /><br /><br />Late Haji Sheikh Mohammad Ibrahim, founder of the Ibrahim Group, settled in<br />Faisalabad after partition of India in 1947 and re-established his<br />ancestral business of cloth trading by the name of "Ibrahim Agencies". What<br />is known in business today as Ibrahim Group with diversified business<br />interests from Spinning to PSF, Financial Institutions to Banking and<br />Energy, started off as a mere cloth trading agency just half a century ago.<br />Recently Mr Ahmed bought a stake in the Allied Bank at $300m.<br /><br /><br /><span style="font-weight: bold;">24 - Aqeel Karim Dhedi Pakistan</span><br /><br /><br />Ranking: 16 (tied at 16) Worth: £230m ($460) Industry: Businessman<br /><br /><br />Starting from interests in real estate and stock-broking in the year 1947,<br />the late Haji Abdul Karim Dhedhi (may he rest in peace) laid the foundation<br />of what today is the AKD group of companies, one of the largest domestic<br />business enterprises in Pakistan with a combined net worth of over US$ 1<br />billion, of which Mr Karim share is at $400m. Mr. Aqeel Karim Dhedhi, son<br />of (late) Haji Abdul Karim Dhedhi, is the Chairman of the AKD Group. He has<br />built the AKD Group as a leading and vibrant set of business enterprises<br />operating in key sectors of Pakistan's economy, ranging from stocks and<br />shares, media, textile, real estate and Oil and Gas exlporation. Yet AKD is<br />still on the move!<br /><br /><br /><span style="font-weight: bold;">25 - Syed Family Pakistan</span><br /><br /><br />Ranking: 17 (tied at 17) Worth: £220m ($440) Industry: Businessman<br /><br /><br />Listed on all three stock exchanges in Pakistan, Packages Limited has<br />maintained a long-time credit rating of AA. The joint ventures and business<br />alliances with some of the world's biggest names reflect our<br />forward-looking strategy of continuously improving customer value through<br />improvements in productivity. The group also acquired a good number of Coca<br />Cola plants in Pakistan. Its famous brands include Nestle Milk Pak, Treet,<br />Mitchells and Tri Pack Films. It has stakes in the textile, dairy,<br />agriculture and rice sectors too. The group's contributions towards the<br />cause of an independent Pakistan are unprecedented are the only packaging<br />facility in Pakistan offering a complete range of packaging solutions<br />including offset printed cartons, shipping containers and flexible<br />packaging materials to individuals and businesses world-wide. They employ<br />over 4000 people.<br /><br /><br /><span style="font-weight: bold;">26 - Saif Family Pakistan</span><br /><br /><br />Ranking: 17 (tied at 17) Worth: £220m ($440) Industry: Businessman<br /><br /><br />Is owned and operated by the sons of famous NWFP lady politician Begum<br />Kalsum Saifullah. Her eldest son Javid Saifullah heads this very powerful<br />business group. Javid obtained his Master degree in Business Administration<br />from the University of Pittsburgh, USA in 1973, followed by diversified<br />experience of over 30 years in textiles, telecommunication, cement and<br />Information Technology. He also remained the Chairman of All Pakistan<br />Textile Mills Association (APTMA) for two years and NWFP for seven years.<br />He has also been the member Task Force IT & Telecommunication Advisory<br />Board, Ministry of Science and Technology, Member of Task Force<br />(Liberalization & Privatization of Pakistan Telecommunication Company<br />Limited), Ministry of Science & Technology) Javed Saifullah Khan is looking<br />after the group businesses for the past 20 years. Saifullahs are in power<br />always, in one form or the other. Javaid's brothers Anwar Saifullah Khan<br />(Former Federal Minister), Salim Saifullah Khan (king-maker in NWFP<br />polities) and Osman Saifullah (another APTMA & wizard) have very close<br />family ties with a lot of key politicians in the country, besides being<br />related directly or indirectly through marriages to the families of a few<br />leading and famous Army Generals who ruled Pakistan.<br /><br /><br /><span style="font-weight: bold;">27 - Jehangir Elahi Pakistan</span><br /><br /><br />Ranking: 18 (tied at 18) Worth: £200m ($400) Industry: Businessman<br /><br /><br />Jehangir Elahi is brother in law of Mian Mohammad Mansha and is ranked<br />among the tycoons in Pakistan. He has launched several projects as joint<br />ventures with Mian Mohammad Mansha, as for example Genertech, one of the<br />earliest private sector power plants conceived in Pakistan. Independently<br />his group has four companies listed on the stock exchange.<br /><br /><br /><br /><span style="font-weight: bold;">28 - Sherazi Family Pakistan</span><br /><br /><br />Ranking: 18 (tied at 18) Worth: £200m ($400) Industry: Businessman<br /><br /><br />This group was founded by Yousaf Sherazi, a former Income Tax official andjournalist in 1962 with a capital of Rs 03 million only. The first company<br />set by the Atlas Group was Sherazi Investments (Pvt) Limited and since<br />then, there is no looking back. The East Pakistan tragedy, however, nearly<br />crippled Sherazi but he never lost hope and went out forming numerous joint<br />ventures with leading Japanese concerns like Honda. Atlas-Honda today is a<br />name to reckon with in country's engineering sector and associated with<br />this just one name are hundreds of vendors. He holds stakes in insurance,<br />financial services, information technology, leasing, warehouses, office<br />equipment, motor cars and motorcycle-assembling units, besides running a<br />renowned firm that manufactures batteries. Sherazi owns the Atlas<br />Investment Bank too. The Federal Budget 2004-05 is perhaps the only budget<br />in country's history that has hit the very influential car manufacturers on<br />the head, otherwise people like Yousaf Sherazi have always managed to<br />dictate terms where it matters. The Atlas Group owns no less than seven<br />companies quoted on the stock exchanges of Pakistan. The group's assets are<br />believed to have touched the hundreds of millions dollars mark and so have<br />the sales.<br /><br /><br /><span style="font-weight: bold;">29 - Noon family Pakistan</span><br /><br /><br />Ranking: 19 Worth: £190m ($380m) Industry: Businessman<br /><br /><br />Noon family comes from Tiwana family from Mitha Tiwana. The Tiwana family<br />lives in an old historical village in Khushab district. The Tiwana caste is<br />a very popular landholding and influential political caste in the Khushab<br />district. The Noon Family own 27 villages in Bhalwal and Bhera. The fields<br />of these villages are very cultivated and fertile. The Landlord Noon family<br />created many bankers, industrialists, ambassadors and politicians for<br />Pakistan. The Noon family is very popular in the area because of their<br />character , their attitude,their behaviour with the people and helps the<br />poor and needy people in the area without any prejudice so Noon family is<br />very well-wisher,well-behaved ,sympathetic with the area. On their land<br />they own over 40 factories on total ranging from brick manufacturing to<br />cotton farms and production. They are a tax paying landlords for this<br />reason they are the only feudal lords including in this edition.<br /><br /><br /><span style="font-weight: bold;">30 - Mian Abdullah Pakistan</span><br /><br /><br />Ranking: 19 Worth: £190m ($380m) Industry: Businessman<br /><br /><br />One of the largest manufacturers and exporters of textile products in<br />Pakistan, Sapphire technology comes from Europe, Japan and USA.<br />Capitalizing on the region's principal crop, cotton, we source this<br />locally, and augment our offerings by providing imported fiber from the<br />world's best crops. We work with specialized fibers bringing in the newest<br />innovations from major fiber and chemical producers, and our manufacturing<br />from yarn to finished fabric is performed in our facilities in Pakistan.<br />Synergies are formed with offshore garment manufacturing companies. Our<br />products are marketed to the industry's biggest names in Asia, Europe,<br />Australia, and North America. Over 14,000 employees ,Annual turnover US $<br />500 Million<br /><br /><br />Headed by a veteran industrialist Mian Abdullah, this splendid empire owns<br />11 yarn spinning plants (producing 60,000 tonnes of yarn annually), 3 woven<br />plants of greige fabric ( producing 50 million metres annually), one yarn<br />dyeing plant (capacity 5 tonnes per day), one knitting unit (10 tonnes per<br />day), one knitted fabric dyeing plant (10 tonnes per day), one woven fabric<br />dyeing and finishing plant (1.2 million metres per month) and three power<br />plants having the capability to produce 40 MW of energy. Sapphire forms<br />synergies with off-shore garments companies. The group markets its products<br />in biggest brand names in Asia, Europe, Australia and North America.<br />Sapphire started with one spinning mill in 1969 and employs over 10,000<br />people. Mian Abdullah's repute can be gauged from the fact during the<br />October 2003 minis at APTMA, more than 1000 textile millers bad tendered<br />their resignations against incumbent Chief Waqar Monnoo to him. Dozens of<br />leading tycoons had proposed his name to head APTMA in case of an interim<br />setup. Having an influence among textile millers is no easy job but Mian<br />Abdullah stands privileged in this context He is often seen part of the<br />entourages of key business leaders to foreign countries and provides input<br />to fellow colleagues whenever requested.<br /><br /><br /><span style="font-weight: bold;">31 - Shahzad Family Pakistan</span><br /><br /><br />Ranking: 20 (tied at 20) Worth: £170m ($340m) Industry: Businessman<br /><br /><br />Shahzad Group is a reputable name which takes pride in being identified as<br />a beacon of business development involved in almost all avenues of Nation<br />building activities i.e. Energy, Communications, Minerals, Construction,<br />Geophysical survey, Security and many other ventures. Shahzad Group has ,<br />by itself, and in some cases in collaboration with foreign and local<br />partners, who are the leading brand names in the world, identified,<br />initiated, supervised and successfully completed major business ventures.<br />Shahzad Group prides itself for its accomplishments during almost three<br />decades of business activity. The Group has actively participated in<br />enhancing Pakistan's international competitiveness and social development,<br />and for promotion of foreign and domestic investment in business ventures.<br />It takes pride in delivering quality products, solutions and services that<br />obtain a competitive advantage over others.<br /><br /><br />The Group is a wholly owned Pakistani establishment with offices in Calgary<br />(Canada), Houston (USA), London, Kuwait, Beijing and Singapore, with a<br />strong presence in various other metropolises all over the world. Shahzad<br />International Group of Companies,Oil and Gas,Gold and Minerals<br />Mining,Geological surveys,Defence supplies,Travel and Tour Operators,Flash<br />security services and Trading Worldwide.<br /><br /><br /><span style="font-weight: bold;">32 - Nazir Family Pakistan</span><br /><br /><br />Ranking: 20 (tied at 20) Worth: £170m ($340m) Industry: Businessman<br /><br /><br />One of Faislalabads most prominent families is the Haji Nair family. Owning<br />Masoos textiles, Mahmood Textiles, Asim Textiles and power generation<br />plants. Son of Mr Nazir Shahid Nazir is also a prominent politician.<br /><br /><br /><span style="font-weight: bold;">33 - Abdul Bhati UK</span><br /><br /><br />Ranking: 21 (tied at 21) Worth: £150m ($300m) Industry: Businessman<br /><br /><br />Bhatti, 71, is a director of London-based wholesaler Bestway, which saw<br />profits up 27% in 2005-06 at £73m on a turnover up 26% at £1.7 billion.<br />Bhatti and his family have a stake worth £140m as well as other assets.<br /><br /><br /><span style="font-weight: bold;">34 - Adalat Chaudhary UK</span><br /><br /><br />Ranking: 21 (tied at 21) Worth: £150m ($300m) Industry: Businessman<br /><br /><br />Director of the London-based Bestway cash-and-carry business established by<br />Sir Anwar Pervez.<br /><br /><br /><span style="font-weight: bold;">35 - Younis Sheikh UK</span><br /><br /><br />Ranking: 21 (tied at 21) Worth: £150m ($300m) Industry: Businessman<br /><br /><br />Bestway director Sheikh, 70, London cash-and-carry business Bestway<br />continues to thrive.<br /><br /><br /><span style="font-weight: bold;">36 - Chaudrey Zameer UK</span><br /><br /><br />Ranking: 21 (tied at 21) Worth: £150m ($300m) Industry: Businessman<br /><br /><br />Finance director of the London-based Bestway cash-and-carry business<br />started in 1976 by Anwar Pervez . In 2004 Pervez stepped down as managing<br />director, Choudrey took over. In 2005-06 Bestway profits rose 27% at £73m<br />on turnover up 26% at £1.7 billion. Choudrey and his family have a 10.1%<br />stake. They also own 70% of the Buybest supermarket chain in UK<br /><br /><br /><span style="font-weight: bold;">37 - Zafar Iqbal Khwaja Pakistan</span><br /><br /><br />Ranking: 21 (tied at 21) Worth: £150m ($300m) Industry: Businessman<br /><br /><br />Zafar Iqbal Khawaja (born January 3rd, 1952) is a prominent Pakistani<br />businessman who owns a number of companies around the world. He is better<br />known in Pakistan as the "Prince of Sargodha". Also referred to as the<br />"Shaheen of Sargodha" (The Eagle of Sargodha). Zafar Iqbal Khawaja, is the<br />son of a significant military commando Muhammed Sadiq Khawaja, who worked<br />with Muhammed Ali Jinnah (The Founder of Pakistan) during the 1947<br />partition of India and Pakistan. Zafar Iqbal Khawaja is most widely known<br />as the Managing Director of a multi-million dollar company called Inter<br />Equipment. It's Head Quarters are located at the Jebal Ali Free Zone, Dubai<br />which is a recognized commercial capital of the Middle-East. In<br />Mr.Khawaja's business circle, he is known for his commitment to honest work<br />and his ethical manner of business. Within 15 years, he has developed<br />himself from a fresh college graduate, into a business tycoon. Currently,<br />he is in the process of writing an auto-biography describing his success<br />story. This auto-biography would be a must-read for any business-person<br />pursuing major success.<br /><br /><br /><span style="font-weight: bold;">38 - Shahid Hussain Pakistan</span><br /><br /><br />Ranking: 22 (tied at 22) Worth: £130m ($260m) Industry: Businessman<br /><br /><br />With more than 325 retail outlets and 13 wholesale depots, Service Sales<br />Corporation (Pvt.) Limited is the leading retail and wholesale company in<br />Pakistan with annual sales $300m. The Company has established some of<br />Pakistan's leading footwear brands including DON CARLOS, CHEETAH, SKOOZ,<br />TOZ and LIZA and has distribution agreements with CATERPILLAR and NIKE. As<br />part of our growth strategy, we have expanded our businesses to include<br />Service Communications, Shoe Planet (Pvt.) Limited and Soul Collections.<br /><br /><br /><span style="font-weight: bold;">39 - Younis Brothers Pakistan</span><br /><br /><br />Ranking: 22 (tied at 22) Worth: £130m ($260m) Industry: Businessman<br /><br /><br />Yunus Brothers is actively involved in international trading of various<br />products including Cotton & Blended Yarn, Cotton & Blended Fabrics,<br />Garments, Rice, Sugar, Fertilizer, Earth moving equipments, Chemicals,<br />Spare Parts and Automotive Vehicles etc. Yunus Brothers is one of the<br />largest export houses of the Pakistan exporting mainly to the European, US,<br />Far Eastern, Middle Eastern and African markets. Yunus Brother's annual<br />sales turnover exceeds USD 300/- million with 95% of the sales geared<br />towards the export markets.<br /><br /><br /><span style="font-weight: bold;">40 - Ghani Family Pakistan</span><br /><br /><br />Ranking: 22 (tied at 22) Worth: £130m ($260m) Industry: Businessman<br /><br /><br />Abdul Ghani Dada Bhoy was the founder of Dada Bhoy group, starting in trade<br />and branching off into the construction business. The group has a big share<br />of cement market in Southern Pakistan. Like other Memon groups, Dad Bhoys<br />are closely linked through intermarriages with other leading families like<br />Jaffer and Bawany. Abdul Ghani Dada Bhoy had five sons and two daughters,<br />namely Noor Mohammad Dada Bhoy, Mohammad Farooq Dada Bhoy, Mohammad Hussain<br />Dada Bhoy, Abdullah Hussain Dada Bhoy and Ghulam Mohammad Dada Bhoy.<br />Daughters are Mrs Mehrunisa Jaffer and Mrs Zaibunisa Tanveer .<br /><br /><br /><span style="font-weight: bold;">41 - Saddiq & Sons Pakistan</span><br /><br /><br />Ranking: 22 (tied at 22) Worth: £130m ($260m) Industry: Businessman<br /><br /><br />This group made the bulk of its fortune during the chief ministership and<br />premiership of Nawaz Sharif when the group was sold Pasrur Sugar Mills for<br />a token price of Rs one and its Chairman, Mohammad Saleem was appointed<br />managing director of National Development Leasing Corporation (NDLC)<br />replacing Rafiq Habib. Today the have invested huge amounts in prime<br />properties around Pakistan.<br /><br /><br /><span style="font-weight: bold;">42 - Afzal Kushi UK</span><br /><br /><br />Ranking: 23 (tied at 23) Worth: £120m ($240m) Industry: Businessman<br /><br /><br />Afzal Khushi, 51, managing director of Jacobs & Turner, last year received<br />a CBE for services to business in Scotland. He and his brother, Akmal, 50,<br />have made the £90m Glasgow sportswear firm a global business. They also<br />have £30 other assets.<br /><br /><br /><span style="font-weight: bold;">43 - Ghulam Hassan Khan Pakistan</span><br /><br /><br />Ranking: 23 (tied at 23) Worth: £120m ($240m) Industry: Businessman<br /><br /><br />The SK group of companies shares a set of five core values: integrity,<br />adaptability, excellence, unity and responsibility. These values, which<br />have been part of the SK Group's beliefs and convictions from its earliest<br />days, continue to guide and drive the business decisions of SK companies.<br />The SK Group and its enterprises have been steadfast and distinctive in<br />their adherence to business ethics and their commitment to corporate social<br />responsibility. This is a legacy that has earned the SK Group the trust of<br />many thousand of stakeholders The SK Group comprises of six operating<br />companies in following business segments: Information technology, Real<br />estate, Developer and Builders, Media, Welfare, Import and exports and CNG<br />stations. The SK Group was founded by Sardar Gulam Hassan Khan Niazi in the<br />mid 1980's. Sardar Khan Niazi and those who followed him aligned business<br />opportunities with the objective of nation building. This approach remains<br />enshrined in the SK Group's ethos to this day. Rose Shopping Mall<br />Companies owned by the family today: Paradise City, SK Trading, DUBAI Gasco<br />2000, chain of CNG stations SK Constructions , rose club, SK plazaz, Chuna<br />Pa chain fast food chinese., SKN tust and sk farms.<br /><br /><br /><span style="font-weight: bold;">44 - Kasim Dada Pakistan</span><br /><br /><br />Ranking: 24 Worth: £100m ($200m) Industry: Businessman<br /><br /><br />Kasim hails from a 19th Century Memon business family known to have<br />possessed the vision of international trade when most of their<br />contemporaries were rather naïve on this count. This family had offices in<br />Burma, South Africa and countries of the Far-East long before 1940. Dadas,<br />have held decisive positions at the Karachi Stock Exchange and own shares<br />of various Pakistani and foreign monopolies without creating any hype.<br />Kassim Dada's family is known to have held major local equity in<br />multinationals like Glaxo SmithKline, Brook Bond and Berger Paints, besides<br />being the sponsoring directors of Messrs Hyderabad Electronics, Automotive<br />Battery Limited and Interfund Bank etc. Kassim Dada is one of the few<br />Pakistani Tycoons who used to fly on private planes from Karachi to hit<br />cement plants in Hyderabad. It was this family which had hired Mahatama<br />Gandhi as a solicitor in 1890 to contest a business case in South Africa.<br />Dada, was once a symbol of wealth. Had his assets not been nationalised by<br />Bhutto he would definitely had the status many richest men in the world<br />enjoy today.</div>Dihazhttp://www.blogger.com/profile/07142367990636982434noreply@blogger.com0tag:blogger.com,1999:blog-7858672234534555389.post-59017966235976709042009-07-14T03:47:00.000-07:002009-07-14T04:08:04.764-07:00Making a Shinny and Glossy Button using Adobe Fireworks<span style="font-size:85%;"><span style="font-family:arial;">Hi everybody, working in Adobe Fireworks is a joyful task, especially in case of web prototyping. Today we learn how to design a glossy and shiny button in Adobe Fireworks, so let’s start this simple tutorial. I explain this tutorial in steps.</span><br /><span style="font-family: arial; font-weight: bold;font-family:arial;font-size:100%;" ><br />Step 1: Creating a rectangular shape</span></span><br /><br /><span style="font-family: arial;font-size:85%;" ><span>1. Select the shape tool and draw a rectangle</span></span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg72x09oqfuAppMFg_kVcFCK3bgEuf4lsQmJK36wCsVlQKUb1ml4vnSQ0RS3osdevnbvpBJUm9sMHWG6TynU-DIlBIL7z6s3vHd3HmmrlNWY0cQMYGfP3BoyYp_hJKdKVQKeBuLpeHLC4l2/s1600-h/step1.jpg"><img style="cursor: pointer; width: 400px; height: 216px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg72x09oqfuAppMFg_kVcFCK3bgEuf4lsQmJK36wCsVlQKUb1ml4vnSQ0RS3osdevnbvpBJUm9sMHWG6TynU-DIlBIL7z6s3vHd3HmmrlNWY0cQMYGfP3BoyYp_hJKdKVQKeBuLpeHLC4l2/s400/step1.jpg" alt="" id="BLOGGER_PHOTO_ID_5358266302623830066" border="0" /></a><br /><br /><span style="font-size:100%;"><span style="font-weight: bold;font-family:arial;" >Step 2: Selecting color and making edges round</span></span><br /><br /><span style="font-size:85%;">1. Select a color from the color palette and make the rectangle edges round if it required</span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCmHj_va3hFbTZvmiBx_kWW81ZS640m4QbYGOaGoCJwc8-ixxEhp6-_T2RXpj4WTjHJfpZQCYnU1tXh1tlbMl10w9wX0xlNxm21Melm-QCC0ogojM_8VO0s1KAU3ozloa-Eme7hUa4F1os/s1600-h/step2.jpg"><img style="cursor: pointer; width: 400px; height: 216px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCmHj_va3hFbTZvmiBx_kWW81ZS640m4QbYGOaGoCJwc8-ixxEhp6-_T2RXpj4WTjHJfpZQCYnU1tXh1tlbMl10w9wX0xlNxm21Melm-QCC0ogojM_8VO0s1KAU3ozloa-Eme7hUa4F1os/s400/step2.jpg" alt="" id="BLOGGER_PHOTO_ID_5358267839303979858" border="0" /></a><br /><br /><span style="font-size:100%;"><span style="font-weight: bold;font-family:arial;" >Step 3: Process for Intersection</span></span><br /><br /><span style="font-size:85%;"><span style="font-family:arial;">1. Now, we’ll draw three shapes, as shown in image below, two of them are rectangle (clone of first shape) and a one is ellipse shape by using the same circle tool present in shape tool, (If we press shift key during using circle shape tool we find a perfect circle)</span></span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirxkplaxIThOP0C8pW_6S37QpBynBxx4kYAPY70qgH89hrjbuKSFw1cES5C-2hpsiTl_5kFpNgMDMPLr3Swd4TCE0hutTttDshGBqOxkX-H5n71y1XTkUiL2X_FlpbXnAByxGSlVuxE6qU/s1600-h/step3.jpg"><img style="cursor: pointer; width: 400px; height: 216px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirxkplaxIThOP0C8pW_6S37QpBynBxx4kYAPY70qgH89hrjbuKSFw1cES5C-2hpsiTl_5kFpNgMDMPLr3Swd4TCE0hutTttDshGBqOxkX-H5n71y1XTkUiL2X_FlpbXnAByxGSlVuxE6qU/s400/step3.jpg" alt="" id="BLOGGER_PHOTO_ID_5358266030972078290" border="0" /></a><br /><br /><span style="font-size:85%;"><span style="font-family:arial;">2. Then click on Modify > Combine Path > Intersect</span></span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxn3RYcPZHAKKvZFHg6NNxh9DvOUUnb1U92KGpJwPLoh4lxFAw4OZzivm9D832lHEeyRus2qeX4hVSgHaLmH6WYMk3_PXC7dPyhHy2F973SyCPtTKsVnK8pgN_vCS3wXzophcSzvZ8QtiG/s1600-h/step5.jpg"><img style="cursor: pointer; width: 400px; height: 216px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxn3RYcPZHAKKvZFHg6NNxh9DvOUUnb1U92KGpJwPLoh4lxFAw4OZzivm9D832lHEeyRus2qeX4hVSgHaLmH6WYMk3_PXC7dPyhHy2F973SyCPtTKsVnK8pgN_vCS3wXzophcSzvZ8QtiG/s400/step5.jpg" alt="" id="BLOGGER_PHOTO_ID_5358268148912057458" border="0" /></a><br /><br /><span style="font-size:85%;"><span style="font-family:arial;">3. After using intersection option the shape becomes as under image </span></span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7UrkfrcZ_pXRG64Ey3uFrJJaGUuDyv0hgpQsbARIQUar__IhhKmAGLHuzKwifHEh0ENRrudi31G8fpjPTdWuyJ8zZMtcLLPuI7YzP07u70f-Z2-ULu51XwBSLPIQIkxr3-oGvUGeFYrWI/s1600-h/step6.jpg"><img style="cursor: pointer; width: 400px; height: 216px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7UrkfrcZ_pXRG64Ey3uFrJJaGUuDyv0hgpQsbARIQUar__IhhKmAGLHuzKwifHEh0ENRrudi31G8fpjPTdWuyJ8zZMtcLLPuI7YzP07u70f-Z2-ULu51XwBSLPIQIkxr3-oGvUGeFYrWI/s400/step6.jpg" alt="" id="BLOGGER_PHOTO_ID_5358266037536290962" border="0" /></a><br /><span style="font-size:100%;"><br /></span><span style="font-weight: bold;font-size:100%;" ><span style="font-family:arial;">Step 4: Adjusting Opacity </span></span><br /><br /><span style="font-size:85%;"><span style="font-family:arial;">To produce a glossy and shiny effect we do following two steps</span><br /><span style="font-family:arial;">1. Change Color of intersected object to white </span><br /><span style="font-family:arial;">2. Change its opacity setting, which is present in properties panel</span><br /><span style="font-family:arial;">3. We decrease opacity up to 37 </span></span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhp9GrT1UAbNXXeX83lRUu5Dq-UVeF2rVW_93OZKxjQuvrfjZF1-U0-bxHUgBX1abEZvDASYJwxVTAY6NL6hxKXPi3zCIg4IYaoOdbCNpC_j49Z-kInr15lNindCuuZEdTyotKPFuZsayA/s1600-h/step7.jpg"><img style="cursor: pointer; width: 400px; height: 216px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhp9GrT1UAbNXXeX83lRUu5Dq-UVeF2rVW_93OZKxjQuvrfjZF1-U0-bxHUgBX1abEZvDASYJwxVTAY6NL6hxKXPi3zCIg4IYaoOdbCNpC_j49Z-kInr15lNindCuuZEdTyotKPFuZsayA/s400/step7.jpg" alt="" id="BLOGGER_PHOTO_ID_5358266289157544098" border="0" /></a><br /><span style="font-size:85%;"><span style="font-weight: bold;font-family:arial;" ><br /><span style="font-size:100%;">Step 5: Adding Drop Shadow</span></span></span><br /><br /><span style="font-size:85%;">Adding shadow produces depth in our button. The procedure is simple:<br />1. The drop shadow settings are in properties panel<br />2. We used following settings to produce a shadow under the button. [See image below]</span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR55MFf9tz-ZtCLqPjzPYqmnrSsCd6JwdZQz7XelhF9I19-klJvmcoJCvXH_HsaPeiinFaP-GYl16StUyltmazvZXTfKQQN_zdtKXEVpSh09QGisihZRAlEcIi52kSGozixO1Br9PcHJ7X/s1600-h/step9.jpg"><img style="cursor: pointer; width: 400px; height: 216px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR55MFf9tz-ZtCLqPjzPYqmnrSsCd6JwdZQz7XelhF9I19-klJvmcoJCvXH_HsaPeiinFaP-GYl16StUyltmazvZXTfKQQN_zdtKXEVpSh09QGisihZRAlEcIi52kSGozixO1Br9PcHJ7X/s400/step9.jpg" alt="" id="BLOGGER_PHOTO_ID_5358266290343666706" border="0" /></a><br /><br /><span style="font-size:100%;"><span style="font-weight: bold;font-family:arial;" >Step 6: Adding Text on Button</span><br /></span><br /><span style=";font-family:arial;font-size:85%;" >1. Write the text with the text tool, I highlighted text tool in tool bar, as shown in image.<br />2. Then we write the text and duplicate it.<br />3. Using color palette, we select color of the top text to white<br />4. To create shadow under the text, we change the below text to a dark color like grey and then move it slightly to down and left position with our keyboard arrow keys.<br />5. The text layers are visible in layer panel.<br />6. After that we group both the text layers by pressing Ctrl + G (for Win users) and Comd + G (for Mac users)</span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinNPUQIjJOcVA0Jr33imQFSm3GqeNO7Cq_fF_2N2qicajCye2603jPoACpVhLVpSjrOZ1Ab5j6oesQOOV99p1G4DfWzgnDnresRbNXZBbjks82WNDsCSWEG5KkYjtzD4Gn9s1CVfVPZpBw/s1600-h/step10.jpg"><img style="cursor: pointer; width: 400px; height: 216px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinNPUQIjJOcVA0Jr33imQFSm3GqeNO7Cq_fF_2N2qicajCye2603jPoACpVhLVpSjrOZ1Ab5j6oesQOOV99p1G4DfWzgnDnresRbNXZBbjks82WNDsCSWEG5KkYjtzD4Gn9s1CVfVPZpBw/s400/step10.jpg" alt="" id="BLOGGER_PHOTO_ID_5358266296891947442" border="0" /></a><br /><br /><span style="font-size:100%;"><span style="font-weight: bold;font-family:arial;" >Step 7: Final Output</span></span><br /><br /><span style="font-size:85%;"><span style="font-family:arial;">After making groups of the object, our nice glossy button is ready to use.</span></span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9QKvU17zZpBKSmX_fvaYKV2pN9Z0KuIepB1k9PVuusiQiprBfKY3YaW0yF3Pr61eHIpPs6kLDShNZNcV3DwAPo47lpDWS0b1cf7b9b9MInaagO__q0U4t-kY_Z9FQBq0wuXL67RklyNc1/s1600-h/step13.jpg"><img style="cursor: pointer; width: 400px; height: 216px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9QKvU17zZpBKSmX_fvaYKV2pN9Z0KuIepB1k9PVuusiQiprBfKY3YaW0yF3Pr61eHIpPs6kLDShNZNcV3DwAPo47lpDWS0b1cf7b9b9MInaagO__q0U4t-kY_Z9FQBq0wuXL67RklyNc1/s400/step13.jpg" alt="" id="BLOGGER_PHOTO_ID_5358266299466999010" border="0" /></a>Muhammad Shahid Akramhttp://www.blogger.com/profile/16065852295278017320noreply@blogger.com4tag:blogger.com,1999:blog-7858672234534555389.post-61292472740666607502009-07-14T03:39:00.000-07:002009-07-14T03:49:04.226-07:00Quick C# in 20 mins</br>
<br />
<br /><b>Introduction</b>
<br />
<br />C# is a language with the features of C++, programming style like Java and rapid application model of BASIC. If you already know the C++ language, it will take you less than an hour to quickly go through the syntax of C#. Familiarity with Java will be a plus, as Java program structure, the concept of packages and garbage collection will definitely help you learn C# more quickly. So while discussing C# language constructs, I will assume, you know C++.
<br />This article discusses the C# language constructs and features using code examples, in a brief and comprehensive way, so that you just by having a glance at the code, can understand the concepts.
<br />
<br /><span style="font-weight: bold;">Note: </span>This article is not for C# gurus. There must be some other beginner's articles on C#, but this is yet another one.
<br />
<br /><span style="font-weight: bold;">Following topics of C# language are discussed:</span>
<br />
<br />• Program structure
<br />• Namespaces
<br />• Data types
<br />• Variables
<br />• Operators and expressions
<br />• Enumerations
<br />• Statements
<br />• Classes and structs
<br />• Modifiers
<br />• Properties
<br />• Interfaces
<br />• Function parameters
<br />• Arrays
<br />• Indexers
<br />• Boxing and unboxing
<br />• Delegates
<br />• Inheritance and polymorphism
<br />
<br />
<br /><span style="font-weight: bold;">Following are not discussed:</span>
<br />
<br />• Things which are common in C++ and C#.
<br />• Concepts like garbage collection, threading, file processing etc.
<br />• Data type conversions
<br />• Exception handling
<br />• .NET library
<br />
<br /><span style="font-weight: bold;">Program structure</span>
<br />
<br />Like C++, C# is case-sensitive. Semi colon (;) is the statement separator. Unlike C++, there are no separate declaration (header) and implementation (CPP) files in C#. All code (class declaration and implementation) is placed in one file with extension cs.
<br />Have a look at this Hello world program in C#.
<br />
<br />
<br />using System;
<br />
<br />namespace MyNameSpace
<br />
<br />{
<br />
<br />class HelloWorld
<br />
<br />{
<br /> static void Main(string[] args)
<br /> {
<br /> Console.WriteLine ("Hello World");
<br /> }
<br />}
<br />
<br />}
<br />
<br />Everything in C# is packed into a class and classes in C# are packed into namespaces (just like files in a folder). Like C++, a main method is the entry point of your program. C++'s main function is called main whereas C#'s main function starts with capital M and is named as Main.
<br />No need to put a semi colon after a class block or struct definition. It was in C++, C# doesn't require that.
<br />
<br /><span style="font-weight: bold;">Namespace</span>
<br />
<br />Every class is packaged into a namespace. Namespaces are exactly the same concept as in C++, but in C# we use namespaces more frequently than in C++. You can access a class in a namespace using dot (.) qualifier. MyNameSpace is the namespace in hello world program above.
<br />Now consider you want to access the HelloWorld class from some other class in some other namespace.
<br />
<br />using System;
<br />namespace AnotherNameSpace
<br />{
<br /> class AnotherClass
<br /> {
<br /> public void Func()
<br /> {
<br /> Console.WriteLine ("Hello World");
<br /> }
<br /> }
<br />}
<br />
<br />Now from your HelloWorld class you can access it as:
<br />
<br />using System;
<br />using AnotherNameSpace; // you will add this using statement
<br />namespace MyNameSpace
<br />{
<br />class HelloWorld
<br />{
<br /> static void Main(string[] args)
<br /> {
<br /> AnotherClass obj = new AnotherClass();
<br /> obj.Func();
<br /> }
<br />}
<br />}
<br />
<br />In .NET library, System is the top level namespace in which other namespaces exist. By default there exists a global namespace, so a class defined outside a namespace goes directly into this global namespace and hence you can access this class without any qualifier.
<br />You can also define nested namespaces.
<br />Using
<br />
<br />The #include directive is replaced with using keyword, which is followed by a namespace name. Just as using System as above. System is the base level namespace in which all other namespaces and classes are packed. The base class for all objects is Object in the System namespace.
<br />
<br />
<br /><span style="font-weight: bold;">Variables</span>
<br />
<br />Variables in C# are almost the same as in C++ except for these differences:
<br />
<br />1. Variables in C# (unlike C++), always need to be initialized before you access them, otherwise you will get compile time error. Hence, it's impossible to access an un-initialized variable.
<br />2. You can't access a “dangling” pointer in C#.
<br />3. An expression that indexes an array beyond its bounds is also not accessible.
<br />4. There are no global variables or functions in C# and the behavior of globals is achieved through static functions and static variables.
<br />
<br /><span style="font-weight: bold;">Data types</span>
<br />
<br />All types of C# are derived from a base class object. There are two types of data types:
<br />
<br />1. Basic/ built-in types
<br />2. User-defined types
<br />
<br />Following is a table which lists built-in C# types:
<br />
<br />Type Bytes Description
<br />byte 1 unsigned byte
<br />sbyte 1 signed byte
<br />short 2 signed short
<br />ushort 2 unsigned short
<br />int 4 signed integer
<br />uint 4 unsigned integer
<br />long 8 signed long
<br />ulong 8 unsigned long
<br />float 4 floating point number
<br />double 8 double precision number
<br />decimal 8 fixed precision number
<br />string Unicode string
<br />char Unicode char
<br />bool true, false boolean
<br />
<br /><span style="font-weight: bold;">Note:</span> Type range in C# and C++ are different, example, long in C++ is 4 bytes, and in C# it is 8 bytes. Also the bool and string types are different than those in C++. bool accepts only true and false and not any integer.
<br />
<br /><span style="font-weight: bold;">User defined types includes:</span>
<br />
<br />1. Classes
<br />2. Structs
<br />3. Interfaces
<br />
<br />Memory allocation of the data types divides them into two types:
<br />
<br />1. Value types
<br />2. Reference types
<br />
<br /><span style="font-weight: bold;">Value types</span>
<br />
<br />Values types are those data types which are allocated in stack. They include:
<br />• All basic or built-in types except strings
<br />• Structs
<br />• Enum types
<br />
<br /><span style="font-weight: bold;">Reference types</span>
<br />
<br />Reference types are allocated on heap and are garbage collected when they are no longer being used. They are created using new operator, and there is no delete operator for these types unlike C++ where user has to explicitly delete the types created using delete operator. In C#, they are automatically collected by garbage collector.
<br />Reference types include:
<br />• Classes
<br />• Interfaces
<br />• Collection types like Arrays
<br />• String
<br />
<br /><span style="font-weight: bold;">Enumeration</span>
<br />
<br />Enumerations in C# are exactly like C++. Defined through a keyword enum.
<br />Example:
<br />
<br />enum Weekdays
<br />{
<br /> Saturday, Sunday, Monday, Tuesday, Wednesday, Thursday, Friday
<br />}
<br />
<br /><span style="font-weight: bold;">Classes and structs</span>
<br />
<br />Classes and structs are same as in C++, except the difference of their memory allocation. Objects of classes are allocated in heap, and are created using new, where as structs are allocated in stack. Structs in C# are very light and fast data types. For heavy data types, you should create classes.
<br />Examples:
<br />
<br />struct Date
<br />{
<br /> int day;
<br /> int month;
<br /> int year;
<br />}
<br />
<br />class Date
<br />{
<br /> int day;
<br /> int month;
<br /> int year;
<br /> string weekday;
<br /> string monthName;
<br /> public int GetDay()
<br /> {
<br /> return day;
<br /> }
<br /> public int GetMonth()
<br /> {
<br /> return month;
<br /> }
<br /> public int GetYear()
<br /> {
<br /> return year;
<br /> }
<br /> public void SetDay(int Day)
<br /> {
<br /> day = Day ;
<br /> }
<br /> public void SetMonth(int Month)
<br /> {
<br /> month = Month;
<br /> }
<br /> public void SetYear(int Year)
<br /> {
<br /> year = Year;
<br /> }
<br /> public bool IsLeapYear()
<br /> {
<br /> return (year/4 == 0);
<br /> }
<br /> public void SetDate (int day, int month, int year)
<br /> {
<br /> }
<br /> ...
<br />}
<br />
<br /><span style="font-weight: bold;">Properties</span>
<br />
<br />If you are familiar with the object oriented way of C++, you must have an idea of properties. Properties in above example of Date class are day, month and year for which in C++, you write Get and Set methods. C# provides a more convenient, simple and straight forward way of accessing properties.
<br />So above class can be written as:
<br />
<br />using System;
<br />class Date
<br />{
<br /> public int Day{
<br /> get {
<br /> return day;
<br /> }
<br /> set {
<br /> day = value;
<br /> }
<br /> }
<br /> int day;
<br />
<br /> public int Month{
<br /> get {
<br /> return month;
<br /> }
<br /> set {
<br /> month = value;
<br /> }
<br /> }
<br /> int month;
<br />
<br /> public int Year{
<br /> get {
<br /> return year;
<br /> }
<br /> set {
<br /> year = value;
<br /> }
<br /> }
<br /> int year;
<br />
<br /> public bool IsLeapYear(int year)
<br /> {
<br /> return year%4== 0 ? true: false;
<br /> }
<br /> public void SetDate (int day, int month, int year)
<br /> {
<br /> this.day = day;
<br /> this.month = month;
<br /> this.year = year;
<br /> }
<br />}
<br />
<br />Here is the way you will get and set these properties:
<br />class User
<br />{
<br /> public static void Main()
<br /> {
<br /> Date date = new Date();
<br /> date.Day = 27;
<br /> date.Month = 6;
<br /> date.Year = 2003;
<br /> Console.WriteLine
<br /> ("Date: {0}/{1}/{2}", date.Day, date.Month, date.Year);
<br /> }
<br />}
<br />
<br /><span style="font-weight: bold;">Modifiers</span>
<br />
<br />You must be aware of public, private and protected modifiers that are commonly used in C++. I will here discuss some new modifiers introduced by C#.
<br />readonly
<br />readonly modifier is used only for the class data members. As the name indicates, the readonly data members can only be read, once they are written either by directly initializing them or assigning values to them in constructor. The difference between the readonly and const data members is that const requires you to initialize with the declaration, that is directly. See example code:
<br />
<br />class MyClass
<br />{
<br /> const int constInt = 100; //directly
<br /> readonly int myInt = 5; //directly
<br /> readonly int myInt2;
<br />
<br /> public MyClass()
<br /> {
<br /> myInt2 = 8; //Indirectly
<br /> }
<br /> public Func()
<br /> {
<br /> myInt = 7; //Illegal
<br /> Console.WriteLine(myInt2.ToString());
<br /> }
<br />
<br />}
<br />
<br /><span style="font-weight: bold;">sealed</span>
<br />sealed modifier with a class don't let you derive any class from it. So you use this sealed keyword for the classes which you don't want to be inherited from.
<br />Collapse Copy Code
<br />sealed class CanNotbeTheParent
<br />{
<br /> int a = 5;
<br />}
<br />
<br />
<br /><span style="font-weight: bold;">unsafe</span>
<br />
<br />You can define an unsafe context in C# using unsafe modifier. In unsafe context, you can write an unsafe code, example: C++ pointers etc. See the following code:
<br />Collapse Copy Code
<br />public unsafe MyFunction( int * pInt, double* pDouble)
<br />{
<br /> int* pAnotherInt = new int;
<br /> *pAnotherInt = 10;
<br /> pInt = pAnotherInt;
<br /> ...
<br /> *pDouble = 8.9;
<br />}
<br />
<br /><span style="font-weight: bold;">Interfaces</span>
<br />If you have an idea of COM, you will immediately know what I am talking about. An interface is the abstract base class containing only the function signatures whose implementation is provided by the child class. In C#, you define such classes as interfaces using the interface keyword. .NET is based on such interfaces. In C#, where you can't use multiple class inheritance, which was previously allowed in C++, the essence of multiple inheritance is achieved through interfaces. That's your child class may implement multiple interfaces.
<br />
<br />using System;
<br />interface myDrawing
<br />{
<br /> int originx
<br /> {
<br /> get;
<br /> set;
<br /> }
<br /> int originy
<br /> {
<br /> get;
<br /> set;
<br /> }
<br /> void Draw(object shape);
<br />}
<br />
<br />class Shape: myDrawing
<br />{
<br /> int OriX;
<br /> int OriY;
<br />
<br /> public int originx
<br /> {
<br /> get{
<br /> return OriX;
<br /> }
<br /> set{
<br /> OriX = value;
<br /> }
<br /> }
<br /> public int originy
<br /> {
<br /> get{
<br /> return OriY;
<br /> }
<br /> set{
<br /> OriY = value;
<br /> }
<br /> }
<br /> public void Draw(object shape)
<br /> {
<br /> ... // do something
<br /> }
<br />
<br /> // class's own method
<br /> public void MoveShape(int newX, int newY)
<br /> {
<br /> .....
<br /> }
<br />
<br />}
<br />
<br />
<br /><span style="font-weight: bold;">Arrays</span>
<br />
<br />Arrays in C# are much better than C++. Arrays are allocated in heap and thus are reference types. You can't access an out of bound element in an array. So C# prevents you from that type of bugs. Also some helper functions to iterate array elements are provided. foreach is the statement for such iteration. The difference between the syntax of C++ and C# array is:
<br />• The square brackets are placed after the type and not after the variable name
<br />• You create element locations using new operator.
<br />C# supports single dimensional, multi dimensional, and jagged arrays (array of array).
<br />Examples:
<br />
<br />int[] array = new int[10]; // single-dimensional array of int
<br />for (int i = 0; i < array2 =" new" array3 =" new" arrayofarray =" new" style="font-weight: bold;">Indexers</span>
<br />
<br />Indexer is used to write a method to access an element from a collection, by straight way of using [], like an array. All you need is to specify the index to access an instance or element. Syntax of Indexer is same as that of class properties, except they take the input parameter, that is the index of the element.
<br />Example:
<br />Note: CollectionBase is the library class used for making collections. List is the protected member of CollectionBase which stores the collection list.
<br />
<br />class Shapes: CollectionBase
<br />{
<br /> public void add(Shape shp)
<br /> {
<br /> List.Add(shp);
<br /> }
<br />
<br /> //indexer
<br /> public Shape this[int index]
<br /> {
<br /> get {
<br /> return (Shape) List[index];
<br /> }
<br /> set {
<br /> List[index] = value ;
<br /> }
<br /> }
<br />}
<br />
<br /><span style="font-weight: bold;">Boxing/Unboxing</span>
<br />
<br />The idea of boxing is new in C#. As mentioned above, all data types, built-in or user defined, are derived from a base class object in the System namespace. So the packing of basic or primitive type into an object is called boxing, whereas the reverse of this known as unboxing.
<br />Example:
<br />
<br />class Test
<br />{
<br /> static void Main()
<br /> {
<br /> int myInt = 12;
<br /> object obj = myInt ; // boxing
<br /> int myInt2 = (int) obj; // unboxing
<br /> }
<br />}
<br />
<br />Example shows both boxing and unboxing. An int value can be converted to object and back again to int. When a variable of a value type needs to be converted to a reference type, an object box is allocated to hold the value, and the value is copied into the box. Unboxing is just the opposite. When an object box is cast back to its original value type, the value is copied out of the box and into the appropriate storage location.
<br />
<br /><span style="font-weight: bold;">Function parameters</span>
<br />
<br />Parameters in C# are of three types:
<br />1. By-Value/In parameters
<br />2. By-Reference/In-Out parameters
<br />3. Out parameters
<br />
<br />If you have an idea of COM interface and it's parameters types, you will easily understand the C# parameter types.
<br />
<br /><span style="font-weight: bold;">By-Value/In parameters</span>
<br />
<br />The concept of value parameters is same as in C++. The value of the passed value is copied into a location and is passed to the function.
<br />Example:
<br />
<br />SetDay(5);
<br />...
<br />void SetDay(int day)
<br />{
<br /> ....
<br />}
<br />
<br /><span style="font-weight: bold;">By-Reference/In-Out parameters</span>
<br />
<br />The reference parameters in C++ are passed either through pointers or reference operator &. In C# reference parameters are less error prone. Reference parameters are also called In-Out parameters because you pass a reference address of the location, so you pass an input value and get an output value from that function.
<br />You can not pass an un-initialized reference parameter into a function. C# uses a keyword ref for the reference parameters. You also have to use keyword ref with an argument while passing it to a function demanding reference parameter.
<br />
<br />Example:
<br />
<br />int a= 5;
<br />FunctionA(ref a); // use ref with argument or you will get compiler error
<br />Console.WriteLine(a); // prints 20
<br />
<br />void FunctionA(ref int Val)
<br />{
<br /> int x= Val;
<br /> Val = x* 4;
<br />}
<br />
<br /><span style="font-weight: bold;">Out parameter</span>
<br />
<br />Out parameter is the parameter which only returns value from the function. The input value is not required. C# uses a keyword out for the out parameters
<br />Example:
<br />
<br /> int Val;
<br /> GetNodeValue(Val);
<br />Collapse Copy Code
<br /> bool GetNodeValue(out int Val)
<br /> {
<br /> Val = value;
<br /> return true;
<br /> }
<br />
<br /><span style="font-weight: bold;">Variable number of parameters and arrays</span>
<br />
<br />Arrays in C# are passed through a keyword params. An array type parameter should always be the right most argument of the function. Only one parameter can be of array type. You can pass any number of elements as an argument of type of that array. You can better understand it from example below:
<br />
<br /><span style="font-weight: bold;">Note:</span> This is the only way C# provides for optional or variable number of parameters, that is using array.
<br />
<br />Example:
<br />
<br /> void Func(params int[] array)
<br /> {
<br /> Console.WriteLine("number of elements {0}", array.Length);
<br /> }
<br />
<br />Collapse Copy Code
<br /> Func(); // prints 0
<br /> Func(5); // prints 1
<br /> Func(7,9); // prints 2
<br /> Func(new int[] {3,8,10}); // prints 3
<br /> int[] array = new int[8] {1,3,4,5,5,6,7,5};
<br /> Func(array); // prints 8
<br />
<br /><span style="font-weight: bold;">Operators and expressions</span>
<br />
<br />Operators are exactly the same as of C++ and thus the expression also. However some new and useful operators are also added. Some of them are discussed here.
<br />
<br /><span style="font-weight: bold;">is operator</span>
<br />is operator is used to check whether the operand types are equal or convert-able. The is operator is particularly useful in the polymorphism scenarios. is operator takes two operands and the result is a boolean. See the example:
<br />
<br />void function(object param)
<br />{
<br /> if(param is ClassA)
<br /> //do something
<br /> else if(param is MyStruct)
<br /> //do something
<br /> }
<br />}
<br />
<br /><span style="font-weight: bold;">as operator </span>
<br />as operator checks if the type of the operands are convert-able or equal (as is done by is operator) and if it is, the result is a converted or boxed object (if the operand can be boxed into the target type, see boxing/unboxing). If the objects are not convert-able or box-able, the return is a null. Have a look at the example below to better understand the concept.
<br />
<br />Shape shp = new Shape();
<br />Vehicle veh = shp as Vehicle; // result is null, types are not convertable
<br />
<br />Circle cir = new Circle();
<br />Shape shp = cir;
<br />Circle cir2 = shp as Circle; //will be converted
<br />
<br />object[] objects = new object[2];
<br />objects[0] = "Aisha";
<br />object[1] = new Shape();
<br />
<br />string str;
<br />for(int i=0; i&< str =" objects[i]" str ="="" style="font-weight: bold;">Output:</span>
<br />
<br />Aisha
<br />can not be converted
<br />Statements
<br />Statements in C# are just like in C++ except some additions of new statements and modifications in some statements.
<br />Followings are new statements:
<br />foreach
<br />For iteration of collections like arrays etc.
<br />Example:
<br />
<br /> foreach (string s in array)
<br /> Console.WriteLine(s);
<br />
<br /><span style="font-weight: bold;">lock</span>
<br />Used in threads for locking a block of code making it a critical section.
<br />checked/unchecked
<br />The statements are for overflow checking in numeric operations.
<br />Example:
<br />
<br />int x = Int32.MaxValue; x++; // Overflow checked
<br />{
<br />x++; // Exception
<br />}
<br />unchecked
<br />{
<br />x++; // Overflow}
<br />}
<br />
<br />Following statements are modified:
<br /><span style="font-weight: bold;">Switch</span>
<br />
<br />Switch statement is modified in C#.
<br />1. Now after executing a case statement, program flow can not jump to next case which was previously allowed in C++.
<br />Example:
<br />
<br />int var = 100;
<br />switch (var)
<br />{
<br /> case 100: Console.WriteLine("<value>"); // No break here
<br /> case 200: Console.WriteLine("<value>"); break;
<br />}
<br />
<br />Output in C++:
<br />
<br /><value><value>
<br />In C# you get compile time error:
<br />
<br />error CS0163: Control cannot fall through
<br /> from one case label ('case 100:') to another
<br />
<br />2. However you can do this similar to how you do it in C++:
<br />
<br />switch (var)
<br />{
<br /> case 100:
<br /> case 200: Console.WriteLine("100 or 200<value>"); break;
<br />}
<br />
<br />3. You can also use constant variables for case values:
<br />Example:
<br />
<br />const string WeekEnd = "Sunday";
<br />const string WeekDay1 = "Monday";
<br />
<br />....
<br />
<br />string WeekDay = Console.ReadLine();
<br />switch (WeekDay )
<br />{
<br />case WeekEnd: Console.WriteLine("It's weekend!!"); break;
<br />case WeekDay1: Console.WriteLine("It's Monday"); break;
<br />
<br />}
<br />
<br /><span style="font-weight: bold;">Delegates</span>
<br />
<br />Delegates let us store function references into a variable. In C++, this is like using and storing function pointer for which we usually use typedef.
<br />Delegates are declared using a keyword delegate. Have a look at this example, and you will understand what delegates are:
<br />Example:
<br />
<br />delegate int Operation(int val1, int val2);
<br />public int Add(int val1, int val2)
<br />{
<br /> return val1 + val2;
<br />}
<br />public int Subtract (int val1, int val2)
<br />{
<br /> return val1- val2;
<br />}
<br />
<br />public void Perform()
<br />{
<br /> Operation Oper;
<br /> Console.WriteLine("Enter + or - ");
<br /> string optor = Console.ReadLine();
<br /> Console.WriteLine("Enter 2 operands");
<br />
<br /> string opnd1 = Console.ReadLine();
<br /> string opnd2 = Console.ReadLine();
<br />
<br /> int val1 = Convert.ToInt32 (opnd1);
<br /> int val2 = Convert.ToInt32 (opnd2);
<br />
<br /> if (optor == "+")
<br /> Oper = new Operation(Add);
<br /> else
<br /> Oper = new Operation(Subtract);
<br />
<br /> Console.WriteLine(" Result = {0}", Oper(val1, val2));
<br />}
<br />
<br /><span style="font-weight: bold;">Inheritance and polymorphism</span>
<br />
<br />Only single inheritance is allowed in C#. Multiple inheritance can be achieved using interfaces.
<br />Example:
<br />Collapse Copy Code
<br />class Parent{
<br />}
<br />
<br />class Child : Parent
<br />
<br /><span style="font-weight: bold;">Virtual functions</span>
<br />
<br />Virtual functions to implement the concept of polymorphism are same in C#, except you use the override keyword with the virtual function implementation in the child class. The parent class uses the same virtual keyword. Every class which overrides the virtual method will use override keyword.
<br />
<br />class Shape
<br />{
<br /> public virtual void Draw()
<br /> {
<br /> Console.WriteLine("Shape.Draw") ;
<br /> }
<br />}
<br />
<br />class Rectangle : Shape
<br />
<br />{
<br /> public override void Draw()
<br /> {
<br /> Console.WriteLine("Rectangle.Draw");
<br /> }
<br />}
<br />
<br />class Square : Rectangle
<br />{
<br /> public override void Draw()
<br /> {
<br /> Console.WriteLine("Square.Draw");
<br /> }
<br />}
<br />class MainClass
<br />{
<br /> static void Main(string[] args)
<br /> {
<br /> Shape[] shp = new Shape[3];
<br /> Rectangle rect = new Rectangle();
<br />
<br /> shp[0] = new Shape();
<br /> shp[1] = rect;
<br /> shp[2] = new Square();
<br />
<br /> shp[0].Draw();
<br /> shp[1].Draw();
<br /> shp[2].Draw();
<br /> }
<br />}
<br />
<br />Output:
<br />Shape.Draw
<br />Rectangle.Draw
<br />Square.Draw
<br />Hiding parent functions using "new"
<br />You can define in a child class a new version of a function, hiding the one which is in base class. A keyword new is used to define a new version. Consider the example below, which is a modified version of above example and note the output this time, when I replace the keyword override with a keyword new in Rectangle class.
<br />
<br />class Shape
<br />{
<br /> public virtual void Draw()
<br /> {
<br /> Console.WriteLine("Shape.Draw") ;
<br /> }
<br />}
<br />
<br />class Rectangle : Shape
<br />{
<br /> public new void Draw()
<br /> {
<br /> Console.WriteLine("Rectangle.Draw");
<br /> }
<br />}
<br />class Square : Rectangle
<br />{
<br /> //wouldn't let u override it here
<br /> public new void Draw()
<br /> {
<br /> Console.WriteLine("Square.Draw");
<br /> }
<br />}
<br />class MainClass
<br />{
<br /> static void Main(string[] args)
<br /> {
<br /> Console.WriteLine("Using Polymorphism:");
<br /> Shape[] shp = new Shape[3];
<br /> Rectangle rect = new Rectangle();
<br />
<br /> shp[0] = new Shape();
<br /> shp[1] = rect;
<br /> shp[2] = new Square();
<br />
<br /> shp[0].Draw();
<br /> shp[1].Draw();
<br /> shp[2].Draw();
<br />
<br /> Console.WriteLine("Using without Polymorphism:");
<br /> rect.Draw();
<br /> Square sqr = new Square();
<br /> sqr.Draw();
<br /> }
<br />}
<br />
<br />Output:
<br />Using Polymorphism
<br />Shape.Draw
<br />Shape.Draw
<br />Shape.Draw
<br />Using without Polymorphism:
<br />Rectangle.Draw
<br />Square.Draw
<br />
<br />See how the polymorphism doesn't take the Rectangle class's Draw method as a polymorphic form of the Shape's Draw method, instead it considers it a different method. So in order to avoid the naming conflict between parent and child, we have used new modifier.
<br />Note: you can not use in the same class the two versions of a method, one with new modifier and other with override or virtual. Like in above example, I can not add another method named Draw in Rectangle class which is a virtual or override method. Also in the Square class, I can't override the virtual Draw method of Shape class.
<br /><span style="font-weight: bold;">Calling base class members</span>
<br />If the child class has the data members with same name as that of base class, in order to avoid naming conflicts, base class data members and functions are accessed using a keyword base. See in examples how the base class constructors are called and how the data members are used.
<br />
<br />public Child(int val) :base(val)
<br />{
<br /> myVar = 5;
<br /> base.myVar;
<br />}
<br />
<br />OR
<br />
<br />public Child(int val)
<br />{
<br /> base(val);
<br /> myVar = 5 ;
<br /> base.myVar;
<br />}
<br />
<br /><span style="font-weight: bold;">Future additions</span>
<br />
<br />This article is just a quick overview of the C# language so that you can just become familiar with the language features. Although I have tried to discuss almost all the major concepts in C# in a brief and comprehensive way with code examples, yet I think there is lot much to be added and discussed.
<br />
<br />In future, I would like to add more commands and concepts not yet discussed, including events etc. I would also like to write for beginners, about Windows programming using C#.
<br /><span style="font-weight: bold;">
<br />References:</span>
<br />• Our most commonly known MSDN
<br />• Inside C# by Tom Archer
<br />• A Programmer's Introduction to C# by Eric Gunnerson
<br />• Beginning C# by Karli Watson
<br />• Programming C# (O'Reilly)
<br />
<br /></value></value></value></value></value>Dihazhttp://www.blogger.com/profile/07142367990636982434noreply@blogger.com0