Google Spreadsheet + Form + Gadget API + Visualization API

This post was imported from my old blog “make YJL” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
Introduction

When I tried to use Google Spreadsheet's form feature, I can't have a chart exactly present the collected data in the way I want. Here is an example:


(You can read results here)

I want a chart (or datatable) tells me how many votes Cat earns, so to others. If you don't have user-defined answer, then this can be solved by creating another sheet with COUNTIF function. That also is near unaccepted solution since that is totally manual handling and only suitable to having few answers.

I checked the Visualization API, and that do work. The trick is to use Google SQL-like Query Language:
select A, count(B) group by A order by count(B) desc
for a set of grouped data. Then we can use any appropriate Visualization APIs to render the data in specific way.

General Installation
  1. Grab the XML URI and import it (Insert Plugin.../Custom...) in Spreadsheet.
  2. Select proper data range
  3. Set the options
  4. Apply
  5. Publish to get JavaScript code for your webpages or add to iGoogle
Need a Hand?

Want Other Types or Small Changes?
I list my current gadgets in Gallery section, if they just happen to fit you need, then simply grab them. If not, you are welcome to discuss with me. I will try to help, please also provide:
  • Sample spreadsheet (with test data, of course).
  • If you can draw a final result by hand, please do. That would be easy for me to understand what do you want.
Also note:
  • Currently, these gadget is only for being imported in Spreadsheet, not (directly) in iGoogle page.
  • I will try to generalize you needs to have more people to use.
Something is Broken
  • Take a screenshot
  • Allow me to read you spreadsheet (my Google account: livibetter@you_know_that)
  • What would you be expecting?
  • Leave me your email, gtalk, msn, or skype if you want.
 Gallery

Pie chart using Grouped data

Gadget XML: Revision 6 (Highlighted Source)
Features:
  • Customization of Chart Title.
  • Flexible to choice columns of grouped and aggregated.
  • Choices of aggregation function: Max, Min, Count, Average, and Sum.
  • Limit Results: Unlimited, 3, 5, 10, ...
  • Choices of legend type and position.
The data look like:
Gadget Options:
From the options above, the data range is A1:B100. Group By Column B, which is What Do You Love Most. Apply aggregation function Count on Column A, which is Timestamp. Here Timestamp acts like a dummy column, whose values are not important, but in ordert to count how many rows in a group, we need a column.

The live result:



Datatable using Grouped Data

This gadget is similar to Pie chart, but a format of table.

Gadget XML: Revision 7 (Highlighted Source)
Features:
  • Flexible to choice columns of grouped and aggregated.
  • Customization of column labels of grouped and aggregated result.
  • Choices of aggregation function: Max, Min, Count, Average, and Sum.
  • Limit Results: Unlimited, 3, 5, 10, ...
The data look like:
Gadget Options:
The live result:

LabelCloud (TagCloud) for Blogger

This post was imported from my old blog “make YJL” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
Updated on 2008-11-20: This widget is replaced by LabelX.

This is my first widget for Blogger. Since it uses Widget Tags for Layout, therefore you must install it manually by putting code into your template.

Current Version is 0.1, released on 2008-09-25, licensed under the LGPLv3.

Features
  • Customizations of the minimum/maximum font size and font size unit.
  • Limiting the number of Labels, e.g. top 100 or last 100 in counts (I wonder if really someone will try to list last 100 labels)
  • Sorting by Labels' names or their counts.
Installation
Please follow the steps:
  1. Download your current template and save it to where you can't forget.
  2. (Optional) Remove the current Label gadget, this is not necessary but in order to reduce the confusion to whom doesn't know anything about XML/HTML/JavaScript.
  3. Edit Layout template.
  4. Assume that you want to put it at sidebar, search for <b:section class='sidebar' id='sidebar' preferred='yes'>, which starts the sidebar. From there, search for </b:section>, which ends the sidebar.
  5. Now copy the entire code from here, and paste the code just above </b:section>.
  6. If you didn't skip Step 2, then just save. If there was a Label widget and you didn't remove it, you need to modify a line in the code which you just paste into your template, read explanation of LblCldTarget in next section Parameters.
  7. If Blogger shows no error, check the bottom of your sidebar.
  8. (Optional) Move the new LabelCloud to a proper position in Layout/Page Element.
