tag:blogger.com,1999:blog-41733009380081018302024-03-20T14:50:09.047+05:30Genious-MindZඔයාලට Programming ඉගෙන ගන්න ඕන නම් ඇවිල්ලා තියෙන්නෙ නියම තැනට තමයි..Unknownnoreply@blogger.comBlogger10125tag:blogger.com,1999:blog-4173300938008101830.post-37049834556844068872012-10-26T12:16:00.002+05:302012-10-26T12:17:12.504+05:30My CV Experiments - Shape Detection<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana, sans-serif;">Here is my first Computer Vision Experiment I done few months ago. Enjoy. :))</span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/-CyCiSAdgfY?feature=player_embedded' frameborder='0'></iframe></div>
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4173300938008101830.post-47065371022814832742012-10-26T12:09:00.001+05:302012-10-26T12:09:42.630+05:30It's Time for C++...<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">Hey guys,</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">Here we are again. Today I'm gonna post a <b>C++ Beginners' Tutorial</b>. Don't worry, I'll continue my <b><i>PHP Lessons</i></b> and <b><i>Computer Vision Tutorials</i></b> in my next articles. I haven't forgot that. :)</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">As you know <b>C++</b> is a very common, widely used popular programming language. So I thought it might be great to post some <b>C++</b> tutorials here. I hope to post some tutorials in game programming in <b>C++</b>. But I'm not quite sure yet cause I'm still new to there and I hope I will be able to post game programming tutorials in later posts. But before that we should learn the basics.</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">Do you know the original name of <b>C++</b>?</span><br />
<span style="font-family: Verdana, sans-serif;">Originally <b>C++</b> called as <b>C with Classes</b>. But later It called as <b>C++</b>. As many of you know, when we want to increase the value of a variable by 1 in programming, we always use <b>++</b> after the variable name.</span><br />
<blockquote class="tr_bq">
<i><span style="font-family: Verdana, sans-serif;"><b>Eg:</b> x++;</span></i></blockquote>
<span style="font-family: Verdana, sans-serif;">And that's how <b>C++</b> got its name. :)</span><br />
<span style="font-family: Verdana, sans-serif;">It means <i><b>One better than C</b>. </i></span><br />
<i><span style="font-family: Verdana, sans-serif;"><br /></span></i>
<span style="font-family: Verdana, sans-serif;">So now you know how it got its name. And I'm not going to tell another boring details. Let's get to work right away.</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">First you need to download your <i style="font-weight: bold;">C++ Compiler</i>.</span><br />
<span style="font-family: Verdana, sans-serif;">I'll be using <b>MinGW</b>. </span><br />
<span style="font-family: Verdana, sans-serif;">You can download it from here : <a href="http://sourceforge.net/projects/mingw/files/latest/download?source=files">http://sourceforge.net/projects/mingw/files/latest/download?source=files</a></span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">Of course you can use <b>Microsoft Visual C++</b>, But I recommend you to use <b>MinGW</b>. But later you can switch to <b>Visual C++</b>. It's not a problem. But as you learn I think it's better to code in plain notepad. :)</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<b><span style="font-family: Verdana, sans-serif;">(For Windows 7 Users)</span></b><br />
<span style="font-family: Verdana, sans-serif;">After you install <b>MinGW</b> right click on <b><i>My Computer</i></b> and select <b><i>Properties</i></b>. Then select <i style="font-weight: bold;">Advanced System Settings </i>from the left hand side. Then select <b>Advanced </b>tab and click on the <i style="font-weight: bold;">Environmental Variables </i>button.</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuJGVLHSq4GLgwY9jRb9wX96JtSkgtOwOTLqBw_T9oSGVKkh_7gtCeiTxDyx0kQ-RvqV3nL26nA2ahqpdyPadgH0TcH_48NLDq53hE-qhf__ByUITAz5BdycTgbciq5SiJ0aWTi_Mfeqw/s1600/Untitled-1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuJGVLHSq4GLgwY9jRb9wX96JtSkgtOwOTLqBw_T9oSGVKkh_7gtCeiTxDyx0kQ-RvqV3nL26nA2ahqpdyPadgH0TcH_48NLDq53hE-qhf__ByUITAz5BdycTgbciq5SiJ0aWTi_Mfeqw/s1600/Untitled-1.jpg" /></span></a></div>
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">Follow the details in the image. Yeeee!!! Now you are ready to start programming in <b>C++.</b></span><br />
<b><span style="font-family: Verdana, sans-serif;"><br /></span></b>
<span style="font-family: Verdana, sans-serif;">See you on next post. :))</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4173300938008101830.post-78476282681671968542012-10-22T20:25:00.000+05:302012-10-26T12:10:36.459+05:30What is Computer Vision?<span style="font-family: Verdana, sans-serif;">It's been a long time since my last post here. I almost forgot that I had a Blog. However, here I am. :)</span><br />
<div>
<span style="font-family: Verdana, sans-serif;">Today I gonna post about something fresh, new and awosome. :D</span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div>
<div>
<span style="font-family: Verdana, sans-serif;">So I thought today I'm gonna post here about <b>Computer Vision</b>. But I'll write this post in English cause it's hard to find <b>Computer Vision</b> tutorial in the web for <b>Emgu CV</b>. So this may be a guide to non-sinhalese as well. :)</span></div>
</div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><b><u>So What is Computer Vision??</u></b></span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div>
<div>
<span style="font-family: Verdana, sans-serif;">Humans use their eyes and their brains to see and visually sense the world around them. <b>Computer Vision</b> is the science that aims to give a similar, if not better, capability to a machine or computer.</span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><b>Computer vision</b> is concerned with the <i>automatic extraction</i>, <i>analysis</i> and <i>understanding</i> of useful information from a single image or a sequence of images. It involves the development of a theoretical and algorithmic basis to achieve automatic visual understanding.</span></div>
</div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div>
<div>
<span style="font-family: Verdana, sans-serif;">The applications of computer vision are numerous and include:</span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div>
<ul>
<li><span style="font-family: Verdana, sans-serif;">Agriculture</span></li>
<li><span style="font-family: Verdana, sans-serif;">Augmented Reality</span></li>
<li><span style="font-family: Verdana, sans-serif;">Autonomous Vehicles</span></li>
<li><span style="font-family: Verdana, sans-serif;">Biometrics</span></li>
<li><span style="font-family: Verdana, sans-serif;">Character Recognition</span></li>
<li><span style="font-family: Verdana, sans-serif;">Forensics</span></li>
<li><span style="font-family: Verdana, sans-serif;">Industrial Quality Inspection</span></li>
<li><span style="font-family: Verdana, sans-serif;">Face Recognition</span></li>
<li><span style="font-family: Verdana, sans-serif;">Gesture Analysis</span></li>
<li><span style="font-family: Verdana, sans-serif;">Geoscience</span></li>
<li><span style="font-family: Verdana, sans-serif;">Image Restoration</span></li>
<li><span style="font-family: Verdana, sans-serif;">Medical Image Analysis</span></li>
<li><span style="font-family: Verdana, sans-serif;">Pollution Monitoring</span></li>
<li><span style="font-family: Verdana, sans-serif;">Process Control</span></li>
<li><span style="font-family: Verdana, sans-serif;">Remote Sensing</span></li>
<li><span style="font-family: Verdana, sans-serif;">Robotics</span></li>
<li><span style="font-family: Verdana, sans-serif;">Security and Surveillance</span></li>
<li><span style="font-family: Verdana, sans-serif;">Transport</span></li>
</ul>
<i></i><br />
<blockquote class="tr_bq">
<i><i><span style="color: #999999; font-family: Verdana, sans-serif;">(<b>source</b>: bmva.org)</span></i></i></blockquote>
<i>
</i></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Verdana, sans-serif;">If you decide to study computer vision, you should have solid knowledge of mathematics and of course you should have computer programming experience. I'll post few computer vision tutorials with my next posts. Still I'm also new to computer vision, there will be many mistakes. So please don't mind. :)</span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Verdana, sans-serif;">In next posts, I'll use Emgu CV (Open CV Wrapper for C#) and Visual C# for the tutorials. Please download them and Install.</span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Verdana, sans-serif;">Emgu CV : <a href="http://sourceforge.net/projects/emgucv/files/latest/download?source=files">http://sourceforge.net/projects/emgucv/files/latest/download?source=files</a></span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Verdana, sans-serif;">Install these and be ready to dive in to the computer vision world....</span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Verdana, sans-serif;">See you later....!!!!!</span></div>
<div>
<span style="font-size: x-small;"><br /></span></div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4173300938008101830.post-58860781271094206822012-05-16T13:24:00.000+05:302012-05-16T13:25:39.487+05:30PHP Lesson 02ඔන්න අද මම කියල දෙන්න යන්නෙ කලින් Post එකෙන් අපි ඉගෙන ගත්ත <b><i><span style="color: red;">echo</span></i></b> කියන Command එක ගැන වැඩි විස්තර තමයි.<br />
<div>
<br /></div>
<div>
මේ Post එක වැඩිය ලොකු වෙන එකක් නෑ. පොඩි දෙයයි අද කියල දෙන්න තියෙන්නෙ. OK. So Let's get started.</div>
<div>
<br /></div>
<div>
අපි කලින් Post එකෙ කරේ මම පහල දාලා තියන Code එකනෙ.</div>
<div>
<br /></div>
<div>
<i style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;"><b><html></b></i><br />
<i style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;"><b><head></b></i><br />
<i style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;"><b><title>MY PHP Lesson</title></b></i><br />
<i style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;"><b></head></b></i><br />
<i style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;"><b><body></b></i><br />
<i style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;"><b><span style="color: #cc0000;"><?php</span></b></i><br />
<i style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;"><b><span style="color: #cc0000;">echo "Hello PHP";</span></b></i><br />
<i style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;"><b><span style="color: #cc0000;">?></span></b></i><br />
<i style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;"><b></body></b></i><br />
<i style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;"><b></html></b></i>
</div>
<div>
<span style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="line-height: 18px;"><b><i><br /></i></b></span></span></div>
<div>
<span style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="line-height: 18px;">අද අපි ඒකෙ තියන "<b>Hello PHP</b>" කියන එක වෙනුවට HTML Code එකක් දාලා බලමු මොකද වෙන්නෙ කියල.</span></span><br />
<span style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="line-height: 18px;">හරි මෙන්න Code එක.</span></span><br />
<span style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="line-height: 18px;"><br /></span></span><br />
<i style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;"><b><html></b></i><br />
<i style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;"><b><head></b></i><br />
<i style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;"><b><title>MY PHP Lesson 2</title></b></i><br />
<i style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;"><b></head></b></i><br />
<i style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;"><b><body></b></i><br />
<i style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;"><b><span style="color: #cc0000;"><?php</span></b></i><br />
<i style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;"><b><span style="color: #cc0000;">echo "<b>Hello PHP</b>";</span></b></i><br />
<i style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;"><b><span style="color: #cc0000;">?></span></b></i><br />
<i style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;"><b></body></b></i><br />
<i style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;"><b></html></b></i><br />
<i style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;"><b><br /></b></i><br />
<span style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="line-height: 18px;">දැන් අපි මේ Code එක Run කරලා බැලුවම මොකද වෙන්නෙ කියලා බලා ගන්න පුලුවන්. මේක Run කරාම "Hello PHP" කියන එක <b>Bold </b>වෙනවනෙ. ඒ කියන්නෙ අපි දාපු HTML Code එක වැඩ කරා කියලනෙ. ම්ම්ම්... අදට ඔච්චර තමයි කියන්න වෙන්නෙ. ඔයාලා තව HTML Code දාලා බලන්න.</span></span><br />
<span style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="line-height: 18px;"><br /></span></span><br />
<span style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="line-height: 18px;">අපි පාඩම් ටික චුට්ට චුට්ට කරමු නෙ. නැත්තම් එක පාරට ලොකු ඒවා කියල දෙන්න ගියාම එපා වෙවි. :))</span></span><br />
<span style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="line-height: 18px;"><br /></span></span><br />
<span style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="line-height: 18px;">මම ඊලඟ පාඩමෙන් <b><i>Special Characters</i></b> ගැන කියල දෙන්නම්. ගොඩක් කට්ටිය දන්නවත් ඇති. ඒත් දන්නෙ නැති කට්ටියත් ඉන්නවනෙ.</span></span><br />
<span style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="line-height: 18px;"><br /></span></span><br />
<span style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;"><span style="line-height: 18px;"><br /></span></span></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4173300938008101830.post-71465594139841089092012-04-19T23:38:00.002+05:302012-04-19T23:38:29.173+05:30PHP මoගල Lesson එකඔන්න මම කලින් Post එකෙන් කිව්ව වගේ PHP Lesson එකක් දැම්ම..<br />
<br />
ඔන්න කස්ටිය දැන් PHP ඉගෙන ගන්න නම් ඔයාලා use කරන IDE එක Open කරන්න. මම නම් use කරන්නෙ Dreamweaver IDE එක. ඔයාට IDE එකක් නැත්නම් Notepad එක open කර ගන්න. අපි මේ ගහන හැම code එකක්ම Notepad එකෙනුත් කරන්න පුලුවන්. :)<br />
<br />
අපි code ගහන්න කලින් Computer එකට කියන්න ඕනනෙ අපි මේ ගහන්නෙ PHP codes කියල. HTML වල නම් <i><b><html></b> </i>Tag එකෙන් කියන්නෙ දැන් මේ අපි HTML codes ගහනව කියලනෙ. ඒ Tag එකට කියන්නෙ HTML වල Opening Tag එක කියලනෙ. ඒ වගේම තමයි PHP වලටත් එහෙම Opening වගේම Closing Tag එකකුත් තියනව HTML වල <i><b></html></b></i> Tag එක වගේ.<br />
<br />
ඉතින් PHP Start කරන්නෙ <i><b><?php</b></i> එහෙමත් නැත්නම් <i><b><?</b></i> Tag එකෙන්. ඒත් මේ tag 2න් වැඩියෙන්ම පාවිච්චි කරන්නෙ <i><b><?php</b></i> කියන Tag එක. දැන් මේක Start කරා වගේම End කරන්නත් එපයි. සෝ PHP Script එක ඉවර කරන්නෙ <b><i>?></i></b> කියන Tag එකෙන්.<br />
<br />
ඒ වගෙම තමයි PHP වල File Extension එක වෙන්නෙ <span style="color: red;"><i>.php</i></span> කියලා. මේ PHP File එක ඇතුලෙ තියෙන්න පුලුවන් PHP Codes ම විතරක් නෙමෙයි HTML Codes, Javascripts, Ajax ඔය වගෙ හැම එකක්ම මේ PHP file එක ඇතුලෙ තියෙන්න පුලුවන්.<br />
<br />
ඔන්න පල්ලෙහා තියනව මම කරන මුල්ම PHP Code එක.<br />
<br />
<i><b><html></b></i><br />
<i><b><head></b></i><br />
<i><b><title>MY PHP Lesson</title></b></i><br />
<i><b></head></b></i><br />
<i><b><body></b></i><br />
<i><b><span style="color: #cc0000;"><?php</span></b></i><br />
<i><b><span style="color: #cc0000;">echo "Hello PHP";</span></b></i><br />
<i><b><span style="color: #cc0000;">?></span></b></i><br />
<i><b></body></b></i><br />
<i><b></html></b></i><br />
<i><b><br /></b></i><br />
ඔන්න ඕක තමයි මම කරන මුල්ම PHP Code එක. මෙකෙ <i><b>echo</b></i> කියන එකෙන් කියන්නෙ <span style="color: red;">" "</span> ඇතුලෙ තියන ඒවා print කරලා පෙන්නන කියල. ආහ් කියන්න තව පොඩ්ඩෙන් අමතක වෙනවා. අපි PHP වල හැම Statement එකක්ම ඉවර කරන්න ඕන semicolon (;) එකෙන්. Programming කරන ගොඩක් කට්ටිය නම් ඒක දන්නව. දන්නෙ නැති කට්ටියට තමයි මේ කිව්වෙ.. :)<br />
<br />
දැන් අද Homework වලට දෙන්නෙ <i><b><span style="color: red;">echo</span></b></i> කියන එක වෙනුවට <b><i><span style="color: red;">print</span></i></b> කියලා දැම්මොත් මොකද වෙන්නෙ කියල ඔයාලා කරලා බලන්න. හැම එකක්ම මම කියල දුන්නම ඒකෙන් ඔයාලට වැඩක් වෙන්නෙ නෑ..<br />
<br />
ඉතින් අදට මම පාඩම නවත්තනවා. ඊලඟ දවසෙ තව අළුත් පාඩමක් අරගෙන එන්නම්කො. එතකන් බායි.. :))<br />
<br />
ප.ලි. : මොනා හලි පුරස්න තීනවනම් කොමෙන්ටුවකින් අහන්න.<br />
<br />Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-4173300938008101830.post-18665392227169998942012-04-19T22:55:00.001+05:302012-04-19T22:57:31.821+05:30කාලෙකට පස්සෙ.....අම්මෝ කාලෙකට පස්සෙ මතක් උනේ පෝස්ට් එකක් දැම්මෙ නෑ නේද කියල.. හිහ් හිහ් මේක බලන්න කට්ටියත් නැති හින්ද එච්චරම ඕන කමකුත් තිබ්බෙ නෑනෙ Post එකක් දාන්න...<br />
<br />
අද කම්මැලිකමේ මොකක්ද කරන්නෙ කියල කල්පනා කර කර ඉන්න කොට තමයි මතක් උනේ අඩේ මගෙ Blog කට්ටකුත් තියනවනෙ කියල... ඉතින් ඔන්න මේ පැත්තට ආව මොකක් හරි Post කරනව කියල. ඒ ආවත් දාන්න දෙයක් හිතා ගන්නත් බෑ.. ඉතින් දැන් වල්පල් ටිකක් කොටන්න ගත්තා..<br />
<br />
මම PHP කියල දෙනව කියලත් කිව්වනෙ.. ඒකත් භාගෙටනෙ කරේ.. අද PHP වල ඊළඟ පාඩම ලියන්නකො ඉතින්..<br />
<br />
එහෙනම් අපි අලුත් PHP පාඩමෙන් Set වෙමු.. :)Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4173300938008101830.post-86520708085831216072011-09-28T22:19:00.001+05:302011-09-28T22:21:14.778+05:30PHP ඉගෙනීමට පෙර....දැන් ඉතින් කට්ටිය PHP ඉගෙන ගන්න හිටියට වැඩක් නෑනේ.. ඊට කලින් කරන්න ඕන වැඩ ගොඩාක් තියනවනේ...<br />
මම දැන් කියන්න යන්නෙ PHP අපි install කරගන්න විදිය ගැන..<br />
අපි PHP ගැන ඉගෙන ගන්න කොට ඕන කරන ඒවා තමයි ගැන තමයි දැන් මම කියන්න යන්නෙ. <br />
<br />
<b>01. Apache Server එක :</b><br />
අපි ලියන PHP Scripts run කරන්න තමයි Apache Server එක් ඕන..<br />
<br />
<b>02. PHP :</b><br />
මේක ඉතින් නැතුව කොහොමත් අපිට PHP ඉගෙන ගන්න බෑනේ..<br />
<br />
<b>03. MySQL Server එක :</b><br />
අපිට ඉතින් Database එක්ක ගණුදෙනු කරන කොට මේකත් ඕන වෙනවා..<br />
<br />
මේ 3 ඉතින් වෙන වෙනම install කරනවට වඩා ලේසි ක්රමයක් ගැන තමයි මම දැන් කියන්න යන්නේ..<br />
අනිත් ඉගෙන ගන්න අයටත් මේ Software එක use කරන එක හෙනම ලේසියි..<br />
<br />
Software එකේ නම තමයි <b>XAMPP</b>..<br />
<a href="http://www.apachefriends.org/en/xampp.html">http://www.apachefriends.org/en/xampp.html</a><br />
මෙන්න මේ site එකට ගියාම ඔයාලට නිකම්ම <b>XAMPP Software</b> එක බා ගන්න පුලුවන්..<br />
<br />
මේ Software එක install කරන හැටි ඉතින් මම කියලා දෙන්න ඕන නෑනේ..<br />
එහෙම මොකක් හරි උදව්වක් ඕන නම් කොමෙන්ටුවක් දාන්න..<br />
<br />
දැන් අලුතෙන් එන <b>XAMPP Software</b> එක install වෙන්නේ C:\ එකටනේ..<br />
<br />
<b><i>C:\xampp\htdocs\</i></b><br />
<br />
මෙන්න මේ htdocs කියන Folder එක ඇතුලේ වෙන Folder එකක් හදලා ඒකට තමයි අපි කරන ඔක්කොම PHP files දාන්නේ..<br />
<br />
උදාහරණයක් විදියට, අපි හිතමු අපි අර htdocs කියන Folder එක ඇතුලෙ mysite කියලා Folder එකක් හදලා ඒකට index.php කියලා අපි code කරපු PHP File එකක් දානවා.. දැන් අපිට මේ file එක run කරලා බලන්න ඕන නම් කරන්නේ <b>XAMPP Control Panel</b> එකෙන්<b> Apache Server</b> එකයි <b>MySQL Server</b> එකයි Start කරන්න..<br />
<br />
දැන් ඔයාගෙ Web Browser එක open කරලා<br />
<i style="font-weight: bold;"><span class="Apple-style-span" style="color: blue;">http://127.0.0.1/mysite/index.php</span> </i>හෝ <i style="font-weight: bold;"> <span class="Apple-style-span" style="color: blue;">http://localhost/mysite/index.php</span></i><br />
Address Bar එකේ Type කරලා Enter කරන්න..<br />
<br />
මම පලවෙනි Lesson එකේදි Screenshots දාලා කරලා පෙන්නන්නම්.. එතකොට තේරුම්ගන්න පුලුවන් වේවි දැන් තේරුනේ නැත්තම්.. :)<br />
<i style="font-weight: bold;"><br />
</i><br />
හ්ම්ම්ම්ම්...ඇති වගේ.. මම ගියා.. ටටා.. :)Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4173300938008101830.post-40638272456237435112011-09-09T12:46:00.004+05:302011-09-09T12:50:34.355+05:30PHP ඉගෙන ගනිමුද???<span style="font-size: small;">හප්පේ..කාලෙකට පස්සේ මතක් උනා post එකක් ලියන්න ඕන කියලා. ඉතින් මම අද ලියන්න යන්නේ PHP ගැන. හරි අපි දැන් PHP ඉගෙන ගන්න ඉස්සෙල්ලා දැනගන්න ඕන දේවල් ගොඩාක් තියනවා.. :) ඉතින් මම ඒවා එකින් එක කියල දෙන්නම්.. :)</span><br />
<br />
<div style="color: #444444;"><div style="color: black;"><b><i>PHP</i> </b>කියන එකේ තේරුම මොකද්ද??</div>-------------------------------------------------------- </div><span style="font-size: small;"><i><b>PHP</b></i> කියන්නේ <i><b>PHP: Hypertext Preprocessor</b></i> කියන එකට.</span><br />
<br />
<div style="color: #444444;"><div style="color: black;"><i><b>Dynamic Webpages</b></i> හා <i><b>Static Webpages</b></i> කියන්නේ මොනවද??</div>---------------------------------------------------------------------------------------------------</div><i><b>Static Webpage</b></i> එකකට අපි සමහර වෙලාවට <i><b>Flat Page</b></i> කියලත් කියනවා. <i><b>Static Page</b></i> එකක තියන Content බොහෝ දුරට එකම එක තමයි තියෙන්නේ.. උදාහරණයක් ගත්තොත් අපි හිතමු ඔයාලගෙ School එකේ Website එක ගැන. ඒකෙ Home Page එක ගත්තම ගොඩක් වෙලාවට තියෙන්නේ එකම content එක නේද.? අවුරුදු ගානක් එකම content එක නේද තියෙන්නෙ. But සමහර school වල නම් ඉතින් ඒවා update කරනවා. අන්න ඒවගේ Pages වලට තමයි <i><b>Static Webpages</b></i> කියල කියන්නේ.<br />
<br />
<i><b>Dynamic Webpage</b></i> එකක් ගත්තහම ඒවයි තියන Content හැමතිස්සෙම වෙනස් වෙන්න පුලුවන්. ඒකටත් උදාහරණ්යක් විදියට ගන්න පුලුවන් Facebook එකේ Homepage එක. ඒකෙ තියන content හැමතිස්සෙම වෙනස් වෙනවා නේද?? අනික මගේ Homepage එකේ පෙන්න ඒවා නෙමෙයි වෙන එක්කෙනෙක්ගේ Homepage එකේ පෙන්නනේ. නමුත් <i><b>Static Page</b></i> එකක මට පෙන්නන දේම තමයි වෙන එක්කෙනෙක්ටත් පෙන්නන්නේ..<br />
<br />
සාමන්යයෙන් <i><b>Static Webpages</b></i> හදන්න තමයි අපි <b><i>HTML</i></b> use කරන්නේ. එතකොට ඔයාලට ප්රශ්නයක් එන්න පුලුවන් එතකොට කොහොමද <i><b>Dynamic Webpage</b></i> එකක් හදන්නේ කියලා. අන්න ඒකට තමයි <i><b>PHP</b></i> කරලියට එන්නේ.. :) නමුත් <i><b>Dynamic Webpages</b></i> හදන්න<i><b> HTML</b></i>නුත් ඕන වෙනවා.. <i><b>PHP</b></i> වලට අමතරව <b><i>ASP</i></b>, <i><b>JSP</b></i> වගේ ඒවත් <i><b>Dynamic Webpages</b></i> හදන්න ගන්න පුලුවන්.<br />
<br />
මම හිතනවා දැන් ඔයාලට <b><i>Static & Dynamic Webpages</i></b> ගැන idea එකක් එන්න ඇති කියලා.. :)<br />
<br />
තව ඒතකොට ඔයලා දැනගන්න ඕන Server-Side Scripting Language කියන්නේ මොනවද කියලා. ඒවගේම දැනගන්න ඕන Client-Side Scripting Language කියන්නේ මොනවද කියලා.. නමුත් මම ඒවා ගැන මෙතන කියන්න යන්නේ නෑ. ඔයාලා පොඩ්ඩක් Google එකේ search කරලා බලන්න. :)<br />
<br />
ම්ම්ම්....මම හිතන්නේ දැන් මේ PHP එකට දීපු Introduction එක හොදටම ඇති කියලා. මට මොනවහරි ගැන කියන්න අමතක වෙලා තියනවනම් කියන්න. මම ඒක කියලා දෙන්නම්.. :)<br />
<br />
එහෙනම් දැනට ඇති කියලා හිතෙනවා.. ටටා බායි.. හැව් අ නයිස් ඩේ.. ;)Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-4173300938008101830.post-44722166346608154272011-05-20T19:44:00.004+05:302011-05-20T19:54:46.917+05:30HTML 101 (HTML මුල්ම පිම්ම...)ඔන්න ඉතින් අපි අද අපේ පලවෙනි පාඩම පටන් ගන්න තමයි හදන්නේ..<br />
<br />
මේ පාඩමෙන් මම කියල දෙන්න හදන්නේ අපි Web Designing කරන කොට ඕනම වෙන Programming Language එකක් ගැන..ඒකට තමයි HTML කියල කියන්නේ.. Web Designing කිව්වොත් ඉතින් HTML නැතුවම බෑ..මොකද අපිට කවදාවත්ම බෑ Website එකක් Design කරන්න HTML නැතුව.. හරි දැන් මේ දෙඩෙව්වා ඇති..අපි ඉක්මනටම වැඩේට බහිමු...<br />
<br />
මුලින්ම කියල ඉන්නම් HTML කියන අකුරු 4 තේරුම මොකද්ද කියල..<br />
HTML කියන්නේ HyperText Markup Language කියන එකට.. Markup Languages වල ඉස්සරහින්ම තියන Language එකක් තමයි HTML කියන්නේ..<br />
(Markup Language එකක් කියන්නේ මොකද්ද කියලා මම විස්තර කරන්න යන්නේ නෑ.. දැන ගන්න ඕන කස්ටිය ඉන්නවනම් කියන්න..)<br />
<br />
හ්ම්ම්..දැන් අපි බලමු අපි HTML වලින් Programming කරන්න නම් අපිට ඕන කරන Softwares මොනවද කියල..<br />
ඒවා තමයි......<br />
<br />
<ul><li>NotePad එක.</li>
<li>මොකක් හරි Web Browser එකක්.. (උදා: IE, Firefox, Chrome,.....)</li>
</ul><div>හරි දැන් අපි අපේ මුල්ම Website එක හදමු..</div><div><br />
</div><div>Step 01 (පියවර 01)</div><div>NotePad එක Open කරගන්න..</div><div><br />
</div><div>Step 02 (පියවර 02)</div><div>දැන් මෙන්න මේ Code එක NotePad එකේ Type කරන්න.. (මම මේක Type කරන්න කිව්වේ HTML Codes හුරු වෙන්න.. එහෙම කැමති නැත්තම් Code එක Copy කරලා NotePad එකේ Paste කරන්න..)</div><div><br />
</div><div> <b><i><html></i></b></div><div><b><i> <head></i></b></div><div><b><i> <title>Welcome to My First Website</title></i></b></div><div><b><i> </head></i></b></div><div><b><i> <body></i></b></div><div><b><i> Hello World HTML...!!!!</i></b></div><div><b><i> </body></i></b></div><div><b><i> </html></i></b></div><div><br />
</div><div>Step 03 (පියවර 03)</div><div>දැන් NotePad එකේ Menu Bar එකේ File ගිහිල්ලා Save Select කරාට පස්සේ එන Dialog Box එකේ File Name කියන තැන <b>index.html</b> කියලා Type කරලා ඔයා කැමති තැනක Save කරගන්න..</div><div><br />
</div><div>Step 04 (පියවර 04)</div><div>දැන් ඉතින් index.html file එක Save කරපු තැනට ගිහිල්ලා ඒ file එක ඔයාගේ Web Browser එකෙන් Open කරලා බලන්න මොකක්ද එන්නේ කියලා...</div><div><br />
</div><div>මම ඊලඟ පාඩමෙන් අපි දැන් කරපු Code එකෙන් වෙන්නෙ මොකක්ද කියලා Explain කරල දෙන්නම්..</div><div>එතකන් පොඩ්ඩක් ඉවසල ඉන්න වේවි..(එහෙම ඉතින් ඉවසන්න අමාරුම නම් පොඩ්ඩ්ක් ගූගොල් එකේ සෑච් කොරල බලන්න. ඕන තරම් Articles හොයා ගන්න පුලුවන් වේවි... ) ;)</div><div><br />
ඔයාලට මේ පාඩමෙ තේරෙන්නේ නැති තැන් එහෙම තියනවනම් එවා අහන්න..<br />
<br />
</div><div>එහෙනම් දැනට පොඩ්ඩක් විරාමයක්.. :)</div><div><br />
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4173300938008101830.post-88159687857670202102011-04-05T20:15:00.005+05:302011-05-20T19:09:04.238+05:30පලවෙනි POST එක....<div style="font-family: Arial,Helvetica,sans-serif;">Hi හැමෝටම,</div><div style="font-family: Arial,Helvetica,sans-serif;"><br />
</div>මම හිතුවා programming දන්නෙ නැති කස්ටියට programming ඉගෙන ගන්න පුලුවන් විදියේ articles set එකක් දාන්න ඕන කියල. අන්න එහෙම හිතලා තමයි මම මේ බ්ලොග් එක ලියන්න පටන් ගත්තේ.<br />
<br />
ඉතින් මේ විස්තර ටික දැනට හොදටෝම ඇති කියල හිතෙනවා..<br />
<br />
<div style="font-family: Arial,Helvetica,sans-serif;">ඉතින් මම දැනට නවතිනවා..</div><div style="font-family: Arial,Helvetica,sans-serif;">ඉක්මනටම අපේ පලවෙනි පාඩමත් එක්ක set වෙමු.</div><div style="font-family: Arial,Helvetica,sans-serif;"><br />
</div><div style="font-family: Arial,Helvetica,sans-serif;">ප.ලි. </div><div style="font-family: Arial,Helvetica,sans-serif;">මට තාම හිතා ගන්න බෑ මොන ප්රොග්රැමින් language එක ගැනද මුලින්ම පෝස්ට් කරන්නෙ කියල..<br />
හැම කට්ටියම වගේ වෙබ් සයිට්ස් හදන්න ආස නිසා වෙබ් ඩිසයිනින් කරන්නේ කොහොමද කියලා මුලින්ම කියල දෙන්නම්..</div>Unknownnoreply@blogger.com0