2013年12月29日星期日

Choosing a Verb Tense When Summarizing Speech

By Geraldine Woods from English Grammar For Dummies, 2nd Edition

When you are telling a story, you may what to summarize someone else’s speech. Although you can use just about any verb tense to do so, in English different tenses create a different experience for your readers and listeners. Here is an example that uses past tense:
Flipping his hair over each of his three shoulders, the alien told us about the explosion on his planet. The gas of three rocket tanks caught fire and destroyed the spaceport terminal, he said. He went on to explain that almost everyone on the planet was affected, including the volleyball team, which sustained significant losses. All their courts, he said, were covered with rubble, and they forfeited the intergalactic tournament.
The alien’s story is summarized speech. He is not being quoted directly. If he were, the writer would have inserted some of his exact words:
“Oh, the humanity!” he cried.
In the previous summarized speech, the verbs are all in past tense. Although rare, it’s possible to summarize speech in present tense also. Present tense adds an extra dose of drama:
Flipping his hair over each of his three shoulders, the alien tells us about the explosion on his planet. The gas of three rocket tanks catches fire and destroys the spaceport terminal, he says. He goes on to explain that almost everyone on the planet is affected,including the volleyball team, which sustains significant losses. All their courts, he says, are covered with rubble, and they forfeit the intergalactic tournament.
When reporting information, either present or past tense is acceptable. However, mixing tenses is not acceptable.
Wrong: Shakey said that he had tossed the salad out the window. It hits a pedestrian, who sues for lettuce-related damages. (The first two verbs are in past tense, and the next two are in present tense.)
Right: Shakey said that he had tossed the salad out the window. It hit a pedestrian, whosued for lettuce-related damages. (All verbs are in a form of the past tense.)
One special note: When you’re not reporting what someone says, you can make a general statement about something that always happens (someone’s custom or habit) using present tense. You can easily combine such a statement with a story that focuses on one particular incident in the past tense. Therefore, the preceding story may begin in present tense and move to past tense in this way:
Lola excavates at the town dump every Tuesday afternoon before she attends choir practice. She often finds arrowheads, broken pottery, discarded automobile tires, and other items of interest.
Up to here in the story, all the verbs are in present tense because the story tells of Lola’s habits. The story isn’t reporting what someone said. In the next sentence, the story switches to past tense because it examines one particular day in the past.
One day she discovered a metal coil about two feet long. On one end of the coil was a piece of gum. As she thoughtfully removed the gum and started to chew, a whistleblew. Roger sprinted into the dump at top speed. “Get your hands off my gum,” heexclaimed. Roger smiled. His anti-gum-theft alarm had worked perfectly.
When you’re revising a paragraph on the writing section of the SAT I or the English portion of the ACT, keep your eye out for verb-tense errors.

2013年10月30日星期三

Good practice in Magento theming

There are a number of points that a good Magento theme will typically abide by:

  •  The use of only one layout file called local.xml, where any layout updates specific to the custom Magento theme are declared. Additionally, it is considered bad practice to create any layout files with the same name as any layout file in Magento's base theme.


  •  Similarly, there should be no CSS files within your theme's skin that use the same name as any CSS file in the default skin.


  • Restricting any .phtml (Magento template files) to just those which have been changed for use with the custom theme. Adhering to these guidelines of Magento theming make it easier to upgrade your Magento installation without making changes to your theme files.

2013年3月11日星期一

jquery-table management2




$('td').click(function(){
    var colIndex = $(this).parent().children().index($(this));
    var rowIndex = $(this).parent().parent().children().index($(this).parent());
    alert('Row: ' + rowIndex + ', Column: ' + colIndex);
});

Javascript-table management1

to alert the text value of each td
Copy code
  1. $('table tr td').each(function(){
  2.       var texto = $(this).text();
  3. });

if you want the value of the first row second column, otherwise known as row 1 cell 2 or position(1,2), 
Copy code
  1. var texto = $('table tr:nth-child(1) td:nth-child(2)').text()