by editor Last updated 24th April 2017.
Leaky Gut is an uncomfortable problem that can cause extreme discomfort, stomach upset, and a host of associated and often severe health problems.
It happens when the delicate lining of your intestines becomes too porous, allowing toxins and bacteria to enter your bloodstream and flood your system.
The key to curing a leaky gut lies in restoring a healthy intestinal lining, which seals your gut and keeps those harmful toxins out. However, it can be difficult to know the best way to treat this uncomfortable problem, especially when prescription medication often makes things worse.
In this post, we're going to show you how to heal leaky gut syndrome fast. Here you'll find 17 great all-natural supplements for leaky gut syndrome symptoms that will cure and repair your gut wall, without the need for prescription meds.
This remarkable amino acid is unique because it's actually one of the primary fuels used by the cells in your gut lining. It works like a superfood, empowering your intestinal lining to repair itself and helping the membranes in your gut to tighten naturally. This tightening of the intestinal junctions is what is needed to seal a leaky gut, in order to stop harmful toxins from passing into your bloodstream.
The recommended glutamine leaky gut dosage for powdered glutamine is between 5-10g daily. You can measure out the right dose with a weighing scale like this high accuracy digital weighing scale to ensure you take exactly the right amount.If you prefer capsules, start by taking two 1g capsules daily and monitor whether your symptoms are improving. If not, up your dosage to five 1g capsules daily.
Before meals, so first thing in the morning would be ideal. If you go for the capsules, you can take one with a glass of water on waking and the other a couple of hours before lunch or dinner. Opting for the powdered form makes it even easier to stagger your dosage, as you can choose to microdose by blending smaller amounts into a cold beverage throughout the day. Or, just take half your daily dose once on waking, then again a couple of hours before a meal, mixed into a glass of water.
Make sure you take L-Glutamine on an empty stomach for maximum benefit and effect. This will help your cells to take up much more of the glutamine. Take the powdered form dissolved in water or a cold drink for better absorption, or swallow capsules with a glass of water to ensure the best efficiency. Don't take it in hot drinks as heat denatures the active properties in L-Glutamine.
Glutamine can cause stomach problems like bloating and irritation when taken in too high a daily dosage for your body. Always monitor your response to glutamine supplementation, and if you're any experiencing any stomach issues as a side effect, taper down your daily dose.
It's better to take L-Glutamine in powdered form, so that your body can absorb it better and you can taper your dose.
You can buy high quality L-Glutamine Powder that you can easily mix into your food or beverages here.
After you've been supplementing with L-Glutamine for a while, you should start to feel relief from the irritation and inflammation that accompanies a leaky gut.The cells in your gut lining should start to repair themselves, preventing toxins from entering your bloodstream, and you should also feel less sluggish and tired because your intestinal filters will be functioning much better.
Curcumin, derived from Turmeric is a powerful anti-inflammatory that dramatically reduces tissue damage and combats free radicals.It helps heal a leaky gut by controlling the inflammation pathways, enabling the lining of your gut to repair and replenish itself without being under the constant stress of inflammation.
You can take Turmeric, which contains some of the active ingredient, Curcumin, in powdered form, on salads, in smoothies, or even in your morning coffee.If you opt to get your Curcumin by eating powdered Turmeric, remember the amount of Curcumin in Turmeric is difficult to assess as it is not standardised.
Alternatively, you can buy Curcumin extract in 500g capsules. Take one or two daily, preferably with food daily for best results. Aim to be taking 1000g -2000g of Curcumin every day, for optimal results.
At mealtimes, to encourage absorption as Curcumin works better when digested with food. Make sure you take it with plenty of water to hydrate.
You can split your dose across the day so you don't have to take it all at once, making it gentler on your system, and easier for your body to absorb the active ingredients.
If you prefer to get your Curcumin from Turmeric, you can sprinkle on your food or use it when cooking to enhance flavour. Otherwise, swallow Curcumin capsules with a glass of water at mealtimes, to enhance its nutritional properties. To increase the bioavailability of this product it is recommended to be taken with black pepper extract.
Curcumin is a very safe supplement but when taken in high doses it can cause nausea and increase your risk of bleeding. It's not advised to take high amounts of this substance if you are taking blood thinning medication, such as Warfarin. Taking powdered turmeric also causes yellowing of the teeth which makes the capsule form far preferable.
Capsules can be the best way to get your daily fix of Curcumin and prevent the staining and yellowing that Turmeric powder can cause. As well, because it's hard to know how much of the active compound is contained in your Turmeric, capsules like these ones here help you get a more precise dose.
After you've been regularly supplementing with Curcumin, you will have lower levels of inflammation, due to a cleansed and more robust digestive system. You should also start to experience an easing of the symptoms that can accompany leaky gut, including brain fog, stomach irritation, and lethargy.
Vitamin C is essential to repairing your intestinal lining, because without it, your body cannot produce collagen. Collagen is an important protein that your cells require in order to knit together, and in the case of a leaky gut, is the answer to restoring robust pathways in your intestinal tract.
If you have sensitive teeth, you may want to take Vitamin C in pill form, as the powder may expose your delicate tooth enamel to erosion. However, if you want to vary your dosage, powdered form is by far the superior option as it will allow you to be much more precise.You can use a high accuracy digital weighing scale to ensure you're getting a precise dosage.
Once daily, at mealtimes, always with food containing healthy fat. If you're opting for the powdered form of Vitamin C, you can easily mix it into a drink. A milk or protein based beverage would be the ideal choice, as it contains the essential fat this vitamin requires for maximum absorbency.
Always take Vitamin C with food, preferably with some form of protein or fat to speed absorbency. You could also consider a supplement that combines calcium with Vitamin C as some studies have shown that calcium helps increase Vitamin C absorbency.
It's difficult to overdose on Vitamin C but if you take more than necessary, it can cause stomach problems, such as diarrhoea and vomiting, so make sure you always stick to the recommended dosage.
Vitamin C in powder form is more potent and will be easier for the body to absorb. It's hard for a pill or tablet to contain the high amounts of this essential vitamin that your body requires to stay healthy, but this high potency Vitamin C Powder will ensure your immune system functions at peak.
If you are suffering from a leaky gut, a treatment plan with Vitamin C will take some time to show results. After about 3 months of supplementation, your immune system should be functioning better, but it may be up to 6 months before your leaky gut symptoms start to really improve, as the supplement works over time.
in your Body With NAC.
This substance is a key one when treating a leaky gut as it is a form of the powerful amino acid cysteine. Cysteine is a highly efficient detoxifier and potent anti-oxidant and is also one of the key ingredients required to form glutathione, the body's master cleanser.
Without it, your body is more susceptible to damage from the toxins released by your digestive system, and so by boosting your Cysteine intake, you can guard against and prevent leaky gut associated symptoms.
Take 500g-1000g in capsule or powdered form daily. If you opt for the powder version, take care to seal it in an airtight container somewhere dry, as N-acetylcysteine rapidly loses its potency when it's exposed to the air.
Before meals, on an empty stomach. So it won't lose its potency and oxydise, don't expose it to the air for long periods of time. Quickly blend it into a beverage instead and drink your dose as soon as possible, as your body will absorb much more of the active component this way.
With water if you're taking it in capsule form, or dissolved into a glass of water if you're opting for the powdered version. Never take it with food, as this will interfere with absorbency and also lessen the effectiveness of the active compound.
Too much Nac-Acety l cysteine can cause asthma attacks, low blood pressure, and potential shortness of breath, so do take care to watch your dosage.
Powder is the ideal way to get your daily dose of N-acetyl l cysteine, but remember to keep it somewhere dry where it's not exposed to the air. High strength, top quality Nac-Acety l cysteine can be purchased here and easily added to your daily diet, by incorporating it into a cold beverage to mask the taste.
N-acetylcysteine is fundamental to the body's formation of glutathione, which in turn heals and detoxifies harmful inflammation in your body. After about 3 months supplementation you should start to see a reduction in the inflammation related effects of leaky gut symptoms, such as nausea, apathy, acid reflux, and irritation.
Bromelain is an enzyme that helps to digest proteins so it's especially useful to include in any leaky gut treatment plan. The substance has the power to heal injury in the gastrointestinal tract, and Bromelain will also aid in your body's absorption of nutrients.
Bromelain should be taken in capsule form. Take 500 mg with meals containing a good balance of healthy carbs, protein and fats to better enhance digestion.
Once daily, with your meals to aid absorption of the active ingredient. You can take Bromelain capsules easily with a glass of water or other cold beverage, but don't take it with a hot drink as this can discourage absorbency.
For non-digestive related disorders Bromelain should be taken on an empty stomach. However for digestive related issues, such as leaky gut, it's better to take Bromelain at mealtimes to aid digestion.
As Bromelain has the ability to thin the blood, it should be avoided if you are taking blood thinning medication.
Bromelain is better taken in capsule form, as it's easier to deliver the beneficial ingredients this way. As well, purchasing capsules like these ones will make it simple to take your Bromelain supplementation with a glass of water to accompany your meal.
Supplementation with Bromelain will result in better digestion and a healthier intestinal tract. Over time, the substance also has the capacity to heal gastrointestinal tissue, resulting in a dramatic reduction in leaky gut symptoms as your body naturally repairs the delicate gut lining.
Krill Oil is high in Omega 3's which makes it an excellent anti-inflammatory. Supplementing with this powerhouse oil will reduce irritation in your stomach lining and replenish your system with healthy fats. Krill is the best fish oil to take due to its low levels of contaminating pollutants, and the supplement should be an essential step in any serious leaky gut treatment plan.
Take 1000mg -2000mg of Krill Oil in capsule or liquid form daily. If you like the precision of a tailored dose and can bear the taste, you may want to opt for the liquid. Soft gel capsules are the alternative to liquid Krill Oil, and are usually odourless and tasteless.
Once daily, at lunch or dinner. If you're opting for the oil, swallow it with some flavoursome food that contains fats as this will help mask the taste and help your body to absorb the nutrients.
Take it with meals that contain fats as studies have shown this will aid your body's ability to absorb Krill Oil.
Capsules should be taken with a glass of water, and a meal containing fat to encourage uptake of the nourishing components in the Krill.
Krill Oil is extremely safe and side effects are highly unlikely. However some people have found that Krill Oil taken in large doses can cause heartburn, bad breath,loose stools, and an upset stomach.
Krill Oil varies in quality, so make sure you check out any supplement before you purchase. A good manufacturer will include information about how their Krill Oil was sourced, like these high grade Krill Oil capsules, available for purchase on Amazon. Taking capsules like these ones also helps mask the slightly unpleasant fishy taste of the oil.
After 4-6 months of supplementing with Krill Oil, your gut lining should begin to repair itself due to the mega-dose of healthy fats that feed the cell tissue. It's a great idea to pair Krill Oil with cellfood like L-Glutamine, for an extra speedy recovery process.
During your leaky gut recovery time, Krill will also help to detoxify your system by neutralising the harmful free radicals that attack your body and cause cell damage.
Having the correct levels of Vitamin A is critical to maintaining a healthy and strong gut lining. It can be difficult to ensure you are receiving an adequate amount of this vitamin, particularly if you are a vegetarian, as it's predominantly found in animal food sources.
This is where clever supplementation can help. Taken at the proper dosage Vitamin A will strengthen your intestinal lining and tighten the gastro-intestinal junctions, which will help to heal and seal a leaky and porous gut.
You should be aiming to take around 650 mcg of Vitamin A each day. It's most commonly found in capsule form, to prevent oxidation, and capsule doses vary, so check the amount in each capsule before you buy. Take as many capsules as necessary to ensure you hit the recommended daily dosage.
Once a day, with a meal that contains healthy fats like meat from grass fed animals and nuts. Swallow as many capsules as necessary to hit the recommended daily dose, along with a glass of water or other beverage.Ideally take your daily Vitamin A dose with breakfast if you can,to set your system up optimally for the day.
As Vitamin A is a fat soluble vitamin, it's vital to take it with food to glean the full benefits. Ideally, aim to get your daily dosage at mealtimes when you have a little healthy fat on your plate.
Vitamin A is highly toxic to the liver when taken in higher doses than necessary, and can cause poisoning, vomiting, and nausea, so it's important not to take too much. If you are pregnant or breastfeeding you should avoid taking Vitamin A altogether due to its potentially harmful effects on your developing child.
As Vitamin A is highly prone to oxidation, it's much better to take in capsule form, as the protective caplets will shield the ingredients from exposure to the environment. Take these Vitamin A Capsules once a day with a meal containing a little healthy fat to get the maximum benefit from this crucial building block vitamin.
Vitamin A is one of those supplements that can really make a positive difference in cases of gut permeability, but, as with a lot of supplements to heal leaky gut, and perhaps even more than most, it is definitely not a quick fix.
To see the true benefit of Vitamin A supplementation, you will need to take it daily for at least 3-6 months, before it has the chance to build to a sufficient level in your body where it can make an impact on your leaky gut symptoms.
It helps cure leaky gut syndrome by improving cell tightness, resilience, the quality of your stomach lining, and by replenishing your mucous membranes, as it's an essential cell food your body requires to maintain good health.
A diet rich in Omega-3 can help to prevent Candida, which is often one of the primary causes of leaky gut syndrome. It works by reducing the inflammation, which, when left untreated, can eat through the gut wall, allowing bacteria to pass through into your bloodstream.
It also provides essential lubrication to your intestinal junctions, helping them knit together and prevent toxins from leaking.
You can take Omega-3 in oil or capsule form. If you can tolerate the taste of oil, this would be the preferred option, as some research has shown your body may better absorb the benefits this way.
Whatever you opt for, you should aim to be taking around 1,500mg-2000mg of Omega-3 daily, to guarantee your body is receiving enough.
Unlike a lot of other supplements, it could actually be better to take your Omega-3 supplements at dinner time, rather than at the start of the day, so as not to overload your system.
You can stagger your Omega 3 dose across the day if you prefer, taking a spoonful two to three times daily if you've gone for the oil. Or, if you've opted for capsules but swallowing many capsules in one sitting is difficult, take one with every meal, along with a glass of water or other cold beverage.
Take with meals that contain fat to improve absorption and avoid taking on an empty stomach as this can impair digestion of the active components.
Side effects are minimal but can include belching, bad breath, heartburn, nausea, and loose stools, especially if you take Omega-3 in high doses or if you take more than necessary.
When taking Omega 3s, quality is everything, so source a responsible manufacturer to make sure you're taking an effective dose every day. Good quality Omega 3 can be taken in oil or capsule form, but it may be easier to take capsules like these Premium Omega Capsules daily, so you don't have to swallow the oil.
Supplementing with Omega-3 will help your body produce a healthy growth of new cells and reduce inflammation. This should show in a reduction of your leaky gut symptoms, but you do need to establish a treatment course for at least 3 months before you can expect any results.
Folic Acid is scientifically proven to encourage production of new cell growth in the intestinal mucosa. It also helps to heal a leaky gut by strengthening and repairing existing cell tissue and promoting healthy internal function.
400 mcg daily, to be taken in tablet or liquid form, with meals. If you take it in liquid form, use a high accuracy digital weighing scale to ensure you're getting the right dose.
You can take it at any time of the day as long as you absorb it with food, but if you have a lot of other supplements to take in the morning, it could be better to take it at lunch or with your evening meal.
You can also split your dose, taking a Folic Acid pill in the morning and one in the evening, as long as you don't ever take it on an empty stomach as it requires food in order to be fully absorbed.
Always take your Folic Acid supplement with food to maximise absorbency. Swallow tablets with a glass of water to accompany your meals, in order to ensure you remain hydrated.
When taken in high doses over long periods of time, folic acid can cause abdominal cramping, nausea, fever, rashes, and excess gas, so watch out for these symptoms and monitor your dosage carefully.
Folic Acid can be taken in liquid form but it's easier to get your daily amount by taking simple-to-swallow no fuss tablets like these High Strength Folic Acid Tabs, which won't leave a nasty after-taste in your mouth.
A faster, more efficient cell renewal process of your intestinal wall, and a stronger network of gut tissue. This will help to seal your leaky gut and prevent further leaking.
However, effects do build over time, so a course of treatment should be followed for at least 6 months before you can expect to feel any results.
MSM has a valuable role to play in treating symptoms of leaky gut syndrome. The substance has the capacity to supply your system with essential sulphur, which can positively affect intestinal health, and prevent gut permeability (leakage).
MSM strengthens your intestinal immune system, and feeds the cells in your gut with sulphur containing compounds, which your body will use to help heal and repair any intestinal imbalance.
MSM can be taken either orally or topically, as its fine particles give it the unique ability to absorb through your skin. It is better however, to take it in powder form, as this enables you to tailor your dose. Dosage should be between 1000mg-2000mg daily, taken at mealtimes for maximum efficacy.
Take your daily dose at mealtimes, staggered across the day in two or three doses to maximise the effects of this beneficial supplement.
You can use a digital weighing scale to precisely measure out your dose and help you to easily split your daily quota.
If you are taking it in powder form, MSM dissolves easily in water and can also be mixed into juices or other cold beverages to disguise the slightly unpleasant taste.
It is next to impossible to overdose on MSM because your body will only ever take the amount it needs and flush out the rest.
However, if you have an intolerance to sulphur you should avoid supplementing with MSM because it can cause allergic reactions such as rashes, itching, nausea, vomiting, and shortness of breath.
Plump for the powder form of MSM if possible, so you can precisely tailor your dose to your body's individual needs.Go for a high strength, high quality MSM Powder like this one from Blackburn's and sprinkle it on food, or blend into a beverage to mask the taste.
Follow a course of MSM supplementation for 2-6 months and you should definitely experience a reduction in your leaky gut syndrome symptoms.
Tighter intestinal knitting, improved cell health, and stronger intestinal tissue, are all benefits your body should manifest as a result of taking MSM.
Zinc is an essential component that your body requires to produce healthy strong cells, and if you have a Zinc deficiency it can be a direct cause of intestinal permeability, aka leaky gut syndrome.
Luckily, supplementing with Zinc can quickly remedy the problem, and a research study published by Sturniolo in 2001 demonstrated it could even contribute to healing in as little as eight weeks!
110 mg, taken three times daily with food to aid absorption. Zinc can be taken in powder or tablet form, lozenges, or even nasal spray, and is frequently combined with Vitamin C, particularly in chewable tablets.
If you choose to get your Zinc in lozenge form or opt for a nasal spray you can take it at any time of the day, but it may be harder to measure out your dosage.
Powdered Zinc is much easier to take throughout the day, as you can sprinkle it onto your food at mealtimes, making it super easy to digest.
If you're opting for the tablet or powder version of this vitamin, make sure you take it at mealtimes to increase your body's capacity to absorb this essential nutrient.
Take capsules with a glass of water or sprinkle the powder onto food. You can also dissolve the powder into a cold flavoured beverage to disguise the taste.
Though it's remarkably restorative, Zinc is extremely toxic when taken in incorrect amounts and can cause rashes, headaches, stomach upsets, nausea, diarrhoea, and even kidney and liver failure.
It's crucial you don't take more than necessary and regularly monitor your body's response to make sure you're not overdosing.
Zinc is a crucial nutrient required for healthy immune system function, and it's common to have a deficiency in this mineral, particularly if you're suffering from leaky gut syndrome. If this is the case, a high potency, quality Zinc Powder like this one is the best way to restore healthy Zinc levels.
Zinc heals surprisingly rapidly, though it works best when it has the chance to accumulate and stabilise at a healthy level in your system. Once a Zinc deficiency is corrected by adequate supplementation though, it has a powerful healing effect on leaky gut syndrome, as the mineral is directly connected to the integrity of your intestinal health.
Collagen contains vital amino acids that are critical to cell growth. It is a key player in any leaky gut treatment plan because it has the power to literally knit your gut wall back together by tightening the intestinal junctions and closing up widened passageways.
You can absorb collagen from foods such as bone broth, but if you're trying to treat a leaky gut, it's a good idea to supplement as well. Collagen can be taken in tablet, capsule, or powder form at doses between 5,000mg and 10,000mg daily. The powder can be easily mixed into a drink and is completely tasteless, making it easy to include in your daily routine.
Take it before meals, ideally at the start of the day. Collagen capsules can be swallowed on waking with a large glass of water to hydrate.
Although it's easier to take Collagen in capsule form, the powder is almost flavourless, so can be easily blended into a drink. If you prefer to split your dose across the day, this might be the preferred option, as it does allow you to tailor your dose with more precision.
Take collagen on an empty stomach or with a light liquid breakfast, as its ability to be absorbed by your body is reduced if your stomach contains food that needs to be digested.
If you're taking the powdered form of collagen and you want to make sure of your daily dosage, use a high accuracy digital weighing scale to measure out the proper dose.
Side effects from collagen are very rare but depending on the source of the collagen i.e.fish, cow etc...it can cause an allergic reaction if you have a pre-existing intolerance. As a precaution, always make sure you check the label of any collagen supplement before you ingest it.
Collagen is relatively tasteless, so it can be easily sprinkled on food, or mixed into beverages, without altering the taste. That said, taking powdered collagen every day can be a hassle, especially when you can get all of the benefits by supplementing every day with handy Collagen Capsules like these ones from ProtoCol.
After about 2 months of taking collagen at the recommended dosage, the channels in your gut lining should start to tighten, causing a reduction in your leaky gut symptoms.
Remember, it takes around 4 months for your body to fully replace damaged tissue with healthy tissue. Expect to wait at least this long in cases of leaky gut syndrome, as collagen works slowly by feeding your body the proteins it needs to produce new, healthy cells.
Found in the mucosal layer of the intestinal tract, N-acetyl glucosamine helps to restore the mucous membrane that seals the gut and prevents leakage. N-acetyl glucosamine has a conditioning and strengthening effect on delicate internal tissue, helping to restore and repair damage, permeability, and holes in the intestinal lining.
Typical dosage is 500mg, three times daily, taken in capsule or powder form. Take capsules with a large glass of water. N-acetyl glucosamine is also available in powder form and if you choose to take it this way, you can get your daily dose easily by dissolving 500 mg of powder, three times a day into a cold beverage.
Take it at mealtimes, either at lunch or dinner, to increase absorbency. N-acetyl glucosamine is not a supplement you should use long term, but taken over a period of 6 months or less, it is highly effective as part of a leaky gut syndrome treatment plan.
With food, for maximum absorption. N-acetyl glucosamine has the capacity to bind to food, which increases its effectiveness, so never take this nutrient on an empty stomach.
Don't take it with overly spicy foods though, as this could irritate your already delicate stomach lining, and try to make sure your meal contains some healthy carbs and essential fats to speed the absorption rate.
Because N-acetyl glucosamine is derived from shellfish sources, anyone with an allergy or sensitivity to shellfish should not supplement with it, as it can cause an allergic reaction. Symptoms such as hives, itchy rash, shortness of breath, and wheezing can occur when ingested by someone with an intolerance, so avoid it if you have ever had any sort of unpleasant reaction to shellfish.
As well, N-acetyl glucosamine can cause excessive bleeding in people with clotting disorders or those on blood thinning medications, so again, avoid if this applies to you.
The ideal way to supplement with N-acetylglucosamine is to take it in powder form, and as it's easily sprinkled on food, or mixed into flavoured beverages,supplementation shouldn't be a problem. Simply measure out the correct dose of a high potency Glucosamine Powder like this one every day and take it with your meals, to ensure your body absorbs the beneficial nutrients.
It takes about 2-4 months to start feeling the full benefit of N-acetylglucosamine. When the effects kick in, you should start to feel a dramatic reduction in your leaky gut syndrome symptoms as your intestinal mucous becomes stronger and more efficient at filtering and processing toxins.
A course of treatment should reset and replenish the mucosal layer in your gut lining, helping to heal and seal the gut wall.
Vitamin D, particularly Vitamin D3, is an essential vitamin that lots of us don't get enough of. The best source is sunlight, but in the winter months, our stocks of this vital nutrient can run low, which is where supplementation can come in handy.
Vitamin D can play a crucial role in the treatment of a leaky gut because it's needed by the intestines so they can act as a gatekeeper for our immune system. They do this by blocking toxins and pollutants from entering our bloodstream. When Vitamin D is low, your immune system will simply not function as well, making it a truly critical building block if you want to maintain healthy gut function.
There are many ways you can supplement with Vitamin D, tablets; soft gels, liquid drops, nasal spray, and even lozenges.Whatever form you decide on, always take it with food that contains fat, as it's a fat soluble vitamin, and aim for between 2,000 IU's and 4,000 IU's a day.
Because Vitamin D also encourages calcium absorbency, you should always take it with Vitamin K, which binds calcium to your bones, so that calcium does not get deposited in your arteries, which can cause heart disease.
With meals containing fat as it's a fat soluble vitamin, preferably your first meal of the day, if you have fat with your breakfast. You can stagger your dose easily if you plump for the powdered form of Vitamin D, measuring it out with a digital weighing scale for accuracy into two or three doses that you take with your meals.
With meals containing healthy fats like avocado, olive oil, butter, or grass fed meats.
Lunch and dinner would be a good choice, as if you prefer cereal in the morning you might find it hard to eat the fat this vitamin requires for full absorbency.
It's almost impossible to overdose on Vitamin D, but when taken alone, the supplement can cause excessive calcium to be deposited in your arteries. That's why it's important to always take Vitamin D in conjunction with Vitamin K to ensure calcium is bound to the bone, where it's meant to be.
Mix a premium quality Vitamin D powder into a cold beverage and take it with a fat containing meal, or sprinkle it onto food to get your daily quota.
Look for a high strength Vitamin D3 Powder like this one from Blackburns to ensure you're receiving the recommended amount, as concentrations vary, and a lot of products on the market don't contain the amount your body needs every day.
Vitamin D has a cumulative effect, working overtime to bring your body's immune system back into balance. Once any Vitamin D deficiency has been corrected, your intestinal function will be much more efficient, filtering out toxins and pollutants with greater ease.
This will go a long way to reducing a lot of the associated leaky gut symptoms that can come from having an immune system that functions at a sub par level.
You can expect to see results after about 3 months but you do need to keep supplementing with this vital vitamin if you want your levels to remain constant.
Probiotics are highly beneficial in cases of leaky gut syndrome, as they help rebuild a layer of beneficial bacteria in your intestinal lining. However, they should not be started on straight away, as your sensitive gut will not be primed to handle them.
Follow a program of clean eating for 2-4 weeks, while supplementing with L-Glutamine, then introduce a high-quality probiotic into your regime.Probiotics work by re-establishing correct levels of healthy bacteria in the gut, which enables it to deal with toxins much better, leading to a stronger immune system.
The goal here is to rebalance your stomach bacteria and replenish the intestinal lining with healthy gut flora. You don't want to overload your system, which is likely to be more delicate anyway if you're suffering from a leaky gut. Consume 1 or 2 capsules a day of a probiotic supplement that contains a culture of between 10-15 billion good bacteria, so as not to overdo things.
Monitor over a period of 4 weeks to see whether there is any improvement in your leaky gut related symptoms and adjust your dosage accordingly.
Take your daily dose of probiotic either with a meal containing a little dietary fat, or 30 minutes before.
Take for at least a month, or until you feel a considerable improvement in your leaky gut syndrome related symptoms.
Swallow with a large glass of water, either just before meals, or with your meal to enhance absorption.
Don't take it at the same time as spicy or very hot food as this could aggravate and overload your sensitive intestinal lining.
If you take more than you need of a probiotic supplement, you could experience bloating, excessive gas, burping, loose stools, and gastric upset. If you're a leaky gut sufferer, it's very important to monitor your body's response while taking probiotics, to ensure you're not overloading your system.
You can take probiotics in a liquid form, but these can spoil quickly, making tablets the no hassle option. Pick up this pack of beneficial Probiotics combined with a Prebiotic to prime your gut lining, and your intestinal health will be back to full strength in no time.
If a deficit of healthy gut flora is responsible for causing your leaky gut related symptoms, after supplementing with probiotics for at least 4 weeks,you should start to see a definite improvement in your condition.
As good bacteria colonises in your gut, your intestines will be better equipped to fight off toxins, parasites, and other harmful invaders, and your intestinal junctions will tighten up, helping to prevent leakage.
Raspberry Leaf extract has a toning effect on intestinal and reproductive tissue, so when taken as part of a leaky gut care plan it can be extremely effective. Raspberry Leaf extract also has a powerful replenishing and nourishing action on damaged cells, making it ideal for cases of intestinal permeability, a direct cause of leaky gut syndrome symptoms.
Raspberry Leaf extract can be taken in capsule form, or drunk as a tea, or infusion. You can buy pre-packaged tea bags, or get loose Raspberry leaf tea and infuse it yourself, as you would any other tea. Dosage should be around 750 mcg daily and can be taken alone or with meals.
Raspberry Leaf extract can be taken at any time of the day, on its own, or with meals. Brew a pot of Raspberry Leaf tea or make an infusion and pour cups to sip throughout the day, as it is a pleasant and highly refreshing beverage, whether it's drunk cold, hot, or gently warmed.
You can also switch out your morning coffee for a cup of Raspberry Leaf tea, which will also help your leaky gut, as caffeine can often be an aggravating factor that can worsen symptoms.
If you opt for the capsule form of the extract, take it with a glass of water to ensure you absorb your dosage properly.
The tea can be sipped hot or cold, and loose tea can be weighed using a high accuracy digital measuring scale like this one: High Accuracy Digital Scale though you should always prepare Raspberry Leaf Tea using boiling water.
Raspberry Leaf Extract is extremely safe and has no real side effects, however,Pregnant women in the first trimester should not take it as it can make the uterus contract, causing miscarriage.It is very safe in the later stages of pregnancy, and in fact is highly beneficial, due to its toning effect on the uterus.
If you enjoy herbal teas, Raspberry Leaf Extract is delicious as an infusion, plus you can sip it throughout your day.But if you don't want the stress of making tea, you can get your daily dose of gut healing Raspberry Leaf Extract in handy tablets like these Nature's Aid ones, available on Amazon.
After supplementing with Raspberry Leaf for 3-6 months, you will have stronger and more toned intestinal tissue and your gut lining will also be less permeable and porous. Because permeability is the primary cause of gut leakage, you should start to see a dramatic reduction in your leaky gut related symptoms after this time period.
If you're suffering from a leaky gut, you should never underestimate the importance of taking a good multivitamin daily. High-quality multivitamins will ensure your body receives a good dose of the essential nutrients, vitamins, and minerals it requires to stay healthy.
Achieving the right vitamin and mineral balance in your body is key because your body draws on the supply of nutrients it receives when it produces cells, tissue, and mucous. These are three things that need to be at an optimal level if you want to avoid leaky gut syndrome.
Ideally, you should opt for a multivitamin that also contains beneficial probiotics, as these will help to establish healthy bacteria in your gut. This is another important factor which can bring your body back into alignment and help heal and seal your intestinal lining.
Dosages vary depending on what multivitamin you've chosen, so always check product packaging to ascertain the correct amount to take.
Multivitamins come in a huge variety of formulas, including pills, capsules, lozenges, powders, chewable tablets, and even sprays, but for leaky gut, tablets, capsules, or powders are your best option as they will typically contain a higher proportion of beneficial ingredients.
Try and take your multivitamin at the same time each day, with food, to get your body acclimated to a regular routine. It's a good idea to take it with your breakfast, as this sets you up for the day and gives your body something to digest, maximising absorbency.
Take your multi with food, preferably with meals containing healthy fats, as some of the vitamins and nutrients it contains, like Vitamin C, will be absorbed much better this way.
Powdered multivitamins can be sprinkled on food or mixed into smoothies. Capsules or tablets should be taken with a large glass of water to hydrate.
You typically only need to take most multivitamins once daily, but check the precise instructions on your multi to make sure you're getting the right dosage.
It's incredibly rare to suffer side effects from a multivitamin, especially if you're taking it at the right dosage, although there are some situations where this can occur.
Usually, this would be when you already have a pre-existing intolerance to one or more of the ingredients, like niacin, one of the B vitamins, or an allergic reaction to the filler ingredient used in your multivitamin.
If this is the case you could suffer an allergic reaction such as wheezing, hives, an itchy rash, or shortness of breath.
Check the ingredients listing on your multivitamin to make certain you're not allergic to any of the ingredients, to avoid this type of situation occurring.
Get a high grade multivitamin, preferably with a probiotic, from a trusted and reputable manufacturer to ensure you're getting your daily boost of nourishing vitamins and nutrients. This one, from Multibionta,contains beneficial stomach healing probiotics, for an added boost to relieve those leaky gut related symptoms.
The effects of supplementing with multivitamins take some time to show in the body, especially when it comes to seeing a real difference in your leaky gut symptoms.
After about 6 months of taking your multivitamin, any intestinal imbalances caused by a mineral or vitamin deficiency should start to right themselves, as your body's levels of essential nutrients start to normalise.
If a leaky gut is getting you down, by incorporating just one or two of the above-recommended supplements into your diet, you could soon start to see and feel a reduction in symptoms. As many of the supplements mentioned are relatively inexpensive, why not try combining three or four, if you want to see a dramatic improvement even faster?
Remember the goal here is to improve overall gut health and intestinal function, so make sure you're also following a healthy diet, if you want to see the maximum benefits. Eliminate gluten, alcohol, and all processed foods, and reduce sugar and caffeine to a minimum, to really enhance the benefits of your new supplement regime.
Don't forget the power of movement either, gentle exercise like yoga, stretching, pilates, and walking will all aid your body as your gut lining tries to repair itself.
If you follow this advice and harness it in combination with one or more of the recommended leaky gut treatment supplements recommended in this plan, you will see a marked improvement in your energy and mood. You will also enjoy lower levels of inflammation and irritation, as a result of improved intestinal health.
Now you know the supplements to heal your gut wall that your system requires, you can seal your leaky gut and suffer no longer.This treatment plan will empower you to get proactive and feed your body the substances it needs to replenish and repair itself, enabling you to cure your leaky gut syndrome forever.


