text:
At the Center — Oct-Dec 2012
NCYL's Foster Youth Education Initiative Welcomes Three New Members to Its Team!
Maya Cooper
Kim Corneille
Lisa O'Connor
Maya Cooper has joined NCYL as a policy manager for FosterEd, focusing on improving the educational outcomes for children in foster care. She will be based in NCYL's Oakland office.
Before joining NCYL, Maya was a staff attorney at The Legal Aid Society's Education Advocacy Project in New York City, where she provided education advocacy services for children involved in abuse and neglect cases in the family court system. While at Legal Aid, Maya focused on individual case advocacy to ensure that children with disabilities received appropriate special education services. Prior to Legal Aid, Maya was employed for more than six years as an attorney with the Education Unit at New York City's Administration for Children's Services. While at Children's Services, Maya advocated on behalf of infants, pre-school and school-age children who were encountering difficulty accessing services through the NYS Early Intervention Program or NYC preschool and school age special education systems. Maya also participated in developing effective policies and procedures with city and state agencies to improve access to services for children involved with the child welfare system. During law school, Maya interned at The Legal Aid Society's Juvenile Rights Practice, where she promoted permanency for clients by assisting children prepare for court hearings in order to safeguard their interests and legal rights. Maya received her B.S. from the University of Miami and her J.D. from New York Law School.
Kim Corneille and Lisa O'Connor will be joining FosterEd's Santa Cruz Project in mid-January as FosterEd Liaisons. The goal of the project is to improve the educational outcomes of foster children and youth in Santa Cruz County.
Kim holds an undergraduate degree in human development from UC San Diego, with a minor in Spanish literature, and a Master's in education and a teaching credential from UC Santa Cruz. She has several years' experience as an elementary school teacher, and has also been a tutor, coach and mentor for at-risk high school students. Kim is fluent in Spanish, enabling her to serve both English-speaking and Spanish-speaking families.
Lisa holds an undergraduate degree in Legal Studies from UC Santa Cruz and a Master's in public health from San Diego State University. She has experience mentoring foster youth, including through UC Santa Cruz's Smith Renaissance Society. She will be leaving her current position with Education Training and Research Associates, a non-profit based in Scotts Valley, where she coordinates health and education projects and works with school-age children in underserved Bay Area communities.
Welcome Maya, Kim and Lisa!
NCYL Senior Attorney Appointed to CA Child Welfare Council
Bill Grimm
NCYL Senior Attorney Bill Grimm has been appointed to the California Child Welfare Council. The goal of the Council is to increase collaboration among agencies and courts that serve foster youth, and improve the coordination and delivery of foster youth services.
Bill has been lead counsel in the Center's class action foster care reform litigation in Arkansas, Utah, Washington, and Clark County (Las Vegas), Nevada and is nationally recognized as one of the country's leading experts on the problems of children in foster care. In 2005, he was awarded the National Legal Aid and Defender Association's (NLADA) Kutak-Dodds Prize, considered the top national honor given to legal services lawyers. Bill also heads up NCYL's PsychDrugs Action Campaign, designed to end the inappropriate and harmful sedation of tens of thousands of foster children.
California Child Welfare Council members have been selected based on professional involvement and/or experience in child welfare. Others serving on the 50-member committee are foster youth, caregivers, advocates, executive and judicial branch leaders, legislators, and county child welfare directors and administrators. The legislation that set up the Council (AB 2216) in 2006, designates the Secretary of Health & Human Services, Diana S. Dooley, and the Chief Justice of the California Supreme Court, Tani Cantil-Sakauye as Council Co-chairs.
The Council meets quarterly.
Volunteer Attorney Jennifer Friedman Joins NCYL
Jennifer Friedman
Jennifer Friedman is a graduate of Boalt Hall at UC Berkeley. In law school, Jennifer served as an Articles Editor for the California Law Review and a volunteer with the California Court of Appeals and the UC Berkeley Workers' Rights Clinic.
After law school, she clerked in the Northern District of California and on the Ninth Circuit Court of Appeals and worked briefly in private practice. Jennifer graduated from UC Berkeley with a B.A. in Sociology where she studied minors' abortion rights and parental consent laws.
Meet NCYL Communications Intern Savannah Reid
Savannah joined NCYL in the fall of 2012 as a Communications Intern. She is in her third year at the University of California, Berkeley, majoring in Interdisciplinary Studies with a focus on Social Policy and Human Development. Currently, Savannah is researching implicit bias in the juvenile justice system, and reviewing the new book, "Kids to Cash". Savannah has previously worked as an Outreach Coordinator for the Nevada Partnership for Homeless Youth, a teacher with the Breakthrough Collaborative, and an intern for a number of political campaigns. After graduation, she plans on attending law school in hopes of continuing her work in law and policy, specifically aimed at youth. In her free time, Savannah enjoys reading, traveling, playing tennis, and spending time with family and friends. This spring, Savannah will be studying abroad in Seville, Spain.
Lauren Hansen joins Public interest Law Project
Lauren Hansen
Lauren Hansen, daughter of NCYL Director John O'Toole, joined the Public Interest Law Project in 2012 as its first Attorney Fellow. Lauren splits her time evenly between the housing and public benefits units. Prior to joining PILP, based in Oakland, CA, Lauren worked at Legal Services of Northern California for three years in its Ukiah office doing housing, public benefits, and health law. Lauren graduated from UCLA in 2004, and then worked as a legal assistant at Arnold & Porter LLP in Washington D.C. She went to law school at the University of Iowa College of Law, where she worked as a research assistant and helped develop the Citizen Lawyer Program, a program that helps students find both legal and non-legal volunteer opportunities. She spent her summer after her first year in law school doing welfare rights advocacy with the East Bay Community Law Center. After her second year, she worked at New York Lawyers for the Public Interest doing impact litigation in health, disability rights, environmental justice, and police misconduct.
Renly Bates
Congratulations to NCYL attorney Leecia Welch and husband, Stephen Bates, on the birth of their son, Renly Alexander Almind Bates on October 27. Renly weighed in at 7 lb 5 oz.
The great-grandchildren of Ethel Oden-Brown, NCYL's legal secretary, celebrate Halloween – Kimoy EricaFaye Tracy, age 2; and Rylan Tracy, age 3 months.
Kimoy EricaFaye Tracy
Rylan Tracy


These products can be processed to any customer specification if necessary. Portion cuts from Omaha Fresh by Omaha Steaks™ and Omaha Fresh Angus by Omaha Steaks™ are available to establishments in select areas. Ask your salesperson for details.
All steaks are vacuum-sealed in our barrier film and flash-frozen providing maximum shelf life and product utility. This process preserves peak quality, flavor and freshness. Our product is packed in heavy grade cardboard boxes and clearly labeled for product type, grade, MBG code, quantity, size and weight.
Case cube: .41 cubic ft.
©2013, OS SalesCo, Inc. All rights reserved. "Omaha Steaks", "Omaha Steaks Private Reserve"


Unlocking the power of your data, understanding your business drivers, and taking control of your processes—three of the main reasons companies opt to make software upgrades. However, there are some cases in which a complete overhaul of your business management software isn't in the books.
Whether you are happy with your current solution, don't want to commit just yet to a months-long implementation project, or don't have the need for something, you still need to make decisions. Enter Microsoft Power BI, a powerful-yet-affordable solution to give businesses new insights into their key performance indicators, drivers, and data in a user-friendly format.
Powered by cloud technology, Microsoft Power BI platform can rapidly transform your legacy business software data—ERP, CRM, and so much more—into actionable insights in a modern and intuitive way.
At MIBAR, we know the utility and value that comes with using Power BI for your current or future technology stack, and have helped many companies deploy, customize, and operate their Power BI implementation, transforming the way people interact with business data.
Knowing this, we are proud to announce a new webinar to discuss one company's journey to business intelligence, exploring how Sabrett Hot Dogs used Power BI to extend and enhance their Microsoft Dynamics GP deployment.
We invite you to join us on May 7, 2019, 1 PM EST for our next webinar, Business Intelligence Made Easy—Power BI Case Study. In this event, we will present the benefits of this exciting platform and provide a real-life example of how this solution has helped a storied manufacturer of one of New York's most well-known brands to unlock the power of their business data.
Unlock new insights into sales performance, using a wide range of slicers to drill down into new levels of analysis.
Get a complete picture of the sales numbers, going above and beyond traditional metrics to measure sales revenue, gross profit, and unit sales using a variety of metrics.
Leverage Power BI to understand performance on a comparative basis, slicing sales data by customer, product, item class, sales rep, and much more, to plan for future initiatives.
Tap into new levels of visibility beyond that of Excel, analyzing bigger pools of data more consistently and keeping everyone on the same page with a single version of truth.
Improve reporting and decision making with a platform that is easy enough for senior management to operate and detailed enough for even the most sophisticated financial users.
Click here to register for Business Intelligence Made Easy—Power BI Case Study.
We are extremely excited to present this webinar to put on display one of our highest profile and most successful implementation projects. We've been vocal supporters of Microsoft's entry into the BI field, providing an accessible, affordable, and powerful platform, and our customization and implementation work stands for itself.
The experts at MIBAR can implement a comprehensive solution that will empower your sales, marketing finance and operations teams with multi-dimensional visualizations that will transform how your people interact with your business data. We invite you again to join us for this webinar on May 7 and download our free guide, Out of the Spreadsheet and into the Cloud: 5 Considerations When Implementing BI.


text:
For an overview of PLCs, see What Is a "Professional Learning Community"?
Successful PLCs are committed to professional learning for continuous improvement. Here you'll find our officially recommended readings on foundational questions and implementation issues, as well as news on successful PLC districts and schools. (Note: Articles are subject to copyright laws. Please secure the permission of the copyright owner before duplicating.)
The Flywheel Effect: Educators Gain Momentum From a Model for Continuous Improvement
Kanold, T. D. (2006).
Journal of Staff Development 27(2), 16–21.
Focused on Learning: Four Critical Questions to Which Every Educator Should Have the Answers
Ryan, E. (2011).
C&I Tech Journal
Formative and Summative Assessments in the Classroom
Ehringhaus, M., & Garrison, C. (2007).
National Middle School Association
Fostering Shared Leadership
Wilhelm, T. (2010).
Leadership Magazine (Association of California School Administrators)
Four Places to Dig Deep to Find More Time for Teacher Collaboration
Horsheed, K. (2007).
Journal of Staff Development 28(2), 43-45.
From Closets to Community: Our PLC Saga
Rigsbee, C. (2008).
From Solo to Ensemble: Fine Arts Teachers Find a Harmonious Solution to Their Isolation
Burroughs, C., Dietz, L., Karnbach, A., & Maher, J. (2010).
Helping Students Understand Assessment
Chappuis, J. (2005).
Educational Leadership 63(3), 39–43.
High-Leverage Strategies for Principal Leadership
DuFour, R., & Marzano, R. J. (2009).
How the Best Gets Better
Buffum, A., & Hinman, C. (2006).
How Do Principals Really Improve Schools?
DuFour, R., & Mattos, M. (2013).
The Principalship 24(7), 34–40.
How We Formed Our Community
Burnette, B. (2002).
Improving Relationships Within the Schoolhouse
Barth, R. S. (2006).
Education Leadership 63(6), 8–13.
In Praise of Top-Down Leadership
DuFour, R. (2007).
The School Administrator 64(10), 38–42.
In the Real World: Professional Learning Communities—It's Not About "My Class"
Peal, C. (2007).
Leadership Compass 5(2), 1–2.

