วันศุกร์ที่ 4 กุมภาพันธ์ พ.ศ. 2554

Filip Krajinovic hotshots

Take a look at some hotshots of Filip Krajinovic (Serbia). Points picked from his semifinal match against Sam Querry at 2010 Serbia Open. Filip lost this match 1-6 2-6, but there were still quite a few great shots from this 18yo rising star. Hope you'll enjoy it :)



http://www.youtube.com/watch?v=JN229BUElds&hl=en

วันอังคารที่ 1 กุมภาพันธ์ พ.ศ. 2554

Time Lapse of Khalifa Stadium 2010 WTA Championships

Time Lapse of the Khalifa Stadium, venue of the 2010 WTA Championships.



http://www.youtube.com/watch?v=FDBFNHVgx0Q&hl=en

วันจันทร์ที่ 31 มกราคม พ.ศ. 2554

High Blood Pressure Treatment by Drugs, Lifestyle Changes and Natural Remedies

High blood pressure (hypertension) is one of the most common diseases affecting the western world. High blood pressure is usually symptomless whilst slowly damaging the eyes, brain, and kidneys. Many governments have initiated policies to raise public awareness. The aim of this article is to give the person suffering (or who may be suffering) hypertension some knowledge about the condition enabling them to make objective decisions regarding their treatment.

High blood pressure appears not to have a clear-cut cause. It is more common in people who smoke, drink excessive alcohol, are overweight, and are sedentary. However, non-smoking teetotal athletes can suffer from hypertension. Certain ethnic groups have a very high incidence of high blood pressure, with research not revealing any reasons for this.

Drugs (Pharmaceuticals) To Treat High Blood Pressure

ACE (Angiotensin-Converting Enzyme) Inhibitirs: enalapril maleate, captopril, quinapril, lisinopril, amongst others.
Function: to block an enzyme in the bloodstream that produces angiotensin II, a chemical that raises blood pressure by constricting blood vessels.
Side effects: long-term cough, acute swelling of face, lips, and throat.

Angiotensin II Blockers: candesartan, irbesartan, losartan potassium, valasartan.
Function: to block the effect of angiotensin.
Side effects: are rare.

Alpha Blockers: clonidine, prasozin, doxazosin, terazosin.
Function: to chemically block responses to stressors that causeraised blood pressure and heart rate.
Side effects: dry mouth, dizziness, fatigue, nausea, impaired sexual function. Alpha blockers can precipitate dramatic increase in blood pressure treatment if suddenly discontinued.

Beta Blockers: propranolol, betaxolol, carvedilol, atenolol, metoprolol, labetolol.
Function: to block chemical processes that lead to increased heart pressure and heart rate. Often given after a heart attack.
Side effects: tiredness, excessively slow heart rate, impaired sexual functioning. Beta blockers can precipitate dramatic increase in blood pressure if suddenly discontinued.

Calcium-Channel Blockers: amolodipine besylate, diltiazem, verapamil, nifedipine.
Function: to relax blood vessel walls to make them dilate (expand), lowering blood pressure.
Side effects: are constipation, dizziness, nausea, fluid retention.

Diuretics: bendrofluazide, bumetanide, cyclopenthiazide, frusemide, hydrochlorothiazide, indapamide, metolazone, mefruside.
Function: is to stimulate kidneys to excrete more salt and water, lowering blood volume and blood pressure.
Side effects: are low levels of potassium and magnesium, elevations in uric acid, increases in blood cholesterol.

Hypertension Friendly Lifestyle