text:
Q: How to configure jwt token in swagger header using spring boot I have configured swagger in  spring boot application but i dont know how to authenticate jwt authorization token the swagger version is 2.4.0
@Bean
public Docket newsApi() {
    return new Docket(DocumentationType.SWAGGER_2)
            .select()
            .apis(RequestHandlerSelectors.any())
            .paths(PathSelectors.any())
            .build()
            .securitySchemes(Lists.newArrayList(apiKey()))
            .securityContexts(Lists.newArrayList(securityContext()));

}

@Bean
SecurityContext securityContext() {
    return SecurityContext.builder()
            .securityReferences(defaultAuth())
            .forPaths(PathSelectors.any())
            .build();
}

List<SecurityReference> defaultAuth() {
    AuthorizationScope authorizationScope
            = new AuthorizationScope("global", "accessEverything");
    AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
    authorizationScopes[0] = authorizationScope;
    return Lists.newArrayList(
            new SecurityReference("JWT", authorizationScopes));
}

private ApiKey apiKey() {
    return new ApiKey("JWT", "Authorization", "header");
}

A: I was struggling with this issue today and found out that actually there is no way to do it yet.
Your code is already good enough for this task, there is just one thing missing: when you add the token in the UI, you need to also add "Bearer" before the token.

*

*Click to add your authorization:

