I am a Virgin Mobile subscriber using their $25 beyond the talk plan with a UTStarcom Arc (now PCD Arc). I was able to install Opera Mini, Gmail, and Google Maps out of the box from the respective websites. There didn't seem to be any way to install other applications as the phone never recognized the jad file (points to the jar application file) as something that could be used to install applications. After examining the text of the jad files provided by Google, I determined that there was no difference in the text formatting (I also examined whether or not the server was setting the jad MIME type correctly, and that wasn't an issue either). After some beating of my head against the wall, I had a thought: What is the OpenWave browser (standard on the phnoe) was restricting jad files by URL? To test this, I uploaded the jad and jar files as attachments on one of my Google Sites pages and then linked to the jad file (I had to use the full download URL from Google Sites, which includes attredirects=0&d=1 at the end of the URL). Low and behold when I opened that link in my mobile browser it downloaded and installed the jar file. YAY!!!!!
Although I've only tested this with the Arc, I assume that this world work on any J2ME phone that Virgin mobile has. Interestingly enough, Phone Arena doesn't list the Arc as a J2ME phone, but it is.
Think Source, Not Binary
Wednesday, April 27, 2011
Thursday, September 16, 2010
The Social Unix App: fistbump
I bring you the truly social Unix command-line application: fistbump. Take a look at the brief example on how to execute fistbump.
# ls fistbump # fistbump -h usage: fistbump [options] -h - view this help message -v - vigorus fist bump; handle return data -f - friendly, yet firm, fist bump -l - loosly clenched fist bump -s - shake hands (depricated) # fistbump -f Operation Completed Successfully # fistbump -v | grep -i "pain" | wc -l
56 # fistbump -s (-1) unexpected exception found #
Tuesday, October 27, 2009
Bash Scripting, again
I do very little Bash scripting, since my primary language is PHP. But, for some reason whenever I start writing bash stripts, I get a rush that I don't get from any other languages. Maybe it's the feeling of trying to be a UNIX geek or maybe it is a way of harkening back to batch files in DOS land (only better). I can't explain it. One idea I have as to this phenomena is that there are so many mechanisms to use when shell scripting. AWK, sed, regular expressions, bc, and of course the infinite bash native syntax available makes UNIX scripting the best.
Since I very seldom use bash scripting, I am constantly googling to find the correct syntax for what I am trying to do. This last time, possibly due to the complexity of what I was trying to do, I found some notable sites.
http://www.injunea.demon.co.uk/pages/page205.htm - This site appears to have many pages, but for some reason, this is the page I always seem to land on when searching. Really good explanation of for, while, and if structure right at the beginning of the page, along with some other goodies.
http://bashrules.blogspot.com/2005/04/strlen-of-bash.html - Yea, I know this is the most boring of all blog entries in the history of the world, but this is invaluable knowledge and very vividly illustrates the dynamic nature of straight-up bash scripting
http://www.arachnoid.com/linux/shell_programming.html - Get your favorite caffeinated beverage, because we'll be here a while. This page shows a plethora of shell scripting syntax. Just a few examples include regular expressions, arrays, and some of the most messed up shell variables you've ever seen.
http://www.vectorsite.net/tsawk.html - Next to bash syntax, AWK is quite possibly the most useful tool in the UNIX swiss army knife. AWK is mainly useful for string comparison, but that's really the name of the game with anything from file content alalysis to program output manipulation.
This isn't an exhaustive list, but I'm sure that I'll find more cool scripting techniques in the future.
Wednesday, September 2, 2009
Google Chrome: A permanent fixture in my development toolbox
I am in the middle of developing a website that employees heavy usage of Javascript including anything from simple calculation based applets to a barrage of XMLHttpRequest's. I was into Javascript back in the day before I had access to a server with PHP capabilities. Ever since I started with PHP I opted for a pseudo-cumbersome form-based PHP applet over Javascript to avoid any browser incompatibility. My thought was, "the server is always the same while the client is always different."
Since that time, Javascript has become more commonplace in web applications and with the advent of IE7 (while it is fraught with problems) many compatibility problems were addressed and I decided to take a dip is the JS pool. At this same time, Google Chrome came out and, being a lover of most things cloud, I had to at least try it out. While I was in the process of developing the website, I switched back and forth between Firefox and IE to test compatibility of my code not being overly pleased with the lack of verbose error messages I got from either. I decided to load the same page in Chrome and use it's Javascript Debugger. I was completely blown away!!! Their error messages actually meant something and allowed me to thoroughly debug and deploy my pages. In almost all instances where I opted for a PHP applet I rewrote it in Javascript.
If you are not prone to flights of fancy and trying out the latest piece of software that comes out that is good. But if you're a Javascript developer I'd highly suggest trying Chrome for your debugging.
Saturday, January 31, 2009
Using AWK for Text File Input
In some recent shell script development, I have fallen in love with an amazingly useful text processing language: AWK. Here are some of the basic command structures I used:
ls ~/music/ | awk '{ print "File" NR "=~/music/" $1 }'
Reading piped input from the directory listing, ls, the script prints "File", the current line number (determined using NR) of the input stream, and a path to the file located in the "music" folder located in the users home folder. For example, if the directory listing was:
jazz-music.mp3
rock-music.mp3
the script would output the following text:
File1=~/music/jazz-music.mp3
File2=~/music/rock-music.mp3
File2=~/music/rock-music.mp3
The $1 is used to retrieve the first field in the current line of the file (in this instance, there was only one field). I used this command, along with some other basic shell commands, in a script that listed files from a directory and created a media playlist file.
Here's another command I used:
php retrieve-media-url.php | awk '{ system("wget -O ~/music/" $2 " " $1) }'
While this command is a bit more complex, it uses only a few different elements. Instead of input from a directory listing, AWK receives piped input from the output of a PHP script. This script returns a simple text file containing two columns of data per line. The first column is the URL of a media file and the second column was the filename the download should be renamed to. The AWK system command was used to execute a shell command (wget in this case). For example, if the PHP script returned the following text:
http://xyz-music.com/classical-orchestra-music.mp3 classical.mp3
http://xyz-music.com/rock-and-roll-music.mp3 rock.mp3
AWK would execute the following commands:
wget -O ~/music/classical.mp3 http://xyz-music.com/classical-orchestra-music.mp3
wget -O ~/music/rock.mp3 http://xyz-music.com/rock-and-roll-music.mp3
Since there was two columns, $1 and $2 were used to retrieve the text from the first and second column of each line of input.
Pseudo advanced shell scripts is something that I plan to blog on much more in the future. Thanks for reading.
Monday, January 5, 2009
Under the Hood
Have you looked at a technological problem and wondered how it could be solved simply and efficiently? Have you ever tried to logic out the deep inner workings of a modern CPU? Do you have the habit of looking at anything technological and disassembling it in your mind? Are you a computer geek? If you answered yes to any of these questions, mainly the last one, then this is the blog to read. From Unix to Windows and back again, you will find reviews, tutorials, and stories that will inform, inspire, and amuse you.
Subscribe to:
Posts (Atom)