<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4518069758291054188</id><updated>2024-10-07T12:11:36.365+06:00</updated><category term="GSoC"/><category term="Jato"/><category term="OpenSource"/><category term="Android"/><category term="Handler"/><category term="Thread"/><category term="Bengali Linux"/><category term="Internet"/><category term="J2ME"/><category term="Java"/><category term="Linux"/><category term="Mobile"/><category term="Setup"/><category term="Timer"/><category term="WeakReference"/><category term="ইন্টারনেট"/><category term="মোবাইল"/><category term="লিনাক্স"/><title type='text'>Siam&#39;s Blog</title><subtitle type='html'>&quot;I write differently from what I speak, I speak differently from what I think, I think differently from the way I ought to think, and so it all proceeds into deepest darkness.&quot;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://saeedsiam.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://saeedsiam.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Siam</name><uri>http://www.blogger.com/profile/10649652287968876970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4518069758291054188.post-407555814555892506</id><published>2009-03-19T03:50:00.004+06:00</published><updated>2009-03-19T22:28:35.773+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Handler"/><category scheme="http://www.blogger.com/atom/ns#" term="Thread"/><category scheme="http://www.blogger.com/atom/ns#" term="Timer"/><title type='text'>Timer in Android ( The Better Way )</title><content type='html'>The usual Timer class is &lt;a href=&quot;http://developer.android.com/reference/java/util/Timer.html&quot;&gt;available&lt;/a&gt; in Android, but unless you are doing non-trivial stuff, its better to use &lt;a href=&quot;http://developer.android.com/reference/android/os/Handler.html&quot;&gt;Handler&lt;/a&gt; for scheduling task. Why? Well, Timer class introduces a new thread and  while developing mobile application, you should really think twice (or more than that!) before using it.&lt;br /&gt;&lt;br /&gt;So, how jobs can be scheduled using Handler class? There are two different approaches. First, You can ask it to send messages at some later time by using  &lt;a href=&quot;http://developer.android.com/reference/android/os/Handler.html#sendMessageAtTime%28android.os.Message,%20long%29&quot;&gt;sendMessageAtTime(Message, long)&lt;/a&gt; or  &lt;a href=&quot;http://developer.android.com/reference/android/os/Handler.html#sendMessageDelayed%28android.os.Message,%20long%29&quot;&gt;sendMessageDelayed(Message, long)&lt;/a&gt; , which then can be processed as shown in my previous &lt;a href=&quot;http://saeedsiam.blogspot.com/2009/02/first-look-into-android-thread.html&quot;&gt;post&lt;/a&gt;, effectively acting as a timer. Secondly, you can directly ask it to run some scheduled task by using &lt;a href=&quot;http://developer.android.com/reference/android/os/Handler.html#postAtTime%28java.lang.Runnable,%20long%29&quot;&gt;postAtTime(Runnable, long)&lt;/a&gt; and &lt;a href=&quot;http://developer.android.com/reference/android/os/Handler.html#postDelayed%28java.lang.Runnable,%20long%29&quot;&gt;postDelayed(Runnable, long)&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The methods described here lets you schedule a single shot task. To repeat a scheduled task, you have to register it again to run for the next time. So, assuming that you want to repeat a task  after one second delay, we can do something like this,&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;strong&gt;private&lt;/strong&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;Handler&lt;/span&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;handler&lt;/span&gt; &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;=&lt;/span&gt; &lt;strong&gt;new&lt;/strong&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;Handler&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;strong&gt;private&lt;/strong&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;Runnable&lt;/span&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;runnable&lt;/span&gt; &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;=&lt;/span&gt; &lt;strong&gt;new&lt;/strong&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;Runnable&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;strong&gt;public&lt;/strong&gt; &lt;strong&gt;void&lt;/strong&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;run&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;doStuff&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(68, 68, 68);&quot;&gt;/*&lt;br /&gt;   * Now register it for running next time&lt;br /&gt;   */&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;handler&lt;/span&gt;.&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;postDelayed&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;this&lt;/strong&gt;, &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;1000&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   &lt;br /&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;To stop a repeated task you can use &lt;a href=&quot;http://developer.android.com/reference/android/os/Handler.html#removeCallbacks%28java.lang.Runnable%29&quot;&gt;removeCallbacks(Runnable r)&lt;/a&gt;, which removes all pending Runnable r in the message queue.</content><link rel='replies' type='application/atom+xml' href='http://saeedsiam.blogspot.com/feeds/407555814555892506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4518069758291054188/407555814555892506' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/407555814555892506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/407555814555892506'/><link rel='alternate' type='text/html' href='http://saeedsiam.blogspot.com/2009/03/timer-in-android-better-way.html' title='Timer in Android ( The Better Way )'/><author><name>Siam</name><uri>http://www.blogger.com/profile/10649652287968876970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4518069758291054188.post-8427355053384146188</id><published>2009-02-15T13:54:00.012+06:00</published><updated>2009-02-16T14:08:28.086+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GSoC"/><title type='text'>For First Time GSoC Applicants</title><content type='html'>Google Summer of Code for 2009 has been announced.  In GSoC 2008, I applied and worked for &lt;a href=&quot;http://jatovm.sourceforge.net/&quot;&gt;Jato&lt;/a&gt;. It was really fun. Moreover it helped me to be a better developer than I had been. While doing my GSoC, I have learned git, under-the-hood details about Java and become a more matured C programmer. It also helped to shake off the initial intimidation factors in joining open source community as a developer for the first time. Before GSoC, I didn&#39;t even know the name of Jato, but now I am an active developer continuing my GSoC works.&lt;br /&gt;&lt;br /&gt;Thats why I want to share what I have learned. I know there are plenty of resources available for GSoC wanna be applicants, but for the first-timers the initial process may be very confusing. Thats the audience on which I will focus.&lt;br /&gt;&lt;br /&gt;So here it goes.&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;1. Start Early&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Yes, start early, start Now ! Do not wait for the last moment. Go through the &lt;a href=&quot;http://code.google.com/opensource/gsoc/2009/faqs.html&quot;&gt;faqs&lt;/a&gt;, tutorials. Dig into the previous  &lt;a href=&quot;http://code.google.com/soc/2008/&quot;&gt;2008&lt;/a&gt;, &lt;a href=&quot;http://code.google.com/soc/2007/&quot;&gt;2007&lt;/a&gt;, &lt;a href=&quot;http://code.google.com/soc/2006/&quot;&gt;2006&lt;/a&gt;, &lt;a href=&quot;http://code.google.com/soc/2005/&quot;&gt;2005&lt;/a&gt; GSoC pages. Get an idea about the mentors that participated and projects that have been proposed. But it is important to keep in mind that no previous mentor organization is guaranteed to have a slot in GSoC.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;2. Come up with a short list&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;As there are many organizations participating in GSoC now, it is necessary to make a list of organizations that you think suits you most. And I think, its better to make that list even before the announcement of accepted mentor list. Because without any sort of prior list and plan, you may run out of time if you need to go through all the accepted mentors and their projects one by one. Of course, there is a certain not-so-amazing possibility that your selected mentor failed to get a slot this year but, hey, you can certainly make changes in that case.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;You can start sorting by using language. If you abhor loosely typed language there is no point in applying php, JavaScript focused mentors. Here is a &lt;a href=&quot;http://www.eflow.org/wiki/tiki-index.php?page=Mentors_by_language&quot;&gt;list&lt;/a&gt; of mentors in 2008, categorized by language.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Another important factor in choosing the mentors apart from language that they use, might be the type of the work they do. Are you interested in working on compilers ? How about diving into GPS/Geospatial projects? Here is another nice &lt;a href=&quot;http://genmapp.org/gsoc/mentors_by_category.htm&quot;&gt;categorized list&lt;/a&gt; of 2008 mentors that might help you to guess.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;While traversing previous years&#39; mentors list, you can find that even though officially no mentoring organization is guaranteed to have a slot, most well known mentors, for example apache, mozilla or pidgin, are almost sure to have slots. Thats the source of another dilemma. Because, well known mentors mean more fierce competition, while lesser known mentors are less likely to have slots. I had to face this problem. I &lt;/span&gt;chose to work on &lt;a href=&quot;http://plan9.bell-labs.com/plan9/&quot;&gt;Plan 9 from Bell Labs&lt;/a&gt;. After reading lots of documents, doing lots of trying and testing with &lt;a href=&quot;http://en.wikipedia.org/wiki/Inferno_%28operating_system%29&quot;&gt;Inferno&lt;/a&gt;, it failed to get a grant. &lt;span&gt;So, my advice is to come up with a balanced list.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;3. Get in touch now&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;After choosing the list, its necessary to get in touch with the organization. Join the mailing list, hang in the IRC channel.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Read the mails carefully, watch the conversations in IRC. Most probably the &#39;hot&#39; topics for upcoming gsoc will be discussed. Find out the steps and protocols for committing code.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;And most importantly, try to get the culture in the organization. Some organization may be very strict. You might get burnt for &lt;a href=&quot;http://en.wikipedia.org/wiki/Posting_style#Top-posting&quot;&gt;Top-Posting&lt;/a&gt; or get a sharp &lt;a href=&quot;http://en.wikipedia.org/wiki/RTFM&quot;&gt;&#39;RTFM&#39;&lt;/a&gt; reply for asking something which has been answered else where. But thicken your skin for that. We all certainly make mistake, do say things which we later regret. The important thing is to &lt;/span&gt;&lt;span&gt;learn from the mistakes&lt;/span&gt;&lt;span&gt; and not to let the intimidation factor trade on you.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;And particularly if this is your first approach to an open source community, you may lay low for few days both in IRC and mailing lists. Try to understand the environment, the pattern of conversations, which is allowed to ask and which is not. But don&#39;t hesitate to participate if the topic is in your level. It&#39;ll certainly help you to bond with your new developer colleagues.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;4. Land on an Idea&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Try hard to come up with an idea. Certainly, you can choose ideas from the proposed idea-list. But coming up with an idea can and will boost your chance to get accepted. While proposing idea, try hard to come up with original and ambitious idea which the organization actually &#39;needs&#39;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;To come up with such ideas, you may need to start reading the development docs and go through few source code files. It is necessary to do so to find out how and where your idea fits and whether its feasible to complete within the GSoC time line (3 months approximately).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;After coming up with an idea, the most important thing is to communicate with the organization. Propose the idea in details, get a feedback. That will make a strong case for your application.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I think it concludes the initial preparation. The next important step will be writing application. Here is some link for that&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://drupal.org/node/59037&quot;&gt;http://drupal.org/node/59037&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://inkscape.org/wiki/index.php/SOC_Writing_Project_Proposals&quot;&gt;http://inkscape.org/wiki/index.php/SOC_Writing_Project_Proposals&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/194477&quot;&gt;http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/194477&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.postgresql.org/developer/summerofcodeadvice.html&quot;&gt;http://www.postgresql.org/developer/summerofcodeadvice.html&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://developer.pidgin.im/wiki/SoCDiscussions&quot;&gt;http://developer.pidgin.im/wiki/SoCDiscussions&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://saeedsiam.blogspot.com/feeds/8427355053384146188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4518069758291054188/8427355053384146188' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/8427355053384146188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/8427355053384146188'/><link rel='alternate' type='text/html' href='http://saeedsiam.blogspot.com/2009/02/for-first-time-gsoc-applicants.html' title='For First Time GSoC Applicants'/><author><name>Siam</name><uri>http://www.blogger.com/profile/10649652287968876970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4518069758291054188.post-3514785805836107813</id><published>2009-02-03T17:06:00.008+06:00</published><updated>2009-02-03T22:39:35.382+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="WeakReference"/><title type='text'>WeakReference? What is that !</title><content type='html'>Even though weak references are massively useful features available for fairly long time, I think they are pretty overlooked. ( Yeah, I am pretty bemused by getting multiple &quot;WeakReference? huh! whats that?!&quot; responses on a single day.) So, lets refresh on what weak references are and what they do.&lt;br /&gt;&lt;br /&gt;In short, weak references can save you from a lot of problems in case of &lt;span style=&quot;font-style: italic;&quot;&gt;unintentional object retention&lt;/span&gt;. If you don&#39;t understand &quot;Unintentional Object Retention&quot; mumbo-jumbo, here is a scenario for you.&lt;br /&gt;&lt;br /&gt;Lets say, you need to use gigantic images in your application. But, as you know loading images each time from disk is pretty expensive, you decided to cache it. And as a sane person, you don&#39;t want the gigantic images using up a large chunk of memory when there is no reference to it. Now, how can you do that? If you use normal reference to the image ( to place it in vector or hash map or in your custom cache class ), when GC will run, it will find that it has at least a reference to that image and would refrain itself from finalizing and reclaiming the memory. Now what you can do is, keeping some kind of in house count of the references that point to that image and when there is no other reference pointing, you can remove the holding reference from your cache store making it eligible for garbage collection. Is it fun to mimic the garbage collector? Hell, No !&lt;br /&gt;&lt;br /&gt;Here comes the mighty weak reference into play. To put simply weak references are not strong enough to force the referent object to remain in memory. Another mumbo-jumbo? Well, lets go into details.&lt;br /&gt;&lt;br /&gt;Each ordinary reference in Java is a strong reference. What make them strong is the way they interact with GC. More particularly, if an object is reachable through a chain of strong reference it will not be claimed by GC. So for two ordinary references &lt;span style=&quot;font-style: italic;&quot;&gt;x&lt;/span&gt; and &lt;span style=&quot;font-style: italic;&quot;&gt;y&lt;/span&gt;, the following statement&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;x&lt;/span&gt; &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;y&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;will make sure that the object to which &lt;span style=&quot;font-style: italic;&quot;&gt;y&lt;/span&gt; points would be kept in memory as long as &lt;span style=&quot;font-style: italic;&quot;&gt;x&lt;/span&gt; is reachable.&lt;br /&gt;&lt;br /&gt;But, for a weak reference, that is not the case. If all the references to a particular object are weak references ( we call this situation &lt;span style=&quot;font-style: italic;&quot;&gt;&quot;weakly reachable&quot;&lt;/span&gt;), then garbage collector is eligible to claim the object. So if you use &lt;a href=&quot;http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ref/WeakReference.html&quot;&gt;WeakReference&lt;/a&gt;, like the following&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;WeakReference&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;SomeOtherRef&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;weakReference&lt;/span&gt; &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;=&lt;/span&gt; &lt;strong&gt;new&lt;/strong&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;WeakReference&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;someOtherRef&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;you are making sure that garbage collector&#39;s reachability has been increased and later you can get the reference by using&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;weakReference&lt;/span&gt;.&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The point to remember is that it is not enough strong to prevent from garbage collection, so don&#39;t surprise if &lt;i&gt;get()&lt;/i&gt; all on a sudden, starts returning &lt;i&gt;null&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;So, by now you have got what you need for that caching mechanism. In your caching store house, you will use &lt;i&gt;WeakReference&lt;/i&gt; so that when there is no other strong references, the gigantic image is gracefully removed by the GC.&lt;br /&gt;&lt;br /&gt;Java provides more control over garbage collection by providing &lt;a href=&quot;http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ref/PhantomReference.html&quot;&gt;PhantomReference&lt;/a&gt;, &lt;a href=&quot;http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ref/SoftReference.html&quot;&gt;SoftReference&lt;/a&gt;, &lt;a href=&quot;http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ref/ReferenceQueue.html&quot;&gt;ReferenceQueue&lt;/a&gt; and &lt;a href=&quot;http://java.sun.com/j2se/1.4.2/docs/api/java/util/WeakHashMap.html&quot;&gt;WeakHashMap&lt;/a&gt;. But I think I have enough for today, so all these have to wait.</content><link rel='replies' type='application/atom+xml' href='http://saeedsiam.blogspot.com/feeds/3514785805836107813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4518069758291054188/3514785805836107813' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/3514785805836107813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/3514785805836107813'/><link rel='alternate' type='text/html' href='http://saeedsiam.blogspot.com/2009/02/weakreference-what-is-that.html' title='WeakReference? What is that !'/><author><name>Siam</name><uri>http://www.blogger.com/profile/10649652287968876970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4518069758291054188.post-8238872491790326595</id><published>2009-02-01T20:49:00.010+06:00</published><updated>2009-02-02T18:26:42.608+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Handler"/><category scheme="http://www.blogger.com/atom/ns#" term="Thread"/><title type='text'>A first look into Android Thread</title><content type='html'>I have started looking into Android. Late to join the show? well, may be, but surely its pretty exciting.&lt;br /&gt;&lt;br /&gt;I have tried to build a utility class that can do Network I/O. And grasping things was little hard at first. Network I/O or other heavy-duty stuff in Android should be done on other worker thread. Because doing it in main thread (or the UI thread) can ( and will ) make your application unresponsive and may be killed as the system is persuaded to think that it has hung. For every Android developer, &lt;a href=&quot;http://code.google.com/android/toolbox/philosophy.html&quot;&gt;this&lt;/a&gt; is a must-read.&lt;br /&gt;&lt;br /&gt;So you have to do the long running operations in separate thread. And to interact between threads you have to resort to &lt;a href=&quot;http://code.google.com/android/reference/android/os/Handler.html&quot;&gt;Handler&lt;/a&gt;. A Handler is used to send message or runnable to a particular thread. The thing to remember is that a Handler is associated with the &lt;a href=&quot;http://code.google.com/android/reference/android/os/MessageQueue.html&quot;&gt;MessageQueue&lt;/a&gt; of the single thread which has created it. After creating a Handler, it can be used to post message or runnable to that particular thread.&lt;br /&gt;&lt;br /&gt;Here is an example&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;strong&gt;public&lt;/strong&gt; &lt;strong&gt;class&lt;/strong&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;MyActivity&lt;/span&gt; &lt;strong&gt;extends&lt;/strong&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;Activity&lt;/span&gt; &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;  &lt;br /&gt;&lt;br /&gt;  &lt;strong&gt;&lt;/strong&gt; &lt;strong&gt;void&lt;/strong&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;startHeavyDutyStuff&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(68, 68, 68);&quot;&gt;// Here is the heavy-duty thread&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;Thread&lt;/span&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;t&lt;/span&gt; &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;=&lt;/span&gt; &lt;strong&gt;new&lt;/strong&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;Thread&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;          &lt;strong&gt;public&lt;/strong&gt; &lt;strong&gt;void&lt;/strong&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;run&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;              &lt;strong&gt;while&lt;/strong&gt; &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;true&lt;/strong&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;                  &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;mResults&lt;/span&gt; &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;doSomethingExpensive&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;                  &lt;span style=&quot;color: rgb(68, 68, 68);&quot;&gt;//Send update to the main thread&lt;/span&gt;&lt;br /&gt;                  &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;messageHandler&lt;/span&gt;.&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;sendMessage&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;Message&lt;/span&gt;.&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;obtain&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;messageHandler&lt;/span&gt;, &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;mResults&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;;&lt;/span&gt; &lt;br /&gt;              &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;t&lt;/span&gt;.&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;start&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(68, 68, 68);&quot;&gt;// Instantiating the Handler associated with the main thread.&lt;/span&gt;&lt;br /&gt;  &lt;strong&gt;private&lt;/strong&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;Handler&lt;/span&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;messageHandler&lt;/span&gt; &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;=&lt;/span&gt; &lt;strong&gt;new&lt;/strong&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;Handler&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;      @&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;Override&lt;/span&gt;&lt;br /&gt;      &lt;strong&gt;public&lt;/strong&gt; &lt;strong&gt;void&lt;/strong&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;handleMessage&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;Message&lt;/span&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;msg&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;  &lt;br /&gt;          &lt;strong&gt;switch&lt;/strong&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;msg&lt;/span&gt;.&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;what&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(68, 68, 68);&quot;&gt;    //handle update&lt;/span&gt;&lt;br /&gt;              //.....&lt;br /&gt;          &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;So what is done here? Very simple. A Handler has been created which is bound to the message queue of the main thread. And by using the handler, from the heavy-duty, worker thread we send message to the main thread to be processed.&lt;br /&gt;&lt;br /&gt;Feeling like drinking from hose-pipe? Dont worry, I&#39;ll post more realistic example soon.</content><link rel='replies' type='application/atom+xml' href='http://saeedsiam.blogspot.com/feeds/8238872491790326595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4518069758291054188/8238872491790326595' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/8238872491790326595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/8238872491790326595'/><link rel='alternate' type='text/html' href='http://saeedsiam.blogspot.com/2009/02/first-look-into-android-thread.html' title='A first look into Android Thread'/><author><name>Siam</name><uri>http://www.blogger.com/profile/10649652287968876970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4518069758291054188.post-5538830101502501979</id><published>2008-08-12T14:34:00.003+06:00</published><updated>2008-08-12T15:19:34.968+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GSoC"/><category scheme="http://www.blogger.com/atom/ns#" term="Jato"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenSource"/><title type='text'>Providing synchronization support in Jato</title><content type='html'>When I started to work on &lt;a href=&quot;http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc9.html#monitorenter&quot;&gt;monitorenter&lt;/a&gt; and &lt;a href=&quot;http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc9.html#monitorenter&quot;&gt;monitorexit&lt;/a&gt;, I thought it would be quite easy. Get the reference, call the lock/unlock function, done. But, soon after beginning, I was chanting &quot;nothing-is-what-it-seems&quot; mantra.&lt;br /&gt;&lt;br /&gt;For monitorenter and monitorexit, it is necessary to provide support for &lt;a href=&quot;http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc5.html#goto&quot;&gt;goto&lt;/a&gt; and &lt;a href=&quot;http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html#athrow&quot;&gt;athrow&lt;/a&gt; bytecode instructions. &lt;a href=&quot;http://java.sun.com/docs/books/jvms/second_edition/html/Compiling.doc.html#6530&quot;&gt;Here is why&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Providing support for athrow instruction was easy. As &lt;a href=&quot;http://jatovm.sourceforge.net/&quot;&gt;Jato&lt;/a&gt; still does not support exception handling, actually nothing but function for bytecode consuming and dummy instruction selection rule was necessary.&lt;br /&gt;&lt;br /&gt;But, for goto, I ran into a bug in control flow analyzer. So, after few hours of debugging, did fix that bug. And every thing was easy there after.&lt;br /&gt;&lt;br /&gt;Then sent flood of patches! YAY !&lt;br /&gt;&lt;br /&gt;( I made some nasty formatting horrors, which were fixed by &lt;a href=&quot;http://penberg.blogspot.com/&quot;&gt;Pekka&lt;/a&gt;. Thanks Pekka. )</content><link rel='replies' type='application/atom+xml' href='http://saeedsiam.blogspot.com/feeds/5538830101502501979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4518069758291054188/5538830101502501979' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/5538830101502501979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/5538830101502501979'/><link rel='alternate' type='text/html' href='http://saeedsiam.blogspot.com/2008/08/providing-synchronization-support-in.html' title='Providing synchronization support in Jato'/><author><name>Siam</name><uri>http://www.blogger.com/profile/10649652287968876970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4518069758291054188.post-2590529524636400726</id><published>2008-07-28T17:24:00.003+06:00</published><updated>2008-07-28T19:20:33.761+06:00</updated><title type='text'>The 64 Bit and premature optimaization anomaly !</title><content type='html'>I am currently working to improve my undergrad research on Neural Network (which has been accepted in &lt;a href=&quot;http://203.91.120.151/%7Eisnn2008/&quot;&gt;Fifth International Symposium On Neural Networks &lt;/a&gt;).We have done a lot of brain storming in last few months. And then I was selected to translate the whole idea to code ! Having the sole responsibility for developing the whole idea does involve twist and turns, but it is fun too ! After finishing developing , I have a feeling that it is gonna be a good work.&lt;br /&gt;&lt;br /&gt;And last night, my research partner informed me that , result has improved for every case but for benchmark heart attack problem. For this data set the program falls into an infinite loop.&lt;br /&gt;&lt;br /&gt; In constructing neural network,  instead of maintaining a explicit relationship of which node connected to which one, I have packed the connection information in unsigned integer. So storing and retrieving the connection information is easy, just a few left or right shift and masking .&lt;br /&gt;&lt;br /&gt;As a matter of fact, this optimization is not very necessary here, because&lt;br /&gt;&lt;br /&gt;  1) Storing and retrieving connection information do not occur that much.&lt;br /&gt;&lt;br /&gt; 2) As it is a research on how neural network can predict result more accurately ,  result is of more concern not the speed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;But now, as heart attack benchmark problem has 35 input nodes, way more than other  benchmark problems, I am left shifting an unsigned integer  by 35 bits !. Phew ! Guess what Donald. E. Knuth has told us&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&quot;We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil.&quot; (Knuth, Donald. &lt;i&gt;Structured Programming with go to Statements&lt;/i&gt;, ACM Journal &lt;b&gt;Computing Surveys&lt;/b&gt;, Vol 6, No. 4, Dec. 1974. p.268.)&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;But as changing it would cause an avalanche of more changes, I did the obvious, changed the data type from unsigned integer to unsigned long long. And the result is same, trapped in the infinite loop.&lt;br /&gt;&lt;br /&gt;So after more debugging for 2 hours, when I am cursing under my breath, the following line just hit me&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;connection_matrix_value&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;edge&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;get_forward_node&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;get_node_id&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;+&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;shifting_value_for_forward_node&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Here, 1 is of type int having length 32 bits, so shifting it by 32 or more bits, nothing retains, the net result is a big fat 0 !. So what i need to do is making 1 as unsigned long long type ( 1ULL ).&lt;br /&gt;&lt;br /&gt;And, YAY ! everything works !</content><link rel='replies' type='application/atom+xml' href='http://saeedsiam.blogspot.com/feeds/2590529524636400726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4518069758291054188/2590529524636400726' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/2590529524636400726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/2590529524636400726'/><link rel='alternate' type='text/html' href='http://saeedsiam.blogspot.com/2008/07/64-bit-and-premature-optimaization.html' title='The 64 Bit and premature optimaization anomaly !'/><author><name>Siam</name><uri>http://www.blogger.com/profile/10649652287968876970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4518069758291054188.post-8392129038117291854</id><published>2008-07-25T14:36:00.002+06:00</published><updated>2008-07-25T17:09:22.213+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GSoC"/><category scheme="http://www.blogger.com/atom/ns#" term="Jato"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenSource"/><title type='text'>Update On Jato</title><content type='html'>Well , everything seems little scattered.&lt;br /&gt;&lt;br /&gt;&lt;*&gt;store and &lt;*&gt;load is almost done , but cant check whether it actually works or not because of its dependency on register allocation.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc6.html#instanceof&quot;&gt;instanceof&lt;/a&gt; is done but a little code re-structuring is needed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For &lt;a href=&quot;http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc9.html#monitorenter&quot;&gt;monitorenter&lt;/a&gt; and &lt;a href=&quot;http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc9.html#monitorenter&quot;&gt;monitorexit&lt;/a&gt; , parsing and code generation is done, but need to handle &lt;a href=&quot;http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html#athrow&quot;&gt;athrow&lt;/a&gt; as well.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Haven&#39;t looked into &lt;a href=&quot;http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc2.html#checkcast&quot;&gt;checkcast&lt;/a&gt; yet.&lt;br /&gt;&lt;br /&gt;And the deadline is &lt;a href=&quot;http://code.google.com/opensource/gsoc/2008/faqs.html#0.1_timeline&quot;&gt;August 18&lt;/a&gt;. Gotta run !.</content><link rel='replies' type='application/atom+xml' href='http://saeedsiam.blogspot.com/feeds/8392129038117291854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4518069758291054188/8392129038117291854' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/8392129038117291854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/8392129038117291854'/><link rel='alternate' type='text/html' href='http://saeedsiam.blogspot.com/2008/07/update-on-jato.html' title='Update On Jato'/><author><name>Siam</name><uri>http://www.blogger.com/profile/10649652287968876970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4518069758291054188.post-1470024146247517113</id><published>2008-06-25T14:18:00.006+06:00</published><updated>2008-06-25T17:36:03.893+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GSoC"/><category scheme="http://www.blogger.com/atom/ns#" term="Jato"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenSource"/><title type='text'>multianewarray byte instruction in Jato</title><content type='html'>I think, &lt;a href=&quot;http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc9.html#multianewarray&quot;&gt;multianewarray&lt;/a&gt; instruction was the most tough one that I have confronted so far while working on &lt;a href=&quot;http://jatovm.sourceforge.net/&quot;&gt;Jato&lt;/a&gt;. But with the help of &lt;a href=&quot;http://penberg.blogspot.com/&quot;&gt;Pekka Enberg&lt;/a&gt;, finally I was able to creep out of the abyss.&lt;br /&gt;&lt;br /&gt;Initially , I assumed (very  naively) that the counts for multianewarray instruction would be pushed in expression stack as EXPR_VALUE expressions. But then, Pekka pointed out that it does not work for every situation. For example, it will break in the following code :&lt;br /&gt;&lt;pre&gt;   &lt;strong&gt;public&lt;/strong&gt; &lt;strong&gt;int&lt;/strong&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;newArray&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;int&lt;/strong&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;x&lt;/span&gt;, &lt;strong&gt;int&lt;/strong&gt; &lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;y&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;   &lt;strong&gt;return&lt;/strong&gt; &lt;strong&gt;new&lt;/strong&gt; &lt;strong&gt;int&lt;/strong&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;x&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;y&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(68, 68, 255);&quot;&gt;&lt;strong&gt;   }&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The better way would be, as Pekka suggested, to &#39;abuse&#39; the EXPR_ARG. That is , converting each count expression to argument expression, so that instruction selector can  automatically push appropriate values on the stack.&lt;br /&gt;&lt;br /&gt;So in multianewarrray byte code handler, what I do is, after popping dimension values from the expression stack, wrap each expression into EXPR_ARGS. Then, in instruction selection and code emission phase, as all the count values are already pushed on stack, all I need to do is, make a call to array allocation function in &lt;a href=&quot;http://jamvm.sourceforge.net/&quot;&gt;jamvm&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Easy as pie , when you are in right track !</content><link rel='replies' type='application/atom+xml' href='http://saeedsiam.blogspot.com/feeds/1470024146247517113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4518069758291054188/1470024146247517113' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/1470024146247517113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/1470024146247517113'/><link rel='alternate' type='text/html' href='http://saeedsiam.blogspot.com/2008/06/multianewarray-byte-instruction-in-jato.html' title='multianewarray byte instruction in Jato'/><author><name>Siam</name><uri>http://www.blogger.com/profile/10649652287968876970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4518069758291054188.post-717573447326031180</id><published>2008-06-16T17:23:00.003+06:00</published><updated>2008-06-16T17:33:06.872+06:00</updated><title type='text'>SynchMaster 920nw in My Fedora</title><content type='html'>Just got a SyncMaster 920nw 19&quot; wide screen . A very nice monitor to have , bright clear distinct view all the times. But after plugging it to my computer , it shows a black area on my left ,as if it starts rendering from some  (x,0) pixel.&lt;br /&gt;&lt;br /&gt;So , I started to look into X configuration , and after a lot of head scratching , when I set the refresh rate to 75&lt;br /&gt;Hz , it started to work perfectly . Weird !</content><link rel='replies' type='application/atom+xml' href='http://saeedsiam.blogspot.com/feeds/717573447326031180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4518069758291054188/717573447326031180' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/717573447326031180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/717573447326031180'/><link rel='alternate' type='text/html' href='http://saeedsiam.blogspot.com/2008/06/synchmaster-920nw-in-my-fedora.html' title='SynchMaster 920nw in My Fedora'/><author><name>Siam</name><uri>http://www.blogger.com/profile/10649652287968876970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4518069758291054188.post-4900912495465561243</id><published>2008-06-05T10:45:00.011+06:00</published><updated>2008-06-16T20:06:27.738+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GSoC"/><category scheme="http://www.blogger.com/atom/ns#" term="Jato"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenSource"/><title type='text'>Debugging Jato</title><content type='html'>In last few weeks , while working on &lt;a href=&quot;http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html#arraylength&quot;&gt;arraylength&lt;/a&gt; bytecode instruction , I had to debug &lt;a href=&quot;http://jatovm.sourceforge.net/&quot;&gt;Jato&lt;/a&gt; . But instruction provided in readme file is rather obsolete . So I had to go through the run-suite.sh and &#39;&#39;reinvent the wheel&quot; .&lt;br /&gt;&lt;br /&gt;To debug , you have to point  &lt;span style=&quot;font-style: italic;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;gnu.classpath.boot.library.path&lt;/span&gt;  &lt;/span&gt;to&lt;span style=&quot;font-style: italic;&quot;&gt; &amp;lt;gnu_classpath_root&amp;gt;/lib/classpath&lt;/span&gt; and &lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;bootclasspath&lt;/span&gt; should contain &lt;span style=&quot;font-style: italic;&quot;&gt;&amp;lt;gnu_classpath_root&amp;gt;/share/classpath/glibj.zip &lt;/span&gt;and &lt;span style=&quot;font-style: italic;&quot;&gt;&amp;lt;jato_root&amp;gt;/lib/classes.zip&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;The easiest way to do so is , setting the following values&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style=&quot;font-size:14;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;GNU_CLASSPATH_ROOT=&lt;/span&gt;`&amp;lt;JATO_ROOT&amp;gt;/tools/classpath-config`&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;GLIBJ=&lt;/span&gt;$GNU_CLASSPATH_ROOT/share/classpath/glibj.zip&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;BOOTCLASSPATH=&lt;/span&gt;&amp;lt;JATO_ROOT&amp;gt;/lib/classes.zip:$GLIBJ&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;then applying usual gdb command ,i.e.,&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style=&quot;font-size:14;&quot;&gt;&lt;br /&gt;gdb --args &amp;lt;JATO_ROOT&amp;gt;/java &lt;strong&gt;\&lt;/strong&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(139, 34, 82);&quot;&gt;&lt;strong&gt;-Dgnu.classpath.boot.library.path=&lt;/strong&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;$GNU_CLASSPATH_ROOT&lt;/span&gt;/lib/classpath &lt;strong&gt;\&lt;/strong&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(139, 34, 82);&quot;&gt;&lt;strong&gt;-Xbootclasspath&lt;/strong&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(32, 64, 160);&quot;&gt;$BOOTCLASSPATH&lt;/span&gt; -cp &amp;lt;JATO_ROOT&amp;gt;/regression class_file_name_to_debug&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;will launch it in debug mode. You can additionally pass any other command line option ( -Xint , -Xtrace:jit ... ) also.&lt;span style=&quot;font-style: italic;&quot;&gt;&lt;jato_root&gt;&lt;jato_root&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/jato_root&gt;&lt;/jato_root&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://saeedsiam.blogspot.com/feeds/4900912495465561243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4518069758291054188/4900912495465561243' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/4900912495465561243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/4900912495465561243'/><link rel='alternate' type='text/html' href='http://saeedsiam.blogspot.com/2008/06/debugging-jato.html' title='Debugging Jato'/><author><name>Siam</name><uri>http://www.blogger.com/profile/10649652287968876970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4518069758291054188.post-2338936940725363539</id><published>2008-05-09T11:47:00.001+06:00</published><updated>2008-05-09T11:49:10.723+06:00</updated><title type='text'>The Future Of Search ?</title><content type='html'>Hmm , well , I&#39;ll be waiting for this &lt;a href=&quot;http://futureofsearch.federatedmedia.net/archives/5&quot;&gt;http://futureofsearch.federatedmedia.net/archives/5&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://saeedsiam.blogspot.com/feeds/2338936940725363539/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4518069758291054188/2338936940725363539' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/2338936940725363539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/2338936940725363539'/><link rel='alternate' type='text/html' href='http://saeedsiam.blogspot.com/2008/05/future-of-search.html' title='The Future Of Search ?'/><author><name>Siam</name><uri>http://www.blogger.com/profile/10649652287968876970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4518069758291054188.post-8915382601581494809</id><published>2008-04-27T12:28:00.001+06:00</published><updated>2008-04-27T12:49:38.070+06:00</updated><title type='text'>How to run a company ( Or How not to )</title><content type='html'>From a developer&#39;s perspective ;)&lt;br /&gt;&lt;a href=&quot;http://torjo.blogspot.com/2008/03/paying-your-people.html&quot;&gt;http://torjo.blogspot.com/2008/03/paying-your-people.html&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://saeedsiam.blogspot.com/feeds/8915382601581494809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4518069758291054188/8915382601581494809' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/8915382601581494809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/8915382601581494809'/><link rel='alternate' type='text/html' href='http://saeedsiam.blogspot.com/2008/04/how-to-run-company-or-how-not-to.html' title='How to run a company ( Or How not to )'/><author><name>Siam</name><uri>http://www.blogger.com/profile/10649652287968876970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4518069758291054188.post-2220923645728424680</id><published>2008-04-08T16:36:00.006+06:00</published><updated>2008-06-02T12:44:25.972+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GSoC"/><category scheme="http://www.blogger.com/atom/ns#" term="Jato"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenSource"/><title type='text'>Jato , The First Look</title><content type='html'>Usually looking into any OpenSource project is rather intimidating. But ,&lt;a href=&quot;http://jatovm.sourceforge.net/index.html&quot;&gt;Jato&lt;/a&gt;, at the first look, did not seem that scary to me. The code base is not that large and I was somehow familiar with the field (at least I thought that !). And particularly the project owner was very nice to work with.&lt;br /&gt;&lt;br /&gt;So , armed with git , I downloaded the source code , and started to hack on it (Who wants to go to the beach in a sunny day , when you can code ;) ) So far I have submitted &lt;a href=&quot;http://git.kernel.org/?p=java/jato/jato.git;a=commitdiff;h=653211881d7c318a40932054a22fb558c457abe7&quot;&gt;patch&lt;/a&gt; for &lt;a href=&quot;http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html#anewarray&quot;&gt;anewarray&lt;/a&gt; .&lt;br /&gt;&lt;br /&gt;Initially  ,it took times to grasp the idea . But thanks to &lt;a href=&quot;http://penberg.blogspot.com/&quot;&gt;Pekka Enberg&lt;/a&gt; , with his help , the ride so far is fun.</content><link rel='replies' type='application/atom+xml' href='http://saeedsiam.blogspot.com/feeds/2220923645728424680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4518069758291054188/2220923645728424680' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/2220923645728424680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/2220923645728424680'/><link rel='alternate' type='text/html' href='http://saeedsiam.blogspot.com/2008/04/jato-first-look.html' title='Jato , The First Look'/><author><name>Siam</name><uri>http://www.blogger.com/profile/10649652287968876970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4518069758291054188.post-4753263254688126763</id><published>2008-02-14T17:57:00.004+06:00</published><updated>2008-02-14T18:20:52.336+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Setup"/><title type='text'>Setting Java plugin for Firefox</title><content type='html'>If you have JDK or JRE installed, enabling java in Firefox is easy.&lt;br /&gt;Just make a symbolic link of &lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;libjavaplugin_oji.so&lt;/span&gt; resided in your JRE to your Firefox-Plugin directory.&lt;br /&gt;&lt;br /&gt;In short ,&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;ln -s $JAVA_HOME/jre/plugin/i386/ns7-gcc29/libjavaplugin_oji.so /usr/lib/firefox-2.0.0.3/plugins/&lt;span style=&quot;font-style: italic;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;will enable java in your Firefox.</content><link rel='replies' type='application/atom+xml' href='http://saeedsiam.blogspot.com/feeds/4753263254688126763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4518069758291054188/4753263254688126763' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/4753263254688126763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/4753263254688126763'/><link rel='alternate' type='text/html' href='http://saeedsiam.blogspot.com/2008/02/setting-java-plugin-for-firefox.html' title='Setting Java plugin for Firefox'/><author><name>Siam</name><uri>http://www.blogger.com/profile/10649652287968876970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4518069758291054188.post-1831487865893015159</id><published>2008-02-13T13:42:00.002+06:00</published><updated>2008-04-06T13:03:11.796+06:00</updated><title type='text'>Setting Java Path</title><content type='html'>To set  Java path for all user, it is needed to  edit /etc/profile&lt;br /&gt;&lt;br /&gt;Assuming that you have installed Java at &lt;span style=&quot;font-style: italic;&quot;&gt;/usr/java/&lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;jdk1.6.0_02 &lt;/span&gt;&lt;br /&gt;append the following lines at &lt;span style=&quot;font-style: italic;&quot;&gt;/etc/profile&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;    export JAVA_HOME=/usr/java/jdk1.6.0_02&lt;br /&gt;&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;    export PATH=$JAVA_HOME/bin:$PATH&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;  &lt;br /&gt;export CLASSPATH=$JAVA_HOME/lib&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;You can also edit .bashrc to provide user specific Java path setup.</content><link rel='replies' type='application/atom+xml' href='http://saeedsiam.blogspot.com/feeds/1831487865893015159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4518069758291054188/1831487865893015159' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/1831487865893015159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/1831487865893015159'/><link rel='alternate' type='text/html' href='http://saeedsiam.blogspot.com/2008/02/setting-java-path.html' title='Setting Java Path'/><author><name>Siam</name><uri>http://www.blogger.com/profile/10649652287968876970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4518069758291054188.post-3460779599584524460</id><published>2008-01-23T23:49:00.001+06:00</published><updated>2008-02-26T16:00:35.688+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="J2ME"/><title type='text'>J2ME</title><content type='html'>We&#39;ve released new LivTv version last week. Encountering J2ME technology for the first time was fun ( I mean it ). But device dependency was the real pain in the ass.Here are some learned-in-hard-way facts for the newbies in the brave new world of J2ME.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt; Never ever believe your emulator . Build incrementally and run the program in the widest number of devices possible.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;If any program runs smoothly in other devices but seems to hang in Nokia N70, check if there is any UnsupportedOperationException(default action in newly created functions in NetBeans) anywhere . NokiaN70 stalls at the very sight of UnsupportedOperationException even if it has not been thrown during runtime.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Do not calculate the height or width of the canvas in the constructor of any class derived from abstract Canvas class. Some phones returns wrong result when Canvas.getHeight() or Canvas.getWidth() is called in the constructor .&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Never ever draw anything using absolute pixel distance . It is destined to make a mess for phones having different resolutions. Instead make it as general as possible . For example if you are  drawing a string surrounded by a rectangle , then use stringWidth() or getHeight() methods declared in Font class to calculate  the height and width of surrounding rectangle. Remember the first law, Do not believe the emulator.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Trying to access camera in a Samsung device by using J2ME API may turn out as a waste of time.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Some Samsung devices place icons and other informations at the top of the canvas. So dont just start to draw from (0,0), make it dynamical too.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt; J2ME threads are somehow different than Java threads. In J2ME , one thread can not stop, pause or resume another thread, keeping that in mind during design may save from lot of head scratching later.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Adding  multiple commands in an alert may cause weird behavior in NokiaN90.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;If URL contains &lt;span style=&quot;font-style: italic;&quot;&gt;&quot;|&quot;&lt;/span&gt;  ( pipe symbol ) , NokiaN95 fails to open that Http Connection . One way around  it is using Base64 encoder and decoder .&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Hope, this helps.</content><link rel='replies' type='application/atom+xml' href='http://saeedsiam.blogspot.com/feeds/3460779599584524460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4518069758291054188/3460779599584524460' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/3460779599584524460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/3460779599584524460'/><link rel='alternate' type='text/html' href='http://saeedsiam.blogspot.com/2008/01/j2me.html' title='J2ME'/><author><name>Siam</name><uri>http://www.blogger.com/profile/10649652287968876970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4518069758291054188.post-6149428167277632608</id><published>2007-10-06T03:32:00.000+06:00</published><updated>2007-10-06T03:34:18.141+06:00</updated><title type='text'>কম bandwidth এর লাইনে yum ব্যবহার</title><content type='html'>fedora থেকে software ইনস্টল অথবা আপডেট করার সবচেয়ে সহজ এবং নির্ভরযোগ্য উপায় yum ব্যবহার করা। কিন্তু bandwidth যথেষ্ট বেশি না হলে default কনফিগারেশনে yum ব্যবহার করা প্রায় অসম্ভব, ক্রমাগত &#39;timed out&#39; মেসেজ এ জীবন জেরবার হয়ে যাবে আপনার।&lt;br /&gt;&lt;br /&gt;তবে কনফিগারেশনে কিছু পরিবর্তন করলেই yum কম bandwidth এর লাইন থেকেও ব্যবহার করতে পারবেন।&lt;br /&gt;প্রথমেই root user হয়ে আপনার প্রিয় text editor এ /etc/yum.conf ওপেন করুন।&lt;br /&gt;&lt;br /&gt;retries বাড়িয়ে দিন। যেমন,retries=10&lt;br /&gt;&lt;br /&gt;timeout বাড়িয়ে দিন।যেমন,timeout=300&lt;br /&gt;&lt;br /&gt;সেভ করুন।</content><link rel='replies' type='application/atom+xml' href='http://saeedsiam.blogspot.com/feeds/6149428167277632608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4518069758291054188/6149428167277632608' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/6149428167277632608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/6149428167277632608'/><link rel='alternate' type='text/html' href='http://saeedsiam.blogspot.com/2007/10/bandwidth-yum.html' title='কম bandwidth এর লাইনে yum ব্যবহার'/><author><name>Siam</name><uri>http://www.blogger.com/profile/10649652287968876970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4518069758291054188.post-1690990429451007488</id><published>2007-10-04T22:45:00.000+06:00</published><updated>2008-12-11T14:20:37.563+06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Bengali Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Internet"/><category scheme="http://www.blogger.com/atom/ns#" term="Mobile"/><category scheme="http://www.blogger.com/atom/ns#" term="ইন্টারনেট"/><category scheme="http://www.blogger.com/atom/ns#" term="মোবাইল"/><category scheme="http://www.blogger.com/atom/ns#" term="লিনাক্স"/><title type='text'>লিনাক্সে মোবাইল থেকে ইন্টারনেট</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;[This Post contains Bangla text, If you see garbled characters,  please, set up Bangla Unicode support]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;pppd command ব্যবহার করে লিনাক্স থেকে মোবাইলের মাধ্যমে ইন্টারনেটে সংযুক্ত হওয়া যায়।&lt;br /&gt;কিন্তু, pppd configure করা একটু ঝামেলার এবং কোনো গ্রাফিকাল ইন্টারফেস না থাকায়&lt;br /&gt;সাধারণ ব্যবহারকারীরা মনে হয় KPPP তেই সাচ্ছন্দ্যবোধ করবেন।&lt;br /&gt;&lt;br /&gt;এর জন্য আপনাকে জানতে হবে আপনার মোবাইলটি কোন সিরিয়াল  ডিভাইসের সাথে সংযুক্ত হয়েছে ,&lt;br /&gt;যা নির্ভর করবে আপনার মোবাইল ও pc এর সাথে connection এর উপর।&lt;br /&gt;&lt;br /&gt;সাধারণত&lt;br /&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;ইনফ্রারেড (IrDA) ডিভাইসের জন্য /dev/ircomm0&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;ব্লুটুথ ডিভাইসের জন্য /dev/ttyUB0  &lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt; USB ডিভাইসের জন্য /dev/ttyUSB0&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;USB সিরিয়াল ডিভাইসের জন্য /dev/ttyACM0 &lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;USB cable দিয়ে সংযুক্ত হলে সাধারণত /dev/ttyACM0 ব্যবহৃত হয়।&lt;br /&gt;তবে নিশ্চিত হওয়ার জন্য মোবাইলটিকে কম্পিউটারের সাথে লাগিয়ে ,root user হয়ে টার্মিনালে&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;dmesg|tail|grep tty &lt;/span&gt;কমান্ডটি লিখে দেখুন।&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;এবার টার্মিনালে গিয়ে&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;kppp &amp;amp;&lt;/span&gt;&lt;br /&gt;লিখে অথবা প্যানেল এর মেনুতে গিয়ে kppp চালু করুন।&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj0UeZewR55Q2H-2tGqeF3l4aF7JX3hvthbl4x0QHBS92EohESlgDvRTUvdwnDOusKRNZwuGzhkcwjlU0k8hodW8zPHifV-R5aGhT-jqbhN8Q-epm9ubBs-Cn-KCjnjWNAunQ5kewM3hI/s1600-h/0.png&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj0UeZewR55Q2H-2tGqeF3l4aF7JX3hvthbl4x0QHBS92EohESlgDvRTUvdwnDOusKRNZwuGzhkcwjlU0k8hodW8zPHifV-R5aGhT-jqbhN8Q-epm9ubBs-Cn-KCjnjWNAunQ5kewM3hI/s320/0.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5117531167402129970&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;প্রথমে kppp কনফিগার করে নিতে হবে। এর জন্য configure এ ক্লিক করুন,&lt;br /&gt;তারপর account ট্যাব এ গিয়ে new তে ক্লিক করুন,&lt;br /&gt;Wizard নাকি Manual Setup এর Option এ Manual Setup সিলেক্ট করুন।&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDZd-PiwyGArO-vLbjaAIpPCtqnBAPxonARGMjGUbyQDQKT9TBbF45KVuT8vZAPn4P-Uk87jZmhLAwRCdkdS4Og1dWvBTuOpkzjCYRTvTo8QgdfqMFDTf48urVhkADeSQRE43vb6JpNoA/s1600-h/Screenshot-New+Account+-+KPPP.png&quot;&gt;&lt;img style=&quot;margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDZd-PiwyGArO-vLbjaAIpPCtqnBAPxonARGMjGUbyQDQKT9TBbF45KVuT8vZAPn4P-Uk87jZmhLAwRCdkdS4Og1dWvBTuOpkzjCYRTvTo8QgdfqMFDTf48urVhkADeSQRE43vb6JpNoA/s320/Screenshot-New+Account+-+KPPP.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5117548845487520354&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;/br&gt;&lt;/br&gt;&lt;/br&gt;&lt;/br&gt;&lt;li&gt;Dial ট্যাবে গিয়ে Connection Name দিন (যা ইচছা :D )&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Phone Number এ add করুন *99***1#( আপনার  নেটওয়ার্ক অপারেটর এর ডায়াল নাম্বার )&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Authentication এ গিয়ে Script-based সিলেক্ট করুন।&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;ok করুন&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/br&gt;&lt;/br&gt;&lt;/br&gt;&lt;/br&gt;এবার Modem ট্যাব এ যান, new তে ক্লিক করুন এবং Device ট্যাব এ যান,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-omHKIuz6vsuWwVtrUYDCPXeoUj3_eU59pooeLRiHsnu2jBvB-Fl6XEkRGl9dDAEuPMquAb6RGPxSRA4oPHICLcM9_I7Xc0DW4DEF1iV2KR-QfiICQKJQGZLlKT9OJRBY_vi_lpKXVrI/s1600-h/Screenshot-Edit+Modem:+mobmodem+-+KPPP.png&quot;&gt;&lt;img style=&quot;margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-omHKIuz6vsuWwVtrUYDCPXeoUj3_eU59pooeLRiHsnu2jBvB-Fl6XEkRGl9dDAEuPMquAb6RGPxSRA4oPHICLcM9_I7Xc0DW4DEF1iV2KR-QfiICQKJQGZLlKT9OJRBY_vi_lpKXVrI/s320/Screenshot-Edit+Modem:+mobmodem+-+KPPP.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5117550739568097906&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Modem Name দিন (যা খুশি :D)&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Modem device এ গিয়ে মোবাইলটি যে সিরিয়াল ডিভাইস এর সাথে সংযুক্ত হয়েছে সেটি সিলেক্ট করুন।&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Connection Speed সিলেক্ট করুন&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSwdKFUMAzgwSRZcH5LpLcg_OW3CTx8txALtLYesvgkSp7uhrcdKCCUu8sLLTScBNW49Rko0zHd65GEOe1iMUTfYLWEZm-X_BxSHMTfYTB6O1Y4uWIgMvd-eos945sOva069CPM9wdH20/s1600-h/3.png&quot;&gt;&lt;img style=&quot;margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSwdKFUMAzgwSRZcH5LpLcg_OW3CTx8txALtLYesvgkSp7uhrcdKCCUu8sLLTScBNW49Rko0zHd65GEOe1iMUTfYLWEZm-X_BxSHMTfYTB6O1Y4uWIgMvd-eos945sOva069CPM9wdH20/s320/3.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5117551190539664002&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;এবার Modem tab এ গিয়ে Query Modem এ ক্লিক করুন&lt;br /&gt;এখানে যদি কোনে সমস্যা হয়, তাহলে Modem device এ ঠিক ডিভাইস সিলেক্ট করা আছে কিনা দেখুন।&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;এবার Modem Commands এ যান,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgofEU8YTkJ6p-ResZbcNzC-o26VCBceNIX4QL59P-SpW1dloeXI6Nl5RbWcw8TKasFNqLNpEJfthswCFAG8Vi6YqDzGlmFxZ4YLoMx8-uxZZWEKXH85ArD19fn9XWHYM1ysYrnuuaN3V8/s1600-h/4.png&quot;&gt;&lt;img style=&quot;margin: 0pt 0pt 0px 20px; float: left; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgofEU8YTkJ6p-ResZbcNzC-o26VCBceNIX4QL59P-SpW1dloeXI6Nl5RbWcw8TKasFNqLNpEJfthswCFAG8Vi6YqDzGlmFxZ4YLoMx8-uxZZWEKXH85ArD19fn9XWHYM1ysYrnuuaN3V8/s320/4.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5117551723115608722&quot; border=&quot;1&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;    Dial String এ &lt;span style=&quot;font-weight: bold;&quot;&gt;ATDT&lt;/span&gt; থাকলে &lt;span style=&quot;font-weight: bold;&quot;&gt;ATD&lt;/span&gt; করুন।&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;    GP connection&lt;/span&gt; যারা ব্যবহার করছেন তারা Initialization String 2: তে &lt;span style=&quot;font-style: italic;&quot;&gt;AT+CGDCONT=1,&quot;IP&quot;,&quot;gpinternet&quot;,&quot;&quot;,0,0 &lt;/span&gt;লিখুন।  অন্যান্য অপারেটরদের ক্ষেত্রে কিছু করতে হবে না।&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;    ok করুন।&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgkyK_4mo6uhEPyoOf6zza2L3lG52i2mM7vdtMplRbNailNqYV3VBtHojvtm41KQmshJepezvECtUc0BLcA41w8lC8v4-Bl5fO31ekBYQ4BQNEgYAeRbtEXd7Vt6nKfsyBUR6o3VlGr5A/s1600-h/Screenshot-KPPP+Configuration+-+KPPP.png&quot;&gt;&lt;img style=&quot;margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgkyK_4mo6uhEPyoOf6zza2L3lG52i2mM7vdtMplRbNailNqYV3VBtHojvtm41KQmshJepezvECtUc0BLcA41w8lC8v4-Bl5fO31ekBYQ4BQNEgYAeRbtEXd7Vt6nKfsyBUR6o3VlGr5A/s320/Screenshot-KPPP+Configuration+-+KPPP.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5117553114685012642&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;এবার Misc ট্যাবে গিয়ে Dock into Panel On Connect সিলেক্ট করুন ।&lt;br /&gt;(না করলেও চলে ,কিন্তু আমার প্রিয় Option এটা ;) )&lt;br /&gt;ok করুন।&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGQaSzf-XGb9JWfRk_ZhzMLwzohrq_N1XDxb58mw8u53FkW5JedLWLRIcQydbyXPe7pv-ajSLNkLF2tsDNcAYj0djWy3beQbTZ_BqNgb9t-FMazPtLxOlqQ9bApjcMrYAVW6N-Safnaoo/s1600-h/Screenshot-KPPP-1.png&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: right; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGQaSzf-XGb9JWfRk_ZhzMLwzohrq_N1XDxb58mw8u53FkW5JedLWLRIcQydbyXPe7pv-ajSLNkLF2tsDNcAYj0djWy3beQbTZ_BqNgb9t-FMazPtLxOlqQ9bApjcMrYAVW6N-Safnaoo/s320/Screenshot-KPPP-1.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5117564539298020018&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Connect এ ক্লিক করুন। ব্যস ,আপনি কানেক্টেড :D&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://saeedsiam.blogspot.com/feeds/1690990429451007488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4518069758291054188/1690990429451007488' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/1690990429451007488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4518069758291054188/posts/default/1690990429451007488'/><link rel='alternate' type='text/html' href='http://saeedsiam.blogspot.com/2007/10/blog-post.html' title='লিনাক্সে মোবাইল থেকে ইন্টারনেট'/><author><name>Siam</name><uri>http://www.blogger.com/profile/10649652287968876970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj0UeZewR55Q2H-2tGqeF3l4aF7JX3hvthbl4x0QHBS92EohESlgDvRTUvdwnDOusKRNZwuGzhkcwjlU0k8hodW8zPHifV-R5aGhT-jqbhN8Q-epm9ubBs-Cn-KCjnjWNAunQ5kewM3hI/s72-c/0.png" height="72" width="72"/><thr:total>2</thr:total></entry></feed>