Wednesday 19 March 2014

Cocktails & Mocktails


Celebrating the special moments!!









Baking & Sweets















Muesli+Honey+Milk+sugar+Grated almonds+raisins







                                                  Carrot -Date Balls:
2 cups grated  carrot + 1/2 cup grated coconut + 10 dates + walnuts +raisins + honey(add according to the sweetness required )+ milk (for binding the mixture) pinch cinnamon powder +pinch nutmeg powder + pinch cloves powder .grind the above mixture.. refrigerate it for 2 hours and then simply make balls :)







Sunday 12 January 2014

Fats and Cholestrol

We always talk and read about Fats and Cholesterol,but do we know what they  are? what they do?  and foods which we should avoid? and foods that's actually good for us to intake??

FATS:

Fats provide Linolic Acid -essential fatty acid for :

  • Growth
  • Healthy skin
  • metabolism
  • helps absorb Vitamin A,D,K
There are 2 kinds of fats
  • Saturated (BAD)
  • Trans-Fat (BAD)
  • Unsaturated
  1. SATURATED FATS:
They are derived from 
  • meat
  • eggs
  • Dairy
  • coconut
These are solid at room temperature and they increase LDL(Bad Cholestrol),
 although there are some which have neutral effect on cholesterol.
   
    2. TRANS FAT

They are UNSATURATED Fats-- but they are created artificially by a process called Hydrogenation..(A process used to change liquid oil into into solid fats..) and hence they are called Hydrogenated Fats as well..

Trans Fats are used to increase the shelf life of processed foods..You will generally find them in
  • cookies
  • cakes
  • Fries
  • Doughnuts
They are harmful because, they
  • Lower HDL (Good Cholesterol)
  • increase LDL (Bad Cholesterol)
  3. UNSATURATED FATS (Good Fats)

They are derived from
  • vegetables
  • Plants
2 types of Unsaturated Fats:

Mono-saturated Fats(Omega-9): Liquid at room temperature... solidifies at cold temperature.
  • Olives
  • canola
  • Peanuts
  • Avocados
They are good since they:
  • increase HDL
  • Lower LDL 
Poly-Unsaturated Fats(Omega-3): These are liquids at room temperature
These are liquid at room temperature:
  • Sun flower
  • cotton seeds
  • corn
  • soy-bean
Too much of above is not good although they do reduce LDL..



Well we read about Fats and see that everything leads to Cholesterol.So lets see what it is:

CHOLESTEROL

Cholesterol is a fat or liquid produced by the liver and is used 
  • to make outer coating of cells
  • produce esterogen/testestrone
  • produce Bile Acid which is used to digest food.
Our body creates 1000 mg of cholesterol each day, Now cholsterol is a fat (oily) and Blood is liquid, So a product of LIPIDS+PROTEINS(LIPOPROTEINS) are created which can easily mix with blood 

2 types of Lipoproteins:

LDL --- LOW DENSITY-LIPOPRTEIN: So, as the name suggests LDL has low protein content, and more fat content, which is bad for blood flow,Too much of LDL leads to deposits if cholesterol in Arteries --causing blockages --leading to heart attacks..



HDL---HIGH DENSITY LIPOPROTEIN: It has more protein ..It acts as vacuum cleaner sucks up excess cholesterol and sends it back to liver,, which can recycle it.


So in order to stay healthy and free from cholesterol: following foods are recommended.























WORLD-WAR 1


WORLD WAR 1


The pre world war Europe:

The start of the World War 1:
  1. assassination of Austria's Archduke Franz Ferdinand and his wife Sophie. by serbian Nationalist
  2.  Austria--Hungary(together thought of )having a war against --Serbia
  3.  Austria-Hungary had a treaty with Germany---(so 3 together)
  4. Serbia had treaty with Russia, who in turn had a treaty with--France and Britain
so, ALLIES--France+Britain+RussiaCENTRAL POWERS: Germany+AUSTRIA-HUNGARY


The Germans were surrounded by France on the west and Russia on the east, and so they created The Schlieffen Plan --They planned to attack France while Russia was preparing its troops..So, they attached France via Belgium which was neutral.. but Belgium had a treaty with Britain...Britain was officially into the war..France also executed its plan of quick mobilization in response to the Schlieffen Plan... So Germans moved east and France moved west.. and so war came to a stalemate--since no one could move.Both the army troops made there trenchesthis continued for 3 years... and finally in  1917, the Allies were starting to run low on young men.So, they needed help and were hoping to get support of the US. But US was following th the isolationism principle--that is they would generally take part in foreign affairs only if they are getting affected....