Parameters
Please open this syntax highlighted code in new tab/window. The parameters are at Line 29 to Line 35:
  • LblCldTitle: The title of this LabelCloud widget. You can simply remove this line if you don't need a title. You can manually edit it or use Layout/Page Element to set a title just as if you do for normal gadgets.
  • LblCldMinFontSize/LblCldMaxFontSize/LblCldFontSizeUnit: Settings for font sizes of Labels. Default are 1.0/2.0/em, which means 1em to 2em.
  • LblCldLimit: How many labels to be shown. If you want the top 100 in most count, then it's -100 (Note that the minus), which is also the default. If you want to top 15 in least count, then it's 15.
  • LblCldSortByName: If you want the labels get sorted by name (a->z...), then set it to true. Other values will sort by their counts (0->9...).
  • LblCldTarget: This variable is very important. If you set it wrong, then you will get nothing. If you only have one Label/LabelCloud widget, then the value Label1 will work. If you have more than one, scroll up (after save) to see <b:widget id='Label?' locked='false' title='LabelCloud' type='Label'>. Set this value to Label? whatever you read.
Having Troubles?
If you have some problems to install, please must provide:
  • (Required) Your blog address. This is nothing about fixing your problem, I just want to read your blog.
  • (Required) Your template (after installed my code). You can use pastebin, please don't directly post your template here.
  • If you have JavaScript debugging console, please also provide the error messages if any.
  • Anything else which you think you should tell me.
  • (Optional) You can also leave your msn/Skype account, I might contact you.
I may try to help if your template isn't modified too much. Please remember I don't guarantee that I will help.

If you believe that you find a bug, leave a comment or create a issue in tracker.

Any Ideas?
If you have any ideas to improve, feel free to leave a comment with your ideas. If you are familiar with Google Code Issue tracker, go ahead to create one.

Technical Information
If you are interested to read more:
  • Depends JavaScript. No JavaScript No LabelCloud.
  • Depends on prototype.js, which is served from Google AJAX Libraries API. I use it to sort labels and add HTML elements.
  • LabelCloud is composite of  LabelCloud.xml and LabelCloud.js. The content of LabelCloud.xml is what you need to put into your template. You can read the processing JavaScript LabelCloud.js at Google Code.
  • Only tested in Firefox 3 on Linux.

Vimperator and Blogger

This post was imported from my old blog “Get Ctrl Back” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
When I try to change Layout of blogs on Blogger, those popups are always opened as new tab. I disabled some and re-enabled addons, then I found out this is about Vimperator. It always overrides browser.link.open_newwindow.restriction with value 0. Which caused the popups open as in a new tab. No matter how you manually reset or issue a command :set popup=2 in Vimperator, that goes back to 0 after Firefox restarts.



After read the :help, Vimperator does support a configuration file, ~/.vimperatorrc. That functions like a .vimrc. Simply write your commands in, so I have

set popups=2
in ~/.vimperatorrc.



RTFM is the solution.

Thoughts from playing Metal Gear Solid

This post was imported from my old blog “Blogarbage” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
Or I should say "Thoughts from watching Metal Gear Solid", that could be a correct statment in 2009. I used cheat code to play, so I didn't really play it.

If MGS was made by others, you supposed to solve puzzles, to kill enemies, and to have many creepy scenes. All of these are not the part of this game, or this film; the only thing we have to do is watching. It is just like films, it has riddles, but it's more like knowing how to beat boss enemies down and you are not going to figure out yourself, you have a team back you up. You simply enjoy how the story goes. Also the twists, there are few in this game. You definitely would get shocked as characters do. But not everything being cleared, you may put some clues together after pondering in your brain. So far, I still have some left unsolved.

