Hopefully today's post caught your attention! I have a super helpful list for you today, and I can't wait to share it with you. While we obviously cannot actually get younger, we can practice things that will help us look better, feel more energetic, and experience more happiness. Hopefully this list will get your creative juices flowing, and you can even add to it. While you probably can't incorporate every single one of these every day, you can hopefully begin incorporating some into your weekly schedule.
So, how can we look better, get more energy, and turn back the clock?
Getting deep, quality sleep is one of the best things we can do for our health. Sleep is our body's time to renew and heal itself from the day's activities. Even our skin is regenerating itself while we sleep (hence the phrase "beauty sleep"). Need help falling asleep or staying asleep? Check out this super helpful list!
Green tea is loaded with antioxidants and polyphenols, both of which have been studied for their anti-aging properties. Studies have shown it to be helpful in combating skin issues such as acne. The benefits come from drinking it and using it topically. Green tea's benefits don't stop there. Check out this post to see what other amazing health benefits this beverage affords.
You knew this had to be on the list, right? Exercise is the one of the best things you can do to maintain your youthful vitality! It helps you feel better, look better, have more energy, combat disease, maintain a happy mood, and have a better overall quality of life. Studies show that if you can implement this one habit (they call it a "keystone habit"), it will help you be more disciplined and productive in other areas of your life. So make it a habit by getting in 4 to 5 sweat sessions a week!
High quality, food-based vitamins and minerals are a wonderful addition to any healthy eating plan. These supplements help to fill in any nutritional gaps that we may have in our diet. They also provide a wide array of nourishing and energizing nutrients from which we can really benefit. Check out this post to find out some of my favorites!
Excessive amounts of processed sugar can be extremely detrimental to our health. It causes our blood sugar to spike as well as inflammation in our entire body. It has been linked to heart disease, cancer, diabetes, and a host of other health issues. Eliminating processed sugar and replacing it with small amounts of healthier alternatives can do wonders for your weight, skin, energy, and overall health. Look for healthy sweeteners such as raw honey, coconut palm sugar, or stevia.
A hot bath is a wonderful way to relax after a long, hard day. Epsom salts are full of magnesium, which is known as the de-stressing mineral. Epsom salts are also a great way to detox the body. Adding lavender essential oil will help to soften the skin, soothe the mind, and get your body ready for deep, rejuvenating sleep. Click here for my favorite bath salts recipe!
Facial masks are a great addition to any skincare regimen and keeping your skin looking young. Figure out your skin type, find a non-toxic facial mask that fits your type, and use at least twice a week. You'll begin to notice a more even skin tone, as well as a nice, healthy glow! Here is one of my favorites that really helps to clear my skin and make it glow! For more ideas on skin health, check out this post. And for my favorite skincare routine and brand I use, click here.
Drinking plenty of purified water throughout the day helps with every system in our body. It just makes our bodies run more efficiently. You'll experience more energy, better elimination, and clearer skin. If plain water sounds too boring, then check out this post on 15 healthy beverages that will keep you hydrated and glowing.
Speaking of water, try adding lemon to room temperature water in the morning. This helps to wake up the liver, get bile flowing, and get your digestive system revved up to do its job. You can take it a step further and add a pinch of cayenne pepper, which will boost your metabolism to help you burn more fat. You can also try adding lemon essential oil for its cleansing power!
While aerobic and strength training are typically the foundations of most exercise programs, it's important not to forget stretching. Flexible muscles and joints keep us limber and help to protect us from injuries. So make sure to stretch before and after your workouts. It's also a good idea to have days where you focus on nothing but stretching, as in yoga. Your body will thank you for it 🙂 If you're looking for LOTS of FREE yoga videos, then you should definitely check out Yoga with Adriene!
Getting more green into your diet is a fast and easy way to feel better and look younger. Smoothies are a great way to throw spinach, collards, kale or swiss chard in with other fruits, veggies, and liquids. Because you're throwing in the full fruit and vegetable, you're getting all that great fiber, which will keep you fuller for longer. Green juice does not contain the fiber, so it's a great way to get all the nutrients from the fruits and veggies directly into your cells for a quick boost of energy. You can't go wrong with a green smoothie or a green juice! To learn more about green smoothies, check out this super helpful post.
There are a lot of supplements marketed today for younger looking skin. I have tried a few of them with okay results. It wasn't until I tried collagen powder that I saw a huge difference! Collagen is essential for healthy skin, hair, and nails. Unfortunately, as we age, our collagen production declines. That's why a supplement can work wonders for turning back the clock. This is my favorite brand. You can add it to smoothies, juices, or yogurt, and never know it's there!
We all know it's important to get more fruits and veggies into our diet. One of the easiest ways (next to the green smoothies and juices) is to eat one salad every day. Sometimes that's easier said than done. Enter the Mason jar salad. You can make almost a week's worth of salads in a Mason jar, with everything ready to go. All you have to do is pull it out and eat it for lunch or dinner. With a little prep work on the front end, you can enjoy healthy, delicious salads. Getting all those greens and veggies will go a long way to helping you look and feel your best. For a full tutorial on Mason jar salads, check out this post.
Protein is an essential macronutrient which we all need for building muscle and maintaining energy. And breakfast is the perfect time to concentrate on protein. After a night of fasting and repair, your body needs protein to help stabilize blood sugar and get energy to our cells. This is a great time to drink your green smoothie. Or try gluten-free, protein-packed pancakes, Greek yogurt, veggie omelet, protein bars, My Protein Pudding or my Power Trim Bites.
For some people, grains can create serious health issues. If you suffer from any auto-immune condition, grains can be contributing to inflammation in your body, making you feel worse. Eliminating grains and eating a Paleo diet can bring a lot of relief and help your gut begin to heal. An anti-inflammatory diet is one of the best things you can do to turn back the clock! To learn more, check out one of my favorite health books ever!
Feeding and nourishing our minds is just as important as feeding and nourishing our bodies. One way to do that is by spending time reading something every single day. Even if you have just 15 minutes, spend it reading books on various topics that interest you. You'll be amazed at what you can learn over the course of a year. Commit to being a life-long learner, and you will keep your mind sharp, and it will make you feel young at heart! If you need book recommendations, check out my Reviews Section or follow me on Instagram, where I often post about what I'm currently reading.
Everyone needs encouraging friendships, and it's so important to make those a priority. We were created for relationships, and when we spend time with friends, we can fulfill that need for companionship, encouragement, and communication. Need more ideas on fostering friendships? Check out this post.
Vegetables are a powerhouse of nutrients that can make a big impact on our health. Look for ways to incorporate more vegetables into your daily diet. Try a veggie omelette for breakfast. Have a container ready-to-go in your fridge of carrot and celery sticks, grape tomatoes, and sliced cucumbers. Try roasting a big batch of sweet potatoes, asparagus, zucchini, squash, and brussel sprouts to have on hand for a week of side dishes or salad toppings. Get creative and you'll find you start craving those veggies!
It's been said that laughter is the best medicine. There have been numerous studies done on the impact of laughter on our health. And who doesn't want to laugh more? Laugh with family and friends. Laugh at your favorite funny movie. It releases stress, makes you feel happier, and keeps you young (not to mention it gives you a nice little ab workout 😉 ).
Grateful people are happy people, and happy people look and act much younger than unhappy people. And let's face it, they're much more fun to be around! If you want to stand out in a world of unhappy complainers and whiners, simply smile and be grateful. Need a little help in this area? Check out this post!
Vitamin D is an amazing fat-soluble vitamin that has finally gotten the attention it deserves in recent years. From strengthening the immune system, to regulating hormones, this vitamin could be dubbed the "fountain of youth" vitamin. Much of the population falls short of the daily requirements of this essential nutrient. Are you getting enough? Read this post to find out.
We mentioned above about the importance of relieving stress. One of the best ways to do this is to schedule regular vacation intervals throughout the year. God created us to work and to rest. We can do this during the week by taking a Sabbath rest. And we can get away with our families for extended times of rest as well. Whether you travel to a destination or enjoy a "stay-cation", make sure you are enjoying the healing benefits that come from leaving work aside and relaxing and rejuvenating both body and mind. This will make you feel years younger!
Taking the time to write, call, text, or visit with a friend or loved one is a great way to take your focus off yourself and put it on someone else who needs encouragement. Taking the time to do this will put your problems into perspective and it will help to make someone else's day.
Last but not least, writing down your goals, both short term and long term, is a surefire way to help you live a happy, healthy, and purposeful life. Study after study shows that people who write down their goals and work toward accomplishing them are much happier and more successful in life. And, of course, doing what you love is one of the best ways to turn back the clock. If you want access to a whole library of goal setting sheets, menu planners, calendars, and more, check this out! And to learn more about how to set goals and pursue your passions and priorities, check out this helpful series.
What keeps you feeling young? I'd love to hear about it!


