Monday, 29 December 2008

Chewing on Cookies

On vacation this week, but have been doing a little work here and there. Currently I'm figuring out how to work with cookies using Dojo and PHP. So here are a few quick examples if you are ever interested.



Set a Cookie in PHP



<?php
setcookie('CookieName', 'cookie value', time() + 3600 * 24);
?>

Just call the setcookie() function. Set the cookie name and and a value as shown. Notice how the time is set. Get the current time, then add the number of seconds you want the cookie to last. In this example, the cookie would be set to last 24 hours.



Get a Cookie with PHP



<?php
$cookieVar = $_COOKIE["CookieName"];
?>

To get a cookie, just access the global $_COOKIE variable.



Delete a Cookie with PHP



<?php
setcookie ("CookieName", "", time() - 3600);
?>

To delete a a cookie, set the cookie with an empty value and a time value in the pass. This should cause the browser to delete the cookie.



Get a Cookie with Dojo



// Initialize on Load
dojo.addOnLoad(function(){

var cookieVar = dojo.cookie("CookieName");

});

Call the dojo.cookie() function with the cookie name to get the value of the cookie.

Delete a Cookie with Dojo



function logOff(){
dojo.cookie("CookieName", "", {expires: -1});
}

To delete a cookie the approach is similar to PHP, set the cookie to an empty value and time, a day in the past.

Tuesday, 23 December 2008

Google Gadgets for Linux 0.10.4

The 0.10.4 release of Google Gadgets for Linux is out, with optimized performance and memory consumption, as well as many bug fixes. To install or upgrade your copy of Google Gadgets for Linux, just download and install the binaries for your platform.

The new release supports more gadgets, including the recently released YouTube, Gmail, and Google Docs gadgets. Here's a picture of the YouTube gadget running on Linux.



The next picture shows the Gmail and Google Docs gadgets running on Linux. Note: If you've already unsuccessfully tried using the Gmail gadget, be sure to download the latest version of the Gmail gadget.



If you're a developer, try the dramatically improved Gadget Designer. It can now create new gadgets, and it runs as a separate application. Here's a picture.



As always, you can find the source code at the google-gadgets-for-linux project.

Friday, 19 December 2008

The Docs gadget

We just released a neat little gadget that helps you find and open your Google Docs documents. And if you want to upload files to Google Docs, just drag them into the gadget. Please check out the announcement on the Google Docs blog.



This gadget has been well received among Googlers, and we hope you'll like it too. It runs on Linux and Windows and supports Google Apps accounts. Please try it out and let us know what you think.

We've released quite a few gadgets lately (Gmail, Google Docs, YouTube), but my favorite one is coming in January. Mark your calendar!

Thursday, 18 December 2008

Summary of JavaScript Games

I have posted a few links to JavaScript games. I ran across this list of 25 amazing JavaScript games. Very cool stuff. And this is before the next next generation of optimized JavaScript engines. Probably a lot more to come.

Wednesday, 17 December 2008

Winter Holiday Gadgets

'Tis the season for new Desktop gadgets to help you celebrate the winter holidays. Here's a guide to the some of the most recent additions.

SnowmanSnowman
by Benjamin Schirmer


Every desktop needs a snowman. To switch accessories, just click the part you want to change.
Hanukkah Menorah TwoHanukkah Menorah Two
by Glenn Rivkees


Use this gadget to help you keep track of when Hanukkah starts. Once the Festival of Lights begins, the gadget keeps each night's candle burning on your desktop.
The Dreidel GameThe Dreidel Game
by Glenn Rivkees


Whether or not you've ever spun a real dreidel, now you can play with your own e-dreidel.
Christmas Hat
by Lahiru Lakmal Priyadarhsana


If it's Christmas, it must be time for Christmas hats! Put a photo of your loved one into the special Christmas photo frame, and then adjust the hat for a perfect fit.

Click the snowflake in the bottom-right corner to show and hide the settings, or right-click for the context menu. You can even drag and drop a photo into the frame.
Countdown To New Year 2009
Countdown to New Year 2009
by Teodor Filimon


This multi-purpose gadget gives you snow, carols, gift shopping, calendar, the time left until Christmas, and finally a countdown to the New Year!

Want to see other seasonal gadgets? Check out the holiday gadget page.

Happy Holidays from the Google Desktop Team!

Thursday, 11 December 2008

The YouTube gadget

The Google Desktop team is pleased to release a YouTube gadget for Google Desktop. It plays YouTube videos right inside the gadget and shows a feed of the day's most popular videos. Please check out the official announcement on the YouTube blog.



Watching YouTube videos is a favorite pastime of mine while waiting for code to compile or team meetings to conclude. Now with this gadget, I am able to waste time more productively, as I can bring up the gadget in an instant and search for videos (hint: pressing the shift key twice brings up all your hidden Desktop gadgets).

Please give it a try and stay tuned for more new gadgets ...

Wednesday, 10 December 2008

App Server Log Reports [object HTMLInputElement] Instead of Text

Ran into this last week, chalk up another bone headed mistake for Mike. :) Once again, I'm hoping this note will help someone else if they run across this problem.


Problem: I'm using dojo.xhrPost to submit a form to an application server. However, when the data shows up on the application server, instead of text, I am getting [object HTMLInputElement]. Perplexing. If I submit the form without Dojo I seem to get text. What's the deal?


