|
|

 |

Journal - Technical
Below you will find journal entries relating to programming in some manner or other. Most of the projects I engage in will start with a note posted here during their development stage. The ones with a tick next to them should also have a link to their display pages on this site or elsewhere.
Mandriva a go-go 9th Feb 2006
A while ago I downloaded the Mandriva Linux distribution and had a lot of snags dual booting into it. Getting the wlan recognized and X (display manager) working properly proved to be a major hassle.
Now using a simple lan and router setup I have finally got it all installed and configured *almost* to how I want it. Have got Apache 2, PHP5 with GD libraries and postgreSQL all running nicely so have a good development platform on which to continue playing with code.
Will hopefully get some way toward a distributable graphing class now, so keep checking back.
Reciprocal recursion and a 404 handler 23rd Sep 2003
Spent a good few hours devising a class for testing existence of reciprocal linkage from a remote domain base to a defined nested depth. Tested it on a few friendly sites and it ran quite well, was even a tad faster than I had originally surmised.
One site I tested it on though returned a main() error on certain pages even though the pages show fine in a browser. As I wrote the site in question I also knew those pages were created through a 404 handler (ie any page not found activated a script that used some fuzzy logic to pull the best guess record from the database based on the url input).
The odd part is that the reciprocal test script runs fine through mod_rewrite sites and yet flunks on a .htaccess evoked 404 handler.
As the script acts much like a search engine spider I got to wondering whether the likes of google can interpret a 404 handled page or whether they return a bad result too.
Maybe it is best not to use a handler on pages that you want to appear in search engine listings.
conceptual structure of DataGraph suite 20th Sep 2003
I figured all the graphs I devise could be child classes of a parent process that runs a standard stylized background image. The child calls would then induce the parents constructor to set any defaults. Next the variable values are set through the universal setter before the obligatory create() call.
This create can then draw the background, snapshot it, call the specific graphing function, anti-alias those pixels that changed since the snapshot and end by outputting the image to the location specified.
As all the background designs (borders, gradients, images etc) will run from the parent class there will be only one basic set of input variables to learn and play with - hence it should be easy to style all graph types to a specific site look.
pie chart annoyance 28th Jul 2003
Sometimes I totally dislike images in PHP because it is trickier to systematically debug. Most codes you could just sling an echo $var as a simple test, for images you would need an imagestring($pointer,2,5,5,$var,$colour); and have to move the positional 5,5 around for more than one var.
Anyway, added a gradient shaded edge to the pie chart function and only have one slight glitch to overcome before distro'ing it. A fix that should be reasonably easy (just need a reverse iteration through all segments within the first 90°) has kept me busy for the last 4 hours, still without a working solution.
Finally sorted the snag and ran up a pie chart distro page.
replicated error 23rd Jul 2003
Pestered a few people to run some GD image creation coding on servers running GD2.0.9 and 2.0.12 to see whether the render error was replicated. It rendered badly on all the 2.0.12 builds and worked fine on the 2.0.9 build, thus confirming my suspicions.
Tried a bit more simple coding here and determined that within the ImageCopyMerge function the colour of the destination image pixel is totally ignored (or recognized as 0,0,0 [black]) and the opacity value is only affecting the source image colour (the overlay as such).
The host said they wouldn't backgrade the GD build, so I guess I'll have to put up with it for a while (not enough time at the moment to write an adequate workaround function). Re-attributed the transitions for the nasa and usra thumbnail grabs to show a simple frame effect - so they at least look ok for the moment.
Wrote a note to Thomas Boutell and friends letting them know the problems I am having since the upgrade, along with my theorized cause. Just have to wait and see now.
|
| |
|