Tutorials A to Z » Blog Archives

Author Archives: Varun Goel

About Varun Goel

Varun Goel is a technology enthusiast with 6+ years exp in IT industry. In fact, he is been developing application after schooling as freelancer. Currently working with one of the Fortune’s 100 Companies having vast experience Mule ESB, Tibco, HTML5, CSS, JSS, Android, Core Java, JSP, PHP, MySQL, AutoCAD, Maya, ZBrush, Photoshop, Flash CS and many more.

Mule 4

Inbound Outbound Properties

Published by:

In this “Inbound Outbound Properties” tutorial of Mule 4 we will look on how we can set and modify Mule Inbound and Outbound Properties.

In Mule Inbound properties referees to the additional information that comes to an Mule API along with the message body/payload itself. It may consist of inbound Headers, Query Params, URI Params, HTTP method etc.
In Mule Inbound properties are preset by the sender of the message thus cannot be added or modified.

Mule Outbound Properties are headers and properties that Mule API set before ending its request to other external systems.

Inbound Properties
In Mule 3 we used to access inbound properties by #[message.inboundProperties]

Whereas in Mule 4 we access these properties by #[attributes]

Example
We have create a simple project using RAML.
The GET method of the RAML has URI Param – user_id, which can assess by #[attributes.uriParams['user_id']]

Similarly to access Query Param we do it by #[attributes.queryParams['code']]

To view all the Inbound Properties that are received by a Mule API:

#[attributes]


Output :

 

Outbound Properties
As in Mule 3 we used to set outbound properties via using Set Property Component.
In Mule 4, outbound properties no longer exist. Instead, the headers or properties (e.g. HTTP headers or JMS properties) that you wish to send as part of a request or message (e.g. HTTP request or JMS message) respectively are now configured explicitly as part of the connector operation configuration. 
Example:
To Set the outbound HTTP headers and HTTP status code for a Mule API we need to modify the HTTP Listener Configuration.

SoapUI Output –

Being Healthy

6 Ways To Remove Pesticide from fruits and veggies

Published by:

In today’s world where staying healthy is a challenge and avoiding packed and fast food is everyone’s dream, eating fruits and green vegetables is one and the best way for us to be healthy. But really are these fresh fruits and vegetables making our body fit and healthy?

No, not any more. We all are aware of the increase of insecticides and pesticides sprayed on fruits and veggies to increase its production and enhance its quality. These insecticides and pesticides can lead to number of long term or incurable diseases like cancer.

So, it’s important for us to know how can we remove these chemicals from our fresh fruits and veggies and reap their actual benefits.

  1. Cleaning with Cold Water
  2. Salt Water
  3. Vinegar
  4. Baking Powder
  5. Lemon
  6. Peal and Trim

Cleaning with Cold Water
The Centre for Science and Environment (CSE) says that 75% to 80% of pesticide reduces are removed by cold water washing. Soak fruits and veggies for couple of hours in cold water and then wash it with fresh water. However, fruits like grapes, apples, guava, plums, mangoes, peaches and pears and fruity vegetables like tomatoes and okra require two to three washings, as do green leafy vegetables like spinach and kale.

Salt Water
Using salt water for washing fruits and vegetables is also best way to remove pesticides and insecticides. Soak fruits and veggies for 5 – 10 mins and then wash it with fresh water.
This method isn’t ideal for fragile fruits like berries, which can be damaged by soaking and end up tasting salty. For these, a simple cold water soak and rinse is best.

Vinegar
You can use white vinegar or apple cider vinegar in water and soak for 30-60 mins. The water vinegar solution should be with 10 percent vinegar and 90 percent water. Stir them around and rinse thoroughly. Be careful while washing fruits like berries, and those with a thin peel as the solution might damage their porous outer-skin.

Lemon Water
Lemon is one of the best antioxidants that not only help reducing oxidants from our body but also removes pesticides from fruits and vegetables. Lemon can be used as an alternative to vinegar, with 2-3 lemons added in a small bucket of water, soak the veggies in it for 30-60 mins and then wash thoroughly.

Baking Soda (One of the best solutions)
This solution is know to remove more than 90% of pesticides and insecticides from our food. As per the study published in the Journal of Agricultural and Food Chemistry, baking soda solution was found to be most effective at removing pesticide residues both on the surface and beneath the skin of apples.
A mix of only 1:100 of baking soda and water for 12 to 15 minutes of soaking can completely remove the pesticides.

Peal and Trim
Peeling and trimming is probably the most effective way for reducing the amount of chemical residue on your fresh food. Of course, it’s not suitable for all produce – like those with no skin! Fruits with thicker peal (like oranges, watermelon) are considered to be more safer than fruits with thinner peal.

Foods That are better to be bought Organic:

Here is the list of most contaminated produce (most important to buy organic) known as the Dirty Dozen:

  1. Strawberries
  2. Spinach
  3. Nectarines
  4. Apples
  5. Grapes
  6. Peaches
  7. Cherries
  8. Pears
  9. Tomatoes
  10. Celery
  11. Sweet Bell Peppers
  12. Hot Peppers