redpajama_set_name: RedPajamaCommonCrawl


text:
Home Health Care Health care center stage at Huizenga town hall
Health care center stage at Huizenga town hall
MUSKEGON, Mich. (WOOD) — U.S. Rep. Bill Huizenga, R-Zeeland, met Wednesday with constituents who made it loud and clear they don't agree with what's going on in Washington.
An auditorium of roughly 250 people inside Orchard View High School in Muskegon questioned the representative about his stance on health care, recent racist symbols going up at Muskegon schools and President Donald Trump's behavior.
The meeting came a few days after Huizenga showed support for Trump's plan to send more troops to Afghanistan.
"Everybody agrees that Afghanistan is the cradle of that radical jihadist movement under the Taliban. So, this is not nation building. It's really about trying to give the Afghans space to make sure that they can run their own country. It can't be us, it can't be another Western power, but we can and should have the ability to assist them," Huizenga said after the town hall.
In an hour and a half, only a dozen questions were asked. Several long, loud boos and shouting matches prevented productive discussion throughout the evening.
"Ultimately, it's about connecting in with constituents and I understand there's people here who have come to every in-person town hall and all they want to do is shout and scream and yell. That's their right. What I don't accept, though, is if it makes it so disruptive that others can't even participate. Hopefully they realize being disrespectful to their fellow citizens," the congressman told 24 Hour News 8 afterward.
Several people who spoke wanted to know why Huizenga still supports Trump. One asked about the president's "unhinged" behavior at a campaign-style rally in Phoenix Tuesday. The congressman said he didn't watch it. Huizenga also said his decisions to speak for or against the president are based on policy, not the person.
People also questioned why the representative celebrated in the Rose Garden in May after the House of Representatives passed a bill that would have repealed the Affordable Care Act — though the effort later died in the Senate. Huizenga replied that the health care overhaul can't be completed overnight.
"[That] bill is not doing that. The Obamacare is not doing that and Medicare for all or some other program … that's not going do it either," Huizenga said.
The last focus of the night was on recent events in Muskegon — in one case, a noose was found hanging at a school playground and in the other, a statue at the high school football stadium was tagged with racist slurs. Attendees wanted to know Huizenga's stance on public racism in the community and his role to stop it. He explained it's about working with leaders to call it out.
"You've got to name it and identify it and say that it's not acceptable. One of our first calls [after the noose incident] was to local law enforcement here to find out what was happening," he said.
Two productive items to come out of the town hall include a move by the congressman to meet with two constituents who spoke out about federal funding for special education and senior health care. 24 Hour News 8 plans to follow the progress of those plans.
Previous articleGovt to speed up state-run bank mergers to strengthen sector, boost economic revival – Firstpost
Next article2018 Dodge Challenger SRT Hellcat Widebody Track Drive Review
New Canandaigua Airport service provider takes over – News – MPNnow
Bank Of America: Charting The Path Higher – Seeking Alpha
US to discuss auto rules in NAFTA negotiations on Saturday: report
GOP health care bill revised to target key votes
Brussels Airlines completes 15 years of operations to Africa
A Tesla 2017 Update: A Disruptive Force And A Debt Puzzle
WATCH LIVE: McConnell speaks on latest efforts to reform health care
Health Care Up As Legislative Fears Recede — Health Care Roundup


Searching for a new job can be disheartening — stay positive and productive with these great tips.
A LinkedIn profile is becoming a necessary part of career development. Get yours noticed by making these important changes.
Networking is important to a successful job search, but if you're guilty of any of these habits and gaffes, you're better off staying home to answer Craigslist ads.
First impressions matter at every step of the job search. Start presenting the very best you with these six must-do tips.
HR staffers see a lot of resumes — and a lot of cliches, tired idioms, and lazy skill descriptions in them. Make your resume memorable by cutting these awful words.
Ready to get out of Dodge but need to have a job before you go? Follow this guide and land a new gig in a new city before you've said goodbye to the old one.
Follow these examples to write an effective, attention-grabbing cover letter introduction!
Want to get a job? Ignore this advice — and learn what you should be doing instead.
Recruiters and hiring managers are looking for you on LinkedIn. Follow this advice to ensure that when they find your profile, they'll like what they see.
Discover your hidden network of supporters who are eager to help you find a job or upgrade your career.
Professional Resume Services: Are They Worth Paying For?
In Discover Your New Job Online, a new e-Book by Thursday Bram, this Wise Bread blogger takes readers through the steps of landing a job using online tools.
Do What You Love: Idealistic Nonsense Or Good Advice?
Many people are job hunting these days. I have worked with job seekers for many years and have found that these five common assumptions frequently derail a job search.
When job searching, those who have access to the best tools can keep their advantage in a tough market. Here are my favorite 6 online resources designed to help you find a job.


text:
Pancreatic Cancer Support Groups
Home Facing Pancreatic Cancer Resources, Support and Research Pancreatic Cancer Support Groups
How Do You Find a Pancreatic Cancer Support Group?
In-person Support and Networking Groups
General Cancer Support Groups
Other Sources of Support
Pancreatic cancer can be stressful and scary for patients and their loved ones. But you are not alone. Talking to someone who has experienced a similar situation can be very helpful.
Anyone who has been diagnosed with pancreatic cancer, no matter where they are in their journey, and their loved ones should consider support groups.
Every cancer is different. Consider joining a support group specifically for pancreatic cancer to speak with others going through similar things.
Support is available in many ways. Connect with other survivors and caregivers in a way that meets your needs:
Join an in-person support group
Connect with others online
Talk over the phone
Connect one-on-one
The Pancreatic Cancer Action Network keeps an up-to-date list of pancreatic cancer support groups across the country. See listings on the pages linked below or contact PanCAN Patient Services for information about support groups near you.
You can also ask your healthcare team if they know of local support groups.
Through in-person support and networking groups, you can share your experiences and connect face-to-face with others in your area. A professional counselor, social worker or nurse guides most in-person support groups.
Online support groups and forums may fit your needs if:
No in-person support groups are near you
You cannot travel to an in-person group
You prefer to stay at home
You want a more anonymous setting
You want to meet a larger group of people facing pancreatic cancer
You need more flexible timing
If you prefer to connect one-on-one over the phone or through email, the Pancreatic Cancer Action Network's Survivor & Caregiver Network can help. Share information, ask questions and gain support and inspiration by talking to others who have had similar experiences.
Many people also find reading survivor stories helpful. These stories share personal experiences, information and hope.
Many local hospitals and treatment centers offer support groups for people facing all types of cancer. If there is not a support group specific to pancreatic cancer near you, but you still want to connect in-person with others locally for support, you may consider a broader group.
Ask your healthcare team about cancer support groups near you. PanCAN Patient Services also has resources to find general cancer support groups in your area.
Support for the pancreatic cancer patient is critical to improve quality of life and overall well-being. Having a support system of caregivers, family, friends, healthcare professionals and a patient advocate is important to address and manage the needs of the patient. Learn more about building your support system.
Expert help from psychologists, counselors or other specialists in one-on-one settings may also help. Contact PanCAN Patient Services for resources to find professional support.
The Pancreatic Cancer Action Network hosts events nationwide that bring together people touched by the disease. If you are interested in joining them, learn how to get involved in your community.
For free support resources, including a list of support groups near you and access to our Survivor & Caregiver Network, contact PanCAN Patient Services.
See resources and information especially helpful for patients' loved ones.
Get information to address the variety of challenges patients and their families face.
Be inspired and informed by the experiences of fellow survivors and caregivers.
Building Your Support System
Learn how to build a network to support you on this journey.
Information reviewed by PanCAN's Scientific and Medical Advisory Board, who are experts in the field from such institutions as University of Pennsylvania, Memorial Sloan-Kettering Cancer Center, Virginia Mason Medical Center and more.
Information provided by the Pancreatic Cancer Action Network, Inc. ("PanCAN") is not a substitute for medical advice, diagnosis, treatment or other health care services. PanCAN may provide information to you about physicians, products, services, clinical trials or treatments related to pancreatic cancer, but PanCAN does not recommend nor endorse any particular health care resource. In addition, please note any personal information you provide to PanCAN's staff during telephone and/or email communications may be stored and used to help PanCAN achieve its mission of assisting patients with, and finding cures and treatments for, pancreatic cancer. Stored constituent information may be used to inform PanCAN programs and activities. Information also may be provided in aggregate or limited formats to third parties to guide future pancreatic cancer research and education efforts. PanCAN will not provide personal directly identifying information (such as your name or contact information) to such third parties without your prior written consent unless required or permitted by law to do so. For more information on how we may use your information, you can find our privacy policy on our website at https://www.pancan.org/privacy/.
Facing Pancreatic Cancer?
No one should face pancreatic cancer alone. Learn how we can support you.
Mon – Fri, 7 a.m. – 5 p.m. PST
You can also contact us using the below form.
Get the latest news and updates from the Pancreatic Cancer Action Network.


text:
#include "src/core/lib/iomgr/resource_quota.h"

#include <inttypes.h>
#include <limits.h>
#include <stdint.h>
#include <string.h>

#include <grpc/slice_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/useful.h>

#include "src/core/lib/iomgr/combiner.h"

grpc_tracer_flag grpc_resource_quota_trace =
    GRPC_TRACER_INITIALIZER(false, "resource_quota");

#define MEMORY_USAGE_ESTIMATION_MAX 65536

/* Internal linked list pointers for a resource user */
typedef struct {
  grpc_resource_user* next;
  grpc_resource_user* prev;
} grpc_resource_user_link;

/* Resource users are kept in (potentially) several intrusive linked lists
   at once. These are the list names. */
