Thursday, April 12, 2018

Fraction to Decimal Conversion and Multiple Operations

/*
 * Author: MANIKANDAN S
 * Email: manig99@gmail.com
 * Date: 12 April 2018
 */

using NCalc;
using System;
using System.Linq;

namespace Mehroz
{
    /// <summary>
    /// Classes Contained:
    /// Application
    /// Fraction
    /// FractionException
    /// </summary>


    /// <summary>
    /// The class demonstrates the Fraction class
    /// </summary>
    public class Application
    {
        static decimal Fraction(string fs)
        {
            fs = fs.Replace('+', 'a').Replace('-', 'b').Replace('*', 'c');
            var fs1 = fs.Split('a', 'b', 'c');
            fs1 = fs1.OrderByDescending(x => x.Length).ToArray();
            foreach (var number in fs1)
            {
                fs = fs.Replace(number, GetResult(number).ToString());
            }
            fs = fs.Replace('a', '+').Replace('b', '-').Replace('c', '*');
            var expression = new Expression(fs);
            var result = expression.Evaluate();
            return Convert.ToDecimal(result);
        }
        public static decimal GetResult(string value)
        {
            var numbers = value.Split(' ');
            decimal temp, result = 0.0m;
            decimal numerator, denominator;

            foreach (var str in numbers)
            {
                if (decimal.TryParse(str, out temp))
                {
                    result += temp;
                }
                else if (str.Contains("/"))
                {
                    var frac = str.Split('/');
                    decimal.TryParse(frac[0], out numerator);
                    decimal.TryParse(frac[1], out denominator);

                    result += numerator / denominator;
                }
            }

            return result;
        }
        public static void Main()
        {
            try
            {
                decimal d = Fraction("2 5/7 + 5/7 * 1 1/4");
                Console.WriteLine(string.Format("The Result is ...... {0}", d));
            }   //end try
            catch (Exception exp)
            {
                Console.WriteLine("\nSystem error: " + exp.Message);
            }
            Console.Read();
        }   //end main

     
    }//end class Application


   
} //end namespace

Saturday, October 20, 2012

High Blood Pressure Symptoms in Men

High blood pressure symptoms in men - what are they? How can you recognise them? In this article, I'll tell you some of the symptoms that men with high blood pressure can get.

Headaches
Some people with high b.p. can suffer from headaches. Of course, most headaches are benign and very few are a threat to your health. But if you have a headache and high blood pressure, then dismissing your symptoms could lead to grave consequences.

Vision Problems
If you have very high b.p. then a possible symptom is vision problems. This is because your retina contains many tiny blood vessels and are among the first to get damaged.


Fits
Sometimes, high b.p. can cause a person to fit. If you have a fit out of nowhere then it is more likely that you have epilepsy or some other condition. However, your doctor will always check your b.p. first, just in case.

Black-outs
Black-outs are not a common symptom. Similar to fits, your doctor will want to rule out high b.p. first.

Nausea And Vomiting
Some people with this condition can feel nauseous and feel the need to vomit for no apparent reason. Doctors may misdiagnose their condition when a simple check would have sufficed.

What If I Don't Have These Symptoms?
Do not be foolish and think that a lack of symptoms means that your b.p. is OK. Doctors don't call this "the silent killer" for nothing.

The only way that any person can be sure that they have a normal b.p. is if they check it with a b.p. monitor. This is because the vast majority of people with high b.p. do not have any symptoms at all.

Friday, October 19, 2012

Symptoms of cancer

Even if one could be a healthy person, he or she still wants to be on the lookout for numerous symptoms of cancer if they want to detect it within the initial stages itself. This could boost an individual's chances of beating the disease while not any permanent harm to alternative organs of the body or with minimum harm. Ignoring the symptoms might haunt that person later in the form of further pain and discomfort while lowering chances of recovery. Here are some of the symptoms that ought to not be ignored.

Totally different varieties of cancers

The symptoms of cancer will depend on the type of cancer that the person has contracted. There are completely different sorts of cancers that would attack an individual's body in the form of tumors or even attack the body silently without any visible lumps. Blood cancer or leukemia is one example where no tumors would be found. Similarly, prostate cancer could begin affecting native organs however may also unfold to alternative organs aloof from the prostate like the lungs, liver, etc. There also are different sorts of cancer like lung, colon, stomach, pancreas, etc that have an effect on the mentioned organs. Often symptoms are confused with alternative diseases and this may lead the doctor to a wrong treatment until it might have progressed into the next stage. A number of the symptoms of cancer are mentioned below.