Solution: I was updating someone else's code to use a form for submission. The long and the short of it was, the old code uses "content:" to submit the data. The content attribute is used for creating an object literal list of values to submit data. For example:



myVar = {
param1:"some value",
param2:"another value"
}

Fine and dandy when you are using something other than a form.



...
content:myVar,
...

So I had changed the code to this, not noticing the slight change in syntax.



...
content:myForm,
...


However, since a form does not submit its data in this way, mayhem ensues. lol. To fix the problem, replace the above with:



form:myForm,


This results in happiness and joy for all.

Rounded Corners with CSS

Creating rounded corners with CSS is typically achieved with images. While working on my current project, I ran across this tip. CSS3 offers a border-radius property which is unfortunately not implemented in many browsers yet. Firefox does provide an extension for this as described in the article. Consider it a glimpse of the future. :)

Friday, 5 December 2008

Free Network Attached Storage - FreeNAS

I recently installed FreeNAS 0.69RC2 (Kralizec) on an HP Pavillion 7915. The install was the easiest server product I ever installed and worked flawlessly right out of the box. Here is what I did to add extra network attached storage for zero dollars.

Server specifications for the HP Pavillion 7915 are:
  • 1.1GHz Celeron processor
  • Intel 810 chipset
  • 128 Mb SDRAM
  • 40 GB HD

I burned the 0.69RC2 (Kralizec) ISO onto a CD and started the Pavillion. The boot and install is very similar to a FreeBSD install (no surprise since FreeNAS is built on FreeBSD) so for those familiar with the FreeBSD installer this is a simple task. Follow the prompts to install the minimal OS and network services. Rebooting yields a server that boots in less than 16Mb of RAM. Detailed installation instructions are here.

Why FreeNAS?
Well, as the name implies it is free. Since the HP was donated to me by a coworker the server was free also (a real bonus). Secondly the ability to repurpose old hardware and create a new use for it is always a plus. Lastly the reasons to install FreeNAS include its ease of use and rock solid reliability and many more listed below.

What ships with FreeNAS?
FreeNAS is a free NAS (Network-Attached Storage) server, supporting: CIFS (samba), FTP, NFS, AFP, RSYNC, iSCSI protocols, S.M.A.R.T., local user authentication, Software RAID (0,1,5) with a Full WEB configuration interface. FreeNAS takes less than 32MB once installed on Compact Flash, hard drive or USB key. The minimal FreeBSD distribution, Web interface, PHP scripts and documentation are based on M0n0wall.

















Will FreeNAS work with Windows based clients?
Absolutely! FreeNAS ships with Samba server so Windows clients have no problem connecting, storing and retrieving data. See the snapshot below.

















Other Solutions:
To be fair, there are other NAS solutions, for a price, but why pay when that old family computer is begging for a second life. There are other open source based NAS solutions (NASLite, Openfiler, and a host of others), but for the ease of install, web-based interface and works out of the box simplicity of FreeNAS, you owe it to yourself to download and install the very stable and full functioning NAS from FreeNAS.org (FreeNAS blog).

Thursday, 4 December 2008

Open Source iTunes Player?

Check out this story on ars technica on Songbird. Its an open source MP3 player with some extras. It doesn't rip CDs yet, but that's coming. Worth checking out.

Tuesday, 2 December 2008

The Gmail gadget

Google offers a free, search-based webmail service called Gmail. Yes it's completely free, vanquishes spam, and includes over 7 GB (and growing) of space so you'll never have to delete another message. Not convinced? Just search Google for "i love gmail" and behold the many positive testimonials and reviews.

We like this Gmail so much, we developed and released a Desktop gadget that you can use to monitor your Inbox, read messages, and compose new emails. Check out the announcement on the Gmail blog.



Please give Gmail and the gadget a try, spread the word to all your friends, and let us know what you think about the gadget.

More information | Download gadget | Gmail

Friday, 28 November 2008

Acer Aspire One - painless tsclient/rdesktop install

I recently installed Terminal Server Client (tsclient) and Remote Desktop (rdesktop) on my Acer Aspire One. Here's a little background on what I did to get remote access to the Microsoft Windows servers in my data-center from my Acer Aspire One netbook.


The complete installation information is at this Google Site.





Background:

tsclient - Terminal Services Client is a front end for rdesktop and other remote desktop tools.

rdesktop - remote desktop is an open source client for Microsoft's proprietary Remote Desktop Protocol (RDP).

The Install in Brief:
  • Install rdesktop using yum
  • Download tsclient-0.150-5.fc8.i386.rpm from rpmfind.net
  • Install tsclient using rpm

Once installed the AA1 desktop is modified to display the Terminal Services Client icon for ease of use.

Tuesday, 25 November 2008

Back to normal posting

I should be back to normal posting. The pee wee volleyball season is over and I'm on a more normal schedule again. The season went well and fun was had by all. :)

LAMP Scaling by the Big Boys

I ran across this at work and thought I should share. There are a lot of LAMP (Linux, Apache, MySQL, Perl/PHP/Python) sites out there on the Internet. One of the bigger ones is Wikipedia. Alka Gupta has posted this blog entry on how that site is scaled.


A very nice high level explanation. Good information to have in case you ever have a site that gets this big. Seven billion page views a month is a lot!