And here is the list of least contaminated produce known as the Clean Fifteen:

  1. Avocados
  2. Sweet corn (Note: could be GMO)
  3. Pineapples
  4. Cabbage
  5. Onions
  6. Sweet peas, frozen
  7. Papayas (Note: could be GMO)
  8. Asparagus
  9. Eggplant
  10. Honeydew Melon
  11. Kiwi
  12. Cantaloupe
  13. Cauliflower
  14. Broccoli

Editor’s note: This list has the most updated information from the EWG’s 2018 data.

Being Healthy

Mayonnaise Sauce – Death by Choice

Published by:

We all love mayonnaise sauce and why won’t we, as it tastes so good. All the top brands like Mc Donald, Dominos, Subway sell it and also use in their products because it adds so much flavor to it, ki dil mange more. Having mayonnaise sauce with tandoori chicken, momos or fried food, hmmm its just like heaven on earth. Hold on, before you plan to order some food with mayonnaise sauce, you must know what all ingredients it’s made up off.

Since in India, food restaurants do not have any legal obligation on disclosing the ingredients used in preparation of their products to general public, we will be examining ingredients of packed mayonnaise sauce bottle (Funfoods- Mayonnaise Classic 275 grams) which we can easily get from any grocery store.


The ingredients labelled on this bottle are :
  • Soyabean Oil
  • Sugar
  • Water
  • Egg Powder
  • Milk Solids
  • Salt
  • Lemon Juice
  • Acidity Regulator (INS 260 and INS 330)
  • Emulsifier and Stabilizer (INS 415 and INS 440)
  • Antioxidant (INS 319)
  • Preservatives (INS 211 and INS 202)

Sugar, water, egg powder, milk solids, salt and lemon juice are ingredients that we all generally consume almost on daily basis and their presence should not be harmful to our body.

Why mayonnaise sauce tastes so good because it has more than 60% of total oil (fat) in 275 grams of bottle, more oil means better taste. Eating mayonnaise sauce is almost like drinking oil. We might eat mayonnaise sauce in small quantity but still its not at all healthy. If we intake only 20 grams (around 2 teaspoon) of mayonnaise sauce then it amounts to more than 12 grams or 15 ml of oil that we would be consuming.
People suffering from high cholesterol should avoid it at all cost.

Antioxidant in foods are used to preserve and improve shelf life of the product. One of the best source of natural antioxidant is lemon juice. Along with presence of lemon juice this bottle has additional unnatural antioxidant – INS 319 (Tertiary butylhydroquinone or TBHQ). TBHQ is used in fats, including vegetable oils and animal fats. Many — if not most — processed foods contain some fats, so it’s found in a wide range of products. For example, snack crackers, noodles, and fast and frozen foods.

As per Food and Drug Administration (FDA) of USA, TBHQ can’t account for more than 0.02 percent of the oils in a food product as it can be harmful to the body.
According to the Centers for Science in the Public Interest (CSPI), a well-designed government study found that this additive increased the incidence of tumors in rats. And according to the National Library of Medicine (NLM), cases of vision disturbances have been reported when humans consume TBHQ. They also cite studies that have found TBHQ to cause liver enlargement, neurotoxic effects, convulsions, and paralysis in laboratory animals.

Acidity Regulator (INS 260 and INS 330) are commonly found in packed food and beverages. Though these regulators are not harmful but should be consumed with caution as it may cause severe allergic reactions (rashhivesdifficulty in breathingtightness in the chest; swelling of the mouth, face, lips, or tongue irritation).

Emulsifier and Stabilizer (INS 415 and INS 440) – These are used as thickeners in various food products like toothpaste, Jam, sauce etc. These are safe if taken in small quantity but can cause some side effects such as intestinal gas (flatulence) and bloating.

Preservatives are present in almost 99.9% of packed food. If you are already dependent on packed food then you might be taking these preservatives in high quantity. This mayonnaise sauce has INS 211 and INS 202 preservatives.

  • Sodium Benzoate (INS 211):
    Generally the amount of sodium benzoate in foods is so low it is unlikely to cause significant side effects in most people. Sodium benzoate can trigger allergic reactions in some people, though. According to the December 2007 issue of “Environmental Health Perspectives” it has also been implicated as a potential trigger for hyperactivity in children with attention-deficit hyperactivity disorder. Sodium benzoate does in itself not cause the disorder, and more research is needed to determine what role, if any, it plays in worsening hyperactivity.
  • Potassium sorbate (INS 202):
    Potassium sorbate has several adverse health effects. Potassium sorbate has long been considered a safe and non-toxic food additive. However, several studies have suggested that the chemical can actually be toxic. As well, some researchers now believe that potassium sorbate can cause a wide range of long-term health problems and side effects. Prolonged use of the preservative could lead to Migraine, Hypersensitivity Reactions, Hyperkalemia, allergic reactions, Nausea, Diarrhea, etc.


