Monthly Archiv: April, 2019

PSR-14: Example – Access voting

PSR-14: Example - Access voting

So far in our 5 part series we've dug into the details of Events, Dispatchers, and Providers. An awful lot of flexibility can be had from just three simple methods. But how does it work out in practice?

In today's installment I want to start showing examples of real-world (ish) use cases that can benefit from this design. For these examples I will be using Tukio, my stand-alone PSR-14 implementation, but all will work just as well with any PSR-14 implementation, by design.

Voting based access control

A common "extension point" in many systems is access control, especially in a configurable CMS. You want to limit access to various operations, but which users should have access to what operations could vary based on a wide variety of special-case conditions that you want to allow individual site owners to control.

Larry 11 April 2019 - 5:31pm

How Garcinia Cambogia Can Help You Lose Weight and Belly Fat

There are two main ways that garcinia cambogia is thought to aid weight loss.

1. May Reduce Your Appetite

Studies in rats show that those given garcinia cambogia supplements tend to eat less (17, 18).

Similarly, some human studies have found that garcinia cambogia suppresses appetite and makes you feel full (, , 14, , ).

Its mechanism isn’t fully known, but rat studies suggest that the active ingredient in garcinia cambogia can increase serotonin in the brain (, ).

Since serotonin is a known appetite suppressant, higher blood levels of serotonin could reduce your appetite ().

However, these results need to be taken with a grain of salt. Other studies have observed no difference in appetite between those taking this supplement and those taking a placebo (10, , 12, ).

These effects may depend on each individual.

2. May Block Fat Production and Reduce Belly Fat

Most importantly, garcinia cambogia impacts blood fats and the production of new fatty acids.

Human and animal studies show that it may lower high levels of fat in your blood and reduce oxidative stress in your body (, , 26, , ).

One study also suggests it may be especially effective at reducing the accumulation of belly fat in people who are overweight ().

In one study, moderately obese people took 2,800 mg of garcinia cambogia daily for eight weeks and drastically improved several risk factors for disease (14):

  • Total cholesterol levels: 6.3% lower
  • “Bad” LDL cholesterol levels: 12.3% lower
  • “Good” HDL cholesterol levels: 10.7% higher
  • Blood triglycerides: 8.6% lower
  • Fat metabolites: 125–258% more excreted in the urine

The main reason for these effects may be that garcinia cambogia inhibits an enzyme called citrate lyase, which plays an important role in the production of fat (, 29, , , 32).

By inhibiting citrate lyase, garcinia cambogia is thought to slow or block fat production in your body. This may reduce blood fats and lower your risk of weight gain — two major disease risk factors ().

Summary Garcinia cambogia may suppress appetite. It also blocks the production of new fats in your body and has been shown to lower cholesterol levels and blood triglycerides in overweight people.

Article source: https://www.healthline.com/nutrition/garcinia-cambogia-weight-loss

Site News: Blast from the Past – One Year Ago in PHP (04.11.2019)

Here's what was popular in the PHP community one year ago today:

Forge Your Own (Animation) Path with These Snippets

In some ways, it seems like we’re in the golden age of animation on the web. Mainly because there are so many options for implementing it into our projects.

Certainly, you can leverage some high-powered JavaScript libraries to create something other-worldly. But you can also use the effects already built into CSS3 to add movement to your website. Either way, the end user doesn’t necessarily need any fancy hardware or browser plugins to view your creation.

That brings us to today’s subject of animation paths. Through the use of a path, we can achieve a number of exciting effects. We can tell a story, neatly organize a layout or simply add some creative flair to our designs.

Let’s explore some of the unique ways in which developers are using paths to do more with web animation.

Sign Your Name

The idea of adding an animated signature to something isn’t new – we’ve seen it in television and movies for years. Yet, as we see in this example, it still adds a touch of class. SVG is combined with JavaScript in order to create a very smooth and sharp effect.

Rainbows (with No Unicorns)

Perhaps the best thing about this rainbow-themed heart animation is that it demonstrates how incredibly unique an animation can be. It takes this heart-shaped path (cool enough on its own) and pairs it with a gradient effect that kicks things up to a whole other level. As for the unicorns, well, we’ll be satisfied without them – this time.

Shattered Dreams

It’s easy to think of animation as a means to put something together. But we can also use it to break stuff! For example, this snippet uses GSAP to add a “shattering” effect to text. Even better, hovering over the text allows things to break in super-slow motion.

Slide Along My Path

Sliders aren’t exactly exciting these days. We’ve pretty much seen all they are capable of – or have we? Well, here’s something different. This slider lays out several image thumbnails along a wavy path. Click a thumbnail, it moves to the center of the path and displays a full-sized image in the background.

Is That Menu Following Me?

Quite often, a path is something that is generated by a designer to control an animation. Here, the user is put in control. As you move your mouse cursor up and down, a “hamburger” menu follows along the left sidebar. This just goes to show that paths can be used for function as well as form.

Draw Your Own Treasure Map

Dashed lines make for simple, easy-to-understand animation. And this demonstration of the GSAP DrawSVG plugin offers a look at how to implement some of the more common uses for this technique. Yet, it also can serve as a springboard for doing even more.

Skull Candy

This skull animation may be about as beautiful and intricate as you can get. The high-level detail of the SVG image, along with the timing and precision of the animation combine for a mesmerizing effect. Thankfully, you can watch as many times as you like by clicking the included “DRAW AGAIN” button.

The Dark Side of The Animation

This full-screen prismatic effect could make for a wonderful background (but only if Pink Floyd doesn’t mind). It uses Lengthy, which makes it easier to create SVG-based animations that use CSS variables. The combination of different line drawing techniques is used to create the far-out light show. Shine on, you crazy diamond.

Which Path Will You Choose?