*Add "Bearer " + your token:

I also tried to add the "Bearer" to the ApiKey, but it also don't work (because it generates double ":".
Hope it helps.

redpajama_set_name: RedPajamaStackExchange


text:
Promoting Plurality Amongst English-Language Magazines - 15 January 2019
The Welsh Books Council has announced that seven English-language magazines have been offered grant support during the next funding period, with exciting new voices emerging alongside long-respected publications.
In the most competitive round to date, five established magazines have been awarded a renewal of funding in recognition of the important contribution they make to Welsh culture, while funding has been offered to a new recipient, the online English-language news service Nation.Cymru. The awarding panel were impressed with the website's mission to raise awareness of devolved politics and Wales-specific news and its impressive performance over a short period of time. While new Wales-based gothic magazine, The Ghastling, didn't receive funding from the main scheme on this occasion, the panel were struck with the quality of the publication and the passion and commitment of its young editor. In an effort to develop new talent within the sector, they awarded a one-off grant from outside the scheme to help develop the magazine.
"The WBC is committed to providing a range of material for the people of Wales in both print and digital formats to make them as accessible as possible," said Helgard Krause, Chief Executive of the Welsh Books Council. "The magazines funded offer uniquely Welsh perspectives, quality writing, and a platform for lively debate. With funding for the arts and culture at risk, it is important that we continue to safeguard this vital industry."
The new four-year funding period will begin in April 2019 and will see the following grants awarded during the first year:
Nation.Cymru £20,000
Poetry Wales £20,000
The Welsh Agenda and Click on Wales £17,500
New Welsh Review £45,000
Planet £45,000
Wales Arts Review £27,500
In addition, The Ghastling will receive a one-off sum only of £10,000.
Grant recipients will also receive training in order to keep abreast of developments in this dynamic sector, and as pressure continues to increase on public spending, they will be encouraged to think creatively to seek a range of income sources and partnership opportunities.
Patagonia Book Launch
Dic Jones, Cefin Roberts and a New Novel by Lleucu Roberts - Just Some of the New Welsh Books Ready for this year's National Eisteddfod at the Vale of Glamorgan
The Editors of Taliesin Launch a Digital Magazine
Following in Waldo's Footsteps
Patrick McGuinness wins Wales Book of the Year 2012
Jerry Hunter Book Launch
Caernarfon Book Launch
Buzzing Atmosphere at National Competition
Author's Australian Adventure
Perfect Father's Day Gift
Forgotten Footprints
Two Win for the Second Time
The Advantages of Writing in Two Languages
Magical Novel Wins Major Award
Waterstones Signing Sessions
Novel of the Month Launch
Aberystwyth Book Launch
Book of the Year 2012
Chris Meredith Book Launch

