13th August 2007
I had just installed the latest ATI video drivers for Linux onto my Slackware 11 (with kernel 2.4.33.3); I have Radeon Mobility X600 with 64MiB of non-shared memory.
Running glxgears, I got ~2050 FPS (glxgears window focused) and ~4900 FPS (console window focused, glxgears window out of focus).
But running fgl_glxgears yielded values as low as 1 FPS! As fgl_glxgears is much more similar to the real-world game visuals, it’s apparent that no game will be playable at e.g. 0.2 FPS.
Also, there were numerous repetitions of a single error in the console window:
FGLTexMgr: open of shared memory object failed (Function not implemented) __FGLTexMgrCreateObject: __FGLTexMgrSHMmalloc failed! fglX11AllocateManagedSurface: __FGLTexMgrCreateObject failed!
I found the solution which worked perfectly for me:
Read the rest of this entry »
Posted in *nix, Misc, Notepad | 2 Comments »
25th June 2007
If you happen to need to check your linux filesystem, which is mounted read-write, and for some reason you do not want to reboot, then the simple sequence of commands listed below should help you. Note, that the commands provided put you into single-user mode, which kills web-server and mysql daemon.
So, running e2fsck on a live (mounted) filesystem isn’t recommended – and f2sck asks if you really want to check the rw-mounted FS (be sure to answer ‘n’o). If the FS you want to check is root (/), you cannot also re-mount it read-only – unless first you go to single-user mode:
init 1
Now you can re-mount your FS read-only:
mount -o ro,remount /dev/cobd0
(/dev/cobd0 is my device, replace it for your device when repeating step-by-step).
Filesystem is now read-only, and it’s safe to run e2fsck:
e2fsck -D -C 0 -f -t -v /dev/cobd0
e2fsck options are optional:
-D: optimize directory structure
-C 0: show progress
-f: force check (use if you get “volume is clean” with no check)
-t: e2fsck timing statistics
-v: verbose mode
Finally, return to your previous user mode:
init 3
Posted in *nix, Notepad, OS | No Comments »
23rd May 2007
Refreshing my scarce knowledge of Apache’s mod-rewrite, I read through the mod_rewrite guide, and found an extremely interesting section, titled
On-the-fly Content-Regeneration
Here’s the theoretical problem:
- we are building a high-traffic site with lots of once-per-(hour|day) updated items
- we have a CMS with just all the features we need, but it’s really CPU/DB-consuming and slow (does it sound familiar? )
- there’s a need to serve static files
And here’s the ‘radical alternative’ solution:
- install the CMS of choice
- tweak the CMS’s output layer to both produce/write to disk (or update) static HTML files, and to dump those same pages directly to browser
- use the “On-the-fly Content-Regeneration” mod_rewrite rules set
This is it, in short. The “On-the-fly Content-Regeneration” will read the static files if they exist, or will query the CMS, which will create/update the static files and output the necessary page. You can also setup a cron-job to remove all static files older than XX minutes, to force content refresh.
Below is the copy of “On-the-fly Content-Regeneration” from the mod_rewrite guide.
Read the rest of this entry »
Posted in CMS, Links, Notepad, Programming, Web | No Comments »
22nd May 2007
Came across toonel.net project. It’s free for private, non-commercial use.
Citing the site:
toonel.net is an experiment in a technique for conserving network bandwidth. If you are paying a fee based on the amount of data you transfer (e.g. 3G/GPRS/DSL/CDMA) and have monthly download limit, or if you have narrowband connection (e.g. dialup modem) then you are most likely to appreciate the service toonel.net offers. There are number of toonel.net client application packages. All solutions are 100% Java based and therefore this service can be used on any platform with an installed Java Runtime Environment, including mobile phones.
toonel.net: what it is good for?
- expensive transports (e.g. GPRS, CDMA…)
- narrowband or slow connections (e.g. dial-up)
- stretching download limits
Why toonel.net is different?
- cross platform
- built from open source components
- allows to compress virtually any traffic
As soon as I switch to some java-enabled personal communication device, (and if toonel.net will still exist by that time ), I would definitely try it. Or if I switch to some speedy but traffic-limited internet-access provider.
Posted in Links, Notepad, Web | 2 Comments »
5th May 2007
Nonanticipatory (system or predictor) is a (system or predictor) where the output y(t) at some specific instant t0 only depends on the input x(t) for values of t less than or equal to t0. Therefore these kinds of (systems or predictors) have outputs and internal states that depend only on the current and previous input values.
In simpler words, nonanticipatory systems can “take into account” only past and present, and cannot base their behaviour/decisions on future expectations.
Nonanticipatory systems are also known as causal systems.
Posted in Artificial Intelligence, Notepad, Science | No Comments »
2nd May 2007
There was an excellent mod_rewrite cheat sheet at ILoveJackDaniels, but it is now gone.
I have been using it for over a year now, as from time to time there’s a need to try to remember how to use mod_rewrite (e.g. in the case of no-www Class B web-site).
To help preserve this useful bit of information, and for the cases of the original article being unavailable (which did happen a few years later), below is a link to the cheat sheet stored on my server.
Read the rest of this entry »
Posted in Links, Notepad, Programming, Web | No Comments »
30th April 2007
When using PHP, the simplest way to find the absolute path of your files/folders on the server is by creating a simple path.php file with the following contents (click on the “Plain text” box header for copy-pasting):
<?php
echo realpath(dirname(__FILE__));
?>
Put the new file anywhere in the web-accessible folder on your server,
then just access that file from your favourite web-browser – and you’ll have the absolute path shown to you.
Alternatively, you may use the following code:
This also should display the absolute path on your server.
Posted in Notepad, PHP, Programming, Web | 17 Comments »