By themselves, animation paths may not be all that amazing. What they provide, however, is a way to bring a little order to the chaos (or the opposite, if you so desire) of movement on your site.

The snippets in this collection are really just the tip of the iceberg in terms of capabilities. As a designer, you have the power to forge your own unique animation path. Where will it lead?

The post Forge Your Own (Animation) Path with These Snippets appeared first on Speckyboy Web Design Magazine.

PHP Internals News: Episode 5: Comprehensions

Study: Risky Stimulants Still in Many Supplements

By Alan Mozes

HealthDay Reporter

MONDAY, Oct. 22, 2018 (HealthDay News) — The U.S. Drug and Food Administration has repeatedly warned manufacturers that many dietary supplements contain dangerous, experimental stimulants. But according to a new report, 75 percent of supplements tested still contain the compounds.

“Consumers turn to supplements for safe, natural ways to increase energy, improve workouts or lose weight,” said study author Dr. Pieter Cohen, an associate professor with Harvard Medical School. “[But] what most consumers don’t know is that supplements can be sold as if they give you energy, help you lose weight or just about anything, as long as the supplement does not claim to cure or treat disease.”

His team’s findings centered on four unapproved stimulants: DMAA, DMBA, BMPEA and oxilofrine.

The four have become replacements for the stimulant ephedra, which the FDA banned from supplements in 2004 following reports that it raised the risk for heart attack, stroke and death.

Between 2013 and 2016, the FDA found that 12 different supplement brands contained one or more of the four unapproved stimulants. But despite public notice warnings from the agency, three-quarters of the supplements still contained at least one prohibited stimulant in 2017. And half contained two or more.

The finding raises fresh concerns about supplement safety, and comes on the heels of another troubling analysis published just last week by the California Department of Public Health’s Food and Drug Branch.

That investigation revealed that the FDA had issued more than 700 warnings over the last decade about potentially hazardous ingredients found in supplements promoted as sexual, weight-loss and muscle growth aids.

But because the FDA classifies dietary supplements as a food — rather than as drugs — supplement manufacturers do not have to prove a supplement is safe or effective before selling it to the public.

If, however, the FDA ultimately determines that a supplement already on the market is potentially hazardous, it can recall the product or issue a “public notice” concerning problematic ingredients.

In a letter published online Oct. 22 in the journal JAMA Internal Medicine, Cohen and his colleagues point to an earlier study that suggests that FDA recalls, for one, are largely ineffective.

Continued

The latest investigation focused on the effectiveness of public notice warnings, and found equally poor results.

“The FDA seems to imagine that if they simply request that firms remove an experimental stimulant from commerce, the stimulant will be removed,” Cohen said. “Clearly this is wishful thinking on the part of the FDA.”

Cohen noted that he and his associates conducted two analyses of 12 supplements previously issued public notices for unapproved ingredients.

The first analysis took place in 2014. At that time, all 12 supplements contained at least one of the four prohibited stimulants.

The second analysis took place in 2017. At that point, nine of the 12 brands contained at least one prohibited supplement and six contained two.

The team also pointed out that although DMBA had not been found in any of the 12 supplements in 2014, it was found in a third of the supplements in 2017, two years after the FDA issued a public notice raising concern about the ingredient.

“Until the law is reformed and the FDA aggressively enforces the law, these potentially dangerous ingredients will likely remain in supplements,” said Cohen.

Dr. Mitchell Katz is president and CEO of NYC Health and Hospitals in New York City, and author of an accompanying editorial. He suggested that the upshot is that the FDA is hamstrung in what it can do.

“The FDA is not allowed by federal law to investigate a product before it is marketed,” Katz noted. “Therefore, all that the FDA can do under current law is respond to complaints and issue guidelines of what can and cannot be in supplements.”

The bottom line, said Katz, is that “people should know that the supplements they are taking are not tested [and] may contain substances that are not on the label.”

Sources

SOURCES: Pieter Cohen, M.D., general internist, Cambridge Health Alliance, and associate professor, Harvard Medical School, Boston; Mitchell Katz, M.D., president and CEO, NYC Health and Hospitals, New York City; Oct. 22, 2018,JAMA Internal Medicine, online


Copyright © 2013-2018 HealthDay. All rights reserved.

‘);
} else {
// If we match both our test Topic Ids and Buisness Ref we want to place the ad in the middle of page 1
if($.inArray(window.s_topic, moveAdTopicIds) -1 $.inArray(window.s_business_reference, moveAdBuisRef) -1){
// The logic below reads count all nodes in page 1. Exclude the footer,ol,ul and table elements. Use the varible
// moveAdAfter to know which node to place the Ad container after.
window.placeAd = function(pn) {
var nodeTags = [‘p’, ‘h3′,’aside’, ‘ul’],
nodes,
target;

nodes = $(‘.article-page:nth-child(‘ + pn + ‘)’).find(nodeTags.join()).not(‘p:empty’).not(‘footer *’).not(‘ol *, ul *, table *’);

//target = nodes.eq(Math.floor(nodes.length / 2));
target = nodes.eq(moveAdAfter);

$(”).insertAfter(target);
}
// Currently passing in 1 to move the Ad in to page 1
window.placeAd(1);
} else {
// This is the default location on the bottom of page 1
$(‘.article-page:nth-child(1)’).append(”);
}
}
})();
$(function(){
// Create a new conatiner where we will make our lazy load Ad call if the reach the footer section of the article
$(‘.main-container-3’).prepend(”);
});

Pagination

Laravel News: Laravel Search String

                            Laravel Search String is a package by Loris Leiva that generates database queries based on one unique string using a simple and customizable syntax. 

            Visit Laravel News for the full post. 
            The post Laravel Search String appeared fir...
Powered by Gewgley