However there were 2 major event s which changed the thoughts of the US.1)A British Oceanliner was sunk by Germans which was carrying passengers and they were mostly US citizens.2) Zimmermann Telegram: Germany sent Mexico coded message urging them to join the war and in return promosing them to get portions of U.S land.
This message was intercepted by Britain and showed it to US...which gave strong reasons for US to join the war and obviously against Germany-- so US became the Allies.

so, ALLIES--France+Britain+Russia+USCENTRAL POWERS: Germany+AUSTRIA-HUNGARY

As the United States was entering World War I, Russia was getting ready to get out.In 1917 Russia had internal issues and in order to deal with them.. it found a way to escape the war..-and signed a peace treaty with Germany.

So, again:
so, ALLIES--France+Britain+US (-RUssia)CENTRAL POWERS: Germany+AUSTRIA-HUNGARY

Now with the war on the east ended..Germany could move its troops against US.The war again continues, with the fresh ?Us soldiers and the tired European soldiers..

At the end of 1918, an armistice was finally agreed upon. The fighting was to end on the 11th hour of 11th day of 11th month (i.e. 11 am on Nov. 11, 1918).

 The Versailles Treaty was the peace treaty that ended World War I; however, a number of its terms were so controversial that it also set the stage for World War II.
The carnage left behind by the end of World War I was staggering. By the end of the war, an estimated 10 million soldiers were killed. That averages to about 6,500 deaths a day, every day. Plus, millions of civilians were also killed. World War I is especially remembered for its slaughter for it was one of the bloodiest wars in history.

Resources:
http://history1900s.about.com/od/worldwari/p/World-War-I.htm

Friday 3 January 2014

The Other Side Of Me--The Cook(A Discovered Passion)



Mexican soup and Lettuce wraps

Hakka Noodles


Spanish Omlette & Spinach Fritata


Pizza

Baingan ka bharta
(Boil eggplant+pigeon peas
Saute spring onion+tomatoes add salt+turmeric+red chilli powder+cilantro powder+cumin powder+garam masala and then add the boiled veggies in it )


Pesto Sauce Pizza
(Prepare pesto sauce by grinding 1 clove garlic+Parsley+10min boiled spinach+peanuts+few spring onions)
saute the paste in olive oil+add salt+oregano+chili flakes+grated parmesan cheese
Toppings--Green pepper+Broccoli+spring onions,+cheese

Veggie Wraps!!
(saute green chillies+garlic+green onion+onions+green cabbage+Carrots+eggplant+salt+pepper+soysauce)
Garnish with cilantro+green onions again+mango+avocado+mayo+red chili sauce
Tastes yum!! And healthy as well!!

Egg Pizza+Hash Brown!!
Tried out some cocktails!!


Enchiladas for Dinner!!
Saute garlic+green chilies+spring onions+onions+tomatoes+refried beans+tomato paste+black beans+corn
Fill tortilla with the above sauce+olives+black beans+cheese
Layer the sauce +sour cream+cheese
Morning Breakfast!!


The 3 fillings


                                                            Pita Wraps.
Filling: 1)Red Sauce  grind red beans +salt+1 sbsp oil+2 cloves garlic-prepare sauce keep aside.
2)Veggies: In a pan, saute oil+cumin seeds+spring onions+onions+zucchini+carrots+red pepper+salt+red chilli powder+oregano+red chili flakes+parsley--keep aside
3) Add parsley to sour cream
Fill the pita with the above 3 fillings.


Spanish Omelette+Fruits!!


Pani Puri--(Water Balls)!!!
The name of which tickles my taste buds..
Mint Water:Mint leaves+Cilantro+Green chilies+ginger+black salt+salt+cumin seeds+chat masala+lemon+tamarind
Sweet Chutney: Dates+Tamarind+Red Chili powder+Cumin powder+jaggery+chat masala
Potato Filling: Boiled potatoes+black chana+salt+red chili powder+cumin powder+chat masala
Yellow squash & Asparagus Pasta
Saute Garlic+green chilies+2 tomatoes +Parsley+spinach+green peas+oregano_chili flakes +add tomato pasta sauce+Ricotta cheese
(Boil pasta and in 5 last min boil yellow squash +asparagus )Add this to the above mixture.
garnish with parsley.