Conclusion: If you are among those who have busy schedule with no or little exercise and are more dependent on packed food, then please be cautious while consuming mayonnaise sauce.
Avoid having mayonnaise sauce and if not, better prepare at home. Preparing mayonnaise sauce won’t take more than 5-10 mins at home.

Funfoods- Mayonnaise Classic 275 grams

The content of the product can be verified at any local store as they are all mentioned on the bottle label.

Other Links:

References:
https://www.healthline.com/health/food-nutrition/potential-tbhq-dangers#1
https://www.livestrong.com/article/353871-adverse-health-effects-of-potassium-sorbate/
http://foodnetindia.in/pectinsin-440/
https://nutrineat.com/potassium-sorbate-dangers-side-effects
https://www.webmd.com/vitamins/ai/ingredientmono-340/xanthan-gum

XML Tutorial

XML Namespace

Published by:

XML Namespace


Namespace avoid conflicts with element.  For example: In the example below the XML has 2 section one for book author details and other one is having the details of library customers. Both elements have similar tags that might be bight confusing. So to make it more simpler to understand we use namespaces.

<?xml version = "1.0" encoding = "UTF-8" ?>
<library>	
    <author>
      <name>Honey Maxi</name>
      <age>45</age>
      <gender>Male</gender>
    </author>
    <author>
      <name>Jack Mauga</name>
      <age>39</age>
      <gender>Male</gender>
    </author>	
    <customer>
      <name>Zaphod Beeblebrox</name>
      <age>19</age>
      <gender>Male</gender>
    </customer>	
    <customer>
      <name>June Hox</name>
      <age>15</age>
      <gender>Female</gender>
    </customer>		
</library>
Defining a Namespace


Syntax: xmlns:prefix=”URI

xmlns – Namespace declaration always starts with xmlns which stands for XML namespace.
prefix – Then there is a prefix. The prefix can be any name that adds meaning to the element name.
URI – URI is defined to uniquely identify namespace. An XML cannot have 2 same URI, URI should always be unique.

There are multiple places we can define a namespace:

  • Inside a element
    <author xmlns:author="https://www.tutorialsatoz.com/author">
  • Inside a root element
    <library xmlns:customer="https://www.tutorialsatoz.com/customer" xmlns:author="https://www.tutorialsatoz.com/author">
  • Inside XML definition
    <?xml version = "1.0" encoding = "UTF-8" 
      xmlns:customer="https://www.tutorialsatoz.com/customer" 
      xmlns:author="https://www.tutorialsatoz.com/author"
    ?>
Referring Defined Namespace


Once we have defined our namespace we need to refer our elements using the prefix defined.

<?xml version = "1.0" encoding = "UTF-8" 
  xmlns:customer="https://www.tutorialsatoz.com/customer" 
  xmlns:author="https://www.tutorialsatoz.com/author"
?>
<library>	
    <author>
      <author:name>Honey Maxi</author:name>
      <author:age>45</author:age>
      <author:gender>Male</author:gender>
    </author>
    <author>
      <author:name>Jack Mauga</author:name>
      <author:age>39</author:age>
      <author:gender>Male</author:gender>
    </author>	
    <customer>
      <customer:name>Zaphod Beeblebrox</customer:name>
      <customer:age>19</customer:age>
      <customer:gender>Male</customer:gender>
    </customer>	
    <customer>
      <customer:name>June Hox</customer:name>
      <customer:age>15</customer:age>
      <customer:gender>Female</customer:gender>
    </customer>		
</library>
XML Tutorial

Creating a Simple XML

Published by:

Creating a Simple XML
When use elements and attributes?


Usage of attributes or elements is usually decided by the data you are trying to model.

For instance, if a certain entity is PART of the data, then it is advisable to make it an element. For example the name of the employee is an essential part of the employee data.

Now if you want to convey METADATA about data (something that provides additional information about the data) but is not really part of the data, then it is better to make it an attribute. For instance, lets say each employee has a GUID needed for back end processing, then making it an attribute is better.(GUID is not something that conveys really useful information to someone looking at the xml, but might be necessary for other purposes).

Data repeats (1 to many), it’s probably an element

Data never repeats, and only makes sense when correlated to something else, it’s an attribute.

There is no rule as such that says something should be an attribute or a element.

Its not necessary to AVOID attributes at all costs..Sometimes they are easier to model, than elements. It really depends on the data you are trying to represent.

Creating an XML with an example:


Here we will be creating an XML for book Library. The following data we need to have in the XML –

  • Book name
  • Book Author
  • Issued To
  • Issued Date
  • Returned Date
Sample 1:


<?xml version = "1.0" encoding = "UTF-8" ?>
<booklist>
  <book name='Guide to the Galaxy 2' author='Honey Maxi'>
        <issued name='Zaphod Beeblebrox'>
      <issueDate>01/01/2019</issueDate>
      <returnDate>14/01/2019</returnDate>
    </issued>	
    </book>
    <book name='On the Run' author='Jack Mauga'>
    <issued name='June Hox'>
      <issueDate>03/01/2019</issueDate>
      <returnDate>24/01/2019</returnDate>
    </issued>
    </book>