Sunday, 23 November 2008

A minimal Android application to display Map, using MapView

it's a very minimal Android application using MapView to display a Map on Android Phone.

My Setup is:
Ubuntu 8.10
Eclipse 3.4.1
Android SDK 1.0

First of All, start Eclipse and create a Android Project:
In my exercise, I use AndroidMap as the name.
Project Name - AndroidMap
Package Name - com.Android.AndroidMap
Activity Name - AndroidMap
Application Name - AndroidMap



Now you have to grant permission to the application to access internet:
Select AndroidManifest.xml in res folder from Package Window on the left. Activate Permissions tab, then Add two Uses Permission, android.permission.ACCESS_COARSE_LOCATION and android.permission.INTERNET.





In order to use MapView, uses-library, "com.google.android.maps", have to be defined inside AndroidManifest.xml. Activate AndroidManifest.xml to manual edit the xml directly, insert

<uses-library android:name="com.google.android.maps" />

inside the <Application> element. The full listing of my AndroidManifest.xml:



Save and close AndroidManifest.xml.

Modify UI, (Package Window>res Folder>layout Folder>main.xml), by replacing TextView with MapView:

<com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="api_key_here" />


Please note that you MUST to insert your own "api_key_here".
In order to apply your own apiKey, you have to check your Getting the MD5 Fingerprint of the SDK Debug Certificate (for emulator), and Sign Up for the Android Maps API.



Save and close main.xml.

Finally, modify AndroidMap.java:

package com.Android.AndroidMap;
import com.google.android.maps.MapActivity;
import android.os.Bundle;

public class AndroidMap extends MapActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}

@Override
protected boolean isRouteDisplayed() {
return false;
}
}



Save the java file.

Now you can Run the minimal AndroidMap on Emulator.





SORRY for all! Blogger re-format my code and make all the code mis-aligned, and not easy to read. I don't know how to fix it!!!

Thursday, 20 November 2008

Featured gadget: On-Screen Ruler



Name: On-Screen Ruler
Author: Edwin Lee
Description: Ruler on your desktop to help you align your on-screen elements, and measure the number of pixels between them.

More information | Download gadget

Each week this blog features a recently added Google Desktop gadget that looks promising. If you'd like to see all new Desktop gadgets as they're published, subscribe to the RSS feed.

Tuesday, 18 November 2008

Google Gadgets for Linux 0.10.3

The 0.10.3 release of Google Gadgets for Linux is out, with bug fixes and major feature enhancements. Most notably, now Linux gadgets can use most of the features introduced in the 5.8 release of Google Desktop for Windows.

If you have a previous version of Google Gadgets for Linux, we encourage you to upgrade to this version. Just download and install the binaries for your platform.

With the 0.10.3 release, gadgets can run seamlessly within KDE4's Plasma environment, as the following screenshots show. For more information on KDE4 and gadgets, see the KDE4 Plasma page in the google-gadgets-for-linux project.





Thanks for reading this, and remember to download Google Gadgets for Linux!

Friday, 14 November 2008

Featured gadget: VTM Wheater Map



Name: VTM Wheater Map
Author: Stefan vd
Description: Show the VTM Wheater Map from Belgium.

More information | Download gadget

Each week this blog features a recently added Google Desktop gadget that looks promising. If you'd like to see all new Desktop gadgets as they're published, subscribe to the RSS feed.

Wednesday, 12 November 2008

Built in Color Picker for Mac

Yesterday I ran across a tool built into OS X that can give you the RGB values for just about anything on a web page. This is very useful for "borrowing" color ideas from other sites.


In the Utilities folder, just launch DigitalColor Meter. Your mouse becomes a color browser. Simply mouse over the image, background, or other visual element and behold, the color value is displayed for you. There are a number of formats to choose from. Since I do a lot of HTML work, the 8-bit HEX is my personal favorite.


If anyone else knows of similar tools for Windows or Linux, please post a comment. Because being able to do this is freaking great!

Sunday, 9 November 2008

Morris Worm - two decades later - little has changed

It was November 1988 and I was an undergrad at Colorado State University when the Morris Worm started hitting computers on campus. I remember the excitement in the Physics lounge as we started to discuss and reverse engineer the virus.

The worm infected BSD based operating systems by exploiting buffer overruns using the gets function call in the utilities fingerd and sendmail. The worm collected host, network and user information and then, in turn, used this information to infect other servers using TCP or SMTP and the buffer overrun defects in sendmail and/or fingerd.

The detection of the virus started with strange files showing up in /usr/tmp directories, strange entries in /var/log/ files, but most notably was the vast number of processes running when one issued a top command.

Shortly after discovery, UC Berkley had created a patch for sendmail and made suggestions to limit the spread of the Morris Worm. Oddly enough the Morris Worm exploited a debug option (e.g. -d) in sendmail, used by many system admins (and users) to test mail configurations.

So here we are twenty years later and I am still disappointed to find my colleagues using unbounded string copy functions like gets, strcpy, strcat, etc. I recently worked with a networking group to close a security exploit in one of their communications libraries that, you guessed it did a blind copy of a buffer passed in from the user (doh!) and caused the daemons using the library to crash and dump the stack.