typedef enum {
  /* Resource users that are waiting for an allocation */
  GRPC_RULIST_AWAITING_ALLOCATION,
  /* Resource users that have free memory available for internal reclamation */
  GRPC_RULIST_NON_EMPTY_FREE_POOL,
  /* Resource users that have published a benign reclamation is available */
  GRPC_RULIST_RECLAIMER_BENIGN,
  /* Resource users that have published a destructive reclamation is
     available */
  GRPC_RULIST_RECLAIMER_DESTRUCTIVE,
  /* Number of lists: must be last */
  GRPC_RULIST_COUNT
} grpc_rulist;

struct grpc_resource_user {
  /* The quota this resource user consumes from */
  grpc_resource_quota* resource_quota;

  /* Closure to schedule an allocation under the resource quota combiner lock */
  grpc_closure allocate_closure;
  /* Closure to publish a non empty free pool under the resource quota combiner
     lock */
  grpc_closure add_to_free_pool_closure;

  /* one ref for each ref call (released by grpc_resource_user_unref), and one
     ref for each byte allocated (released by grpc_resource_user_free) */
  gpr_atm refs;
  /* is this resource user unlocked? starts at 0, increases for each shutdown
     call */
  gpr_atm shutdown;

  gpr_mu mu;
  /* The amount of memory (in bytes) this user has cached for its own use: to
     avoid quota contention, each resource user can keep some memory in
     addition to what it is immediately using (e.g., for caching), and the quota
     can pull it back under memory pressure.
     This value can become negative if more memory has been requested than
     existed in the free pool, at which point the quota is consulted to bring
     this value non-negative (asynchronously). */
  int64_t free_pool;
  /* A list of closures to call once free_pool becomes non-negative - ie when
     all outstanding allocations have been granted. */
  grpc_closure_list on_allocated;
  /* True if we are currently trying to allocate from the quota, false if not */
  bool allocating;
  /* How many bytes of allocations are outstanding */
  int64_t outstanding_allocations;
  /* True if we are currently trying to add ourselves to the non-free quota
     list, false otherwise */
  bool added_to_free_pool;

  /* Reclaimers: index 0 is the benign reclaimer, 1 is the destructive reclaimer
   */
  grpc_closure* reclaimers[2];
  /* Reclaimers just posted: once we're in the combiner lock, we'll move them
     to the array above */
  grpc_closure* new_reclaimers[2];
  /* Trampoline closures to finish reclamation and re-enter the quota combiner
     lock */
  grpc_closure post_reclaimer_closure[2];

  /* Closure to execute under the quota combiner to de-register and shutdown the
     resource user */
  grpc_closure destroy_closure;

  /* Links in the various grpc_rulist lists */
  grpc_resource_user_link links[GRPC_RULIST_COUNT];

  /* The name of this resource user, for debugging/tracing */
  char* name;
};

struct grpc_resource_quota {
  /* refcount */
  gpr_refcount refs;

  /* estimate of current memory usage
     scaled to the range [0..RESOURCE_USAGE_ESTIMATION_MAX] */
  gpr_atm memory_usage_estimation;

  /* Master combiner lock: all activity on a quota executes under this combiner
   * (so no mutex is needed for this data structure) */
  grpc_combiner* combiner;
  /* Size of the resource quota */
  int64_t size;
  /* Amount of free memory in the resource quota */
  int64_t free_pool;

  gpr_atm last_size;

  /* Has rq_step been scheduled to occur? */
  bool step_scheduled;
  /* Are we currently reclaiming memory */
  bool reclaiming;
  /* Closure around rq_step */
  grpc_closure rq_step_closure;
  /* Closure around rq_reclamation_done */
  grpc_closure rq_reclamation_done_closure;

  /* This is only really usable for debugging: it's always a stale pointer, but
     a stale pointer that might just be fresh enough to guide us to where the
     reclamation system is stuck */
  grpc_closure* debug_only_last_initiated_reclaimer;
  grpc_resource_user* debug_only_last_reclaimer_resource_user;

  /* Roots of all resource user lists */
  grpc_resource_user* roots[GRPC_RULIST_COUNT];

  char* name;
};

static void ru_unref_by(grpc_exec_ctx* exec_ctx,
                        grpc_resource_user* resource_user, gpr_atm amount);

/*******************************************************************************
 * list management
 */

static void rulist_add_head(grpc_resource_user* resource_user,
                            grpc_rulist list) {
  grpc_resource_quota* resource_quota = resource_user->resource_quota;
  grpc_resource_user** root = &resource_quota->roots[list];
  if (*root == nullptr) {
    *root = resource_user;
    resource_user->links[list].next = resource_user->links[list].prev =
        resource_user;
  } else {
    resource_user->links[list].next = *root;
    resource_user->links[list].prev = (*root)->links[list].prev;
    resource_user->links[list].next->links[list].prev =
        resource_user->links[list].prev->links[list].next = resource_user;
    *root = resource_user;
  }
}

static void rulist_add_tail(grpc_resource_user* resource_user,
                            grpc_rulist list) {
  grpc_resource_quota* resource_quota = resource_user->resource_quota;
  grpc_resource_user** root = &resource_quota->roots[list];
  if (*root == nullptr) {
    *root = resource_user;
    resource_user->links[list].next = resource_user->links[list].prev =
        resource_user;
  } else {
    resource_user->links[list].next = (*root)->links[list].next;
    resource_user->links[list].prev = *root;
    resource_user->links[list].next->links[list].prev =
        resource_user->links[list].prev->links[list].next = resource_user;
  }
}

static bool rulist_empty(grpc_resource_quota* resource_quota,
                         grpc_rulist list) {
  return resource_quota->roots[list] == nullptr;
}

static grpc_resource_user* rulist_pop_head(grpc_resource_quota* resource_quota,
                                           grpc_rulist list) {
  grpc_resource_user** root = &resource_quota->roots[list];
  grpc_resource_user* resource_user = *root;
  if (resource_user == nullptr) {
    return nullptr;
  }
  if (resource_user->links[list].next == resource_user) {
    *root = nullptr;
  } else {
    resource_user->links[list].next->links[list].prev =
        resource_user->links[list].prev;
    resource_user->links[list].prev->links[list].next =
        resource_user->links[list].next;
    *root = resource_user->links[list].next;
  }
  resource_user->links[list].next = resource_user->links[list].prev = nullptr;
  return resource_user;
}

static void rulist_remove(grpc_resource_user* resource_user, grpc_rulist list) {
  if (resource_user->links[list].next == nullptr) return;
  grpc_resource_quota* resource_quota = resource_user->resource_quota;
  if (resource_quota->roots[list] == resource_user) {
    resource_quota->roots[list] = resource_user->links[list].next;
    if (resource_quota->roots[list] == resource_user) {
      resource_quota->roots[list] = nullptr;
    }
  }
  resource_user->links[list].next->links[list].prev =
      resource_user->links[list].prev;
  resource_user->links[list].prev->links[list].next =
      resource_user->links[list].next;
  resource_user->links[list].next = resource_user->links[list].prev = nullptr;
}

/*******************************************************************************
 * resource quota state machine
 */

static bool rq_alloc(grpc_exec_ctx* exec_ctx,
                     grpc_resource_quota* resource_quota);
static bool rq_reclaim_from_per_user_free_pool(
    grpc_exec_ctx* exec_ctx, grpc_resource_quota* resource_quota);
static bool rq_reclaim(grpc_exec_ctx* exec_ctx,
                       grpc_resource_quota* resource_quota, bool destructive);

static void rq_step(grpc_exec_ctx* exec_ctx, void* rq, grpc_error* error) {
  grpc_resource_quota* resource_quota = (grpc_resource_quota*)rq;
  resource_quota->step_scheduled = false;
  do {
    if (rq_alloc(exec_ctx, resource_quota)) goto done;
  } while (rq_reclaim_from_per_user_free_pool(exec_ctx, resource_quota));

  if (!rq_reclaim(exec_ctx, resource_quota, false)) {
    rq_reclaim(exec_ctx, resource_quota, true);
  }

done:
  grpc_resource_quota_unref_internal(exec_ctx, resource_quota);
}

static void rq_step_sched(grpc_exec_ctx* exec_ctx,
                          grpc_resource_quota* resource_quota) {
  if (resource_quota->step_scheduled) return;
  resource_quota->step_scheduled = true;
  grpc_resource_quota_ref_internal(resource_quota);
  GRPC_CLOSURE_SCHED(exec_ctx, &resource_quota->rq_step_closure,
                     GRPC_ERROR_NONE);
}

/* update the atomically available resource estimate - use no barriers since
   timeliness of delivery really doesn't matter much */
static void rq_update_estimate(grpc_resource_quota* resource_quota) {
  gpr_atm memory_usage_estimation = MEMORY_USAGE_ESTIMATION_MAX;
  if (resource_quota->size != 0) {
    memory_usage_estimation =
        GPR_CLAMP((gpr_atm)((1.0 - ((double)resource_quota->free_pool) /
                                       ((double)resource_quota->size)) *
                            MEMORY_USAGE_ESTIMATION_MAX),
                  0, MEMORY_USAGE_ESTIMATION_MAX);
  }
  gpr_atm_no_barrier_store(&resource_quota->memory_usage_estimation,
                           memory_usage_estimation);
}

/* returns true if all allocations are completed */
static bool rq_alloc(grpc_exec_ctx* exec_ctx,
                     grpc_resource_quota* resource_quota) {
  grpc_resource_user* resource_user;
  while ((resource_user = rulist_pop_head(resource_quota,
                                          GRPC_RULIST_AWAITING_ALLOCATION))) {
    gpr_mu_lock(&resource_user->mu);
    if (GRPC_TRACER_ON(grpc_resource_quota_trace)) {
      gpr_log(GPR_DEBUG,
              "RQ: check allocation for user %p shutdown=%" PRIdPTR
              " free_pool=%" PRId64,
              resource_user, gpr_atm_no_barrier_load(&resource_user->shutdown),
              resource_user->free_pool);
    }
    if (gpr_atm_no_barrier_load(&resource_user->shutdown)) {
      resource_user->allocating = false;
      grpc_closure_list_fail_all(
          &resource_user->on_allocated,
          GRPC_ERROR_CREATE_FROM_STATIC_STRING("Resource user shutdown"));
      int64_t aborted_allocations = resource_user->outstanding_allocations;
      resource_user->outstanding_allocations = 0;
      resource_user->free_pool += aborted_allocations;
      GRPC_CLOSURE_LIST_SCHED(exec_ctx, &resource_user->on_allocated);
      gpr_mu_unlock(&resource_user->mu);
      ru_unref_by(exec_ctx, resource_user, (gpr_atm)aborted_allocations);
      continue;
    }
    if (resource_user->free_pool < 0 &&
        -resource_user->free_pool <= resource_quota->free_pool) {
      int64_t amt = -resource_user->free_pool;
      resource_user->free_pool = 0;
      resource_quota->free_pool -= amt;
      rq_update_estimate(resource_quota);
      if (GRPC_TRACER_ON(grpc_resource_quota_trace)) {
        gpr_log(GPR_DEBUG,
                "RQ %s %s: grant alloc %" PRId64
                " bytes; rq_free_pool -> %" PRId64,
                resource_quota->name, resource_user->name, amt,
                resource_quota->free_pool);
      }
    } else if (GRPC_TRACER_ON(grpc_resource_quota_trace) &&
               resource_user->free_pool >= 0) {
      gpr_log(GPR_DEBUG, "RQ %s %s: discard already satisfied alloc request",
              resource_quota->name, resource_user->name);
    }
    if (resource_user->free_pool >= 0) {
      resource_user->allocating = false;
      resource_user->outstanding_allocations = 0;
      GRPC_CLOSURE_LIST_SCHED(exec_ctx, &resource_user->on_allocated);
      gpr_mu_unlock(&resource_user->mu);
    } else {
      rulist_add_head(resource_user, GRPC_RULIST_AWAITING_ALLOCATION);
      gpr_mu_unlock(&resource_user->mu);
      return false;
    }
  }
  return true;
}