Symptoms of cancer

If a serious smoker or perhaps a non-smoker starts coughing up blood then this might be a symbol of lung or neck cancer. Within the case of breast cancer, a lump might be noticed by the patient, which might increase in size quite rapidly. There might also be a discharge from a single nipple. Prostate cancer would possibly walk in unnoticed or patients might conjointly notice frequent urination or painful urination. Blood gift in urine might indicate cancer of the bladder or kidneys. In case blood is gift in the stool of the patient then it could indicate cancer of the rectum or of the intestines. Repeated sores in the mouth could indicate oral cancer while repeated itching, warts or moles could be indicative of skin cancer. Patients want to go to their doctor when they notice any changes in their body or in their daily routines. There are several ways through which a doctor might check a patient to confirm if the symptoms of cancer are indeed present in the patient.

Methods of checking a patient to substantiate symptoms of cancer

Doctors may use numerous testing methods to substantiate if the patient is indeed plagued by cancer. In case of visible tumors, a biopsy would indicate if the tumor is indeed malignant or benign. Blood tests, Pap smear tests, stool and urine tests are a number of the other tests to test for specific proteins or alternative agents which may indicate cancer. A doctor might conduct an endoscopy or colonoscopy to check for tumors inside a patient's stomach, colon or intestine. An MRI scan might additionally show tumors or abnormalities during a patient and help the doctor find the precise position of the cancer.

There are several symptoms of cancer that manifest themselves however might end up getting confused with alternative diseases. Any modification in routine ought to immediately be reported to a competent doctor and the mandatory tests ought to be conducted to either get relief or to catch the cancer within the nascent stage itself.

Thursday, October 18, 2012

The Key For Healthy Lifestyle


·1        Healthy food is essential.
You are what you eat, so if you eat healthy, you are healthy. If you're just starting to have a healthy lifestyle, you probably don't know healthy food.Food that is low in fat content is good. Unless that fat is poly-unsaturated, mono-unsaturated, or omega 3. These are some of the good fats. Some of the bad fats are trans and saturated fats. These fats raise your LDL cholesterol, which is the bad cholesterol. The good fats lower your LDL cholesterol and raise your HDL cholesterol, which is the good cholesterol.
  • Low sugar content is another plus.. Sucrose is the bad kind of sugar. Glucose is the good kind of sugar. Both are sugar, so both are classified as sugar, on the label. For example, raisins that don't have sugar added still have a lot of sugar, but it's a naturally occurring sugar, fructose. Any ingredient on a food label ended with "ose" is a type of sugar.
  • Eat a variety of food. Fruits and vegetables are high in vitamins and minerals, which you need, but you still need some other vitamins and minerals. For example, not much protein comes from fruits or vegetables. Meat, beans, and tofu are good sources of protein. If you can't get your vitamins and minerals from the food you eat, you can always take a multivitamin.

·  2      Exercise is key for a healthy lifestyle as well.
 Go to the gym every once in a while, or daily. Or take a run around your neighborhood. Even taking your dog for a walk is good. So long as it's routine, about an hour, and is at least moderately active. Frequent and routine exercise everyday helps boost the immune system; helps prevent the “disease of affluence” such as: heart disease, cardiovascular disease, diabetes, and obesity. It also improves mental health, and prevent depression.

·  3      Dedication.
 It's not easy to go from a couch potato to a healthy person. Don't be discouraged if you have to satisfy your cravings for ice cream, hamburgers, etc. As long as you don't have a steady diet of unhealthy food, it won't hurt you too much.

·  4      Don't yo-yo diet!
Yo-yo dieting is bad for you and even if they sound healthy, once you stop that diet you can pile on the weight in just a couple of days! Stay away from Slimfast, soup diets and diets which you have to eat or drink contents from a packet.

·  5      Don't abuse your body.
Don't work out too much because it can cause your body to not function properly when you work out. It is best to leave a day or two off to get back your energy.

·  6      Regulate your weight.
Being too fat or skinny isn't good for you. Your doctor can tell you if you are under or over weight. Exercise and the food you eat can change your weight, so keep that in mind.

·  7      Stay Clean.
Everyone should have 1 shower per day. Have another if you have had a particularly hot or sweaty time. Put on an antiperspirant after your shower. Change your underwear and socks every day, too.

·  8      Enjoy Yourself for healthy lifestyle.
Don't stress yourself over anything. Have fun! Stress can tense your muscles, which will make you feel unhappy and unwell. If you worry too much about your health, you'll be making it worse, so just relax once in a while.

ASP.net Subjective Questions And Answers