Therefore I have written on the whiteboard by my desk:
Use of the function strcpy is a clear indication to anyone reading your code that you are willing to walk forever to find nothing (e.g. a NULL).
As a footnote: Whatever happened to that Morris guy who created the Morris Worm? Well, Robert T. Morris was represented by the law firm Bonnor and O'Connell; tried and convicted of violating the 1986 Computer Fraud and Abuse act and eventually sentenced to three years probation and fined 10,000 USD. Shed no tears, R. T. Morris is an associate professor at MIT (the exact same university where he created the worm).

Thursday, 6 November 2008

Dojo Tab Example Using Code

I have started on a Dojo project for work. While reading up on Dijit, I ran across an example of how to use Dijit controls using JavaScript. This intrigued me as I have never liked putting JavaScript code in the HTML like most of the Dojo examples.


Using the book as an example, I tried the same thing and of course it didn't work. lol. After a little Googling around a solution was found. First, in a tab container, the tabs themselves must be added as children to the tab container. Ok that makes sense. But once I removed the Dojo attribute for the tab container it no longer displayed on the page. Well, it turns out, to get the thing to display, you have to call the controls startup method to make this happen.


As a result of the experience I have written up an example with comments.

Monday, 3 November 2008

Featured gadget: Photo Frame



Name: Photo Frame
Author: Google
Description: Keep your favorite photos, nicely framed, on your desktop. You can choose from several frames and themes.

More information | Download gadget

Each week this blog features a recently added Google Desktop gadget that looks promising. If you'd like to see all new Desktop gadgets as they're published, subscribe to the RSS feed.

Sunday, 2 November 2008

Android Developers - Bonsai Blast


Jacob Abrams of Glu Mobile talks about they built their Android app, Bonsai Blast.

Friday, 31 October 2008

Dojo Cookie Example

I have added a Dojo cookie example to my Dojo Examples Page. Setting and retrieving the cookie is pretty straight forward.


The next example will also be with cookies. This time I stick some JSON text in the cookie and retrieve it.

A Little Behind on Posts

I have been a little behind on posts lately. I'm coaching an 8-9 year old volleyball team 2 nights a week and that is cutting into my reading/coding/blogging time. So posts may be a little thin the next couple of weeks, but I should free up again pretty soon.

Monday, 27 October 2008

Acer Aspire One boot time less than 30 seconds

Another reason to buy an Acer Aspire One is the quick boot time. In a recent New York Times Technical article: In a New Age of Impatience, Cutting Computer Start Time It is the black hole of the digital age � the three minutes it can take for your computer to boot up, when there is nothing to do but wait, and wait, and wait some more before you can log on and begin multitasking at hyper-speed.

PC manufacturers Dell, Lenova and HP will introduce a new generation of quick start computers.

Why wait for the next generation? The Acer Aspire One boots in under 30 seconds, if running the Linpus OS and booting off the 8GB solid state hard drive.

Even Microsoft, whose bloated Windows software is often blamed for sluggish start times, has pledged to do its part in the next version of the operating system, saying on a company blog that �a very good system is one that boots in under 15 seconds.� Today only 35 percent of machines running the latest version of Windows, called Vista, boot in 30 seconds or less, the blog notes. (Apple Macintoshes tend to boot more quickly than comparable Windows machines but still feel glacially slow to most users.)

The NY Times article continues with a quote from UCLA professor Gary Small,

Gary Small, a professor at the Semel Institute for Neuroscience and Human Behavior at the University of California, Los Angeles. �Our brains have become impatient with the boot-up process,� Dr. Small said. �We have been spoiled by the hand-held devices.�

USB Mouse on Acer Aspire One

I recently tested the functionality of a USB mouse attached to my Acer Aspire One (AA1). I attached a Microsoft Optical Mouse Blue USB and PS/2 Compatible mouse and started the AA1 without issue. Both the left and right mouse buttons worked as did the scroll wheel and center mouse mouse button (scroll wheel).

The output from from dmesg is:


ALC INIT<6>usbcore: registered new interface driver hiddev
input: Microsoft Microsoft 3-Button Mouse with IntelliEye(TM) as /devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/input/input8
input: USB HID v1.10 Mouse [Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)] on usb-0000:00:1d.0-2



Unplugging the mouse and reattaching while the AA1 is running again was no problem and produces a dmesg output of:



usb 2-2: USB disconnect, address 2
usb 2-2: new low speed USB device using uhci_hcd and address 3
usb 2-2: configuration #1 chosen from 1 choice
input: Microsoft Microsoft 3-Button Mouse with IntelliEye(TM) as /devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/input/input9
input: USB HID v1.10 Mouse [Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)] on usb-0000:00:1d.0-2

Featured gadget: Radio Energy Z�rich



Name: Radio Energy Z�rich
Author: Andreas Horlacher
Description: Listen to online radio from Energy Z�rich

More information | Download gadget

Each week this blog features a recently added Google Desktop gadget that looks promising. If you'd like to see all new Desktop gadgets as they're published, subscribe to the RSS feed.

Wednesday, 22 October 2008

Breaking the century mark

No, this post is not to celebrate my turning 100, though at times I do feel a hundred years old. No, this post is to celebrate the 1o1st country to join the viewing ranks of the kengell chronicles.

Ranked by number of page views, the top ten countries to visit the kengell chronicles are:
  1. United States
  2. Canada
  3. United Kingdom
  4. Norway
  5. Spain
  6. Austria
  7. Germany
  8. Netherlands
  9. Denmark
  10. Finland