Lettuce Wraps!! 
Saute green chilies+5 clove garlic+spring onions+onions+tomatoes+red / black beans+salt+oregano+chili flakes .Make a paste of little of above mixture +  tomatoes+red/black beans+2tbpsn Salsa sauce....For Rice: boil brown rice .Saute onions+garlic+red beans salt and add rice to it




Idli Sambhar(South Indian Food)

Rajma Rice(North Indian Food)

Bhaji Pav(My favorite one pot meal)

Thursday 21 February 2013

POLYMORPHISM


One interface multiple methods. i.e one interface is used for different actions
There are two types of polymorphism:

   1)     Compile time polymorphism – function overloading
   2)     runtime polymorphism—dynamic linking

For example : if in a program  we have 3 different types of stacks:
One which calculates int, double and other float..
Then we can have a method named stack (same name) with different types of parameters.(different actions):
  -->stack(int)
  -->Stack(double)
  --->Stack(float)
i.e same name but different type of arguments.

The compilers’s job is to select the right method, programmer doesn't have to select it manually.
But how does Compiler know?? which method to select at compile time?

FUNCTION OVERLOAD RESOLUTION IN JAVA

Java's overload resolution process operates in two phases.

The first phase: For a given function call, find the set of all applicable methods on the basis that there must exist either an exact match or a widening type conversion from each argument in the function call (i.e the actual parameters )to the corresponding parameter of the method being considered. If this set consists of only one method, select that method for invocation. Otherwise proceed to the next step. They are used only to determine which overloadings are applicable

The second phase: It selects the most specific of the methods or constructors selected in the first phase,  it selects the most specific overloading, using only the formal parameters: the parameters appearing in the declaration  . If there exists either an 
1) exact match
 2) widening type conversion
 from each of the parameters of a method in the set to the corresponding parameters of another method, eliminate the latter method from the set. 
If you are left with only one method after pruning the set in this manner, select that method for invocation. Otherwise proceed to the next step.

The third phase: Declare the source code invalid because there does not exist a single maximally specific method that can be invoked for the function call.

Consider the following example:


//Overload.Java

class Employee {String name;}

class Manager extends Employee {int level;}

class Test {
    static void foo(Employee e1, Employee e2) {    //first foo   //(A)
        System.out.println( "first foo");
    }
    static void foo(Employee e, Manager m) {       //second foo  //(B)
        System.out.println( "second foo");
    }
    static void foo(Manager m, Employee e) {       //third foo   //(C)
        System.out.println( "third foo");
    }
    public static void main(String[] args)
    {
        Employee emp = new Employee ();
        Manager man = new Manager();

        foo(emp, man);        // will invoke the second foo      //(D)
        //foo(man, man);      // Error because it produces an    //(E)
                              // ambiguity in overload resolution
  }
}


When we call ---à foo(emp,man)
Phase 1

Find set of applicable methods, i.e exact match and widened type conversion, also here actual parameters  are considered, i.e parameters called during invocation :
A)     foo(Employee e1, Employee e2)-à foo(emp,man)
emp is exact match, man is an employee object( widened type ,comparing with actual parameters)à so pass
B)     foo(Employee e, Manager m) à foo(emp, man)
emp is exact match, man is an exact match with man-à so pass
C)     foo(Manager m, Employee e)à foo(emp,man)
emp object is not always a manager object—not pass (taking formal parameters into consideration)
every manager object is an employee object..
So end of Phase 1: {A, B}

Phase 2: {A, B}
A--> has one exact match and other widened match
B--> have both exact match

So, eliminate the one who has widened match, in our case A
Hence, B--> foo (Employee e, Manager m) would be called

Now consider that happens if we uncomment the call to foo in line (E). Its argument types match the parameter types for all three definitions of foo. So at the end of the first step of overload resolution, we have three candidates in the set.
 By the same reasoning as before, we now discover that the first definition of foo is less specific than the other two. So we delete it from the set. However, we also discover that it is not possible to delete either of the remaining two entries from the set, for the simple reason that an Employee type does not possess a widening type conversion to a Manager type. So we declare ambiguity and, therefore, compile time error results.


If you have many types and this is unmanageable, then method overloading is probably not the right approach, rather the public method should just take Object and implement some kind of strategy pattern to delegate the appropriate handling per object type.

Ability to dispatch a call to a method based on types of arguments is called multiple dispatch. In Java this is done with Visitor pattern..



References: