I have problems with my video card detection/drivers from time to time due to automatic updates of my Fedora Core 9 system. The old driver I used to fix the problem doesn’t work anymore, thus I run this to get things working:
This command will cause connect to the NVIDIA FTP server ‘ ftp://download.nvidia.com ‘ and determine the latest available driver version. If there is a more recent driver available, automatically download and install it.
Why don’t I just run
#nvidia-installer --update
?
Because if you have to do this from time to time, there may be no newer driver available, thus the system may believe the latest driver is already installed and will do nothing.
With the ” -f ” flag nvidia-installer performs “forced update” - the driver will be downloaded and installed forcedly.
Now, just reboot your mashine.
Sometimes I play Internet Backgammon when I’m on Windows box (can be found under Start->Programs->Games in a standard Windows installation). I haven’t ever played the game in offline nor even knew its rules, but after a few tries found the game is interesting - mostly due to the fact you play over internet with live people, not with the computer - thus it could be quite hard to prognose turns of opponent.
I cannot say I’m very successful player, but sometimes I have a luck to win
After some time I was playing Internet Backgammon I figured there is a special category of players - Read the rest of this entry »
If you do web development you may want to test your web applications under IE.
In case you work under Linux you have a few options for this:
a) have another machine with Windows installed
b) have Windows installed on the same machine and reboot each time you need to perform some testing (don’t forget a need to run web server under Windows too or upload your changes to a live server)
c) have Windows installed on the same machine and try to launch IE using wine
d) use IEs4Linux
As for me - option a) isn’t convenient (and requires additional computer involved), b) is very time-consuming, c) is too hard task and also requires a time to get all working (if it will work at all). I found that option d) fits my needs of quick testing in the best way: IEs4Linux - is a tool which installs a lightweight IE package on your Linux system (as I understand this is a variation of the option C) - they even offer a few versions of IE. The package is installed quite fast and easy even for me - not an admin person.
Well, it may glitch sometimes (as IE does in general), but what you get is pretty enough to check some JS/HTML.
A nice self-testing tool (and probably for testing your monitor :)): Test your color IQ (requires indicate country you’re from before taking test)
Two things changed in simple blog:
1. A new theme comes. It is based on NodeThirtyThree’s Wordpress theme (please find the link in the footer). I tried to keep the theme clean and convenient in use and I almost like what I finally get
Please feel free to comment on this post if layout gets broken in your browser (It was tested in FF3, IE6, Opera 9.52 and Konqueror under KDE 4.1.3).
2. yaCAPTCHA installed to get rid of spam bots. Thus now comments moderation will be turned off and comments appear on site right after they’re submitted.
Here I noted how to reset a form with jQuery, however, later I noticed some fields aren’t reset() correctly: in my form I have hidden fields with initial value of “0″ (or just an empty value) and these fields are supposed to be changed interactively upon a user’s input using jQuery. These fields weren’t reset correctly for some reason, at least in Firefox, thus I had to change my original function to something like this:
1
2
3
4
5
| function resetForm(id) {
$('#' + id + ' :input').each(function(){ // I decided not to have different reset routine for different field types
$(this).val('');
});
} |
Probably less elegant, but works… 
Last.fm released scrobbler for Linux, before they offered to use Amarok, which wasn’t very convenient for me to use with their service of online listening to library/stations.
The scrobbler from their official site couldn’t be compiled (occasionally) but I found last.fm client in rpmfusion-free-updates yum repository (#yum install lastfm.i386).
Such jQuery call won’t work:
1
2
| $('#formId').reset();
// error: $("#formId").reset() is not a function |
As the tutorial shows (yes, I never read manuals before I get into troubles as well, but always google answers before think, lol), we can have the following:
1
2
3
4
5
| function resetForm(id) {
$('#'+id).each(function(){
this.reset();
});
} |
…and somewhere on a page this:
1
| <input type="button" onclick="resetForm('formId');" /> |
Want to write down a simple trick I use to avoid errors like the subject says.
Let’s take we have described tables in our schema.xml:
Listing 1
1
2
3
4
5
6
7
8
9
10
11
12
13
| <table name="User" phpName="User" idMethod="native">
<column name="id" phpName="Id" peerName="ID" type="INTEGER" required="true" autoIncrement="true" primaryKey="true"></column>
<column name="username" phpName="UserName" peerName="USERNAME" type="VARCHAR" size="32" required="true" default=""></column>
<column name="state_id" phpName="StateId" peerName="STATEID" type="INTEGER" required="true" default="0"></column>
<foreign-key foreignTable="State">
<reference local="state_id" foreign="id"/>
</foreign-key>
</table>
<table name="State" phpName="State" idMethod="native">
<column name="id" phpName="Id" peerName="ID" type="INTEGER" required="true" autoIncrement="true" primaryKey="true"></column>
<column name="state_name" phpName="StateName" peerName="NAME" type="CHAR" size="25" required="true" default=""></column>
</table> |
Thanx to relation definition in lines 5-7 we can do a call like this:
Listing 2
1
2
| // assuming $user is a valid instance of User
echo $user->getState()->getStateName(); |
But what happens if a certain user has no `state_id` set for some reason? We’ll get the message: Error: Call to a member function getName() on a non-object…
(Obviously as $user->getState() doesn’t produce a correct State instance without `state_id`)
In case `state_id` isn’t something nitty-gritty in our application we can extend our User class with the following:
Read the rest of this entry »