The 101st country to join the kengell chronicle ranks is Malawi. Thanks to all who have read the chronicles.

Ranked by page views the continents are:

  1. North America
  2. South America
  3. Europe
  4. Asia
  5. Oceania
  6. Africa
I just need one person in Antarctica to read this blog and the continent list will be complete.

Create an .iso Image with OS X 10.5

For work I needed a burnable CDROM .iso image for use on both Macs and PCs. On OS X 10.5, this can all be done with your Mac, no special software required. Unfortunately, no one has written down all the steps. So, if for only but my own benefit, here are all the steps to create an image. Note: I am doing quite a bit of testing so if I run into any issues, I will post an update.


Create an .iso Image from Scratch on OS X 10.5 Leopard



  1. Create a directory which acts as the root directory for your iso image.


    • For example, name the directory Source_Code_V1.


    • All the files for this iso image would go into the Source_Code_V1. directory.




  2. Open the Disk Utility program. It is in the Utilities subdirectory of your /Applications directory.


  3. From the Disk Utility menu, select File -> New -> Disk Image from Folder


  4. Select the folder you created above. (i.e., Source_Code_V1).


  5. A dialog pops up. By default the image name will be the same as the directory name.


  6. You have options to select: Image Format and Encryption.


    • Image Format - Since this is a CDROM select the hybrid image (HFS+/ISO/UDF) option.


    • Encyrption - Select none.




  7. Click Save. Your directory is now converted into a OS X disk image (with a .dmg extension). You should be able to mount this image and view the files.


  8. Mount the disk image and make sure all the files are there as you want them.


  9. To create the iso image, open a terminal window.


  10. Navigate to the directory where your disk image is.


  11. Type in the following command to convert your image into a cd image.: hdiutil convert Source_Code_V1.dmg -format UDTO -o Source_Code_V1


  12. An CDROM image file is created with a .cdr extension.


  13. To make the file an iso, rename the file.


  14. mv Source_Code_V1.cdr Source_Code_V1.iso


That's it. You should have a shiny new .iso image you can burn to a CD or share with your friends.

Monday, 20 October 2008

Featured gadget: Precious Metals Spot Prices



Name: Precious Metals Spot Prices
Author: Rosie Ojo
Description: Gold, Silver, Platinum and Palladium Spot Prices, with live 24 Hour Spot Charts. New York - London - Hong Kong - Sydney - Zurich.

More information | Download gadget

Each week this blog features a recently added Google Desktop gadget that looks promising. If you'd like to see all new Desktop gadgets as they're published, subscribe to the RSS feed.

Sunday, 19 October 2008

Transfer files between a Blackberry Curve 8310 and an Acer Aspire One

It is easy to transfer files (e.g. photos) between a Blackberry Curve 8310 and an Acer Aspire One (AA1).

First a few background details: The AA1 comes with 5 usb ports (according to the dmesg output).



$ dmesg | grep 'new USB'
ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1
uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 3
uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 4
uhci_hcd 0000:00:1d.3: new USB bus registered, assigned bus number 5



When plugging the Blackberry into one of those USB ports, two events happen; one on the AA1 and the other on the Blackberry.



$ dmesg
...
scsi 4:0:0:0: Direct-Access RIM BlackBerry SD 0001 PQ: 0 ANSI: 4 CCS
sd 4:0:0:0: [sdb] Attached SCSI removable disk
sd 4:0:0:0: Attached scsi generic sg1 type 0
sd 4:0:0:0: [sdb] 3994624 512-byte hardware sectors (2045 MB)
sd 4:0:0:0: [sdb] Write Protect is off
sd 4:0:0:0: [sdb] Mode Sense: 43 00 00 53
sd 4:0:0:0: [sdb] Assuming drive cache: write through
sd 4:0:0:0: [sdb] 3994624 512-byte hardware sectors (2045 MB)
sd 4:0:0:0: [sdb] Write Protect is off
sd 4:0:0:0: [sdb] Mode Sense: 43 00 00 53
sd 4:0:0:0: [sdb] Assuming drive cache: write through



The Blackberry warns:

USB charging current is not sufficient. Verify that your handheld is connecting to a powered USB charging source and that the proper USB driver is installed.


acknowledging that message, one is presented with:


Do you want to turn on Mass Storage Mode? You might not be able to access some media files in this mode.


Then one is presented with the option:


Mass Storage Mode is being activated. Enter your device password to grant access:













Finally after acknowledging the warnings and supplying the Blackberry password access to the USB storage on the Blackberry is available. It then can be treated like all other storage devices.


Friday, 17 October 2008

Surfing the Green Wave in Copenhagen

In Chicago we have what's known as the "Chicago Pace" (not to be confused with the PACE buses). Simply put, if you walk at the right pace you can cruise from intersection to intersection without stopping (not that jaywalking is unknown among Chicagoans). I've been able to walk from my office on the corner of Wacker and Adams to the Art Institute (Michigan Ave and Adams) in under ten minutes; a distance of about 1 km. The same applies when walking up Wacker Drive from the Sears Tower to the Wrigley Building on Michigan Avenue.