However, it's a game, killing is unavoidable. More or less, you have to do it. Playing is the hardest part for me, I don't want to play it but to watch it. I don't like the way to play, so I used the code, that allowed me minimizing the effort of playing. I wish it had an option to just watch. If I don't cheat, I think I would give up playing it. But I can't, because this is my first assignment from Assignment Game, I must finish with a cheating way.

The handling methods of start and ending astound me, even this is a game 8 years ago. The cut scenes and codec transmissions play throughout the whole game, those make this game a film.

As for the story, I could say that it's reasonable as a sci-fiction film or game, and the story actually is better than some real films. I don't seem to spot any conflicts in the storyline. The later events perfectly explain what happened before when you look back, mostly. You wouldn't know who's who, who is a good guy or a bad guy, or who pulls the trigger while you are watching. If you were watching this film in theater, you can hear people lower their voices and say "That's the one who ..., must be!" Sometimes, even the film ends, you still know nothing. Yeap, there is always something left for the audiences to discuss. That's how the films attract us, isn't?

Will I watch MGS2? I would wait for 3 years and see if MGS2 can amaze me as if MGS1 does.

It's a film, not just a game.

Playing Metal Gear Solid 1 with WINE

This post was imported from my old blog “Get Ctrl Back” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
It's playable with WINE, but just don't die!
The installer runs smoothly, I can hear the background music while installing. I installed MGS with complete option. When the installation is done, I clicked on Play Game, screen flashed, and left me at 640x480 desktop.



I logged out, and run again. I ran on VR mode again, it told me last time was crashed, so will run in Software Rendering mode. It runs, but I only saw a pink screen after two companies' logos and heard the music. I then found out hitting the ESCAPE key can get me to the main menu. It is 320x240, so I switch to 640x480. I restarted again because of no sound after switched, I have sound but I still pink screen.



However, the normal game is working now. It's in 640x480, everything works except you can't die. I saw few reports on WINE AppDB, death causes crash (there are others can crash). I tried 4 times, two with Emulation of Virtual Desktop option of WINE. All crashed. Last screen is

Last vision from Solid's eyes.

Don't die, or restart the game and load save.


I use Ubuntu 8.04 amd64 with WINE 1.0.0-1ubuntu4~hardy1 package. No no-cd crack needed. That doesn't matter if it plays with or without Desktop Effect, I have no problem about that at all.



Now I need to read the manual of this game. 640x480 looks really old...



Related Posts

The opening of MGS1 PC Version

This post was imported from my old blog “Blogarbage” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
I just opened it.
Front
It is the Metal Gear Solid PC (Windows) Version (Taiwan packaging), was made in 2000. You can view a compele photoset at here. Here are the photos of manual, discs, and useless sheets.

manual and discsuseless sheets

I am wondering... should I send the registration card out? It's been 8 years, and MGS1 is only one published by Microsoft, the MGS2 wasn't and so forth.

Would that like prank if I send out? I still own the rights to get technical support, right? (I never depend on so-called support)

Anyway, this is for my first assignment of Assignment Game. I picked it as first one, not only it's a game, I meant the game, but also I could possibly use WINE to run it on Linux. I believe that would be easy task for current WINE. This game's system requirements are:
  • Pentium II 266 MHz
  • Windows 95
  • 32MB Memory
  • 300MB Storage + 100MB Swap
  • 4x CDROM
  • Super VGA 16bit depth
  • Mouse
  • DirectSound 7.0 API
WINE should run easily, I do believe. The only thing that I worry about is if there a copy-protection on the discs. If yes, would that be a problem, even I play with a legal copy. I don't know the answer yet, but soon I will find out.

I have a backup plan if WINE doesn't run it, I can still play it on my Windows XP.

Updated: It's playable on Linux, but may crash, you can read at: Playing Metal Gear Solid 1 with WINE
Updated after played: I have written my thoughts about this game, you can read it at: Thoughts from playing Metal Gear Solid.

