Thursday, March 26, 2009 online! - the official weblog of Cyril Pauya is now online!  Head over there for new contents.

This blog site will be preserved for archive purposes only coz I am already active on the new site.

See you there!

Labels: , ,

Wednesday, October 22, 2008

Asus P5GC-MX/1333 Network Not Working in Ubuntu 8.04 (Hardy Heron)

The onboard network adapter of Asus P5GC-MX/1333 motherboard does not work out-of-the-box in Ubuntu 8.04 (Hardy Heron).

So as usual, I went to UbuntuForums, googled, and read a lot.  Practically consumed 4 hours looking for a fix.

Then with a "silly" grin (for not doing it in the first place), I used Ubuntu's Synaptic Package Manager and  searched for "Atheros".  Voila!  The driver is listed there.  I immediately installed it and restarted the machine.  It's fixed! ;)

Here are the steps for those who needs to have this darned problem fixed:

  1. Install a separate network card in the computer.  I put an Accton - old network card on the PCI slot knowing that Ubuntu would already recognize it.
  2. Connect to the Internet using this secondary network interface.
  3. Use Synaptic to install Atheros driver.
  4. Restart your computer.

Hope this helps the others who, like me, consumed a lot of time searching the web for a solution.

Labels: ,

Tuesday, October 07, 2008

Laptop CPU slows down to 40%!

I play games on my laptop, a Dell D610 1.86GHz, 1.5GB memory, an ATI X300 with 64MB dedicated graphics card and Windows XP Professional with SP2. Nowadays I'm into Defense of the Ancients (dota), a custom map of World of Warcraft III.

For a long time now I have always wondered why my laptop would sometimes slowdown after around 30 minutes of gameplay. I didn't mind at first because it was not that intermittent. Lately though it's becoming an annoyance. I even installed a new Windows XP on another partition and tried it but with the same problem.  

Frustrated, I fired up my system monitoring tools. What I diagnosed was that the CPU drops down to 751MHz as I play the game, that's a staggering 40% drop! Now I am a computer programmer, I know about Intel SpeedStep, I have always set my Power Scheme to Always On, and sometimes used SpeedSwitchXP just to prove a point. But after alloting 3 hours looking at Dell forums, there were no solutions to my problem.

Somebody in the forums mentioned that the CPU will underclock automatically if it is overheated. Now I don't have aircondition in my room. Although it is well ventilated, the laptop gets really hot at the left side of the keyboard where the CPU and graphics card is. So hoping-for-the-best and crossing-my-fingers, I tried putting a stand fan next to my laptop to supplement the CPU fan. I then played DOTA to test my theory and sure enough, no lag was experienced, CPU is at 100% 1.86GHz speed, and I had a lot of triple kills. ;)

After all of the hassles I've been through, it's all a matter of overheating issue.

Is it hot in here?

Labels: , ,

Sunday, September 14, 2008

Django Editor


UliPad 3.9
* tried UliPad 3.9 tonight, and so far liking it! (for my Django projects that is)

UliPad 3.9 Good So Far:
* syntax highlighting specially for Django templates
* auto-completion
* folding
* zoom-in or zoom-out editor window
* lightweight on memory
* cross-platform
* code snippets
* directory browser (sort of project browser) 
* multi-view support

UliPad 3.9 Bad So Far:
* error opening "error log" when in Windows XP limited user account (which was easily fixed by installing UliPad to a directory where the limited user has read-write privileges) 

EasyEclipse for Python 1.3.1

* I have been using EasyEclipse for Python as my Django editor for the past 4 months now. (but will be replaced by UliPad nowadays)

EasyEclipse for Python 1.3.1 Good So Far:
* support for projects (creation, opening, closing)
* syntax highlighting for python, html, css
* auto-indent
* auto-completion (some)
* creation of python projects and files

EasyEclipse for Python 1.3.1 Bad So Far:
* no zoom-in or zoom-out of editor window (you can't make the texts larger or smaller)
* no syntax highlighting for django templates
* very minimal support for auto-completion
* heavyweight on memory
* haven't found the code snippets tool

Btw, I have tried using Notepad++ but since it is not cross-platform, I went back to EasyEclipse for Python.  I occasionaly use it as text editor though.

Labels: , ,

Monday, August 11, 2008 now online!

Visit for news and articles regarding Mindanao.

You may register so that you can post articles of your own subject to approval of the Webmaster or Editor-In-Chief.

Labels: , ,

Tuesday, August 05, 2008

Httrack CSS in binary form

I've been using WinHttrack to make an offline copy of a website so that I could browse it while am offline. When I browsed the copy, I found out it does not correctly render the site. The css is not propagated. I looked at the page source and looked at the css file. To my surprise, it is in binary form.

I again tried to update my copy. But then again the same problem.

After much browsing, I stumbled upon this topic in the httrack's forum site at

I followed the instructions and sure enough, my copy already rendered correctly.

Kudos to the solution provider.


Thursday, July 31, 2008

Django 0.96 and 1.0 alpha

The web framework for perfectionists with deadlines.
Django makes it easier to build better Web apps more quickly and with less code.

These notes refer to Django version 0.96 and 1.0 alpha:

GREAT so far:
* model-db-tables creation
* template inheritance
* great documentation
* fixtures

PROBLEMS so far:
* creating CRUD forms
* upgrading models sometimes requires going to the rdbms admin software to alter or drop the table
* console commands to administer, validate, reset, etc

* generic views:
* edit
* (r'^incomes/list/$', 'imbr.incomes.views.income_list'),
* edit
* return an object_list()
* edit
* create a ModelForm for your models

* django generic wrapper howto:
* django.views.generic.list_detail.object_list has "object_list" as the name of the variable for use on your templates. This is overridable.
* django.views.generic.list_detail.object_detail has "object" as the name of the variable for use on your templates. This is overridable.

* use babel,, a Python library for I18N and L10N - use BabelDjango for your django projects
* to round-off decimals at django templates use the floatformat filter (ie 34.23234 --> {{ value|floatformat:3 }} --> 34.232)

* to use alternating rows, use CYCLE, make sure not to put spaces between the values, only commas.

* iif() equivalent == (c and (a,) or (b,))[0] from

* in postgresql, an error in adding data will occur if database is prepopulated by data from fixtures. Use "python sqlsequencereset catalog | psql -U postgres -d lms" after loading your fixtures. Issue Ticket is

* fixtures as json are much easier to maintain: add, edit, and remove records
* to save data as fixtures: python dumpdata --format=json --indent=4 catalog > catalog/initial_data.json
* to load data as fixtures: python loaddata catalog/initial_data.json
* use fixtures to add initial data to your database
* use unittest as unit tests for your models


2008-05-28 (chapter 7):
* redirect after POST to prevent saving duplicate record

2008-05-26 (chapter 7):
* escape variables in your templates to prevent XSS

2008-05-26 (chapter 5):
* for "python dbshell" to work under sqlite3 db, download the sqlite3.exe executable from and put it somewhere in your path
* put __str__() method to all model classes for a string representation of the class
* use PIL (python imaging library) for ImageFields in your model at
* django requires single column primary key
* django uses the MTV (model-template-view) framework. In MVC framework, Model = django.model, View = django.views and django.templates, Controller = django.URLconfs

2008-05-25: (chapter 4)
* Template inheritance can be nested to whatever level
* Templates are the Views in MVC model
* Templates have their own language but just enough for "presentation" level, if you want to add logic, use a View

Labels: , ,