redpajama_set_name: RedPajamaCommonCrawl


Enjoy this Easy Science for Kids Ants and Termites Quiz – you'll get your quiz score after completing this FREE online interactive quiz on Ants and Termites. You need to answer all the questions to be able to get your score. You can do this fun quiz about Ants and Termites again, till you get the perfect score and become a quiz champion!
Tip: To get it right the first time, read the page with fun facts about the Ants and Termites.
Take this free and fun online science quiz about Ants and Termites!
This fun Science for kids FREE online interactive quiz is all about Ants and Termites! Let's see how well you know about Ants and Termites.
Click here to learn fun facts about Termites and click here to learn the fun facts about Ants.
Visit this page to learn about Ants and to find the answer!
Visit this page to learn about Termites and to find the answer!
Visit this page to learn about this insect with 2 pairs of wings and to find the answer!
Our fun interactive science quizzes are a free online quiz resource for teachers and educators of kids in elementary school, grammar school and preschool. This fun Ants and Termites quiz helps your kids learn fun facts about the Ants and Termites while enjoying this FREE science quiz for kids.
If your child is interested in learning about animals and the world, or is in an after-school enrichment program, then this is a easy science activity, with reading comprehension benefits for kids in grade 1-5. Kids will enjoy competing against their classmates and friends, to see who scores better, doing this free online kids science quiz about Ants and Termites.
As a reading comprehension educational activity for kids, you can set a timer to encourage kids to do the reading comprehension activity faster, or you can limit the number of times they can read about the Ants and Termites quiz topic, before they do the actual fun science kids quizzes we offer.
Younger kids who cannot yet read or write, such as Pre-K kids, Kindergarten kids or Preschool kids, will benefit from doing this fun online quiz and our other fun online quizzes, as a listening comprehension activity; you read out to them about the topic and then read the Ants and Termites quiz question and answers. You will select the Ants and Termites quiz answer they think is correct, and at the end you get the quiz score. Your child can try multiple times doing this interactive science quiz, till gets the perfect score faster, as he or she learns to listen more carefully and develop a better memory and attention span!
Declan, Tobin. " Fun Ants and Termites Quiz – FREE Online Interactive Science Quiz - ." Easy Science for Kids, Apr 2019. Web. 21 Apr 2019. < https://easyscienceforkids.com/fun-ants-and-termites-quiz-free-online-interactive-science-quiz/ >.


text:
#import <Cordova/CDV.h>
#import "CDVFile.h"
#import "CDVLocalFilesystem.h"
#import "CDVAssetLibraryFilesystem.h"

CDVFile *filePlugin = nil;

extern NSString * const NSURLIsExcludedFromBackupKey __attribute__((weak_import));

#ifndef __IPHONE_5_1
    NSString* const NSURLIsExcludedFromBackupKey = @"NSURLIsExcludedFromBackupKey";
#endif

NSString* const kCDVFilesystemURLPrefix = @"cdvfile";

@implementation CDVFilesystemURL
@synthesize url=_url;
@synthesize fileSystemName=_fileSystemName;
@synthesize fullPath=_fullPath;

- (id) initWithString:(NSString *)strURL
{
    if ( self = [super init] ) {
        NSURL *decodedURL = [NSURL URLWithString:strURL];
        return [self initWithURL:decodedURL];
    }
    return nil;
}

-(id) initWithURL:(NSURL *)URL
{
    if ( self = [super init] ) {
        _url = URL;
        _fileSystemName = [self filesystemNameForLocalURI:URL];
        _fullPath = [self fullPathForLocalURI:URL];
    }
    return self;
}

/*
 * IN
 *  NSString localURI
 * OUT
 *  NSString FileSystem Name for this URI, or nil if it is not recognized.
 */
- (NSString *)filesystemNameForLocalURI:(NSURL *)uri
{
    if ([[uri scheme] isEqualToString:kCDVFilesystemURLPrefix] && [[uri host] isEqualToString:@"localhost"]) {
        NSArray *pathComponents = [uri pathComponents];
        if (pathComponents != nil && pathComponents.count > 1) {
            return [pathComponents objectAtIndex:1];
        }
    } else if ([[uri scheme] isEqualToString:kCDVAssetsLibraryScheme]) {
        return @"assets-library";
    }
    return nil;
}