Google Docs Terms and Robots

This post was imported from my old blog “Get Ctrl Back” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
A twitter asked:

Anyone have a way to validate the Links / URLs in a Google Docs (docs.google.com) document? (not http://validator.w3.org/che...)
and he bookmarked W3C Link Checker and commented eariler:

For documents at docs.google.com, getting: Error: 403 Forbidden by robots.txt
The first question poped out of my brain is why does W3C Link Checker comply with robots.txt, is it a robot? The answer is yes, even it wasn't, it is still not allowed to access because it's a script and the Terms from Google.



The robotstxt.org defines:

A robot is a program that automatically traverses the Web's hypertext structure by retrieving a document, and recursively retrieving all documents that are referenced.
The W3C Link Checker identifies all links from the link you specify and checks them one by one, which is an act of traverse. Although, I don't seem that it meets the later prerequisite. I would still say: yes, it's a robot, therefore it complies with the robots.txt on Google Docs, whose content is:

User-agent: *
Allow: /$
Allow: /support/
Allow: /a/
Disallow: /
Last line denies all robots to access published documents on Google Docs. robots.txt is not only a standard to Google, but also a part of their Terms of Service. You, developers or users of apps, can't say I just don't follow the standard. In section 5.3:

5. Use of the Services by you



[snip]



5.3 You agree not to access (or attempt to access) any of the Services by any means other than through the interface that is provided by Google, unless you have been specifically allowed to do so in a separate agreement with Google. You specifically agree not to access (or attempt to access) any of the Services through any automated means (including use of scripts or web crawlers) and shall ensure that you comply with the instructions set out in any robots.txt file present on the Services.


Robots (including scripts) must not access. The future possible automatic way to access is to depend on Google Docs API (the full name is Google Documents List Data API). Right now, I see no interface allowing you to retrieve a Google Docs Document. Manually downloading and checking is only way without violating something.

Assignment Game

This post was imported from my old blog “Blogarbage” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
Avast! 5 days ago, I started to compose a document, "Assignment Game", using Google Docs. Let me quote the first section of it:
This is a game which encourages people doing things that they wouldn't do before. It depends on Google Docs collaboration functionality. All assignments should have one purpose that is to benefit assignment takers in their knowledges, experiences, abilities, relationship, etc. Also, assignments are better not to have strong connection to making money. Required little spending to proceed the assignment is allowed. Things like pranks are prohibited.

All members, proposers or takers, can freely invite people to participate this game without informing this game starter, livibetter. If you happened to read this page, and want to be part of this, feel free to send an email to the ID livibetter at Google mail service. That mailbox is also a msn account, the starter uses Skype -- same ID -- as well. The starter will send you a invitation for collaboration.

If you want to propose, just copy from existing assignment, paste, and edit; or you want to take one, note you name under the assignment, and share you have learnt from the assignment if you would like to. Note that you can take the assignments have been done by other contact, they are allowed to be taken from many contacts.
Currently, it has 7 assignments. I have tried to invite some contacts on Internet to take a part of it. If you are interested, too, please leave me comment or directly send me a mail.

I took an assignment from one contact and I finally got the required resource to proceed.

8 years old box

What is this? The clue is already in the photo. I will be posting the opening show of it in next post. (I haven't opened it, it's hard for me to open an olden box)

Happy Talk Like A Seafarin' hearty Tide!

Posted by "Chocolate" Hank Blythe

Using Yahoo Pipes to Merge Your FriendFeed Feed and Comments + Likes Feed into One Feed

This post was imported from my old blog “Get Ctrl Back” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
I saw a posting on FriendFeed, the poster want a Super Feed which has contents of his FriendFeed Feed and Comments + Likes Feed. I think Yahoo Pipes can do this task easily, and it does. However, Pipes is extremely slow right now, it wasn't about three months ago. In other words, I haven't used Pipes for three months, hope the issue is just temporary.



Here is the full view of this Pipe:

It uses three types of modules:

  • Fetch Feed: On the top, they grabs your two feeds.

  • Union: At middle, it combines all its inputs, which are your two feeds in this case.

  • Sort: You need to sort the output of Union, because the output of Union is all items in first feed, then all items in second feed. That wasn't what we expected, it should be sorted by published date (time).

I think you can clone my pipe, and replace feed sources with yours  (in Fetch Feed modules). If you can't, just drag-and-drop by following the figure above. You can also check out the RSS feed directly.

First week with Ubuntu 8.04 LTS Desktop Edition

This post was imported from my old blog “Get Ctrl Back” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
The installation is simple, just click, click and click. After installed, GNOME is slightly different than I have on Fedora 9. It seems to have many Ubuntu custom programs. Many of setting windows are not the same. Almost everything works as expected for my Dell Inspiron 6400.



I got two notices immediately, when I just booted this newly installed system. One is the new packages, the other is something about Restricted Driver, which is the ATI driver in my case. One thing I don't understand is that in my environment, I must make a PPPoE dial before the computer can connect to Internet. I have no idea how the software updates come from, maybe that's prefix update? Anyway, I brought up NetworkManager window, it's really different than Fedora's. Of course, it's easy to set up one configuration for my environment. Later, the updater says about 100 more packages need to be updated. It's usual for that degree of number of packages. One thing amazed me, which is the download speed, I know the server is in Taiwan as I am. Dozen of mega bytes, only take less a minute to download and install.



I copeid my previous configurations from backups, then I launched Firefox. Just like what I had before. I realized that I haven't install flashplayer, searched flash in package manager and installed. Refresh the page, I have Flash now. The second thing amazed me is the microphone works. I didn't have microphone working in flash on Fedora 9. I checked up htop, 700 MB memory usage... that's another thing amazed me. This might be a bloated distribution, I thought Fedora is the most bloated one.



I then played around the main menu, I found out few items weren't shown by default, but those were not important, either. I tried to run glxgears but there wasn't a such program, and I couldn't turn on Desktop Effects. I think that was using OpenSource radeon driver. When I was using Fedora 9, it's already capable to enable Desktop Effects with the opensource driver. I also have enabled DRI on CLFS with opensource driver. However, I need ATI's driver to enable the Desktop Effects.



Later, I tried Skype and I met a small problem. It's about 32bit lib. It's solved, although not the direct way. I installed the static package. I also compiled wdaemon for my Wacom tablet.



Few days later, Flash crashes really often. I decided to remove and install latest one from Adobe, directly. I unpacked it and move  to libflashplayer.so~/.mozilla/plugins, then run nspluginwrapper -i ~/.mozilla/plugins/libflashplayer.so. Now, it seems to work more normally.



I also noticed that Bluetooth preference dialog crashes when I tried to add my bluetooth mouse and keyboard. I need to repeat the connecting process few times, until I get them connected.



Basically, I like Fedora more than Ubuntu. I thought Ubuntu is quite easy to solve a problem by a new Linux user, but it wasn't. When you encounter a problem, for newbie, you have to search or to post for getting help if you really know nothing about Linux. But it's a good Linux distro.

Weave 64Bit for Ubuntu amd64

This post was imported from my old blog “Get Ctrl Back” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
I was trying to compile Weave since my previous build for Fedora x86_64 can't work on Ubuntu, and I thought that would take some time. I was wrong! It only needs 5 commands:



sudo apt-get install xulrunner-1.9-dev mercurial build-essential
hg clone http://hg.mozilla.org/labs/weave weave
cd weave
make sdkdir=/usr/lib/xulrunner-devel-1.9.0.1 xpi
firefox-3.0 weave-Linux.xpi


If you don't want to build one with just five commands, then you can install this one (source retrieved on 2008-09-15).

New headset and DVD+RW discs

This post was imported from my old blog “Blogarbage” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
I bought a new headset, I had two before. One is slightly broken -- annoying squakes, cough! Sennheiser. I tried to open it to fix, but I don't have proper tool -- and both are very uncomfortable after using a while. This new one is new to me, I never tried this kind of headphone and didn't try it out before buying (it's online shopping). The sound is good to me, I don't have golden ears.

Behind-the-Head PC Headset and RICOH DVD+RW Discs

The other item is rewritable DVD discs, which are for my 100 Distros Project. I haven't decided which is the first distro, it's time to pick up one.

My tweaks to Blogger

This post was imported from my old blog “Get Ctrl Back” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
I think it's better to record what I have done to this blog's template, just in case of loss of my short-term memory (that happens quite often on me).



Syntax Highlighting



Updated on 2008-11-29: I dumped SyntaxHighlighter, now I am using highlight.js.



For a blog like this one, it must have a syntax highlighter, or that would be tough to read codes. Unfortunately, there is no prefect option for now, the best I can have is syntaxhighligher. It only supports few programming languages, but better than nothing. I use version 1.5.1, the installation process is simple. This blog directly grabs the JavaScript code from Google Code except the stylesheet. The stylesheet has to be uploaded to somewhere else, because the content-type being sent by Google Code, that makes Firefox doesn't see it as stylesheet. You may also want to modify it for your own need as I do. I insterted the code:

<link href='http://livibetter.googlepages.com/SyntaxHighlighter.css' rel='stylesheet' type='text/css'/>

</head>
You can use it as well if you want, but I may change the stylesheet and it has a modification of margin to 9 pixel from 18 pixel. Next thing is to install the core and brushes:

</div></div> <!-- end outer-wrapper -->

<script language='javascript' src='http://syntaxhighlighter.googlecode.com/svn/tags/1.5.1/Scripts/shCore.js'/>
<script language='javascript' src='http://syntaxhighlighter.googlecode.com/svn/tags/1.5.1/Scripts/shBrushCss.js'/>
<script language='javascript' src='http://syntaxhighlighter.googlecode.com/svn/tags/1.5.1/Scripts/shBrushJScript.js'/>
<script language='javascript' src='http://syntaxhighlighter.googlecode.com/svn/tags/1.5.1/Scripts/shBrushPython.js'/>
<script language='javascript' src='http://syntaxhighlighter.googlecode.com/svn/tags/1.5.1/Scripts/shBrushXml.js'/>
<script language='javascript'>
dp.SyntaxHighlighter.ClipboardSwf = &#39;http://code.google.com/p/syntaxhighlighter/source/browse/tags/1.5.1/Scripts/clipboard.swf&#39;;
dp.SyntaxHighlighter.BloggerMode();
dp.SyntaxHighlighter.HighlightAll(&#39;code&#39;);
</script>

</body>
That's basically all that you have to do. However the results like It has unnoticeable spacing between the code and the first paragraph after that code. This is caused by an additional line break, by default, Blogger will convert one line break into one BR tag. That looks like

</pre><br>Adjust the main program<div ...>
I turned the feature off Which you can find in Setting/Formatting. Now it will look like Keep one thing in mind, you don't have automatically line break conversion. If you need a line break, you can add BR manually.



Google Analytics



I have to put the code in HTML/Text widget. Directly inserting to template isn't working.



Google Webmaster Tools (Sitemap)



The Sitemap is http://yourblogname.blogspot.com/feeds/posts/default?orderby=updated, according to http://yourblogname.blogspot.com/robots.txt. Remember if you use Feedburner burned feed as Sitemap, and its tracking feature of Item link clicks, that makes your sitemap invalid, which has links to feedburner.com/... because Feedburner need to track. The solution is giving a original atom feed (from Blogger, you need to turn off Site Feed redirection) or turning off the item link clicks feature.



FriendFeed Widgets

I combined Badge and Feed widgets. Removed the logos, stats and subscribing links with one feed item only. The final embedding HTML code is

<script src="http://friendfeed.com/embed/badge/livibetter?hide_logo=1&amp;hide_stats=1&amp;hide_subscribe=1" type="text/javascript"></script>

<script src="http://friendfeed.com/embed/widget/livibetter?v=2&amp;num=1&amp;hide_logo=1&amp;hide_subscribe=1" type="text/javascript"></script>
Also use the CSS

/* FriendFeed widget
----------------------------------------------- */
.friendfeed {
border: none !important;
background-color: transparent !important;
}
.friendfeed *{
background-color: transparent !important;
}
Which can remove the border, and make background transparent.

I realized that I am no blogger

This post was imported from my old blog “Blogarbage” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
4 hours ago, I broke my favorite coffee cup while I was watching TV. I was putting it close to the edge of table, somehow, it just fell off the table. I saw that and heard the crispy sound of breaking. It became three pieces. I started to clean up, check up the line of breaking. That's strange that it has a nearly straight line. I was thinking how would I drink? Is there a replacement? It's really a good cup, but I broke it.

You may be wondering is that so good? and where is the photo of it? Yeah, where is the photo? I didn't take, and that make me not a blogger. Can't believe that I forgot to take a photo, can't believe that I didn't thought I should blog for its death.

I can still dig it out from its grave or the garbage, but I think I shouldn't break its final peace.

I am no blogger, and finding a new cup.

Compiling wdaemon on Ubuntu

This post was imported from my old blog “Get Ctrl Back” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
I have to compile the source of wdaemon for my wacom tablet. You may need to read my old blog post, Use wdaemon for hotplugging, for more detail, I only write essential stuff here, so please also read it. I like to put source under ~/var/src.

mkdir -p ~/var/src
cd ~/var/src
sudo apt-get install subversion libc6-dev
svn co https://jake.ruivo.org/wdaemon/trunk/ wdaemon
cd wdaemon
make
sudo make install
Adjust the main program

sudo ln -s /usr/local/bin/wdaemon /usr/bin/
In my old post, I did

cp /usr/local/etc/rc.d/init.d/wdaemon /etc/init.d/
However, that initiation boot script doesn't work on Ubuntu without modification. So I just add necessary command to /etc/rc.local

modprobe uinput
/usr/bin/wdaemon -c /etc/wdaemon.conf -f
Set up udev

sudo cp udev/*.rules /etc/udev/rules.d
sudo mkdir /etc/udev/scripts
sudo cp udev/is_uinput.sh /etc/udev/scripts
I still need to modify the `60-wacom.rules`

# udev rules for wacom devices
# will create:
# /dev/input/wacomX
# /dev/input/wacom-tablets/model-tabletX
# /dev/input/wacom-tablets/model-unique PCI/USB path
#
KERNEL=="event*", SYSFS{idVendor}=="056a", SYMLINK+="input/wacom"
KERNEL=="event*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="00b5", SYMLINK+="input/wacom-tablets/intuos3-6x11 input/wacom-tablets/intuos3-6x11-%b"
Note that this is for my wacom tablet. You can try to re-plug and see if there is a new device come up in /dev/input/wacom-tablets. If there is, then you don't need to modify as I did; if not, try to modify. After re-plugging your tablet, run

sudo sh -c "wdaemon -a > /etc/wdaemon.conf"
This will automatically create the configuration for wdaemon. Now, you can run

modprobe uinput
/usr/bin/wdaemon -c /etc/wdaemon.conf -f
If /dev/input/ has new device, then it's time to modify your xorg.conf. If you already added those InputDevice for you wacom tablet, then you only need to change the device path. Here is mine

Section "ServerLayout"
...
InputDevice "stylus" "SendCoreEvents"
InputDevice "cursor" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
InputDevice "pad"
...
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "stylus"
Option "Device" "/dev/input/uinput-devices/uinput-wacom-intuos3-6x11-tablet"
Option "Type" "stylus"
# Option "ForceDevice" "ISDV4" # Tablet PC ONLY
Option "USB" "on"
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "eraser"
Option "Device" "/dev/input/uinput-devices/uinput-wacom-intuos3-6x11-tablet"
Option "Type" "eraser"
# Option "ForceDevice" "ISDV4" # Tablet PC ONLY
Option "USB" "on"
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "cursor"
Option "Device" "/dev/input/uinput-devices/uinput-wacom-intuos3-6x11-tablet"
Option "Type" "cursor"
# Option "ForceDevice" "ISDV4" # Tablet PC ONLY
Option "USB" "on"
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "pad"
Option "Device" "/dev/input/uinput-devices/uinput-wacom-intuos3-6x11-tablet"
Option "Type" "pad"
Option "USB" "on"
EndSection
Press ctrl+alt+backspace to restart your X, log in, try you tablet with re-plugging it.

Installing Skype on Ubuntu amd64

This post was imported from my old blog “Get Ctrl Back” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
Skype provides Ubuntu or Debian 32bit package, but I have a small problem with it. The avatar doesn't show up, there must be a library missing. Skype didn't output any errors, therefore I have no clue to know. By installing the static, the problem is solved naturally. I installed in this way
mkdir -p ~/{lib,bin}
cd ~/lib
wget http://skype.com/go/getskype-linux-static
tar xf skype*
cd skype*
ln -sv ~/lib/skype*/skype ~/bin
I created an application launcher in GNOME with command like
skype --resource=/home/username/lib/skype_static-2.0.0.72
I know Ubuntu uses multilib, but not sure how to install a 32bit package via apt-get. On Fedora with Yum, you only need to append .i686 to package name, or any other arch.

The Algorithm of Seeking

This post was imported from my old blog “Get Ctrl Back” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
You must find it before you can get it back.



Computer is still a tool. That needs a smarter human to use it, you can't just give it an order as if you do to other people. You have to know what to do in this ancient age of computing. It's actually not hard as long as you are willing to seek for a solution. I believe that 90% problems on computer have been told if there is a fix or not, but 90% people don't know how to get the result or don't want to pay any effort to get them.



I am not an advanced user, just a normal one. A web browser is enough to deal with my 90% use of computer. I have three major operating systems, but Linux is my favorite OS because I have used to use it. It may not be the easiest one to use, but that depends on what needs you have.



After tried CLFS few days ago, I suddenly downloaded Ubuntu 8.04 and replaced it with my newly installed CLFS. I was on bed and thinking, what exact system I want to use? The process of installation of CLFS is quite long. At that time, I have an X environment with Firefox. I put myself in deeper thinking, I thought this isn't the right to use CLFS. Right now, I need a simple system. Of course, CLFS is simple after you complete your installation. That takes serveral times than you need to use normal Linux distribution. However, once you finished, it gives you maximal flexibility. You never have that on other systems which mostly only need point-and-click installing way.



I do not try to teach anything on this blog, but provide problems that I have met, or experiences that I have gained.



By the way, I decided to use Ubuntu because I had not installed it before. It's not a bad choice neither a best one.

Lets Make Some Garbages

This post was imported from my old blog “Blogarbage” on 2010-09-28. Some stuff in this post may be broken, please leave a comment if you see any, then I will try to fix it.
4 years ago, I started blogging. My first blog was on Blogger, then I bought a hosting service to run WordPress for my second blog. The third one is quite different, it used a Wiki software. Anyway, this one is my fourth blog and I back on Blogger. For some unknowing reason, I want to write although my Ensligh isn't good and never felt I blogged very well. Those didn't stop me, or I had failed for three times?

This blog will be my main blog as well as one for computer topics, Get Ctrl Back, and a new project blog, 100 Distros Project. I am trying to learn how to modify the template, but may not to make any changes in the recent time.

What am I going to blog here? Anything else isn't suitable to post on my other blogs, which (probably) means posts that other blogs do not want. This is where the name of this blog from. Hope that doesn't apply on the contents of posts.