</booklist>
Sample 2:


<?xml version = "1.0" encoding = "UTF-8" ?>
<booklist>	
    <book name='Guide to the Galaxy 2'>
    <author>Honey Maxi</author>
    <author>Kira Maxi</author>
    <issued>
      <name>Zaphod Beeblebrox</name>
      <issueDate>01/01/2019</issueDate>
      <returnDate>14/01/2019</returnDate>
    </issued>
    </book>	
    <book name='On the Run'>
    <author>Jack Mauga</author>
    <issued>
      <name>June Hox</name>
      <issueDate>03/01/2019</issueDate>
      <returnDate>24/01/2019</returnDate>
    </issued>
    </book>	
</booklist>
Sample 3:


<?xml version = "1.0" encoding = "UTF-8" ?>
<booklist>	
  <book name='Guide to the Galaxy 2'>
    <bookDetails>
      <author>Honey Maxi</author>
    </bookDetails>		
        <issueDetails>
      <issue>
        <to>Zaphod Beeblebrox</to>
        <issuedOn>01/01/2019</issuedOn>
        <returnedOn>14/01/2019</returnedOn>
      </issue>
    </issueDetails>	
    </book>
  <book name='On the Run'>
    <bookDetails>
      <author>Jack Mauga</author>
    </bookDetails>		
        <issueDetails>
      <issue>
        <to>June Hox</to>
        <issuedOn>03/01/2019</issuedOn>
        <returnedOn>24/01/2019</returnedOn>
      </issue>
    </issueDetails>	
    </book>
</booklist>
 
XML Tutorial

Understanding XML Structure

Published by:

XML Structure
Structure


XML has XML Definition, below it Root element and inside it its child elements and attribute.


To write a correct XML we need flow few guidelines:

XML Syntax:

<XML Definition>
<root>
  <child>
    <subchild>.....</subchild>
  </child>
</root>
1. XML Definition:


This is an optional field, but used in most of the XML. This field comes at the very start of your XML and should not even have any space or character before it. This defines the metadata for the XML been used below. It contains XML version and XML file encoding.

XML file Encoding – File encoding depicts various characters a particular file may have. Every encoding have different sets of characters build into it. For example: If you live in US for example, you could go pretty far with ASCII. But in many counties we need characters like ä, å, ü etc. (If so was ASCII only or you try to read this text as ASCII encoded text, you’d see some weird characters in the places of ä, å and ü.) Think also the China, Japan, Thailand and other “exotic” countries, you might need more verity of characters thus need to use a different encoding type.
There are various different types of file encoding, example: UTF-8 (most commonly used), UTF-16, UTF-32, ISO-8859 etc.

<?xml version="1.0" encoding="UTF-8"?>
2. Root Element


This is a mandatory field, and is the parent of all the elements. All the other elements to be defined in XML should and must come inside one root element. There can only be one root element in the XML. Here “student” is the root element and also the parent element to its child element “firstname” and “lastname

<?xml version="1.0" encoding="UTF-8"?>
<student>
    <firstname>Varun</firstname>
    <lastname>Goel</lastname>
</student>
3. Child Elements


All the other elements defined comes inside root element. Which can have other elements or attributes in it.

XML has 2 basic components


  • Elements
  • Attribute
Elements


Elements
Elements are building blocks of XML. Element are defined using tags. There are closing and opening tag in every element in XML.

Opening Tag:

<firstname>

Closing Tag:

</firstname>

Both opening and closing tags when combined together creates element

<firstname></firstname>

Elements can have opening tag; and closing tag inside it. Such elements will not hold any text data inside it. Also know as Empty Elements or empty tag.

<firstname />
Elements may contain attributes, text data or other elements inside it know as child elements.Examples:

  • Elements with Text data
    <firstname>Varun</firstname>
  • Element with attribute
    <firstname gender="female">Varun</firstname>
  • Element with Child Elements: All the elements inside parent element are referred as child elements. Here “student” is an parent element to child element “firstname“.
    <student>
        <firstname gender="male">Varun</firstname>
    </student>
Attributes


Attributes are part of elements and are defined only in opening tag of an element. Attributes define addition information to the element, more of a metadata. There can be no or multiple attributes to an element.
Syntax: name=”vaule”

<firstname gender="female">Varun</firstname>

Here we have defined attribute gender=”male”.

 

XML Tutorial

XML – Why and Its Uses

Published by:

XML stands for Extensible Markup Language.
Why use XML


Suppose, communication is to be established between applications by sending messages. Application A wants to send first names and last name of students to application B and B on receiving the message should acknowledge it sending message “Accepted”. There are many different message formats in which application A can send message to application B. They won’t be able to properly communicate until a proper message structure is defined between application A and B.

Thus, XML defines a message structure for the data that needs to be communicated between different applications.

Other Uses of XML


  • XML can be used to store data.
  • Better for rendering data in a structure format, i.e. records and lists and trees
  • Its is used by many programming tools/software.
  • Can be used to render HTML
Why XML is so widely used


  • Validation – XML allows validation of its data and structure using XSD or Schema.
  • Searchable – Content inside XML can be easily searched using XPATH or XQuery
  • Transformation – XSLT can be used to transform data in XML into desired format.
  • Parsing – XML has Parsing standards: DOM, SAX, StAX
Example of XML


<student>
  <firstname>Varun</firstname>
  <lastname>Goel</lastname>
</student>

 

Mule 3 Mulesoft Basics Mulesoft Tutorial

Externalizing Common Mule Flows

Published by:

Externalizing Common Mule Flows


In this tutorial we will be externalizing some common mule flows so they can be used by multiple Mule Applications
For Example – If I have a common exception handling which is same for all my other applications and I want to externalize this common exception handling code so that –
1. No one in the team can modify the common flows leading to code discrepancy.
2. Teams don’t have to copy same code again and again in my next API which they are going to build.
3. Also, This will also help my API code look more neat and clean.

Externalizing common mule flows can be achieved by exporting the flows to be externalized into a JAR file and then importing the JAR in other applications. Tells look on the details of how we can do this with just few steps.

1. Understanding the Flow


In the flow below we want to externalize sub flow – “externalizeMuleAPISub_Flow” which is been called by Flow reference in Get and Post  Flows  and exception handling – “externalizeMuleAPI-apiKitGlobalExceptionMapping”.


2. Creating new Mule project


We need to create a new mule project and dump the mule common flows that we want to externalize into it. And remove copied code from our previous project.

Here we have deleted and added the 2 flows from our old project into our new project.

 

3. Exporting the new project as JAR file.


Here are the steps to be followed to export the project as JAR.

Right Click on the Project in Package Explorer >> Click Export

In the Popup Window Select Java>Jar File and Click Next.

Select The project to be exported “externalflows” and add the path where the JAR is to be saved and Click Finish.

 

Now, we have create the project with common flows as Jar and export it to the specified location.

4. Importing the JAR file


Now after exporting JAR, we need to import it to our main project.

To Import the Jar -> go to Project Properties and Click “Add External Jars” and select the JAR File.

5. Adding the Common Flows


Now we need to add the mule XML file name that we have imported as JAR into our main project.

6. Running the Code


You might see few error been reported by Mule even after adding the mule XML filename. But do not worry on building the application all the error will go off.

Being Healthy Cancer Diabetes Causing Products Death by Sugar

Pepsi, Coca-cola, Thumps Up Its Ingredients – Cancer and Diabetes

Published by:

In today’s busy schedule where diseases like diabetes and cancer are on the rise, we need to more health conscious. Thus, it’s important to know if the eatables that we purchase from market are safe for us, and not leading us to these deadly diseases.

Soft drinks! We frequently savor these- in parties or in general. But do we know ,what are it’s ingredients and it’s nutritional value. If not, then do read this post till the end, after which you’ll never drink these again.

We’ll talk about Pepsi, Coca-cola and Thumps Up, their ingredients and the diseases these may cause. All the bottles are of 600 ml each which usually make up 2 regular size glasses. The ingredients are similar in all these bottles. You can also check these ingredients, as they are printed on the bottle.

These all have –

  • Carbonated water
  • Caffeine
  • Acidity regulator
  • Color
  • flavor
  • and lots of sugar.

Let’s talk about these ingredients in details:

Sugar
In each 100 ml of the soft drink, it has 10 – 12 grams of sugar, that means in a bottle of 600 ml it has approximately 60 grams sugar. In 2 glasses of lemonade you might be adding 3-4 teaspoon of sugar whereas these 600 ml bottles have more than 15 teaspoons of sugar. This high quantity of sugar can lead to various diseases. This may lead to weak eyesight, heart problems, obesity, tooth decay, kidney problems and diabetes.
If you think that you are safe, because you are consuming these once a week or a month then you’ll be shocked to know that our body needs around 25 grams of sugar in a Day whereas 1 glass of these soft drink has 30 grams of it.

Acidity regulator 338 or phosphoric acid
This acid is used in various products like – pharmaceuticals, household cleaning agent, fertilizers, and in detergents. If consumed in high quantity it may lead to kidney disease and kidney stones and also reduce bone density. Company never mentions the quantity of this acid in theses bottles, but you can get an idea from the videos over the internet where its shown, that with the help of these soft drinks you can clean your toilets. You can also try this and trust me your toilet will be as clean as new.

Caffeine
It’s a chemical which is mostly found in coffee beans and tea leaves. Caffeine works as an energy drink which keeps us mentally alert and also provides relief from headache.
Caffeine taken in large quantity can cause blood pressure, heart attack and even weak bones. Diabetes patient should avoid this at all cost.

Can Soft drinks cause Cancer ?
According to Cancer Council Victoria and University of Melbourne reports, soft drinks can cause cancer even if u r suffering from obesity or not. In total these soft drinks are sweet poison that is made up of chemical, color, artificial flavor which has no nutritional value.

Being Healthy Cancer Diabetes Causing Products Death by Sugar

Frooti, Maaza, Slice – How many Mango do they Have?

Published by:

Frooti, Maaza and Slice. Are these really mango juice or factory produced chemical products? How many mangos does these juices actually have? We are going to reveal the real truth behind these products and I’m sure after reading this, you will never drink these mango juices.

In this blog we are going to talk about mango frooti, Tropicana Slice, Maaza and there content. These bottles are of 600ml which is equivalent to, 2 regular size glasses (350 ml each). And cost around Rs 37/-.

These products are made from almost same kind of ingredients. They’ve got –

  • Water
  • Sugar
  • Acidity Regulator
  • Antioxidant
  • Preservative
  • Synthetic Food Color
  • Mango Flavor (Artificial and Natural)
  • and Mango Pulp.

Let’s find out how much real mango they have.
Frooti and Maaza have about 19.5% mango pulp in 600 ml that’s around 117 ml, which is not even 1/3 of a regular glass. Try this at home, take a single regular size mango and make a pulp out of it, you will be surprised to know that the home made pulp will be double in quantity than what’s present in these bottles. These bottles have only half of real mango in it rest is all water and chemical.

Tropicana Slice has even lesser percentage. It has just 13.6% of concentrated mango pulp. What is concentrated mango pulp? It’s a process where water is extracted from the fruit either by heating or squeezing and later when needed water is added back.
Tropicana claims that there 600 ml bottle is having mango pulp equivalent to single strength mango pulp. But never mention the weight or size of the single mango that they are taking about.

 

Coming on to Sugar. As per United States Department of Agriculture (USDA), 1 mango of 165 gms has 22 g of sugar. But these bottles have 13 grams of sugar for every 100ML that is 78 grams in a 600 ml bottle which is equivalent to 20 spoons of sugar. Assuming these juices has at most 1 mango in them amounting to approx 22 grams of natural sugar, to which, they still have more than 50 grams of additional processed sugar. A single glass of these juices have around 40 grams of sugar whereas an average healthy male body needs 25 to 30 grams of sugar in a day. Taking this much sugar can lead you standing next to number of diseases.

Now wondering how much Synthetic color and Artificial flavor is added to it? Let’s do an experiment. Try taking 1/3 of a regular glass around 150 ML of mango pulp and add 2 glasses of water to it. How will it taste like “Taste like Water hummm!!”. Whereas these drinks are having same thickness and color as if of 2 glasses of real mango juices. So we can see how much color and flavor would have been added to it. Added Color and flavor quantity is not mentioned on the bottles but ya you guessed it right!

There’s still more… it has Acidity Regulator, Antioxidant and Preservative. Again, it’s quantity in which its added to the bottle is not mentioned! These ingredients taken in high quantity are very dangerous. And if in case u r already more dependent on packed food be aware u r already taking in high doses of these.

Over internet you will find lots of people now days taking frooti, maaza challenge and drinking 2.5 liters of these juices in just few minutes to get more likes and money. They are actually taking 325 grams of sugar! That to most of it is, processed sugar. This is way way too dangerous. Please don’t do or let anyone do, else what you will earn, you might spent on your treatment in a hospital for your entire life. Do read this blog of ours on what happens after taking high amount of sugar in our body. Link.

Talking about Nutritional value; its Noting!! compared to 1 real mango.

So, what do we conclude. With even less than 1 real mango fruits inside these 600 ml bottle, these juices are just sugary syrup nothing more and as dangerous as soft drinks. Please don’t drink these and specially not let your children drink. Better make these juices at home.
Thanks for reading, Please share, as this can save someone’s life and subscribe our channel. In our next blog we will be taking about Tropicana fruit juices, 100% real juice and find out what if these are really juices or something else.

Mule 4 Mulesoft Basics Mulesoft Tutorial

Variables in Mule 4

Published by:

Variable in Mule 4


In this Variable in Mule 4 tutorial we will look how we can create and use mule variable in Mule 4, and how it is different from Mule 3 and Mule 4.

In Mule 3 we had Flow variables, Session variables and record variable to store the data inside mule flow. But now in Mule 4 this has been changed; session variable and record variable has been removed and there is only Flow Variable.

As in Mule 3, Flow Variable in Mule 4 value is lost even when the flow crosses the transport barrier.
Session variable has been completely removed in Mule 4.

In Mule 4, flow variables have been enhanced to work efficiently during batch processing, just like the record variables. Flow variables created in batch steps are now automatically tied to the processing record and stays with it throughout the processing phase. No longer record variables are needed.
Continue reading

Mule 3 Mule Interview Question Mulesoft Tutorial

Interview Questions Mulesoft / Mule ESB Tutorial

Published by:

MuleSoft or Mule ESB interview Questions