/*
 * IN
 *  NSString localURI
 * OUT
 *  NSString fullPath component suitable for an Entry object.
 * The incoming URI should be properly escaped. The returned fullPath is unescaped.
 */
- (NSString *)fullPathForLocalURI:(NSURL *)uri
{
    if ([[uri scheme] isEqualToString:kCDVFilesystemURLPrefix] && [[uri host] isEqualToString:@"localhost"]) {
        NSString *path = [uri path];
        NSRange slashRange = [path rangeOfString:@"/" options:0 range:NSMakeRange(1, path.length-1)];
        if (slashRange.location == NSNotFound) {
            return @"";
        }
        return [path substringFromIndex:slashRange.location];
    }
    return nil;
}

+ (CDVFilesystemURL *)fileSystemURLWithString:(NSString *)strURL
{
    return [[CDVFilesystemURL alloc] initWithString:strURL];
}

+ (CDVFilesystemURL *)fileSystemURLWithURL:(NSURL *)URL
{
    return [[CDVFilesystemURL alloc] initWithURL:URL];
}

@end

@implementation CDVFilesystemURLProtocol

+ (BOOL)canInitWithRequest:(NSURLRequest*)request
{
    NSURL* url = [request URL];
    return [[url scheme] isEqualToString:kCDVFilesystemURLPrefix];
}

+ (NSURLRequest*)canonicalRequestForRequest:(NSURLRequest*)request
{
    return request;
}

+ (BOOL)requestIsCacheEquivalent:(NSURLRequest*)requestA toRequest:(NSURLRequest*)requestB
{
    return [[[requestA URL] resourceSpecifier] isEqualToString:[[requestB URL] resourceSpecifier]];
}

- (void)startLoading
{
    CDVFilesystemURL* url = [CDVFilesystemURL fileSystemURLWithURL:[[self request] URL]];
    NSObject<CDVFileSystem> *fs = [filePlugin filesystemForURL:url];
    [fs readFileAtURL:url start:0 end:-1 callback:^void(NSData *data, NSString *mimetype, CDVFileError error) {
        if (!error) {
            NSURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:url.url statusCode:200 HTTPVersion:@"HTTP/1.1"headerFields:@{@"Content-Type": mimetype}];
            [[self client] URLProtocol:self didReceiveResponse:response cacheStoragePolicy:NSURLCacheStorageNotAllowed];
            [[self client] URLProtocol:self didLoadData:data];
            [[self client] URLProtocolDidFinishLoading:self];
        } else {
            NSURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:url.url statusCode:404 HTTPVersion:@"HTTP/1.1"headerFields:@{}];
            [[self client] URLProtocol:self didReceiveResponse:response cacheStoragePolicy:NSURLCacheStorageNotAllowed];
            [[self client] URLProtocolDidFinishLoading:self];
        }
    }];
}

- (void)stopLoading
{
    // do any cleanup here
}

@end

@implementation CDVFile

@synthesize rootDocsPath, appDocsPath, appLibraryPath, appTempPath, userHasAllowed, fileSystems=fileSystems_;

- (void)registerFilesystem:(NSObject<CDVFileSystem> *)fs {
    [fileSystems_ addObject:fs];
}

- (NSObject<CDVFileSystem> *)fileSystemByName:(NSString *)fsName
{
    if (self.fileSystems != nil) {
        for (NSObject<CDVFileSystem> *fs in self.fileSystems) {
            if ([fs.name isEqualToString:fsName]) {
                return fs;
            }
        }
    }
    return nil;

}

- (NSObject<CDVFileSystem> *)filesystemForURL:(CDVFilesystemURL *)localURL {
    if (localURL.fileSystemName == nil) return nil;
    @try {
        return [self fileSystemByName:localURL.fileSystemName];
    }
    @catch (NSException *e) {
        return nil;
    }
}

@synthesize viewController=_viewController;
- (void)setViewController:(UIViewController *)newViewController
{
    if (_viewController != newViewController) {
        _viewController = newViewController;

        NSString *location = nil;
        if([_viewController isKindOfClass:[CDVViewController class]]) {
            CDVViewController *vc = (CDVViewController *)_viewController;
            NSMutableDictionary *settings = vc.settings;
            location = [[settings objectForKey:@"iospersistentfilelocation"] lowercaseString];
        }
        if (location == nil) {
            // Compatibilty by default (if the config preference is not set, or
            // if we're not embedded in a CDVViewController somehow.)
            location = @"compatibility";
        }

        NSError *error;
        if ([[NSFileManager defaultManager] createDirectoryAtPath:self.appTempPath
                                      withIntermediateDirectories:YES
                                                       attributes:nil
                                                            error:&error]) {
            [self registerFilesystem:[[CDVLocalFilesystem alloc] initWithName:@"temporary" root:self.appTempPath]];
        } else {
            NSLog(@"Unable to create temporary directory: %@", error);
        }
        if ([location isEqualToString:@"library"]) {
            if ([[NSFileManager defaultManager] createDirectoryAtPath:self.appLibraryPath
                                          withIntermediateDirectories:YES
                                                           attributes:nil
                                                                error:&error]) {
                [self registerFilesystem:[[CDVLocalFilesystem alloc] initWithName:@"persistent" root:self.appLibraryPath]];
            } else {
                NSLog(@"Unable to create library directory: %@", error);
            }
        } else if ([location isEqualToString:@"compatibility"]) {
            /*
             *  Fall-back to compatibility mode -- this is the logic implemented in
             *  earlier versions of this plugin, and should be maintained here so
             *  that apps which were originally deployed with older versions of the
             *  plugin can continue to provide access to files stored under those
             *  versions.
             */
            [self registerFilesystem:[[CDVLocalFilesystem alloc] initWithName:@"persistent" root:self.rootDocsPath]];
        } else {
            NSAssert(false,
                @"File plugin configuration error: Please set iosPersistentFileLocation in config.xml to one of \"library\" (for new applications) or \"compatibility\" (for compatibility with previous versions)");
        }
        [self registerFilesystem:[[CDVAssetLibraryFilesystem alloc] initWithName:@"assets-library"]];
    }
}

- (id)initWithWebView:(UIWebView*)theWebView
{
    self = (CDVFile*)[super initWithWebView:theWebView];
    if (self) {
        filePlugin = self;
        [NSURLProtocol registerClass:[CDVFilesystemURLProtocol class]];

        fileSystems_ = [[NSMutableArray alloc] initWithCapacity:3];

        // Get the Library directory path
        NSArray* paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
        self.appLibraryPath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"files"];

        // Get the Temporary directory path
        self.appTempPath = [NSTemporaryDirectory()stringByStandardizingPath];   // remove trailing slash from NSTemporaryDirectory()

        // Get the Documents directory path
        paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
        self.rootDocsPath = [paths objectAtIndex:0];
        self.appDocsPath = [self.rootDocsPath stringByAppendingPathComponent:@"files"];

    }

    return self;
}

- (CDVFilesystemURL *)fileSystemURLforLocalPath:(NSString *)localPath
{
    CDVFilesystemURL *localURL = nil;
    // Try all installed filesystems, in order. If any one supports mapping from
    // path to URL, and returns a URL, then use it.
    for (id object in self.fileSystems) {
        localURL = [object URLforFilesystemPath:localPath];
        if (localURL)
            return localURL;
    }
    return nil;
}

- (NSNumber*)checkFreeDiskSpace:(NSString*)appPath
{
    NSFileManager* fMgr = [[NSFileManager alloc] init];

    NSError* __autoreleasing pError = nil;

    NSDictionary* pDict = [fMgr attributesOfFileSystemForPath:appPath error:&pError];
    NSNumber* pNumAvail = (NSNumber*)[pDict objectForKey:NSFileSystemFreeSize];

    return pNumAvail;
}

/* Request the File System info
 *
 * IN:
 * arguments[0] - type (number as string)
 *	TEMPORARY = 0, PERSISTENT = 1;
 * arguments[1] - size
 *
 * OUT:
 *	Dictionary representing FileSystem object
 *		name - the human readable directory name
 *		root = DirectoryEntry object
 *			bool isDirectory
 *			bool isFile
 *			string name
 *			string fullPath
 *			fileSystem = FileSystem object - !! ignored because creates circular reference !!
 */

- (void)requestFileSystem:(CDVInvokedUrlCommand*)command
{
    NSArray* arguments = command.arguments;

    // arguments
    NSString* strType = [arguments objectAtIndex:0];
    unsigned long long size = [[arguments objectAtIndex:1] longLongValue];

    int type = [strType intValue];
    CDVPluginResult* result = nil;

    if (type > self.fileSystems.count) {
        result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:NOT_FOUND_ERR];
        NSLog(@"No filesystem of type requested");
    } else {
        NSString* fullPath = @"/";
        // check for avail space for size request
        NSNumber* pNumAvail = [self checkFreeDiskSpace:fullPath];
        // NSLog(@"Free space: %@", [NSString stringWithFormat:@"%qu", [ pNumAvail unsignedLongLongValue ]]);
        if (pNumAvail && ([pNumAvail unsignedLongLongValue] < size)) {
            result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:QUOTA_EXCEEDED_ERR];
        } else {
            NSObject<CDVFileSystem> *rootFs = [self.fileSystems objectAtIndex:type];
            if (rootFs == nil) {
                result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:NOT_FOUND_ERR];
                NSLog(@"No filesystem of type requested");
            } else {
                NSMutableDictionary* fileSystem = [NSMutableDictionary dictionaryWithCapacity:2];
                [fileSystem setObject:rootFs.name forKey:@"name"];
                NSDictionary* dirEntry = [self makeEntryForPath:fullPath fileSystemName:rootFs.name isDirectory:YES];
                [fileSystem setObject:dirEntry forKey:@"root"];
                result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:fileSystem];
            }
        }
    }
    [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
}

/* Creates and returns a dictionary representing an Entry Object
 *
 * IN:
 * NSString* fullPath of the entry
 * int fsType - FileSystem type
 * BOOL isDirectory - YES if this is a directory, NO if is a file
 * OUT:
 * NSDictionary* Entry object
 *		bool as NSNumber isDirectory
 *		bool as NSNumber isFile
 *		NSString*  name - last part of path
 *		NSString* fullPath
 *		NSString* filesystemName - FileSystem name -- actual filesystem will be created on the JS side if necessary, to avoid
 *         creating circular reference (FileSystem contains DirectoryEntry which contains FileSystem.....!!)
 */
