2011 in review

The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.

Here’s an excerpt:

The concert hall at the Syndey Opera House holds 2,700 people. This blog was viewed about 20,000 times in 2011. If it were a concert at Sydney Opera House, it would take about 7 sold-out performances for that many people to see it.

Click here to see the complete report.

Managing Hierarchical Data in MySQL

By Mike Hillyer (Technical Writer for MySQL AB and lives in Alberta, Canada.)

Source: http://www.mysql.com

Disable drupal modules using MySQL query

I am doing a project in drupal.  After enabling a module, my site is not loading and i can’t able to disable that module.  so i start searching Google and found this easy solution. May be it will be helpful for others who have similar problems.

Connect to your mysql shell or phpmyadmin and then use following query to disable a module:

UPDATE system SET status=0 WHERE name='module name';

Remember to change module name to the name of the module you want  to disable.
This action will disable that module so that administrators can access to the administration panel again.

To list all drupal modules:

SELECT * FROM system WHERE type='module';

2010 in review

The stats helper monkeys at WordPress.com mulled over how this blog did in 2010, and here’s a high level summary of its overall blog health:

Healthy blog!

The Blog-Health-o-Meter™ reads This blog is on fire!.

Crunchy numbers

Featured image

A helper monkey made this abstract painting, inspired by your stats.

The average container ship can carry about 4,500 containers. This blog was viewed about 15,000 times in 2010. If each view were a shipping container, your blog would have filled about 3 fully loaded ships.

 

In 2010, there were 16 new posts, growing the total archive of this blog to 85 posts. There were 26 pictures uploaded, taking up a total of 5mb. That’s about 2 pictures per month.

The busiest day of the year was September 15th with 87 views. The most popular post that day was Auto-Grow Textarea – doing it the easy way in Javascript.

Where did they come from?

The top referring sites in 2010 were google.co.in, google.com, en.search.wordpress.com, yandex.ru, and greensweater.wordpress.com.

Some visitors came searching, mostly for autogrow textarea, textarea autogrow, difference between table and div, stylish button css, and php form validation with preg_match.

Attractions in 2010

These are the posts and pages that got the most views in 2010.

1

Auto-Grow Textarea – doing it the easy way in Javascript May 2009
6 comments

2

input[type=submit] css not working in IE6 December 2009

3

Difference between table and div tags March 2010
4 comments

4

PHP: Sending Email (Text/HTML/Attachments) July 2008
4 comments

5

Dynamically Change Width and Height in embed code August 2009
5 comments

A list of possible modes for fopen() using mode

$file_handle = fopen(“test.txt”, “r“);

Here’s a fuller list of things you can replace “r” with.

Mode Meaning
r Use this to read a file only. The pointer is set to the
start of the file.
r+ Use this to read and write to a
file. The pointer is set to the start of the file.
w Use this to write to a file only. It will erase the entire
contents of the file you have open. If no file exists with your chosen name,
then it will create one for you
w+ Same as “w”, but used
to read and write.
a Use this to write to a file only, and append data to the
end of the file. Doesn’t erase contents, in other words.
a+ Same as “a”, but with
read access as well.
x Create a file to write only. But gives you a special warning
called E_WARNING.
x+ Same as x but with read access as
well.
t In Windows, a line break is \r\n. The t converts \n line
breaks created on other Operating Systems so that they are readable with
Windows
b Force PHP to open the file in binary
mode.

So if you wanted to read and write to the file, you’d use this:

$file_handle = fopen(“test.txt”, “r+”);

Or this, if you want to append data to the end of file when you’re writing it back:

$file_handle = fopen(“test.txt”, “a+”);

If you need to work with binary files (like images), then you can add the “b”:

$file_handle = fopen(“test.txt”, “rb”);

« Older entries

Follow

Get every new post delivered to your Inbox.