Monthly Archive for March, 2008

A Sandpiper to Bring You Joy

She was six years old when I first met her on the beach near where I live. I drive to this beach, a distance of three or four miles, whenever the world begins to close in on me. She was building a sand castle or something and looked up, her eyes as blue as the sea. “Hello,” she said. I answered with a nod, not really in the mood to bother with a small child.

“I’m building,” she said.

“I see that. What is it?” I asked, not caring.

“Oh, I don’t know, I just like the feel of sand.” That sounds good, I thought, and slipped off my shoes. A sandpiper glided by.

“That’s a joy,” the child said.

“It’s a what?”

“It’s a joy. My mama says sandpipers come to bring us joy.” The bird went gliding down the beach.

“Good-bye joy,” I muttered to myself, “hello pain,” and turned to walk on. I was depressed; my life seemed completely out of balance.

“What’s your name?” She wouldn’t give up.

“Ruth,” I answered. “I’m Ruth Peterson.”

“Mine’s Wendy… I’m six.”

“Hi, Wendy.” She giggled.

“You’re funny,” she said. In spite of my gloom I laughed too and walked on. Her musical giggle followed me. “Come again, Mrs. P,” she called. “We’ll have another happy day.”

The days and weeks that followed belong to others: a group of unruly Boy Scouts, PTA meetings, and ailing mother. The sun was shining one morning as I took my hands out of the dishwater. “I need a sandpiper,” I said to myself, gathering up my coat. The ever-changing balm of the seashore awaited me. The breeze was chilly, but I strode along, trying to recapture the serenity I needed. I had forgotten the child and was startled when she appeared.

“Hello, Mrs. P,” she said. “Do you want to play?”

“What did you have in mind?” I asked, with a twinge of annoyance.

“I don’t know, you say.”

“How about charades?” I asked sarcastically. The tinkling laughter burst forth again.

“I don’t know what that is.”

“Then let’s just walk.” Looking at her, I noticed the delicate fairness of her face. “Where do you live?” I asked.

“Over there.” She pointed toward a row of summer cottages. Strange, I thought, in winter.

“Where do you go to school?”

“I don’t go to school. Mommy says we’re on vacation.” She chattered little girl talk as we strolled up the beach, but my mind was on other things. When I left for home, Wendy said it had been a happy day. Feeling surprisingly better, I smiled at her and agreed.

Three weeks later, I rushed to my beach in a state of near panic. I was in no mood to even greet Wendy. I thought I saw her mother on the porch and felt like demanding she keep her child at home. “Look, if you don’t mind,” I said crossly when Wendy caught up with me, “I’d rather be alone today.” She seems unusually pale and out of breath.

“Why?” she asked.

I turned to her and shouted, “Because my mother died!” and thought, my, why was I saying this to a little child?

“Oh,” she said quietly, “then this is a bad day.”

“Yes,” I said, “and yesterday and the day before and-oh, go away!”

“Did it hurt? ” she inquired.

“Did what hurt?” I was exasperated with her, with myself.

“When she died?”

“Of course it hurt!!!!” I snapped, misunderstanding, wrapped up in myself. I strode off.

A month or so after that, when I next went to the beach, she wasn’t there. Feeling guilty, ashamed and admitting to myself I missed her, I went up to the cottage after my walk and knocked at the door. A drawn looking young woman with honey-colored hair opened the door. “Hello,” I said. “I’m Ruth Peterson. I missed your little girl today and wondered where she was.”

“Oh yes, Mrs. Peterson, please come in. Wendy spoke of you so much. I’m afraid I allowed her to bother you. If she was a nuisance, please, accept my apologies.”

“Not at all-she’s a delightful child,” I said, suddenly realizing that I meant it. “Where is she?”

“Wendy died last week, Mrs. Peterson. She had leukemia. Maybe she didn’t tell you.” Struck dumb, I groped for a chair. My breath caught. “She loved this beach; so when she asked to come, we couldn’t say no. She seemed so much better here and had a lot of what she called happy days. But the last few weeks, she declined rapidly…” her voice faltered. “She left something for you … if only I can find it. Could you wait a moment while I look?” I nodded stupidly, my mind racing for something, anything, to say to this lovely young woman. She handed me a smeared envelope, with MRS. P printed in bold, childish letters.