/* returns true if any memory could be reclaimed from buffers */
static bool rq_reclaim_from_per_user_free_pool(
    grpc_exec_ctx* exec_ctx, grpc_resource_quota* resource_quota) {
  grpc_resource_user* resource_user;
  while ((resource_user = rulist_pop_head(resource_quota,
                                          GRPC_RULIST_NON_EMPTY_FREE_POOL))) {
    gpr_mu_lock(&resource_user->mu);
    if (resource_user->free_pool > 0) {
      int64_t amt = resource_user->free_pool;
      resource_user->free_pool = 0;
      resource_quota->free_pool += amt;
      rq_update_estimate(resource_quota);
      if (GRPC_TRACER_ON(grpc_resource_quota_trace)) {
        gpr_log(GPR_DEBUG,
                "RQ %s %s: reclaim_from_per_user_free_pool %" PRId64
                " bytes; rq_free_pool -> %" PRId64,
                resource_quota->name, resource_user->name, amt,
                resource_quota->free_pool);
      }
      gpr_mu_unlock(&resource_user->mu);
      return true;
    } else {
      gpr_mu_unlock(&resource_user->mu);
    }
  }
  return false;
}

/* returns true if reclamation is proceeding */
static bool rq_reclaim(grpc_exec_ctx* exec_ctx,
                       grpc_resource_quota* resource_quota, bool destructive) {
  if (resource_quota->reclaiming) return true;
  grpc_rulist list = destructive ? GRPC_RULIST_RECLAIMER_DESTRUCTIVE
                                 : GRPC_RULIST_RECLAIMER_BENIGN;
  grpc_resource_user* resource_user = rulist_pop_head(resource_quota, list);
  if (resource_user == nullptr) return false;
  if (GRPC_TRACER_ON(grpc_resource_quota_trace)) {
    gpr_log(GPR_DEBUG, "RQ %s %s: initiate %s reclamation",
            resource_quota->name, resource_user->name,
            destructive ? "destructive" : "benign");
  }
  resource_quota->reclaiming = true;
  grpc_resource_quota_ref_internal(resource_quota);
  grpc_closure* c = resource_user->reclaimers[destructive];
  GPR_ASSERT(c);
  resource_quota->debug_only_last_reclaimer_resource_user = resource_user;
  resource_quota->debug_only_last_initiated_reclaimer = c;
  resource_user->reclaimers[destructive] = nullptr;
  GRPC_CLOSURE_RUN(exec_ctx, c, GRPC_ERROR_NONE);
  return true;
}

/*******************************************************************************
 * ru_slice: a slice implementation that is backed by a grpc_resource_user
 */

typedef struct {
  grpc_slice_refcount base;
  gpr_refcount refs;
  grpc_resource_user* resource_user;
  size_t size;
} ru_slice_refcount;

static void ru_slice_ref(void* p) {
  ru_slice_refcount* rc = (ru_slice_refcount*)p;
  gpr_ref(&rc->refs);
}

static void ru_slice_unref(grpc_exec_ctx* exec_ctx, void* p) {
  ru_slice_refcount* rc = (ru_slice_refcount*)p;
  if (gpr_unref(&rc->refs)) {
    grpc_resource_user_free(exec_ctx, rc->resource_user, rc->size);
    gpr_free(rc);
  }
}

static const grpc_slice_refcount_vtable ru_slice_vtable = {
    ru_slice_ref, ru_slice_unref, grpc_slice_default_eq_impl,
    grpc_slice_default_hash_impl};

static grpc_slice ru_slice_create(grpc_resource_user* resource_user,
                                  size_t size) {
  ru_slice_refcount* rc =
      (ru_slice_refcount*)gpr_malloc(sizeof(ru_slice_refcount) + size);
  rc->base.vtable = &ru_slice_vtable;
  rc->base.sub_refcount = &rc->base;
  gpr_ref_init(&rc->refs, 1);
  rc->resource_user = resource_user;
  rc->size = size;
  grpc_slice slice;
  slice.refcount = &rc->base;
  slice.data.refcounted.bytes = (uint8_t*)(rc + 1);
  slice.data.refcounted.length = size;
  return slice;
}

/*******************************************************************************
 * grpc_resource_quota internal implementation: resource user manipulation under
 * the combiner
 */

static void ru_allocate(grpc_exec_ctx* exec_ctx, void* ru, grpc_error* error) {
  grpc_resource_user* resource_user = (grpc_resource_user*)ru;
  if (rulist_empty(resource_user->resource_quota,
                   GRPC_RULIST_AWAITING_ALLOCATION)) {
    rq_step_sched(exec_ctx, resource_user->resource_quota);
  }
  rulist_add_tail(resource_user, GRPC_RULIST_AWAITING_ALLOCATION);
}

static void ru_add_to_free_pool(grpc_exec_ctx* exec_ctx, void* ru,
                                grpc_error* error) {
  grpc_resource_user* resource_user = (grpc_resource_user*)ru;
  if (!rulist_empty(resource_user->resource_quota,
                    GRPC_RULIST_AWAITING_ALLOCATION) &&
      rulist_empty(resource_user->resource_quota,
                   GRPC_RULIST_NON_EMPTY_FREE_POOL)) {
    rq_step_sched(exec_ctx, resource_user->resource_quota);
  }
  rulist_add_tail(resource_user, GRPC_RULIST_NON_EMPTY_FREE_POOL);
}

static bool ru_post_reclaimer(grpc_exec_ctx* exec_ctx,
                              grpc_resource_user* resource_user,
                              bool destructive) {
  grpc_closure* closure = resource_user->new_reclaimers[destructive];
  GPR_ASSERT(closure != nullptr);
  resource_user->new_reclaimers[destructive] = nullptr;
  GPR_ASSERT(resource_user->reclaimers[destructive] == nullptr);
  if (gpr_atm_acq_load(&resource_user->shutdown) > 0) {
    GRPC_CLOSURE_SCHED(exec_ctx, closure, GRPC_ERROR_CANCELLED);
    return false;
  }
  resource_user->reclaimers[destructive] = closure;
  return true;
}

static void ru_post_benign_reclaimer(grpc_exec_ctx* exec_ctx, void* ru,
                                     grpc_error* error) {
  grpc_resource_user* resource_user = (grpc_resource_user*)ru;
  if (!ru_post_reclaimer(exec_ctx, resource_user, false)) return;
  if (!rulist_empty(resource_user->resource_quota,
                    GRPC_RULIST_AWAITING_ALLOCATION) &&
      rulist_empty(resource_user->resource_quota,
                   GRPC_RULIST_NON_EMPTY_FREE_POOL) &&
      rulist_empty(resource_user->resource_quota,
                   GRPC_RULIST_RECLAIMER_BENIGN)) {
    rq_step_sched(exec_ctx, resource_user->resource_quota);
  }
  rulist_add_tail(resource_user, GRPC_RULIST_RECLAIMER_BENIGN);
}

static void ru_post_destructive_reclaimer(grpc_exec_ctx* exec_ctx, void* ru,
                                          grpc_error* error) {
  grpc_resource_user* resource_user = (grpc_resource_user*)ru;
  if (!ru_post_reclaimer(exec_ctx, resource_user, true)) return;
  if (!rulist_empty(resource_user->resource_quota,
                    GRPC_RULIST_AWAITING_ALLOCATION) &&
      rulist_empty(resource_user->resource_quota,
                   GRPC_RULIST_NON_EMPTY_FREE_POOL) &&
      rulist_empty(resource_user->resource_quota,
                   GRPC_RULIST_RECLAIMER_BENIGN) &&
      rulist_empty(resource_user->resource_quota,
                   GRPC_RULIST_RECLAIMER_DESTRUCTIVE)) {
    rq_step_sched(exec_ctx, resource_user->resource_quota);
  }
  rulist_add_tail(resource_user, GRPC_RULIST_RECLAIMER_DESTRUCTIVE);
}

static void ru_shutdown(grpc_exec_ctx* exec_ctx, void* ru, grpc_error* error) {
  if (GRPC_TRACER_ON(grpc_resource_quota_trace)) {
    gpr_log(GPR_DEBUG, "RU shutdown %p", ru);
  }
  grpc_resource_user* resource_user = (grpc_resource_user*)ru;
  GRPC_CLOSURE_SCHED(exec_ctx, resource_user->reclaimers[0],
                     GRPC_ERROR_CANCELLED);
  GRPC_CLOSURE_SCHED(exec_ctx, resource_user->reclaimers[1],
                     GRPC_ERROR_CANCELLED);
  resource_user->reclaimers[0] = nullptr;
  resource_user->reclaimers[1] = nullptr;
  rulist_remove(resource_user, GRPC_RULIST_RECLAIMER_BENIGN);
  rulist_remove(resource_user, GRPC_RULIST_RECLAIMER_DESTRUCTIVE);
  if (resource_user->allocating) {
    rq_step_sched(exec_ctx, resource_user->resource_quota);
  }
}

