General talk

A place for all random thoughts and ideas that come across my mind and I can’t find the right “category” to put in…

Computer Randomly Plays Classical Music

1

Amazing news but totally true... And of course the Operating System that has this strange "problem" is... Windows! At least they have corrected it in versions XP+

Apparently when you are using safe mode in any version older than XP, seemingly at random, a piece of classical music starts playing. The two songs they have are "Fur Elise" or "It's a Small, Small World". The real reason though is that the BIOS has detected a fan failure. It is actually a design feature of a detection circuit and system BIOSes developed by Award/Unicore from 1997 on.

You can check out Microsoft's support page on this problem. Weirdly enough they have tried to cover it under the tags "kbhardware, kbinfo, and KB261186"... Probably to avoid being found.

It is a fun easter egg I'd be just amazed to have it happen to me... :D
If you ever experienced it, comment!

An Open Letter For Open Drivers To NVIDIA

0

AMD and Intel both now support open-source video drivers and release their programming specifications to the OSS community. Let's get NVIDIA to do this too!

read more | digg story

A really good idea, and for the linux community it will be even better I guess, for all those Linux free licensing, no copyright, open source, -lovers. At last we won't see again the dialog "Do you want to use restricted drivers?" :D

PHP logging class v. 1.2

26

Hi guys,
I've decided to give out a PHP class I created to easily log anything we want in our websites.

Features

This are the things the logging class will do:

  • Store different security levels (Low, Medium, and High)
  • Get the real visitor's IP for every log entry
  • Allow several optional parameters, such as message, priority, page...
  • Easily translated into other languages
  • TABLE_LOGS.sql.txt - This file creates the table 'log'

And this is a screenshot of the log page in action (Or go to the sample page and take a look)
Screenshot of log

Class files and code:

The following files are the really important files:

  • log.class.php - This file contains the logging functions.
  • database.php - This file handles database connection and queries.
  • config.php - This file defines the configuration constants used for database queries. You should only edit this file.
  • logInit.php - This file includes all necessary files and initializes the classes storing them in the appropriate objects

Also, for the example, there are two other files: 'log.php' and 'test.php'. The log.php file shows a sample log, and the test.php shows a sample usage page.

Log in use:

I've set up a test page and a log page. In the test page there are several "common" stuff that you would normally log (A login form, an edit form, and a contact form)

I would recommend that you check those out, in any order you like, and experiment with the different options you'll see in the test page

Usage:

The usage of this logging class is VERY very simple, First of all download the zip with the needed files.
Then you must fill in all the variables in the config.php page.
Once all is configured, upload it to your server, and insert the following code in all the pages you will like to log activity:

 
< ?php
//Initialize logging clases
include('logInit.php');
//
?>
 

This is the initialization of the logging object and all other needed stuff.

The logging function is:

 
< ?php
$log->logg('page','message','priority','class','mail');
?>
 

Parameters explanation:

  • Page: This is the page where the log is placed. Set to 1 and it will be automatically detected.
  • Message: This is the message you want to have the log store. You can have some preset messages which are stored in the log.class.php file. Set to 1 to have a preset message stored.
  • Priority: This is the priority or Importance of the log entry. Values can be: High,Medium,Low.
  • Class: This is the class you want the log entry to have. Values are: Red, Danger, Yellow, Green, and Blue.
  • Mail: This setting can be yes or no. If it is not specified it will be set to "no".

You can edit the list of pre-set important pages in the file log.class.php, which is strongly recommended.

Download

Here you may download the zip file containing all necessary files to get the logging running:

Download zip - v. 1.2 - 22kb (3159 downloads)
Mirror #2 Zip file - @ PHP Classes (Without the icons)

It includes a css file with all needed styles, the icons, a log emptying page, a log sample page, the test page, and all the other files needed for the logging.

If you improve this script, or you find any bugs, report them using the comments please!
And remember, for any doubt or problem you have with the usage of this class, comment here and leave an email in the field email so I can answer you!

II Play with the food :)

2

Funny food column, to put to the right I guess...Hi all,
Well, regarding the amazing views of the first entry "Play with the food", I've decided to do some sort of follow up of it, but with a video I saw:

This video is about what happens to MacDonalds food when it is left in a jar for weeks :D

The fun thing is that fries stay the same :)

If any of you guys ever decide to try this, please post a link in the comments, I would love to post the video here! :)
I may even try myself, never know...

Top 10 Most Useless webs:

2

After a lot of time finding out REALLY useless websites out there I thought it was time to actually do a complete "compilation" of them, so here we go:

  1. They'll never find us herethey

  2. Wait forever... A website that takes a VERY long time to load... what?
    Tell us here what happens if you wait enough time.. :(

  3. Rotating head. Well, I just have no idea on how to describe this.. what is the point???

  4. Blaggel... Well, I just find funny that someone is paying for this space :D

  5. Dude in a box that says it all.

  6. Peeling paint Watch a webcam showing live a wall with its pain peeling... wtf

  7. Something This is probably the most pointless of all

  8. 404 error Watch a 404 error page talk with it's self

  9. World's highest webpage That say's it all, scroll down 18.939 kilometers

  10. The oculous Watch a pair of balls (Earth and moon I guess ;) ) spin around...

Now the fun thing is that there is REAL people who have created those pages, and who pay for their space! :) Internet just surprises me every day...

Also, as I was doing my research for this article I came across REALLY weird websites, so I might write another article with the Top 10 most weird websites, which are not pointless, they actually Do stuff, but wow, they are imagination...

If you know of anymore, comment!

Go to Top