Inside was a drawing in bright crayon hues-a yellow beach, a blue sea, and a brown bird. Underneath was carefully printed: A SANDPIPER TO BRING YOU JOY. Tears welled up in my eyes, and a heart that had almost forgotten to love opened wide. I took Wendy’s mother in my arms. “I’m so sorry, I’m sorry, I’m so sorry,” I muttered over and over, and we wept together. The precious little picture is framed now and hangs in my study. Six words -one for each year of her life - that speak to me of harmony, courage, undemanding love. A gift from a child with sea-blue eyes and hair the color of sand –who taught me the gift of love.

NOTE: The above is a true story sent out by Ruth Peterson. It serves as a reminder to all of us that we need to take time to enjoy living and life and each other. Life is so complicated, the hustle and bustle of everyday traumas, can make us lose focus about what is truly important or what is only a monetary setback or crisis. This weekend, be sure to give your love ones an extra hugs, and by all means, take a moment … even if it is only ten seconds, and stop and smell the roses. “The price of hating other human beings is loving oneself less.” “We love, because HE first loved us.”

Dreams

Keep your dreams alive. Understand to achieve anything requires faith and belief in yourself, vision, hard work, determination, and dedication. Remember all things are possible for those who believe. - Gail Devers

Yolanda Gail Devers (born November 19, 1966 in Seattle, Washington, USA) is a three-time Olympic 100 m champion in athletics for the US Olympic Team. Devers grew up near National City, CA and graduated from Sweetwater High School in National City, CA.

A young talent in the 100 m and 100 m hurdles, Devers was in training for the 1988 Summer Olympics, started experiencing health problems, suffering from among others migraine and vision loss. She qualified for the Olympics 100 m hurdles, in which she was eliminated in the semi-finals, but her health continued to deteriorate even further.

In 1990, she was diagnosed with Graves’ disease, and started radiation therapy. Amazingly, Devers recovered quickly and resumed training. At the 1991 World Championships, she won a silver medal in the 100 m hurdles.

At the 1992 Summer Olympics, Devers starred. She qualified for the final of the 100 m, which ended in an exciting finish, with five women finishing close (within 0.06 seconds). The photo finish showed Devers had narrowly beaten Jamaican Juliet Cuthbert. In the final of the 100 m hurdles, Devers’ lead event, she seemed to be running towards a second gold medal when she hit the final hurdle and stumbled over the finish line in fifth place, leaving Voula Patoulidou from Greece as the upset winner.

In 1993, Devers won the 100 m World Championship title after - again - a photo finish win over Merlene Ottey in an apparent dead heat, and the 100 m hurdles title. She retained her hurdles title in 1995.

The 100 m final at the 1996 Summer Olympics was an almost exact repeat of the World Championships final three years before. Ottey and Devers again finished in the same time and did not know who had won the race. Again, both were awarded the same time, but Devers was judged to have finished first and became the first woman to retain the Olympic 100 m title since Wyomia Tyus. In the final of her favourite event, Devers again failed, as she finished fourth and outside of the medals. With the 4 x 100 m relay team, Devers won her third Olympic medal.

After these Olympics, Devers concentrated on the hurdles event, winning the World Championship again in 1999, but she had to forfeit for the semi-finals at the 2000 Summer Olympics.

Devers left competition in 2005 to give birth to a child with her husband and returned in 2006.

On February 2, 2007, Devers edged 2004 Olympic champion Joanna Hayes to win the 60-meter hurdles event at the Millrose Games in 7.86 seconds - the best time in the world this season and just 0.12 off the record she set in 2003.

Penalties for Ignorance

“One of the penalties for refusing to participate in politics is that you end up being governed by your inferiors.” - Plato

Isaiah 48:18

18 If only you had paid attention to my commands,
your peace would have been like a river,
your righteousness like the waves of the sea

How to install iP1600 on Fedora Core?