text:
As a way to show our support for active military and our veterans, the Glendale Chamber of Commerce formed a Military & Veterans Affairs Committee. We plan to share our efforts with the community through a monthly communication.
Does your business honor our heroes with specials and discounts for active military
and/or veterans? If so let us know! Email you company name and a discount description Jackie Peyton at info@glendaleazchamber.org
Glendale Area Armed Forces Recruiting Offices
Honor the Glendale Chamber
Certificate of Appreciation presented by the Air Force Recruiting Service
The Air Force Recruiting Service recently honored to Harry Shapiro of the Glendale Chamber with a Certificate of Appreciation in recognition for outstanding support of the new service location at Westgate and dedication to the ideals and principles of the United States of American. The award was presented by Lt. Col. Erin Meinders, Commander of the 362 RCS.
Sgt. Nathan Estrada with the Glendale Chamber Team holding their Certificate
of Appreciation
In September at the Business After Hours held at the Rogue Tomato, the Glendale U.S. Army Recruiting Center presented the chamber staff with a Certificate of Appreciation. The award says "For your continuous support and dedication to the soldiers and families of the Arrowhead Army Recruiting Center. Your commitment and dedication to our organization is greatly appreciated. Your relentless efforts in support of active duty soldiers and veterans in the Glendale area do not go unnoticed. Your outstanding performance reflects great credit upon you, the City of Glendale and the United States Army". It was presented by SFC Nathan N. Estrada, U.S. Army Center Leader.
Frank Luke Chapter of the Air Force Association
Luke Air Force Base is the home of the Frank Luke Chapter of the Air Force Association. It was chartered in 1980. There are more than 150,000 people including active duty military personnel, retirees and civilians worldwide in the association. The local chapter has approximately 2,000 members.
The mission of the non-profit military organization is:
Educate the public about the critical role of aerospace power in defense of our nation.
To advocate aerospace power and a strong national defense.
To support the U.S. Air Force and the Air Force Family.
The Frank Luke Chapter is chaired by Military & Veterans Affairs Committee member Harry Bailey. Ed Logan is also an integral member of the local association and involved with the Military & Veterans Affairs Committee as Vice Chairman.
The Arizona Coyotes are Showing Their Support and You Can Help
Click here to download printable flyer
4th Annual Stand Up for Veterans A Huge Success
The hairstylists from Rolf's volunteered to cut veterans hair. 56 were treated to a professional cut.
Glendale Community College hosted the 4th Annual Stand Up for Veterans event on September 24th. It was a great success. Nearly 600 veterans and their families attended the event. There were over 100 volunteers and businesses assisting at the event to help veterans get jobs, personal and legal advice and even haircuts.
Thirteen veterans were hired on the spot for jobs with others filling out applications. The legal advisers present assisted 231 volunteers with judicial and personal problems. 56 veterans received free haircuts from the stylists at Rolf's. Also 2,000 hot dogs and hamburgers plus 40 pizzas fed the veterans and volunteers.
Click here to view photos from the event
Mayor Jerry Weiers "flipping" burgers and hot dogs on the Republic Services mobile BBQ trailer.
Stand Up for Veterans chairman Ed Besta assisting veterans at check in. Ed is also a member of the Military & Veterans Affairs Committee.
Sandy Weiers, Mayor Weiers and Reed Webber, a volunteer and member of the Military & Veterans Committee assisting a veteran at the event.
36th Annual Luke Shoot Out - SAVE THE DATE
Foursome Bob Cohn, Tom Cook - retired Sgt. U.S. Air Force, Harry Shapiro, and George Thorne - retired Sgt. Maj. of U.S. Army at the 34th Annual Luke Shoot Out
The Annual Luke Shoot Out Golf Tournament is one of the longest continuously run military golf tournaments in the area. It began in 1981 as a relationship building effort between the Glendale Chamber of Commerce and Luke Air Force Base. Chamber members Bill Kelleher, Jim Herman, Ed LeGendre, Wendell DeCross and chamber executive Bob Beckley were the originators of the event. Bill Kelleher is still involved with the Luke Shoot Out today.
Villa de Paz Golf Course in Phoenix was the site of the first four tournaments. The committee decided to increase the value and quality of the golf tournament and moved the event to the Wigwam Resort. It was held there for 15 successful years. Like Air Force Base opened its own golf course in 1998 covering an old landfill on W. Northern Avenue and N. Reems Road just north of the base. Falcon Dunes Golf Course became the home of the Luke Shoot Out in 2000 and it has been at that location ever since.
Today, a portion of the proceeds from the Luke Shoot Out benefit "Operation Warm Heart" at Luke Air Force Base. The Glendale Chamber of Commerce donates part of the proceeds from the tournament to assist those families whose spouses are deployed. This is a great way to say thank you to enlisted personnel who are devoted to serving.
The 36th Annual Luke Shoot Out Golf Tournament will be held Friday, April 7, 2017 at Falcon Dunes Golf Course, 15100 W. Northern Avenue with check in beginning at 6:30am and a shotgun start at 7:30am. Featured at the tournament is a putting contest with a guaranteed cash winner plus Hole in One and Closest to the Pin contests on all par threes. One of the Hole in One prizes is a new 2017 vehicle. There is also a Challenge Hole where you can double your wager if your ball stops inside a large circle on the green. Many raffle items will be available and mulligans through the purchase of raffle tickets at the tournament. For information, early registration, sponsorships, advertising and item donations for the Luke Shoot Out, please call the Glendale Chamber of Commerce at 623-937-4754.
Our Military & Veterans Affairs Committee members work hard to advocate for active and former Military. One way they do this is by holding various community events.
Click here for a list of upcoming events backed by some of our members!
Please contact Chair of the Military & Veterans Affairs Committee,
Sgt. Jeff Turney, through our Chamber liaison, Harry Shapiro, at 623-937-4754
if you would like to learn more or have any suggestions
on where we can be of assistance.
Military & Veterans Affairs Committee Outline