In Copenhagen they use the term "Green Wave". If you cycle (Danes cycle everywhere) into Copenhagen on certain high traffic streets (N�rrebrogade being one of them) and maintain a ~20 km/hr pace you will be into city center in no time at all. Colville Andersen has produced a neat little video capturing the 'green wave' in action. Have a look at and treat yourself to a little Danish 'bicycle' rock; Iben's Jeg savner min bl� cykel - (I miss my blue blue bicycle) and Tue West's S�t dig bag p� min cykel - (Sit up on the back of my bike).


The Green Wave in Copenhagen from Colville Andersen on Vimeo.

Notice, in the video, the street lights changing to green in the upper right hand corner. Also take note how the Danes have separated the main street (lowest level), the bike path (cyclevej) on the next level up from the foot path (highest level).

Thursday, 16 October 2008

Ajax/JavaScript Ceritification - Need a few good geeks

If you don't know already, I work in Learning for Sun Microsystems. We are looking at creating an Ajax/JavaScript certification to go along with our existing Java certs. To do that, we generally use real developers developers to define the test objectives and write the questions. And right now we are looking for a few of those folks. So if you have always wanted to say in an interview "I don't have that cert, because I wrote the test." Now is your chance. :)


If you are interested, please add a comment to this post. Please include name, e-mail, your blog/company url, and a phone number so we can contact you. I will pass along your information to the project lead. Since the comments are moderated I will not post any of your information to the Web. This is a limited time opportunity as we need to hear back in the next couple of days. I will remove this post when we have enough people.


And now a word from our sponsor.




Need AJAX Experts


My name is Evelyn Cartagena-Meyer and I'm the Java Certification Program Manager. I create all the Java certification exams here at Sun.


I'm in the process of recruiting Subject Matter Experts (SMEs) for the Sun Certified AJAX Developer certification exam.


The two phases I need your expertise in, are:



  1. Your expertise to help with the creation of the testing objectives for the certification exam. I will need your expertise to participate on con calls to ensure we are testing in the important areas. The con calls will be a one hour call and depending on how far we get, we will proceed to have other calls.

  2. A one week item development workshop, which consists of 10-11 top-notch AJAX experts (SMEs). I fly and pay for all the expenses for all SMEs coming to Colorado for the workshop.


The week will consist of writing questions for the certification exam using the testing objectives. Each SME will probably write 8-9 questions per day, so Monday thru Wednesday and then on Thursday and Friday we do a technical review and review all 300 questions created by the SMEs.


Past participants have found this workshop to be an extremely rewarding experience where they get to interact with and learn from other top-notch peers and build relationships that lasts beyond the workshop.


The workshop will be the week of December 8-12 here at the Broomfield Colorado campus.


It would be great to have an expert like you on our team for that week.


I hope you are interested in participating and if you know of any other experts that can participate, can you please send me their names or send them my email?


Please let me know.


Thank you.


Evelyn Cartagena-Meyer

Java Certification Program Manager



Monday, 13 October 2008

PC-BSD on a USB memory stick

My goal was simple: create a bootable USB memory stick and copy the install image of PC-BSD onto the USB memory stick.

This was achieved w/o much trouble using my FreeBSD server at work. I performed the following operations logged in as root.

The USB image was downloaded from the PC-BSD website


Assumption: the USB memory stick is plugged into the server at /dev/da0

# fdisk -BI /dev/da0
# bsdlabel -w -B /dev/da0s1
# newfs /dev/da0
# dd if=/usr/home/kengell/PCBSD7-x86-USB.img of=/dev/da0 bs=1m

Featured gadget: Persian Calendar


Name: Persian Calendar
Author: Mehdy Bohlool
Description: Persian Plus Georgian Calendar

More information | Download gadget

Each week this blog features a recently added Google Desktop gadget that looks promising. If you'd like to see all new Desktop gadgets as they're published, subscribe to the RSS feed.

Sunday, 12 October 2008

eee 1000 Swapping Up Arrow and Right Shift


One of the most annoying things about the eee 1000 is the location of the right shift key. Its small and very far to the right. If you are a touch typist, this makes typing very difficult. Well I have read some blog posts that discussed remapping the keys, but they all seems to mention Windows and not Linux. Since I have the Linux version of the eee 1000 it was time to do a little research.



Googling around I found this really good article on Linux utilities for remapping keys in XWindows. The article only covers remapping the Caps Lock and Control keys. But, playing around with xmodmap and xev I was able to figure things out. So here is the result, two shell scripts. The first scripts swaps the up arrow key with the right shift key. The second resets the keys to their original values.


keyswap



#!/bin/bash
xmodmap -e "keycode 98 = Shift_R"
xmodmap -e "keycode 62 = Up"
xmodmap -e "add shift = Shift_R"

keyreset



#!/bin/bash
xmodmap -e "keycode 98 = Up"
xmodmap -e "keycode 62 = Shift_R"

The scripts seem to do the job. But if you have any suggested improvements please pass them along in the comments.

Thursday, 9 October 2008

Dojo Examples Page


I started a Dojo Examples page here. Currently there is just an example of the forms ValidationTextBox control. Which I gotta say, is a pretty neat tool. I couldn't find anything nearly as easy to use or with as much functionality in the JQuery world.



There will definitely be more to come.

Tuesday, 7 October 2008

Featured gadget: Communicator