- (NSDictionary*)makeEntryForPath:(NSString*)fullPath fileSystemName:(NSString *)fsName isDirectory:(BOOL)isDir
{
    NSMutableDictionary* dirEntry = [NSMutableDictionary dictionaryWithCapacity:5];
    NSString* lastPart = [fullPath lastPathComponent];
    if (isDir && ![fullPath hasSuffix:@"/"]) {
        fullPath = [fullPath stringByAppendingString:@"/"];
    }
    [dirEntry setObject:[NSNumber numberWithBool:!isDir]  forKey:@"isFile"];
    [dirEntry setObject:[NSNumber numberWithBool:isDir]  forKey:@"isDirectory"];
    [dirEntry setObject:fullPath forKey:@"fullPath"];
    [dirEntry setObject:lastPart forKey:@"name"];
    [dirEntry setObject: [NSNumber numberWithInt:([fsName isEqualToString:@"temporary"] ? 0 : 1)] forKey: @"filesystem"];
    [dirEntry setObject:fsName forKey: @"filesystemName"];
    return dirEntry;
}

- (NSDictionary *)makeEntryForURL:(NSURL *)URL
{
    CDVFilesystemURL *fsURL = [CDVFilesystemURL fileSystemURLWithURL:URL];
    NSObject<CDVFileSystem> *fs = [self filesystemForURL:fsURL];
    return [fs makeEntryForLocalURL:fsURL];
}

/*
 * Given a URI determine the File System information associated with it and return an appropriate W3C entry object
 * IN
 *	NSString* localURI: Should be an escaped local filesystem URI
 * OUT
 *	Entry object
 *		bool isDirectory
 *		bool isFile
 *		string name
 *		string fullPath
 *		fileSystem = FileSystem object - !! ignored because creates circular reference FileSystem contains DirectoryEntry which contains FileSystem.....!!
 */
- (void)resolveLocalFileSystemURI:(CDVInvokedUrlCommand*)command
{
    // arguments
    NSString* localURIstr = [command.arguments objectAtIndex:0];
    CDVPluginResult* result;
    CDVFilesystemURL* inputURI;

    /* Backwards-compatibility: Check for file:// urls */
    if ([localURIstr hasPrefix:@"file://"]) {
        /* This looks like a file url. Get the path, and see if any handlers recognize it. */
        NSString* path;
        NSRange questionMark = [localURIstr rangeOfString:@"?"];
        if (questionMark.location == NSNotFound) {
            path = [localURIstr substringFromIndex:7];
        } else {
            path = [localURIstr substringWithRange:NSMakeRange(7,questionMark.location-7)];
        }
        inputURI = [self fileSystemURLforLocalPath:path];
    } else {
        inputURI = [CDVFilesystemURL fileSystemURLWithString:localURIstr];
    }
    if (inputURI != nil && inputURI.fileSystemName == nil) {
        result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:ENCODING_ERR];
    } else {
        NSObject<CDVFileSystem> *fs = [self filesystemForURL:inputURI];
        result = [fs entryForLocalURI:inputURI];
    }
    [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
}

/* Part of DirectoryEntry interface,  creates or returns the specified directory
 * IN:
 *	NSString* localURI - local filesystem URI for this directory
 *	NSString* path - directory to be created/returned; may be full path or relative path
 *	NSDictionary* - Flags object
 *		boolean as NSNumber create -
 *			if create is true and directory does not exist, create dir and return directory entry
 *			if create is true and exclusive is true and directory does exist, return error
 *			if create is false and directory does not exist, return error
 *			if create is false and the path represents a file, return error
 *		boolean as NSNumber exclusive - used in conjunction with create
 *			if exclusive is true and create is true - specifies failure if directory already exists
 *
 *
 */
- (void)getDirectory:(CDVInvokedUrlCommand*)command
{
    NSMutableArray* arguments = [NSMutableArray arrayWithArray:command.arguments];
    NSMutableDictionary* options = nil;

    if ([arguments count] >= 3) {
        options = [arguments objectAtIndex:2 withDefault:nil];
    }
    // add getDir to options and call getFile()
    if (options != nil) {
        options = [NSMutableDictionary dictionaryWithDictionary:options];
    } else {
        options = [NSMutableDictionary dictionaryWithCapacity:1];
    }
    [options setObject:[NSNumber numberWithInt:1] forKey:@"getDir"];
    if ([arguments count] >= 3) {
        [arguments replaceObjectAtIndex:2 withObject:options];
    } else {
        [arguments addObject:options];
    }
    CDVInvokedUrlCommand* subCommand =
        [[CDVInvokedUrlCommand alloc] initWithArguments:arguments
                                             callbackId:command.callbackId
                                              className:command.className
                                             methodName:command.methodName];

    [self getFile:subCommand];
}

/* Part of DirectoryEntry interface,  creates or returns the specified file
 * IN:
 *	NSString* baseURI - local filesytem URI for the base directory to search
 *	NSString* requestedPath - file to be created/returned; may be absolute path or relative path
 *	NSDictionary* options - Flags object
 *		boolean as NSNumber create -
 *			if create is true and file does not exist, create file and return File entry
 *			if create is true and exclusive is true and file does exist, return error
 *			if create is false and file does not exist, return error
 *			if create is false and the path represents a directory, return error
 *		boolean as NSNumber exclusive - used in conjunction with create
 *			if exclusive is true and create is true - specifies failure if file already exists
 */