static void ru_destroy(grpc_exec_ctx* exec_ctx, void* ru, grpc_error* error) {
  grpc_resource_user* resource_user = (grpc_resource_user*)ru;
  GPR_ASSERT(gpr_atm_no_barrier_load(&resource_user->refs) == 0);
  for (int i = 0; i < GRPC_RULIST_COUNT; i++) {
    rulist_remove(resource_user, (grpc_rulist)i);
  }
  GRPC_CLOSURE_SCHED(exec_ctx, resource_user->reclaimers[0],
                     GRPC_ERROR_CANCELLED);
  GRPC_CLOSURE_SCHED(exec_ctx, resource_user->reclaimers[1],
                     GRPC_ERROR_CANCELLED);
  if (resource_user->free_pool != 0) {
    resource_user->resource_quota->free_pool += resource_user->free_pool;
    rq_step_sched(exec_ctx, resource_user->resource_quota);
  }
  grpc_resource_quota_unref_internal(exec_ctx, resource_user->resource_quota);
  gpr_mu_destroy(&resource_user->mu);
  gpr_free(resource_user->name);
  gpr_free(resource_user);
}

static void ru_allocated_slices(grpc_exec_ctx* exec_ctx, void* arg,
                                grpc_error* error) {
  grpc_resource_user_slice_allocator* slice_allocator =
      (grpc_resource_user_slice_allocator*)arg;
  if (error == GRPC_ERROR_NONE) {
    for (size_t i = 0; i < slice_allocator->count; i++) {
      grpc_slice_buffer_add_indexed(
          slice_allocator->dest, ru_slice_create(slice_allocator->resource_user,
                                                 slice_allocator->length));
    }
  }
  GRPC_CLOSURE_RUN(exec_ctx, &slice_allocator->on_done, GRPC_ERROR_REF(error));
}

/*******************************************************************************
 * grpc_resource_quota internal implementation: quota manipulation under the
 * combiner
 */

typedef struct {
  int64_t size;
  grpc_resource_quota* resource_quota;
  grpc_closure closure;
} rq_resize_args;

static void rq_resize(grpc_exec_ctx* exec_ctx, void* args, grpc_error* error) {
  rq_resize_args* a = (rq_resize_args*)args;
  int64_t delta = a->size - a->resource_quota->size;
  a->resource_quota->size += delta;
  a->resource_quota->free_pool += delta;
  rq_update_estimate(a->resource_quota);
  rq_step_sched(exec_ctx, a->resource_quota);
  grpc_resource_quota_unref_internal(exec_ctx, a->resource_quota);
  gpr_free(a);
}

static void rq_reclamation_done(grpc_exec_ctx* exec_ctx, void* rq,
                                grpc_error* error) {
  grpc_resource_quota* resource_quota = (grpc_resource_quota*)rq;
  resource_quota->reclaiming = false;
  rq_step_sched(exec_ctx, resource_quota);
  grpc_resource_quota_unref_internal(exec_ctx, resource_quota);
}

/*******************************************************************************
 * grpc_resource_quota api
 */

/* Public API */
grpc_resource_quota* grpc_resource_quota_create(const char* name) {
  grpc_resource_quota* resource_quota =
      (grpc_resource_quota*)gpr_malloc(sizeof(*resource_quota));
  gpr_ref_init(&resource_quota->refs, 1);
  resource_quota->combiner = grpc_combiner_create();
  resource_quota->free_pool = INT64_MAX;
  resource_quota->size = INT64_MAX;
  gpr_atm_no_barrier_store(&resource_quota->last_size, GPR_ATM_MAX);
  resource_quota->step_scheduled = false;
  resource_quota->reclaiming = false;
  gpr_atm_no_barrier_store(&resource_quota->memory_usage_estimation, 0);
  if (name != nullptr) {
    resource_quota->name = gpr_strdup(name);
  } else {
    gpr_asprintf(&resource_quota->name, "anonymous_pool_%" PRIxPTR,
                 (intptr_t)resource_quota);
  }
  GRPC_CLOSURE_INIT(&resource_quota->rq_step_closure, rq_step, resource_quota,
                    grpc_combiner_finally_scheduler(resource_quota->combiner));
  GRPC_CLOSURE_INIT(&resource_quota->rq_reclamation_done_closure,
                    rq_reclamation_done, resource_quota,
                    grpc_combiner_scheduler(resource_quota->combiner));
  for (int i = 0; i < GRPC_RULIST_COUNT; i++) {
    resource_quota->roots[i] = nullptr;
  }
  return resource_quota;
}

void grpc_resource_quota_unref_internal(grpc_exec_ctx* exec_ctx,
                                        grpc_resource_quota* resource_quota) {
  if (gpr_unref(&resource_quota->refs)) {
    GRPC_COMBINER_UNREF(exec_ctx, resource_quota->combiner, "resource_quota");
    gpr_free(resource_quota->name);
    gpr_free(resource_quota);
  }
}

/* Public API */
void grpc_resource_quota_unref(grpc_resource_quota* resource_quota) {
  grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
  grpc_resource_quota_unref_internal(&exec_ctx, resource_quota);
  grpc_exec_ctx_finish(&exec_ctx);
}

grpc_resource_quota* grpc_resource_quota_ref_internal(
    grpc_resource_quota* resource_quota) {
  gpr_ref(&resource_quota->refs);
  return resource_quota;
}

/* Public API */
void grpc_resource_quota_ref(grpc_resource_quota* resource_quota) {
  grpc_resource_quota_ref_internal(resource_quota);
}

double grpc_resource_quota_get_memory_pressure(
    grpc_resource_quota* resource_quota) {
  return ((double)(gpr_atm_no_barrier_load(
             &resource_quota->memory_usage_estimation))) /
         ((double)MEMORY_USAGE_ESTIMATION_MAX);
}

/* Public API */
void grpc_resource_quota_resize(grpc_resource_quota* resource_quota,
                                size_t size) {
  grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
  rq_resize_args* a = (rq_resize_args*)gpr_malloc(sizeof(*a));
  a->resource_quota = grpc_resource_quota_ref_internal(resource_quota);
  a->size = (int64_t)size;
  gpr_atm_no_barrier_store(&resource_quota->last_size,
                           (gpr_atm)GPR_MIN((size_t)GPR_ATM_MAX, size));
  GRPC_CLOSURE_INIT(&a->closure, rq_resize, a, grpc_schedule_on_exec_ctx);
  GRPC_CLOSURE_SCHED(&exec_ctx, &a->closure, GRPC_ERROR_NONE);
  grpc_exec_ctx_finish(&exec_ctx);
}

size_t grpc_resource_quota_peek_size(grpc_resource_quota* resource_quota) {
  return (size_t)gpr_atm_no_barrier_load(&resource_quota->last_size);
}

/*******************************************************************************
 * grpc_resource_user channel args api
 */

grpc_resource_quota* grpc_resource_quota_from_channel_args(
    const grpc_channel_args* channel_args) {
  for (size_t i = 0; i < channel_args->num_args; i++) {
    if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_RESOURCE_QUOTA)) {
      if (channel_args->args[i].type == GRPC_ARG_POINTER) {
        return grpc_resource_quota_ref_internal(
            (grpc_resource_quota*)channel_args->args[i].value.pointer.p);
      } else {
        gpr_log(GPR_DEBUG, GRPC_ARG_RESOURCE_QUOTA " should be a pointer");
      }
    }
  }
  return grpc_resource_quota_create(nullptr);
}

static void* rq_copy(void* rq) {
  grpc_resource_quota_ref((grpc_resource_quota*)rq);
  return rq;
}

static void rq_destroy(grpc_exec_ctx* exec_ctx, void* rq) {
  grpc_resource_quota_unref_internal(exec_ctx, (grpc_resource_quota*)rq);
}

static int rq_cmp(void* a, void* b) { return GPR_ICMP(a, b); }

const grpc_arg_pointer_vtable* grpc_resource_quota_arg_vtable(void) {
  static const grpc_arg_pointer_vtable vtable = {rq_copy, rq_destroy, rq_cmp};
  return &vtable;
}

/*******************************************************************************
 * grpc_resource_user api
 */

grpc_resource_user* grpc_resource_user_create(
    grpc_resource_quota* resource_quota, const char* name) {
  grpc_resource_user* resource_user =
      (grpc_resource_user*)gpr_malloc(sizeof(*resource_user));
  resource_user->resource_quota =
      grpc_resource_quota_ref_internal(resource_quota);
  GRPC_CLOSURE_INIT(&resource_user->allocate_closure, &ru_allocate,
                    resource_user,
                    grpc_combiner_scheduler(resource_quota->combiner));
  GRPC_CLOSURE_INIT(&resource_user->add_to_free_pool_closure,
                    &ru_add_to_free_pool, resource_user,
                    grpc_combiner_scheduler(resource_quota->combiner));
  GRPC_CLOSURE_INIT(&resource_user->post_reclaimer_closure[0],
                    &ru_post_benign_reclaimer, resource_user,
                    grpc_combiner_scheduler(resource_quota->combiner));
  GRPC_CLOSURE_INIT(&resource_user->post_reclaimer_closure[1],
                    &ru_post_destructive_reclaimer, resource_user,
                    grpc_combiner_scheduler(resource_quota->combiner));
  GRPC_CLOSURE_INIT(&resource_user->destroy_closure, &ru_destroy, resource_user,
                    grpc_combiner_scheduler(resource_quota->combiner));
  gpr_mu_init(&resource_user->mu);
  gpr_atm_rel_store(&resource_user->refs, 1);
  gpr_atm_rel_store(&resource_user->shutdown, 0);
  resource_user->free_pool = 0;
  grpc_closure_list_init(&resource_user->on_allocated);
  resource_user->allocating = false;
  resource_user->added_to_free_pool = false;
  resource_user->reclaimers[0] = nullptr;
  resource_user->reclaimers[1] = nullptr;
  resource_user->new_reclaimers[0] = nullptr;
  resource_user->new_reclaimers[1] = nullptr;
  resource_user->outstanding_allocations = 0;
  for (int i = 0; i < GRPC_RULIST_COUNT; i++) {
    resource_user->links[i].next = resource_user->links[i].prev = nullptr;
  }
  if (name != nullptr) {
    resource_user->name = gpr_strdup(name);
  } else {
    gpr_asprintf(&resource_user->name, "anonymous_resource_user_%" PRIxPTR,
                 (intptr_t)resource_user);
  }
  return resource_user;
}

grpc_resource_quota* grpc_resource_user_quota(
    grpc_resource_user* resource_user) {
  return resource_user->resource_quota;
}

static void ru_ref_by(grpc_resource_user* resource_user, gpr_atm amount) {
  GPR_ASSERT(amount > 0);
  GPR_ASSERT(gpr_atm_no_barrier_fetch_add(&resource_user->refs, amount) != 0);
}

static void ru_unref_by(grpc_exec_ctx* exec_ctx,
                        grpc_resource_user* resource_user, gpr_atm amount) {
  GPR_ASSERT(amount > 0);
  gpr_atm old = gpr_atm_full_fetch_add(&resource_user->refs, -amount);
  GPR_ASSERT(old >= amount);
  if (old == amount) {
    GRPC_CLOSURE_SCHED(exec_ctx, &resource_user->destroy_closure,
                       GRPC_ERROR_NONE);
  }
}