Here are the 18 most important and common mulesoft or mule esb interview questions and answers which are bound to be asked in any Mule ESB interview. Whether it’s Mulesoft or Mule ESB interview with Accenture, Cognizant, Infosys, Deloitte or any company below Mule ESB interview questions are always always been asked. You can easily clear any Mulesoft or Mule ESB interview questions if you learn answers to these Mule ESB questions.

1. What are Web Services?


Web service is a function or program in any language that can be accessed over HTTP. Message format can be XML or JSON or any other program as long as the other programs can understand and communicate. Web services can be synchronous or asynchronous. Any web service has server-client relationship. Any web service can have multiple clients. Eg: When a travel portal is selling tickets of an airliner, Portal is client and the Airline is the server as it is selling its service. Continue reading

Mule 3 Mule Interview Question Mulesoft Tutorial

Interview Questions 2 – Mulesoft / Mule ESB Tutorial

Published by:

MuleSoft or Mule ESB interview Questions


Here are the most important and common mulesoft or mule esb interview questions and answers which are bound to be asked in any Mule ESB interview. Also see Mule Interview Questions I.

1. What are inbound and Outbound properties ?


Inbound properties are immutable, are automatically generated by the message source and cannot be set or manipulated by the user.  They contain metadata specific to the message source. A message retains its inbound properties only for the duration of the flow; when a message passes out of a flow, its inbound properties do not follow it.
Continue reading

Mule 3 Mule Interview Question Mulesoft Tutorial

RAML Interview Questions – Mule Tutorial

Published by:

RAML Interview Questions.


In this mule tutorial, here are the most important and common RAML interview questions and answers which are bound to be asked in any Mule ESB interview.

1. What is RAML and why we use it?


RAML – RESTful API Modeling Language
RAML is similar to WSDL, it contains endpoint URL, request/response schema, HTTP methods and query and URI parameter.
RAML helps client (a consumer of the service) know, what the service is and what/how all operations can be invoked.
RAML helps the developer in creating the initial structure of this API. RAML can also be used for documentation purpose.

2. Who can you import RAML in your poject?


Read here: Mule Tutorial – Creating Mule Project with RAML
Continue reading

Mule 3 Mulesoft Basics Mulesoft Tutorial

Validation Framework – Handling Business Errors MuleSoft

Published by:

MuleSoft Validation Framework – Handling Business Errors


In this tutorial of mulesoft validation we will create an exception handling framework that will generate business/logical error and do custom validations to request/response message while mapping mulesoft code and learn how to handle those error.
For example: The message that mulesoft application received should have some validations while mapping to the backend application request, in case of validation failure the application should throw an error with error message.

The validations are:
1. if a is (a < b or a < 10) then generate error with error message “A should not be less than 10 or b”.
2. all the values a or b or c or d sum should be less than 500 else generate error with message “a+b+c+d should be less than 500.”

The above example, can be resolved in couple of ways and we will see one of the most simplest and easy way by creating validation framework.
We will resolve by using dataweave and a custom exception class.
Continue reading

Mule 3 Mulesoft Basics Mulesoft Tutorial

Scatter-Gather In Depth – MuleSoft Tutorial

Published by:

MuleSoft Scatter-Gather Scope


In this tutorial we will look at various configuration properties of Scatter-Gather with examples in detail and also see how to handle exception in Scatter-Gather.

Why use Scatter-Gather in Mulesoft:
To achieve parallel processing of multiple flows in mule we can use Scatter-Gather. The routing message processor Scatter-Gather sends a request message to multiple routes concurrently which are configured inside Scatter-Gather and collects the responses from all routes, and aggregates them into a single message. There will be multiple threads created for executing multiple routes simultaneously.
Scatter-Gather can also execute multiple routes sequentially.

Please read Validation Framework to understand how error is generated in the example.
Continue reading

Mule 3 Mulesoft Basics Mulesoft Tutorial

Caching or Cache Scope – Mulesoft / Mule ESB Tutorial

Published by:

Caching In Mule ESB or Cache Scope


In this Mule ESB tutorial we will look into what is caching and why to use it, how can we implement caching in mulesoft project and  configuration properties in Mule Cache Scope/Activity. Also a step by step configuration of mule cache scope/activity and how to cache information retrieved from database. Please refer to Mule Tutorial: Connecting with Database mule tutorial to know how to connect to database in Mule ESB.

What is caching and why to use it?


Caching is a concept with is used to store frequently used data in the memory, file system or database which saves processing time and load if it would have to be access from original source location every time.

For example: We have to create an API to retrieve user information, that has connect to an external database which is on different server and fetch the records. (Assumption: external DB is not changing frequently)
Continue reading

Mule 3 Mulesoft Basics Mulesoft Tutorial

Understanding Various Mule Flows – Mulesoft Tutorial

Published by:

Mulesoft / Mule EBS – Mule Flows Tutorial
Mule Flows


In this mule ESB tutorial we will understand various mule flows in detail with downloadable examples.

Various types of flows in mule