Name: Communicator
Author: Andreas Horlacher
Description: Communicator translates from and to a few languages using Google translation services. It comes with the popular 'communicator' design, as seen in Star Trek.

More information | Download gadget

Each week this blog features a recently added Google Desktop gadget that looks promising. If you'd like to see all new Desktop gadgets as they're published, subscribe to the RSS feed.

Sunday, 5 October 2008

jEdit and Java Apps no Longer Start on OS X 10.5 Leopard


I tried to run jEdit this morning and it would no longer launch on my MacPro. Recently, Apple updated Java on OS X 10.5 and that appears to have broken Java apps. So after Googling around a bit, I found a solution on the support forums.


The jEdit executable is defined as a symbolic link in /Applications/JEdit.app/Contents/MacOS/jedit, which points to /System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/MacOS/JavaApplicationStub. This seems to be the problem. To fix it, copy /System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/MacOS/JavaApplicationStub to /Applications/JEdit.app/Contents/MacOS/jedit. The jEdit app should now start correctly.


The problem does not affect all systems. The jEdit on my MacBook works just fine after the update. No changes needed.

Saturday, 4 October 2008

A little house cleaning

I'm doing a little house cleaning on the web site this weekend. Some directories are gonna be moved around to make the production site and development sites a little more consistent. I'm planning to use xampp for a little consistency between my macs and my linux laptop. Been thinking about using GeShi to render my code samples. However, the JEdit syntax highlighting plugin seems to do a nicer job. Plus, I'm not sure the nature of the data really requires dynamic processing. Once a code sample is written, its pretty much written, it seldom needs to be touched again. So static files may be a better way to go.


Anyway, if any of my pages are broken over the weekend, please bear with me. :)

Wednesday, 1 October 2008

CSS Shorthand for Margins and Padding


I have been trying to incorporate some of the 10 CSS tips I posted about a few days back. When it comes to using shorthand for margins and padding I always get confused. I know you can put in 4 values in one margin statement, but I can never remember what order the 4 values are in.


So to help myself out, I wrote up a page on CSS Shorthand Properties.


So to summarize, when you are defining a margin with 4 values, CSS starts at the top of the box and then moves clockwise around the box. So for example:


h2{ margin: 5px 20px 5px 30px; }

This rule defines a top margin of 5px, a right margin of 20px a bottom margin of 5px, and a left margin of 30px. Start at the top, and move clockwise: top, right, bottom, left. Easy! :)


For more information and examples just click on the link.

Saying It != Learning It

I have been running into this problem a lot both at work and with various web sites. You can't teach your audience anything simply by making a statement.


For example, I am going to teach you the theory of relativity and everything you need to know about relativistic physics:
E = MC2


Got it! Good. Let's move onto the next subject.... :)


Are you an expert on relativity? Of course not. Without doing the real math behind the equation, you don't really understand anything. There cannot be learning without practice.


Or let's take riding a bike. I could have you read a book on bike riding. Show you videos demonstrating bike riding. Watch a bike race. Any number of things. But you will never learn to ride a bike until you climb on and pedal.


So when you are writing content, at a minimum, include examples your audience can look at, download and explore. Saying it != learning it.

Tuesday, 30 September 2008

Slideshow for Facebook

This week, we're excited to release the Slideshow for Facebook gadget.

Designed for Facebook users, this gadget connects to your Facebook account and finds a wide variety of photos from your friends' collections. These photos then appear, one-at-a-time, in the gadget's frame. It's an automated slideshow � an easy, great way to stay in touch with old friends!

Sunday, 28 September 2008

Dojo Examples and Learning Info at dojocampus.og


The Dojo folks have a site setup for examples and a little learning. For example, you can see examples of all the dijit widgets at: http://dojocampus.org/explorer/#Dijit. The main site is of course at: http://dojocampus.org.


I haven't looked at the tutorials yet to see how good those are. The dijit examples are very helpful. Will post more if I get a chance to take a better look at this.

The new look of Emulator of Android SDK 1

Google I/O 2008 - An Introduction to Android


An Introduction to Android
Jason Chen

Android is the Open Handset Alliance's mobile software platform. In this session, we introduce Android and discuss our vision for more open, powerful, and useful mobile devices.

Monday, 22 September 2008

Dojo DOM Lookups: dojo.byId vs diji.byId


Just wanted to provide this link to a page that describes the difference between dojo.byId and dijit.byId. The page describes the difference in a very concise manner.

Featured gadget: Periodic Table



Name: Periodic Table for Google Desktop
Author: Paul Alan Freshney
Description: Detailed information on every element

More information | Download gadget

Each week this blog features a recently added Google Desktop gadget that looks promising. If you'd like to see all new Desktop gadgets as they're published, subscribe to the RSS feed.

Friday, 19 September 2008

Double Click to Open a New Tab in Safari or Webkit

Did you know if you double click the tab bar on Safari or Webkit, the browser opens a new tab for you? Well it does. lol. I wish I had figured that out about 2 years ago. :-p I think God is teaching me about humility this week. :)

Google Docs - Fixed Width Page View

I just found the "Fixed Width Page View" view for Google Docs. This is great cause I hate it when I have a wide browser view and each sentence is 12 inches wide. That stinks. Its nice to have it limited to what looks like a page. Just like a word processor. Why I haven't found this sooner? I'm an idiot. lol.


