tag:blogger.com,1999:blog-85826767653121742492024-03-05T05:47:52.411-08:00Chanaka Udaya Kumara's BlogThe essence of life of a human being is here.Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.comBlogger59125tag:blogger.com,1999:blog-8582676765312174249.post-12121403419848796622012-12-30T06:59:00.005-08:002012-12-30T06:59:50.724-08:00ඉන්දියාවෙන් ඉගෙන ගත හැකි පාඩම<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div style="font-family: Arial, Helvetica, sans-serif; line-height: 28px;">
<br /></div>
<div style="font-family: Arial, Helvetica, sans-serif; line-height: 28px;">
එය අතිශයින්ම ශෝකජනක පුවතකි. 23 හැවිරිදි වෛද්ය ශිෂ්යාවක් බසයක් තුල දුෂණයට ලක් වීමෙන් අනතුරුව සිංගප්පූරුවේ රෝහලක ප්රතිකාර ලබමින් සිටින විට ඊයේ අවසන් ගමන් ගියාය. මෙය ලංකාවේ සිදු වුව නම් සාමාන්ය සිදුවීමකි .</div>
<div style="font-family: Arial, Helvetica, sans-serif; line-height: 28px;">
<br /></div>
<div style="font-family: Arial, Helvetica, sans-serif; line-height: 28px;">
එනමුත් ඉන්දියාවේ මහා දේශපාලනික හා සමාජීය කුණාටුවක් නිර්මාණය කිරීමට මෙම සිදුවීම සමත් වී ඇත .අවසානයේ මෙම සිසුවියගේ දේහය ඉන්දියාවට ගෙන එන ලද්දේ විශේෂ ගුවන් යානයකිනි . එය භාර ගැනීමට ඉන්දියාවේ අගමැති සහ පාලක පක්ෂ නායිකාව පැමිණ සිටියහ .</div>
<div style="font-family: Arial, Helvetica, sans-serif; line-height: 28px;">
<br /></div>
<div style="font-family: Arial, Helvetica, sans-serif; line-height: 28px;">
ඉන්දීය ජනතාව මෙම සිදුවීමට ඉතා ප්රබල විරෝධයක් මතු කල අතර අදාළ වැරදි කරුවන් 6 දෙනාට මරණ දඬුවම ලබාදෙන ලෙස බල කරමින් උද්ගෝෂණ සහ පෙළපාලි වලට ලක්ෂ ගණන් ජනතාව එක රැස්ව වුහ . මෙයින් අපට ඉගෙන ගත හැකි පාඩම වන්නේ ඉන්දීය ජනතාව තුල තම සමාජය පිරිසිදු කිරීමට ඇති උනන්දුවයි . ඔවුන් මෙවැනි සිදුවීමක ඇති බරපතල කම ඉතා හොඳින් දැක ඇත . අප සමාජයට හැදෙන්නට මෙය ඉතා හොඳ පාඩමකි . අද මිය ගියේ වෛද්ය ශිෂ්යාවකි . හෙට එය ඔබගේ අසල වැසියාට සිදු විය හැක . ඉන් පසුව එය ඔබගේ පවුලේ අයෙකුට සිදු විය හැක . එම නිසා අදම එය නතර කල යුතුය. ඉන්දීය ජනතාව මෙය හොඳින් තේරුම් ගෙන ඇත . </div>
<div style="font-family: Arial, Helvetica, sans-serif; line-height: 28px;">
<br /></div>
<div style="font-family: Arial, Helvetica, sans-serif; line-height: 28px;">
අපේ රටේ ජනතාව මෙය ඉක්මනින් අවබෝධ කර නොගත හොත් රට අරාජික තත්වයට පත් වීම සක්කරයාට වත් නැවැත්වීමට නොහැකි වනු ඇත .</div>
</div>
Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com1tag:blogger.com,1999:blog-8582676765312174249.post-26491408440820975422012-09-26T21:36:00.000-07:002012-09-26T21:36:34.163-07:0010 Tips to improve your productivity by Robin sharma<div dir="ltr" style="text-align: left;" trbidi="on">
1. Stop waiting for perfect conditions to launch a great project. Immediate action fuels a positive feedback loop that drives even more action.<br /><br />2. Run routines. When I studied the creative lives of massively productive people like Stephen King, John Grisham and Thomas Edison, I discovered they follow strict daily routines. (i.e., when they would get up, when they would start work, when they would exercise and when they would relax). Peak productivity's not about luck. It's about devotion.<br /><br />3. Get up at 5 am. Win the battle of the bed. Put mind over mattress. This habit alone will strengthen your willpower so it serves you more dutifully in the key areas of your life.<br /><br />4. Don't say yes to every request. Most of us have a deep need to be liked. That translates into us saying yes to everything - which is the end of your elite productivity.<br /><br />5. Stop multi-tasking. New research confirms that all the distractions invading our lives are rewiring the way our brains work (and drop our IQ by 5 points!). Be one of the rare-air few who develops the mental and physical discipline to have a mono-maniacal focus on one thing for many hours. (It's all about practice).<br /><br />6. Work in 90 minute blocks with 10 minute intervals to recover and refuel (another game-changing move I personally use to do my best work).<br /><br />7. Write a Stop Doing List. Every productive person obsessively sets To Do Lists. But those who play at world-class also record what they commit to stop doing. Steve Jobs said that what made Apple Apple was not so much what they chose to build but all the projects they chose to ignore.<br /><br />8. Get things right the first time. Most people are wildly distracted these days. And so they make mistakes. To unleash your productivity, become one of the special performers who have the mindset of doing what it takes to get it flawless first. This saves you days of having to fix problems.<br /><br />9. Get lost. Don't be so available to everyone. I often spend hours at a time in the cafeteria of a university close to our headquarters. I turn off my devices and think, create, plan and write. Zero interruptions. Pure focus. Massive results.<br /><br />10. Remember that big, brave goals release energy. So set them clearly and then revisit them every morning for 5 minutes.</div>
Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com0tag:blogger.com,1999:blog-8582676765312174249.post-30294723627072740422012-08-01T20:12:00.000-07:002012-08-01T20:12:14.173-07:0018 Rules of Living by Dalai Lama<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal">
1. Take into account that great
love and great achievements involve great risk.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
2. When you lose, don’t lose the lesson.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
3. Follow the three Rs: 1. Respect for self 2. Respect for
others 3. Responsibility for all your actions.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
4. Remember that not getting what you want is sometimes a
wonderful stroke of luck.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
5. Learn the rules so you know how to break them properly.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
6. Don’t let a little dispute injure a great friendship.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
7. When you realize you’ve made a mistake, take immediate
steps to correct it.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
8. Spend some time alone every day.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
9. Open your arms to change, but don’t let go of your
values.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
10. Remember that silence is sometimes the best answer.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
11. Live a good, honorable life.
Then when you get older and think back, you’ll be able to enjoy it a second
time.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
12. A loving atmosphere in your home is the foundation for
your life.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
13. In disagreements with loved ones, deal only with the
current situation. Don’t bring up the past.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
14. Share your knowledge. It’s a way to achieve immortality.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
15. Be gentle with the earth.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
16. Once a year, go someplace you’ve never been before.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
17. Remember that the best relationship is one in which your
love for each other exceeds your need for each other.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
18. Judge your success by
what you had to give up in order to get it.</div>
<div class="MsoNormal">
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com0tag:blogger.com,1999:blog-8582676765312174249.post-89120111070344695982012-07-20T07:21:00.000-07:002012-07-20T07:21:15.581-07:00ලාංකීය සමාජය තුල මධ්යම පන්තිකයාගේ අභියෝගය<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
මිනිසා යනු දේශපාලනික සත්වයෙකි. ඕනෑම අයෙකුට තමන්ට කැමති දේශපාලන මතවාදයක්
දැරිය හැක. ඒ පිලිබඳ අපට ගැටළුවක් නැත. අප කුමන මත වාදය දැරුවද පොදුවේ
වර්තමාන ලාංකීය සමාජය තුල මධ්යම පන්තිකයා මුහුණ දෙන ගැටළු සම්බන්ධව
විවරණයක් ඉදිරිපත් කිරීම මගේ බලාපොරොත්තුවයි. <br />
<br />
අපට දේශපාලන නායකයන්ට ඕනෑ තරම් අවලාද නැගිය හැකිය. නමුත් ඒවායින් කිසිදු
ප්රතිපලයක් නොලැබෙන බව අමුතුවෙන් කිව යුතු නැත. අප කුමක් කීවද ඔවුන්
ඔවුන්ට අවේනික දහදුරා වැඩ ටික කලට වෙලාවට නියම ආකාරයට සිදු කර ගනී.
දේශපාලනික වශයෙන් රට ගොඩ දැමිය හැකි නායකයෙකු පෙනෙන තෙක් මානයක නැත. රටේ
නිතිය සදාචාරය සම්බන්ධ පැහැදිලි ගැටළු පැන නැගී ඇත. එසේ නම් අපට කල හැක්කේ
කුමක්ද? යම් තරමක වත් කමක් ඇති ඇතැම් දෙනෙක් වෙනත් රටවල් කරා සංක්රමණය
වෙති. එය ඔවුන්ගේ තෝරාගැනීමය. නමුත් බහුතරයකට එසේ රට හැර දමා යා නොහැක. එසේ
නම් අප කල යුත්තේ වල කටින්ම ගොඩ ඒමට උත්සහ දැරීමය. ඒ සඳහා මාගේ යෝජනා
මාලාව පහතින් සඳහන් කරන්නෙමි. <br />
<br />
<ol>
<li>අපගේ මානුෂික ගති පවතුම් දියුණු කර ගත යුතුය. ඒ සඳහා ඔබගේ ආගම ඔබට උපකාර වනු ඇත. <br />
</li>
<li>නිශ්චිත ඉලක්කයක් ඔස්සේ ජීවිතය ඉදිරියට ගෙන යා යුතුය. <br />
</li>
<li>ඔබගේ සැබෑ හැකියාවන් හඳුනා ගෙන ඒ ඔස්සේ ඉදිරියට යාමට උත්සහ කල යුතුය. <br />
</li>
<li>තමන්ගේ මුල හඳුනාගෙන කිසිම දිනෙක මුල අමතක නොකළ යුතුය. තමන්ගේ දෙමාපියන්, සහෝදරයන් කිසිම දිනෙක අමතක නොකළ යුතුය</li>
</ol>
මෙම කරුණු වෙත ඔබගේ අවධානය යොමු කරන අතර ඉතා වැදගත්ම කරුණ වන්නේ ඔබ වටා
සිටින පුද්ගලයන් කුමන ආකාරයේ කෙනෙහෙලි කම් කලද තමන්ගේ උදාර ගති ගුණ
නොසෙල්වෙන ලෙස ජිවත් විය යුතුය. එවිට ඔබ සැබෑ මනුෂ්යයෙක් වනු ඇති බව මාගේ
විශ්වාශයයි. <br />
<br />
ඔබගේ සාර්ථක ජීවිතය ගොඩ නැගීමට කිසිම විටක ඔබ ප්රමාද නැත. අවශ්ය වනුයේ
ඔබගේ උනන්දුව පමණි. අනෙකුත් සැම දෙයක්ම ඔබ කර පැමිණීම අනිවාර්ය වේ. <br />
<br />
කිසි ලෙසකින්වත් ඔබගේ උත්සාහය අත් නොහරින්න. ඉදිරියටම යන්න. ජයග්රහණය ඔබ කර ලඟා වනු නියතය. <br />
<br />
ඔබ ජීවිතය සාර්ථක කර ගත පසු ඔබට දේශපාලකයන් කුමන දේ කලද ඔබට ශක්තිමත් මිනිසෙකු ලෙස ජිවත් විය හැක. එවිට ඔවුන් ඔබ කරා පැමිණෙනු ඇත. </div>Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com0tag:blogger.com,1999:blog-8582676765312174249.post-40753948683596490502012-05-31T00:43:00.001-07:002012-05-31T00:43:38.718-07:00Beating Dengue<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
I am publishing this on behalf of Mr. Alailima since i felt that this is very useful for SriLankans at this moment.<br />
<br />
By Talavou Alailima<br />
Founder and Chairman of Power World Gyms<br />
<br />
In the early hours of the 19th April 2012, the doctors of the Lady Ridgeway Hospital (LRH) Medical Intensive care (MICU) were fighting to save the life of my 5 month baby son Jason, after having been diagnosed with a severe attack of dengue. It was the first time LRH-MICU had dealt with such a badly managed dengue case of a baby in its history, and the job of not only dealing with this severe dengue attack, but also undoing the damage done due to the bad management of Jason’s dengue, fell into the hands of a brilliant young pediatrician Dr. Daham de silva who was a senior registrar at the hospital. If not for his out of the box, bold and aggressive treatment of Jason, with the support of Dr. Srilal de silva and Dr. Nalin Kithulwaththa the head consultants of the MICU, and God’s direct intervention of making the impossible, possible, Jason my son would have been lost.<br />
Such a disaster deserves reflection on where I failed as a father and what I could have done better as a parent to have protected my 5 month baby from this dreadful disease. This write up is about sharing with you the lessons I learnt and what all of us should know and understand about what can and must be done, to beat dengue!<br />
<br />
1. If your child is under the age of one year and gets fever, show the child to a board certified pediatrician immediately. Ideally, one who is also linked to a government hospital. Board certified means that their credentials are in order. The fact that they are also linked with a government hospital further confirms their qualification and also, if the situation goes terribly wrong, the government’s emergency setup is the best way to deal with life and death situations.<br />
2. If your child has fever and you are concerned that it could be dengue, get a blood test called “Dengue Antigen”, as it tells you whether you have dengue or not even after one day of fever, unlike the standard “Dengue Antibody” blood test that needs several days of having fever before you can get a positive test for dengue. This delay in time of knowing whether your child has dengue or not, gives the virus more time to succeed in weakening your child’s ability to fight it.<br />
<br />
3. Beating dengue is about knowing as early as possible whether you or your child has it, because at such an early stage you or your child’s platelet count may even be within the normal range and you can win the fight with ease from that position of strength.<br />
This was the case with my 3 year old second son Jonathan who got fever just a day after my 5 month baby Jason, and was warded in the hospital for dengue as well. The Dengue Antigen blood test showed he was positive for dengue but the platelet count was at 160,000 just above the lower end of the normal range. Because we were able to react early with this information, the lowest the platelet count was able to go was 80,000 before it turned around.<br />
<br />
4. Even though it is said that there is no treatment for dengue, the indirect treatment for dengue does save lives. Balancing the intake and outflow of fluids is critical and at the heart of the solution. Roughly 50% of deaths are due to the mismanagement of dengue and 50% is due to a delay in providing treatment for dengue. Many hospitals and doctors are getting this balancing act wrong, more times than we are willing to believe. So, please don’t take your eyes off the ball, believing that the doctor or hospital will not get it wrong and everything will be fine.<br />
<br />
5. The dengue virus' goal is to create a deficiency of vital nutrients to other life sustaining cells while it attacks important organs. The virus however, has only a maximum of a 6 day window to do this, from the day that the fever first appears. If it fails to overcome us within that window of time, we win! The proper management of dengue is to keep supplying the vital nutrients etc., to the body to support its ability to fight. The Full Blood Count test and a few others taken every 6 to 12 hours help us to know the direction of the attack, so that we can counter attack it by knowing how to support the body. This kind of support and management of dengue is the only way to beat it. Therefore, who the doctor is and where this support is provided is absolutely critical and central to the battle.<br />
<br />
6. When you have fever, only take Panadol as a principle! Do not take any other fever reducing medicine such as Dolor, Brufen etc. If you do, and you or your child has dengue, and the fight goes down to the wire, this will tip the balance against you. The simple reason being that most other fever reducing medication has the ability to increase the leaking of blood from vessels and organs which begins to take place in dengue patients when the platelet counts go below 100,000.<br />
<br />
7. What drove me to cycle in a fever medication, in between the 6 hourly Panadol dose when my second son Jonathan of three got fever, was the fear of him getting a fit if the fever rose too high which, I feared could lead to brain damage or so I thought. I believe I am not alone in this line of thinking and that is why I am addressing this issue as well.<br />
<br />
I am told that such fear is misplaced and that brain damage does not take place if your child gets a fit as a result of high fever. If a fit does take place, turn the child on to his/her left and within 5 minutes the fit will end. However, if the fit extends beyond 10 minutes, show the child to a doctor to confirm that all is fine.<br />
<br />
If the fever rises between Panadol doses, tepid sponge the child to bring comfort. Tepid sponging also does not guarantee that a fit will not take place in a child that may have a history of having fits because of fever or has a family history of such fits taking place.<br />
<br />
If we follow the above instructions diligently, beating the dengue virus will be a walk in the park!<br />
<div>
<br /></div>
</div>Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com0tag:blogger.com,1999:blog-8582676765312174249.post-41949282442495867862012-05-30T20:16:00.002-07:002012-05-30T20:16:22.908-07:00Ten Inspirational quotes to brighten your day<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div style="text-align: left;">
</div>
<span style="font-family: Georgia, 'Times New Roman', serif;">“There are only two ways to live your life. One is as though <b>nothing is a miracle.</b> The other is as though <b>everything is a miracle</b>.” – <i>Albert Einstein</i></span><div>
<b><span style="font-family: Georgia, 'Times New Roman', serif;"><br /></span></b></div>
<div>
<b><span style="font-family: Georgia, 'Times New Roman', serif;"><br /></span></b></div>
<div>
<b><span style="font-family: Georgia, 'Times New Roman', serif;"><br /></span></b></div>
<span style="font-family: Georgia, 'Times New Roman', serif;">“The best years of your life are the ones in which you decide <b>your problems are your own</b>. You do not blame them on your mother, the ecology, or the president. You realize that <b>you control your own destiny</b>.” – <i>Albert Ellis</i></span><div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br /></span></div>
<div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br /></span></div>
<div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br /></span></div>
<span style="font-family: Georgia, 'Times New Roman', serif;">“The trouble with <b>not having a goal</b> is that you can spend your life running up and down the field and <b>never score</b>.” – <i>Bill Copeland</i></span><div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br /></span></div>
<div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br /></span></div>
<div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br />“If what you’re doing is <b>not your passion</b>, you have <b>nothing to lose</b>.” - <i>Unknown author</i></span></div>
<div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br /></span></div>
<div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br /></span></div>
<div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br />“The person who says <b>something is impossible</b> should not interrupt the <b>person who is doing it</b>.” - <i>Unknown author</i></span></div>
<div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br /></span></div>
<div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br /></span></div>
<div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br />“It is <b>never too late</b> to be what you <b>might have been</b>.” – <i>George Eliot</i></span></div>
<div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br /></span></div>
<div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br /></span></div>
<div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br />“All our <b>dreams can come true</b> – if we have the <b>courage</b> to pursue them.” – <i>Walt Disney</i></span></div>
<div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br /></span></div>
<div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br /></span></div>
<div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br />“What the <b>mind</b> can conceive, it <b>can achieve</b>.” – <i>Napoleon Hill</i></span></div>
<div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br /></span></div>
<div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br /></span></div>
<div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br />“It is not because things are difficult that we <b>do not dare</b>; it is because we do not dare that <b>things are difficult</b>.” – <i>Seneca</i></span></div>
<div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br /></span></div>
<div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br /></span></div>
<div>
<span style="font-family: Georgia, 'Times New Roman', serif;"><br />“<b>Great minds discuss ideas.</b> Average minds discuss events. Small minds discuss people.” ~ <i>Eleanor Roosevelt</i></span><br />
</div>
</div>Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com0tag:blogger.com,1999:blog-8582676765312174249.post-47443307605530021412012-05-30T02:00:00.001-07:002012-05-30T02:00:44.930-07:00Porn & addiction...sex out of context<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
On a cold, dark night, there's nothing better than a blazing fire in the fireplace. You can pile on the wood and let it burn nice and warm. It's safe, warm, relaxing and romantic. Now take that same fire out of the fireplace (which was built for it) and drop it in the middle of the living room. Suddenly it becomes destructive. It can burn down the whole house and kill everyone inside. Sex is like that fire. As long as it's expressed in the protective commitment of a marriage relationship, it's wonderful, warm and romantic. But porn takes sex outside that context.<br />
<br />
It's a big business that makes a lot of money and doesn't care how. They'll show you whatever they think will make you come back and buy more. "There were 11,000 porn video titles last year versus 400 movie releases from Hollywood last year...[and] 70,000 pornographic web sites."1<br />
<br />
<b>What Fuels Porn Addiction</b><br />
One of the most vital parts of mental environment is a healthy idea of who we are sexually. If these ideas are polluted, a critical part of who we are becomes twisted. The porn culture tells you that sex, love and intimacy are all the same thing. In porn, people have sex with total strangers -- people they just met. All that matters is my satisfaction. It doesn't matter whose body I'm using, as long as I get it. Porn gets you to think that sex is something you can have anytime, anywhere, with anyone, with no consequences.<br />
<br />
The problem with porn's shallow perspective is that relationships are not built on sex, but on commitment, caring and mutual trust. In that context, like fire in the fireplace, sex is wonderful. Being with someone who loves and accepts you, someone who is committed to you for your whole lives together, someone you can give yourself completely to, that is what makes sex really great.<br />
<br />
<b>To Find Freedom from Porn Addiction: Recognize the Lies</b><br />
You can't learn the truth about sex from pornography. It doesn't deal in truth. Pornography is not made to educate, but to sell. So, pornography will tell whatever lies attract and hold the audience. Porn thrives on lies -- lies about sex, women, marriage and a lot of other things. Let's look at some of those lies and see just how badly they can mess up your life and attitudes.<br />
<br />
<b>Lie #1 - Women are less than human</b><br />
The women in Playboy magazine are called "bunnies," making them cute little animals or "playmates," making them a toy. Penthouse magazine calls them "pets." Porn often refers to women as animals, playthings, or body parts. Some pornography shows only the body or the genitals and doesn't show the face at all. The idea that women are real human beings with thoughts and emotions is played down.<br />
<br />
<b>Lie #2 - Women are a "sport"</b><br />
Some sports magazines have a "swimsuit" issue. This suggests that women are just some kind of sport. Porn views sex as a game and in a game, you have to "win," "conquer," or "score." Men who buy into this view like to talk about "scoring" with women. They start judging their manhood by how many "conquests" they can make. Each woman I "score" with is another trophy on my shelf, another "notch" in my belt to validate my masculinity.<br />
<br />
<b>Lie #3 - Women are property</b><br />
We've all seen the pictures of the slick car with the sexy girl draped over it. The unspoken message, "Buy one, and you get them both." Hard-core porn carries this even further. It displays women like merchandise in a catalog, exposing them as openly as possible for the customer to look at. It's not surprising that many young men think that if they have spent some money taking a girl out, they have a right to have sex with her. Porn tells us that women can be bought.<br />
<br />
<b>Lie #4 - A woman's value depends on the attractiveness of her body</b><br />
Less attractive women are ridiculed in porn. They are called dogs, whales, pigs or worse, simply because they don't fit into porn's criteria of the "perfect" woman. Porn doesn't care about a woman's mind or personality, only her body.<br />
<br />
<b>Lie #5 - Women like rape</b><br />
"When she says no, she means yes" is a typical porn scenario. Women are shown being raped, fighting and kicking at first, and then starting to like it. Porn teaches men to enjoying hurting and abusing women for entertainment.<br />
<br />
<b>Lie #6 - Women should be degraded</b><br />
Porn is often full of hate speech against women. Women are shown being tortured and humiliated in hundreds of sick ways and begging for more. Does this kind of treatment show any respect for women? Any love? Or is it hatred and contempt that porn is promoting toward women?<br />
<br />
<b>Lie #7 - Little kids should have sex</b><br />
One of the biggest sellers in pornography is imitation "child" porn. The women are "made-up" to look like little girls by wearing pony tails, little girl shoes, holding a teddy bear. The message of the pictures and cartoons is that adults having sex with kids is normal. This sets the porn user up to see children in a sexual way.<br />
<br />
<b>Lie #8 - Illegal sex is fun</b><br />
Porn often has illegal or dangerous elements thrown in to make sex more "interesting." It suggests that you can't enjoy sex if it isn't weird, illegal or dangerous.<br />
<br />
<b>Lie #9 - Prostitution is glamorous</b><br />
Porn paints an exciting picture of prostitution. In reality, many of the women portrayed in pornographic material are runaway girls trapped in a life of slavery. Many having been sexually abused. Some of them are infected with incurable sexually transmitted diseases that are highly contagious and often die very young. Many take drugs just to cope.<br />
Bottom Line of Porn Addiction<br />
Pornography makes a profit from the ruined lives of young women and entraps men who will spend lots of time AND money succumbing to their product.<br />
<br />
We might think that the things we see and hear don't affect us. Yet we all admit that good music, good movies and good books add a lot to our lives. They can relax us, educate us, move us or inspire us. Just as uplifting media can benefit us, pornographic images can negatively affect us.<br />
<br />
Images are not always neutral. They can persuade us. Businesses know that if they can get a persuasive image of their product in front of you during a highly emotional moment, it will sink into your subconscious mind. The advertising scientists are so good at what they do, they can predict just how much more of their product you will buy if you see their ad. Sometimes, viewers don't even see the name of the product. Reese's Pieces paid a huge price just to have their candy shown for a few seconds in the movie "ET," and sales of Reese's Pieces skyrocketed. Why? Because the emotions connected with watching that small boy reaching out to the alien were transferred to the visual image of the candy. If a split second view of a product -- even when it's not the center of attention -- can affect people's behavior, imagine the effect of a movie that keeps your attention glued to the screen for an hour and a half with sexually explicit images.<br />
<br />
<b>What are the effects of pornography on a man?</b><br />
What kinds of ideas is porn putting into our heads? If the wrong things keep getting dumped in, your mental environment can get so polluted that your life is going to have problems. One of the most vital parts of mental environment is a healthy idea of who we are sexually. If these ideas are polluted, a critical part of who we are becomes twisted.<br />
<br />
<b>Porn Addiction: The Pull of Pornography</b><br />
Not everyone who sees porn will become addicted. Some will just come away with toxic ideas about women, sex, marriage, and children. However, some will have some kind of emotional opening that allows the addiction to really grab hold. The porn companies don't mind at all if you become completely addicted to their product. It's great for business. Dr. Victor Cline has divided the progress of addiction into several stages; addiction, escalation, desensitization, and acting out. For porn addicts, I've found that there is another stage that comes first -- early exposure. Let's look at these stages:<br />
<br />
EARLY EXPOSURE<br />
Most guys who get addicted to porn start early. They see porn when they are very young and it gets its foot in the door.<br />
<br />
PORN ADDICTION<br />
You keep coming back to porn. It becomes a regular part of your life. You're hooked and can't quit.<br />
<br />
ESCALATION<br />
You start to look for more graphic pornography. You start using porn that disgusted you earlier. Now, it excites you.<br />
<br />
DESENSITIZATION<br />
You start to become numb to the images you see. Even the most graphic porn doesn't excite you any more. You become desperate to feel the same thrill again, but you can't find it.<br />
<br />
ACTING OUT SEXUALLY<br />
This is the point where men make a crucial jump and start acting out the images they have seen. Some move from the paper and plastic images of porn into the real world, with real people, in destructive ways.<br />
<br />
<b>Porn Addiction: Am I Addicted?</b><br />
If you see any of these patterns in your life, you need to put the brakes on right now. Is porn becoming more and more in control of your life? Do you have trouble putting it down? Do you keep going back for more?<br />
<br />
<b>Porn Addiction: What Can I Do?</b><br />
The first thing you've got to do is admit that you struggle with pornography. Believe me, you are not strange or unusual if you do. Millions of men are at various stages in the struggle with porn. It's really not surprising. The porn industry has spent billions of dollars trying to snare you. Is it really shocking that they have succeeded? For some of you there may also be issues in your past, such as abuse or sexual exposure, that makes porn addiction even harder to shake. There is only so much you can do in fighting addiction without help.<br />
<br />
You need someone to help you break this addiction. Overcoming the secrecy is absolutely vital. You probably can't escape addiction without it. That doesn't mean everyone has to know you're struggling. Pick someone you can trust who counsels men who are having problems with addiction -- a pastor, youth group leader or counselor. Someone you can completely trust, feel safe with and has experience in the area of addiction isn't going to be surprised.<br />
<br />
<b>Is There Any Freedom from Porn Addiction?</b><br />
Pornography entraps you with lies. In contrast, God can lead us into truth. Jesus said, "If you hold to my teaching, you are really my disciples. Then you will know the truth, and the truth will set you free."2 Those who heard Jesus say this were offended and countered, "We have never been slaves of anyone, how can you say that we shall be set free?"3 And Jesus explained that people are enslaved to sin, but that He can set you free.4<br />
<br />
Sin not only enslaves us, but it distances us from God. And no one is perfect. No one is righteous in God's eyes. Instead we're told that "We all, like sheep, have gone astray, each of us has turned to his own way."5 We all deserve God's judgment and punishment. Yet God, who is holy and loving, provided a solution for our sin, so that we would not have to be justly condemned. He personally took the punishment for our sin on Himself. Jesus Christ, the Son of God, was tortured and died on the cross for our sin so that we could be forgiven. Three days later Jesus rose from the dead, just as He said He would. And He now offers you a relationship with Him. One of the most amazing statements in the Bible is this one, "If we confess our sin, he is faithful and just to forgive us our sin and to cleanse us from all unrighteousness."6<br />
<br />
<b>The Most Important Relationship</b><br />
In your search for intimacy and love, pornography is an empty substitute for real love. We have been created by God to have our intimacy needs met most deeply by God Himself. "For God so loved the world that he gave his only Son, that whoever believes in him should not perish, but have everlasting life."7 In contrast to the darkness and destruction that pornography can bring to people's lives, Jesus said, "I came that they might have life, and have it more abundantly."8 God offers you his forgiveness through a relationship with Him. Do you want to ask Him to forgive you and come into your life? You can tell Him right now. If you need help putting this into words, here is prayer that might help:<br />
<br />
"Lord Jesus, I am aware of my sin, and I know that you are also. I ask you to forgive me and cleanse me. Thank you for dying on the cross for my sins. I ask you to come into my life right now and begin to work in my life. Direct my life as you see fit. Thank you for your forgiveness and for coming into my life right now."<br />
<br />
This article is taken from this website.<br />
<a href="http://www.everystudent.com/wires/toxic.html">http://www.everystudent.com/wires/toxic.html</a><br />
</div>Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com0tag:blogger.com,1999:blog-8582676765312174249.post-78135025760681968362012-05-27T07:19:00.000-07:002012-05-27T07:19:04.313-07:00ජනතා අපේක්ෂා සහ සරත් ෆොන්සේකා ගේ නිදහස<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
දිනෙන් දිනම ජිවන බරින් තෙරපෙමින් සිටි ජනතාවට තමන් මුහුණ දෙමින් සිටින
ප්රශ්න අමතක කරවීමට මේ ආණ්ඩුව විටින් විට නොයෙකුත් ප්රයෝග ක්රියාත්මක
කරනු දැක ගත හැකි විය. මෙම ක්රියාදාමයේ නවතම විකාශය වන්නේ සරත් ෆොන්සේකා
මහතා නිදහස් කිරීමය.<br />
<br />
එතුමා ගේ නිදහස් වීම මගින් ආණ්ඩුව එක ගලෙන් කුරුල්ලන්
දෙදෙනෙකු මරා ගැනීමට සමත් වී ඇති බවක් පෙනෙන්නට ඇත. ඉන් පළමු කරුණ ඉහත
විස්තර කල කරුණය. දෙවැන්න නම් දිනෙන් දින ඉහල යමින් තිබු ෆොන්සේකා මහතා ගේ
ජනප්රියත්වය එතුමා හරහා ම බින්දුවට බැස්සිමය. සිර ගෙදරින් නිදහස් වූ
ෆොන්සේකා මහතා ගෙන් ජනතාව අපේක්ෂා කලේ යුධ අපරාධ හෝ හමුදා බැරැක්ක ඉවත්
කිරීම ගැන ප්රකාශ නිකුත් කිරීම නොවන බව එතුමා තේරුම් ගෙන නැත.ඇත්ත නම්
එතුමාට ඒවා තේරුම් ගැනීමට අවශ්ය තාවයක් නැති බවය.<br />
<br />
මන්ද යත් එතුමා තමන්
තනිවම යුද්ධය දිනවූ බව ප්රකාශ කිරීමට නිතර උත්සුක වීමෙන් පෙනී යන්නේ එතුමා
තම පෞද්ගලික දේශපාලන උවමනාවන් වෙනුවෙන් පෙනී සිටිනව මිස එතුමාට ජනතාව ගැන
කැක්කුමක් නැති බවය. සරත් ෆොන්සේකා මහතා ගේ නිදහස් වීම පිලිබඳ වැඩිම
බලාපොරොත්තු තබාගෙන සිටියේ එතුමාට චන්දය දුන් මෙරට යමක් කමක් තේරුම් ගත
හැකි බුද්ධිමත් ජනතාව බව අප ට පෙනෙන්නට තිබුණි. නමුත් එතුමා නිදහස් වී සති
දෙකක් ගතවෙන්නටත් පළමුව එතුමා ගේ ප්රකාශ මගින් අපට පෙනී යන්නේ එතුමා සහ
මෙරට පාලක පන්තිය අතර වෙනසක් නැති බවය. එසේ නම් ජනතාව නැවතත් අපේක්ෂා
භංගත්වයට පත්වී ඇත. </div>Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com0tag:blogger.com,1999:blog-8582676765312174249.post-36647236302933939822012-05-22T20:58:00.000-07:002012-05-22T20:58:04.338-07:00Difference between TCP and UDP internet protocols<div dir="ltr" style="text-align: left;" trbidi="on">
<table border="1" cellpadding="10">
<tbody>
<tr>
<td><div style="text-align: center;">
<b>TCP </b></div>
</td>
<td><div style="text-align: center;">
<b>UDP </b></div>
</td>
</tr>
<tr>
<td><div style="text-align: justify;">
<b>Reliability</b>: TCP is connection-oriented protocol. When a file or message send it will get delivered unless connections fails. If connection lost, the server will request the lost part. There is no corruption while transferring a message.</div>
</td>
<td><div style="text-align: justify;">
<b>Reliability</b>: UDP is connectionless protocol. When you a send a data or message, you don't know if it'll get there, it could get lost on the way. There may be corruption while transferring a message.</div>
</td>
</tr>
<tr>
<td><div style="text-align: justify;">
<b>Ordered</b>: If you send two messages along a connection, one after the other, you know the first message will get there first. You don't have to worry about data arriving in the wrong order.</div>
</td>
<td><div style="text-align: justify;">
<b>Ordered</b>: If you send two messages out, you don't know what order they'll arrive in i.e. no ordered</div>
</td>
</tr>
<tr>
<td><div style="text-align: justify;">
<b>Heavyweight</b>: - when the low level parts of the TCP "stream" arrive in the wrong order, resend requests have to be sent, and all the out of sequence parts have to be put back together, so requires a bit of work to piece together.</div>
</td>
<td><div style="text-align: justify;">
<b>Lightweight</b>: No ordering of messages, no tracking connections, etc. It's just fire and forget! This means it's a lot quicker, and the network card / OS have to do very little work to translate the data back from the packets.</div>
</td>
</tr>
<tr>
<td><div style="text-align: justify;">
<b>Streaming</b>: Data is read as a "stream," with nothing distinguishing where one packet ends and another begins. There may be multiple packets per read call.</div>
</td>
<td><div style="text-align: justify;">
<b>Datagrams</b>: Packets are sent individually and are guaranteed to be whole if they arrive. One packet per one read call.</div>
</td>
</tr>
<tr>
<td><div style="text-align: justify;">
<b>Examples</b>: World Wide Web (Apache TCP port 80), e-mail (SMTP TCP port 25 Postfix MTA), File Transfer Protocol (FTP port 21) and Secure Shell (OpenSSH port 22) etc.</div>
</td>
<td><div style="text-align: justify;">
<b>Examples</b>: Domain Name System (DNS UDP port 53), streaming media applications such as IPTV or movies, Voice over IP (VoIP), Trivial File Transfer Protocol (TFTP) and online multiplayer games etc</div>
</td>
</tr>
</tbody></table>
</div>Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com0tag:blogger.com,1999:blog-8582676765312174249.post-78541473301565477402012-05-22T04:27:00.004-07:002012-05-22T04:27:47.103-07:004 steps for dropping into peaceful meditation – at your desk<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Whether you have a strong practice or are just starting out, here are some building blocks for creating mindfulness at work. A note of caution: If you receive lots of interruptions, consider closing your door, putting up a sign, or going someplace where you can be alone for five to 10 minutes.<br />
<br />
<h2 style="text-align: left;">
<b>1. Perk up your posture.</b></h2>
Sitting at desks, we spend most of the day slouching forward. Do your spine a favor and sit up tall in the middle of the chair, without the chair back's support. Place both feet flat on the ground. Rest your palms on your thighs and gently drop your shoulders away from your ears and your shoulder blades together on your back. Tuck your chin down just slightly and pull your belly in and up. Take a nice, deep breath and close your eyes.<br />
<br />
<h2 style="text-align: left;">
<b>2. Tune in to your breath.</b></h2>
Spend a minute or so simply breathing. Follow the breath as it moves up and down the spine, and be aware that the breath is not just in the front body – it's a 360-degree effort. Notice how the side bodies expand and how the back body responds. A great technique that Burdulis shared is noticing the temperature of the breath above the upper lip and how it changes on the inhale and exhale.<br />
<br />
<h2 style="text-align: left;">
<b>3. Relax the whole body.</b></h2>
As you continue to breathe slow, deep breaths, begin to relax your body. I like to start either with the feet and work to the crown of the head, or vice versa. Bring your awareness to each portion of your body and mentally give it permission to relax. Don't skip your jaw, your eyes and your forehead, common tension-holders in addition to our shoulders and hips.<br />
<br />
<h2 style="text-align: left;">
<b>4. Truly listen – first, without and then within.</b></h2>
Now that you're relaxed, bring your awareness to what's outside of you. Listen as if through earmuffs, allowing the sounds to exist but not becoming attached to them. Now, shift your focus completely internal, listening to the sounds within your body such as your breath and heart beat. If you can't hear yourself, simply strive to hear. Sit in this way for five to 10 minutes. As thoughts arise, simply bring your focus back to the breath.<br />
<br />
You might find it hard at first to concentrate or detach yourself from the day's stress, but don't judge or second-guess yourself. There is no right way to meditate, and there is no failure. Any quiet moment of reflection will do, if only a nanosecond. As Burdulis said: "I don't know anybody who won't benefit from this."<br />
<br />
The key is to keep at it. Schedule yourself mindfulness appointments and stick to them. The more you practice, the "easier" it will be to drop inward and find your center amidst a busy workday.<br />
</div>Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com0tag:blogger.com,1999:blog-8582676765312174249.post-50585780515273712022012-05-11T22:34:00.002-07:002012-05-12T00:48:52.397-07:00Abraham Lincoln’s letter to his son’s Head Master<div dir="ltr" style="text-align: left;" trbidi="on">
<u><b>Abraham Lincoln’s letter to his son’s Head Master</b></u><br />
<br />
Respected Teacher,<br />
<br />
<br />
<br />
<ul style="text-align: left;">
<li>My son will have to learn I know that all men are not just, all men are not true. But teach him also that for ever scoundrel there is a hero; that for every selfish politician, there is a dedicated leader. Teach him that for every enemy there is a friend.</li>
</ul>
<div>
<br /></div>
<ul style="text-align: left;">
<li>It will take time, I know; but teach him, if you can, that a dollar earned is far more valuable than five found.</li>
</ul>
<div>
<br /></div>
<ul style="text-align: left;">
<li>Teach him to learn to lose and also to enjoy winning.</li>
</ul>
<div>
<br /></div>
<ul style="text-align: left;">
<li>Steer him away from envy, if you can.</li>
</ul>
<div>
<br /></div>
<ul style="text-align: left;">
<li>Teach him the secret of quite laughter. Let him learn early that the bullies are the easiest to tick.</li>
</ul>
<div>
<br /></div>
<ul style="text-align: left;">
<li>Teach him, if you can, the wonder of books.. but also give him quiet time to ponder over the eternal mystery of birds in the sky, bees in the sun, and flowers on a green hill –side.</li>
</ul>
<div>
<br /></div>
<ul style="text-align: left;">
<li>In school teach him it is far more honourable to fail than to cheat.</li>
</ul>
<div>
<br /></div>
<ul style="text-align: left;">
<li>Teach him to have faith in his own ideas, even if every one tells him they are wrong.</li>
</ul>
<div>
<br /></div>
<ul style="text-align: left;">
<li>Teach him to be gentle with gentle people and tough with the tough.</li>
</ul>
<div>
<br /></div>
<ul style="text-align: left;">
<li>Try to give my son the strength not to follow the crowd when every one is getting on the bandwagon.</li>
</ul>
<div>
<br /></div>
<ul style="text-align: left;">
<li>Teach him to listen to all men but teach him also to filter all he hears on a screen of truth and take only the good that comes through.</li>
</ul>
<div>
<br /></div>
<ul style="text-align: left;">
<li>Teach him, if you can, how to laugh when he is sad. Teach him there is no shame in tears. Teach him to scoff at cynics and to beware of too much sweetness.</li>
</ul>
<div>
<br /></div>
<ul style="text-align: left;">
<li>Teach him to sell his brawn and brain to the highest bidders; but never to put a price tag on his heart and soul.</li>
</ul>
<div>
<br /></div>
<ul style="text-align: left;">
<li>Teach him to close his ears to a howling mob… and to stand and fight if he thinks he’s right.</li>
</ul>
<div>
<br /></div>
<ul style="text-align: left;">
<li>Treat him gently; but do not cuddle him because only the test of fire makes fine steel.</li>
</ul>
<div>
<br /></div>
<ul style="text-align: left;">
<li>Let him have the courage to be impatient, let him have the patience to be brave. Teach him always to have sublime faith in himself because then he will always have sublime faith in mankind.</li>
</ul>
<br />
<br />
This is a big order; but see what you can do. He is such a fine little fellow, my son.<br />
<br />
<br />
<b><i>Abraham Lincoln.</i></b></div>Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com0tag:blogger.com,1999:blog-8582676765312174249.post-15577884396451987682012-04-28T22:36:00.000-07:002012-04-28T22:36:13.466-07:00Installing joomla on ubuntu in 15 minutes<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
This is a simple and easy to use guide to install joomla without any permission issues on ubuntu. You can successfully install joomla within 15 minutes.<br />
<br />
Let's start the clock and start working.<br />
<br />
First you need to have a web server on your local machine. Xampp is the most popular open source web server which installs all the required components for your web server.<br />
Download <a href="http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/" rel="nofollow">XAMPP</a> for Linux to your your Home folder.<br />
<br />
<h3>
Install XAMPP</h3>
<br />
Open Terminal and enter:<br />
<div dir="ltr">
<div>
<br />
<pre><em><strong>sudo tar xvfz xampp-linux-1.7.7.tar.gz -C /opt</strong></em></pre>
</div>
<br /></div>
<br />
(replace <em>xampp-linux-1.7.7.tar.gz</em> with the version of XAMPP you downloaded).<br />
<br />
This installs ... Apache2, mysql and php5 as well as an ftp server.<br />
<br />
Start the xampp server with this command.<br />
<div dir="ltr">
<div>
<br />
<pre><em><strong>sudo /opt/lampp/lampp start</strong></em></pre>
</div>
</div>
<br />
<h3>
Test your XAMPP localhost server</h3>
<br />
Open your Browser and point it to<br />
<a href="http://localhost/" rel="nofollow">http://localhost</a><br />
The index.php will redirect to<br />
<a href="http://localhost/xampp" rel="nofollow">http://localhost/xampp</a><br />
There you will find instructions on how to change default usernames/passwords. On a PC that does not server files to the Internet or LAN then changing the defaults is personal choice.<br />
<br />
<h3>
Get Joomla</h3>
<br />
Download the latest Joomla instalation zip <a href="http://www.joomla.org/download.html" rel="nofollow">[1]</a><br />
<br />
Unzip to your hard drive<br />
<br />
Connect to localhost with an FTP client. You can use FileZilla client as an open source ftp client. you can download it from here<br />
<br />
<a href="http://filezilla-project.org/download.php">http://filezilla-project.org/download.php</a><br />
<br />
once you installed filezilla, start filezilla and connect to your localhost server with following information.<br />
<br />
<em><strong>host: localhost</strong></em><br />
<br />
<em><strong>username: nobody</strong></em><br />
<br />
<em><strong>password: lampp</strong></em><br />
<br />
Create a folder for your Joomla on the localhost server<br />
<br />
FTP the unpacked Joomla installation files to the newly created Joomla folder. You can drag and drop files using filezilla client.<br />
<br />
<strong>Important:</strong><span style="white-space: pre;"> </span><br />
<ul>
<li>The XAMPP installation sets the correct Ownership of the files and permissions.</li>
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<li>Using the <strong>CHOWN command</strong> will <strong>cause Ownership problems with xampp</strong>.</li>
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<li><strong>Using nautilus</strong> to manipulate folders/files on localhost will <strong>cause Ownership problems with xampp</strong>.</li>
<br />
</ul>
<br />
<h3>
Configure Joomla</h3>
<br />
In your Browser type<br />
<a href="http://localhost/yournewjoomlafolder" rel="nofollow">http://localhost/yournewjoomlafolder</a><br />
In the first Joomla installation screen if error reporting is shown as on then:<br />
<br />
In your Terminal type<br />
<div dir="ltr">
<div>
<br />
<pre><em><strong>sudo gedit /opt/lampp/etc/php.ini</strong></em></pre>
</div>
<br /></div>
<br />
In the <tt>php.ini</tt> file, locate<br />
<div dir="ltr">
<div>
<br />
<pre><strong>error_reporting =</strong></pre>
</div>
</div>
<br />
And change the value to<br />
<div dir="ltr">
<div>
<br />
<pre><strong>error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED</strong></pre>
</div>
</div>
<br />
Also locate<br />
<div dir="ltr">
<div>
<br />
<pre><strong>display_errors = On</strong></pre>
<pre><strong>
</strong></pre>
</div>
</div>
And change the value to<br />
<div dir="ltr">
<div>
<br />
<pre><strong>display_errors = Off</strong></pre>
</div>
<br /></div>
<br />
Stop then restart xampp for the new settings to take effect<br />
<br />
FTP layer is NOT needed<br />
<br />
Then go to your phpmyadmin database page and create a database for the joomla installation. You can do this by going to your localhost folder and then click on the phpmyadmin link and then it will take you to the phpmyadmin home page.<br />
<br />
<strong>create a database named db_joomla</strong> (or whatever name you like)<br />
<br />
once the database is created, go to the phpmyadmin home page and click on previleges tab and create a new user and asign all the previleges from the option.<br />
<br />
<strong>username: user_joomla</strong><br />
<br />
<strong>password: joomla123</strong> (Best practise is to use the generate password option).<br />
<br />
OK. Now you have a separate database for your joomla installation.<br />
<br />
<strong>Database info</strong><br />
<br />
<strong>Host</strong>: <code>localhost</code><br />
<br />
<strong>Database name</strong>: <code>db_joomla</code><br />
<dl><dd><strong>Database user</strong>: <code>user_joomla</code></dd></dl>
<dl><dd>Password for <strong>Database user</strong>: <span style="font-family: monospace;">joomla123</span></dd></dl>
Administrator password is your choice.<br />
<br />
Installing Sample Data is recommended for the novice user.<br />
<br />
After installation delete the installation directory and point your Browser to:<br />
<a href="http://localhost/yournewjoomlafolder" rel="nofollow">http://localhost/yournewjoomlafolder</a><br />
or<br />
<a href="http://localhost/yournewjoomlafolder/administrator" rel="nofollow">http://localhost/yournewjoomlafolder/administrator</a><br />
That's it. Now you have installed joomla on your ubuntu machine within 15 minutes.<br />
Cheers !!!!!!!!!!!<br />
<br />
<div>
</div>
<br /></div>Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com1tag:blogger.com,1999:blog-8582676765312174249.post-30388560648284434392012-04-26T00:29:00.002-07:002012-04-26T00:29:49.143-07:00Find File existence in windows in C++<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Windows doesn't have a built-in function that checks if a file with a given name exists. It can be trivially written using GetFileAttributes or FindFirstFile APIs. Version below uses GetFileAttributes.<br />
<br />
/* Return TRUE if file 'fileName' exists */<br />
bool FileExists(const TCHAR *fileName)<br />
{<br />
DWORD fileAttr;<br />
<br />
fileAttr = GetFileAttributes(fileName);<br />
if (0xFFFFFFFF == fileAttr)<br />
return false;<br />
return true;<br />
}<br />
</div>Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com0tag:blogger.com,1999:blog-8582676765312174249.post-67079231939586177152012-04-25T10:26:00.001-07:002012-04-25T10:26:53.650-07:00change mysql port on xampp<div dir="ltr" style="text-align: left;" trbidi="on">
Nice to be back with another solution
for a common (not so) problem which google takes some time to find a
proper solution. As mentioned in the title of the post, this thing
happens when i was installing xampp server on my office computer.
After successfully installing the xampp server, i was trying to start
the mysql service using the control panel. But when i start the mysql
service, it was trying to start but finally it was failing to start
on port 3306. It gave some error about port 3306.<br />
<br />
<div style="margin-bottom: 0in;">
After few hours of google search i
realized that the root cause for this issue was that port 3306 is
using by another mysql service which was installed from another
application. Then i had to change the port number to another one to
start the mysql service on xampp server.</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
To change the port successfully, i had
to change the port number in following files in the mentioned manner.</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
You can change the port number to 3308
from 3306 in <strong>\xampp\mysql\bin\my.ini</strong><em> </em><em>file
in a couple of places.</em></div>
<div style="margin-bottom: 0in;">
<em><br /></em></div>
<div style="margin-bottom: 0in;">
<em>There is also a couple of default
MySQL port settings in the </em><strong>\xampp\php\php.ini</strong> file
that would also need changing.</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
Save the files and restart Apache and
MySQL to test.</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
Cheers !!!!!!!!!</div>
</div>Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com0tag:blogger.com,1999:blog-8582676765312174249.post-52126401351337607482012-04-22T01:57:00.000-07:002012-04-22T01:57:42.983-07:00How to change the root password in Ubuntu<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div style="margin-bottom: 0in;">
As default Ubuntu has no password set
for the root user, To gain root access you have to type in your own
user password. This is the password you set for the first user while
installing Ubuntu.</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
To manually set a password for the root
user, type in the following in the shell:</div>
<div style="margin-bottom: 0in;">
<code class="western"><b><i>sudo passwd</i></b></code></div>
<div style="margin-bottom: 0in;">
<code class="western"><br /></code></div>
<div style="margin-bottom: 0in;">
After that you are asked to type in the
new root password twice. Finally, your root user has its own
password.</div>
</div>Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com0tag:blogger.com,1999:blog-8582676765312174249.post-78236687229522308652012-04-12T23:05:00.000-07:002012-04-13T02:33:29.855-07:00How to pin Eclipse to the ubuntu 11.04 Unity launcher<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: 'Nimbus Roman No9 L', serif;">If
you are developing in ubuntu with eclipse, you may want to add
your eclipse shortcut to the ubuntu unity launcher. But if you open
the eclipse, you may see that the eclipse is in the launcher, but the
icon is not displaying and only a question mark icon appears. This is
a simple solution to add ubuntu icon to the launcher menu. You can
use the same procedure to add any other program to your launcher
menu.</span><br />
<ol>
<li><div style="margin-bottom: 0in;">
<span style="font-family: 'Nimbus Roman No9 L', serif;">Go
to the ubuntu desktop and right click on it.</span></div>
</li>
<li><div style="margin-bottom: 0in;">
<span style="font-family: 'Nimbus Roman No9 L', serif;">Select,
"Create Launcher.." option.</span></div>
</li>
</ol>
<div style="margin-bottom: 0in;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcsVziy4lJZ8nmdoa5NXjSX-ePTbaIgEGKNuxoUK4bK520A3GHgDvjsmOo15s3QPwqA8bzxo1WyQ1DltxVtYDLOriuHfbQviOmgLVwXOLrrtwfw02ahlFYps0mkbjTfaITgJ7Kwcs5KB3-/s1600/Selection_004.png"><img align="BOTTOM" border="0" height="168" name="graphics1" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcsVziy4lJZ8nmdoa5NXjSX-ePTbaIgEGKNuxoUK4bK520A3GHgDvjsmOo15s3QPwqA8bzxo1WyQ1DltxVtYDLOriuHfbQviOmgLVwXOLrrtwfw02ahlFYps0mkbjTfaITgJ7Kwcs5KB3-/s320/Selection_004.png" width="320" /></a></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<span style="font-family: 'Nimbus Roman No9 L', serif;">3.
Fill the required fields as shown in the below image.</span></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE1YO9d4YN-GpuVAY20ei5hOw0U4OgZxJ-LTWJoGB0i6agEktD4stMnHXZCnlPFyHcm8VHmmMVrnXe2wwdVfAcwzsYOjHqV9hpybLSIAoaX-atkqqxZzsL9bzBC2Xxut3mMF3JneyR9Vwj/s1600/Selection_005.png"><img align="BOTTOM" border="0" height="168" name="graphics2" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE1YO9d4YN-GpuVAY20ei5hOw0U4OgZxJ-LTWJoGB0i6agEktD4stMnHXZCnlPFyHcm8VHmmMVrnXe2wwdVfAcwzsYOjHqV9hpybLSIAoaX-atkqqxZzsL9bzBC2Xxut3mMF3JneyR9Vwj/s320/Selection_005.png" width="320" /></a></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<span style="font-family: 'Nimbus Roman No9 L', serif;">In
the command field above, select the eclipse file inside the eclipse
folder in your file system.</span></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<span style="font-family: 'Nimbus Roman No9 L', serif;">4.
Select the icon by clicking the icon box in the top left hand corner
and go to the eclipse folder in your file system and choose the
eclipse icon "eclipse.xpm" and it will be display as below
after the correct selection.</span></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7YUyEObdfZGOXR-TtVUc75KqZmwjt8tivFJvT6Cq_T7qcFUR3qTyGdncBYg-qZLrxQlikAwPr752HXHDvO3BFKJoA1cITVNmTkuZlLZA71-64Abp-pBDrzrrrTZ-oJBFq7NNjE2BRrEda/s1600/Selection_006.png"><img align="BOTTOM" border="0" height="170" name="graphics3" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7YUyEObdfZGOXR-TtVUc75KqZmwjt8tivFJvT6Cq_T7qcFUR3qTyGdncBYg-qZLrxQlikAwPr752HXHDvO3BFKJoA1cITVNmTkuZlLZA71-64Abp-pBDrzrrrTZ-oJBFq7NNjE2BRrEda/s320/Selection_006.png" width="320" /></a></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<span style="font-family: 'Nimbus Roman No9 L', serif;">5.
Now you can see eclipse icon on the desktop. Double click the icon
and start eclipse.<br /> 6. Now the eclipse
icon can be seen in your launcher since it is started. Right click
the eclipse icon on the launcher and select the option "Keep in
Launcher ..".<br /> 7. Exit the eclipse
and now you can see that eclipse is displayed in the launcher and the
icon is properly displayed</span></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<span style="font-family: 'Nimbus Roman No9 L', serif;">cheers
!!!!!!!!!!</span></div>
<div style="margin-bottom: 0in;">
<br /></div>
</div>Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com1tag:blogger.com,1999:blog-8582676765312174249.post-45597260271211703142012-04-12T20:49:00.000-07:002012-04-12T20:49:32.524-07:00Android testing with Monkey tool - a comprehensive guide<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div style="margin-bottom: 0in;">
If you are in the android scene for
some time, you may have heard about this tool. Monkey tool is a
simple but very important tool to test android applications for their
stability. It is a command-line tool that you can run on any emulator
instance or on a device. Basically it sends out random key events and
clicks to the device or emulator. If you have done testing on WM
devices, you may have used a similar testing tool called hopper. In
this tutorial i am hoping to guide you through the basic operations
you can do with monkey tool and also some more advance and specific
tasks.</div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
The Monkey includes a number of
options, but they break down into four primary categories:</div>
<ul>
<li><div style="margin-bottom: 0in;">
Basic configuration options - such
as setting the number of events to attempt.</div>
</li>
<li><div style="margin-bottom: 0in;">
Operational constraints - such as
restricting the test to a single package.</div>
</li>
<li><div style="margin-bottom: 0in;">
Event types and frequencies - such
as key events, click events and time interval between events.</div>
</li>
<li><div style="margin-bottom: 0in;">
Debugging options.</div>
</li>
</ul>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
When the Monkey runs, it generates
events and sends them to the system. It also watches the system under
test and looks for three conditions, which it treats specially:</div>
<div style="margin-bottom: 0in;">
<br />
</div>
<ul>
<li><div style="margin-bottom: 0in;">
If you have constrained the Monkey
to run in one or more specific packages, it watches for attempts to
navigate to any other packages, and blocks them.</div>
</li>
<li><div style="margin-bottom: 0in;">
If your application crashes or
receives any sort of unhandled exception, the Monkey will stop and
report the error.</div>
</li>
<li><div style="margin-bottom: 0in;">
If your application generates an
application not responding(ANR) error, the Monkey will stop and
report the error.</div>
</li>
</ul>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
Depending on the verbosity level you
have selected, you will also see reports on the progress of the
Monkey and the events being generated.</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
That's enough .... where is the actual test? ....</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<b>How to run monkey?</b></div>
<div style="margin-bottom: 0in;">
<b><br /></b></div>
<div style="margin-bottom: 0in;">
As mentioned above, monkey is a command line tool. In a command line or in a linux terminal window, you can run your first monkey test with the following command.</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<b><i>$>adb shell monkey -v 100</i></b></div>
<div style="margin-bottom: 0in;">
<b><br /></b></div>
<div style="margin-bottom: 0in;">
<b>adb</b> - connect to the<b> </b>device</div>
<div style="margin-bottom: 0in;">
<b>shell</b> - start the terminal (command line) on the device/emulator</div>
<div style="margin-bottom: 0in;">
<b>monkey</b> - start the monkey tool</div>
<div style="margin-bottom: 0in;">
<b>-v</b> - verbose mode</div>
<div style="margin-bottom: 0in;">
<b>100</b> - number of random events to be sent</div>
<div style="margin-bottom: 0in;">
<b><br /></b></div>
<div style="margin-bottom: 0in;">
You will see some messages displaying on your command line window and if you are fortunate you may experience that monkey tool exits before it completes 100 events due to some exception or ANR scenario. But that will depend on the random events it sends and the applications you have. </div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<b>How to run monkey on my own application?</b></div>
<div style="margin-bottom: 0in;">
<b><br /></b></div>
<div style="margin-bottom: 0in;">
OK.. Now you know how to run monkey and what are things it can do up to some level. Let's run this test entirely on your own application. Let's you have installed the package <b>"</b><i>com.marakana.android.yamba</i>" and you want to test this application against random clicks.</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<i><b>$></b>adb shell monkey <b>-p com.marakana.android.yamba</b> -v 500</i></div>
<div style="margin-bottom: 0in;">
<b><br /></b></div>
<div style="margin-bottom: 0in;">
<b>-p - </b>This will specify the application package you need to test. </div>
<div style="margin-bottom: 0in;">
<b><br /></b></div>
<div style="margin-bottom: 0in;">
<b>How to run the same event sequence again?</b></div>
<div style="margin-bottom: 0in;">
<b><br /></b></div>
<div style="margin-bottom: 0in;">
Sometimes you may want to check whether a particular failure always happens or randomly happens in an application. In a such scenario, you may need to run the exact same event sequence with monkey tool. You can achieve that goal like this.</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
Run your first test with</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
<i><b>$></b>adb shell monkey -p com.marakana.android.yamba<b> -s 999</b> -v 500</i></div>
<div style="margin-bottom: 0in;">
<b><br /></b></div>
<div style="margin-bottom: 0in;">
Go back to the same status in the device and run the above command again</div>
<div style="margin-bottom: 0in;">
<b><br /></b></div>
<div style="margin-bottom: 0in;">
<i><b>$></b>adb shell monkey -p com.marakana.android.yamba<b> -s 999</b> -v 500</i></div>
<div style="margin-bottom: 0in;">
<i><br /></i></div>
<div style="margin-bottom: 0in;">
<b>-s</b> - This will give the random seed value to generate the random events.</div>
<div style="margin-bottom: 0in;">
<b><br /></b></div>
<div style="margin-bottom: 0in;">
<b>Note: It is essential to start both the tests with the same status in the device. Otherwise It will not give you the same result even though it sends the same events.</b></div>
<div style="margin-bottom: 0in;">
<b><br /></b></div>
<div style="margin-bottom: 0in;">
<b>This tool has many more features and you can learn about these features from the android developer guide here <a href="http://developer.android.com/guide/developing/tools/monkey.html" target="_blank">http://developer.android.com/guide/developing/tools/monkey.html</a></b></div>
<div style="margin-bottom: 0in;">
<b><br /></b></div>
<div style="margin-bottom: 0in;">
<b>Cheers !!!!!!!</b></div>
</div>Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com0tag:blogger.com,1999:blog-8582676765312174249.post-11749501401449678172012-04-11T22:28:00.000-07:002012-04-11T22:28:03.640-07:00ජීවිතය සහ දහම<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 class="post-title entry-title">
</h3>
<br />
<div class="post-header">
<div class="post-header-line-1">
</div>
</div>
<br />
<div class="post-body entry-content" id="post-body-6447984421235133138">
<div dir="ltr" style="text-align: left;" trbidi="on">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; line-height: 28px;"></span><br />
<div>
හරයෙන් තොර දැවයෙන් කවර ප්රයෝජනද? ගුණයෙන් තොර ඖෂධයෙන් කවර ප්රයෝජනද? රසයෙන්
හා පෝෂණයෙන් තොර ආහාරය කුමකටද? එමෙන්ම ධර්මයෙන් තොර ජිවිතයෙන් ඇති ඵලය කවරේද?</div>
<div>
ධර්මය සැබවින්ම ජීවිතය අලංකාර කරයි. ශක්තිමත් කරයි. වටිනා බවට පමුණුවයි.
ධර්මයෙන් වෙන්ව කවර සැපතක්ද? කවර ප්රීතියක්ද? ධර්මය නම් ජිවිතයේ හරයයි. ජිවිතයේ
ඵලයයි. ධර්මය අමතක කොට, ධර්මය නොසලකා යමෙක් ජිවත් වෙයි නම් ඔහු සැමවිටම වටිනා
මනුෂ්ය දිවිය නිකරුනේ විනාශ කර ගනියි. </div>
<div>
ඔබ කියන වචන, කරන වැඩ, සිතන සිතුවිලි සියල්ලම ධර්මානුකුල විය යුතුය. දිනපතා
ඔබගේ ජීවිතය ධර්මයට අනුව ගමන් කරන්නේදැයි සිතා බැලිය යුතුය. එසේ නොවෙයි නම් අද සිටම
ධර්මානුකුලව ජීවිතය ගෙන යාමට උත්සාහ කල යුතුය. එසේ නොකළහොත් ඔබගේ ජිවිතයෙන් නියම
ප්රයෝජනය ඔබට ලබා ගත නොහැකි වනු ඇත. </div>
</div>
</div>
</div>Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com0tag:blogger.com,1999:blog-8582676765312174249.post-38892442099529766122012-04-10T04:02:00.000-07:002012-04-11T22:32:43.861-07:00monkeyrunner tutorial - running tests on multiple devices with monkeyrunner<div dir="ltr" style="text-align: left;" trbidi="on">
OK.. Great ... Now you know what is monkeyrunner and how to run tests
with monkeyrunner. Let's discuss about one important feature of the
monkeyrunner tool. <b><i>Running tests on multiple devices with a single python script</i></b>.<br />
<br />
It looks like a big ask. But that is as simple as drinking a Sri Lankan Tea ...<br />
By following my previous posts<br />
<br />
<a data-mce-href="http://chanakaudaya.wordpress.com/2012/03/31/android-testing-with-monkeyrunner-a-monkeyrunner-tutorial/" href="http://chanakaudaya.wordpress.com/2012/03/31/android-testing-with-monkeyrunner-a-monkeyrunner-tutorial/" target="_blank" title="Part I">http://chanakaudaya.wordpress.com/2012/03/31/android-testing-with-monkeyrunner-a-monkeyrunner-tutorial/</a><br />
<a data-mce-href="http://chanakaudaya.wordpress.com/2012/03/31/android-testing-with-monkeyrunner-a-monkeyrunner-tutorial-part-ii/" href="http://chanakaudaya.wordpress.com/2012/03/31/android-testing-with-monkeyrunner-a-monkeyrunner-tutorial-part-ii/" target="_blank" title="Part II">http://chanakaudaya.wordpress.com/2012/03/31/android-testing-with-monkeyrunner-a-monkeyrunner-tutorial-part-ii/</a><br />
<br />
now you are running some scripts with monkeyrunner. Let's add some little bit of information to that script.<br />
<br />
#First you need to import the modules which you are using in this script<br />
<div align="LEFT">
<i><b> from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice</b></i><br />
<i><b><br /></b></i></div>
<div align="LEFT">
</div>
<div align="LEFT">
#Then you have to connect to the device which you are running your test</div>
<div align="LEFT">
<i><b> device = MonkeyRunner.waitForConnection()</b></i><br />
<i><b><br /></b></i></div>
<div align="LEFT">
</div>
<div align="LEFT">
Wait here !!!!!!<br />
<br />
<br /></div>
<div align="LEFT">
</div>
<div align="LEFT">
In
this script you are waiting for a connection to a running android
device or emulator implicitly. Rather than doing like that, you can
explicitly tell what emulator or device you may need to connect. You can
do that like this.<br />
<br /></div>
<div align="LEFT">
</div>
<div align="LEFT">
<i><b># Timeout value for waiting for connection 10 seconds<br />timeout = 10000 </b></i><br />
<br />
<i><b># Connects to the current device, returning a MonkeyDevice object<br />device = MonkeyRunner.waitForConnection(timeout, "emulator-5554")</b></i><br />
<i><b><br /></b></i></div>
<div align="LEFT">
</div>
<div align="LEFT">
here you specify which device you need to connect by the id of the emulator or device.</div>
<div align="LEFT">
If you want to connect to another device within the same script, you can do like this<br />
<br /></div>
<div align="LEFT">
<i><b>device2 = MonkeyRunner.waitForConnection(timeout, "emulator-5556")</b></i><br />
<i><b><br /></b></i></div>
<div align="LEFT">
</div>
<div align="LEFT">
Then you can do all the operations you have done with <b><i>device</i></b> parameter to <i><b>device2</b></i> parameter.</div>
<div align="LEFT">
</div>
<div align="LEFT">
With
this kind of scripting, you can run commands on as many devices you
have with you. I believe in sample scripts in tutorials. Here is a
sample script in action.<br />
<br />
<br /></div>
<div align="LEFT">
</div>
<div align="LEFT">
<span style="font-size: x-small;"># Imports the monkeyrunner modules used by this program<br />from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice</span><span style="font-size: x-small;"># Timeout value for waiting for connection<br />timeout = 10000</span><br />
<span style="font-size: x-small;"># Connects to the current device, returning a MonkeyDevice object<br />device = MonkeyRunner.waitForConnection(timeout, "emulator-5554")</span><br />
<span style="font-size: x-small;"># Installs the Android package. Notice that this method returns a boolean, so <br /># you can test to see if the installation worked.<br />device.installPackage('/home/chanaka/workspace/SimpleIntentPreference/bin/SimpleIntentPreference.apk')</span><br />
<span style="font-size: x-small;"># sets a variable with the package's internal name<br />package = 'com.chanaka.android.sip'</span><br />
<span style="font-size: x-small;"># sets a variable with the name of an Activity in the package<br />activity = '.SimpleIntentPreferenceActivity'</span><br />
<span style="font-size: x-small;"># sets the name of the component to start<br />runComponent = package + '/' + activity</span><br />
<span style="font-size: x-small;"># Runs the component<br />device.startActivity(component=runComponent)</span><br />
<span style="font-size: x-small;"># Wait for few seconds<br />MonkeyRunner.sleep(2)</span><br />
<span style="font-size: x-small;"># Presses the Menu button<br />device.press('KEYCODE_MENU', MonkeyDevice.DOWN_AND_UP)</span><br />
<span style="font-size: x-small;"># Wait for few seconds<br />MonkeyRunner.sleep(2)</span><br />
<span style="font-size: x-small;">#Touch the new status button<br />device.touch(160, 460, 'DOWN_AND_UP')</span><br />
<span style="font-size: x-small;"># Wait for few seconds<br />MonkeyRunner.sleep(2)</span><br />
<span style="font-size: x-small;"># Connects to the current device, returning a MonkeyDevice object<br />device2 = MonkeyRunner.waitForConnection(timeout, "emulator-5556")</span><br />
<span style="font-size: x-small;"># Installs the Android package. Notice that this method returns a boolean, so <br /># you can test to see if the installation worked.<br />device2.installPackage('/home/chanaka/workspace/SimpleIntentPreference/bin/SimpleIntentPreference.apk')</span><br />
<span style="font-size: x-small;"># sets a variable with the package's internal name<br />package = 'com.chanaka.android.sip'</span><br />
<span style="font-size: x-small;"># sets a variable with the name of an Activity in the package<br />activity = '.SimpleIntentPreferenceActivity'</span><br />
<span style="font-size: x-small;"># sets the name of the component to start<br />runComponent = package + '/' + activity</span><br />
<span style="font-size: x-small;"># Runs the component<br />device2.startActivity(component=runComponent)</span><br />
<span style="font-size: x-small;"># Wait for few seconds<br />MonkeyRunner.sleep(2)</span><br />
<span style="font-size: x-small;"># Presses the Menu button<br />device2.press('KEYCODE_MENU', MonkeyDevice.DOWN_AND_UP)</span><br />
<span style="font-size: x-small;"># Wait for few seconds<br />MonkeyRunner.sleep(2)</span><br />
<span style="font-size: x-small;">#Touch the new status button<br />device2.touch(160, 460, 'DOWN_AND_UP')</span><br />
<span style="font-size: x-small;"># Takes a screenshot<br />result = device.takeSnapshot()</span><br />
<span style="font-size: x-small;"># Wait for few seconds<br />MonkeyRunner.sleep(2)</span><br />
<span style="font-size: x-small;"># Writes the screenshot to a file<br />result.writeToFile('/home/chanaka/status_update.png','png')</span><br />
<span style="font-size: x-small;">#Touch the first preference<br />device2.touch(160, 30, 'DOWN_AND_UP')</span><br />
<span style="font-size: x-small;">#Touch the entre button<br />device2.press('KEYCODE_DPAD_CENTER', MonkeyDevice.DOWN_AND_UP)</span><br />
<span style="font-size: x-small;"># Takes a screenshot<br />result2 = device2.takeSnapshot()</span><br />
<span style="font-size: x-small;"># Writes the screenshot to a file<br />result2.writeToFile('/home/chanaka/shot1.png','png')</span></div>
</div>Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com0tag:blogger.com,1999:blog-8582676765312174249.post-10202248852333054422012-04-07T21:53:00.000-07:002012-04-07T21:53:42.368-07:00solution for ubuntu not loading stuck in grub terminal<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div style="margin-bottom: 0in;">
This has cost me lot of my time and
effort to recover from this weird situation. There were some other
methods to get rid of this situation. But i had a more unique
requirement. That i needed my ubuntu installation restored. Because
there were lot of things inside my ubuntu installation which were
really important. I hope you are someone like me. You don't need loss
your ubuntu installation.</div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
Let's move on. </div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
I had ubuntu installed inside windows 7
using the wubi installer. One day i have shut down the machine after
using with ubuntu and i disconnected my power supply before the
system shuts down. Unfortunately , my laptop battery has been removed
at that time (for a replacement) and when i disconnect the power
supply it was totally without power. Next time when i started the
machine and i select the ubuntu from operating system selection menu,
it goes to grub terminal..</div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
something like this </div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
grub></div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
There was a note mentioning that you
can see the commands by pressing TAB key. I have tried various
methods mentioned in internet and i had lost one of my partitions by
doing those things. But finally i found a solution.</div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
When you boot Windows and look in the
C:\ubuntu\disks directory you'll notice the root.disk is missing. In
some cases, the \ubuntu\disks directory is missing completely or is
corrupted.<br /><br />Running chkdsk<br />Depending on the problem, Windows
may have run an automatic chkdsk or you may need to run it
manually. It's not always necessary, but it will never hurt, so the
first thing is to run it.</div>
<ul>
<li><div style="margin-bottom: 0in;">
Go to My Computer on XP
or Computer on Vista/7,
</div>
</li>
<li><div style="margin-bottom: 0in;">
right click the drive you
installed Ubuntu on e.g. right click on C:,
</div>
</li>
<li><div style="margin-bottom: 0in;">
select Properties, select the
Tools tab, then under Error-checking click Check now.</div>
</li>
<li><div style="margin-bottom: 0in;">
Select to Automatically fix
file system errors or Scan for and attempt recovery of bad
sectors </div>
</li>
<li><div style="margin-bottom: 0in;">
When the drive you installed on is
C: the computer will tell you it has to schedule the scan for the
next time you start your computer. Reboot to complete. </div>
</li>
</ul>
<div style="margin-bottom: 0in;">
<br /><br />Locate recovered
files/directories<br />The first thing to do is to look for the
\found.000 folder on the drive in question i.e. C:\found.0000. This
is hidden by default and (on my Windows 7 install) I also had to tell
Windows not to "Hide protected OS files" just to see it.
You may also have to recover from an administrator command prompt on
Win7 (see below).<br /><br />Hit the START key, enter CMD, then look
above and right click on CMD.exe and select "Run
as<br />Administrator".<br /><br /><br /><b><i>C:\>cd
\found.000<br />C:\found.000>dir<br /> Volume in drive C is
OS<br /> Volume Serial Number is B4B7-99A8<br /><br /> Directory
of C:\found.000<br /><br />19/07/2011 02:02 PM
15,000,000,000 file0000.chk<br />
1 File(s)
8 bytes<br /> 0
Dir(s) 222,258,069,504 bytes free</i></b><br /><br />So now you look for
your root.disk (or other .disk files) and copy them back to the
\ubuntu\disks folder. If the entire \ubuntu\disks folder is missing,
you'll likely find a dir0000.chk directory and within that
the root.disk, swap.disk and empty \boot\grub folders. Copy this back
to \ubuntu renaming the directory todisks.</div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
<b><i>C:\found.000>move file0000.chk
\ubuntu\disks\root.disk<br /> 1 file(s)
moved.<br /><br />or if the whole disks folder is
recovered<br />C:\found.000>move dir0000.chk \ubuntu\disks<br />
1 dir(s) moved.</i></b><br /><br />If you're missing the
root.disk but there is no file of that name, it may have been
renamed chk0000.chk. Rename this to root.disk and copy back to
\ubuntu\disks.<br /><br />If the corruption was minor, then likely
everything will work fine. If the corruption is major Windows may not
even recover the root.disk at all.</div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
I hope this helps you to recover your
files. Remember to backup important data on your Wubi install.
There's no reason to install important personal files on a root.disk
- you can access them easily on the /host partition.</div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
Cheers !!!!!!!!!!!</div>
<div style="margin-bottom: 0in;">
<br />
</div>
<div style="margin-bottom: 0in;">
This site has helped me in solving this
issue </div>
<div style="margin-bottom: 0in;">
<a href="http://ubuntu-with-wubi.blogspot.com/">http://ubuntu-with-wubi.blogspot.com/</a></div>
<div style="margin-bottom: 0in;">
<br /><br />
</div>
</div>Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com0tag:blogger.com,1999:blog-8582676765312174249.post-76386033413424559392012-04-05T02:46:00.002-07:002012-04-05T02:46:44.064-07:00Method to find a file in a directory with C++<div dir="ltr" style="text-align: left;" trbidi="on">
Sometimes you may want to check whether a particular file is in the system programatically. Following is a C++ method you can use in Windows enviornment to search for a particular file.<br />
<br />
<br />
<b><i>BOOL FindFile(TCHAR* fileName)</i></b><br />
<b><i>{</i></b><br />
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>WIN32_FIND_DATA data;</i></b><br />
<b><i> //Folder to be searched</i></b><br />
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>HANDLE h = FindFirstFile(L"\\Windows\\*.*",&data);</i></b><br />
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>BOOL returnValue = FALSE;</i></b><br />
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>if( h!=INVALID_HANDLE_VALUE ) </i></b><br />
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>{</i></b><br />
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>do</i></b><br />
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>{</i></b><br />
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>TCHAR* nPtr = new TCHAR [lstrlen( data.cFileName ) + 1];</i></b><br />
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>for( int i = 0; i < lstrlen( data.cFileName ); i++ )</i></b><br />
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>nPtr[i] = TCHAR( data.cFileName[i] );</i></b><br />
<b><i><br /></i></b><br />
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>nPtr[lstrlen( data.cFileName )] = '\0';</i></b><br />
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>if(_tcscmp(fileName, nPtr)==0)</i></b><br />
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>{</i></b><br />
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>returnValue == TRUE;</i></b><br />
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>break;</i></b><br />
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>}</i></b><br />
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>//cout << nPtr << endl;</i></b><br />
<b><i><br /></i></b><br />
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>} while(FindNextFile(h,&data));</i></b><br />
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>} </i></b><br />
<span class="Apple-tab-span" style="white-space: pre;"><b><i> </i></b></span><br />
<span class="Apple-tab-span" style="white-space: pre;"><b><i> </i></b></span><br />
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>FindClose(h);</i></b><br />
<b><i><br /></i></b><br />
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>return returnValue;</i></b><br />
<b><i>}</i></b><br />
<br />
You can call this method inside your main application as mentioned below.<br />
<br />
<i><b>FindFile((LPTSTR)(_T("myfile.xxx")));</b></i><br />
</div>Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com1tag:blogger.com,1999:blog-8582676765312174249.post-1024393594676612272012-04-05T01:46:00.003-07:002012-04-05T01:52:21.065-07:00Import native DLL into a C++ program<div dir="ltr" style="text-align: left;" trbidi="on">
When you are writing C++ programs, sometimes you may need to use third party dll files in your application. This tutorial is a comprehensive guide to using a native dll within a C++ application. Before we start the coding, let's have a small introduction about dynamic loading.<br />
<br />
<br />
<b>What is Dynamic Loading?</b><br />
<br />
Normally, when you link to a DLL via a LIB file (for example, the MFC DLLs), the DLL is loaded when your application starts up. This kind of loading is referred to as<b> implicit linking</b>, because the system takes care of the DLL loading for you - all you have to do is link with the LIB file.<br />
<br />
<b>Dynamic loading</b> (a.k.a. dynamic linking) means that your application loads a DLL just before you call a function in the DLL. For dynamic loading, you do not use a LIB file. Instead, what you do is call a pair of Win32 API functions (<b>LoadLibrary/GetProcAddress</b>) that load the DLL and then retrieve the address of a function in the DLL. Because you explicitly invoke these APIs, this kind of loading is also referred to as <b>explicit linking</b>. To summarize:<br />
<br />
<br />
<ul style="text-align: left;">
<li><b>implicit linking</b> - DLL is loaded automatically when your app starts</li>
<li><b>explicit linking </b>- you write code to load DLL</li>
</ul>
<br />
following acronyms are used in the programming world for these two types of linking.<br />
<br />
static linking - static loading, static linking, implicit linking, implicit loading, automatic loading<br />
<br />
dynamic linking - dynamic loading, explicit linking, explicit loading, manual loading<br />
<br />
<b>Why Use Dynamic Loading?</b><br />
<br />
Before I get into the details of dynamically loading DLLs, let me first answer the question: When is it desirable to dynamically load a DLL? Here are the typical scenarios:<br />
<br />
<br />
<ul style="text-align: left;">
<li>You don't have a lib file to link with - this is a pretty lame reason, since if you worked at it you could generate a LIB file. On the whole, though, generating a LIB file is probably more work than just using LoadLibrary/GetProcAddress to dynamically load a DLL.</li>
</ul>
<div>
<br /></div>
<ul style="text-align: left;">
<li>A DLL may not always be present - if you want to provide for some graceful program degradation, you must dynamically load any DLL that may or may not be present on the target machine (example: UXTHEME.DLL, which exists only on XP). If you used implicit linking, your application would never have the chance to degrade gracefully - the system simply would not allow your app to start, and would instead display some alarming message to your user.</li>
</ul>
<div>
<br /></div>
<ul style="text-align: left;">
<li>You need to support multiple feature sets - this is one of the historically valid reasons for using dynamic loading. If you have a product that supports many different features, and you want to load only those features that the customer has paid for, then what you do is package each feature set in its own DLL, and ship the DLL to the customer when he orders it. This is also a very convenient way to add new features (read: plug-ins) to your product, essentially making it open-ended.</li>
</ul>
<div>
<br /></div>
<ul style="text-align: left;">
<li>You need to support multiple platforms - this is also one of the historically valid reasons for using dynamic loading. You need to support multiple platforms (Win98, Win2000, WinXP) and each platform requires slightly different code for some reason. A simple solution is to segregate the code for each platform in its own DLL.</li>
</ul>
<div>
<br /></div>
<ul style="text-align: left;">
<li>You need to speed up the time it takes to load your application - this is another historical reason for using dynamic loading. You will start thinking about this when customers start complaining about how slow your app is to load. The idea is to identify what DLLs are necessary to display the core UI, and then dynamically load all the other DLLs that your app needs.</li>
</ul>
<div>
<br /></div>
<div>
<b>How to implement with in the code?</b></div>
<div>
<br /></div>
<div>
Let's start the actual coding. Let's say you have a dll file which is named as <b>mylibrary.dll</b>. You have so many methods inside that library. You need to use the method <b>Start(BOOL id)</b> within your application.</div>
<div>
<br /></div>
<div>
Define a constant name for your dll file. (This is optional)</div>
<div>
<div>
<b><i>#define MY_LIBRARY_NAME<span class="Apple-tab-span" style="white-space: pre;"> </span>TEXT("mylibrary.dll")</i></b></div>
<div>
<br /></div>
<div>
Declare a Handle for the library file instance.</div>
<div>
<b><i>HINSTANCE g_hinstLibrary;</i></b></div>
<div>
<br /></div>
<div>
Define a function pointer to the method you are willing to call from the dll. Signature of the definition should be equal as the actual method.</div>
<div>
<br /></div>
<div>
<b><i>typedef BOOL (__stdcall *LPFN_START)(BOOL);</i></b></div>
<div>
<br /></div>
<div>
Declare a variable of the defined function pointer type</div>
<div>
<b><i>LPFN_START g_sStart;</i></b></div>
<div>
<br /></div>
<div>
Load the library file into the instance variable</div>
<div>
<b><i>g_hinstLibrary = ::LoadLibrary(MY_LIBRARY_NAME);</i></b></div>
<div>
<br /></div>
<div>
Get the Process address of the specific method you are going to use in your application</div>
<div>
<br /></div>
<div>
<div>
<b><i>if (NULL != g_hinstLibrary)</i></b></div>
<div>
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>{</i></b></div>
<div>
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>//Get API addresses</i></b></div>
<div>
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>g_sStart = (LPFN_START )GetProcAddress((HMODULE)g_hinstLibrary, TEXT("Start"));</i></b></div>
</div>
<div>
<b><i> }</i></b></div>
<div>
<br /></div>
<div>
Now you can call the Start(BOOL id) function within your applications main method (or any other method) as below.</div>
<div>
<br /></div>
<div>
<b><i>if(NULL != g_sStart)</i></b></div>
<div>
<b><i>{</i></b></div>
<div>
<b><i> g_sStart(10);</i></b></div>
<div>
<b><i>}</i></b></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Once you are finished using the function, Release the loaded library</div>
<div>
<br /></div>
<div>
<b><i>if (NULL != g_hinstLibrary)</i></b></div>
<div>
<b><i>{</i></b></div>
<div>
<b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>FreeLibrary(g_hinstLibrary);</i></b></div>
<div>
<b><i>}</i></b></div>
<div>
<br /></div>
<div>
This blog has helped me to write this post and some of the sections are copied from there.</div>
</div>
<div>
<a href="http://www.codeproject.com/Articles/6299/Step-by-Step-Calling-C-DLLs-from-VC-and-VB-Part-4">http://www.codeproject.com/Articles/6299/Step-by-Step-Calling-C-DLLs-from-VC-and-VB-Part-4</a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Cheers !!!!!!!!!!!!!</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<br /></div>Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com0tag:blogger.com,1999:blog-8582676765312174249.post-57158587963825835522012-04-02T10:56:00.000-07:002012-04-02T10:56:05.129-07:00Flower, Thunder and You<div dir="ltr" style="text-align: left;" trbidi="on">
<ul style="text-align: left;">
<li>Be soft as a flower when it comes to kindness but </li>
</ul>
<br />
tough as thunder when it comes to principle.<br />
<br />
<ul style="text-align: left;">
<li>Be courteous and polite at all times but </li>
</ul>
<br />
never be pushed around<br />
<br />
<ul style="text-align: left;">
<li>Ensure that you are always treated with respect</li>
</ul>
</div>Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com0tag:blogger.com,1999:blog-8582676765312174249.post-19996822979656359402012-04-01T07:45:00.000-07:002012-04-01T07:48:06.741-07:00ඉනි මගේ ඉහලට<div dir="ltr" style="text-align: left;" trbidi="on">
කුල භේදය යන වදන අපගේ දෙසවනට වැටෙන විට අපට සිහි වන්නේ පැරණි ඉන්දීය සමාජය
හෝ අතීත සිංහල රජ කාලයයි. එසේ නමුදු මේ කුල භේදය සමාජය තුල සැමදා පවතින බවට
ඕනෑ තරම සාක්ෂි තිබේ. වත්මනෙහි එය දුප්පත්, පහල මධ්යම, ඉහල මධ්යම සහ
සුපිරි පැලැන්තිය ලෙස අපට දල වශයෙන් හඳුනා ගත හැක. දුප්පතා උත්සාහ කරන්නේ
තමන්ට ඉහලින් ඇති ස්ථරයකට නැගීමටය. අනෙකුත් ස්තර තුල සිටින මිනිසුන්ද
එසේමය. (මේ කියන්නේ බහුතරය ගැනය. ). එසේ නමුදු මේ සමාජ ස්තර හරහා ඉහලට නගින
මිනිසුන් කිසිම විටෙක තමා ලබන ජයග්රහණයන් ගෙන් සැහීමකට පත් වන්නේ නැත.
ඔවුන් බොහෝ දෙනෙකුට සතුටු වීමට වෙලාවක් නැත. මන්ද ඔවුන් සැම විටම ඉනි මගේ
ඉහලට නගිමින් සිටින නිසාය. එසේ නමුදු තමන්ට ලැබෙන දෙයින් සතුටින් ජිවත්වන
ඉතා සුළු පිරිසක්ද මේ සමාජයේ සිටිති. ඔවුන් ඉනි මගේ ඉහලට යාම වෙනුවට තමන්ගේ
සතුට සොයා යති. ඔවුන්ට පිනක් දහමක් කිරීමට, සතුටු වීමට, විනෝද චාරිකා යාමට
කාලය ඕනේ තරම් තිබේ. එසේ නම් අප උත්සාහ කල යුත්තේ ඉනි මගේ ඉහලට නැගීමට
පමණක්ද? අප යම් මොහොතක ඉනි මගේ නැවතී අප ලද ජයග්රහණයන්ගෙන් සතුටු විය
යුතුය. මුදල් පසු පසම හඹා යාම මගින් අපට කිසි දිනෙක සතුට ලඟා කර ගත නොහැක.
ඉනි මගේ ඉහලට නගින අතර මදක් නැවතී ඔබගේ සතුට ගැන දෙවරක් සිතන්න. </div>Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com0Negombo, Sri Lanka7.209337 79.8340617.1463244999999995 79.755097 7.2723495 79.913025tag:blogger.com,1999:blog-8582676765312174249.post-19677786792228970942012-03-31T08:08:00.001-07:002012-04-11T22:32:00.058-07:00robotium button click not working solution<div dir="ltr" style="text-align: left;" trbidi="on">
I also had this issue and i couldn't find a solution with robotium. Then i move to the android instrumentation provided with the SDK. What i have done is mentioned below. This worked without any issues for me. Here it is ..<br />
<br />
<br />
<br />
<br />
First define a private variable for the button as a member variable<br />
<i><b>private Button msButton;</b> </i> <br />
<br />
Then get the button instance with in the setup method.<br />
<b><i><br /></i></b><br />
<b><i>mButton = (Button) solo.getCurrentActivity().findViewById(<br /> com.marakana.android.simple_intent.R.id.sendButton);</i></b><br />
<br />
<br />
Then call the button click with in the UI thread in the test method as mentioned below.<br />
<br />
<i><b>//Test button method</b></i><br />
<br />
<i><b>public void testButtonClick() {<br /> </b></i><br />
<i><b>//Get the current activity and request to run onUI thread <br /> solo.getCurrentActivity().runOnUiThread(new Runnable() {</b></i><br />
<i><b><br /> public void run() {</b></i><br />
<br />
<i><b>//Request focus for the button<br /> mButton.requestFocus();<br /> }<br /> });</b></i><br />
<i><b><br />//Send the button click event<br /> this.sendKeys(KeyEvent.KEYCODE_DPAD_CENTER);<br /> <br /> }</b></i><br />
<br />
That's it .. Now you can test your button with other Robotium features.<br />
Cheers !!!!!!!!</div>Anonymoushttp://www.blogger.com/profile/04556827847616158385noreply@blogger.com0