Here’s finally I could release a step by step instructions to install and make your Canon Pixma iP1600 works with Fedora Core.

  1. Download the driver package from the Canon website for iP2200: http://software.canon-europe.com/products/0010231.asp

  2. Extract all of the files:
    cnijfilter-common-2.60-1.i386.rpm
    cnijfilter-common-2.60-1.src.rpm
    cnijfilter-ip2200-2.60-1.i386.rpm
    cnijfilter-ip2200-lprng-2.60-1.i386.rpm

  3. Install cnijfilter-common-2.60-1.i386.rpm by double clicking, follow the instructions, and all of the ignore warnings.
  4. After completing the installation for the dependency, continue the installation process by double clicking cnijfilter-ip2200-2.60-1.i386.rpm. Follow te instructions, and all of the ignore warnings.
  5. Go to http://localhost:631/admin using a web browser.
  6. It will bring you to CUPS Administration panel. This is the place where you could manage your printer(s). Select Add printer if this is the first time you’re using CUPS. If you’ve previously added your printer, then select manage.
  7. Follow the direction, fill the necessary information to identify your printer until you reach a page in which you could specify the driver that you wanted to use. All of the provided drivers are not compatible, so you have to specify your own driver. Click browse, then find the driver that is located at /usr/share/cups/model/canonip2200.ppd

  8. Continue, and your printer will be installed using the driver that you specified. Select the printer name, and you will be redirected to the printer status page where you could do a test print. Complete the installation by Printing the test page.

Enjoy! :)

Simple PHP MySQL Injection Prevention

An example SQL Injection Attack

// Query database to check if there are any matching users
$query = "SELECT * FROM users WHERE user='{$_POST['username']}'
     AND password='{$_POST['password']}'";
mysql_query($query); // We didn't check $_POST['password'],
                     // it could be anything the user wanted! For example:
$_POST['username'] = 'aidan';
$_POST['password'] = "' OR ''='";
// This means the query sent to MySQL would be:
echo $query;
?>

The query sent to MySQL:

SELECT * FROM users WHERE user='aidan' AND password='' OR ''=''

This would allow anyone to log in without a valid password.

Using mysql_real_escape_string() around each variable prevents SQL Injection. This example demonstrates the “best practice” method for querying a database, independent of the Magic Quotes setting.