void grpc_resource_user_ref(grpc_resource_user* resource_user) {
  ru_ref_by(resource_user, 1);
}

void grpc_resource_user_unref(grpc_exec_ctx* exec_ctx,
                              grpc_resource_user* resource_user) {
  ru_unref_by(exec_ctx, resource_user, 1);
}

void grpc_resource_user_shutdown(grpc_exec_ctx* exec_ctx,
                                 grpc_resource_user* resource_user) {
  if (gpr_atm_full_fetch_add(&resource_user->shutdown, 1) == 0) {
    GRPC_CLOSURE_SCHED(
        exec_ctx,
        GRPC_CLOSURE_CREATE(
            ru_shutdown, resource_user,
            grpc_combiner_scheduler(resource_user->resource_quota->combiner)),
        GRPC_ERROR_NONE);
  }
}

void grpc_resource_user_alloc(grpc_exec_ctx* exec_ctx,
                              grpc_resource_user* resource_user, size_t size,
                              grpc_closure* optional_on_done) {
  gpr_mu_lock(&resource_user->mu);
  ru_ref_by(resource_user, (gpr_atm)size);
  resource_user->free_pool -= (int64_t)size;
  resource_user->outstanding_allocations += (int64_t)size;
  if (GRPC_TRACER_ON(grpc_resource_quota_trace)) {
    gpr_log(GPR_DEBUG, "RQ %s %s: alloc %" PRIdPTR "; free_pool -> %" PRId64,
            resource_user->resource_quota->name, resource_user->name, size,
            resource_user->free_pool);
  }
  if (resource_user->free_pool < 0) {
    grpc_closure_list_append(&resource_user->on_allocated, optional_on_done,
                             GRPC_ERROR_NONE);
    if (!resource_user->allocating) {
      resource_user->allocating = true;
      GRPC_CLOSURE_SCHED(exec_ctx, &resource_user->allocate_closure,
                         GRPC_ERROR_NONE);
    }
  } else {
    resource_user->outstanding_allocations -= (int64_t)size;
    GRPC_CLOSURE_SCHED(exec_ctx, optional_on_done, GRPC_ERROR_NONE);
  }
  gpr_mu_unlock(&resource_user->mu);
}

void grpc_resource_user_free(grpc_exec_ctx* exec_ctx,
                             grpc_resource_user* resource_user, size_t size) {
  gpr_mu_lock(&resource_user->mu);
  bool was_zero_or_negative = resource_user->free_pool <= 0;
  resource_user->free_pool += (int64_t)size;
  if (GRPC_TRACER_ON(grpc_resource_quota_trace)) {
    gpr_log(GPR_DEBUG, "RQ %s %s: free %" PRIdPTR "; free_pool -> %" PRId64,
            resource_user->resource_quota->name, resource_user->name, size,
            resource_user->free_pool);
  }
  bool is_bigger_than_zero = resource_user->free_pool > 0;
  if (is_bigger_than_zero && was_zero_or_negative &&
      !resource_user->added_to_free_pool) {
    resource_user->added_to_free_pool = true;
    GRPC_CLOSURE_SCHED(exec_ctx, &resource_user->add_to_free_pool_closure,
                       GRPC_ERROR_NONE);
  }
  gpr_mu_unlock(&resource_user->mu);
  ru_unref_by(exec_ctx, resource_user, (gpr_atm)size);
}

void grpc_resource_user_post_reclaimer(grpc_exec_ctx* exec_ctx,
                                       grpc_resource_user* resource_user,
                                       bool destructive,
                                       grpc_closure* closure) {
  GPR_ASSERT(resource_user->new_reclaimers[destructive] == nullptr);
  resource_user->new_reclaimers[destructive] = closure;
  GRPC_CLOSURE_SCHED(exec_ctx,
                     &resource_user->post_reclaimer_closure[destructive],
                     GRPC_ERROR_NONE);
}

void grpc_resource_user_finish_reclamation(grpc_exec_ctx* exec_ctx,
                                           grpc_resource_user* resource_user) {
  if (GRPC_TRACER_ON(grpc_resource_quota_trace)) {
    gpr_log(GPR_DEBUG, "RQ %s %s: reclamation complete",
            resource_user->resource_quota->name, resource_user->name);
  }
  GRPC_CLOSURE_SCHED(
      exec_ctx, &resource_user->resource_quota->rq_reclamation_done_closure,
      GRPC_ERROR_NONE);
}

void grpc_resource_user_slice_allocator_init(
    grpc_resource_user_slice_allocator* slice_allocator,
    grpc_resource_user* resource_user, grpc_iomgr_cb_func cb, void* p) {
  GRPC_CLOSURE_INIT(&slice_allocator->on_allocated, ru_allocated_slices,
                    slice_allocator, grpc_schedule_on_exec_ctx);
  GRPC_CLOSURE_INIT(&slice_allocator->on_done, cb, p,
                    grpc_schedule_on_exec_ctx);
  slice_allocator->resource_user = resource_user;
}

void grpc_resource_user_alloc_slices(
    grpc_exec_ctx* exec_ctx,
    grpc_resource_user_slice_allocator* slice_allocator, size_t length,
    size_t count, grpc_slice_buffer* dest) {
  slice_allocator->length = length;
  slice_allocator->count = count;
  slice_allocator->dest = dest;
  grpc_resource_user_alloc(exec_ctx, slice_allocator->resource_user,
                           count * length, &slice_allocator->on_allocated);
}

grpc_slice grpc_resource_user_slice_malloc(grpc_exec_ctx* exec_ctx,
                                           grpc_resource_user* resource_user,
                                           size_t size) {
  grpc_resource_user_alloc(exec_ctx, resource_user, size, nullptr);
  return ru_slice_create(resource_user, size);
}

redpajama_set_name: RedPajamaGithub


Howard P. Milstein, chairman of New York Private Bank & Trust and its operating bank, Emigrant Bank, was one of the millions of New Yorkers who watched in horror as swaths of the city were damaged and destroyed during Sandy, and while neighborhoods struggled to recover in the storm's aftermath.
"I used to go in the summer to Belle Harbor and Far Rockaway," said Mr. Milstein, whose mother grew up in that area. "I saw what was happening in reports: homes in several feet of water, first responders helping, the whole thing. And I personally identify with that area."
In response, Mr. Milstein, a developer and philanthropist, and Emigrant Bank recently donated more than $2.3 million to aid more than 2,000 first responders who were impacted by Sandy. The donation is now being administered by the New York City Police Foundation and FDNY Foundation and will be distributed over the holidays. The donation will send a $1,000 check to each of the first responders included.
"I did get a call saying: 'We added this up, and it's a lot money,'" he said. "I said I had done the math. These are the people that risk their lives to save others. They get paid something but when your life is saved, it's invaluable. And when they get devastated, nobody helps."
Mr. Milstein said he has long been affected by the role of the first responders around the country. Following the events of Sept. 11, 2001, he funded a program for police and firemen with post-traumatic stress disorder, and he made donations to those affected by Hurricane Katrina.
During Sandy, he said, some of his company's buildings in downtown New York were affected, and one is still closed. He spent much of the storm helping to keep the bank operating, he said, and helping to let customers know about any issues caused by Sandy.
"I had been thinking about the situation and where we should be pitching in," he said. "I thought the best thing to do in these circumstances is send money to the first responders. I hoped that this donation might well stimulate others into giving, and I know that that has been the case."


About Attorney Katheryn Haywood | Goheen & O'Toole, P.L.L.C.
When you're charged with a serious criminal offense, you may feel anxious, scared, angry, confused, or a whole host of other emotions. The sooner you begin to assemble your defense team the quicker these emotions can be settled. Katheryn Haywood is a key component of your defense team at Goheen & O'Toole, P.L.L.C.
With over 20 years of experience, Katheryn has defended every type of case. She's capable of handling simple shop lifting charges to the most serious of charges, sexual assault of a child. Katheryn uses her experience as an assistant city attorney, assistant district attorney, and a municipal judge to help formulate the best defense for you no matter the charges you're facing. Her practical knowledge she's gained from over 300 jury trials gives her the ability to represent you regardless of what you may be facing. She excels at some of the most complicated felony cases, including sexual assault, child abuse, murder, aggravated assault and narcotics charges.
As a native Texan, Katheryn has been defending the underdog from a young age. Growing up she often found herself standing up for those accused of false accusations, those who were bullied, or simply those who couldn't always help themselves. As a Texas A&M graduate, Katheryn kept the ideals of defending what is right through her undergraduate education. After her time in Aggieland, Katheryn went on to Baylor University School of Law. Known for producing some of the best trial attorneys in Texas, Katheryn uses her education to help those who need a strong voice in court.
Finding yourself in a position facing serious criminal charges means you want someone who knows how to win, and Katheryn does just that. Katheryn makes herself available to every client, spending countless hours devising the plan that will best ensure they're successful in their criminal charge.


The service has a number of features, with an emphasis on control and administration through the web, removing the burden from your IT team. The system can be configured quickly according to your organisation's changing requirements, whilst your employees can manage calls easily and effectively.
Hosted Telephony from Taylor Made is an on-demand service with no hidden costs. Only pay for what you need on a simple per-user basis and as there is no need to buy a PBX, there is a minimal hardware investment required.
Control and administration are simple via an easy-to-use web portal, further removing the burden from your IT team.
Benefit from free site-to-site calls (even across international boundaries) and lower call rates than with a traditional system, further reducing costs.
You can also improve the productivity of your workforce through hot-desking, remote working and extend the service to mobile devices, to ensure you never miss a call – even during unexpected events such as snow, flood or forced office closures. Hosted Telephony ensures your business can carry on making and taking calls in the event of disruption, as part of your disaster recovery plan.
With Hosted Telephony you are able to keep your existing numbers or choose new ones, you have complete control. You can even use any local area number, no matter where you are located.
Our Hosted Telephony is provided by Gamma, recognised industry leaders and one of the UK's largest providers of voice services, utilising their own 3-ring network to ensure a quality, reliable telephony service. A dedicated IP connection is even provided by Gamma as part of the service, complete with SLA to ensure connectivity at all times.
Support for Hosted Telephony is available when you need it from our ServiceDesk team, backed up by Gamma's own service desk when escalations are required, and all maintenance and upgrades are provided by our friendly team of engineers.
Hosted Telephony is ideal for any sized business looking for a cost-effective telephony solution with enhanced features that will improve productivity and disaster recovery capabilities.
A team of consultants will work closely with you to understand your business needs.
There is no hidden cost with the on-demand service. You only pay for what you need on a simple per user basis.
You will never miss a call again, one number can reach your desk phone if you are in the office or your mobile while on the move.
You will have complete control. If you would like to keep any of your exisiting numbers or choose a new one, you can.