ASP.net Subjective Questions And Answers

Energy Drinks and their Effects


 

Energy drinks are similar to other drinks and foods which can be consumed in some special situations. It can be taken water instead. If you are tired of traveling or driving and you need to complete your work or some project then you can consume it and take it as it will provide you energy to perform your tasks well. We don’t prohibit consuming such drinks but an Australian survey says that energy drinks are the major cause of cardiovascular diseases.

Definitely they have got some positive effects also like they increase your reaction and concentration speed, makes you more calm and relaxed also increase to boost your metabolism.
But you can acquire extra energy with having good and quality food which is enriched with nutrients. For that you don’t make your body dependable to any food supplements or energy drinks. You can have effective body with the consumption of rite food. 

Normally we do have some reasons why our body lack energy and people start addicted to having energy drinks to get healthy having nutritious food instead. Actually you can get the same energy by drinking tea or coffee but there is a point to be noted that having tea or coffee is better than consuming these energy drinks as they attain some artificial ingredients which make them harmful.

There are some factors which terminate your energy from your body and choosing low food quality and less healthy food is most common issue that generally people face. Other main reason is when you are leading stress full life and surrounded with hectic schedule and are not able to give you proper time. When you are tired, stressed and not making your body functional. So keep doing exercise and stay healthy.

There are some situations when you should avoid energy drinks.

* If you are pregnant
* If you feel anxiety.
* If you are stressed
* If you have high blood pressure;
* If you are Diabetic.

No doubt energy drinks work and boost your energy but their effect disappear with the time and you become lethargic and feel like having again and again as your body gets addicted and it demands more. You become used to it because you can not overcome this feeling.

Wednesday, October 17, 2012

How to Cure Chapped Lips

Everyone desires to have reddish and soft lips. Smooth lips add beauty to your smile and entire face. But you might often suffer from chapped or cracked lips. Chapped lips are rough, flaky and might bleed. Peeling the flaky skin might lead to minor swelling as well. While some have this problem i
n winters, some might have chapped lips in any season. This usually occur if you are unwell. Other causes include constant lip licking or peeling of the flaky skin, especially with your teeth. Atmospheric conditions such as cold weather, exposure to sun or strong wind can be the cause. Vitamin deficiency, smoking or even an allergic reaction to cosmetic products used for lips can lead to this problem. Proper and regular care can help heal lips very soon. Yes, if you want to get plain, smooth lips then here are a few tips on how to cure chapped lips.

Easy Ways to Follow

The first step is stop using any cosmetic products for your lips. Yes, at least till they completely heal. Next step is to exfoliate lips every morning. Now read about the cures and follow one of them daily for 1-2 weeks to completely heal you lips.

Petroleum Jelly
Apply a layer of petroleum jelly over you lips. Wait for 2 minutes. Now rub it in circular directions over your lips with your index finger. Now, take a washcloth dipped in warm water. Gently rub it over your lips in circular direction to remove the flaky skin. You will instantly have soft lips. Apply petroleum jelly 3-4 times a day to protect them from further chapping.

Butter or Ghee
Apply butter several times a day on clean lips. You can also apply pure ghee to have classy lips. These are known as the best cure. These will also help the blackish lips get back their original color.

Castor Oil
If you have extremely chapped lips then move on to Castor oil. Applying it several times a day will help heal chapped, flaky, bleeding lips as castor oil is an effective cure.

Rose Petals
You can use rose petals for natural cure and have those lovely, rosy lips! Just soak a few rose petals in raw milk for 2 hours. Now grind to make a paste and apply it over your lips. Wash off after 15-20 minutes. You can also crush rose petals in glycerin and apply over your lips for 15 minutes and then wash off. This natural cure will help retain their lost redness too.

Salt Water
All you need to do is soak a washcloth in a solution of salt water and place it over your lips properly. Make sure it is place over the corners as well. Do this every night for about 10 minutes.

Honey and Glycerin
Honey and glycerin can make a perfect cure. Mix 1/2 tsp. honey to 1 tsp of glycerin and mix well. Apply this paste every night.

While you follow one of the aforementioned ways regularly, you need to take a few precautions as well. As mentioned above, stop using cosmetics till your lips heal completely. You can, instead, opt for a homemade lips gloss. Also, while you start using the cosmetics, opt for a moisturizing lipstick of the best brand. Remember that cheap brands can give your lips an awesome look but damage them as well. Apply a good quality lip balm when outdoors to protect your lips from sun-rays. Proper care and using the home remedies mentioned above regularly will definitely help you have those beautiful and kissable lips!