redpajama_set_name: RedPajamaCommonCrawl


In business since 1985, Bob's Flags has been owned by the Baumgart family since 1996. Patriotism runs deep with all of us at Bob's. We enjoy providing you the best and the correct products for your specific needs. Questions abound as we try to make sure you are buying the right size flag for your flagpole. We work tirelessly to source the right products for our customers.


text:
THE AGE OF ILLUSIONS: HOW AMERICA SQUANDERED ITS COLD WAR VICTORY by Andrew Bacevitch
February 7, 2020 szfreiberger	American cultural history, American Diplomatic History, American Political History, American Social History, Cold War, United States Foreign Policy
(The Fall of the Berlin Wall, November, 1989)
Growing up in the 1950s and 60s I enjoyed a sense of security knowing where to focus my fears and angst. The Soviet Union was the enemy and policymakers developed the strategy of Mutual Assured Destruction (MAD) that carried us through threats like the Cuban Missile Crisis. Fast forward to 1989 when the Berlin Wall fell and 1991 when the Soviet Union disintegrated, and my security blanket was gone – the Cold War was over. In what President George H.W. Bush referred to as the unipower world, Americans now have to decide who the enemy was, since it was hard to imagine a world without one.
Andrew Bacevitch in his latest book, THE AGE OF ILLUSIONS: HOW AMERICA SQUANDERED ITS COLD WAR VICTORY examines the post-Cold War period as American policymakers struggled with which direction US foreign policy should go. Bacevitch a retired army officer and graduate of West Point, in addition to being a professor emeritus from Boston University concludes that the path chosen carried a certain amount of hubris that led to numerous errors squandering our supposed victory that began when Boris Yeltsin faced down a coup attempt by elements in the Kremlin that could not accept defeat.
(President George H. W. Bush promised a New World Order)
According to Bacevitch the United States chose the path of globalization or unrestricted corporate capitalism designed to create maximum wealth. Second, it fostered global leadership, or hegemony and empire. Third, we called for freedom, emphasizing autonomy. Lastly, presidential supremacy as the prerogatives of the legislative branch declined. In making his case, Bacevitch provides historical context for each and integrates a comparison of his own career with that of Donald Trump. In so doing Bacevitch seeks to explain how someone like Trump could be elected president and he will argue it could have been predicted based on events that took place in 1992 and after. For Bacevitch the villains who are responsible for basically continuing America's path after the Cold War are the elites who pushed a consensus that raised expectations, and when they went unfulfilled, outraged voters turned to Donald Trump.
The election of 1992 is a watershed in American history as President George H.W. Bush despite overseeing the end of the Cold War, prevailing against Iraq in the Persian Gulf War, gaining an 89% approval rating, and promised a "New World Order," lost his reelection bid to Bill Clinton. The election produced three insurgencies that directly relate to the election of 2016. Former Nixon speech writer and newspaper columnist Patrick Buchanan, and millionaire H. Ross Perot were both verbal "bomb throwers" who represented an "America First" approach to foreign policy and a populist economic message. Buchanan gave Bush a scare in the New Hampshire primary and Perot garnered 19% of the vote in the election. The third member of this insurgency was actually Hillary Clinton who worked to do away with white male domination in society as she put it, a vote for Bill Clinton was "two for the price of one." Her battles in the White House reflect how Republicans, and right-wing political elements feared her.
Bacevitch's analysis throughout the narrative is based sound logic and a very perceptive view of American society and the conduct of foreign policy. He takes the reader through the historically impactful ideas of Alfred Mahan, Frederick Jackson Turner, and Rudyard Kipling who explained the need for American expansion and nationalism. In his discussion of "thinkers," he points to Francis Fukuyama who created a secular ideology to justify American hubris in the 1990s and after. Bacevitch also delves into the 1940-1992 period offering analogies that make a great deal of sense as he explains how the US emerged from WWII as the dominant power in the world, but shortly thereafter the Soviet Union became an ideological and military threat.
THE FREE TRADE ACCORD; Nafta: Something to Offend Everyone
By Keith Bradsher
Credit…The New York Times Archives
As one becomes immersed in Bacevitch's narrative you begin to question the path the United States chose. The expectations of the American economy after the Cold War was extremely bullish. Globalization was seen as the key element to achieving economic domination and the spread of American values. Global leadership was seen as policing this new American economic empire and a vastly increased military budget would fund the military who would police the world and enforce American hegemony. As Colin Powell has written, "Our arms should be second to none." As the US led the way in techno-warfare a large conventional force was no longer needed. Bacevitch discusses the Revolution in Military Affairs (RMA). "It purported to describe the culmination of a long evolutionary march to perfection. Globalization promised to reduce uncertainties that had plagued operation of the market. In a similar manner, the RMA was expected to reduce—and perhaps even eliminate—uncertainties that had long plagued the conduct of war and had made it such a risky proposition. The nation that seized the opportunities it presented would enjoy decisive advantages over any and all adversaries." The problem with techno-militarism is that "smart bombs," drones and other "toys" are not as precise and predictable as policy makers are convinced of. Washington also engaged in a "kulturkampf" as it tried to spread its values creating a backlash seemingly everywhere it went.
This approach led the United States to the disastrous invasion of Iraq in 2003, the support of numerous repressive dictatorships, a war in Afghanistan that continues today, and other policies that today is making the United States a pariah among its allies and a joke in relation to Putin's Russia and Xi's China. Bacevitch sums up the post-Cold War period very nicely, "the spirit of the post-Cold War era prioritized self-actualization and self-indulgence over self-sacrifice."
Bacevitch saves his most trenchant remarks as he places the last three presidents under a microscope and renders the following judgements that make a great deal of sense. By the time Bill Clinton left the White House white males still ruled Washington, Wall Street and Hollywood still saw further power to be garnered and making money was king. Gays could neither marry nor serve in the military. Checks on corporate capitalism all but disappeared. Americans learned to take war in stride observing from a comfortable distance with the volunteer army that targeted a miniscule part of the population.
(President George W. Bush shortly after his "Mission Accomplished Speech"
Under George Bush, the central theme of his administration was war, a complement to globalization and another means of bringing the world in line with American goals. Clinton may have dabbled in war, but Bush went at it whole "hog." The Bush Doctrine argued after 9/11 that American prerogatives where beyond reproach. American values were universal, and compliance was almost compulsory as resistance was futile. When the US went to war, they did it with a sense of righteousness that was hard to fathom. We saw ourselves as the global peacemaker, but in reality, we categorized them, i.e.; "axis of evil" rather than engage them. Finally, Bush saw himself as a unitary executive and the world order that the Washington constructed was preordained.
Barrack Obama did not fair much better in Bacevitch's estimation as he paved the way for a powerful backlash resulting in the election of Trump. He saved globalized neo-liberalism with his $787,000,000 bailout. His administration never reassessed globalization as a policy that caused the "great recession." After Bush's failures, Obama gave using the military a new lease on life. Obama vowed to win the war in Afghanistan and even promoted an Iraqi type of "surge" that was unsuccessful. Hostilities continued in Iraq, civil war decimated Syria and part of Obama's legacy was the continuation of wars. Under Obama, the concept of "forever wars" took hold. "Hope and change," became "more of the same." He did become a cultural warrior celebrating diversity, empowering women, and exploring the variable nature of identity, but over all his administration was a missed opportunity.
One may disagree with Bacevitch's assessment of the last few decades, but one must really think hard about the following. The wars that continue are working class wars with a volunteer army that the elites have little to do with. Globalization accelerated the de-industrialization of America as we exported more jobs than we created. The disparity in wealth and income is abhorrent as 43 million people are below the poverty level, credit card debt is $8377 per household, and most retirees have just $5000 in savings. After the Trump tax cut of 2018, the 1% keeps more and more of its wealth. In this situation it is understandable that economic populism has run rampant.
Bacevitch has written a very thought-provoking book that demands that we reexamine our pre-2016 policies to understand what has been transpiring in American foreign policy since Trump assumed the presidency. If the book has a weakness it is that Bacevitch's criticisms are seemingly correct, but he never offers an alternative to what he criticizes.
(The inauguration of Barrack Obama as President)
Though the book appears to be a work that focuses on American foreign policy, it also shines a light on American social and cultural history. A chapter entitled, "Al, Fred, and Homer's America – and Mine!" provides insights into American society in the late 1940s and 50s through movies and social class issues. There are constant references to literary works, the dismantling of our industrial base and how unwinnable wars tore apart our social fabric that bound all elements of society together. The references to cultural tools is used as a vehicle to explain in part the partisan divide that developed in our country and in the end all of these references be it to John Updike's character, Harry Angstrom or others rests on the author's belief that the United States had an opportunity to alter its path. However we chose not to and let the mistakes of the last 40 years continue to the point that even Trump with all his criticism and bombast about allies and wars has committed even more troops to the Middle East, and funded the techno-military component of the Defense budget to the maximum. Bacevitch is a harsh critic and does not hold back, but it would be nice to know exactly what policy changes he would make.
← BLACK WAVE: SAUDI ARABIA, IRAN, AND THE FORTY YEAR RIVALRY THAT UNRAVELED CULTURE, RELIGION, AND COLLECTIVE MEMORY by Kim Ghattas
AGENTS OF INFLUENCE: A BRITISH CAMPAIGN, A CANADIAN SPY, AND THE SECRET PLOT TO BRING AMERICA INTO WORLD WAR II by Henry Hemming →


text:
package com.jmv.frre.moduloestudiante.messenger;

import android.os.Handler;
import android.os.Looper;
import android.os.Message;

public class DispatchQueue extends Thread {
    public volatile Handler handler = null;
    private final Object handlerSyncObject = new Object();

    public DispatchQueue(final String threadName) {
        setName(threadName);
        start();
    }

    private void sendMessage(Message msg, int delay) {
        if (handler == null) {
            try {
                synchronized (handlerSyncObject) {
                    handlerSyncObject.wait();
                }
            } catch (Throwable t) {
                t.printStackTrace();
            }
        }

        if (handler != null) {
            if (delay <= 0) {
                handler.sendMessage(msg);
            } else {
                handler.sendMessageDelayed(msg, delay);
            }
        }
    }

    public void cancelRunnable(Runnable runnable) {
        if (handler == null) {
            synchronized (handlerSyncObject) {
                if (handler == null) {
                    try {
                        handlerSyncObject.wait();
                    } catch (Throwable t) {
                        t.printStackTrace();
                    }
                }
            }
        }

        if (handler != null) {
            handler.removeCallbacks(runnable);
        }
    }

    public void postRunnable(Runnable runnable) {
        postRunnable(runnable, 0);
    }

    public void postRunnable(Runnable runnable, long delay) {
        if (handler == null) {
            synchronized (handlerSyncObject) {
                if (handler == null) {
                    try {
                        handlerSyncObject.wait();
                    } catch (Throwable t) {
                        t.printStackTrace();
                    }
                }
            }
        }

        if (handler != null) {
            if (delay <= 0) {
                handler.post(runnable);
            } else {
                handler.postDelayed(runnable, delay);
            }
        }
    }

    public void cleanupQueue() {
        if (handler != null) {
            handler.removeCallbacksAndMessages(null);
        }
    }

    public void run() {
        Looper.prepare();
        synchronized (handlerSyncObject) {
            handler = new Handler();
            handlerSyncObject.notify();
        }
        Looper.loop();
    }
}

redpajama_set_name: RedPajamaGithub


text:
Q: Using forwardRef with proptypes and eslint I am trying to use forwardRef for a Button in a project using eslint and prop-types.
This is what I tried so far, and the errors I get each time:
First attempt
function Button ({ action = { callback: () => {}, title: 'unknown' } }, ref) {
  return (<button ref={ref} onClick={action.callback} title={action.description} type="button">{action.icon || action.title}</button>)
}

Button.propTypes = {
  action: Action.isRequired
}

export default forwardRef(Button)

This will give me the following warning in the console: Warning: forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?
Second attempt
function ButtonFunction ({ action = { callback: () => {}, title: 'unknown' } }, ref) {
  return (<button ref={ref} onClick={action.callback} title={action.description} type="button">{action.icon || action.title}</button>)
}

const Button = forwardRef(ButtonFunction);

Button.propTypes = {
  action: Action.isRequired
}

export default ButtonFunction;

I get: action is missing in props validation.
Third attempt
const Button = forwardRef(({ action = { callback: () => {}, title: 'unknown' } }, ref) => {
  return (<button ref={ref} onClick={action.callback} title={action.description} type="button">{action.icon || action.title}</button>)
});

Button.propTypes = {
  action: Action.isRequired
}

export default Button;

This time, I get: Component definition is missing display name.
So what is the correct way to do this?

A: const Form = React.forwardRef(function Form(
  { submitHandler, keyUpHandler, label, type, placeholder, buttonTxt },
  ref
) {

export default Form
No warnings doing this way. function Form takes care of the name.

A: You are almost done with your third attempt. But you don't have to use twice forwardRef, the first use with the Button declaration is enough. The display name rule is not an error (neither at JavaScript nor React level), but rather an intentional prop in order to show the "real" name of the component, used by React in debugging messages.
In your case, the forwardRef function will hide the "real" component name for the transpiler.
You can even disable this rule if it's a real problem to write displayName for each of those case.
https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md

const Button = forwardRef(({ action = { callback: () => {}, title: 'unknown' } }, ref) => {
  return (<button ref={ref} onClick={action.callback} title={action.description} type="button">{action.icon || action.title}</button>)
});

Button.propTypes = {
  action: Action.isRequired
}

Button.displayName = 'Button'

export default Button

A: interface SomeProps {
 // written your props
};

const SomeFC = forwardRef((props:SomeProps,ref)=>{
// do something and returns
}})

Declare the type of props for inner FC can fix the proptypes warnning!

redpajama_set_name: RedPajamaStackExchange


text:
Turkey · October, 2011
Stories about Turkey from October, 2011
Armenia: Earthquake in Turkey felt in Yerevan
Central Asia & Caucasus 26 October 2011
On Sunday, the earthquake that struck Van, a city in South Eastern Turkey, was felt in Yerevan, the Armenian capital, and other parts of the small South Caucasus country. Onnik Krikorian reports.
Turkey: Online Relief Efforts for Van's Earthquake Victims
Digital Activism 24 October 2011
Eastern Turkey was hit by a large earthquake of magnitude 7.2 yesterday. Kubra sums up some of relief efforts that were spearheaded online, pushing for humanitarian and rescue efforts on the ground.
Turkey: 1,000 People Feared Dead in Van Quake
Breaking News 23 October 2011
A massive earthquake with a magnitude of 7.2 hit eastern Turkey a few hours ago. Up to 1,000 people are feared dead. The quake hit Ercis, in the mountainous province of Van close to the Iranian border, the hardest. On Twitter, users are checking on loved ones and exchanging updates on the death toll and rescue efforts.