VIVID Sydney, with its enormous artworks and amazing instillations, is a crowd puller. This is how you can make the most of it.
Take a look at the incredible lights show at Sydney's Vivid Festival.
YOU never know who you're going to bump into among the crowd at Sydney's Vivid festival with cricket legend Glenn McGrath revealing to news.com.au he's a regular visitor.
But then with 1.7 million people expected to attend what is easily NSW's biggest festival, as well as the "world's largest festival of lights, music and ideas," there's bound to be some familiar faces in the crowd.
Tourism Minister Stuart Ayres said the festival, which starts on Friday evening, was so popular, it was now "in a completely different stratosphere" from its first season in 2008 when a mere 220,000 people attended.
He couldn't risk having a swipe at Melbourne's White Night festival, which has artistic similarities to Vivid, which runs for just one day rather than 23 as in Sydney.
Festival organisers are so concerned about overcrowding at this year's Vivid they've laid on thousands of extra trains as well as giving news.com.au some tips on how to make the festival as hassle free as possible.
"We invite light artists from around the world — old and young, famous and unknown, students and professors, and crazy combinations of both — to submit their artwork to us through a global expression of interest," said creative director Ignatius Jones.
The big draws, as in all years, are the light projections on Sydney's landmarks. The Museum of Contemporary Art becomes a giant easel featuring splashes of acrylic and oil paints while Customs House tells 'Sydney's hidden story' through the journey of adventurous blue-tongued lizards.
The Opera House is always the centrepiece. This year, its sails will be lit with 'Songlines', an artwork inspired by the ancient Dreaming tracks that weave across the landscape and skies, featuring the work of six renowned indigenous artists.
There's light installations, such as one at Cadman's Cottage, where you can manipulate the image by swinging your arms and even a love-o-meter that shines brighter and brighter depending on how much people extol their undying devotion to one another.
Alongside the lights there is also a program of debates, talks and musical events.
McGrath said he visits Vivid annually, but this year he has a special reason from coming as a picture of his late wife Jane, and other people who have battled cancer, will form one of the light shows.
Hundreds of images sent in by people who have been touched by cancer will be projected onto the side of the AMP Tower at Circular Quay, part of a special installation from the McGrath Foundation which aims to provide a message of support for people with breast cancer.
"We always come in every year — my daughter Holly loves it — so to see her mum up there is pretty special," McGrath told news.com.au.
Vivid Sydney can be seen all over central Sydney and beyond. But how can you make the most of the spectacular show?
Sandra Chipchase, the CEO of Destination NSW, the government body that organises the festival, and Executive Director of Vivid Sydney, gave news.com.au her tips.
This is in addition to Martin Place, a new zone in recent years and even suburbs as far afield as Chatswood on the city's north shore.
Vivid Sydney runs from 27 May to 18 June. For more information visit the Vivid Sydney website.


text:
Q: Seperate Signal Planes in Eagle I am trying to make separate signal planes in eagle using the polygon tool. The problem is that when I draw the first polygon, regardless of whether I draw it small or large once I name it to GND and hit the "Ratsnest" tool, it will just occupy the whole space of the PCB leaving no space for other planes. How can I fix that?
Also I need one of the planes to be exposed copper, by drawing a polygon on either the bstop or tstop layers, I am getting what I need. The problem is that I don't know how to connect it to another part (say a transistor)?

A: Give each one a seperate rank (found in the properties dialogue). The lower the number the higher the priority. So a polygon of rank 1 will be drawn first, then ones with a rank of 2 will be drawn next (being cut away by the higher priority polygon outlines).
This will allow you to have polygons inside polygons.

The second part of your question, if you name the polygon with the same name as the net you want it to connect to, then you can just route a trace staring from anywhere within the polygon and Eagle will know they are meant to be connected.

redpajama_set_name: RedPajamaStackExchange


text:
package com.amazonaws.services.costandusagereport;

import static java.util.concurrent.Executors.newFixedThreadPool;

import javax.annotation.Generated;

import com.amazonaws.services.costandusagereport.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import com.amazonaws.ClientConfiguration;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import java.util.concurrent.ExecutorService;
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;