- (void)getFile:(CDVInvokedUrlCommand*)command
{
    NSString* baseURIstr = [command.arguments objectAtIndex:0];
    CDVFilesystemURL* baseURI = [CDVFilesystemURL fileSystemURLWithString:baseURIstr];
    NSString* requestedPath = [command.arguments objectAtIndex:1];
    NSDictionary* options = [command.arguments objectAtIndex:2 withDefault:nil];

    NSObject<CDVFileSystem> *fs = [self filesystemForURL:baseURI];
    CDVPluginResult* result = [fs getFileForURL:baseURI requestedPath:requestedPath options:options];

    [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
}

/*
 * Look up the parent Entry containing this Entry.
 * If this Entry is the root of its filesystem, its parent is itself.
 * IN:
 * NSArray* arguments
 *	0 - NSString* localURI
 * NSMutableDictionary* options
 *	empty
 */
- (void)getParent:(CDVInvokedUrlCommand*)command
{
    // arguments are URL encoded
    CDVFilesystemURL* localURI = [CDVFilesystemURL fileSystemURLWithString:[command.arguments objectAtIndex:0]];

    NSObject<CDVFileSystem> *fs = [self filesystemForURL:localURI];
    CDVPluginResult* result = [fs getParentForURL:localURI];

    [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
}

/*
 * get MetaData of entry
 * Currently MetaData only includes modificationTime.
 */
- (void)getMetadata:(CDVInvokedUrlCommand*)command
{
    // arguments
    NSString* localURIstr = [command.arguments objectAtIndex:0];
    CDVFilesystemURL* localURI = [CDVFilesystemURL fileSystemURLWithString:localURIstr];
    NSObject<CDVFileSystem> *fs = [self filesystemForURL:localURI];
    [fs getMetadataForURL:localURI callback:^(CDVPluginResult* result) {
        [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
    }];

}

/*
 * set MetaData of entry
 * Currently we only support "com.apple.MobileBackup" (boolean)
 */
- (void)setMetadata:(CDVInvokedUrlCommand*)command
{
    // arguments
    CDVFilesystemURL* localURI = [CDVFilesystemURL fileSystemURLWithString:[command.arguments objectAtIndex:0]];
    NSDictionary* options = [command.arguments objectAtIndex:1 withDefault:nil];
    NSObject<CDVFileSystem> *fs = [self filesystemForURL:localURI];
    CDVPluginResult* result = [fs setMetadataForURL:localURI withObject:options];

    [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
}

/* removes the directory or file entry
 * IN:
 * NSArray* arguments
 *	0 - NSString* localURI
 *
 * returns NO_MODIFICATION_ALLOWED_ERR  if is top level directory or no permission to delete dir
 * returns INVALID_MODIFICATION_ERR if is non-empty dir or asset library file
 * returns NOT_FOUND_ERR if file or dir is not found
*/
- (void)remove:(CDVInvokedUrlCommand*)command
{
    // arguments
    CDVFilesystemURL* localURI = [CDVFilesystemURL fileSystemURLWithString:[command.arguments objectAtIndex:0]];
    CDVPluginResult* result = nil;

    if ([localURI.fullPath isEqualToString:@""]) {
        // error if try to remove top level (documents or tmp) dir
        result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NO_MODIFICATION_ALLOWED_ERR];
    } else {
        NSObject<CDVFileSystem> *fs = [self filesystemForURL:localURI];
        result = [fs removeFileAtURL:localURI];
    }
    [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
}

/* recursively removes the directory
 * IN:
 * NSArray* arguments
 *	0 - NSString* localURI
 *
 * returns NO_MODIFICATION_ALLOWED_ERR  if is top level directory or no permission to delete dir
 * returns NOT_FOUND_ERR if file or dir is not found
 */
- (void)removeRecursively:(CDVInvokedUrlCommand*)command
{
    // arguments
    CDVFilesystemURL* localURI = [CDVFilesystemURL fileSystemURLWithString:[command.arguments objectAtIndex:0]];
    CDVPluginResult* result = nil;

    if ([localURI.fullPath isEqualToString:@""]) {
        // error if try to remove top level (documents or tmp) dir
        result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NO_MODIFICATION_ALLOWED_ERR];
    } else {
        NSObject<CDVFileSystem> *fs = [self filesystemForURL:localURI];
        result = [fs recursiveRemoveFileAtURL:localURI];
    }
    [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
}

- (void)copyTo:(CDVInvokedUrlCommand*)command
{
    [self doCopyMove:command isCopy:YES];
}

- (void)moveTo:(CDVInvokedUrlCommand*)command
{
    [self doCopyMove:command isCopy:NO];
}

/* Copy/move a file or directory to a new location
 * IN:
 * NSArray* arguments
 *	0 - NSString* URL of entry to copy
 *  1 - NSString* URL of the directory into which to copy/move the entry
 *  2 - Optionally, the new name of the entry, defaults to the current name
 *	BOOL - bCopy YES if copy, NO if move
 */
- (void)doCopyMove:(CDVInvokedUrlCommand*)command isCopy:(BOOL)bCopy
{
    NSArray* arguments = command.arguments;

    // arguments
    NSString* srcURLstr = [arguments objectAtIndex:0];
    NSString* destURLstr = [arguments objectAtIndex:1];

    CDVPluginResult *result;

    if (!srcURLstr || !destURLstr) {
        // either no source or no destination provided
        result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NOT_FOUND_ERR];
        [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
        return;
    }

    CDVFilesystemURL* srcURL = [CDVFilesystemURL fileSystemURLWithString:srcURLstr];
    CDVFilesystemURL* destURL = [CDVFilesystemURL fileSystemURLWithString:destURLstr];

    NSObject<CDVFileSystem> *srcFs = [self filesystemForURL:srcURL];
    NSObject<CDVFileSystem> *destFs = [self filesystemForURL:destURL];

    // optional argument; use last component from srcFullPath if new name not provided
    NSString* newName = ([arguments count] > 2) ? [arguments objectAtIndex:2] : [srcURL.url lastPathComponent];
    if ([newName rangeOfString:@":"].location != NSNotFound) {
        // invalid chars in new name
        result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:ENCODING_ERR];
        [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
        return;
    }

    [destFs copyFileToURL:destURL withName:newName fromFileSystem:srcFs atURL:srcURL copy:bCopy callback:^(CDVPluginResult* result) {
        [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
    }];

}

- (void)getFileMetadata:(CDVInvokedUrlCommand*)command
{
    // arguments
    NSString* localURIstr = [command.arguments objectAtIndex:0];
    CDVFilesystemURL* localURI = [CDVFilesystemURL fileSystemURLWithString:localURIstr];
    NSObject<CDVFileSystem> *fs = [self filesystemForURL:localURI];

    [fs getFileMetadataForURL:localURI callback:^(CDVPluginResult* result) {
        [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
    }];
}

- (void)readEntries:(CDVInvokedUrlCommand*)command
{
    CDVFilesystemURL* localURI = [CDVFilesystemURL fileSystemURLWithString:[command.arguments objectAtIndex:0]];
    NSObject<CDVFileSystem> *fs = [self filesystemForURL:localURI];
    CDVPluginResult *result = [fs readEntriesAtURL:localURI];

    [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
}

/* read and return file data
 * IN:
 * NSArray* arguments
 *	0 - NSString* fullPath
 *	1 - NSString* encoding
 *	2 - NSString* start
 *	3 - NSString* end
 */
- (void)readAsText:(CDVInvokedUrlCommand*)command
{
    // arguments
    CDVFilesystemURL* localURI = [CDVFilesystemURL fileSystemURLWithString:[command argumentAtIndex:0]];
    NSString* encoding = [command argumentAtIndex:1];
    NSInteger start = [[command argumentAtIndex:2] integerValue];
    NSInteger end = [[command argumentAtIndex:3] integerValue];

    NSObject<CDVFileSystem> *fs = [self filesystemForURL:localURI];

    // TODO: implement
    if ([@"UTF-8" caseInsensitiveCompare : encoding] != NSOrderedSame) {
        NSLog(@"Only UTF-8 encodings are currently supported by readAsText");
        CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:ENCODING_ERR];
        [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
        return;
    }

    [self.commandDelegate runInBackground:^ {
        [fs readFileAtURL:localURI start:start end:end callback:^(NSData* data, NSString* mimeType, CDVFileError errorCode) {
            CDVPluginResult* result = nil;
            if (data != nil) {
                NSString* str = [[NSString alloc] initWithBytesNoCopy:(void*)[data bytes] length:[data length] encoding:NSUTF8StringEncoding freeWhenDone:NO];
                // Check that UTF8 conversion did not fail.
                if (str != nil) {
                    result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:str];
                    result.associatedObject = data;
                } else {
                    errorCode = ENCODING_ERR;
                }
            }
            if (result == nil) {
                result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:errorCode];
            }

            [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
        }];
    }];
}

/* Read content of text file and return as base64 encoded data url.
 * IN:
 * NSArray* arguments
 *	0 - NSString* fullPath
 *	1 - NSString* start
 *	2 - NSString* end
 *
 * Determines the mime type from the file extension, returns ENCODING_ERR if mimetype can not be determined.
 */

- (void)readAsDataURL:(CDVInvokedUrlCommand*)command
{
    CDVFilesystemURL* localURI = [CDVFilesystemURL fileSystemURLWithString:[command argumentAtIndex:0]];
    NSInteger start = [[command argumentAtIndex:1] integerValue];
    NSInteger end = [[command argumentAtIndex:2] integerValue];

    NSObject<CDVFileSystem> *fs = [self filesystemForURL:localURI];

    [self.commandDelegate runInBackground:^ {
        [fs readFileAtURL:localURI start:start end:end callback:^(NSData* data, NSString* mimeType, CDVFileError errorCode) {
            CDVPluginResult* result = nil;
            if (data != nil) {
                // TODO: Would be faster to base64 encode directly to the final string.
                NSString* output = [NSString stringWithFormat:@"data:%@;base64,%@", mimeType, [data base64EncodedString]];
                result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:output];
            } else {
                result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:errorCode];
            }

            [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
        }];
    }];
}

/* Read content of text file and return as an arraybuffer
 * IN:
 * NSArray* arguments
 *	0 - NSString* fullPath
 *	1 - NSString* start
 *	2 - NSString* end
 */

- (void)readAsArrayBuffer:(CDVInvokedUrlCommand*)command
{
    CDVFilesystemURL* localURI = [CDVFilesystemURL fileSystemURLWithString:[command argumentAtIndex:0]];
    NSInteger start = [[command argumentAtIndex:1] integerValue];
    NSInteger end = [[command argumentAtIndex:2] integerValue];

    NSObject<CDVFileSystem> *fs = [self filesystemForURL:localURI];

    [self.commandDelegate runInBackground:^ {
        [fs readFileAtURL:localURI start:start end:end callback:^(NSData* data, NSString* mimeType, CDVFileError errorCode) {
            CDVPluginResult* result = nil;
            if (data != nil) {
                result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArrayBuffer:data];
            } else {
                result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:errorCode];
            }

            [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
        }];
    }];
}

- (void)readAsBinaryString:(CDVInvokedUrlCommand*)command
{
    CDVFilesystemURL* localURI = [CDVFilesystemURL fileSystemURLWithString:[command argumentAtIndex:0]];
    NSInteger start = [[command argumentAtIndex:1] integerValue];
    NSInteger end = [[command argumentAtIndex:2] integerValue];

    NSObject<CDVFileSystem> *fs = [self filesystemForURL:localURI];

    [self.commandDelegate runInBackground:^ {
        [fs readFileAtURL:localURI start:start end:end callback:^(NSData* data, NSString* mimeType, CDVFileError errorCode) {
            CDVPluginResult* result = nil;
            if (data != nil) {
                NSString* payload = [[NSString alloc] initWithBytesNoCopy:(void*)[data bytes] length:[data length] encoding:NSASCIIStringEncoding freeWhenDone:NO];
                result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:payload];
                result.associatedObject = data;
            } else {
                result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:errorCode];
            }

            [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
        }];
    }];
}

- (void)truncate:(CDVInvokedUrlCommand*)command
{
    // arguments
    CDVFilesystemURL* localURI = [CDVFilesystemURL fileSystemURLWithString:[command argumentAtIndex:0]];
    unsigned long long pos = (unsigned long long)[[command.arguments objectAtIndex:1] longLongValue];

    NSObject<CDVFileSystem> *fs = [self filesystemForURL:localURI];
    CDVPluginResult *result = [fs truncateFileAtURL:localURI atPosition:pos];

    [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
}

/* write
 * IN:
 * NSArray* arguments
 *  0 - NSString* localURI of file to write to
 *  1 - NSString* or NSData* data to write
 *  2 - NSNumber* position to begin writing
 */
- (void)write:(CDVInvokedUrlCommand*)command
{
    NSString* callbackId = command.callbackId;
    NSArray* arguments = command.arguments;

    // arguments
    NSString* localURIstr = [arguments objectAtIndex:0];
    CDVFilesystemURL* localURI = [CDVFilesystemURL fileSystemURLWithString:localURIstr];
    id argData = [arguments objectAtIndex:1];
    unsigned long long pos = (unsigned long long)[[arguments objectAtIndex:2] longLongValue];

    NSObject<CDVFileSystem> *fs = [self filesystemForURL:localURI];

    [fs truncateFileAtURL:localURI atPosition:pos];
    CDVPluginResult *result;
    if ([argData isKindOfClass:[NSString class]]) {
        NSData *encData = [argData dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES];
        result = [fs writeToFileAtURL:localURI withData:encData append:YES];
    } else if ([argData isKindOfClass:[NSData class]]) {
        result = [fs writeToFileAtURL:localURI withData:argData append:YES];
    } else {
        result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"Invalid parameter type"];
    }
    [self.commandDelegate sendPluginResult:result callbackId:callbackId];

}

#pragma mark Undocumented Filesystem API

- (void)testFileExists:(CDVInvokedUrlCommand*)command
{
    // arguments
    NSString* argPath = [command.arguments objectAtIndex:0];

    // Get the file manager
    NSFileManager* fMgr = [NSFileManager defaultManager];
    NSString* appFile = argPath; // [ self getFullPath: argPath];

    BOOL bExists = [fMgr fileExistsAtPath:appFile];
    CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:(bExists ? 1 : 0)];

    [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
}

- (void)testDirectoryExists:(CDVInvokedUrlCommand*)command
{
    // arguments
    NSString* argPath = [command.arguments objectAtIndex:0];

    // Get the file manager
    NSFileManager* fMgr = [[NSFileManager alloc] init];
    NSString* appFile = argPath; // [self getFullPath: argPath];
    BOOL bIsDir = NO;
    BOOL bExists = [fMgr fileExistsAtPath:appFile isDirectory:&bIsDir];

    CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:((bExists && bIsDir) ? 1 : 0)];

    [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
}

// Returns number of bytes available via callback
- (void)getFreeDiskSpace:(CDVInvokedUrlCommand*)command
{
    // no arguments

    NSNumber* pNumAvail = [self checkFreeDiskSpace:self.appDocsPath];

    NSString* strFreeSpace = [NSString stringWithFormat:@"%qu", [pNumAvail unsignedLongLongValue]];
    // NSLog(@"Free space is %@", strFreeSpace );

    CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:strFreeSpace];

    [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
}

#pragma mark Compatibility with older File API

- (NSString*)getMimeTypeFromPath:(NSString*)fullPath
{
    return [CDVLocalFilesystem getMimeTypeFromPath:fullPath];
}

- (NSDictionary *)getDirectoryEntry:(NSString *)localPath isDirectory:(BOOL)bDirRequest
{
    CDVFilesystemURL *localURL = [self fileSystemURLforLocalPath:localPath];
    return [self makeEntryForPath:localURL.fullPath fileSystemName:localURL.fileSystemName isDirectory:bDirRequest];
}

#pragma mark Internal methods for testing
// Internal methods for testing: Get the on-disk location of a local filesystem url.
// [Currently used for testing file-transfer]
- (NSString *)_filesystemPathForURL:(CDVFilesystemURL *)localURL
{
    for (NSObject<CDVFileSystem> *fs in self.fileSystems) {
        if ([fs.name isEqualToString:localURL.fileSystemName]) {
            if ([fs respondsToSelector:@selector(filesystemPathForURL:)]) {
                return [fs filesystemPathForURL:localURL];
            }
        }
    }
    return nil;
}

- (void)_getLocalFilesystemPath:(CDVInvokedUrlCommand*)command
{
    NSString* localURLstr = [command.arguments objectAtIndex:0];
    CDVFilesystemURL* localURL = [CDVFilesystemURL fileSystemURLWithString:localURLstr];

    NSString* fsPath = [self _filesystemPathForURL:localURL];
    CDVPluginResult* result;
    if (fsPath) {
        result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:fsPath];
    } else {
        result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"Cannot resolve URL to a file"];
    }
    [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
}

@end

redpajama_set_name: RedPajamaGithub


This study scrutinizes the trajectory of an international development communication intervention aimed at mediating, rendering public and mobilizing processes of reconnection among estranged citizens across the former Yugoslavia. The intervention, which took place between 2000 and 2005 in the wider context of post-conflict international development assistance and peacebuilding operations in the region, was known as the Videoletters project. Centered on a documentary TV series aimed at promoting the reestablishment of relationships among ordinary people affected by ethno-political divisions, Videoletters was adopted by European bilateral funders for large-scale implementation and categorized as a "tool for reconciliation".
Starting from an understanding of communication as a right to which citizens are entitled, as a responsibility of practitioners and institutions, and as a capability that is socially distributed in unequal ways and has an ambiguous potential, the study looks into the contextualized potential and limitations of international development communication intervention to attend to the citizens that it is supposed to benefit. By providing rich empirical details about a process of intervention, the study argues in concrete terms for the study of development communication not as a presumably positive tool, but as an institutionally driven practice that may or may not strengthen conditions of justice, with consequences that will differ depending on the specificity of sociopolitical situations in time and space. Depending on contextual and institutional conditions and on the forms of mediation privileged/disregarded throughout the process, the deployment of a specific development communication intervention may/may not foster proper distance, and thus strengthen/weaken conditions of justice for the citizens under consideration, who are subject to the governance structure of international development assistance.
By linking the practice of international development communication to a framework of justice, the study brings the political and ethical dimensions of said practice to the fore and contributes to a critical agenda for theorization and research that takes accountability into consideration and puts citizens at the center.
Enghel, F. (2014). Video letters, mediation and (proper) distance: A qualitative study of international development communication in practice. Diss. Karlstad: Karlstad University.


Have you ever forced-down breakfast at 6am when you weren't even hungry?
Did you do it because "You needed it to fuel your day"?
Or because you know you'll be hungry later?
The irony of these reasons is that doing so makes you even hungrier… and sets you up for a sluggish afternoon.
Making cereal number #4 source of added sugar in US diets – behind soft drinks, desserts, and candy.
Thanks to decades worth of successful PR… industry sponsored 'studies', strategic astroturfing, paid-for doctors and manipulative child psychology; we have embraced the 'importance of breakfast' as a common 'fact'.
Paid-for doctors and dietitians are hosted on morning shows telling us that skipping breakfast "will slow our metabolism – causing our body to hold onto fat".
Or; "If you skip breakfast, your body goes into 'starvation mode' and 'holds onto the fat' rather than burning it".
Other 'experts' spread these false truths without verifying the facts for themselves – such as celebrity chefs endorsing a new breakfast recipe with phrases like "start your day the healthy way".
Cereal companies then hedge their bets by branding their boxes to children with fun characters that offer a bribe of some kind like a collectable card or a small toy. Then carefully placing their ads in between morning cartoon shows.
Our belief in the importance of breakfast is so deeply rooted… that to question its validity would be blasphemous.
But when you look past the 'research' that has been sponsored by the industry that promotes breakfast… the you'll find that their results are either 'cherry picked' or outright false.
Because your body goes without food from last evenings dinner to the next day; this 12 – 14 hour period is called a 'fast'. So when you eat the following morning you're 'breaking your fast' – breakfast.
Studies reveal that stalling breakfast for as long as you can (intermittent fasting) has immense health benefits. A typical intermittent fast can last up until lunchtime. This gives your body up to 18 hours (or more) to detox and regenerate.
The benefits of fasting and intermittent fasting are extensive.
Inflammation is the root cause of a vast array of illnesses. Among others; If the name of the disease has 'itis' on the end of it such as; arthritis, bronchitis, sinusitus, tonsilitis etc – it means it is an inflammatory disease.
Fasting relieves inflammation… which means all these 'itis' diseases can be easily treatable.
Is your body on the verge of 'crashing'?
Think of unhealthy living in the same way your computer performs when it has been abused (too many tabs open, hasn't been shut down in weeks, downloads from pirate websites).
Fasting lets your body 'refresh', 'reboot' and 'update' and 'scan for viruses'… giving your body the time an energy it needs to do tasks it was unable to perform when it was overloaded.
The longer you give your body to refresh, reboot and update (fast); the better it will perform.
The point of this example is to illustrate the difference between eating less and actual fasting. Your computer can only refresh, reboot and update properly when you're not burdening it with tasks (eating).
Meditation becomes easier – According to yogi master Swami Satyananda Saraswati: "Fasting reduces the tamasic element in the body. Tamas is the greatest obstacle to meditation. While fasting, we shed extra weight from the body and gain strength and clarity of mind. This is important. We cannot progress in meditation with a fat body and a weak mind".
Fasting is widely used in Traditional Chinese Medicine – The purpose of fasting in Chinese medicine is to address stagnation, as stagnation prevents energy and blood circulating in the body. It mainly starts from food. According to TCM theory; illness occurs because the body is out of balance.
What sets Eastern fasting practice apart from Western fasting is that it's always practised with some form of meditation combined with breathing exercises.
Water, Black coffee, Unsweetened tea.
Some health professionals recommend 'juice fasts' or 'fat fasts' or 'cabbage soup fasts'. But unless explicitly told to do so by your doctor; a successful fast consists of limiting yourself from consuming anything that triggers a metabolic response.
Fasting isn't for everyone. Some people wake up 'starving'. And no matter how hard they try; they crave an early breakfast. That's fine.
But some of us think they cant live without breakfast – but become accustom to it with a little practice.
Despite the benefits; fasting can be dangerous for certain medical conditions.
It is not recommended for people already suffering from malnutrition, diabetes, and chronic ailments like cardiac arrhythmia, advanced stages of cancer, or gout. If you suffer from these ailments; seek medical advice first.
Fasting is not advised for pregnant women.
Unless fasting has been otherwise prescribed by a doctor; children and teens shouldn't fast. Growing bodies need the extra nutrition and energy intake.
Feast and famine is the eating pattern that our ancestors lived-by… Unlike the 24/7 non-stop eating habits westerners are guilty of today.
Our bodies are designed to have extended periods without eating. Nature intended to use that time to burn excess fat and detoxify.
Its easier than you think to adapt to cutting out a morning meal.
Begin with stalling breakfast as long as you can until you get used to eating your first meal of the day at lunch.
Before you know it; you'll be saving yourself from 30 meals a month and feeling healthier and younger than you ever dreamed.
<< "THE SCIENCE OF YOGA"


text:
Google Maps Update Includes Real-time Data from EV Charging Stations
Michael Cheng Apr 27, 2019 11:30 AM WST
Author: Michael Cheng
A timely update to the Google Maps app now helps individuals find EV charging stations. Rolled out to people residing in the US and the UK, real-time data about the status of charging hubs is presented during live searches.
The new feature makes charging EVs easier in busy cities and reduces range anxiety for individuals taking long road trips. Moreover, the ability to search for EV charging stations and view their real-time status is available on both smartphones and desktop computers.
Real-time Charging Data
The scope of Google Map's EV charging location services include numerous networks, such as Chargemaster, EVgo and SemaConnect. According to an announcement, coverage for locations of Chargepoint stations is on the way. Live searches for EV charging hubs include types of ports and charging speeds.
Real-time data is where the app really shines. With occupancy information, people can use the app to avoid crowded charging areas during peak hours. As the previous version of the feature catered to Chargefox stations in Australia and New Zealand, Google may also expand real-time information to other regions in the future.
At the moment, real-time information is not displayed for Tesla Superchargers. However, users can still search for the location of the EV charging hubs via the app.
"If you've ever driven to an electric vehicle (EV) charging station only to find that all ports are occupied, you know that you could end up waiting in line for anywhere between minutes to hours—which can really put a damper on your day when you have places to go and things to do," explained Alex Donaldson, Product Manager at Google.
Google started rolling out EV charging locations on its app in 2018. Initially, individuals were limited to a handful of general data. Depending on the selected area, the app showcased a charging station's pricing, wattage and reviews from users (no real-time information).
Searching for EV Stations on Google Maps
To search for EV charging hubs on Google Maps, individuals must first download the application, which is available on several platforms: Android, iOS, Android Auto and desktop. After downloading the app, users simply search for the phrase "EV charging stations" on the map. Tapping on a station displays its specific location, directions to the hub and contact information.
From this page, users can call the service company, save it or share the details of the charging station to people. On selected hubs, individuals are also presented pictures of the charging point and its surrounding landmarks.
"To help you make a quick decision about which station to use, we'll show you information about the business where the station is located, the types of ports available, charging speeds, and how many ports there are," said the company in a blog post.
Lastly, as new EV hubs are being installed on a regular basis, not all nearby stations may appear on the map during live searches. Frequently utilized charging units have a higher chance of showing up, compared to new EV stations. Additionally, new EV charging points may not come with complete specifications.
Michael Cheng
Michael Cheng is a legal editor and technical writer with publications for Blackberry ISHN Magazine Houzz and Payment Week. He specializes in technology business and digesting hard data. Outside of work Michael likes to train for marathons spend time with his daughter and explore new places.
Waymo Receives Permit to Participate in California's Autonomous Vehicle Pilot
How Do Autonomous Cars Deal with Double-parked Vehicles?
Kitty Hawk and Boeing Form Partnership to Make Flying Cars Safer
Waymo to Bring Driverless Cars to France and Japan via Nissan-Renault Partnership
Porsche Forecasts EVs Going Mainstream
Zomato Tests Drones for Food Deliveries in India
Alibaba Brings Tmall Genie to Audi, Honda and Renault Vehicles
Driverless Sensor Startup Sense Photonics Raises $26 Million in Series A Funding
Prev:Hyundai's Upcoming App Allows EV Owners to Adjust Their Car's Performance Next:Velodyne & Nikon Announce Manufacturing Deal to Mass Produce Lidar Sensors for Self-Driving Cars