I need to see if I can get my parents to use this. They have trouble with any word processor that is not a simple typewriter metaphor. Will need to do some testing they next time I'm at their house.

Thursday, 18 September 2008

3 SeaMonkeys


Well I setup a new GMail account today with a more normal name for the address. Thusly, I needed to a way to run an extra browser session, without messing up my current setup. So after a little research, I decided upon SeaMonkey. Why?



  • Supports multiple profiles.

  • Uses the same engine as Firefox.

  • Has a small memory footprint.


To make this happen, you need to do a couple of things



  1. Setup a profile for each browser session you want to run. The session manager can be found under Tools --> Switch Profile.

  2. Setup a shell script for each session.


The shell script for each browser session looks something like this on OS X.



#!/bin/bash
/Applications/SeaMonkey.app/Contents/MacOS/seamonkey-bin -P profileName &

That's it. Enjoy your monkeys!

Linux updates

If you use Google Gadgets for Linux, be sure to get the 0.10.2 version, which was released Saturday. It fixes over 20 bugs, enabling support for many more gadgets.

Don't feel like compiling the code? No problem! It's now easy to find binary packages created by the community, thanks to a new page that points to Google Gadgets binaries for the major Linux distributions.

Wednesday, 17 September 2008

Adding Rotating and Scaling to CSS


Ajaxian has this good post on some browser specific CSS features that have been added to Mozilla and Webkit. Basically, the new properties allow you to rotate and scale parts of the DOM using CSS properties. Looks like cool stuff. In my opinion, no point in playing around with this much until its standardized. But, it looks like this is something that will be added.

Monday, 15 September 2008

When you speak, we listen

Here in Google Desktop land, we value two things: 1) feedback from people who use Google Desktop and 2) chocolate malt balls (good to eat, good to throw). While we love hearing how much you enjoy Google Desktop, we also want to know what we can do better.

As our Tech Lead pointed out on the official Google blog, one thing you really stressed to us was performance. So what did we work on? A really cool comic. (Just kidding.) No, we doubled down and cranked out our latest release of Google Desktop 5.8, which focuses primarily on � you guessed it � performance.

Although performance was our main focus, we also wanted to release some features and fixes in response to your other requests. Many of you still rely on Outlook, so we made our search cover more Outlook folders, with better speed and stability. We also made a number of additions to the Desktop APIs, including support for Flash in gadgets!

So if you use Google Desktop, please download the latest version. If you've never tried Google Desktop (or are a "former GD user"), why not give it a try? And remember, we love to hear feedback!

Saturday, 13 September 2008

Acer Aspire One: painless skype install

I installed Skype on my Acer Aspire One. The Aspire One is a perfect skype platform (having a built in web camera). Here's how I installed Skype for fedora 7 linux:


UPDATE: 2009-01-02 - Please read the notes on my Google site to track the comments and changes since this original post.  The instructions below are now out of date when Acer released a Skype installer.








Download the skype rpm (fedora 7)

Go here to download the fedora 7 version of skype. I downloaded and installed skype-2.0.0.72-fc5.i586.rpm














Run the Installer:

Once downloaded double click the skype rpm to run the installer. Note: you will be prompted to supply an 'authentication code' which is the 'root' password to run the Linpus package installer. The root password was assigned (hopefully by you) when the AA1 was first turned on.













Install additional rpms

Additional rpms are required by skype so those have to be downloaded and installed as well.












Chose Install anyway when presented with a warning from the installer.













Configure the desktop to display the Skype icon

Edit the file /home/user/.config/xfce4/desktop/group-app.xml using the mousepad (default) editor.  Type the following in the xterm window.

$ mousepad /home/user/.config/xfce4/desktop/group-app.xml

And add the line:

/usr/share/applications/skype.desktop


to the appropriate section as per the image below.












Once added and the Acer Aspire One is rebooted the Skype icon is available:















Updates

I started a notes page on Google sites to track the comments and changes since this original post.

Friday, 12 September 2008

A Little More Info about Adsense

Found this post on ProBlogger today about updates to Google Analystics. Looks like we are gonna get some detailed reports on what page are getting all the clicks and making the most money.


Very Good news. The current Adsense reports are pretty vague and not very helpful.

Thursday, 11 September 2008

Acer Aspire One: increased security using GDM

I use my minty fresh Acer Aspire One for work. I work in the financial markets, ergo, it has to be rock solid secure. So to increase the security of my netboook I disabled the auto-magic login functionality and run the Gnome Display Manager (GDM) on startup to force a login. There are other benefits to doing this as well (like being able to switch window managers from Xfce to blackbox (which I'll explain in another post).

How to disable auto-logon:

WARNING: take extreme caution doing this or you will have a non-functioning netbook when rebooted. Be sure to read all instructions completely before making any changes and double check your work . You will need to remember the password you used when first turning on the Aspire One- good luck!

Edit the file /etc/rc.d/rc.S

Find and comment out the line

/usr/bin/xinit -- -br>/dev/null 2>&1 &

thusly

#/usr/bin/xinit -- -br>/dev/null 2>&1 &

and right below this line add the invocation to the Gnome Display Manager (gdm):
/usr/sbin/gdm

as shown in the screen shot below:











If all is done correctly, when rebooted the GDM will present you with a welcome menu for user. I do hope you remember the password you used when you first turned on your Acer Aspire One.