if (isset($_POST['product_name']) && isset($_POST['product_description'])
      && isset($_POST['user_id'])) {// Connect
    $link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password');
    if(!is_resource($link)) {
          echo "Failed to connect to the servern";
          // ... log the error properly
    } else {
    // Reverse magic_quotes_gpc/magic_quotes_sybase effects on those vars if ON.
    if(get_magic_quotes_gpc()) {
    $product_name        = stripslashes($_POST['product_name']);
    $product_description = stripslashes($_POST['product_description']);
} else {
    $product_name        = $_POST['product_name'];
    $product_description = $_POST['product_description'];
}
// Make a safe query
$query = sprintf("INSERT INTO products (`name`, `description`, `user_id`)
        VALUES ('%s', '%s', %d)",
mysql_real_escape_string($product_name, $link),
mysql_real_escape_string($product_description, $link),
$_POST['user_id']);
mysql_query($query, $link);
if (mysql_affected_rows($link) > 0) {
     echo "Product inserted";
} else {
echo "Fill the form properly";
}
?>

The query will now execute correctly, and SQL Injection attacks will not work.

Luke 24:46-47

46He told them, “This is what is written: The Christ will suffer and rise from the dead on the third day, 47and repentance and forgiveness of sins will be preached in his name to all nations, beginning at Jerusalem.

LEFT, RIGHT, and INNER JOIN in MySQL

In a database such as MySQL, data is divided into a series of tables (the “why” is beyond what I’m writing today) which are then connected together in SELECT commands to generate the output required. I find when I’m running MySQL training, people often get confused between all the join flavours. Let me give you an example to see how it works.

If this isn’t quite the question you’re looking to have answered, we’ve got a MySQL IAQ (Infrequently Answered Questions that may help you

First, some sample data:
Mr Brown, Person number 1, has a phone number 01225 708225
Miss Smith, Person number 2, has a phone number 01225 899360
Mr Pullen, Person number 3, has a phone number 01380 724040
and also:

Person number 1 is selling property number 1 - Old House Farm
Person number 3 is selling property number 2 - The Willows
Person number 3 is (also) selling property number 3 - Tall Trees
Person number 3 is (also) selling property number 4 - The Melksham Florist
Person number 4 is selling property number 5 - Dun Roamin.

mysql> select * from demo_people;

+------------+--------------+------+
| name       | phone        | pid  |
+------------+--------------+------+
| Mr Brown   | 01225 708225 |    1 |
| Miss Smith | 01225 899360 |    2 |
| Mr Pullen  | 01380 724040 |    3 |
+------------+--------------+------+

3 rows in set (0.00 sec)

mysql> select * from demo_property;

+------+------+----------------------+
| pid  | spid | selling              |
+------+------+----------------------+
|    1 |    1 | Old House Farm       |
|    3 |    2 | The Willows          |
|    3 |    3 | Tall Trees           |
|    3 |    4 | The Melksham Florist |
|    4 |    5 | Dun Roamin           |
+------+------+----------------------+

5 rows in set (0.00 sec)

mysql>

If I do a regular JOIN (with none of the keywords INNER, OUTER, LEFT or RIGHT), then I get all records that match in the appropriate way in the two tables, and records in both incoming tables that do not match are not reported:

mysql> select name, phone, selling 

from demo_people join demo_property 

on demo_people.pid = demo_property.pid;

+-----------+--------------+----------------------+
| name      | phone        | selling              |
+-----------+--------------+----------------------+
| Mr Brown  | 01225 708225 | Old House Farm       |
| Mr Pullen | 01380 724040 | The Willows          |
| Mr Pullen | 01380 724040 | Tall Trees           |
| Mr Pullen | 01380 724040 | The Melksham Florist |
+-----------+--------------+----------------------+

4 rows in set (0.01 sec)

mysql>

If I do a LEFT JOIN, I get all records that match in the same way and IN ADDITION I get an extra record for each unmatched record in the left table of the join - thus ensuring (in my example) that every PERSON gets a mention:

mysql> select name, phone, selling 

from demo_people left join demo_property 

on demo_people.pid = demo_property.pid; 

+------------+--------------+----------------------+
| name       | phone        | selling              |
+------------+--------------+----------------------+
| Mr Brown   | 01225 708225 | Old House Farm       |
| Miss Smith | 01225 899360 | NULL                 |
| Mr Pullen  | 01380 724040 | The Willows          |
| Mr Pullen  | 01380 724040 | Tall Trees           |
| Mr Pullen  | 01380 724040 | The Melksham Florist |
+------------+--------------+----------------------+

5 rows in set (0.00 sec)

mysql>

If I do a RIGHT JOIN, I get all the records that match and IN ADDITION I get an extra record for each unmatched record in the right table of the join - im my example, that means that each property gets a mention even if we don’t have seller details:

mysql> select name, phone, selling 

from demo_people right join demo_property 

on demo_people.pid = demo_property.pid;

+-----------+--------------+----------------------+
| name      | phone        | selling              |
+-----------+--------------+----------------------+
| Mr Brown  | 01225 708225 | Old House Farm       |
| Mr Pullen | 01380 724040 | The Willows          |
| Mr Pullen | 01380 724040 | Tall Trees           |
| Mr Pullen | 01380 724040 | The Melksham Florist |
| NULL      | NULL         | Dun Roamin           |
+-----------+--------------+----------------------+

5 rows in set (0.00 sec)

mysql>

An INNER JOIN does a full join, just like the first example, and the word OUTER may be added after the word LEFT or RIGHT in the last two examples - it’s provided for ODBC compatability and doesn’t add an extra capabilities.

Digital Interactive Table

Psalm 96:1-2

 1 Sing to the LORD a new song;
sing to the LORD, all the earth.

2 Sing to the LORD, praise his name;
proclaim his salvation day after day.