Hypertension has been shown to be related to many causes. So a change in lifestyle, other than one single thing, often helps someone lower their blood pressure. Three things that research throws up again and again is that people who drink to excess, smoke and are overweight are at a much higher risk of developing high blood pressure. If you eat fewer calories yo will soon start to lose weight, just don't expect to be as thin as Lance Armstrong in two weeks! For the heavy drinker cutting down on alcohol consumption can have many benefits, it will help lower your blood pressure, it will help you lose weight, and it will save you a fortune. Smoking has, for many decades, been known to be generally bad for health. The reason it raises blood pressure is that it causes a constriction (narrowing) of the arteries. If you really can't stop smoking, at least cut down. Research indicates that eating 'empty' calories (refined carbohydrates, sugar, sugary drinks,'junk' food) can be a cause of high blood pressure and contribute to being overweight. Try eating high-fiber foods such as whole grains and raw vegetables. Fibre makes you feel full, so in turn you may actually eat less and lose weight. Eating deep-sea (cold water) fish rich in essential fatty acids (EFA's) such as mackeral, cod tuna, and salmon have been shown to help with blood pressure. It is thought that the omega-3 fatty acid in these relax artery walls and make blood thinner. Eat foods rich in magnesium, potassium, and calcium such as nuts and seeds, green leafy vegetables, whole grains, legumes, amongst others. One area that every professional agrees upon is that engaging in regular aerobic exercise for 30 minutes 3 times per week will help lower blood pressure.

Natural Remedies To Treat High Blood Pressure

Dandelion: Taraxacum officinale: is a popular remedy for fluid retention. By increasing urine flow dandelion also helps lower blood pressure. Dandelion benefits from not causing potassium loss, which pharmaceutical diuretics usually do. Make sure that if you use dandelion leaves that they have not been treated with pesticides.

Garlic: Allium sativum: has been used for 1,000's of years for many conditions. To get the best from garlic, 3 cloves should be eaten raw everyday. The same effect can be achieved by taking garlic gel capsules.

Reishi: Ganoderma lucidum: is a mushroom. Scientific studies have shown that reishi lowers blood pressure. The mushroom itself is nearly inedible and is usually taken in capsule form.

Hawthorn: Crataegus spp: lowers blood pressure by relaxing and dilating artery walls. Hawthorn can take many weeks or months to show any effect.

Hypercet: is a proprietary blend of many natural ingredients including the following active ingredients. Calcium A recent article by Christopher Ott describes the many ways calcium protects your health, including the role it plays in protecting your heart.

Gene Spiller, PhD, the Director of the Health Research and Studies Center says, "In fact, your calcium intake may be almost as important to blood pressure as your sodium intake," He is co-author of Calcium: Nature's Versatile Mineral (Avery, 2000)

Spiller also said, "An adequate supply of calcium helps muscles-including your heart muscle-do their work of contracting and relaxing. Calcium also appears to help your nervous system regulate the level of pressure in your arteries."

Calcium is a naturally occurring mineral with no known side effects.
Magnesium
is the fourth most abundant mineral in the body, and is essential to good health.

A diet high in green leafy vegetables such as spinach, whole grains, nuts, and some legumes supplies magnesium. Tap water can be a good source, if the water is "hard." "Soft" water contains fewer minerals.

Magnesium is a naturally occurring mineral with no known side effects

Malic Acid
"An apple a day keeps the doctor away." There's more truth in that old saying than you might think. Malic acid is derived from tart apples and grapes, and is an essential part of the magnesium support team.

Malic acid is an important part of the Krebs cycle, a series of chemical reactions carried out in the living cell, and is used by the body to increase ATP, an enzyme that supports muscle health, reduces muscle stress, and assists to improve energy levels in the body. Malic Acid is a naturally occurring substance with no known side effects.

Citric acid, although acid in its fresh form (lemon and limes) transforms during metabolism into alkali. This is helpful to your blood. Our American diet tends to be overly acidic from coffee, sodas, alcohol, and certain proteins. An acidic condition tends to be more inflammatory. Citric acid is essential to the Krebs cycle, Citric acid, together with malic acid, are involved with complex chemical actions, resulting in the production of carbon dioxide, and its removal from the cells. Citric acid is also used as a natural preservative to maintain freshness of many products, and serves this role, as well, in the Hypercet BPF. Citric Acid is a naturally occurring substance with no known side effects.

Glycine is a non-essential amino acid found naturally in beans, brewer's yeast, dairy products, meat, seafood, nuts and whole grains. It's involved in the production of glucose in the liver. Glycine is plays an important role in supporting healthy blood in your body. It is involved in the manufacture of nitrogen to process many other amino acids, and usefulin the processing of hemoglobin, glutathione, DNA, and RNA. It helps with brain function, and is important for a healthy prostate gland. Glycine is a naturally occurring substance with no known side effects.

It has been shown that there can be many causes of high blood pressure, not just one. Treatment is similar in that a lifestyle switch is usually better than a pharmaceutical cure. For the non-smoking, teetotal athlete who suffers hypertension the pharmaceutical may be the only way left open. For the rest of us who may be a little overweight, drink a little too much (I include myself in this group!), or smoke, have options available. Take some natural remedies, take a little more exercise, eat a little healthier, cut back on the cigarettes, and cut back on the booze. Try to change one thing at a time, within a few months your lifestyle could be dramatically more blood pressure friendly.

The reader who suffers with high blood pressure should now have some more knowledge about their condition and the different therapies available to them, enabling them to make objective choices in their own treatment.

วันอาทิตย์ที่ 30 มกราคม พ.ศ. 2554

ATP World Tour Uncovered Rome Review

In season 2, episode 17 of ATP World Tour Uncovered... The ancient city of Rome, the Italian capital, is a fitting location for the Internazionali BNL D'Italia, which in 2010 celebrated the opening of a new centre court and the centenary year of the Italian Tennis Federation.



http://www.youtube.com/watch?v=J4QXPOeyYMQ&hl=en

วันศุกร์ที่ 28 มกราคม พ.ศ. 2554

Automating MS Excel Using Visual Studio.NET

Introduction

I have written this article to address requests I have been getting through e-mail on how to automate MS Excel. Most people who are looking at this article might also be interested at the following articles for automating MS Word documents. Here is the link for Automating MS Word using C#, and here is the link for Automating MS Word using C++.

Back to the main subject, there are many spreadsheets in the business world, and more and more of them are being created and sometimes used in ways that simply Excel was not designed for, for instance storing sensitive and crucial data for laboratories and etc...

To start with, this article will not get into the very advanced automations available in Excel, but it will give a framework that hopefully can be used by others to improve on and make it more expansible. The framework will allow you to create an Excel object and control some of the basic functionalities such as getting worksheet information and extracting data from the worksheet given a range.

The program that I had to develop has a larger scope, I will just be concentrating on the Excel portion. But there are a few neat classes which I developed for file system navigation using threads. If there is enough request for such an article, or if I get a chance to do it, I will go ahead and post it. In the meantime I hope that the following article benefits you.

Background

Having enough understanding of OOP and familiarity with the C# language.

Using the code

I will provide the Excel wrapper class that can be used in your project. The code will be discussed below. I will not get too much into the Excel object model, first because it is a huge task, and second because there is already documentation done by Microsoft. Before we start, here is a quick start for beginners who need to know how to setup an Office Automation project:

Create a new project, for simplicity, create a Windows application, go ahead and right click on References in the Solution Explorer, and select Add Reference... When the Add Reference window comes up, select the COM tab. This will list all Component names which are available on your machine. Since we are going to use MS Excel, you will scroll down until you find: Microsoft Excel 11.0 Object Library.

Note: Yours might be a different version depending on the version of Office installed on your machine. This is for MS Excel 2003.

using System;

using System.IO;

using System.Collections;

using System.Threading;

using Office = Microsoft.Office.Core;

using Excel = Microsoft.Office.Interop.Excel;

using System.Diagnostics;

namespace ATPMain

{

///

/// Project: Code Project Demo

/// Author: Vahe Karamian

/// Date: 03/01/2005

/// Version: 1.0

///

public class VkExcel

{

private Excel.Application excelApp = null;

private Excel.Workbook excelWorkbook = null;

private Excel.Sheets excelSheets = null;

private Excel.Worksheet excelWorksheet = null;

...
using Office = Microsoft.Office.Core;

using Excel = Microsoft.Office.Interop.Excel;

You will need to include these two so you can use the Excel object in your code. So we need to have an Excel.Application object, Excel.Workbook object, Excel.Sheets object, and Excel.Worksheet object. These object will be used to control and extract data from Excel. So we declare the following variables to represent the mentioned objects: excelApp, excelWorkbook, excelSheets, and excelWorksheet.

....

private static object vk_missing = System.Reflection.Missing.Value;

private static object vk_visible = true;

private static object vk_false = false;

private static object vk_true = true;

private bool vk_app_visible = false;

private object vk_filename;

#region OPEN WORKBOOK VARIABLES

private object vk_update_links = 0;

private object vk_read_only = vk_true;

private object vk_format = 1;

private object vk_password = vk_missing;

private object vk_write_res_password = vk_missing;

private object vk_ignore_read_only_recommend = vk_true;

private object vk_origin = vk_missing;

private object vk_delimiter = vk_missing;

private object vk_editable = vk_false;

private object vk_notify = vk_false;

private object vk_converter = vk_missing;

private object vk_add_to_mru = vk_false;

private object vk_local = vk_false;

private object vk_corrupt_load = vk_false;
#endregion

#region CLOSE WORKBOOK VARIABLES

private object vk_save_changes = vk_false;

private object vk_route_workbook = vk_false;
#endregion

///

/// Vahe Karamian - 03/04/2005 - Excel Object Constructor.

///

public VkExcel()

{

this.startExcel();

}

///

/// Vahe Karamian - 03/04/2005 - Excel Object Constructor

/// visible is a parameter, either TRUE or FALSE, of type object.

///

/// Visible parameter, true for visible, false for non-visible

public VkExcel(bool visible)

{

this.vk_app_visible = visible;

this.startExcel();

}

...
In the above block, we have predefined some constants that will be used to open a given Excel file. To find out more about what each parameter represents or does, you should look into the documentation that comes with Excel.

We have two constructors: VkExcel() which by default will start Excel hidden, and the other VkExcel(bool visible) which gives you the option to specify if you would like to see the Excel application or not.

...

///

/// Vahe Karamian - 03/04/2005 - Start Excel Application

///
#region START EXCEL

private void startExcel()

{

if( this.excelApp == null )

{

this.excelApp = new Excel.ApplicationClass();

}

// Make Excel Visible

this.excelApp.Visible = this.vk_app_visible;

}
#endregion

///

/// Vahe Karamian - 03/23/2005 - Kill the current Excel Process

///
#region STOP EXCEL

public void stopExcel()

{

if( this.excelApp != null )

{

Process[] pProcess;

pProcess = System.Diagnostics.Process.GetProcessesByName("Excel");

pProcess[0].Kill();

}

}
#endregion

...
The above code starts and stops the Excel Application. startExcel() checks to see if the excelApp object is initialized or not, if it is then just make sure its visibility is set to the visible property. If not, it goes ahead and initializes the object for us. stopExcel() also checks to see if the object is currently in use, and if it is then it will go ahead and kill the process.

Note: pProcess[0].Kill() will make sure that Excel is gone for good! Some people that do Excel automation always complain that after they quit the application, Excel disappears but the Excel process is still in the task monitor, this code will take care of that for you!

...

///

/// Vahe Karamian - 03/09/2005 - Open File function for Excel 2003

/// The following function will take in a filename, and a password

/// associated, if needed, to open the file.

///
#region OPEN FILE FOR EXCEL

public string OpenFile(string fileName, string password)

{

vk_filename = fileName;

if( password.Length > 0 )

{

vk_password = password;

}

try

{

// Open a workbook in Excel

this.excelWorkbook = this.excelApp.Workbooks.Open(

fileName, vk_update_links, vk_read_only, vk_format, vk_password,

vk_write_res_password, vk_ignore_read_only_recommend, vk_origin,

vk_delimiter, vk_editable, vk_notify, vk_converter, vk_add_to_mru,

vk_local, vk_corrupt_load);

}

catch(Exception e)

{

this.CloseFile();

return e.Message;

}

return "OK";

}
#endregion

public void CloseFile()

{

excelWorkbook.Close( vk_save_changes, vk_filename, vk_route_workbook );

}

...
Alright, so the above code allows you to open Excel files. OpenFile(string fileName, string password) takes two parameters, the filename, or FULLNAME which is the path + filename, and a password parameter, which is used for protected sheets. Notice that the open function takes a bunch of parameters, which we have defined in the class. CloseFile() will goes ahead and closes the file.

Note: The code provided is for MS Excel 2003. For earlier versions, the parameters are a little different, you will need to check the documentation. If you need help on that send me an e-mail and I will try to help you out.

...

///

/// Vahe Karamian - 03/20/2005 - Get Excel Sheets

/// Get the collection of sheets in the workbook

///
#region GET EXCEL SHEETS

public void GetExcelSheets()

{

if( this.excelWorkbook != null )

{

excelSheets = excelWorkbook.Worksheets;

}

}
#endregion

///

/// Vahe Karamian - 03/21/2005 - Find Excel ATP Worksheet

/// Search for ATP worksheet, if found return TRUE

///

/// bool
#region FIND EXCEL ATP WORKSHEET

public bool FindExcelATPWorksheet(string worksheetName)

{

bool ATP_SHEET_FOUND = false;

if( this.excelSheets != null )

{

// Step thru the worksheet collection and see if ATP sheet is

// available. If found return true;

for( int i=1; i

/// Vahe Karamian - 03/22/2005 - Get Range from Worksheet

/// Return content of range from the selected range

///

/// Range parameter: Example, GetRange("A1:D10")
#region GET RANGE

public string[] GetRange(string range)

{

Excel.Range workingRangeCells = excelWorksheet.get_Range(range,Type.Missing);

//workingRangeCells.Select();

System.Array array = (System.Array)workingRangeCells.Cells.Value2;

string[] arrayS = this.ConvertToStringArray(array);

return arrayS;

}
#endregion

...

GetRange(string range) is the function that actually retrieves the data from the Excel sheet and we convert the returned values into a string[]. This is done by the next function call: this.ConvertToStringArray(array). Then the string[] is passed back to the caller who can consume it in any way they want.

...

///

/// Vahe Karamian - 03/22/2005 - Convert To String Array

/// Convert System.Array into string[]

///

/// Values from range object

/// String[]
#region CONVERT TO STRING ARRAY

private string[] ConvertToStringArray(System.Array values)

{

string[] newArray = new string[values.Length];

int index = 0;

for ( int i = values.GetLowerBound(0); i

วันพฤหัสบดีที่ 27 มกราคม พ.ศ. 2554