There are 4 types of flows in mule. While creating these flows the flow name should be unique in whole mule project despite beaning in different mule application XML file.

SubFlow


  1. Subflow always processes messages synchronously (relative to the flow that triggered its execution).
  2. Subflow executes in the same thread of the calling process. Calling process triggers the sub-flow and waits for it to complete and resumes once the sub-flow has completed.
  3. Subflow inherits processing strategy and exception handling strategy from the parent/calling flow.

Use – It can be used to split common logic and be reused by other flows.
Continue reading

Mule 3 Mulesoft Basics Mulesoft Tutorial

Creating Mule Project with RAML – Mulesoft / Mule ESB Tutorial

Published by:

Creating Mule Project with RAML


In this Mule tutorial we will learn how to create Mule project with RAML and a detailed walk-through on how the Mule flow works in case of a success or error scenario:

Mule ESB – What is RAML and why it’s used


RAML stands for RESTful API Modeling Language and is similar to WSDL. A RAML provides a structure to an API and also help the client who is invoking the API to know before hand what the API does.

A RAML contains:

  1. Endpoint URL with its Query parameters and URI parameters,
  2. HTTP methods to which API is listening to (GET, POST, PUT, DELETE),
  3. Request and response schema and sample message,
  4. HTTP response code that an API will return (eg: 200, 400, 404, 500). Continue reading
Mule 3 Mulesoft Basics Mulesoft Tutorial

Connecting with Database MySql – Mulesoft / Mule ESB Tutorial

Published by:

Connecting with Database MySQL


In this Mulesoft / Mule ESB tutorial of Connecting with Database Using MySql, we will use mulesoft Database Connector and connect it with MySQL DB:

MuleSoft Database Connector using MySQL


The Database connector allows you to connect with database with almost any Java Database Connectivity (JDBC) relational database using a single interface for every case. The Database connector allows you to run SQL operations on database including Select, Insert, Update, Delete, and even Stored Procedures. As of Anypoint Studio May 2014 with 3.5.0 Runtime, the JDBC connector is deprecated, and the Database connector takes on JDBC connection capabilities.
Continue reading

Tibco EMS

Connecting with Tibco EMS – Mulesoft / Mule ESB Tutorial

Published by:

In this Mulesoft / Mule ESB tutorial we will connect with Tibco EMS server Queue and send messages across:

Mule JMS Connector


Inbound – Mule JMS will receive the message and be used with an inbound endpoint.
Outbound – Mule JMS will send the message and be used with an outbound endpoint.

<jms:outbound-endpoint queue="my.queue"/>;

<jms:inbound-endpoint topic="my.topic"/>;

Continue reading

Tibco EMS

EMS Queues and Topics – In depth

Published by:

In this TIBCO EMS tutorial we will understand queues and topics in detail.

Queues


Queue uses point to point messaging pattern. Point-to-point messaging has one producer and one consumer per message. Message producer/sender sends a message to the EMS queue and the message consumer retrieves messages from the queue and sends acknowledgement that the message was received.

Delivery Mode:(Persistent, NonPersistent and EMS Reliable Delivery)
Persistent: Message are stored on the disk. In case the EMS server or queue is restored at later point the messages are not deleted.
Storage type: file based, Database and Mstore.
Continue reading

Tibco EMS

EMS Destination Properties

Published by:

EMS Destination Properties

 In this Tibco EMS tutorial we will understand different EMS destination properties.

Secure


Authenticate users before giving access to a queue or topic. Only authenticated users can send or receive message from the secured destination.

Syntax: addprop [queue|topic] <<queue|topic name>> secure
Example: addprop topic topic.foo secure

Continue reading
Tibco Tutorial Tibco Variables

Tibco: Assign Activity VS Mapper

Published by:

In this TIBCO tutorial we will understand the use of Tibco Process Variable/Assign Activity over Tibco Mapper Activity with the help of an example.
Process Variable/Assign Activity Vs Mapper Activity


  • The primary purpose of an assign task is to store a variable at a process level. Any variable in an assign task can be modified N times in a process. But a mapper is specifically used for introducing a new variable. We cannot change the same mapper variable multiple times in a project.
  • Memory is allocated to Process Variable when the process instance is created but in case of tibco Mapper the memory is allocated only when the mapper activity is executed in a process instance.
  • Process Variable is allocated a single slot of memory which is used to update/modify the schema thought the process instance execution i.e. N number of assign activity will access same memory allocated to the variable. Whereas using N mapper for a same schema will create N amount of memory.
  • Assign Activity can be is used to accumulate the output of a tibco activity inside a group.

Continue reading

Tibco File Pallet Tibco Tutorial

File Poller and Write File Activity

Published by:

In this tutorial we will learn how to use File Poller and Write File activity and its configuration details. In this File Poller will look for any change in the given floder and Write File will write those details in another file.
File Poller
File Poller is a starter process which polls for files or directories and starts a process when the specified change (creation, modification, deletion) is detected.Write File
Write File activity is used to write content to a file.
Continue reading