tag:blogger.com,1999:blog-200853532023-11-16T05:28:58.437+11:00ClearBottleSomewhat interesting blogs about technical bits, my life and the life of others in Germany...it is only my views, but hey what do I know...And hey, this German blog is in English...tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.comBlogger31125tag:blogger.com,1999:blog-20085353.post-75565064234356893932014-07-26T20:35:00.003+10:002014-07-26T20:35:29.815+10:00Idea: Road Trip games<span style="font-family: Arial, Helvetica, sans-serif;">I had an idea. It was brewing during a day trip with the family in the countryside. I remember that when I was on a day trip with my siblings and parents, we play two games, one was car cricket and the other was a car spotting.</span><div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">The car cricket game is a bit complicated. It was based upon a numbers that appear on the car number plate. As in a cricket game, the last digit in the number plate is the runs, and it is only used from a specific car or a bus. When the last digit is a 0, a wicket is produced. When 12 wickets is encountered, the next person takes its turn at batting. When everyone had its turn, the scores are added up and who ever has the largest runs is the winner.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">The car spotting game is a lot simpler than car cricket game. Before the journey starts, a brand of car is selected. It could be a BMW, Porsche or VolksWagen. When someone spots the car, its brand name shouted out. A point is given to him. At the end of the trip, the person with the highest score is the winner.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">It is possible to encapsulate these two games into a mobile app?</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"> </span></div>
tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com4tag:blogger.com,1999:blog-20085353.post-54890943477002323132014-05-14T02:23:00.002+10:002014-05-14T02:23:44.329+10:00Gmail Logging<div>
<span style="font-family: Arial,Helvetica,sans-serif;"><a href="http://mako.cc/copyrighteous/google-has-most-of-my-email-because-it-has-all-of-yours">A story posted on hacker news</a> about Google logging every single
email you ever wrote is an interesting discussion piece. Of course,
that is assuming that someone of the communication chain is using
Google's services. </span><div>
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<span style="font-family: Arial,Helvetica,sans-serif;">At each point, an opportunity of
storing the data is presented. Let's look at the chain. But let me
premise that I am not network engineer, so they will be gaps in my
analysis. </span></div>
<ol>
<li><span style="font-family: Arial,Helvetica,sans-serif;">Joe sent the email on his computer to his brother Peter. A copy is saved on his email client. Typically in his sent folder.</span></li>
<li><span style="font-family: Arial,Helvetica,sans-serif;">The mail server received his email to dispatch to the recipient. The mail server could save a copy of the email. </span></li>
<li><span style="font-family: Arial,Helvetica,sans-serif;">The receiving mail server accepts the email and stores it until Peter is ready to take it. The mail server here stores it.</span></li>
<li><span style="font-family: Arial,Helvetica,sans-serif;">Peter connect to the mail server and download the email. It is stored in the Peter's inbox.</span></li>
</ol>
<span style="font-family: Arial,Helvetica,sans-serif;"><br />Just with my simple communication chain, each link provides an opportunity to stored the email.</span><div>
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></div>
<span style="font-family: Arial,Helvetica,sans-serif;">Once
you throw in a smartphone, cloud email clients that are accessible on
multiple computer, the opportunity increases quite quickly. </span>tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0tag:blogger.com,1999:blog-20085353.post-12614758102390270952014-05-06T06:36:00.002+10:002014-05-06T06:36:36.736+10:00dupfinder<span style="font-family: Arial, Helvetica, sans-serif;">My family and I own about seven devices that takes photos. Most of these devices are phones. Funny enough, we only have one camera. With some many photos floating about, managing them is a headache.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">The first step in managing these many photos is to weed out the duplicates. One sure way of generating duplicates on our computer is not to take care when transferring them from the phone to the computer. The following is the typical situation.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<br />
<ul>
<li><span style="font-family: Arial, Helvetica, sans-serif;">plug the phone to the computer.</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">transfer the pictures to the computer.</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">I don't delete the photos from my phone as I want to see them as I carry my phone about.</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">A few days later, I would repeat the download cycle again, except that I would copy all the photos to different directory. I can't remember where I put the photos a few days ago and I am too scared that I might delete photos.</span></li>
</ul>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">To overcome this problem, I need a python script.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">The algorithm is simple. In 3 simple steps,</span></div>
<div>
<ol>
<li><span style="font-family: Arial, Helvetica, sans-serif;">For each file generate a md5 digest of it.</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">group all the files that have the md5 digest together.</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">copy a file from each group to a new directory</span></li>
</ol>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">The underlying assumption is that collisions are not possible, but as we all know (<a href="http://en.wikipedia.org/wiki/MD5#Collision_vulnerabilities">http://en.wikipedia.org/wiki/MD5#Collision_vulnerabilities</a></span><span style="font-family: Arial, Helvetica, sans-serif;">) md5 are not collision free.</span></div>
</div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">The script seems to be relatively fast. It through its way through 2500 photos in about 10mins. This is on an Mac Mini with an 2.7Ghz i7 processor. </span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">The first version is not fancy and not loaded up with options. There are a number of options i would like to add, including a paranoid and a statistical mode</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">If you are interested, t</span><span style="font-family: Arial, Helvetica, sans-serif;">he source code is available at my Github (<a href="https://github.com/tyc/dupfinder">https://github.com/tyc/dupfinder</a></span><span style="font-family: Arial, Helvetica, sans-serif;">) </span></div>
tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0tag:blogger.com,1999:blog-20085353.post-511397786725685562014-01-19T08:32:00.002+11:002014-01-19T08:32:34.982+11:00idea for side project #1<span style="font-family: Arial, Helvetica, sans-serif; font-size: large;">Problem</span><div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Not knowing how often the lights are being turned on when it is not being used.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif; font-size: large;">Solution</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">To solve this problem, data must be collected to understand usage pattern of the environment. From this problem, when the light switch is turned on and off, the system will take a note of the date and time of each event. Ideally, each light source would have an accompanying sensor.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Over a course of about two months, enough data would be collected to the system to start doing some preventive measurement.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">However, the first measurements it would provide is how much energy is being used by the lights. This should correlate to your power bill.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Secondly, due to the pattern that it has analysed, if anything falls outside the usage pattern, a notification could be sent out. Potentially, saving money.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">The sensor could be coupled to a PIR. The analysis could draw patterns on the presence of movements and the active status of the light.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">In a typical family house with children, lights will be left on when they exited the room. This system will help reduce the amount of the light is switched on and no one is in the room</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0tag:blogger.com,1999:blog-20085353.post-12093650948167633722013-12-28T02:24:00.001+11:002013-12-28T02:35:13.858+11:00Keep your App signing keys safe.<span style="font-family: Arial, Helvetica, sans-serif;">Today I tried to publish version 3 of Dream Noise but struck against a problem that I was not aware previously.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">During the preparation of the apk for uploading to Google Play, I forgot the password for the signing. "OK, no big deal. I will just delete the old keystore and create a new one," I thought. Well, that went well until I upload the apk onto Google Play. As the version 3 of the Dream Noise was signed with a different key, Google detected that the difference and reject the submission.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">I can see that this is the correct thing for Google to do. The signing of apk ensures that it can only be updated by the same people.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">So the lesson learn for me is to keep a note of the password that I have used to create the keystore.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">To recovery of this problem is to unpublish Dream Noise from Google Play, wait for it to be removed. Upload a new application on to it. That is the plan. Let see if it will work out like that.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">This is a link on StackOverflow that addresses this problem. Take heed.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<a href="http://stackoverflow.com/questions/4843212/the-apk-must-be-signed-with-the-same-certificates-as-the-previous-version">http://stackoverflow.com/questions/4843212/the-apk-must-be-signed-with-the-same-certificates-as-the-previous-version</a>tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0tag:blogger.com,1999:blog-20085353.post-4855467253225859772013-12-16T07:47:00.000+11:002013-12-16T07:47:22.341+11:00Dream Noise is on Google Play<span style="font-family: Arial, Helvetica, sans-serif;">Dream Noise is now published on Google Play. Initially, I wanted to do the right testing phase and run the Alpha / Beta test programs through the Google eco system. After speaking to a couple of friends, it turns out that the simplicity of the app allows it to be published straight away.</span><br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">If you are interested to find out what it is, just to the Google Play link, (<a href="https://play.google.com/store/apps/details?id=com.dreamnoise.application">https://play.google.com/store/apps/details?id=com.dreamnoise.application</a>) to download and play.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">I have also posted the link to Facebook, Google Plus and Twitter. I am now actually sure how to track where the most clicks are coming from. The Google Developer console does have a statistical information, but it is only for downloads. Visits does not count to the Google Play item does get counted.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">So far, it has gone through one iteration. It was mostly to change the background colour from a white colour to something darker. The reasoning is when the user is trying to fall asleep, it would be rather silly to have it a bright light emitting from the phone. So I changed it to a dark blue colour.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0tag:blogger.com,1999:blog-20085353.post-60022797066005059362013-11-30T09:24:00.003+11:002013-11-30T09:24:35.887+11:00zipalign<span style="font-family: Arial, Helvetica, sans-serif;">Before an application is uploaded into Google, it must be aligned to the 32bit boundary. The alignment will be checked by the Google during the upload process. If it fails, a pop up message will say that the .apk is not aligned and reject the upload.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">The zipalign tool is located to </span><span style="font-family: Courier New, Courier, monospace;"><sdk_path>/tools</sdk_path></span><span style="font-family: Arial, Helvetica, sans-serif;">. You can call it directly or add it to your </span><span style="font-family: Courier New, Courier, monospace;">PATH</span><span style="font-family: Arial, Helvetica, sans-serif;"> environment variable.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">To execute it, use the following</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">zipalign -v 4 <infile .apk=""> < outfile.apk></infile></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">The outfile is now ready for upload into Google.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0tag:blogger.com,1999:blog-20085353.post-43444462842922343632013-11-16T09:43:00.003+11:002013-11-16T09:43:45.112+11:00Simple usage of MediaPlayer on Android<span style="font-family: Arial, Helvetica, sans-serif;">In the side project, I wanted to play a sound that I have embedded as part of the resources. After a short research, Android provides </span><span style="font-family: Courier New, Courier, monospace;">MediaPlayer</span><span style="font-family: Arial, Helvetica, sans-serif;"> to help you play sounds and videos. I am only going to use it playback some sounds.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Before I started, I browse over to the <a href="http://developer.android.com/reference/android/media/MediaPlayer.html">MediaPlayer docs</a> on Google. The most important is the state diagram that it is displaying. From here, it is required for states of your implementation of the player to follow.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">To start with, you will need to create your instance of MediaPlayer.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s1">try</span> {</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="s2"> mp</span> = MediaPlayer.create(getApplicationContext(), R.raw.<span class="s2">whitenoise_30s</span>);</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>} <span class="s1">catch</span> (IllegalStateException e) {</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="s3"><span class="Apple-tab-span"></span><span class="Apple-tab-span"></span><span class="Apple-tab-span"></span></span> // <span class="s4">TODO</span> Auto-generated catch block</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span"></span><span class="Apple-tab-span"></span><span class="Apple-tab-span"></span> e.printStackTrace();</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>}</span></div>
<div class="p3">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s2">mp</span>.setLooping(<span class="s1">true</span>);</span></div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="s2">mp</span>.start(); </span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">When </span><span style="font-family: Courier New, Courier, monospace;">create</span><span style="font-family: Arial, Helvetica, sans-serif;">() is called, the </span><span style="font-family: Courier New, Courier, monospace;">MediaPlayer</span><span style="font-family: Arial, Helvetica, sans-serif;"> enters into </span><span style="font-family: Courier New, Courier, monospace;">Prepared</span><span style="font-family: Arial, Helvetica, sans-serif;"> state. This means that we can immediately call the </span><span style="font-family: Courier New, Courier, monospace;">start</span><span style="font-family: Arial, Helvetica, sans-serif;">() and the </span><span style="font-family: Courier New, Courier, monospace;">MediaPlayer</span><span style="font-family: Arial, Helvetica, sans-serif;"> transitioned into the </span><span style="font-family: Courier New, Courier, monospace;">Started</span><span style="font-family: Arial, Helvetica, sans-serif;"> state. The audio will start to play on the speaker.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">To stop the playing, </span><span style="font-family: Courier New, Courier, monospace;">stop</span><span style="font-family: Arial, Helvetica, sans-serif;">() can be called. When </span><span style="font-family: Courier New, Courier, monospace;">stop</span><span style="font-family: Arial, Helvetica, sans-serif;">() is called, the </span><span style="font-family: Courier New, Courier, monospace;">MediaPlayer</span><span style="font-family: Arial, Helvetica, sans-serif;"> transitioned into </span><span style="font-family: Courier New, Courier, monospace;">Stopped</span><span style="font-family: Arial, Helvetica, sans-serif;">. The audio will stop to play and be silent on the speaker.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">To playback, instead of calling </span><span style="font-family: Courier New, Courier, monospace;">create</span><span style="font-family: Arial, Helvetica, sans-serif;">() again, it is better to call </span><span style="font-family: Courier New, Courier, monospace;">prepare</span><span style="font-family: Arial, Helvetica, sans-serif;">(). From the state diagram, the </span><span style="font-family: Courier New, Courier, monospace;">MediaPlayer</span><span style="font-family: Arial, Helvetica, sans-serif;"> will transition from </span><span style="font-family: Courier New, Courier, monospace;">Stopped</span><span style="font-family: Arial, Helvetica, sans-serif;"> to </span><span style="font-family: Courier New, Courier, monospace;">Prepared</span><span style="font-family: Arial, Helvetica, sans-serif;">. A boolean could be used to track if the MediaPlayer has been created or not. This is to indicate whether </span><span style="font-family: Courier New, Courier, monospace;">create</span><span style="font-family: Arial, Helvetica, sans-serif;">() or </span><span style="font-family: Courier New, Courier, monospace;">prepare</span><span style="font-family: Arial, Helvetica, sans-serif;">() should be called. </span>tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0tag:blogger.com,1999:blog-20085353.post-83072605646856501052013-11-02T08:12:00.000+11:002013-11-02T08:12:06.863+11:00Setting up the menu on an Android App.<br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">As I am developing the Android App, I need to add a simple menu for popping up a dialog box to show the version of the application. As far as I know, the only menu that can be popped up is the Menu button. On a phone, this soft button is usually located on the bottom left hand corner.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">I wanted to have a single menu item in the list. It is simple "About"</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Firstly, I create a </span><span style="font-family: Courier New, Courier, monospace;">menu.xml</span><span style="font-family: Arial, Helvetica, sans-serif;"> and placed it in under </span><span style="font-family: Courier New, Courier, monospace;">/res/menu.</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="s1"><span class="s2">xml</span><span class="s3"> </span>version<span class="s3">=</span><span class="s4">"1.0"</span><span class="s3"> </span>encoding<span class="s3">=</span><span class="s4">"utf-8"</span><span class="s1">?></span></span></span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="s1"><</span><span class="s2">menu</span><span class="s3"> </span><span class="s5">xmlns:android</span><span class="s3">=</span>"http://schemas.android.com/apk/res/android"<span class="s1">></span></span></div>
<div class="p3">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="s3"> </span><!-- Single menu item</font></p>
<p class="p3">
<font face="Courier New, Courier, monospace" size="2"> Set id, icon and Title for each menu item</font></p>
<p class="p3">
<font face="Courier New, Courier, monospace" size="2"> --></span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="s3"> </span><span class="s1"><</span><span class="s2">item</span><span class="s3"> </span><span class="s5">android:id</span><span class="s3">=</span>"@+id/menu_about"</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="s3"> </span>android:title<span class="s3">=</span><span class="s4">"About"</span><span class="s3"> </span><span class="s1">/></span></span></div>
<br />
<div class="p4">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="s1"></</span>menu<span class="s1">></span></span></div>
<div class="p4">
<span style="font-family: Courier New, Courier, monospace;"><span class="s1"><br /></span></span></div>
<div class="p4">
<span class="s1"><span style="font-family: Arial, Helvetica, sans-serif;">Secondly, I added the code that adds this menu. This code resides in </span><span style="font-family: Courier New, Courier, monospace;">onCreateOptionMenu() </span><span style="font-family: Arial, Helvetica, sans-serif;">which is in </span><span style="font-family: Courier New, Courier, monospace;">MainActivity.java</span><span style="font-family: Arial, Helvetica, sans-serif;">.</span></span></div>
<div class="p4">
<span class="s1"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span></div>
<div class="p4">
<span class="s1"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="s1"> </span>@Override</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="s2">public</span> <span class="s2">boolean</span> onCreateOptionsMenu(Menu menu) {</span></div>
<div class="p3">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="s1"> </span>// Inflate the menu items for use in the action bar</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> MenuInflater inflater = getMenuInflater();</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> inflater.inflate(R.menu.<span class="s3">main_activity_actions</span>, menu);</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> getMenuInflater().inflate(R.menu.<span class="s3">menu</span>, menu);</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="s2">super</span>.onCreateOptionsMenu(menu);</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="s2">return</span> <span class="s2">true</span>;</span></div>
<div class="p4">
<span class="s1"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">
</span></span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> }</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="p2">
<span style="font-family: Arial, Helvetica, sans-serif;">In the snippet of code, I have also shown the code for the action bar. However, the line of the that creates the option menu the call to</span><span style="font-family: Courier New, Courier, monospace;"> getMenuInflater().</span><span style="font-family: Arial, Helvetica, sans-serif;"> Be sure that the ID of the xml file is referenced correctly.</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace;">When the menu button is clicked, a menu will pop up with only the "About" option displaying.</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="p2">
<span style="font-family: Arial, Helvetica, sans-serif;">Thirdly, I created code to handle the event when the "About" option is selected. This is handled in the</span><span style="font-family: Courier New, Courier, monospace;"> onOptionsItemSelected()</span><span style="font-family: Arial, Helvetica, sans-serif;"> method. So I have the following implementation.</span></div>
<div class="p2">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="p1">
<span style="font-size: x-small;"><span class="s1"> <span style="font-family: Courier New, Courier, monospace;"> </span></span><span style="font-family: Courier New, Courier, monospace;">@Override</span></span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="s2">public</span> <span class="s2">boolean</span> onOptionsItemSelected(MenuItem item) {</span></div>
<div class="p3">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="s1"> </span>// Handle presses on the action bar items</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="s2">switch</span> (item.getItemId()) {</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="s2">case</span> R.id.<span class="s3">action_search</span>:</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Toast.makeText(getApplication(), <span class="s4">"search is selected"</span>,</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Toast.<span class="s3">LENGTH_SHORT</span>).show();</span></div>
<div class="p4">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="Apple-tab-span"> </span>openSearch();</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="s2">return</span> <span class="s2">true</span>;</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="s2">case</span> R.id.<span class="s3">action_settings</span>:</span></div>
<div class="p4">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="Apple-tab-span"> </span></span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Toast.makeText(getApplication(), <span class="s4">"settings is selected"</span>,</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Toast.<span class="s3">LENGTH_SHORT</span>).show();</span></div>
<div class="p4">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> openSettings();</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="s2">return</span> <span class="s2">true</span>;</span></div>
<div class="p4">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> </span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="s2">case</span> R.id.<span class="s3">menu_about</span>:</span></div>
<div class="p3">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="s1"> </span>// Single menu item is selected do something</span></div>
<div class="p3">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="s1"> </span>// <span class="s5">Ex</span>: launching new activity/screen or show alert message</span></div>
<div class="p3">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="s1"> </span>//Toast.makeText(AndroidMenusActivity.this, "<span class="s5">Bookmark</span> is Selected", Toast.LENGTH_SHORT).show();</span></div>
<div class="p4">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> </span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="Apple-tab-span"> </span>String message = getString(R.string.<span class="s3">app_name</span>) + <span class="s4">"\n"</span> + getString(R.string.<span class="s3">app_version</span>);</span></div>
<div class="p4">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="Apple-tab-span"> </span></span></div>
<div class="p3">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="s1"> <span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// pop up a very simple About dialog box.</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>AlertDialog.Builder builder = <span class="s2">new</span> AlertDialog.Builder(<span class="s2">this</span>);</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>builder</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>.setMessage(message)</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>.setPositiveButton(<span class="s4">"OK"</span>, <span class="s2">null</span>)</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span> .show();</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="s2">return</span> <span class="s2">true</span>;</span></div>
<div class="p4">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="s2">default</span>:</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="s2">return</span> <span class="s2">super</span>.onOptionsItemSelected(item);</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> }</span></div>
<div class="p2">
</div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> }</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="p2">
<span style="font-family: Arial, Helvetica, sans-serif;">This implementation also includes actions for when items from the action bar is also selected.</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="p2">
<span style="font-family: Arial, Helvetica, sans-serif;">So when the "About" is selected, a simple dialog box will pop up.</span></div>
<div class="p2">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="p2">
<span style="font-family: Arial, Helvetica, sans-serif;">This code also abstract the strings to strings.xml so that it be changed easily. A snippet is shown below.</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="p2">
<br /></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="s1"><</span><span class="s2">string</span> <span class="s3">name</span>=<span class="s4">"app_name"</span><span class="s1">></span>BackgroundNoise<span class="s1"></</span><span class="s2">string</span><span class="s1">></span></span></div>
<div class="p2">
</div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span class="s1"><</span><span class="s2">string</span> <span class="s3">name</span>=<span class="s4">"app_version"</span><span class="s1">></span>version 0.01<span class="s1"></</span><span class="s2">string</span><span class="s1">></span></span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0tag:blogger.com,1999:blog-20085353.post-34481443608997943602013-04-19T05:57:00.001+10:002013-04-19T05:58:10.426+10:00Started a T-Shirt shopI have always been fascinated by a business like a market stall on a weekend. Since shifting to Germany, the chance of that happening is small.<br />
<br />
So I started to look around the internet to see what is happening. I came across the concept of drop shipping. Drop shipping is a concept where you are selling the physical product, but the inventory is held by your supplier. The supplier also ships the product directly to the customer. Do a check via Google on what drop shipping. Plenty of information will pop up. T-Shirt is a possible avenue.<br />
<br />
The T-Shirt bug started when I came across <a href="http://teespring.com/">Tee Spring</a> after hearing it on Mixergy. The thing about Tee Spring is that it uses the crowd funding model. You design a T-Shirt by putting some text and some graphic on a T-Shirt. Next you specify how many T-Shirt is your minimum quantity, and set your selling price. You will also need to specify the number of days it is on sale for. Once all these are set, it is time to launch it onto the market. The idea is to get the minimum of number of folks to sign up. When the time has expired and if the minimum number of folks have signed up, a production run of the T-Shirt is executed and delivered out. Some folks have had great success with this platform, unfortunately, I didn't<br />
<br />
The next platform I tried was a <a href="http://www.spreadshirt.co.uk/">spreadshirt</a>. It is a more traditional model. You basically create a shop, upload or create some T-shirts, and start the marketing campaign. You can see what my efforts are at <a href="http://smartarsecomments.spreadshirt.co.uk/">http://smartarsecomments.spreadshirt.co.uk/</a>.<br />
<br />
The one thing that I did which I should have taken sometime is the name of the shop. I called it "smart arse comments". In some ways, it portrays a red neck attitude for the shop, not something that I feel happy about. It also limits to what I can sell in the shop. The name of the shop should represent the type of T-Shirt it is selling. In the long term, I definitely don't want to see T-Shirts with smart arse comments on it.<br />
<br />
Well, I have created 8 T-Shirts on it, any haven't managed to sell any yet. Today is the 8th since I started the shop. The next thing I need to do is to create more T-Shirts, and the start the marketing campaign. I hope that the type of T-Shirts that I have for sale is of interest to the general public.<br />
<br />
<br />
<br />
<br />
<br />tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0tag:blogger.com,1999:blog-20085353.post-42889070964634357422013-01-04T10:30:00.000+11:002013-01-04T10:30:09.583+11:00Hacker News in various flavours<br />
<div style="border: 0px; font-family: Helvetica, Arial, 'Droid Sans', sans-serif; font-size: 14px; line-height: 19.983333587646484px; margin: 0px; padding: 0px;">
Hacker News is a news aggregator for news tidbits in the tech work about the hacker community. In this context, hacker means someone who takes something and modifies it to be used in a different manner. The modifies aspect is the hacking activities.</div>
<div style="border: 0px; font-family: Helvetica, Arial, 'Droid Sans', sans-serif; font-size: 14px; line-height: 19.983333587646484px; margin: 0px; padding: 0px;">
<br /></div>
<div style="border: 0px; font-family: Helvetica, Arial, 'Droid Sans', sans-serif; font-size: 14px; line-height: 19.983333587646484px; margin: 0px; padding: 0px;">
So without further ado, the following is how some folks from the HN community likes to show the news items. </div>
<div style="border: 0px; font-family: Helvetica, Arial, 'Droid Sans', sans-serif; font-size: 14px; line-height: 19.983333587646484px; margin: 0px; padding: 0px;">
<br /></div>
<div style="border: 0px; font-family: Helvetica, Arial, 'Droid Sans', sans-serif; font-size: 14px; line-height: 19.983333587646484px; margin: 0px; padding: 0px;">
<span style="font-size: small;"><strong>Websites</strong></span></div>
<div style="border: 0px; font-family: Helvetica, Arial, 'Droid Sans', sans-serif; font-size: 14px; line-height: 19.983333587646484px; margin: 0px; padding: 0px;">
<ul style="border: 0px; list-style-position: outside; margin: 0.2857em 0px 0.714285em 2em; padding: 0px;">
<li style="border: 0px; margin: 0px; padding: 0px;">The official one from Y Combinator. Hacker News - <a href="http://news.ycombinator.com/" id="" shape="rect" style="border: 0px; color: #047ac6; margin: 0px; padding: 0px;" target="_blank">http://news.ycombinator.com/</a></li>
<li style="border: 0px; margin: 0px; padding: 0px;">A monthly printed magazine - Hacker Monthly - <a href="http://news.ycombinator.com/" id="" shape="rect" style="border: 0px; color: #047ac6; margin: 0px; padding: 0px;" target="_blank">http://news.ycombinator.com/</a></li>
<li style="border: 0px; margin: 0px; padding: 0px;">A weekly email newsletter - Hacker Newsletter - <a href="http://www.hackernewsletter.com/" id="" shape="rect" style="border: 0px; color: #047ac6; margin: 0px; padding: 0px;" target="_blank">http://www.hackernewsletter.com</a>/</li>
<li style="border: 0px; margin: 0px; padding: 0px;">Scrape of all the showhn news items - showinghn - <a href="http://showinghn.com/" id="" shape="rect" style="border: 0px; color: #047ac6; margin: 0px; padding: 0px;" target="_blank">http://showinghn.com/</a></li>
<li style="border: 0px; margin: 0px; padding: 0px;">With a different front end UI - an unofficial alternative hacker news interface - <a href="http://hckrnews.com/" id="" shape="rect" style="border: 0px; color: #047ac6; margin: 0px; padding: 0px;" target="_blank">http://hckrnews.com/</a></li>
<li style="border: 0px; margin: 0px; padding: 0px;">hn summaries - <a href="http://hnsummaries.com/" id="" shape="rect" style="border: 0px; color: #047ac6; margin: 0px; padding: 0px;" target="_blank">http://hnsummaries.com/</a></li>
<li style="border: 0px; margin: 0px; padding: 0px;">hacker news mobile - <a href="http://ihackernews.com/" id="" shape="rect" style="border: 0px; color: #047ac6; margin: 0px; padding: 0px;" target="_blank">http://ihackernews.com/</a></li>
<li style="border: 0px; margin: 0px; padding: 0px;">hacker news mobile - <a href="http://hn.gethifi.com/#/" id="" shape="rect" style="border: 0px; color: #047ac6; margin: 0px; padding: 0px;" target="_blank">http://hn.gethifi.com/#/</a></li>
<li style="border: 0px; margin: 0px; padding: 0px;">hacker news daily - <a href="http://www.daemonology.net/hn-daily/" id="" shape="rect" style="border: 0px; color: #047ac6; margin: 0px; padding: 0px;" target="_blank">http://www.daemonology.net/hn-daily/</a></li>
<li style="border: 0px; margin: 0px; padding: 0px;">hacker news rankings - <a href="http://hnrankings.info/" id="" shape="rect" style="border: 0px; color: #047ac6; margin: 0px; padding: 0px;" target="_blank">http://hnrankings.info/</a></li>
<li style="border: 0px; margin: 0px; padding: 0px;">hacker news for IOS - <a href="http://inoads.com/hn/" id="" shape="rect" style="border: 0px; color: #047ac6; margin: 0px; padding: 0px;" target="_blank">http://inoads.com/hn/</a></li>
<li style="border: 0px; margin: 0px; padding: 0px;">hacker slide - <a href="http://hackerslide.com/" id="" shape="rect" style="border: 0px; color: #047ac6; margin: 0px; padding: 0px;" target="_blank">http://hackerslide.com/</a></li>
</ul>
<div style="border: 0px; line-height: 1.428571em; margin-bottom: 0.714285em; padding: 0px;">
<span style="font-size: small;"><strong>Browser extension</strong></span></div>
<ul style="border: 0px; list-style-position: outside; margin: -0.428571em 0px 0.714285em 2em; padding: 0px;">
<li style="border: 0px; margin: 0px; padding: 0px;">chrome extension - autobahn- <a href="http://vlad.github.com/autobahn/" id="" shape="rect" style="border: 0px; color: #047ac6; margin: 0px; padding: 0px;" target="_blank">http://vlad.github.com/autobahn/</a></li>
</ul>
<div style="border: 0px; line-height: 1.428571em; margin-bottom: 0.714285em; padding: 0px;">
<span style="font-size: small;"><strong>Twitter</strong></span></div>
<ul style="border: 0px; list-style-position: outside; margin: -0.428571em 0px 0.714285em 2em; padding: 0px;">
<li style="border: 0px; margin: 0px; padding: 0px;">for items that reached 20 points - Hacker News 20 - <a href="https://twitter.com/newsyc20" id="" shape="rect" style="border: 0px; color: #047ac6; margin: 0px; padding: 0px;" target="_blank">@newsyc20</a></li>
<li style="border: 0px; margin: 0px; padding: 0px;">for items that reached 50 points - Hacker News 50 - <a href="https://twitter.com/newsyc50" id="" shape="rect" style="border: 0px; color: #047ac6; margin: 0px; padding: 0px;" target="_blank">@newsyc50</a></li>
<li style="border: 0px; margin: 0px; padding: 0px;">for items that reached 100 points - Hacker News 100 - <a href="https://twitter.com/newsyc100" id="" shape="rect" style="border: 0px; color: #047ac6; margin: 0px; padding: 0px;" target="_blank">@newsyc100</a></li>
<li style="border: 0px; margin: 0px; padding: 0px;">for items that reached 150 points - Hacker News 150 - <a href="https://twitter.com/newsyc150" id="" shape="rect" style="border: 0px; color: #047ac6; margin: 0px; padding: 0px;" target="_blank">@newsyc150</a></li>
<li style="border: 0px; margin: 0px; padding: 0px;">HN from Y Combinator - <a href="https://twitter.com/hnycombinator" id="" shape="rect" style="border: 0px; color: #047ac6; margin: 0px; padding: 0px;" target="_blank">@hnycombinator</a></li>
<li style="border: 0px; margin: 0px; padding: 0px;">tweet on the showhn - Just Show HN- <a href="https://twitter.com/justshowhn" id="" shape="rect" style="border: 0px; color: #047ac6; margin: 0px; padding: 0px;" target="_blank">@justshowhn</a></li>
<li style="border: 0px; margin: 0px; padding: 0px;">News.YC - <a href="https://twitter.com/HackerNews" id="" shape="rect" style="border: 0px; color: #047ac6; margin: 0px; padding: 0px;" target="_blank">@hackernews</a></li>
<li style="border: 0px; margin: 0px; padding: 0px;">HNTweets - <a href="https://twitter.com/HNTweets" id="" shape="rect" style="border: 0px; color: #047ac6; margin: 0px; padding: 0px;" target="_blank">@hntweets</a></li>
</ul>
</div>
tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com1tag:blogger.com,1999:blog-20085353.post-71518832133023306712012-12-28T10:21:00.001+11:002012-12-28T10:21:39.464+11:00Initial foray into Android development <span style="font-family: Arial, Helvetica, sans-serif;">I took a deep breath and jumped in. You know what, the water is fine.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">I finally made the small jump into Android development. Although, I am just hacking about, I am determine to build something useful. Firstly, useful for me as the first customer, and the useful for anyone else.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">The stimulus for getting started in the Android development is the release of the <a href="http://developer.android.com/sdk/index.html">SDK</a> from Google that is easy to install and to get started upon. The one thing that really threw me off to get started on development on the Android platform getting the development environment working correctly.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">I have always had a low budget x86 PC as my home computer, and this is what I was going to use as my development machine at home. To get the Android development working nicely on this was a nightmare. I recently bit the bullet and got a Mac Mini with a Intel I7 core. Even with this modest setup, it proved to be the silver bullet for me to get started. The nicely packaged SDK also help enormously.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">I downloaded the <a href="http://developer.android.com/sdk/index.html">SDK</a> for Mac from Google. The download from Google installed a properly configured Eclipse and SDK in their correct location. I can simply start Eclipse and start following the <a href="http://developer.android.com/training/index.html">Android developer's training</a>. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">To round up the overall development, I signed up for a Github account. I also had to install Git, but that was pretty painless after following the <a href="http://git-scm.com/downloads">instructions here</a>. I have resisted installing any Git GUI client as I really like the command line interface.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0tag:blogger.com,1999:blog-20085353.post-56575099403605709022012-09-03T07:22:00.000+10:002012-09-03T07:22:07.317+10:00Creating a landing page<span style="font-family: Arial, Helvetica, sans-serif;">If you listen to the many startup podcasts, the one thing that is consistently common among the advice from them when validating an idea is to create a landing page.</span><div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">What is a landing page? Well, a landing page is a website that gives the visitor quick spiel of your idea and a spot for them to signup to it. The idea is to measure how much interest there are out there to you idea. There are no real measure for this except for the number of signups.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">A measure of visitors the landing page is not a good measure as they are only considered as a casual visitors, and does not necessary show real interest in the product.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">My landing page at <a href="http://launch.48translate.com/">launch.48translate.com</a> was based upon the services of <a href="http://launchrock.co/">launchrock.co</a>m. It uses one of the standard template. I just updated the description and the background to give it a different flavour. Looking at it, it is unmistakeably a page from <a href="http://launchrock.com/">launchrock.com</a>.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">My landing page is my attempt to capture an email address which is a sign of the interest.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">I could have gone with a different implementation by using something like <a href="http://weebly.com/">weebly.com</a> and embedding a widget from someone like <a href="http://mailchimp.com/">mailchimp.com</a>. Both solutions are free to get started on, but the weebly implementation requires two services, where as launchrock.com only requires the one services.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Some things to lookout for. </span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<ol>
<li><span style="font-family: Arial, Helvetica, sans-serif;">When you first starting a landing page, make sure that your naked address and your www address also redirected to it. </span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Get someone to review your text that you put up on the landing page. Make sure that it is correct. Nothing more embarrassing that publishing some action that you cannot support.</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Have something on your landing page that could encourage visitors to signup.</span></li>
</ol>
</div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0tag:blogger.com,1999:blog-20085353.post-10843157027128946952012-07-10T07:01:00.000+10:002012-07-10T07:01:17.394+10:00csv.DictReader in python<span style="font-family: Arial, Helvetica, sans-serif;">I am playing around getting python to parse simple CSV files. In the past, it would get quite difficult no matter which language I choose to do it. PERL does some useful parsing of it, but python is dead simple. It becomes even simpler when usign the csv.DictReader. The following snippet of code illustrates the point.</span><br />
<br />
<br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;">#!/usr/bin/python</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;">from optparse import OptionParser</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;">import csv</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;">parser = OptionParser()</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;">parser.add_option("-f", "--filename", dest="filename", help="the filename of the csv file")</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;">(options, args)=parser.parse_args()</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;">if options.filename != None:</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;"> csv_filename = str(options.filename)</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;">else:</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;"> csv_filename = "foobar.csv"</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;">print "csv file is " + csv_filename</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;">inputfile = open(csv_filename, "rb")</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;">csvReader = csv.DictReader(inputfile, fieldnames=['create_ts','title','url','id','hn_discussion'], delimiter=',', quotechar='"')</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;">for row in csvReader:</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;"> print row['id'] + " " + row['url']</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;">inputfile.close()</span><br />
<div>
<br /></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">The first part just parses for an input from the console for a filename of the csv file.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">The second part is the interesting part where it parses the file as per the given fieldnames. The fieldnames were given during the call of the csv.DictReader.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">By the way, this snippet of code is more prototype rather than production. Much error checking is missing and exception handling is missing, so beware.</span></div>
<div>
<br /></div>
<div>
<br /></div>tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0tag:blogger.com,1999:blog-20085353.post-80771419472998999362012-06-26T07:48:00.001+10:002012-06-26T07:48:08.381+10:00What platform for Mobile apps?<span style="font-family: Arial, Helvetica, sans-serif;">This is just a list of development platforms that I can use for mobile apps.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">Google <a href="http://developer.android.com/sdk/index.html">Android SDK</a> - Only for Android, however supported by Google.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><a href="http://haxe.org/">Haxe.org</a> - Multi-target. Also needs the Google Android SDK as it generates C++ code. Haxe is a multi target language, similar to Java.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0tag:blogger.com,1999:blog-20085353.post-52204195320130881972012-06-25T07:33:00.001+10:002012-07-07T07:26:34.766+10:00Googlecl, what the f*ck is it?<span style="font-family: Arial, Helvetica, sans-serif;">I was going crazy trying to workout a way to upload data into the my blogger account. Sure, I could just write a post via the post option within blogger, but I want to do this in an automatic manner.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">My first was to sent an email via the command line to blogger. The problem is that while it sort of work, I came across the problem that the post is uploaded and marked as a draft version. So I still need to login and publish it. Another problem is that my posts have pictures in them. I am unable to embedded a picture in the email that I am sending via the command line.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">The second attempt is to access the Blogger API directly. However, during my research in the Blogger API, I came across <a href="http://code.google.com/p/googlecl/">googlecl</a>. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">googlecl is Google's answer to accessing data to their services. Their services includes Blogger, Picasa, Docs and many more.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">googlecl is also able to upload a file. So if that file is a html file, it would be rendered quite nicely by blogger.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">The commandline is</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">google blogger post --src [filename.html] --title "a title" --tags "awesome"</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">The <a href="http://maketecheasier.com/beginner-guide-googlecl/2010/06/23">article</a> has some hints if googlecl docs are too confusing.</span>tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0tag:blogger.com,1999:blog-20085353.post-75741512273406159342012-05-07T08:04:00.000+10:002012-05-07T08:04:02.274+10:00Creating a news aggregator, showhn.blogspot.com<span style="font-family: Arial, Helvetica, sans-serif;">I have been a frequent leader of the tech news aggregator site at <a href="http://news.ycombinator.com/">Hacker News</a>. It is basically a collection of links and discussions of tech startup news, or just tech news in general that would appeal to the startup hacker.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">When someone wants to show case their weekend projects, they usually post a "Show HN" posts on hacker news. As a way of increasing their presence, I have filtered all the Hacker News post for the "Show HN", screen grab the webpage, voila, <a href="http://showhn.blogspot.com/">showhn.blogspot.com</a> is born.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">I have automate the collecting of data via an Google Spreadsheet App script. It uses the <a href="http://www.hnsearch.com/api">hnsearch api</a> to grab the data.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">The hnsearch api works directly with the Hacker News database. There are a couple of other hacker news API that performs a HTML scrapes on the Hacker News website and store it in their internal database. An API is available to access the scraped data.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">The screen capture is performed using a Chrome screen capture plugin, specifically the <a href="https://www.google.de/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CIMBEBYwAA&url=https%3A%2F%2Fchrome.google.com%2Fwebstore%2Fdetail%2Fcpngackimfmofbokmjmljamhdncknpmg&ei=yfSmT6ibKbDc4QSf2ZiXCQ&usg=AFQjCNEfJ63_zEWi6NLaIFx_ufaCMpZtog&sig2=AIGkEjTsQux-PyyaFEnuWg">Google Chrome Screen capture</a>. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">At the moment, I am treating this as a learning tool. I am especially on getting a handle on how data can be obtained from the websites, and how that data can be manipulate. So far it has been quite a enlightening experience.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0tag:blogger.com,1999:blog-20085353.post-31033824967920136142012-04-12T05:53:00.002+10:002012-04-12T05:53:49.962+10:00This is getting annoying...validation of an idea.<span style="font-family: Arial, Helvetica, sans-serif;">I got a email from Nev (of AppSumo fame) about how many people are having good success in validating their ideas. So the AppSumo guys thought it would be a good idea to run a competition to see who had best validations, and the winner gets a trip to Austin, Texas.</span><div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Well, I accepted the challenge and posted up a validation idea. Check it out here, <a href="http://totalcostofcar.weebly.com/">http://totalcostofcar.weebly.com/</a> for the launching site.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">So I posted up my validation response and ticked the box to receive any follow up messages. This was getting good until some crazy spammers started to post comments, eh spams, up. It was getting annoying.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"> </span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">As for my idea, I am going to run this as a slow ramp up. Firstly, I don't have the time to launch into full time, and secondly, I have many things to learn, and thirdly, it started to look like a small idea the start, but it is actually quite a complex application.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">I am using <a href="http://weebly.com/">weebly.com</a> to create the launch page, however I came across <a href="http://launchrock.com/">launchrock.com</a> which could have been a better choice as it has better mailing list integration. </span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">For mailing list management, I stuck with <a href="http://mailchimp.com/">mailchimp.com</a> as I didn't know anything else and I have heard that it was one of the better ones around.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">The launch page has been up for about 1 week, and I haven't done and marketing for it. I have four subscribers, so lets see. I need to understand how <a href="http://mailchimp.com/">mailchimp.com</a> works to use it more effectively. </span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0tag:blogger.com,1999:blog-20085353.post-9829328205262890502012-03-27T09:28:00.002+11:002012-03-27T09:31:41.007+11:00unity, cmock and ceedling<span style="font-family: Arial, Helvetica, sans-serif;">This could be the first post about how I am using a unit testing framework that uses the mock concept.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">Some background, I was researching some information on the best way to deploy a unit testing framework for embedded work. I started by posting <a href="http://programmers.stackexchange.com/questions/104332/best-practice-when-unit-testing-for-embedded-development">a question</a> on the programmers.stackexchange.com. The answers led me to investigate the solutions provided by Atomic Embedded, namely unity, cmock and ceedling.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">Each of the tool by itself will provide some value of unit testing for you, but for embedded work and to help manage all the infrastructure, all the three tools need to be present.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><a href="http://throwtheswitch.org/white-papers/unity-intro.html">unity</a> is a bunch of macros that performs the tests that determines if the results are correct. </span><br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;"><a href="http://throwtheswitch.org/white-papers/cmock-intro.html">cmock</a> provides an intelligent parser and framework that mocks the underlying code. So for all the functions that you use, cmock would be your friend.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><a href="http://throwtheswitch.org/white-papers/ceedling-intro.html">ceedling</a> is like the glue that holds unity and cmock together. It is a bunch of ruby scripts the parses your code that is being tested and generates the calls to cmock, generates the test runners and builds the unit test executables.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">The Atomic Embedded folks also have </span><span style="font-family: Arial, Helvetica, sans-serif;"><a href="http://throwtheswitch.org/white-papers/cexception-intro.html">CException</a> but I haven't investigate this option.</span>tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0tag:blogger.com,1999:blog-20085353.post-49814299308832312962012-03-06T09:45:00.001+11:002012-03-06T09:46:57.097+11:00<span style="font-family: Arial, Helvetica, sans-serif;">As I was researching Java scripting, I came across an interesting new language. It is called <a href="http://haxe.org/">HAXE</a>. For me, the interesting part is the cross platform nature. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">Having a quick look at it, it looks like that HAXE has quite an establish community of developers. There have been quite a <a href="http://haxe.org/com/projects">few sites</a>, applications and webapps using HAXE as their language of choice. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">Be cross platform, it means that I could be developing a Android application, but it can also be deployed for iOS or a Windows phone.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">A framework is also available to create rich and engaging sites. The framework is <a href="http://www.haxenme.org/">NME</a>.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">I am not too sure what toolchain is required, but with NME as a framework, deployment of it to an <a href="http://www.joshuagranick.com/blog/2011/07/14/android-ios-webos-and-more-cross-platform-made-easy/">Android device looks to be quite easy</a>.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0tag:blogger.com,1999:blog-20085353.post-20283170151718672722012-03-03T08:39:00.001+11:002012-03-03T08:39:45.778+11:00Choosing a host<span style="font-family: Arial, Helvetica, sans-serif;">On my journey to be the webapp guru :-), I started to search on the net for online tutorials and came across <a href="http://www.html.net/">www.html.net</a>. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">On the html.net, it gives some information for all the basic foundations of the building a webapp. I mean, the stack could include Ruby or Python or other. html.net concentrated a php for the server side functionality and javascript for client side functionality. That seems quite reasonable.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">I quickly read through the html tutorial and the tutorials about CSS. It is now time to tackle php. I went with their recommendation on using <a href="http://www.000webhost.com/559067.html">000webhost.com</a></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">The signup process was pretty easy and allow me to quickly get up and going quickly.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">From my learning perspective, it said that it gives me full php functionality with MySQL. Technically, it gives me php version 5.2.17 and I can get access to a MySQL installation.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">Well, let continue and see how far this gets me.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">disclaimer: the link to 000webhost.com is an affiliate link..</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0tag:blogger.com,1999:blog-20085353.post-89439998669121557642012-02-29T10:08:00.002+11:002012-02-29T10:08:28.573+11:00Hacker News articles and webapp<span style="font-family: Arial, Helvetica, sans-serif;">I just read a couple of post that has quipped my interest in getting starting in webapplications. I found the posts <a href="http://news.ycombinator.com/item?id=3541060">here</a>, where someone was learning Java Script. His results were impressive.</span><div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">The other posts that I found were through a search on "<a href="http://www.hnsearch.com/search#request/all&q=profitable+weekend+project&start=0">profitable weekend project</a>" on Hacker News and it brought up quite a few projects.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Some of the projects were quite simple to implement, include <a href="http://www.whatportis.com/">www.whatportis.com</a>. It just allows the user to enter a port number and it tells you what it is used for. The other interesting thing is that a simple site like this is a great server for on-line adverts. </span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">So my motivation for learning Java scripting is to give me the tools to build these simple webapp. Perhaps getting more complicated as my skill set grows.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0tag:blogger.com,1999:blog-20085353.post-92195668327415905102011-09-15T07:15:00.001+10:002013-11-30T09:25:25.707+11:00A startup for non-profitsHang on a minute, the whole point of a startup is to make gazillions dollars, isn't it? Well sort of. <a href="http://blog.doddcaldwell.com/">Dodd Caldwell</a> has just launched <a href="http://bellstrike.com/">BellStrike</a> about two weeks ago, and it seems to be off to a steady start.<br />
<div>
<br /></div>
<div>
I really like the way that Dodd has worked on this. This is a win-win situation that is not only for himself, but also for the non-profit community. As he rightly pointed out, most non-profits do not want to worry about setting up a website to get donations, or increasing their profile. <a href="http://bellstrike.com/">BellStrike</a> is an almost perfect solution as it has the right mixture of features required for such a website to work. </div>
<div>
<br /></div>
<div>
At the moment, BellStrike is only able to do non-profits based in the USA. I believe that he has plans to expand beyond the American borders. I really want to see something like to succeed, anything to help increase the level of donations for the non-profits is always good.</div>
<div>
<br /></div>
<div>
Check it out!</div>
<div>
<br /></div>
tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0tag:blogger.com,1999:blog-20085353.post-27570135206694095252011-06-19T08:12:00.001+10:002011-06-19T08:12:46.346+10:00unix tools and firmware package for the STM32VL DiscoveryTo complement command line tools chain from <a href="http://www.codesourcery.com/sgpp/lite/arm">Code Soucery</a>, I download the command line toolset of <a href="http://sourceforge.net/projects/unxutils/">unxutils</a>. unxutils gives you similar Unix tools but develop for native execution. So the rm or the ls or the mv tool does not rely on cygwin.dll.<br clear="all"> <br><div>To kick off the development, I download the <a href="http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/FIRMWARE/stm32vldiscovery_package.zip">STM32VL Discovery Firmware package</a>. This package contains some examples which I have used to quickly verify if my setup is correct or totally wrong. The source code of the firmware that is shipped with the STM32 discovery board is also part of the firmware package. The firmware package has accompanying documentation with it. Look for application note AN3268 on <a href="http://www.st.com">www.st.com</a>.</div> <div><br></div><div>You may also want to consider downloading <a href="http://www.st.com/internet/com/SOFTWARE_RESOURCES/TOOL/DEVICE_PROGRAMMER/um0892.zip">ST-Link utility</a>. This will allow you to download the binary into your discovery.</div> <div><br></div> tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0tag:blogger.com,1999:blog-20085353.post-25234620995147602322011-06-16T06:50:00.002+10:002011-06-19T07:59:28.409+10:00setting up the development for the STM32VL Discovery board<span id="goog_1000607305"></span><span id="goog_1000607306"></span><a href="http://www.blogger.com/"></a>I found myself with some spare time so I go started on setting up a dev environment on the <a href="http://clearbottle.blogspot.com/2011/03/stm32-discovery.html">STM32VL Discovery board</a> that I got recently. This post talks about the compilers.<br />
<div><br />
</div><div><b>Compiler</b></div><div><br />
</div><div>There are three options recommended by ST as a compiler. These are <a href="http://www.iar.com/website1/1.0.1.0/2925/1/">IAR Workbench</a>, <a href="http://www.atollic.com/index.php/targets/stm32">Atollic True Studio</a> and <a href="http://www.keil.com/arm/mdk.asp">Keil MDK-ARM</a>. These tools are pretty restricted in some way, except for the Atollic command line tools. The restriction usually comes in the forms such as code size limitation.</div><div><br />
</div><div>Now the STM32 is just a ARM Cortex M3 core device, so there are many other ARM compilers available. The GNU toolchain also support the ARM core. This is the compiler that I choose as it is not limited in anyway.<br />
<br />
</div><div>The simplest way to to grab the <a href="http://www.codesourcery.com/sgpp/lite/arm">lite version from Code Soucery</a>. This will provide you with the full GNU toolchain including the binutils as well. However, as it stands, it is only driven from the command line.</div><div><br />
</div><div><br />
</div>tehnyithttp://www.blogger.com/profile/05019875106808614610noreply@blogger.com0