/**
 * Client for accessing AWS Cost and Usage Report Service asynchronously. Each asynchronous method will return a Java
 * Future object representing the asynchronous operation; overloads which accept an {@code AsyncHandler} can be used to
 * receive notification when an asynchronous operation completes.
 *

 *

 * The AWS Cost and Usage Report API enables you to programmatically create, query, and delete AWS Cost and Usage report
 * definitions.
 *

 *

 * AWS Cost and Usage reports track the monthly AWS costs and usage associated with your AWS account. The report
 * contains line items for each unique combination of AWS product, usage type, and operation that your AWS account uses.
 * You can configure the AWS Cost and Usage report to show only the data that you want, using the AWS Cost and Usage
 * API.
 *

 *

 * Service Endpoint
 *

 *

 * The AWS Cost and Usage Report API provides the following endpoint:
 *

 *

 *

 *

 * cur.us-east-1.amazonaws.com
 *

 *

 *

 */
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSCostAndUsageReportAsyncClient extends AWSCostAndUsageReportClient implements AWSCostAndUsageReportAsync {

    private static final int DEFAULT_THREAD_POOL_SIZE = 50;

    private final java.util.concurrent.ExecutorService executorService;

    /**
     * Constructs a new asynchronous client to invoke service methods on AWS Cost and Usage Report Service. A
     * credentials provider chain will be used that searches for credentials in this order:
     *

     *
Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY

     *
Java System Properties - aws.accessKeyId and aws.secretKey

     *
Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI

     *
Instance profile credentials delivered through the Amazon EC2 metadata service

     *

     *

     * Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default
     * maximum number of concurrent connections to the service).
     *
     * @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain
     * @see java.util.concurrent.Executors#newFixedThreadPool(int)
     * @deprecated use {@link AWSCostAndUsageReportAsyncClientBuilder#defaultClient()}
     */
    @Deprecated
    public AWSCostAndUsageReportAsyncClient() {
        this(DefaultAWSCredentialsProviderChain.getInstance());
    }

    /**
     * Constructs a new asynchronous client to invoke service methods on AWS Cost and Usage Report Service. A
     * credentials provider chain will be used that searches for credentials in this order:
     *

     *
Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY

     *
Java System Properties - aws.accessKeyId and aws.secretKey

     *
Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI

     *
Instance profile credentials delivered through the Amazon EC2 metadata service

     *

     *

     * Asynchronous methods are delegated to a fixed-size thread pool containing a number of threads equal to the
     * maximum number of concurrent connections configured via {@code ClientConfiguration.getMaxConnections()}.
     *
     * @param clientConfiguration
     *        The client configuration options controlling how this client connects to AWS Cost and Usage Report Service
     *        (ex: proxy settings, retry counts, etc).
     *
     * @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain
     * @see java.util.concurrent.Executors#newFixedThreadPool(int)
     * @deprecated use {@link AWSCostAndUsageReportAsyncClientBuilder#withClientConfiguration(ClientConfiguration)}
     */
    @Deprecated
    public AWSCostAndUsageReportAsyncClient(ClientConfiguration clientConfiguration) {
        this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections()));
    }

    /**
     * Constructs a new asynchronous client to invoke service methods on AWS Cost and Usage Report Service using the
     * specified AWS account credentials.
     *

     * Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default
     * maximum number of concurrent connections to the service).
     *
     * @param awsCredentials
     *        The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
     * @see java.util.concurrent.Executors#newFixedThreadPool(int)
     * @deprecated use {@link AWSCostAndUsageReportAsyncClientBuilder#withCredentials(AWSCredentialsProvider)}
     */
    @Deprecated
    public AWSCostAndUsageReportAsyncClient(AWSCredentials awsCredentials) {
        this(awsCredentials, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE));
    }

    /**
     * Constructs a new asynchronous client to invoke service methods on AWS Cost and Usage Report Service using the
     * specified AWS account credentials and executor service. Default client settings will be used.
     *
     * @param awsCredentials
     *        The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
     * @param executorService
     *        The executor service by which all asynchronous requests will be executed.
     * @deprecated use {@link AWSCostAndUsageReportAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
     *             {@link AWSCostAndUsageReportAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
     */
    @Deprecated
    public AWSCostAndUsageReportAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService) {

        this(awsCredentials, configFactory.getConfig(), executorService);
    }

    /**
     * Constructs a new asynchronous client to invoke service methods on AWS Cost and Usage Report Service using the
     * specified AWS account credentials, executor service, and client configuration options.
     *
     * @param awsCredentials
     *        The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
     * @param clientConfiguration
     *        Client configuration options (ex: max retry limit, proxy settings, etc).
     * @param executorService
     *        The executor service by which all asynchronous requests will be executed.
     * @deprecated use {@link AWSCostAndUsageReportAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
     *             {@link AWSCostAndUsageReportAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and
     *             {@link AWSCostAndUsageReportAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
     */
    @Deprecated
    public AWSCostAndUsageReportAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService) {
        super(awsCredentials, clientConfiguration);
        this.executorService = executorService;
    }

    /**
     * Constructs a new asynchronous client to invoke service methods on AWS Cost and Usage Report Service using the
     * specified AWS account credentials provider. Default client settings will be used.
     *

     * Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default
     * maximum number of concurrent connections to the service).
     *
     * @param awsCredentialsProvider
     *        The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
     * @see java.util.concurrent.Executors#newFixedThreadPool(int)
     * @deprecated use {@link AWSCostAndUsageReportAsyncClientBuilder#withCredentials(AWSCredentialsProvider)}
     */
    @Deprecated
    public AWSCostAndUsageReportAsyncClient(AWSCredentialsProvider awsCredentialsProvider) {
        this(awsCredentialsProvider, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE));
    }

    /**
     * Constructs a new asynchronous client to invoke service methods on AWS Cost and Usage Report Service using the
     * provided AWS account credentials provider and client configuration options.
     *

     * Asynchronous methods are delegated to a fixed-size thread pool containing a number of threads equal to the
     * maximum number of concurrent connections configured via {@code ClientConfiguration.getMaxConnections()}.
     *
     * @param awsCredentialsProvider
     *        The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
     * @param clientConfiguration
     *        Client configuration options (ex: max retry limit, proxy settings, etc).
     *
     * @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain
     * @see java.util.concurrent.Executors#newFixedThreadPool(int)
     * @deprecated use {@link AWSCostAndUsageReportAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
     *             {@link AWSCostAndUsageReportAsyncClientBuilder#withClientConfiguration(ClientConfiguration)}
     */
    @Deprecated
    public AWSCostAndUsageReportAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) {
        this(awsCredentialsProvider, clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections()));
    }

    /**
     * Constructs a new asynchronous client to invoke service methods on AWS Cost and Usage Report Service using the
     * specified AWS account credentials provider and executor service. Default client settings will be used.
     *
     * @param awsCredentialsProvider
     *        The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
     * @param executorService
     *        The executor service by which all asynchronous requests will be executed.
     * @deprecated use {@link AWSCostAndUsageReportAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
     *             {@link AWSCostAndUsageReportAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
     */
    @Deprecated
    public AWSCostAndUsageReportAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService) {
        this(awsCredentialsProvider, configFactory.getConfig(), executorService);
    }

    /**
     * Constructs a new asynchronous client to invoke service methods on AWS Cost and Usage Report Service using the
     * specified AWS account credentials provider, executor service, and client configuration options.
     *
     * @param awsCredentialsProvider
     *        The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
     * @param clientConfiguration
     *        Client configuration options (ex: max retry limit, proxy settings, etc).
     * @param executorService
     *        The executor service by which all asynchronous requests will be executed.
     * @deprecated use {@link AWSCostAndUsageReportAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and
     *             {@link AWSCostAndUsageReportAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and
     *             {@link AWSCostAndUsageReportAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)}
     */
    @Deprecated
    public AWSCostAndUsageReportAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration,
            ExecutorService executorService) {
        super(awsCredentialsProvider, clientConfiguration);
        this.executorService = executorService;
    }

    public static AWSCostAndUsageReportAsyncClientBuilder asyncBuilder() {
        return AWSCostAndUsageReportAsyncClientBuilder.standard();
    }

    /**
     * Constructs a new asynchronous client to invoke service methods on AWS Cost and Usage Report Service using the
     * specified parameters.
     *
     * @param asyncClientParams
     *        Object providing client parameters.
     */
    AWSCostAndUsageReportAsyncClient(AwsAsyncClientParams asyncClientParams) {
        this(asyncClientParams, false);
    }

    /**
     * Constructs a new asynchronous client to invoke service methods on AWS Cost and Usage Report Service using the
     * specified parameters.
     *
     * @param asyncClientParams
     *        Object providing client parameters.
     * @param endpointDiscoveryEnabled
     *        true will enable endpoint discovery if the service supports it.
     */
    AWSCostAndUsageReportAsyncClient(AwsAsyncClientParams asyncClientParams, boolean endpointDiscoveryEnabled) {
        super(asyncClientParams, endpointDiscoveryEnabled);
        this.executorService = asyncClientParams.getExecutor();
    }

    /**
     * Returns the executor service used by this client to execute async requests.
     *
     * @return The executor service used by this client to execute async requests.
     */
    public ExecutorService getExecutorService() {
        return executorService;
    }

    @Override
    public java.util.concurrent.Future<DeleteReportDefinitionResult> deleteReportDefinitionAsync(DeleteReportDefinitionRequest request) {

        return deleteReportDefinitionAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DeleteReportDefinitionResult> deleteReportDefinitionAsync(final DeleteReportDefinitionRequest request,
            final com.amazonaws.handlers.AsyncHandler<DeleteReportDefinitionRequest, DeleteReportDefinitionResult> asyncHandler) {
        final DeleteReportDefinitionRequest finalRequest = beforeClientExecution(request);

        return executorService.submit(new java.util.concurrent.Callable<DeleteReportDefinitionResult>() {
            @Override
            public DeleteReportDefinitionResult call() throws Exception {
                DeleteReportDefinitionResult result = null;

                try {
                    result = executeDeleteReportDefinition(finalRequest);
                } catch (Exception ex) {
                    if (asyncHandler != null) {
                        asyncHandler.onError(ex);
                    }
                    throw ex;
                }

                if (asyncHandler != null) {
                    asyncHandler.onSuccess(finalRequest, result);
                }
                return result;
            }
        });
    }

    @Override
    public java.util.concurrent.Future<DescribeReportDefinitionsResult> describeReportDefinitionsAsync(DescribeReportDefinitionsRequest request) {

        return describeReportDefinitionsAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DescribeReportDefinitionsResult> describeReportDefinitionsAsync(final DescribeReportDefinitionsRequest request,
            final com.amazonaws.handlers.AsyncHandler<DescribeReportDefinitionsRequest, DescribeReportDefinitionsResult> asyncHandler) {
        final DescribeReportDefinitionsRequest finalRequest = beforeClientExecution(request);

        return executorService.submit(new java.util.concurrent.Callable<DescribeReportDefinitionsResult>() {
            @Override
            public DescribeReportDefinitionsResult call() throws Exception {
                DescribeReportDefinitionsResult result = null;

                try {
                    result = executeDescribeReportDefinitions(finalRequest);
                } catch (Exception ex) {
                    if (asyncHandler != null) {
                        asyncHandler.onError(ex);
                    }
                    throw ex;
                }

                if (asyncHandler != null) {
                    asyncHandler.onSuccess(finalRequest, result);
                }
                return result;
            }
        });
    }

    @Override
    public java.util.concurrent.Future<ModifyReportDefinitionResult> modifyReportDefinitionAsync(ModifyReportDefinitionRequest request) {

        return modifyReportDefinitionAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ModifyReportDefinitionResult> modifyReportDefinitionAsync(final ModifyReportDefinitionRequest request,
            final com.amazonaws.handlers.AsyncHandler<ModifyReportDefinitionRequest, ModifyReportDefinitionResult> asyncHandler) {
        final ModifyReportDefinitionRequest finalRequest = beforeClientExecution(request);

        return executorService.submit(new java.util.concurrent.Callable<ModifyReportDefinitionResult>() {
            @Override
            public ModifyReportDefinitionResult call() throws Exception {
                ModifyReportDefinitionResult result = null;

                try {
                    result = executeModifyReportDefinition(finalRequest);
                } catch (Exception ex) {
                    if (asyncHandler != null) {
                        asyncHandler.onError(ex);
                    }
                    throw ex;
                }

                if (asyncHandler != null) {
                    asyncHandler.onSuccess(finalRequest, result);
                }
                return result;
            }
        });
    }

    @Override
    public java.util.concurrent.Future<PutReportDefinitionResult> putReportDefinitionAsync(PutReportDefinitionRequest request) {

        return putReportDefinitionAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<PutReportDefinitionResult> putReportDefinitionAsync(final PutReportDefinitionRequest request,
            final com.amazonaws.handlers.AsyncHandler<PutReportDefinitionRequest, PutReportDefinitionResult> asyncHandler) {
        final PutReportDefinitionRequest finalRequest = beforeClientExecution(request);

        return executorService.submit(new java.util.concurrent.Callable<PutReportDefinitionResult>() {
            @Override
            public PutReportDefinitionResult call() throws Exception {
                PutReportDefinitionResult result = null;

                try {
                    result = executePutReportDefinition(finalRequest);
                } catch (Exception ex) {
                    if (asyncHandler != null) {
                        asyncHandler.onError(ex);
                    }
                    throw ex;
                }

                if (asyncHandler != null) {
                    asyncHandler.onSuccess(finalRequest, result);
                }
                return result;
            }
        });
    }

    /**
     * Shuts down the client, releasing all managed resources. This includes forcibly terminating all pending
     * asynchronous service calls. Clients who wish to give pending asynchronous service calls time to complete should
     * call {@code getExecutorService().shutdown()} followed by {@code getExecutorService().awaitTermination()} prior to
     * calling this method.
     */
    @Override
    public void shutdown() {
        super.shutdown();
        executorService.shutdownNow();
    }
}


Interstate regulations provide for quarantine, restriction of movement, maintenance of sanitation, and identification of animals to prevent the spread of animal disease. Accredited veterinarians certify livestock, birds, and poultry for intrastate and interstate transportation according to the regulations in Title 9 Code of Federal Regulations (9 CFR). Individual States provide certificates of veterinary inspection that are available from the State animal health official.
Interstate transportation of animals (including poultry) and animal products must conform to the requirements in 9 CFR, chapter 1, subchapter C, parts 70 through 89. Most States have additional animal-entry requirements. These requirements, as well as intrastate transportation regulations, can be obtained from the appropriate State animal health official.
To facilitate the movement of livestock and poultry and to prevent the spread of disease, you as an accredited veterinarian are responsible for becoming familiar with the appropriate State and Federal movement regulations. You should inspect and or examine animals or poultry according to these regulations and any additional instructions given by your State animal health official or VS Area Office and provide a complete and legible certificate of veterinary inspection (CVI).
The following sections summarize pertinent areas of 9 CFR and State requirements. Because the regulations are subject to change, this information should be verified. (See appendix B for contacts in the State of destination.) An entry permit may also be required from the State of destination.
Interstate movement of diseased animals and poultry is generally prohibited, 9 CFR Part 71.3.
Animals or poultry affected with any of the following diseases endemic to the United States shall not be moved to another State except as provided for in the CFR: equine babesiosis (piroplasmosis), bovine piroplasmosis or splenetic fever, scabies in cattle, acute swine erysipelas, tuberculosis, Johne's disease, brucellosis, scrapie, bluetongue, anthrax, psittacosis or ornithosis, poultry disease caused by Salmonella enterica serotype enteritidis, and Newcastle disease, or any other communicable disease that is endemic to the United States. Also, animals that are infested with the Boophilus tick are not to move interstate.
Animals or poultry affected with any of the following diseases not known to exist in the United States shall not be moved interstate: foot-and-mouth disease, hog cholera (classical swine fever), rinderpest, contagious bovine pleuropneumonia, European fowl pest, dourine, vesicular exanthema, screwworm, glanders, scabies in sheep, or any other communicable disease exotic to the United States.


Exciting experiences for you to discover.
Earn lifestyle points as you and the friends you have introduced order online.
Earn 'Lifestyle Points' when friends join the SINTILLATE community. When those friends spend, you will also be rewarded with Lifestyle Points! You can use your 'LifeStyle Points' to discover new experiences - from Free Entry to one of our selected Clubs to a complete all expenses paid trip to one of parties abroad. See below and start living your life!
Receive 100 lifestyle points when you join the Sintillate community.
Receive 50 lifestyle points for every friend that joins the Sintillate community. Copy your unique agent link to Twitter, Facebook, Instagram ... OR use the 'Earn Your Lifestyle' share box on the right of every page once signed in.
Earn lifestyle points as you and the members you have introduced order online.
Receive 50 lifestyle points for every £100 your friends spend on an order.
Receive 100 lifestyle points for every £100 you spend on an order.
SINTILLATE community for FREE and gain access to the Sintillate rewards.