content
stringlengths
10
4.9M
// DeleteWorkload removes workload from db func (b *BoltDB) DeleteWorkload(w *workload.RDTWorkLoad) error { return b.session.Update(func(tx *bolt.Tx) error { b := tx.Bucket([]byte(WorkloadTableName)) return b.Delete([]byte(w.ID)) }) }
// Unmarshal takes an interface{} representing the configuration and parses it // to populate a Config struct // // The interface{} is expected to be a map[string]interface{}, such as those // created when calling Unmarshal([]byte, interface) by passing a pointer to // the interface as the second argument. This makes it easy to use // configurations from multiple different kinds of configuration files, // including JSON, YAML, and TOML, as well as programmatically creating them // in a Go program using this as a library. func (c *Config) Unmarshal(conf interface{}) (err error) { c.plugins = make(map[string]*handler.Plugin) c.handlers = make(map[string][]handler.Handler) c.Logger = &l.Logger{} c.hMutex = sync.RWMutex{} c.fWatcher, err = fsnotify.NewWatcher() if err != nil { return err } data, err := parse.MapStringKeys(conf) if err != nil { return fmt.Errorf("could not unmarshal config as map: %s", err) } if data == nil { return errors.New("configuration map cannot be nil") } c.MaxFileSize, err = parse.Int64OrDefault(data[LabelMaxFileSize], DefaultMaxFileSize) if err != nil { return fmt.Errorf(e.ErrConfigItem, LabelMaxFileSize, err) } if c.MaxFileSize < 0 { return fmt.Errorf("%s must be non-negative", LabelMaxFileSize) } c.Port, err = parse.Int64OrDefault(data[LabelPort], DefaultPort) if err != nil { return fmt.Errorf(e.ErrConfigItem, LabelPort, err) } c.PluginDir, err = parse.StringOrDefault(data[LabelPluginDir], DefaultPluginDir) if err != nil { return fmt.Errorf(e.ErrConfigItem, LabelPluginDir, err) } if err = c.unmarshalLoggers(data); err != nil { return err } return c.unmarshalHandlers(data) }
A preliminary study of the ocular hypotensive effects of bromocriptine in diabetic patients with autonomic neuropathy. The effect of bromocriptine on intraocular pressure has been investigated in a group of 8 diabetic patients with autonomic neuropathy, to test the hypothesis that bromocriptine exerts its ocular hypotensive action through presynaptic dopamine receptors. Bromocriptine eye drops (0.025%) produced a significant fall in intraocular pressure in a control group of 8 matched normal volunteers, but this effect was not seen in the eyes of the diabetic patients. These results are consistent with a presynaptic site of action of bromocriptine.
import { Message, MessageEmbed, ColorResolvable } from "discord.js"; import config from "../../config.json"; const properties = { name: "coinflip", description: "Test your luck & flip a coin!", args: [] }; const run = (message: Message): Promise<void> => { const chance = Math.random(); const embed: MessageEmbed = new MessageEmbed(); embed.setColor(config.color as ColorResolvable); embed.setTitle("You've flipped a coin!"); if(chance >= 0.5) embed.setDescription("You've landed on heads!"); else embed.setDescription("You've landed on tails!"); embed.setThumbnail("https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fimage.flaticon.com%2Ficons%2Fpng%2F512%2F217%2F217853.png&f=1&nofb=1"); message.channel.send(embed); return; }; /* eslint-disable */ exports.properties = properties; exports.run = run; /* eslint-enable */
// +build integration package braintree import ( "context" "testing" ) func TestDiscounts(t *testing.T) { t.Parallel() ctx := context.Background() discounts, err := testGateway.Discount().All(ctx) if err != nil { t.Error(err) } else if len(discounts) != 1 { t.Fatalf("expected to retrieve 1 discount, retrieved %d", len(discounts)) } discount := discounts[0] t.Log(discount) if discount.Id != "test_discount" { t.Fatalf("expected Id to be %s, was %s", "test_discount", discount.Id) } else if discount.Amount.Cmp(NewDecimal(1000, 2)) != 0 { t.Fatalf("expected Amount to be %s, was %s", NewDecimal(1000, 2), discount.Amount) } else if discount.Kind != ModificationKindDiscount { t.Fatalf("expected Kind to be %s, was %s", ModificationKindDiscount, discount.Kind) } else if discount.Name != "test_discount_name" { t.Fatalf("expected Name to be %s, was %s", "test_discount_name", discount.Name) } else if discount.NeverExpires != true { t.Fatalf("expected NeverExpires to be %t, was %t", true, discount.NeverExpires) } else if discount.CurrentBillingCycle != 0 { t.Fatalf("expected current billing cycle to be %d, was %d", 0, discount.CurrentBillingCycle) } else if discount.Description != "A test discount" { t.Fatalf("expected Description to be %s, was %s", "A test discount", discount.Description) } }
Organization Name : Imagination Foundation Website : imagination.is Indicator Please select the one indicator that is most relevant to your project or organization: Education What is your idea and how will it impact your indicator? : 10,000 children in Los Angeles will start their 2013 school year by participating in the Caine’s Arcade Challenge. Hosted by the Imagination Foundation and inspired by the short film, “Caine’s Arcade,” this Challenge will foster creativity and celebrate the imagination of children by inviting elementary and middle school-aged youth to design and build fun and engaging arcade games made from cardboard, recycled materials and imagination. “Caine’s Arcade” has been widely cited as one of the most inspirational stories of 2012. The film has received nearly 8 million views, trended worldwide on Twitter, gathered a Facebook community of 130,000+ fans, and inspired a wave of cardboard creativity in backyards and classrooms across the globe. During the month of September, children participating in the Caine’s Arcade Challenge will design and build cardboard arcades in schools all over the Southland; then on October 5th, commemorating the flashmob that came out to make Caine’s day in the short film, communities will come together and play. On this day, the “Day of Play,” children will operate their arcades to raise money to support various local causes, practicing the value of social entrepreneurship. And adults will learn the simple things they can do to foster a child’s creativity. Though focused on Los Angeles, the Caine’s Arcade Challenge will coincide with our Global Cardboard Challenge that will take place in 70 countries and serve 1 million children. Our first Global Cardboard Challenge was in 2012 and included a unique range of participants - from a school district in Texas to an Eco-Art Park in Uganda, from Adobe Offices in San Francisco to the Warehouse Project in Sri Lanka. Kids repurposed cardboard into games, toys, robots and spaceships - whatever they could imagine. Along the way they learned about teamwork, problem solving, creativity and the value of recycling. Watch footage from last year’s Challenge at: www.imagination.is/gcc_videos. The Caine’s Arcade Challenge will provide thousands of children in Los Angeles a crash course in creativity and social entrepreneurship. 500 teachers will learn effective project-based learning inspired by the Caine’s Arcade story, and thousands of members of the Los Angeles community will come out to play at cardboard arcades built by kids. During the Challenge, student participants will be part of a project-based learning environment of unprecedented scale that inspires invention and makes leaning fun. Students will engage in a simple process that develops creativity, and along the way, they will learn: Design Thinking, Math and Financial LIteracy, Engineering, Social Entrepreneurship and the value of Recycling. Where appropriate, all content standards will be aligned to the Common Core. Student learning will occur in a uniquely connected environment as children from Los Angeles will have opportunities to showcase their work along with children participating in the Global Challenge in other countries. Some classes will Skype with other classes as far away as Costa Rica, Uganda and Bali. Many of the classes participating in the Challenge will take field trips to the actual Caine’s Arcade site in Boyle Heights for hands-on inspiration and real world connection. The Challenge is designed as follows: - A 2-4 week project-based learning curriculum, conducted in the month of September, derived from the “Caine’s Arcade” short film, and aimed at fostering creative thinking and social entrepreneurship. - Field trips to the Caine’s Arcade site in Boyle Heights to enhance the learning experience and inspire participants. - The “Day of Play” on October 5 when children will operate their cardboard arcades and raise money for various local causes. - Professional development for teacher participants during August. - A Caine’s Arcade community website will showcase the Challenges, locate the arcades, and capture an expansive catalogue of content uploaded by Challenge participants. About the Imagination Foundation: The mission of the Imagination Foundation is to find, foster and fund creativity and entrepreneurship in children around the world to raise a new generation of innovators and problem solvers who have the tools they need to build the world they imagine. We accomplish our mission by building a worldwide movement that celebrates imagination and fosters creativity. To fuel this movement, we produce and amplify inspirational stories of creative children, orchestrate large-scale events, campaigns and challenges, and grow an ecosystem of rich content to equip teachers, parents and communities everywhere with the tools and knowledge they need to develop child creativity. What are some of your organization’s most important achievements to date? : On the last day of summer, through a chance encounter, filmmaker Nirvan Mullick met Caine Monroy, a 9-year-old boy who built an elaborate cardboard arcade inside his dad’s East LA auto parts shop. Nirvan was Caine’s first customer. Amazed by the boy’s creativity, Nirvan organized a flash mob of customers to surprise Caine and make his day. Then he made a film about it. The Imagination Foundation is a new organization, but is rapidly becoming the leader of a worldwide movement to foster creativity, imagination and entrepreneurship in children. The film that launched the Imagination Foundation, “Caine’s Arcade,” has been widely cited as one of the most inspirational stories of 2012. The film has received nearly 8 million views, trended worldwide on Twitter, gathered a Facebook community of 130,000+ fans, and inspired a wave of cardboard creativity in backyards and classrooms across the globe. The Christian Science Monitor calls the film a “great American story,” and Wired Magazine writes, “It’s a sweet story that brings viewers back to a time of potent imagination and creativity.” Our first Global Cardboard Challenge took place in October 2012, with thousands of participants in 41 countries on six continents. Please identify any partners or collaborators who will work with you on this project. : As a large-scale community event, the Caine’s Arcade Challenge will engage numerous stakeholders, including schools, districts, charter management organizations, community groups, colleges and universities, businesses, nonprofit organizations, government and elected offices, and general members of the Los Angeles community. Trash for Teaching will be able to provide recycled materials. Skype in the Classroom will help connect classes here in Los Angeles with classes in other parts of the world. Media partners, such as YouTube, will promote and feature Challenge activities. Please explain how you will evaluate your project. How will you measure success? : The success of the Caine’s Arcade Challenge will be measured by multiple factors, including: those that demonstrate the level and degree of participation in the Challenge; those that demonstrate the level of school engagement and attitudes toward school; those that demonstrate mastery of key standards related to creative thinking, problem solving and social entrepreneurship; and those that demonstrate mastery of STEM-related content (such as math and engineering). The scale of the Challenge is critical to its success, so we will track the number of participants across four major groups: children, teachers, schools and general members of the community who will attend the Day of Play at local cardboard arcades in their area. Success will also be measured by the amount of money raised by children operating their cardboard arcades on October 5, the Day of Play. The quality and amount of online content uploaded during the time period of the Challenge will be carefully tracked and managed to ensure an expansive web catalogue of Challenge activities. Built on top of a simple and robust open source platform, this website will register Challenge participants, provide participant content feeds for uploading and sharing relevant material, show the various cardboard arcade locations, and handle RSVP’s for local Day of Play events. Surveys to assess teacher satisfaction will be completed online. An assessment administered by teachers through a short online question bank will measure the proficiency of student participants with regard to appropriate Common Core standards outlined in the Caine’s Arcade curriculum, as well as unique standards that demonstrate an increase in creative thinking, Social Emotional Learning, and attitudes toward school. How will your project benefit Los Angeles? Please be specific. We envision a city in which creativity is a core social value and a critical skill developed in every child; where the innate passion, curiosity and creativity of children is nurtured in schools, homes and communities everywhere; where all children are taught to be creative thinkers and doers, and encouraged to make their very best ideas happen in the world. The Caine’s Arcade Challenge will celebrate and develop the creativity and social entrepreneurship of children on a grand scale throughout the Southland. The Challenge will also showcase the role adults can play in fostering these traits. Specifically, the Challenge will engage 10,000 children, 500 teachers, 100 schools, building over 100 cardboard arcades, and raising over $25,000 for local charitable causes. Student participants will become more creative, more entrepreneurial and more empathetic. Teacher participants will become more proficient at project-based learning and more networked to each other locally and globally. Other adult participants who attend events on the Day of Play will learn about the simple things they can do to foster creativity in children. The scale of the event will raise public awareness about the value of creativity. Over the course of the Challenge, project-based learning and social entrepreneurship will proliferate throughout the city. A website designed for the Challenge will capture content from the various participants: photos, videos, lesson plans, activity kits, blogs and other content will showcase the ingenuity of students and their teachers, and become sources for inspiration and the mass proliferation of project-based learning beyond the scope of the Challenge itself. What would success look like in the year 2050 regarding your indicator? : In 2050, creativity will be a core social value and a critical skill fostered and developed in every school and community. Creativity will be as fundamental to the education of our children as literacy, and schools will be designed accordingly. In 2050, we will have a thriving network of "Imagination Chapters" throughout LA County, and every school and community center will have devoted space for children to discover their passions and practice building the things they imagine. Angelenos - young and old - will face the challenges of our city with optimism, invention and creativity.
<filename>testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestApexSamplePolicyCreateModelFiles.java<gh_stars>1-10 /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ package org.onap.policy.apex.testsuites.integration.executor.handling; import static org.assertj.core.api.Assertions.assertThatCode; import org.junit.Test; import org.onap.policy.apex.model.basicmodel.test.TestApexModel; import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; public class TestApexSamplePolicyCreateModelFiles { @Test public void testModelWriteRead() throws Exception { String[] types = {"JAVA", "JAVASCRIPT", "JRUBY", "JYTHON", "MVEL"}; for (String type: types) { final TestApexSamplePolicyModelCreator apexPolicyModelCreator = new TestApexSamplePolicyModelCreator(type); final TestApexModel<AxPolicyModel> testApexPolicyModel = new TestApexModel<AxPolicyModel>(AxPolicyModel.class, apexPolicyModelCreator); assertThatCode(() -> testApexPolicyModel.testApexModelWriteReadXml()).doesNotThrowAnyException(); assertThatCode(() -> testApexPolicyModel.testApexModelWriteReadJson()).doesNotThrowAnyException(); } } }
<reponame>LiuLeif/onnc //===- X86ComputeVisitor.cpp ----------------------------------------------===// // // The ONNC Project // // See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "X86ComputeVisitor.h" using namespace onnc; class X86ConvRelu; bool X86ComputeVisitor::classof(const ComputeVisitor* pOp) { if (nullptr == pOp) return false; return (pOp->getVisitorID() == id()); }
Recently I saw Stuart Gordon’s play Taste, which was inspired by a real life incidence of cannibalism. “It is amazing to me that there is so much about cannibalism in the papers these days,” Gordon told me after the performance, “and when we first announced that we were going to do this the response to it was bigger than any play or movie I’ve ever done. It went through the roof. I felt like we were hitting a nerve here.” Gordon loves cooking shows so naturally he would be drawn to a play about people who eat each other. What excited Gordon about doing a play involving cannibalism was the “the idea of having a cooking show where you actually smell the cooking. That’s the thing the theater can do that movies can’t do is really engage the senses.” The play, written by Ben Brand, was a brilliant mix of subtlety and sensationalism. All this made me think about cannibal films. Cannibal films – in which people mindlessly slaughter and eat others or where carnage soaks the screen – are a dime a dozen. But films in which great care is taken with both the filmmaking and the preparation of human flesh for consumption are more rare. Since the French are renowned for food I will turn to them to help make this distinction clear. I would define the typical cannibal film as something suited for a gourmand, a ravenous and greedy eater, prone to excess, but not too discriminating in what he eats. But the gourmet cannibal film is for a connoisseur, a person with a discerning palate and who prefers items that are exotic or of high quality. So forget about the bloody excesses of Cannibal Holocaust or Texas Chainsaw Massacre and treat your palate to these elegant gourmet cannibal films. (NOTE: Some descriptions contain spoilers.) 1. The Cook The Thief His Wife and Her Lover (1989) Peter Greenaway’s delectable art house favorite serves up the perfect example of the gourmet cannibal film. Shot, superbly crafted, and stunningly acted, this film explores the extremes of human jealousy, cruelty, and revenge. Albert is a brutal crime boss who also owns a swanky restaurant with an artisan chef named Richard. Albert’s wife Georgina (played the the scrumptious Helen Mirren) grows bored with her brutish spouse and strikes up an affair with a kind bookseller. The cook covers for the lovers who sometimes conduct their covert affair in the restaurant bathroom as Albert consumes a meal. But Albert eventually catches on and murders his wife’s lover. Georgina comes to Richard and tells him, ‘He’s dead. They stuffed him with pages torn from his favorite book. Could you cook him?’ And so begins her revenge. Richard prepares the man’s corpse like a work of art and Georgina presents it to her husband, ‘Try the cock, Albert. It’s a delicacy, and you know where it’s been.’ Georgina concludes the film with the line: “Cannibal.” This is a four-star gourmet cannibal film. 2. Delicatessen (1991) Here’s another art house film that tackles cannibalism in an unexpected manner. French directors Jean-Pierre Jeunet and Marc Caro deliver an exquisitely crafted film about a post-apocalyptic world where food is scarce and cannibalism is rampant. The film takes place almost exclusively inside an apartment building where an enterprising butcher comes up with a clever plan to keep the tenants well stocked with meat. He keeps hiring handymen for the building and when the time is right, he butchers them and sells them as meat. His latest handyman is an unemployed clown and a vegetarian. The butcher’s daughter falls in love with him and enlists the aid of the Troglodytes, an under-the-ground vegetarian group that tries to save people from the cannibals. Jeunet and Caro are not interested in making a horror film or in showing gore. Their film is a delicious black comedy that’s surprisingly full of whimsy despite the flesh eating. 3. Parents (1989) Another black comedy on the subject of cannibalism is Bob Balaban’s Parents. Young Michael lives in a model ’50s suburban neighborhood with his parents (the perfectly cast Randy Quaid and Mary Beth Hurt). Everything seems perfectly Ozzie and Harriet on the surface but Michael is haunted by nightmares and an uneasy concern over where his cheerful parents get their meat. Imagine Ward Cleaver cooking flesh burgers on the grill and June serving them to the neighbors and you’ll get an idea of the perversely funny incongruity of the film. Balaban puts a glossy Technicolor surface on his disturbingly funny tale of suburban cannibals. 4. Silence of the Lambs (1991) / Hannibal (2001) The horror gets kicked up as well as the gourmet food preparation in a pair of films featuring Anthony Hopkins as Hannibal Lecter. In Silence of the Lambs, Hopkins has a memorable scene where he tells Jodie Foster’s FBI agent, “A census taker once tried to test me. I ate his liver with some fava beans and a nice chianti.” In the sequel Hannibal, we get to see Hopkins’ serial killer/gourmet cannibal prepare Ray Liotta’s brain for consumption. The nasty chef’s trick is that he slices off gray matter while the man is still alive and conscious. Hopkins makes these films a gourmet treat. 5. The Green Butchers (2003) The Danish film The Green Butchers returns us to a lighter tone and in an odd bit of irony stars Mads Mikkelsen (who now plays Hannibal on NBC’s TV series). The Green Butchers of the title are Svend and Bjarne, who decide to open their own shop to get away from their obnoxious boss Holger. Of course Holger comes by to mock them when no customers show up. But on a whim, their old boss orders some meat for a dinner party. In the meantime, Svend accidentally locks an electrician in the meat locker when he’s fixing the light and is in desperate need of disposing of the body. One thing leads to another and Svend ends up marinating the electrician’s leg and giving the meat to Holger for his party. The next day there’s a line around shop with people demanding “Svend’s chicky-wickies” (his euphemism for the human flesh marinated in his special sauce). Another charming and tastefully delivered tale on cannibalism. 6. We Are What We Are (2013) Cannibalism becomes a kind of religious ritual in Jim Mickle’s superb remake of the Mexican cannibal horror film Somos lo que hay. Mickle’s film gives us a reclusive family headed by patriarch Frank Parker (Bill Sage). He runs his family with fierce sense of conviction to his ancestral traditions. The film begins as his daughters are forced to assume some horrific family customs. The spin Mickle gives this tale of modern day cannibalism is to endow it with a religious, Puritan spin. He doesn’t shy away from gore but unlike the typical cannibal film he finds unexpected beauty in the brutality. 7. Titus (1999) There is really just one brief reference to cannibalism in Julie Taymor’s adaptation of Shakespeare’s Titus Andronicus but it’s so vivid and horrific yet elegantly executed that it merits inclusion here. This is one of Shakespeare’s bloodiest plays full of senseless violence and cruelty. At one point Titus (Anthony Hopkins once again serving human flesh) finally secures an opportunity to exact revenge on his bitter enemy Tamora. His choice of vengeance is particularly cruel and clever. He kills her sons and serves them to her in a pie. 8. The Untold Story (1993) This Category III (equivalent of the MPAA X or NC-17 rating) Hong Kong film, like Stuart Gordon’s play, finds its inspiration in real life. It’s based on a true crime that supposedly took place in 1985 in Macau. Anthony Wong plays a man who kills a family and takes over their restaurant. The restaurant specializes in “pork bao” or steamed pork buns and perhaps the film’s alternate title — Human Pork Buns — will make clear where the cannibalism comes into play. The film is gruesomely violent but the human flesh is prepared with care and served up to unsuspecting customers. 9. Sweeney Todd (2007) Sweeney Todd also looks to a sensational true crime as the basis for its story. Sweeney Todd, aka The Demon Barber of Fleet Street, sounds more like the stuff of urban legends than reality. But evidence suggests that there really was a mad barber who used a straight razor to kill his customers and many of the victims’ bodies ended up as filling for meat pies. Tim Burton’s film, based on Stephen Sondheim’s musical, makes light of the horror as Johnny Depp and Helena Bonham Carter slit throats and serve meat pies to gullible patrons. 10. Eating Raoul (1982) This indie black comedy from Paul Bartel and Mary Woronov has become a cult classic. Bartel and Woronov play Paul and Mary Bland, a couple who want to open their own restaurant. They happen upon a scheme to raise money when Paul accidentally kills a errant swinger who’s forcing himself on Mary. The man is loaded with cash so the Blands decide to start luring other swingers to their pad and offing them with the fry pan. This works pretty well until a sexy Latin con man named Raoul starts to horn in on their business. The title implies multiple meanings but I think you can guess how the film, with its wannabe restaurant owners, ends up. What makes this film such a gourmet item is the deadpan performances of Bartel and Woronov.
/** * This object represents information about an order. * * @author Michi Palazzo */ public class OrderInfo implements TelegramObject { static final String NAME_FIELD = "name"; static final String PHONE_NUMBER_FIELD = "phone_number"; static final String EMAIL_FIELD = "email"; static final String SHIPPING_ADDRESS_FIELD = "shipping_address"; /** * User name. */ @SerializedName(NAME_FIELD) private final String name; /** * User's phone number. */ @SerializedName(PHONE_NUMBER_FIELD) private final String phoneNumber; /** * User email. */ @SerializedName(EMAIL_FIELD) private final String email; /** * User shipping address. */ @SerializedName(SHIPPING_ADDRESS_FIELD) private final ShippingAddress shippingAddress; public OrderInfo(String name, String phoneNumber, String email, ShippingAddress shippingAddress) { this.name = name; this.phoneNumber = phoneNumber; this.email = email; this.shippingAddress = shippingAddress; } /** * Getter for property {@link #name}. * * @return optional value for property {@link #name} */ public Optional<String> getName() { return Optional.ofNullable(name); } /** * Getter for property {@link #phoneNumber}. * * @return optional value for property {@link #phoneNumber} */ public Optional<String> getPhoneNumber() { return Optional.ofNullable(phoneNumber); } /** * Getter for property {@link #email}. * * @return optional value for property {@link #email} */ public Optional<String> getEmail() { return Optional.ofNullable(email); } /** * Getter for property {@link #shippingAddress}. * * @return optional value for property {@link #shippingAddress} */ public Optional<ShippingAddress> getShippingAddress() { return Optional.ofNullable(shippingAddress); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof OrderInfo)) return false; OrderInfo orderInfo = (OrderInfo) obj; return Objects.equals(name, orderInfo.name) && Objects.equals(phoneNumber, orderInfo.phoneNumber) && Objects.equals(email, orderInfo.email) && Objects.equals(shippingAddress, orderInfo.shippingAddress); } @Override public int hashCode() { return Objects.hash(name, phoneNumber, email, shippingAddress); } }
Weeks after a 1-year-old Oregon boy was allegedly assaulted by his babysitter, a twist in the case has spurred the toddler’s parents to use social media in their search for justice. Jacob Marbury’s mother and father, Alicia Quinney and Joshua Marbury, left him in the care of a family friend for about two hours in March, KATU reported. When the couple returned to their Sherwood home that evening, they said, the child was crying as the babysitter slept on the couch. “The next morning, he woke up and that’s when I saw Jacob,” Quinney told the TV station. “The first thing I saw was a black eye.” The parents took their son to a hospital and filed a police report. Jacob “was smacked across the right side of his face by our baby sitter (keep this person anonymous) to the point where MULTIPLE doctors (who in fact showed us hand prints) and the detective said it could have killed him,” Joshua Marbury said Friday on Facebook, adding that “we had a confession from the abuser saying they did it.” The post, which includes two photos of the boy’s apparent injuries, was published as the alleged assailant remained uncharged and out of custody. It has been shared more than 300,000 times. According to The Oregonian, the father claims that the babysitter was shielded by a 2012 Oregon Court of Appeals ruling, which prosecutors say has made it more difficult to bring charges in cases involving abuse victims who cannot speak. Such victims may include infants, the developmentally challenged or those afraid to testify against a suspect. “It’s giving a license to those abusers to injure children,” attorney Paul Mones, who is not involved in Jacob’s case, told KATU. “If those children were in California, for example, or across the border — across the bridge up in Washington, that would not be the situation because the mere fact of the presence of bruises. The mere fact of the presence of scratches, etc. is an objective indicator of the injury. “To really look at the issue of whether a person can verbalize the emotional pain or can verbalize ‘Oh, I can’t move my arm’ is really against everything we know about modern understanding of child abuse and the effect on children,” Mones added. The Washington County District Attorney’s Office said a formal decision has not been made on whether to prosecute the accused person, the TV station reported. A Change.org petition, which describes Jacob’s ordeal, has been created in an effort to have the Oregon Supreme Court overturn the lower court’s relevant ruling. “The abuser is able to walk away with no charges solely because the victim … cannot verbally (attest) to his abuse,” the petition states. More than 14,000 people had signed the online document as of Monday afternoon.
Synthesis and characterization of highly photoresponsive fullerenyl dyads with a close chromophore antenna-C(60) contact and effective photodynamic potential. We report the synthesis of a new class of photoresponsive C(60)-DCE-diphenylaminofluorene nanostructures and their intramolecular photoinduced energy and electron transfer phenomena. Structural modification was made by chemical conversion of the keto group in C(60)(>DPAF-C(n)) to a stronger electron-withdrawing 1,1-dicyanoethylenyl (DCE) unit leading to C(60)(>CPAF-C(n)) with an increased electronic polarization of the molecule. The modification also led to a large bathochromic shift of the major band in visible spectrum giving measureable absorption up to 600 nm and extended the photoresponsive capability of C(60)-DCE-DPAF nanostructures to longer red wavelengths than C(60)(>DPAF-C(n)). Accordingly, C(60)(>CPAF-C(n)) may allow 2γ-PDT using a light wavelength of 1000-1200 nm for enhanced tissue penetration depth. Production efficiency of singlet oxygen by closely related C(60)(>DPAF-C(2) (M)) was found to be comparable with that of tetraphenylporphyrin photosensitizer. Remarkably, the (1)O(2) quantum yield of C(60)(>CPAF-C(2) (M)) was found to be nearly 6-fold higher than that of C(60)(>DPAF-C(2) (M)), demonstrating the large light-harvesting enhancement of the CPAF-C(2) (M) moiety and leading to more efficient triplet state generation of the C(60)> cage moiety. This led to highly effective killing of HeLa cells by C(60)(>CPAF-C(2) (M)) via photodynamic therapy (200 J cm(-2) white light). We interpret the phenomena in terms of the contributions by the extended π-conjugation and stronger electron-withdrawing capability associated with the 1,1-dicyanoethylenyl group compared to that of the keto group.
/** * Add a new bandwidth measurement record if none exists, otherwise it just increments the number * of bytes. * * @param type PRESENTATION, CHANNEL or USER * @param date date of the measurement * @param id id of the object * @param bytes number of bytes measured */ @GuardedBy("MongoDB atomic updates") public void addMeasurement(final MeasurementType type, final Date date, final String id, final String location, final long bytes, final String userId) { final UpdateOptions options = new UpdateOptions().upsert(true); final Bson dayFilter = new Document("type", type.toString()) .append("date", date) .append("id", id) .append("pricingRegion", location); Bson update = new Document("$inc", new Document("bytes", bytes).append("requests", 1)) .append("$set", new Document("needsProcessing", true)); getDailyBandwidthUsage().updateOne(dayFilter, update, options); final DateTime dateTime = new DateTime(date); final Bson monthFilter = new Document("type", type.toString()) .append("month", dateTime.getMonthOfYear()) .append("year", dateTime.getYear()) .append("id", id) .append("pricingRegion", location); update = new Document("$inc", new Document("bytes", bytes).append("requests", 1)) .append("$set", new Document("needsProcessing", true) .append("date", new DateTime(date).withDayOfMonth(1).toDate())); getMonthlyBandwidthUsage().updateOne(monthFilter, update, options); if (userId != null && type != MeasurementType.USER) { addUserMeasurement(type, date, id, location, bytes, dateTime, userId); } }
/** * An internal interface to {@link WipBackend} implementation. */ public abstract class WipBackendBase implements WipBackend { private final String id; private final String description; public WipBackendBase(String id, String description) { this.id = id; this.description = description; } @Override public String getId() { return id; } @Override public String getDescription() { return description; } static WipBackendBase castArgument(WipBackend wipBackend) { try { return (WipBackendBase) wipBackend; } catch (ClassCastException e) { throw new IllegalArgumentException("Incorrect backend argument type", e); } } public abstract List<? extends WipBrowser.WipTabConnector> getTabs( WipBrowserImpl browserImpl) throws IOException; }
<filename>core/arch/arm/plat-rcar/hw_rng.c // SPDX-License-Identifier: BSD-2-Clause /* Copyright (c) 2021, EPAM Systems. All rights reserved. */ #include <assert.h> #include <kernel/panic.h> #include <kernel/spinlock.h> #include <platform_config.h> #include <rng_support.h> #include <trace.h> #include "romapi.h" #define SCRATCH_BUF_SZ 4096 static uint8_t scratch_buf[SCRATCH_BUF_SZ] __nex_bss __aligned(RCAR_CACHE_LINE_SZ); static unsigned int spin_lock __nex_data = SPINLOCK_UNLOCK; /* * It is inefficient to call ROM_GetRndVector() every time we want 8 bits of * random data, so we will cache the unused values for latter use. */ static uint8_t rng_cache[PLAT_RND_VECTOR_SZ] __nex_bss __aligned(RCAR_CACHE_LINE_SZ); static uint8_t rng_cache_pos __nex_data = PLAT_RND_VECTOR_SZ; uint8_t hw_get_random_byte(void) { uint32_t exceptions = cpu_spin_lock_xsave(&spin_lock); uint8_t ret_val = 0; assert(rng_cache_pos <= PLAT_RND_VECTOR_SZ); if (rng_cache_pos == PLAT_RND_VECTOR_SZ) { uint32_t ret = plat_rom_getrndvector(rng_cache, scratch_buf, sizeof(scratch_buf)); if (ret != 0) panic("ROM_GetRndVector() returned error!"); rng_cache_pos = 0; } ret_val = rng_cache[rng_cache_pos++]; cpu_spin_unlock_xrestore(&spin_lock, exceptions); return ret_val; }
from ast import Assert from random import random import unittest from datetime import datetime, date, time from src.typetwo import * class TestIsoJson(unittest.TestCase): def test_loads(self): data = '{"datetime": "0001-01-01T00:00:00", "date": "0001-01-01", "time": "00:00:00"}' actual = IsoJson.loads(data) expected = { 'datetime': datetime.min, 'date' : date.min, 'time' : time.min } self.assertEqual(expected, actual) def test_dumps(self): data = { 'datetime': datetime.min, 'date' : date.min, 'time' : time.min } expected = '{"datetime": "0001-01-01T00:00:00", "date": "0001-01-01", "time": "00:00:00"}' actual = IsoJson.dumps(data) self.assertEqual(expected, actual) def test_dump_jsonl(self): data = [{'date' : date.min}, {'date' : date.min}, {'date' : date.min}] expected = '{"date": "0001-01-01"}\n{"date": "0001-01-01"}\n{"date": "0001-01-01"}' actual = IsoJson.dump_jsonl(data) self.assertEqual(expected, actual)
/** * Tear down the JADE container * * @throws Exception */ @After public void tearDown() throws Exception { this.launchUtil.stopSystem(); } } Runtime runtime = Runtime.instance(); runtime.shutDown(); } } this.launchUtil.shutDownJadeGateway(); }
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityBase; import com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningEditionCapability; import com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningSupportedEnum; import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServerEditionCapability; import com.azure.resourcemanager.postgresqlflexibleserver.models.GeoBackupSupportedEnum; import com.azure.resourcemanager.postgresqlflexibleserver.models.OnlineResizeSupportedEnum; import com.azure.resourcemanager.postgresqlflexibleserver.models.RestrictedEnum; import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersionCapability; import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrowthSupportedEnum; import com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHaAndGeoBackupSupportedEnum; import com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHaSupportedEnum; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Capability for the PostgreSQL server. */ @Fluent public final class FlexibleServerCapabilityInner extends CapabilityBase { /* * Name of flexible servers capability */ @JsonProperty(value = "name") private String name; /* * List of supported flexible server editions */ @JsonProperty(value = "supportedServerEditions", access = JsonProperty.Access.WRITE_ONLY) private List<FlexibleServerEditionCapability> supportedServerEditions; /* * The list of server versions supported for this capability. */ @JsonProperty(value = "supportedServerVersions", access = JsonProperty.Access.WRITE_ONLY) private List<ServerVersionCapability> supportedServerVersions; /* * Gets a value indicating whether fast provisioning is supported. "Enabled" means fast provisioning is supported. * "Disabled" stands for fast provisioning is not supported. */ @JsonProperty(value = "fastProvisioningSupported", access = JsonProperty.Access.WRITE_ONLY) private FastProvisioningSupportedEnum fastProvisioningSupported; /* * List of supported server editions for fast provisioning */ @JsonProperty(value = "supportedFastProvisioningEditions", access = JsonProperty.Access.WRITE_ONLY) private List<FastProvisioningEditionCapability> supportedFastProvisioningEditions; /* * Determines if geo-backup is supported in this region. "Enabled" means geo-backup is supported. "Disabled" stands * for geo-back is not supported. */ @JsonProperty(value = "geoBackupSupported", access = JsonProperty.Access.WRITE_ONLY) private GeoBackupSupportedEnum geoBackupSupported; /* * A value indicating whether Zone Redundant HA is supported in this region. "Enabled" means zone redundant HA is * supported. "Disabled" stands for zone redundant HA is not supported. */ @JsonProperty(value = "zoneRedundantHaSupported", access = JsonProperty.Access.WRITE_ONLY) private ZoneRedundantHaSupportedEnum zoneRedundantHaSupported; /* * A value indicating whether Zone Redundant HA and Geo-backup is supported in this region. "Enabled" means zone * redundant HA and geo-backup is supported. "Disabled" stands for zone redundant HA and geo-backup is not * supported. */ @JsonProperty(value = "zoneRedundantHaAndGeoBackupSupported", access = JsonProperty.Access.WRITE_ONLY) private ZoneRedundantHaAndGeoBackupSupportedEnum zoneRedundantHaAndGeoBackupSupported; /* * A value indicating whether storage auto-grow is supported in this region. "Enabled" means storage auto-grow is * supported. "Disabled" stands for storage auto-grow is not supported. */ @JsonProperty(value = "storageAutoGrowthSupported", access = JsonProperty.Access.WRITE_ONLY) private StorageAutoGrowthSupportedEnum storageAutoGrowthSupported; /* * A value indicating whether online resize is supported in this region for the given subscription. "Enabled" means * storage online resize is supported. "Disabled" means storage online resize is not supported. */ @JsonProperty(value = "onlineResizeSupported", access = JsonProperty.Access.WRITE_ONLY) private OnlineResizeSupportedEnum onlineResizeSupported; /* * A value indicating whether this region is restricted. "Enabled" means region is restricted. "Disabled" stands * for region is not restricted. */ @JsonProperty(value = "restricted", access = JsonProperty.Access.WRITE_ONLY) private RestrictedEnum restricted; /** Creates an instance of FlexibleServerCapabilityInner class. */ public FlexibleServerCapabilityInner() { } /** * Get the name property: Name of flexible servers capability. * * @return the name value. */ public String name() { return this.name; } /** * Set the name property: Name of flexible servers capability. * * @param name the name value to set. * @return the FlexibleServerCapabilityInner object itself. */ public FlexibleServerCapabilityInner withName(String name) { this.name = name; return this; } /** * Get the supportedServerEditions property: List of supported flexible server editions. * * @return the supportedServerEditions value. */ public List<FlexibleServerEditionCapability> supportedServerEditions() { return this.supportedServerEditions; } /** * Get the supportedServerVersions property: The list of server versions supported for this capability. * * @return the supportedServerVersions value. */ public List<ServerVersionCapability> supportedServerVersions() { return this.supportedServerVersions; } /** * Get the fastProvisioningSupported property: Gets a value indicating whether fast provisioning is supported. * "Enabled" means fast provisioning is supported. "Disabled" stands for fast provisioning is not supported. * * @return the fastProvisioningSupported value. */ public FastProvisioningSupportedEnum fastProvisioningSupported() { return this.fastProvisioningSupported; } /** * Get the supportedFastProvisioningEditions property: List of supported server editions for fast provisioning. * * @return the supportedFastProvisioningEditions value. */ public List<FastProvisioningEditionCapability> supportedFastProvisioningEditions() { return this.supportedFastProvisioningEditions; } /** * Get the geoBackupSupported property: Determines if geo-backup is supported in this region. "Enabled" means * geo-backup is supported. "Disabled" stands for geo-back is not supported. * * @return the geoBackupSupported value. */ public GeoBackupSupportedEnum geoBackupSupported() { return this.geoBackupSupported; } /** * Get the zoneRedundantHaSupported property: A value indicating whether Zone Redundant HA is supported in this * region. "Enabled" means zone redundant HA is supported. "Disabled" stands for zone redundant HA is not supported. * * @return the zoneRedundantHaSupported value. */ public ZoneRedundantHaSupportedEnum zoneRedundantHaSupported() { return this.zoneRedundantHaSupported; } /** * Get the zoneRedundantHaAndGeoBackupSupported property: A value indicating whether Zone Redundant HA and * Geo-backup is supported in this region. "Enabled" means zone redundant HA and geo-backup is supported. "Disabled" * stands for zone redundant HA and geo-backup is not supported. * * @return the zoneRedundantHaAndGeoBackupSupported value. */ public ZoneRedundantHaAndGeoBackupSupportedEnum zoneRedundantHaAndGeoBackupSupported() { return this.zoneRedundantHaAndGeoBackupSupported; } /** * Get the storageAutoGrowthSupported property: A value indicating whether storage auto-grow is supported in this * region. "Enabled" means storage auto-grow is supported. "Disabled" stands for storage auto-grow is not supported. * * @return the storageAutoGrowthSupported value. */ public StorageAutoGrowthSupportedEnum storageAutoGrowthSupported() { return this.storageAutoGrowthSupported; } /** * Get the onlineResizeSupported property: A value indicating whether online resize is supported in this region for * the given subscription. "Enabled" means storage online resize is supported. "Disabled" means storage online * resize is not supported. * * @return the onlineResizeSupported value. */ public OnlineResizeSupportedEnum onlineResizeSupported() { return this.onlineResizeSupported; } /** * Get the restricted property: A value indicating whether this region is restricted. "Enabled" means region is * restricted. "Disabled" stands for region is not restricted. * * @return the restricted value. */ public RestrictedEnum restricted() { return this.restricted; } /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (supportedServerEditions() != null) { supportedServerEditions().forEach(e -> e.validate()); } if (supportedServerVersions() != null) { supportedServerVersions().forEach(e -> e.validate()); } if (supportedFastProvisioningEditions() != null) { supportedFastProvisioningEditions().forEach(e -> e.validate()); } } }
#include<stdio.h> #include<string.h> int main() {char line[102]; gets(line); int uc,lc,i,l=strlen(line); lc=0;uc=0; for(i=0;i<l;i++) {if((line[i]>=65)&&(line[i]<=90)) uc++; else if((line[i]>=97)&&(line[i]<=122)) lc++; } if(lc>=uc) for(i=0;i<l;i++) printf("%c",tolower(line[i])); else for(i=0;i<l;i++) printf("%c",toupper(line[i])); return 0; }
Photo: Tobias Schwarz/ AFP/ Getty Images. The more time goes by, the more plausible it becomes that the UK may never actually leave the European Union. Leaving the EU is so difficult, and the consequences are so economically damaging, that it may be easier for prime minister Theresa May’s government to endlessly delay the process rather than to actually leave. Morgan Stanley economists Jacob Nell and Melanie Baker published a fascinating note to investors this morning in which they attempt to figure out how the UK will actually leave the EU, and what the UK’s post-Brexit relationship with Europe will look like. Nell and Baker do not make any specific predictions about how the UK will leave the EU, but they do point out two key facts: The EU will not give the UK a deal in which Britain gets access to the single market but opts out of the “freedom of movement” requirement that lets EU migrants into the country. In fact, the EU cannot give this deal to the UK because it would represent an existential threat to the EU itself: If one country gets access to the single market while controlling its own immigration borders, then every country in the EU will want to do the same. Leaving the EU will cause such massive damage to the UK economy that it might be political suicide for any government to actually leave despite the fact that a majority of people voted Leave in the EU Referendum. Morgan Stanley Immigration from the EU isn’t that bad anyway. You can sum up the problem in 10 easy steps: The Conservative government has a small majority of just 12 seats. Prime minister Theresa May is pro-Remain. A majority of MPs are pro-Remain. “Parliament had a clear pro-Remain bias since over 70% of all MPs and over 50% of Conservative MPs supported Remain,” according to Morgan Stanley. The government faces a general election in 2020, right after the UK — in theory — leaves the EU. One million UK voters live in EU countries. The vast majority of them will vote against any government that threatens their EU residency status. Reduced access to the single market will hurt the economy. The mere prospect of it is already triggering a recession in the second half of this year. Do the Tories really want to go into the 2020 election defending a policy that hurts the economy and increases unemployment? The EU will not offer the UK a “special deal” featuring full access to the single market but control of UK borders because such a deal would encourage other nations to leave. Nationalist movements, and anti-EU sentiment, are on the rise across Europe. The EU can withdraw the UK’s bank “passport” that gives UK financial services firms access to the single market. Do the Tories want to go into 2020 defending a policy that decimates The City, which (according to Morgan Stanley) pays 11% of the UK’s entire tax base? Triggering Article 50 is reversible! Not many people know this. But the UK can formally trigger its Article 50 request and then withdraw the request before Brexit actually takes place, if the country wants to. On those assumptions, May’s government is heavily incentivised to drag its feet over the Leave negotiations. It would be much easier for the Tories to be seen to be negotiating an exit, while not actually exiting, than actually leaving Europe. Especially when 2020 comes around. The new government after 2020 will face a similar choice. Unless that government is an expanded Tory majority dominated by hardcore eurosceptics, then you should expect Brexit to be pushed back even further as “crucial” trade negotiations continue … indefinitely. Business Insider Emails & Alerts Site highlights each day to your inbox. Email Address Join Follow Business Insider Australia on Facebook, Twitter, LinkedIn, and Instagram.
// GetServiceNetworkConfig implements the LocalStage interface. func (s *localStageImpl) GetServiceNetworkConfig() map[string]*dctypes.ServiceNetworkConfig { return map[string]*dctypes.ServiceNetworkConfig{ s.cfg.App.GetConfig().Name: {}, } }
// Parse PB Query string to Phal DB Path ::util::StatusOr<PathQuery> ParseQuery(const std::string& query) { PathQuery path_query; std::vector<std::string> query_fields = absl::StrSplit(query, "/" ); CHECK(query_fields.size() != 0) << "Invalid query string"; bool use_terminal_group = false; if (query_fields.back() == "") { use_terminal_group = true; query_fields.pop_back(); } for (const auto& query_field : query_fields) { CHECK_RETURN_IF_FALSE(query_field != "") << "Encountered unexpected empty query field."; PathQuery::PathEntry entry; RE2 field_regex(R"#((\w+)(\[(?:\d+|\@)\])?)#"); RE2 bracket_regex(R"#(\[(\d+)\])#"); std::string bracket_match; std::string name_match; CHECK_RETURN_IF_FALSE( RE2::FullMatch(query_field, field_regex, &name_match, &bracket_match)) << "Could not parse query field: " << query_field; entry.set_name(name_match); if (!bracket_match.empty()) { entry.set_indexed(true); int index; if (!RE2::FullMatch(bracket_match, bracket_regex, &index)) entry.set_all(true); entry.set_index(index); } *path_query.add_entries() = entry; } path_query.mutable_entries()->rbegin()->set_terminal_group( use_terminal_group); return path_query; }
May 5, 2016 by Alexander Panetta, The Canadian Press WASHINGTON—The very first words out of Donald Trump’s mouth in the unofficial commencement of hostilities in the 2016 U.S. general election included a salvo pointed at a trade deal involving Canada. It’s on. The presumptive Republican nominee had just dispatched his primary opponents, then pivoted toward his likely rival Hillary Clinton, and immediately linked her to NAFTA. “She will be a poor president. She doesn’t understand trade,” Trump told a victory rally Tuesday. “Her husband signed, perhaps in the history of the world, the single worst trade deal ever done. It’s called NAFTA. And I was witness to the carnage (while campaigning).” Brace thyselves, America’s neighbours. You are about to be dragged into a six-month referendum about what’s responsible for the plight of America’s middle class—and Mexico, especially, will feel the tug. Prime Minister Justin Trudeau, speaking Wednesday at a news conference in Ottawa, sounded nonplussed. Protectionist language is common in elections, and tends to dissipate after, he said. So far, it’s been the centrepiece of Trump’s campaign. Trump has made clear his diagnosis for what ails the modern economy: It’s foreigners taking American jobs. Feckless politicians signing bad trade deals. And special interests funding those politicians, then shipping jobs off to places like Mexico. There’s a debate right now among ideological right-wingers—to support or not support a candidate whose diagnosis of the economy some find as abhorrent as his bedside manner. It’s not very conservative to threaten a 35-per-cent import tax on companies that outsource jobs, as Trump proposes. He’s also been wishy-washy on abortion, and has not only donated to Clinton’s campaigns but invited her to his latest wedding—although he’s now calling for her arrest over her use of emails. In this race, the former wedding guest is heavily favoured over the groom. Trump loses in about nine out of every 10 polls against Clinton, and numerous Republicans are predicting a massacre: “If we nominate Trump, we will get destroyed,” said Sen. Lindsey Graham. “And we will deserve it.” A new CNN survey shows him 13 points behind Clinton. His comeback strategy hinges on those NAFTA references. Trump’s next campaign stop illustrates it; he’ll be in coal country Thursday. He used his victory speech to promise that coal miners in West Virginia, Ohio and Pennsylvania would get their jobs back. Never mind that it’s cheaper, lower-emitting natural gas, combined with climate-change regulations, that have slashed U.S. coal jobs by a whopping one-third in the last couple of years. He’s promising to turn back the clock to better times. His campaign slogan, after all, is “Make America Great Again.” Clinton’s message is more complicated. She proposes a $30-billion plan to retrain miners. She angered some when she told a recent event that, “We’re going to put a lot of coal miners and coal companies out of business.” She said later she’d stated it inartfully. This coal debate is a snapshot of a broader election issue. It’s how to deal with a painful, long-term trend. Working-class Americans have suffered. Mortality rates are up, driven by suicide, drug and alcohol abuse, and heart disease. People with only a high-school diploma have, according to Pew Research, seen their share of the national income plummet 22 per cent since 1971. Clinton’s proposed solution: tax hikes on the wealthy and more government programs—like retraining, tuition assistance, and a parental leave program like other countries have. Trump is telling voters they can have more. He promises tax cuts. And more military spending. And protected social programs like old-age pensions. He’d even pay down the national debt, he says. More than one observer has noted that achieving all of this would require bending the laws of the natural universe. So take some of the campaign talk with a grain of salt. Including on NAFTA—which would be extremely difficult to cancel, then replace with new tariffs, and disrupt the modern supply chains that involve building a single product in several countries. Trudeau didn’t sound too preoccupied. “One of the things we see in any electoral campaign, including electoral campaigns here in Canada, is a bit of rhetoric around protectionism,” he said. “That tends to dissipate a little bit once the election has come and gone.” Trump has actually been vague on what he’d do with NAFTA; he’s proposed ripping it up, but wasn’t so explicit in his major foreign-policy speech last week. Another trade deal could have its fate play out this year—the 12-country Trans-Pacific Partnership. Trump clearly opposes it. Clinton expresses mild opposition. One Canada-watcher in Washington urged the country against rushing to ratify TPP, and use the coming months instead to seek a side deal with Japan on auto parts. Above all else, said Christopher Sands of Johns Hopkins University: “Lay low.” “Don’t make an enemy of Trump. Don’t get him insulting you guys. This too may pass. And if it doesn’t pass, (and he becomes president), not being the focal point of his critique of global trade gives you the option to make a different kind of deal.”
/* Update and reload or commit and/or backup metadata for @lv as requested by @mr */ static int _commit_reload(struct logical_volume *lv, uint32_t mr) { if (mr & MR_RELOAD) { if (!lv_update_and_reload(lv)) return_0; } else if ((mr & MR_COMMIT) && !_vg_write_commit(lv, NULL)) return 0; return 1; }
def FindClusterPair(self, clusterPairID=0, clusterPairUUID=None, remoteClusterMVIP=None, remoteClusterName=None): return SFClusterPair.Find(self.mvip, self.username, self.password, clusterPairID, clusterPairUUID, remoteClusterMVIP, remoteClusterName)
export * from './app/navigation.component'; export * from './app/app.component'; export * from './app/alert.component'; export * from './app/page-not-found.component'; export * from './home/home.component'; export * from './home/work/work.component'; export * from './projects/inventory.component';
Jun 15, 2013; Winnipeg, MB, Canada; Roy Nelson before fights Stipe Miocic (not pictured) during their Heavyweight bout at UFC 161 at MTS Centre. Mandatory Credit: Tom Szczerbowski-USA TODAY Sports UFC Heavyweight, Roy Nelson, does not have the greatest relationship with UFC president Dana White. On multiple separate occasions White has called Nelson stupid, dumb, or some other synonym for unintelligent. White’s past relationship with Nelson may fit perfectly into the new role Nelson has just applied for; the vacated executive director position for the Nevada State Athletic Commission. Keith Kizer, the previous executive director of the NSAC, announced earlier this month that he would be stepping down from his position. Of course, Kizer and White have had their share of feuds over the years for their disagreement on judges’ decisions and the incompetency of certain referees. No successor was announced when Kizer stepped down, and the search is ongoing. Roy Nelson has decided to throw his name into the hat, and is a dark horse candidate to get the position. Nelson talked about his desire to fill the position with Bloody Elbow: I have put my application in. My wife and I were talking about having something besides fighting to fall back on, and I think I would be able to do some good. This is my hometown, it’s where I was born and raised, so I feel it’s a way for me to help further the sport. Nelson went on to say that he has not told the UFC about his intention to become director, and that he still plans on fighting in the future. It will be very interesting to hear Dana White’s response regarding today’s news.
Challenges and Opportunities for Non-Tenure-Track Faculty during the Time of COVID-19 Author(s): Jayaram, Kiran; Pajunen, Matthew; Garcia, Chad; Nunez, Neudy Carolina; Smith, Jae-Anne | Abstract: In Spring 2020, the COVID-19 pandemic forced university instructors across the United States to confront the daunting task of quickly changing their courses from face-to-face to remote instruction. Nationally, universities relied on virtual platforms as they adjusted educational spaces in response to the pandemic. While there have been many anecdotes of how individual faculty responded to this transition, social scientists have yet to study systematically how instructors handled this transition. This article presents and analyzes data from semi-structured interviews with non-tenure-track social science faculty to understand how they handled the change to remote teaching after the onset of the COVID-19 pandemic. It analyzes these interviews by drawing on intersecting perspectives from the anthropology of disaster, anthropology of education, and digital anthropology. We argue the transition to online teaching presented new challenges and opportunities to instructors as people coping with novel health concerns, family obligations, and space-time changes. Simultaneously, this change created pedagogical issues related to continuity of instruction, classroom presence, and emotional labor. We conclude with recommendations and directions for future research.n
Resolving discordant samples in clinical laboratory practice. T he growing importance of the clinical laboratory in patient healthcare is evident from the fact that about 70% of medical decisions are now based on laboratory test results.1 The role of the clinical laboratory, aided by advances in analytical science and increased automation, has become even more prominent, as cost pressures have reduced patient stays in the hospital. Laboratory results — normal or abnormal — help screening, diagnosis, indication of therapeutic pathways, and monitoring of therapy. But a variety of causes, pre-analytical or method-dependent, may lead to inaccurate “discordant” results; such results may lead to incorrect diagnosis and therapy, risking increased morbidity or mortality.2-3 What causes lead to false-positive or falsenegative results, especially in immunoassays and chemistry tests? Errors in a test result may belong to three classes: random, systematic, and sporadic.
NEWARK — FBI agents are awaiting a Newark-bound United Airlines flight from Hong Kong, after an apparently distraught passenger claimed everyone on board had been poisoned. The flight was not diverted, but reports indicated the individual had been restrained. An FBI spokesman in Newark said initial reports were that the main got stood up during the flight and screamed “we’re all being poisoned. You’ve all been poisoned.” He was restrained by other passengers, several law enforcement forces said. A United Airlines spokeswoman confirmed the incident. “While en route from Hong Kong to Newark, a passenger became disruptive on board United flight 116. The crew followed procedures and the flight is continuing as scheduled,” said Jennifer Dohm. United 116 is a direct flight from Hong Kong that is due to land in Newark today at about 1:15 p.m. The FBI spokesman said there are agents awaiting aircraft’s arrival. “We’ll address it when the plane has landed,” he said.
def f(num): if num % 2 == 0: return num // 2 elif num % 3 == 0: return (2 * num) // 3 elif num % 5 == 0: return (4 * num) // 5 else: return num for i in range(int(input())): n = int(input()) isum = 0 q = f(n) while n != q: n = q q = f(n) isum += 1 if n == 1: print(isum) else: print(-1)
/** * Save the UUID to a NBT tag * * @param tag The tag to save to */ public void save(NBTTagCompound tag) { tag.setLong(MSB, uuid.getMostSignificantBits()); tag.setLong(LSB, uuid.getLeastSignificantBits()); if (id != null) { tag.setInteger(ID, id); } else { tag.removeTag(ID); } }
<filename>src/modules/uavcan/libuavcan/libuavcan/include/uavcan/protocol/dynamic_node_id_server/storage_marshaller.hpp /* * Copyright (C) 2015 <NAME> <<EMAIL>> */ #ifndef UAVCAN_PROTOCOL_DYNAMIC_NODE_ID_SERVER_STORAGE_MARSHALLER_HPP_INCLUDED #define UAVCAN_PROTOCOL_DYNAMIC_NODE_ID_SERVER_STORAGE_MARSHALLER_HPP_INCLUDED #include <uavcan/build_config.hpp> #include <uavcan/debug.hpp> #include <uavcan/protocol/dynamic_node_id_server/storage_backend.hpp> #include <uavcan/protocol/dynamic_node_id_server/types.hpp> #include <cstdlib> #if UAVCAN_CPP_VERSION >= UAVCAN_CPP11 # include <cerrno> #endif namespace uavcan { namespace dynamic_node_id_server { /** * This class extends the storage backend interface with serialization/deserialization functionality. */ class StorageMarshaller { IStorageBackend& storage_; static uint8_t convertLowerCaseHexCharToNibble(char ch) { const uint8_t ret = (ch > '9') ? static_cast<uint8_t>(ch - 'a' + 10) : static_cast<uint8_t>(ch - '0'); UAVCAN_ASSERT(ret < 16); return ret; } public: StorageMarshaller(IStorageBackend& storage) : storage_(storage) { } /** * Turns a unique ID into a hex string that can be used as a key or as a value. */ static IStorageBackend::String convertUniqueIDToHex(const UniqueID& key) { IStorageBackend::String serialized; for (uint8_t i = 0; i < UniqueID::MaxSize; i++) { serialized.appendFormatted("%02x", key.at(i)); } UAVCAN_ASSERT(serialized.size() == UniqueID::MaxSize * 2); return serialized; } /** * These methods set the value and then immediately read it back. * 1. Serialize the value. * 2. Update the value on the backend. * 3. Call get() with the same value argument. * The caller then is supposed to check whether the argument has the desired value. */ int setAndGetBack(const IStorageBackend::String& key, uint32_t& inout_value) { IStorageBackend::String serialized; serialized.appendFormatted("%llu", static_cast<unsigned long long>(inout_value)); UAVCAN_TRACE("StorageMarshaller", "Set %s = %s", key.c_str(), serialized.c_str()); storage_.set(key, serialized); return get(key, inout_value); } int setAndGetBack(const IStorageBackend::String& key, UniqueID& inout_value) { const IStorageBackend::String serialized = convertUniqueIDToHex(inout_value); UAVCAN_TRACE("StorageMarshaller", "Set %s = %s", key.c_str(), serialized.c_str()); storage_.set(key, serialized); return get(key, inout_value); } /** * Getters simply read and deserialize the value. * 1. Read the value back from the backend; return false if read fails. * 2. Deserealize the newly read value; return false if deserialization fails. * 3. Update the argument with deserialized value. * 4. Return true. */ int get(const IStorageBackend::String& key, uint32_t& out_value) const { /* * Reading the storage */ const IStorageBackend::String val = storage_.get(key); if (val.empty()) { return -ErrFailure; } /* * Per MISRA C++ recommendations, checking the inputs instead of relying solely on errno. * The value must contain only numeric characters. */ for (IStorageBackend::String::const_iterator it = val.begin(); it != val.end(); ++it) { if (static_cast<char>(*it) < '0' || static_cast<char>(*it) > '9') { return -ErrFailure; } } if (val.size() > 10) // len(str(0xFFFFFFFF)) { return -ErrFailure; } /* * Conversion is carried out here */ #if UAVCAN_CPP_VERSION >= UAVCAN_CPP11 errno = 0; #endif #if UAVCAN_CPP_VERSION >= UAVCAN_CPP11 const unsigned long long x = std::strtoull(val.c_str(), NULL, 10); #else // There was no strtoull() before C++11, so we need to resort to strtoul() StaticAssert<(sizeof(unsigned long) >= sizeof(uint32_t))>::check(); const unsigned long x = std::strtoul(val.c_str(), NULL, 10); #endif #if UAVCAN_CPP_VERSION >= UAVCAN_CPP11 if (errno != 0) { return -ErrFailure; } #endif out_value = static_cast<uint32_t>(x); return 0; } int get(const IStorageBackend::String& key, UniqueID& out_value) const { static const uint8_t NumBytes = UniqueID::MaxSize; /* * Reading the storage */ IStorageBackend::String val = storage_.get(key); if (val.size() != NumBytes * 2) { return -ErrFailure; } /* * The value must contain only hexadecimal numbers. */ val.convertToLowerCaseASCII(); for (IStorageBackend::String::const_iterator it = val.begin(); it != val.end(); ++it) { if ((static_cast<char>(*it) < '0' || static_cast<char>(*it) > '9') && (static_cast<char>(*it) < 'a' || static_cast<char>(*it) > 'f')) { return -ErrFailure; } } /* * Conversion is carried out here */ IStorageBackend::String::const_iterator it = val.begin(); for (uint8_t byte_index = 0; byte_index < NumBytes; byte_index++) { out_value[byte_index] = static_cast<uint8_t>(convertLowerCaseHexCharToNibble(static_cast<char>(*it++)) << 4); out_value[byte_index] = static_cast<uint8_t>(convertLowerCaseHexCharToNibble(static_cast<char>(*it++)) | out_value[byte_index]); } return 0; } }; } } #endif // Include guard
/// helper function run on each core to save edges stored as ASCII tab-delimited pairs void local_save_tsv( const char * filename, Grappa::TupleGraph::Edge * local_ptr, Grappa::TupleGraph::Edge * local_end ) { Int32Edge * local_save_ptr = reinterpret_cast<Int32Edge*>(local_ptr); size_t local_count = local_end - local_ptr; std::stringstream ss; for( ; local_ptr < local_end; ++local_ptr ) { ss << local_ptr->v0 << "\t" << local_ptr->v1 << std::endl; } if( !FLAGS_use_mpi_io ) { local_offset = 0; Grappa::barrier(); int64_t offset = Grappa::delegate::fetch_and_add( make_global( &local_offset, 0 ), ss.str().size() ); Grappa::barrier(); write_locked_range( filename, offset, ss.str().c_str(), ss.str().size() ); } else { impl::write_unordered_shared( filename, const_cast<char*>( ss.str().c_str() ), ss.str().size() ); } }
<gh_stars>10-100 // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.23.0 // protoc v3.12.0 // source: core/contract/exchange_contract.proto package contract import ( proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // This is a compile-time assertion that a sufficiently up-to-date version // of the legacy proto package is being used. const _ = proto.ProtoPackageIsVersion4 type ExchangeCreateContract struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` FirstTokenId []byte `protobuf:"bytes,2,opt,name=first_token_id,json=firstTokenId,proto3" json:"first_token_id,omitempty"` FirstTokenBalance int64 `protobuf:"varint,3,opt,name=first_token_balance,json=firstTokenBalance,proto3" json:"first_token_balance,omitempty"` SecondTokenId []byte `protobuf:"bytes,4,opt,name=second_token_id,json=secondTokenId,proto3" json:"second_token_id,omitempty"` SecondTokenBalance int64 `protobuf:"varint,5,opt,name=second_token_balance,json=secondTokenBalance,proto3" json:"second_token_balance,omitempty"` } func (x *ExchangeCreateContract) Reset() { *x = ExchangeCreateContract{} if protoimpl.UnsafeEnabled { mi := &file_core_contract_exchange_contract_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ExchangeCreateContract) String() string { return protoimpl.X.MessageStringOf(x) } func (*ExchangeCreateContract) ProtoMessage() {} func (x *ExchangeCreateContract) ProtoReflect() protoreflect.Message { mi := &file_core_contract_exchange_contract_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use ExchangeCreateContract.ProtoReflect.Descriptor instead. func (*ExchangeCreateContract) Descriptor() ([]byte, []int) { return file_core_contract_exchange_contract_proto_rawDescGZIP(), []int{0} } func (x *ExchangeCreateContract) GetOwnerAddress() []byte { if x != nil { return x.OwnerAddress } return nil } func (x *ExchangeCreateContract) GetFirstTokenId() []byte { if x != nil { return x.FirstTokenId } return nil } func (x *ExchangeCreateContract) GetFirstTokenBalance() int64 { if x != nil { return x.FirstTokenBalance } return 0 } func (x *ExchangeCreateContract) GetSecondTokenId() []byte { if x != nil { return x.SecondTokenId } return nil } func (x *ExchangeCreateContract) GetSecondTokenBalance() int64 { if x != nil { return x.SecondTokenBalance } return 0 } type ExchangeInjectContract struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` ExchangeId int64 `protobuf:"varint,2,opt,name=exchange_id,json=exchangeId,proto3" json:"exchange_id,omitempty"` TokenId []byte `protobuf:"bytes,3,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"` Quant int64 `protobuf:"varint,4,opt,name=quant,proto3" json:"quant,omitempty"` } func (x *ExchangeInjectContract) Reset() { *x = ExchangeInjectContract{} if protoimpl.UnsafeEnabled { mi := &file_core_contract_exchange_contract_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ExchangeInjectContract) String() string { return protoimpl.X.MessageStringOf(x) } func (*ExchangeInjectContract) ProtoMessage() {} func (x *ExchangeInjectContract) ProtoReflect() protoreflect.Message { mi := &file_core_contract_exchange_contract_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use ExchangeInjectContract.ProtoReflect.Descriptor instead. func (*ExchangeInjectContract) Descriptor() ([]byte, []int) { return file_core_contract_exchange_contract_proto_rawDescGZIP(), []int{1} } func (x *ExchangeInjectContract) GetOwnerAddress() []byte { if x != nil { return x.OwnerAddress } return nil } func (x *ExchangeInjectContract) GetExchangeId() int64 { if x != nil { return x.ExchangeId } return 0 } func (x *ExchangeInjectContract) GetTokenId() []byte { if x != nil { return x.TokenId } return nil } func (x *ExchangeInjectContract) GetQuant() int64 { if x != nil { return x.Quant } return 0 } type ExchangeWithdrawContract struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` ExchangeId int64 `protobuf:"varint,2,opt,name=exchange_id,json=exchangeId,proto3" json:"exchange_id,omitempty"` TokenId []byte `protobuf:"bytes,3,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"` Quant int64 `protobuf:"varint,4,opt,name=quant,proto3" json:"quant,omitempty"` } func (x *ExchangeWithdrawContract) Reset() { *x = ExchangeWithdrawContract{} if protoimpl.UnsafeEnabled { mi := &file_core_contract_exchange_contract_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ExchangeWithdrawContract) String() string { return protoimpl.X.MessageStringOf(x) } func (*ExchangeWithdrawContract) ProtoMessage() {} func (x *ExchangeWithdrawContract) ProtoReflect() protoreflect.Message { mi := &file_core_contract_exchange_contract_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use ExchangeWithdrawContract.ProtoReflect.Descriptor instead. func (*ExchangeWithdrawContract) Descriptor() ([]byte, []int) { return file_core_contract_exchange_contract_proto_rawDescGZIP(), []int{2} } func (x *ExchangeWithdrawContract) GetOwnerAddress() []byte { if x != nil { return x.OwnerAddress } return nil } func (x *ExchangeWithdrawContract) GetExchangeId() int64 { if x != nil { return x.ExchangeId } return 0 } func (x *ExchangeWithdrawContract) GetTokenId() []byte { if x != nil { return x.TokenId } return nil } func (x *ExchangeWithdrawContract) GetQuant() int64 { if x != nil { return x.Quant } return 0 } type ExchangeTransactionContract struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` ExchangeId int64 `protobuf:"varint,2,opt,name=exchange_id,json=exchangeId,proto3" json:"exchange_id,omitempty"` TokenId []byte `protobuf:"bytes,3,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"` Quant int64 `protobuf:"varint,4,opt,name=quant,proto3" json:"quant,omitempty"` Expected int64 `protobuf:"varint,5,opt,name=expected,proto3" json:"expected,omitempty"` } func (x *ExchangeTransactionContract) Reset() { *x = ExchangeTransactionContract{} if protoimpl.UnsafeEnabled { mi := &file_core_contract_exchange_contract_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ExchangeTransactionContract) String() string { return protoimpl.X.MessageStringOf(x) } func (*ExchangeTransactionContract) ProtoMessage() {} func (x *ExchangeTransactionContract) ProtoReflect() protoreflect.Message { mi := &file_core_contract_exchange_contract_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use ExchangeTransactionContract.ProtoReflect.Descriptor instead. func (*ExchangeTransactionContract) Descriptor() ([]byte, []int) { return file_core_contract_exchange_contract_proto_rawDescGZIP(), []int{3} } func (x *ExchangeTransactionContract) GetOwnerAddress() []byte { if x != nil { return x.OwnerAddress } return nil } func (x *ExchangeTransactionContract) GetExchangeId() int64 { if x != nil { return x.ExchangeId } return 0 } func (x *ExchangeTransactionContract) GetTokenId() []byte { if x != nil { return x.TokenId } return nil } func (x *ExchangeTransactionContract) GetQuant() int64 { if x != nil { return x.Quant } return 0 } func (x *ExchangeTransactionContract) GetExpected() int64 { if x != nil { return x.Expected } return 0 } var File_core_contract_exchange_contract_proto protoreflect.FileDescriptor var file_core_contract_exchange_contract_proto_rawDesc = []byte{ 0x0a, 0x25, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0xed, 0x01, 0x0a, 0x16, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x66, 0x69, 0x72, 0x73, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x66, 0x69, 0x72, 0x73, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x8f, 0x01, 0x0a, 0x16, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x18, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x22, 0xb0, 0x01, 0x0a, 0x1b, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x4f, 0x0a, 0x18, 0x6f, 0x72, 0x67, 0x2e, 0x74, 0x72, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x79, 0x74, 0x65, 0x6a, 0x65, 0x64, 0x69, 0x2f, 0x74, 0x72, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_core_contract_exchange_contract_proto_rawDescOnce sync.Once file_core_contract_exchange_contract_proto_rawDescData = file_core_contract_exchange_contract_proto_rawDesc ) func file_core_contract_exchange_contract_proto_rawDescGZIP() []byte { file_core_contract_exchange_contract_proto_rawDescOnce.Do(func() { file_core_contract_exchange_contract_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_contract_exchange_contract_proto_rawDescData) }) return file_core_contract_exchange_contract_proto_rawDescData } var file_core_contract_exchange_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_core_contract_exchange_contract_proto_goTypes = []interface{}{ (*ExchangeCreateContract)(nil), // 0: protocol.ExchangeCreateContract (*ExchangeInjectContract)(nil), // 1: protocol.ExchangeInjectContract (*ExchangeWithdrawContract)(nil), // 2: protocol.ExchangeWithdrawContract (*ExchangeTransactionContract)(nil), // 3: protocol.ExchangeTransactionContract } var file_core_contract_exchange_contract_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { file_core_contract_exchange_contract_proto_init() } func file_core_contract_exchange_contract_proto_init() { if File_core_contract_exchange_contract_proto != nil { return } if !protoimpl.UnsafeEnabled { file_core_contract_exchange_contract_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExchangeCreateContract); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_core_contract_exchange_contract_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExchangeInjectContract); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_core_contract_exchange_contract_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExchangeWithdrawContract); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_core_contract_exchange_contract_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExchangeTransactionContract); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_core_contract_exchange_contract_proto_rawDesc, NumEnums: 0, NumMessages: 4, NumExtensions: 0, NumServices: 0, }, GoTypes: file_core_contract_exchange_contract_proto_goTypes, DependencyIndexes: file_core_contract_exchange_contract_proto_depIdxs, MessageInfos: file_core_contract_exchange_contract_proto_msgTypes, }.Build() File_core_contract_exchange_contract_proto = out.File file_core_contract_exchange_contract_proto_rawDesc = nil file_core_contract_exchange_contract_proto_goTypes = nil file_core_contract_exchange_contract_proto_depIdxs = nil }
/** * _base_sas_log_info - verbose translation of firmware log info * @ioc: per adapter object * @log_info: log info */ static void _base_sas_log_info(struct MPT3SAS_ADAPTER *ioc , u32 log_info) { union loginfo_type { u32 loginfo; struct { u32 subcode:16; u32 code:8; u32 originator:4; u32 bus_type:4; } dw; }; union loginfo_type sas_loginfo; char *originator_str = NULL; sas_loginfo.loginfo = log_info; if (sas_loginfo.dw.bus_type != 3 ) return; if (log_info == 0x31170000) return; if (ioc->ignore_loginfos && (log_info == 0x30050000 || log_info == 0x31140000 || log_info == 0x31130000)) return; switch (sas_loginfo.dw.originator) { case 0: originator_str = "IOP"; break; case 1: originator_str = "PL"; break; case 2: if (!ioc->hide_ir_msg) originator_str = "IR"; else originator_str = "WarpDrive"; break; } ioc_warn(ioc, "log_info(0x%08x): originator(%s), code(0x%02x), sub_code(0x%04x)\n", log_info, originator_str, sas_loginfo.dw.code, sas_loginfo.dw.subcode); }
<filename>packages/api-service/src/constants.ts export const MaxFilesPerDocument = 10 export const MaxDocumentsPerUser = 100 export const MaxDelegatesPerAccount = 10 export const AccountDelegateInvitationValidDays = 14 export const MaxFileSize = 10000000 export const MaxIndividualEmailAddressesPerCollection = 10 export const DocumentsPrefix = 'documents' export const CollectionsPrefix = 'collections' export const EnforceUserTermsOfUseAcceptance = false
For the past 30 years, Jimmy Carter has waged war on the Guinea worm, a parasite that infects people who drink water contaminated with its larvae. Carter’s first encounter with the worm was in the late 1980s during a trip to a small village in Ghana, where more than two-thirds of inhabitants were infected. “I saw a young woman holding a baby in her arms … But it was not a baby—It was her right breast,” he said to a group of reporters. “It was [swollen to] about a foot long. And coming out of the nipple of her breast was a Guinea worm.” Carter would later discover that the woman had 11 worms in her body. This event, which he called one of the most unforgettable scenes of human suffering he had ever seen, inspired him to create a new mission for his Carter Center foundation: The complete eradication of Guinea worm disease. In 1986, cases of Guinea worm disease numbered more than 3.5 million worldwide. Now, globally, there are only 126 cases left, Carter announced this week during the unveiling of a new exhibit at the American Museum of Natural History in New York, called Countdown to Zero: Defeating Disease. The exhibit showcases “neglected tropical diseases” such as Guinea worm, river blindness, and polio, which have disappeared from wealthy nations but still plague the developing world. Though most of the Western world has averted its attention from the scourges, Carter said that these diseases are prime for eradication, and his foundation is on track to make Guinea worm the second human disease after smallpox to be entirely eliminated worldwide. The disease was endemic in an estimated 23,735 villages across 21 Asian and African countries like Ghana, India, Pakistan and Yemen in 1991. Now, only 30 villages in four countries—Mali, Chad, Ethiopia, and South Sudan—harbor the worms. The feat comes from decades of public-health intervention. Once inside a human host, the Guinea larva develops into a long, pale worm within a year. Then, over the course of 30 days, it emerges from the infected person’s skin through painful, swollen welts. “Imagine a worm one meter long coming out of your skin for, on average, 11 weeks. That in itself is a nightmare to me,” Craig Withers, a program director at the Carter Center, said at the event. “It’s sort of like ‘Alien’ in real life.” It’s also common for people to suffer from more than one infection, Withers said, adding that the worms can manifest in any part of the body. “Use your worst imagination: Roof of the mouth, breast, the head, scrotum. Any area, it can come out,” Withers said. Afflicted people often immerse themselves in a watering hole in an attempt to wash the worm out of their bodies, but this allows the worm to lay its eggs and start the cycle anew. The Carter Center helped interrupt this chain of events by educating affected communities on the Guinea worm, and providing them with “pipe filters” to wear around their necks and use like straws for filtering drinking water. The outreach methods that helped the Carter Center decimate the disease may offer insight into combating the explosive Ebola outbreak in West Africa, according to Donald Hopkins, the Carter Center’s vice president for health programs. Hopkins noted that the most important lesson learned from Guinea worm is how essential it is to engage with the afflicted community. He said that doctors should reassure affected villages that Ebola is not a death sentence, and that more than a third of the people infected recover. By dispelling those fears, health officials can encourage those with the disease to seek treatment early, Hopkins said. “You’re not here to tell them what to do. You need to work with the communities,” he said. “In the case of Ebola, it’s not just a problem for an individual. It’s a problem for the whole community.” Even though the diseases are very different in their incubation periods and in how they’re spread, they both disproportionately affect rural areas in developing countries. The strongest tool needed to combat Ebola is the same as one needed to combat Guinea worm, Hopkins said. “We need peace, and we need people to have faith and believe that something can be done about this disease,” he said. “We’re going to get after some other diseases once we get this one to zero.”
package main import ( "bytes" "crypto/rand" "flag" "fmt" "io" "io/ioutil" "os" "sort" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3" ) const ( opRead = "Read" opWrite = "Write" //max that can be deleted at a time via DeleteObjects() commitSize = 1000 ) var bufferBytes []byte func main() { endpoint := flag.String("endpoint", "", "S3 endpoint(s) comma separated - http://IP:PORT,http://IP:PORT") region := flag.String("region", "igneous-test", "AWS region to use, eg: us-west-1|us-east-1, etc") accessKey := flag.String("accessKey", "", "the S3 access key") accessSecret := flag.String("accessSecret", "", "the S3 access secret") bucketName := flag.String("bucket", "bucketname", "the bucket for which to run the test") objectNamePrefix := flag.String("objectNamePrefix", "loadgen_test_", "prefix of the object name that will be used") objectSize := flag.Int64("objectSize", 80*1024*1024, "size of individual requests in bytes (must be smaller than main memory)") numClients := flag.Int("numClients", 40, "number of concurrent clients") numSamples := flag.Int("numSamples", 200, "total number of requests to send") skipCleanup := flag.Bool("skipCleanup", false, "skip deleting objects created by this tool at the end of the run") pause := flag.Bool("pause", false, "pause before starting read stage") verbose := flag.Bool("verbose", false, "print verbose per thread status") flag.Parse() if *numClients > *numSamples || *numSamples < 1 { fmt.Printf("numClients(%d) needs to be less than numSamples(%d) and greater than 0\n", *numClients, *numSamples) os.Exit(1) } if *endpoint == "" { fmt.Println("You need to specify endpoint(s)") flag.PrintDefaults() os.Exit(1) } // Setup and print summary of the accepted parameters params := Params{ requests: make(chan Req), responses: make(chan Resp), numSamples: *numSamples, numClients: uint(*numClients), objectSize: *objectSize, objectNamePrefix: *objectNamePrefix, bucketName: *bucketName, endpoints: strings.Split(*endpoint, ","), verbose: *verbose, } fmt.Println(params) fmt.Println() // Generate the data from which we will do the writting fmt.Printf("Generating in-memory sample data... ") timeGenData := time.Now() bufferBytes = make([]byte, *objectSize, *objectSize) _, err := rand.Read(bufferBytes) if err != nil { fmt.Printf("Could not allocate a buffer") os.Exit(1) } fmt.Printf("Done (%s)\n", time.Since(timeGenData)) fmt.Println() // Start the load clients and run a write test followed by a read test cfg := &aws.Config{ Credentials: credentials.NewStaticCredentials(*accessKey, *accessSecret, ""), Region: aws.String(*region), S3ForcePathStyle: aws.Bool(true), } params.StartClients(cfg) fmt.Printf("Running %s test...\n", opWrite) writeResult := params.Run(opWrite) fmt.Println() // Pause after write test and before read test if *pause { fmt.Printf("Press enter to start read test...\n") fmt.Scanln() fmt.Println() } fmt.Printf("Running %s test...\n", opRead) readResult := params.Run(opRead) fmt.Println() // Repeating the parameters of the test followed by the results fmt.Println(params) fmt.Println() fmt.Println(writeResult) fmt.Println() fmt.Println(readResult) // Do cleanup if required if !*skipCleanup { fmt.Println() fmt.Printf("Cleaning up %d objects...\n", *numSamples) delStartTime := time.Now() svc := s3.New(session.New(), cfg) numSuccessfullyDeleted := 0 keyList := make([]*s3.ObjectIdentifier, 0, commitSize) for i := 0; i < *numSamples; i++ { bar := s3.ObjectIdentifier{ Key: aws.String(fmt.Sprintf("%s%d", *objectNamePrefix, i)), } keyList = append(keyList, &bar) if len(keyList) == commitSize || i == *numSamples-1 { fmt.Printf("Deleting a batch of %d objects in range {%d, %d}... ", len(keyList), i-len(keyList)+1, i) params := &s3.DeleteObjectsInput{ Bucket: aws.String(*bucketName), Delete: &s3.Delete{ Objects: keyList}} _, err := svc.DeleteObjects(params) if err == nil { numSuccessfullyDeleted += len(keyList) fmt.Printf("Succeeded\n") } else { fmt.Printf("Failed (%v)\n", err) } //set cursor to 0 so we can move to the next batch. keyList = keyList[:0] } } fmt.Printf("Successfully deleted %d/%d objects in %s\n", numSuccessfullyDeleted, *numSamples, time.Since(delStartTime)) } } func (params *Params) Run(op string) Result { startTime := time.Now() // Start submitting load requests go params.submitLoad(op) // Collect and aggregate stats for completed requests result := Result{opDurations: make([]float64, 0, params.numSamples), operation: op} for i := 0; i < params.numSamples; i++ { resp := <-params.responses errorString := "" if resp.err != nil { result.numErrors++ errorString = fmt.Sprintf(", error: %s", resp.err) } else { result.bytesTransmitted = result.bytesTransmitted + params.objectSize result.opDurations = append(result.opDurations, resp.duration.Seconds()) } if params.verbose { fmt.Printf("%v operation completed in %0.2fs (%d/%d) - %0.2fMB/s%s\n", op, resp.duration.Seconds(), i+1, params.numSamples, (float64(result.bytesTransmitted)/(1024*1024))/time.Since(startTime).Seconds(), errorString) } } result.totalDuration = time.Since(startTime) sort.Float64s(result.opDurations) return result } // Create an individual load request and submit it to the client queue func (params *Params) submitLoad(op string) { bucket := aws.String(params.bucketName) for i := 0; i < params.numSamples; i++ { key := aws.String(fmt.Sprintf("%s%d", params.objectNamePrefix, i)) if op == opWrite { params.requests <- &s3.PutObjectInput{ Bucket: bucket, Key: key, Body: bytes.NewReader(bufferBytes), } } else if op == opRead { params.requests <- &s3.GetObjectInput{ Bucket: bucket, Key: key, } } else { panic("Developer error") } } } func (params *Params) StartClients(cfg *aws.Config) { for i := 0; i < int(params.numClients); i++ { cfg.Endpoint = aws.String(params.endpoints[i%len(params.endpoints)]) go params.startClient(cfg) time.Sleep(1 * time.Millisecond) } } // Run an individual load request func (params *Params) startClient(cfg *aws.Config) { svc := s3.New(session.New(), cfg) for request := range params.requests { putStartTime := time.Now() var err error numBytes := params.objectSize switch r := request.(type) { case *s3.PutObjectInput: req, _ := svc.PutObjectRequest(r) // Disable payload checksum calculation (very expensive) req.HTTPRequest.Header.Add("X-Amz-Content-Sha256", "UNSIGNED-PAYLOAD") err = req.Send() case *s3.GetObjectInput: req, resp := svc.GetObjectRequest(r) err = req.Send() numBytes = 0 if err == nil { numBytes, err = io.Copy(ioutil.Discard, resp.Body) } if numBytes != params.objectSize { err = fmt.Errorf("expected object length %d, actual %d", params.objectSize, numBytes) } default: panic("Developer error") } params.responses <- Resp{err, time.Since(putStartTime), numBytes} } } // Specifies the parameters for a given test type Params struct { operation string requests chan Req responses chan Resp numSamples int numClients uint objectSize int64 objectNamePrefix string bucketName string endpoints []string verbose bool } func (params Params) String() string { output := fmt.Sprintln("Test parameters") output += fmt.Sprintf("endpoint(s): %s\n", params.endpoints) output += fmt.Sprintf("bucket: %s\n", params.bucketName) output += fmt.Sprintf("objectNamePrefix: %s\n", params.objectNamePrefix) output += fmt.Sprintf("objectSize: %0.4f MB\n", float64(params.objectSize)/(1024*1024)) output += fmt.Sprintf("numClients: %d\n", params.numClients) output += fmt.Sprintf("numSamples: %d\n", params.numSamples) output += fmt.Sprintf("verbose: %t\n", params.verbose) return output } // Contains the summary for a given test result type Result struct { operation string bytesTransmitted int64 numErrors int opDurations []float64 totalDuration time.Duration } func (r Result) String() string { report := fmt.Sprintf("Results Summary for %s Operation(s)\n", r.operation) report += fmt.Sprintf("Total Transferred: %0.3f MB\n", float64(r.bytesTransmitted)/(1024*1024)) report += fmt.Sprintf("Total Throughput: %0.2f MB/s\n", (float64(r.bytesTransmitted)/(1024*1024))/r.totalDuration.Seconds()) report += fmt.Sprintf("Total Duration: %0.3f s\n", r.totalDuration.Seconds()) report += fmt.Sprintf("Number of Errors: %d\n", r.numErrors) if len(r.opDurations) > 0 { report += fmt.Sprintln("------------------------------------") report += fmt.Sprintf("%s times Max: %0.3f s\n", r.operation, r.percentile(100)) report += fmt.Sprintf("%s times 99th %%ile: %0.3f s\n", r.operation, r.percentile(99)) report += fmt.Sprintf("%s times 90th %%ile: %0.3f s\n", r.operation, r.percentile(90)) report += fmt.Sprintf("%s times 75th %%ile: %0.3f s\n", r.operation, r.percentile(75)) report += fmt.Sprintf("%s times 50th %%ile: %0.3f s\n", r.operation, r.percentile(50)) report += fmt.Sprintf("%s times 25th %%ile: %0.3f s\n", r.operation, r.percentile(25)) report += fmt.Sprintf("%s times Min: %0.3f s\n", r.operation, r.percentile(0)) } return report } func (r Result) percentile(i int) float64 { if i >= 100 { i = len(r.opDurations) - 1 } else if i > 0 && i < 100 { i = int(float64(i) / 100 * float64(len(r.opDurations))) } return r.opDurations[i] } type Req interface{} type Resp struct { err error duration time.Duration numBytes int64 }
<filename>hearth-core/src/main/java/cn/eiden/hsm/game/ManaCrystal.java package cn.eiden.hsm.game; import cn.eiden.hsm.game.card.Card; import lombok.Getter; /** * @author <NAME> * @date 2020/3/17 19:09 */ @Getter public class ManaCrystal extends AbstractGeneralItem implements Cloneable{ /** * 上限 */ private static final int CRYSTAL_LIMIT = 10; /** * 下限 */ private static final int CRYSTAL_OFFLINE = 0; /** * 当前法力水晶数量 */ private int manaCrystal; /** * 有活力的法力水晶 */ private int alive; /** * 无法使用的法力水晶 */ private int locked; /** * 过载法力水晶 */ private int overload; /** * 影响下回合的水晶 */ private int save; public ManaCrystal() { this.manaCrystal = 0; this.alive = 0; this.locked = 0; this.overload = 0; this.save = 0; } /** * 获得空的法力水晶 * * @param number 数量 */ public void addEmpty(int number) { //超过上限无效 manaCrystal = Math.min(manaCrystal + number, CRYSTAL_LIMIT); } /** * 获得临时的法力水晶 * * @param number 数量 */ public void addAlive(int number) { //超过上限无效 alive = Math.min(alive + number, CRYSTAL_LIMIT); } /** * 恢复已使用的法力水晶 */ public void recover() { alive = manaCrystal; } public void loadSave(){ alive += save; save = 0; } public void setSave(int save) { this.save = save; } /** * 使用 * * @param card 被使用的卡牌 */ public void applyAvailable(Card card) { int number = card.getCost(); //低于下限无效 alive = Math.max(alive - number, CRYSTAL_OFFLINE); //过载 this.overload(card.getOverload()); } /** * 过载 * * @param number 数量 */ public void overload(int number) { //超过上限无效 overload = Math.min(overload + number, CRYSTAL_LIMIT); } /** * 加锁 */ public void locked() { locked = overload; overload = 0; } /** * 解锁 */ public void unlock() { locked = 0; } /** * 获取当前可使用的 * * @return 能用的水晶 */ public int getAvailable() { return alive - locked; } /** * 检查费用是否充足 * * @param cost 费用 * @return 充足返回true */ public boolean checkCost(int cost) { return cost <= getAvailable(); } /** * 新回合开始 */ public void newTurnStart() { //最大法力水晶加一 addEmpty(1); //恢复已使用的法力水晶 recover(); //还债 loadSave(); //解锁 unlock(); //加锁 locked(); } @Override public ManaCrystal clone(){ try { return (ManaCrystal) super.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); return null; } } }
A new study has found college students who play action video games like Call of Duty could also be more capable of following through on suicidal thoughts. Unfortunately, the study leaves many important questions unanswered. The research was based on a psychological concept known as acquired capability for suicide (ACS), a measurement of whether a person is physically and mentally prepared to make a suicide attempt. “The theory suggests that individuals who are experiencing suicide ideation, but have low ACS, will not attempt suicide; however, individuals who are experiencing suicide ideation and have elevated ACS are at the greatest risk for lethal or near-lethal self-harm,” the researchers explained. Key factors that increase the acquired capability for suicide are reduced fear of death and the tolerance for physical pain. The study of 228 college students who played video games on a weekly basis failed to find a link between overall hours of video game play and acquired capability for suicide. However, when focusing on the action category of video games, the relationship between hours of game play and the acquired capability for suicide became statistically significant. The researchers said being exposed to virtual violence could decrease fear of death and increased perceived tolerance for pain, which would increase the capability for suicide. They noted that in some games, such as Grand Theft Auto, “players are able to attempt or die by suicide, which could provide a suicide-specific behavioral representation that leads to increased ACS.” But the relationship between gaming and the acquired capability for suicide is murky. It is unclear whether increased gaming leads to increased capability for suicide, or whether people with increased capability for suicide are drawn to action video games. The study also did not examine whether there was a relationship between gaming and suicidal thoughts per se. Since suicide is the second leading cause of death among college students in the United States, the researcher said more research on gaming and suicide is warranted. The research was published in Cyberpsychology, Behavior, and Social Networking. (If you or someone you know are in a suicide crisis, call the National Suicide Prevention Lifeline at 1-800-273-8255.)
<gh_stars>10-100 package org.stjs.javascript; import static org.junit.Assert.assertEquals; import org.junit.Test; //============================================ //Tests section 15.4.4.13 of the ECMA-262 Spec //============================================ public class ArrayUnshiftTest { @Test public void testUnshift01() { Array<Integer> x = new Array<Integer>(); int len = x.unshift(1); assertEquals(1, len); assertEquals(1, x.$get(0).intValue()); len = x.unshift(); assertEquals(1, len); assertEquals(null, x.$get(1)); len = x.unshift(-1); assertEquals(-1, x.$get(0).intValue()); assertEquals(2, x.$length()); } @Test public void testUnshift02() { Array<Object> x = JSCollections.$array(); x.$set(0, 0); int len = x.unshift(true, Double.POSITIVE_INFINITY, "NaN", "1", -1); assertEquals(6, len); assertEquals(0, x.$get(5)); assertEquals(true, x.$get(0)); assertEquals(Double.POSITIVE_INFINITY, x.$get(1)); assertEquals("NaN", x.$get(2)); assertEquals("1", x.$get(3)); assertEquals(-1, x.$get(4)); assertEquals(6, x.$length()); } }
<reponame>AkmalArtikov/deaf /** * Copyright 2015 YA LLC * <p/> * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * <p/> * http://www.apache.org/licenses/LICENSE-2.0 * <p/> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ru.yandex.subtitles.analytics; import android.app.Activity; import android.content.Context; import android.content.res.Resources; import android.support.annotation.NonNull; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; import ru.yandex.subtitles.content.data.Member; import ru.yandex.subtitles.content.data.Message; import ru.yandex.subtitles.content.data.Phrase; import ru.yandex.subtitles.content.data.Thread; import ru.yandex.subtitles.utils.DateTimeUtils; import ru.yandex.subtitles.utils.TextUtilsExt; public class Analytics { private static final String MAIN_START_CONVERSATION_BUTTON_PRESSED = "Start conversation button clicked."; private static final String MAIN_STARTING_PHRASE_PRESSED = "Opening phrase clicked."; private static final String CHAT_CONVERSATION_TERMINATED = "Conversation was terminated."; private static final String QUESTIONNAIRE_COMPLETED = "Questionnaire was completed."; private static final String SETTINGS_RECOGNITION_LANGUAGE_SWITCHED = "Recognition language switched"; private static final String SETTINGS_VOCALIZATION_GENDER_SWITCHED = "Vocalization gender switched"; private static final String SETTINGS_APP_SHARED = "App shared"; private static final String SETTINGS_ABOUT_APP = "About app"; private static final String SETTINGS_ABOUT_SPEECHKIT = "About speechkit"; private static final String SETTINGS_FEEDBACK = "Feedback"; private static final String CHAT_MESSAGE_COPIED = "Message copied"; private static final String CHAT_MESSAGE_PINNED = "Message pinned"; private static final String CHAT_MESSAGE_DELETED = "Message deleted"; private static final String CHAT_MESSAGE_VOCALIZED = "Message vocalized"; private static final String CHAT_MESSAGE_ZOOMED = "Message zoomed"; private static final String CHAT_TEXT_PASTED = "Text was pasted"; private static final String ZOOMED_MESSAGE_VOCALIZED = "Zoomed message vocalized"; private static final String ZOOMED_MESSAGE_QUIT = "Zoomed message quit"; private static final String ZOOMED_MESSAGE_HINT_CLICK = "Zoomed message hint shown"; private static final String MAIN_OPENING_PHRASE_INSERTED = "A new opening phrase inserted"; private static final String MAIN_OPENING_PHRASE_UPDATED = "An opening phrase was updated"; private static final String MAIN_OPENING_PHRASE_REMOVED = "An opening phrase was deleted"; private static final String MAIN_OPENING_PHRASE_MOVED = "An opening phrase was moved"; private static final String HISTORY_CONVERSATION_OPENED = "Saved conversation was opened"; private static final String HISTORY_CONVERSATION_DELETED = "Saved conversation was deleted"; private static final String HISTORY_CONVERSATION_PINNED = "Saved conversation was pinned"; private static final String NAVIGATION_DRAWER_SHOW_SETTINGS_CLICKED = "Settings opened from navigation drawer"; private static final String NAVIGATION_DRAWER_START_CONVERSATION_CLICKED = "Conversation started from navigation drawer"; private static final String NAVIGATION_DRAWER_SHOW_HISTORY_CLICKED = "History opened from navigation drawer"; private static final String QUALITY_FEEDBACK_REPORT = "feedback code."; private static final String APPWIDGET_START_CONVERSATION_BUTTON_PRESSED = "Widget. Start conversation button clicked."; private static final String APPWIDGET_STARTING_PHRASE_PRESSED = "Widget. Opening phrase clicked."; private static final String APPWIDGET_INSTALLED = "Widget installed"; private static final String APPWIDGET_DELETED = "Widget deleted"; private static final String REVERSE_ORIENTATION_CLICKED = "Reverse orientation button clicked."; private static final String QUICK_RESPONSE_SELECTED = "Quick response selected."; private static final String QUICK_RESPONSES_CLICKED = "Quick responses button clicked."; private static final String SHOW_MICROPHONE_BAR_MESSAGE = "Show microphone bar message."; private static final String ZOOMED_MESSAGES_NAVIGATION = "Zoomed messages navigation."; public static final String APPWIDGET_TYPE_LARGE = "Large"; public static final String APPWIDGET_TYPE_SMALL = "Small"; public static final String MICROPHONE_BAR_MESSAGE_SPEAK_LOUDER = "Speak louder"; public static final String MICROPHONE_BAR_MESSAGE_PHRASE_RECOGNIZED = "Phrase recognized"; public static final String NAVIGATION_PREV_CLICKED = "Previous button click."; public static final String NAVIGATION_NEXT_CLICKED = "Next button click."; public static final String NAVIGATION_SWIPE_TO_PREV = "Swipe to previous."; public static final String NAVIGATION_SWIPE_TO_NEXT = "Swipe to next."; private static boolean sInitialized = false; private static final List<EventTracker> sEventTrackers = new ArrayList<EventTracker>(); public static void addEventTracker(@NonNull final EventTracker eventTracker) { if (sInitialized) { throw new IllegalStateException("You must provide all EventTrackers before initialization"); } sEventTrackers.add(eventTracker); } public static void initialize(final Context context) { sInitialized = true; for (final EventTracker tracker : sEventTrackers) { tracker.activate(context); } } public static void onResumeActivity(final Activity activity) { for (final EventTracker tracker : sEventTrackers) { tracker.onResumeActivity(activity); } } public static void onPauseActivity(final Activity activity) { for (final EventTracker tracker : sEventTrackers) { tracker.onPauseActivity(activity); } } private static void reportEvent(@NonNull final String event) { for (final EventTracker tracker : sEventTrackers) { tracker.reportEvent(event); } } private static void reportEvent(@NonNull final String event, @NonNull final Map<String, Object> attrs) { for (final EventTracker tracker : sEventTrackers) { tracker.reportEvent(event, attrs); } } public static void onNavigationMenuSettingsClick() { reportEvent(NAVIGATION_DRAWER_SHOW_SETTINGS_CLICKED); } public static void onNavigationMenuStartConversationClick() { reportEvent(NAVIGATION_DRAWER_START_CONVERSATION_CLICKED); } public static void onNavigationMenuConversationsClick() { reportEvent(NAVIGATION_DRAWER_SHOW_HISTORY_CLICKED); } public static void onRecognitionLanguageChanged() { reportEvent(SETTINGS_RECOGNITION_LANGUAGE_SWITCHED); } public static void onVocalizationVoiceChanged() { reportEvent(SETTINGS_VOCALIZATION_GENDER_SWITCHED); } public static void onAboutAppClick() { reportEvent(SETTINGS_ABOUT_APP); } public static void onAboutSpeechKitClick() { reportEvent(SETTINGS_ABOUT_SPEECHKIT); } public static void onFeedbackClick() { reportEvent(SETTINGS_FEEDBACK); } public static void onShareAppClick() { reportEvent(SETTINGS_APP_SHARED); } public static void sendQualityFeedback(final Context context, @NonNull final Quality quality) { final Map<String, Object> eventAttributes = new HashMap<String, Object>(); eventAttributes.put("title", context.getString(quality.getTitle())); eventAttributes.put("desk", context.getString(quality.getSubtitle())); reportEvent(QUALITY_FEEDBACK_REPORT, eventAttributes); } public static void onStartConversationClick() { reportEvent(MAIN_START_CONVERSATION_BUTTON_PRESSED); } public static void onPhraseClick(final int position, final Phrase phrase) { final Map<String, Object> eventAttributes = new HashMap<String, Object>(); eventAttributes.put("Text", phrase.getText()); eventAttributes.put("Position", position); reportEvent(MAIN_STARTING_PHRASE_PRESSED, eventAttributes); } public static void onPhraseAdded(final String text) { final Map<String, Object> eventAttributes = new HashMap<String, Object>(); eventAttributes.put("Text", text); reportEvent(MAIN_OPENING_PHRASE_INSERTED, eventAttributes); } public static void onPhraseUpdated(final String text) { final Map<String, Object> eventAttributes = new HashMap<String, Object>(); eventAttributes.put("Text", text); reportEvent(MAIN_OPENING_PHRASE_UPDATED, eventAttributes); } public static void onPhraseDeleted(final String text) { final Map<String, Object> eventAttributes = new HashMap<String, Object>(); eventAttributes.put("Text", text); reportEvent(MAIN_OPENING_PHRASE_REMOVED, eventAttributes); } public static void onPhraseMoved(final String text, final long fromPosition, final long toPosition) { final Map<String, Object> eventAttributes = new HashMap<String, Object>(); eventAttributes.put("Text", text); eventAttributes.put("From position", fromPosition); eventAttributes.put("To position", toPosition); reportEvent(MAIN_OPENING_PHRASE_MOVED, eventAttributes); } public static void onHistoryConversationOpened(@NonNull final Thread thread) { final Map<String, Object> eventAttributes = new HashMap<String, Object>(); eventAttributes.put("Last opening (days ago)", DateTimeUtils.getAgeDays(thread.getLastOpeningTime())); eventAttributes.put("Times opened before", thread.getOpeningCount()); eventAttributes.put("Pinned messages count", thread.getPinnedMessageCount()); reportEvent(HISTORY_CONVERSATION_OPENED, eventAttributes); } public static void onConversationPinned(@NonNull final Thread thread) { final Map<String, Object> eventAttributes = new HashMap<String, Object>(); eventAttributes.put("Last opening (days ago)", DateTimeUtils.getAgeDays(thread.getLastOpeningTime())); eventAttributes.put("Times opened before", thread.getOpeningCount()); eventAttributes.put("Pinned messages count", thread.getPinnedMessageCount()); reportEvent(HISTORY_CONVERSATION_PINNED, eventAttributes); } public static void onConversationDeleted(@NonNull final Thread thread) { final Map<String, Object> eventAttributes = new HashMap<String, Object>(); eventAttributes.put("Last opening (days ago)", DateTimeUtils.getAgeDays(thread.getLastOpeningTime())); eventAttributes.put("Times opened before", thread.getOpeningCount()); eventAttributes.put("Pinned messages count", thread.getPinnedMessageCount()); reportEvent(HISTORY_CONVERSATION_DELETED, eventAttributes); } public static void onShowZoomedMessageDescription() { reportEvent(ZOOMED_MESSAGE_HINT_CLICK); } public static void onExitFullscreen(final String method, final MessageMetadata messageMetadata) { final Map<String, Object> eventAttributes = new HashMap<String, Object>(); eventAttributes.put("Method", method); eventAttributes.put("Is opening phrase", messageMetadata.isOpeningPhrase() ? "Yes" : "No"); eventAttributes.put("Was vocalized", messageMetadata.wasVocalized() ? "Yes" : "No"); eventAttributes.put("Time displayed", TimeUnit.SECONDS.toMinutes(messageMetadata.getDurationInSeconds())); eventAttributes.put("Text", messageMetadata.getText()); reportEvent(ZOOMED_MESSAGE_QUIT, eventAttributes); } public static void onVocalizeZoomedMessage() { reportEvent(ZOOMED_MESSAGE_VOCALIZED); } public static void onConversationTextPaste() { reportEvent(CHAT_TEXT_PASTED); } public static void onFullscreenMessage() { reportEvent(Analytics.CHAT_MESSAGE_ZOOMED); } public static void onCopyMessage(final Message message) { final String sender = (message.getUserId() == Member.VISAVIS ? "Collocutor" : "Device owner"); final Map<String, Object> eventAttributes = new HashMap<String, Object>(); eventAttributes.put("Sender", sender); reportEvent(Analytics.CHAT_MESSAGE_COPIED, eventAttributes); } public static void onPinMessage(final Message message) { Map<String, Object> eventAttributes = new HashMap<String, Object>(); eventAttributes.put("Message", message.getText()); reportEvent(Analytics.CHAT_MESSAGE_PINNED, eventAttributes); } public static void onDeleteMessage(final Message message) { final String sender = (message.getUserId() == Member.VISAVIS ? "Collocutor" : "Device owner"); final Map<String, Object> eventAttributes = new HashMap<String, Object>(); eventAttributes.put("Sender", sender); reportEvent(Analytics.CHAT_MESSAGE_DELETED, eventAttributes); } public static void onVocalizeMessage() { reportEvent(CHAT_MESSAGE_VOCALIZED); } public static void reportConversationMetadata(final ConversationMetadata metadata) { final Map<String, Object> eventAttributes = new HashMap<String, Object>(); eventAttributes.put("Duration", TimeUnit.SECONDS.toMinutes(metadata.getDurationInSeconds())); eventAttributes.put("Owner's statement count", metadata.getOwnerStatementCount()); eventAttributes.put("Collocutor's statement count", metadata.getVisavisStatementCount()); eventAttributes.put("Zoomed messages count", metadata.getZoomedMessageCount()); eventAttributes.put("Vocalized messages count", metadata.getVocalizedMessageCount()); eventAttributes.put("Conversations count", metadata.getConversationsCount()); eventAttributes.put("The first phrase", TextUtilsExt.isEmpty(metadata.getFirstPhrase()) ? "No message" : metadata.getFirstPhrase()); eventAttributes.put("Started from widget", metadata.isFromWidget() ? "Yes" : "No"); eventAttributes.put("Reverse portrait", Boolean.toString(metadata.isReversePortrait())); reportEvent(CHAT_CONVERSATION_TERMINATED, eventAttributes); } public static void onQuestionnaireCompleted(final Context context, final List<Question> answers) { final Resources resources = context.getResources(); final Map<String, Object> eventAttributes = new HashMap<String, Object>(); for (final Question question : answers) { final int answerIndex = question.getAnswer(); if (answerIndex >= 0) { final String title = resources.getString(question.getTitle()); final String answer = resources.getStringArray(question.getOptions())[answerIndex]; eventAttributes.put(title, answer); } } reportEvent(QUESTIONNAIRE_COMPLETED, eventAttributes); } public static void onAppWidgetStartConversationClick() { reportEvent(APPWIDGET_START_CONVERSATION_BUTTON_PRESSED); } public static void onAppWidgetPhraseClick(@NonNull final String phrase) { final Map<String, Object> eventAttributes = new HashMap<String, Object>(); eventAttributes.put("Text", phrase); reportEvent(APPWIDGET_STARTING_PHRASE_PRESSED, eventAttributes); } public static void onAppWidgetInstalled(final String type) { final Map<String, Object> eventAttributes = new HashMap<String, Object>(); eventAttributes.put("Type", type); reportEvent(Analytics.APPWIDGET_INSTALLED, eventAttributes); } public static void onAppWidgetDeleted(final String type) { final Map<String, Object> eventAttributes = new HashMap<String, Object>(); eventAttributes.put("Type", type); reportEvent(Analytics.APPWIDGET_DELETED, eventAttributes); } public static void onReverseOrientationClick() { reportEvent(REVERSE_ORIENTATION_CLICKED); } public static void onQuickResponseSelected(@NonNull final String text) { final Map<String, Object> eventAttributes = new HashMap<String, Object>(); eventAttributes.put("Text", text); reportEvent(QUICK_RESPONSE_SELECTED, eventAttributes); } public static void onQuickResponsesClick() { reportEvent(QUICK_RESPONSES_CLICKED); } public static void onMicrophoneBarMessage(@NonNull final String message) { final Map<String, Object> eventAttributes = new HashMap<String, Object>(); eventAttributes.put("Message", message); reportEvent(SHOW_MICROPHONE_BAR_MESSAGE, eventAttributes); } public static void onZoomedMessagesNavigation(@NonNull final String method, final long userId) { final Map<String, Object> eventAttributes = new HashMap<String, Object>(); eventAttributes.put("Method", method); eventAttributes.put("Messages owner", userId == Member.VISAVIS ? "Collocutor" : "Device owner"); reportEvent(ZOOMED_MESSAGES_NAVIGATION, eventAttributes); } }
package guiutil import ( "strconv" "time" "fyne.io/fyne/v2" "fyne.io/fyne/v2/container" "fyne.io/fyne/v2/widget" "github.com/pilinsin/util" ) type TimeSelect struct { Y *widget.Select M *widget.Select D *widget.Select h *widget.Select m *widget.Select } func lastDay(year, month string) int { t, _ := time.Parse(util.Layout, year+"-"+month+"-"+"1 0:00") return t.AddDate(0, 1, -1).Day() } func NewTimeSelect() *TimeSelect { now := time.Now() year := &widget.Select{ Options: util.ArangeStr(now.Year(), now.Year()+100, 1), Selected: strconv.Itoa(now.Year()), } month := &widget.Select{ Options: util.ArangeStr(1, 13, 1), Selected: strconv.Itoa(int(now.Month())), } day := &widget.Select{ Options: util.ArangeStr(1, 32, 1), Selected: strconv.Itoa(now.Day()), } year.OnChanged = func(y string) { d := lastDay(y, month.Selected) day.Options = util.ArangeStr(1, d+1, 1) selected, _ := strconv.Atoi(day.Selected) if selected > d { day.Selected = strconv.Itoa(d) } day.Refresh() } month.OnChanged = func(mth string) { d := lastDay(year.Selected, mth) day.Options = util.ArangeStr(1, d+1, 1) selected, _ := strconv.Atoi(day.Selected) if selected > d { day.Selected = strconv.Itoa(d) } day.Refresh() } year.ExtendBaseWidget(year) month.ExtendBaseWidget(month) day.ExtendBaseWidget(day) hour := &widget.Select{ Options: util.ArangeStr(0, 24, 1), Selected: "0", } hour.ExtendBaseWidget(hour) min := &widget.Select{ Options: util.ArangeStr(0, 60, 1), Selected: "0", } min.ExtendBaseWidget(min) return &TimeSelect{ Y: year, M: month, D: day, h: hour, m: min, } } func (ts *TimeSelect) Render() fyne.CanvasObject { return container.NewHBox(ts.Y, ts.M, ts.D, ts.h, ts.m) } func (ts *TimeSelect) Time() string { Y := ts.Y.Selected M := ts.M.Selected D := ts.D.Selected h := ts.h.Selected m := ts.m.Selected //2006-1-2 15:4 return Y + "-" + M + "-" + D + " " + h + ":" + m }
def testGetTabRect(self): for i, _ in enumerate(self.rects): self.assertEquals(self.ctrl.GetTabRect(i), self.rects[i]) self.assertRaises(IndexError, self.ctrl.GetTabRect, 99)
package com.google.android.gms.internal.ads; public final class zzctn implements zzdti<zzctl> { /* renamed from: a */ private final zzdtu<zzbbl> f27364a; /* renamed from: b */ private final zzdtu<zzcxk> f27365b; private zzctn(zzdtu<zzbbl> zzdtu, zzdtu<zzcxk> zzdtu2) { this.f27364a = zzdtu; this.f27365b = zzdtu2; } /* renamed from: a */ public static zzctn m28864a(zzdtu<zzbbl> zzdtu, zzdtu<zzcxk> zzdtu2) { return new zzctn(zzdtu, zzdtu2); } public final /* synthetic */ Object get() { return new zzctl((zzbbl) this.f27364a.get(), (zzcxk) this.f27365b.get()); } }
A woman being taken to hospital on Monday. (Source: Express photo) As the death toll rose to 12 on Tuesday, three days after the sterilisation camp organised by the state government in Takhatpur block of Bilaspur district on Saturday, enquiries revealed that besides medical negligence, guidelines and procedures outlined for such operations were also seemingly violated. Advertising Of the 83 women who underwent laparoscopic tubectomies, over 50 are still in hospital. Twenty-five of them are reported to be critical. According to the central government’s guidelines, a medical team cannot conduct more than 30 laparoscopic tubectomies in a day, with three separate laparoscopes — that means not more than 10 tubectomies with a single instrument, as each instrument needs to be properly sterilised after every operation. The guidelines state that if there are additional surgeons, instruments and supplies, the number of operations per team can be increased, but in no case should it exceed 50. Even then, it puts a cap of 10 operations by a single surgeon with a single instrument. The hospital where camp was held has been sealed But in Bilaspur, just one doctor, Dr R K Gupta, conducted 83 operations with one instrument in five hours — less than four minutes per operation. Dr Gupta is considered an expert in such cases, and was awarded by Chief Minister Raman Singh on January 26 this year for conducting 50,000 laparoscopic tubectomies. Advertising The government’s guidelines also state that all sterilisation camps must be organised only at “established healthcare facilities” recognised by the Government of India. However, the Bilaspur operations were conducted at a private charitable hospital in Pendri village which has remained closed, almost abandoned, for about a year now. A health worker who was present at the camp said one room of the hospital was opened, and all the women were made to lie down on the floor for the tubectomies. Though the government claimed to have sealed the hospital yesterday, many people visited it today. While State Health Minister Amar Agarwal denied pressure to meet targets set under the central government’s family planning scheme, health officials pointed at the data to indicate that they face routine pressure to hurriedly meet the targets. According to the available records, this was not the first time that so many tubectomies were conducted in a single day. Officers of the family planning department noted that there has not been a single instance in the last several years when the number of laparoscopic tubectomies conducted at a camp by a doctor in a day was less than the prescribed ten. “This figure often crosses 100,” said an official. Meanwhile, Prime Minister Narendra Modi called up Chhattisgarh Chief Minister Raman Singh on Tuesday and is learnt to have taken strong exception to the incident. “The PM has asked Singh to ensure a thorough investigation & action in the entire issue,” the PMO tweeted. Significantly, until Modi’s call, the government was reluctant to even admit negligence in the case. Bilaspur CMO R K Bhange had defended Gupta yesterday, saying he is a “senior doctor”. Responding to the demand for the Health Minister’s removal, the Chief Minister had said: “Operations are conducted by doctors, not ministers.” The state government’s tone seemed to have changed today. Singh suspended Dr Gupta, Block Medical Officer of Takhatpur Dr Pramod Tiwari, Bilaspur CMO R K Bhange and State Coordinator of Family Planning Programme K C Uraon, and ordered an FIR against them. Director, Health Services, Dr Kamalpreet Singh has also been transferred. While the government announced a compensation of Rs 2 lakh each for the families of the dead yesterday, Singh today raised it to Rs 4 lakh. Advertising In New Delhi, sources in AIIMS confirmed that they had received orders from the Union Health Ministry to send a team of four doctors to Chhattisgarh to attend to the women in hospital. “A multi-disciplinary team of four doctors, including surgeons, critical care specialists and gynecologists, will be travelling to Chhattisgarh tomorrow morning,” said a senior AIIMS official.
Get the biggest daily news stories by email Subscribe Thank you for subscribing We have more newsletters Show me See our privacy notice Could not subscribe, try again later Invalid Email A judge stunned a courtroom by using the C-word as she jailed a racist thug. Vile John Hennigan, 50, was being sentenced by Judge Patricia Lynch QC when he told her she was "a bit of a c***" But, taking no prisoners, the judge immediately retorted: "You are a bit of a c*** yourself. Being offensive to me doesn't help." Hennigan shouted back: "Go f*** yourself." "You too," replied the judge. (Image: Central News) Judge Lynch dropped the C-bomb as she jailed Hennigan for 18 months for insulting a black Caribbean mother. He told Tanisha Ford: "I don't agree with inter-racial relationships. I like natural" later adding: "I prefer white children". The court heard Hennigan has 23 convictions for 47 offences, many of them involving Nazi salutes and racist incidents. The latest offence, committed in his hometown of Harlow, Essex, was his ninth breach of an ASBO banning him from acting in an anti social way or using racist language. In October 2012 he was seen performing a Nazi salute in a central London pub and calling black people vile racial slurs. Describing Tanisha's reaction to Hennigan's racist outburst, Prosecutor Lynne Shirley said: "She was shocked and surprised. (Image: PA) "The incident made her feel very upset, hurt, out of place and distressed. She was alarmed her children had to listen to the comments." While sentencing Hennigan at Chelmsford Crown Court on Tuesday, Judge Lynch told him: "Your offence is thoroughly unpleasant and repeated breaches of this order using the most unpleasant of language and causing distress. "It's said custody would be distressing for you but it seems you never learn. "This is the ninth time you have breached this order, the same offensive, racist comments and you don't deserve another chance." It was at this point that Hennigan began talking directly to the judge and swearing at her. Following their c-word exchange Hennigan banged on the glass panel of the dock, performed a Nazi salute and twice shouted "Sieg Heil" before starting to sing "Jews gas them all...." Judge Lynch, still speaking in a measured tone, commented: "We are all really impressed. Take him down." It isn't the first time the judge has been in the limelight. Last year, Judge Lynch apologised for not jailing a pervert pensioner who abused teenage girls. She spoke out after Michael Taylor admitted sexually assaulting two youngsters at Mistley Place Park animal sanctuary. The 75-year-old groomed, kissed and groped the two girls, forcing kisses on them and touching one teen's breasts. Taylor admitted the sickening acts and was sentenced at Chelmsford Crown Court however he avoided jail after Judge Lynch said her hands were tied by strict sentencing guidelines. She told the victims and their families she wanted to pass a longer than minimum prison term, possibly suspended but due to the guidelines she could only pass down a 36-month community order.
<filename>lib/am335x_sdk/ti/board/src/evmDRA75x/pinmux/evmDRA7xx_pinmux.c /** * @file evmDRA7xx_pinmux.c * * @brief * This is the pin configuration for evmDRA7xx. * * \par * ============================================================================ * @n (C) Copyright 2018, Texas Instruments, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the * distribution. * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * \par */ #include <ti/csl/cslr_device.h> #include <ti/drv/mmcsd/soc/MMCSD_soc.h> #include "evmDRA7xx_pinmux.h" #include "board_internal.h" #include "iodelay_config.h" #define IO_DELAY #define IO_DELAY_STACK_SIZE 128 extern void Board_ioStack(void *sp, void(fn)(const boardPadDelayCfg_t * pPadCfgData, uint32_t padArraySize), const boardPadDelayCfg_t *pPadCfgData, uint32_t padArraySize); /** * \brief Temporary stack used for IO delay code */ #if defined(_TMS320C6X) # pragma DATA_SECTION (ioStack, "BOARD_IO_DELAY_DATA"); far uint32_t ioStack[IO_DELAY_STACK_SIZE]; #elif defined(__TI_ARM_V7M4__) # pragma DATA_SECTION (ioStack, "BOARD_IO_DELAY_DATA"); uint32_t ioStack[IO_DELAY_STACK_SIZE]; #else uint32_t ioStack[IO_DELAY_STACK_SIZE] __attribute__((section("BOARD_IO_DELAY_DATA"))); #endif #if defined(_TMS320C6X) || defined(__TI_ARM_V7M4__) # pragma CODE_SECTION (boardGetPinmuxCfg, "BOARD_IO_DELAY_CODE"); mmcBoardPadCfgTable_t *boardGetPinmuxCfg(mmcBoardPadCfgTable_t *ptr, int32_t mode); #else mmcBoardPadCfgTable_t *boardGetPinmuxCfg(mmcBoardPadCfgTable_t *ptr, int32_t mode) __attribute__((section("BOARD_IO_DELAY_CODE"))); #endif extern const boardPadDelayCfg_t pad_1_0[]; extern const boardPadDelayCfg_t pad_2_0[]; const boardPadDelayCfg_t *pad; Board_STATUS Board_pinmuxConfig(void) { uint32_t size, regVal; volatile uint32_t siliconRev = Board_getSiliconRev(); /* i890: MMC1 IOs and PBIAS Must Be Powered-Up before Isolation: * Power-up the MMC1 IOs and PBIAS before starting the Isolation Sequence. This can be * done by setting the CTRL_CORE_CONTROL_PBIAS[27] SDCARD_BIAS_PWRDNZ * and CTRL_CORE_CONTROL_PBIAS[26] SDCARD_IO_PWRDNZ bits to 1. */ CSL_control_core_padRegs *hCtrlCorePad = (CSL_control_core_padRegs *)SOC_CTRL_MODULE_CORE_CORE_PAD_REGISTERS_BASE; regVal = hCtrlCorePad->CONTROL_PBIAS; CSL_FINST(regVal, CONTROL_CORE_PAD_CONTROL_PBIAS_SDCARD_BIAS_PWRDNZ, DISABLE); CSL_FINST(regVal, CONTROL_CORE_PAD_CONTROL_PBIAS_SDCARD_IO_PWRDNZ, DISABLE); hCtrlCorePad->CONTROL_PBIAS = regVal; /* Check to make sure IO Delay stack and functions are in local memory */ if (((uint32_t) & ioStack >= 0x80000000) || ((uint32_t)BoardCtrlPadIoDelayConfig >= 0x80000000)) { return BOARD_PINMUX_BAD_MEM_REGION; } pad = boardPadGetCfg(&size); #if defined (_TMS320C6X) || defined (__TI_ARM_V7M4__) Board_ioStack(ioStack + IO_DELAY_STACK_SIZE, BoardCtrlPadIoDelayConfig, pad, size); #else /* __ARM_ARCH_7A__ */ asm ("STR r13, [%0]\n" ::"r" (&ioStack[IO_DELAY_STACK_SIZE - 1])); asm ("MOV r13, %0\n" ::"r" (&ioStack[IO_DELAY_STACK_SIZE - 2])); /* Configure the pinmux and virtual/manual timing modes for all pads. */ BoardCtrlPadIoDelayConfig(pad, size); asm ("MOV r13, %0\n" ::"r" (ioStack[IO_DELAY_STACK_SIZE - 1])); #endif /* End of IO Delay config with relocation */ /* Disable RGMII half cycle delay for ES2.0 silicon */ if (2U <= siliconRev) { #if defined (SOC_DRA72x) || defined (SOC_DRA75x) HW_WR_FIELD32(SOC_CTRL_MODULE_CORE_CORE_REGISTERS_BASE + CTRL_CORE_SMA_SW_1, CTRL_CORE_SMA_SW_1_RGMII2_ID_MODE_N, 0x1U); HW_WR_FIELD32(SOC_CTRL_MODULE_CORE_CORE_REGISTERS_BASE + CTRL_CORE_SMA_SW_1, CTRL_CORE_SMA_SW_1_RGMII1_ID_MODE_N, 0x1U); #endif } return BOARD_SOK; } int32_t BoardMmcCtrlPadConfig(int32_t mode, uint32_t instance) { mmcBoardPadCfgTable_t *pinmuxCfgTbl = NULL; mmcBoardPadCfgTable_t *ctrlPadCfg = NULL; uint32_t regVal; /* Get the pointer to the table containing the MMC runtime config table */ pinmuxCfgTbl = BoardGetMmcCtrlPadPinmuxTable(instance); /* Get the pointer to the MMC configuration mode pin mux configuration */ ctrlPadCfg = boardGetPinmuxCfg(pinmuxCfgTbl, mode); if (ctrlPadCfg != NULL) { /* i890: MMC1 IOs and PBIAS Must Be Powered-Up before Isolation: * Power-up the MMC1 IOs and PBIAS before starting the Isolation Sequence. This can be * done by setting the CTRL_CORE_CONTROL_PBIAS[27] SDCARD_BIAS_PWRDNZ * and CTRL_CORE_CONTROL_PBIAS[26] SDCARD_IO_PWRDNZ bits to 1. */ CSL_control_core_padRegs *hCtrlCorePad = (CSL_control_core_padRegs *)SOC_CTRL_MODULE_CORE_CORE_PAD_REGISTERS_BASE; regVal = hCtrlCorePad->CONTROL_PBIAS; CSL_FINST(regVal, CONTROL_CORE_PAD_CONTROL_PBIAS_SDCARD_BIAS_PWRDNZ, DISABLE); CSL_FINST(regVal, CONTROL_CORE_PAD_CONTROL_PBIAS_SDCARD_IO_PWRDNZ, DISABLE); hCtrlCorePad->CONTROL_PBIAS = regVal; /* Check to make sure IO Delay stack and functions are in local memory */ if (((uint32_t)&ioStack >= 0x80000000) || ((uint32_t)BoardCtrlPadIoDelayConfig >= 0x80000000)) return BOARD_PINMUX_BAD_MEM_REGION; #if defined(_TMS320C6X) || defined (__TI_ARM_V7M4__) Board_ioStack(ioStack + IO_DELAY_STACK_SIZE, BoardCtrlPadIoDelayConfig, ctrlPadCfg->mmcPadCfg, ctrlPadCfg->noPins); #else /* __ARM_ARCH_7A__ */ asm ("STR r13, [%0]\n" ::"r" (&ioStack[IO_DELAY_STACK_SIZE - 1])); asm ("MOV r13, %0\n" ::"r" (&ioStack[IO_DELAY_STACK_SIZE - 2])); /* Configure the pinmux and virtual/manual timing modes for all pads. */ BoardCtrlPadIoDelayConfig(ctrlPadCfg->mmcPadCfg, ctrlPadCfg->noPins); asm ("MOV r13, %0\n" ::"r" (ioStack[IO_DELAY_STACK_SIZE - 1])); #endif /* End of IO Delay config with relocation */ } else { return BOARD_PINMUX_INVALID_MODE; } return BOARD_SOK; } mmcBoardPadCfgTable_t *boardGetPinmuxCfg(mmcBoardPadCfgTable_t *ptr, int32_t mode) { mmcBoardPadCfgTable_t *padCfg = NULL; while (ptr->mmcMode != MMC_MODE_INVALID) { if ((mode == ptr->mmcMode) && (ptr->mmcPadCfg != NULL)) { padCfg = ptr; break; } ptr++; } return padCfg; } MMCSD_Error MMCSD_iodelayFxn(uint32_t instanceNum, MMCSD_v1_IodelayParams *iodelayParams) { Int32 mmcMode = MMC_MODE_INVALID; switch (instanceNum) { case 1: if ((MMCSD_LOOPBACK_ANY == iodelayParams->loopBackType) || (MMCSD_LOOPBACK_PAD == iodelayParams->loopBackType)) { if (MMCSD_TRANSPEED_DEFAULT == iodelayParams->transferSpeed) { mmcMode = MMC1_DEFAULT_PLB; } else if (MMCSD_TRANSPEED_HS == iodelayParams->transferSpeed) { mmcMode = MMC1_HS_PLB; } else if (MMCSD_TRANSPEED_SDR12 == iodelayParams->transferSpeed) { mmcMode = MMC1_SDR12_PLB; } else if (MMCSD_TRANSPEED_SDR50 == iodelayParams->transferSpeed) { mmcMode = MMC1_SDR50_PLB; } else if (MMCSD_TRANSPEED_DDR50 == iodelayParams->transferSpeed) { mmcMode = MMC1_DDR50_PLB; } else if (MMCSD_TRANSPEED_SDR104 == iodelayParams->transferSpeed) { mmcMode = MMC1_SDR104; } } if (MMCSD_LOOPBACK_INTERNAL == iodelayParams->loopBackType) { if (MMCSD_TRANSPEED_DDR50 == iodelayParams->transferSpeed) { mmcMode = MMC1_DDR50_ILB; } else if (MMCSD_TRANSPEED_DEFAULT == iodelayParams->transferSpeed) { mmcMode = MMC1_DS_ILB; } else if (MMCSD_TRANSPEED_HS == iodelayParams->transferSpeed) { mmcMode = MMC1_HS_ILB; } else if (MMCSD_TRANSPEED_SDR12 == iodelayParams->transferSpeed) { mmcMode = MMC1_SDR12_ILB; } else if (MMCSD_TRANSPEED_SDR25 == iodelayParams->transferSpeed) { mmcMode = MMC1_SDR25_ILB; } else if (MMCSD_TRANSPEED_SDR50 == iodelayParams->transferSpeed) { mmcMode = MMC1_SDR50_ILB; } } break; case 2: if ((MMCSD_LOOPBACK_ANY == iodelayParams->loopBackType) || (MMCSD_LOOPBACK_PAD == iodelayParams->loopBackType)) { if (MMCSD_TRANSPEED_DEFAULT == iodelayParams->transferSpeed) { mmcMode = MMC2_DEFAULT_STD_PLB; } else if (MMCSD_TRANSPEED_HS == iodelayParams->transferSpeed) { mmcMode = MMC2_DEFAULT_HS_PLB; } else if (MMCSD_TRANSPEED_HS200 == iodelayParams->transferSpeed) { mmcMode = MMC2_HS200; } } if (MMCSD_LOOPBACK_INTERNAL == iodelayParams->loopBackType) { mmcMode = MMC2_DDR_ILB; } else { mmcMode = MMC2_DDR_PLB; } break; case 3: if (MMCSD_TRANSPEED_DEFAULT == iodelayParams->transferSpeed) { mmcMode = MMC3_DS; } else if (MMCSD_TRANSPEED_HS == iodelayParams->transferSpeed) { mmcMode = MMC3_HS; } else if (MMCSD_TRANSPEED_SDR12 == iodelayParams->transferSpeed) { mmcMode = MMC3_SDR12; } else if (MMCSD_TRANSPEED_SDR25 == iodelayParams->transferSpeed) { mmcMode = MMC3_SDR25; } else if (MMCSD_TRANSPEED_DDR50 == iodelayParams->transferSpeed) { mmcMode = MMC3_SDR50; } break; case 4: if (MMCSD_TRANSPEED_DEFAULT == iodelayParams->transferSpeed) { mmcMode = MMC4_DS; } else if (MMCSD_TRANSPEED_HS == iodelayParams->transferSpeed) { mmcMode = MMC4_HS; } else if (MMCSD_TRANSPEED_SDR12 == iodelayParams->transferSpeed) { mmcMode = MMC4_SDR12; } else if (MMCSD_TRANSPEED_SDR25 == iodelayParams->transferSpeed) { mmcMode = MMC4_SDR25; } break; default: break; } if (MMC_MODE_INVALID != mmcMode) { BoardMmcCtrlPadConfig(mmcMode, instanceNum - 1); } return MMCSD_OK; }
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Model defination for the Mask-RCNN Model. Defines model_fn of Mask-RCNN for TF Estimator. The model_fn includes Mask-RCNN model architecture, loss function, learning rate schedule, and evaluation procedure. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf def learning_rate_schedule(peak_learning_rate, lr_warmup_init, lr_warmup_step, first_lr_drop_step, second_lr_drop_step, global_step): """Handles linear scaling rule, gradual warmup, and LR decay.""" # lr_warmup_init is the starting learning rate; the learning rate is linearly # scaled up to the full learning rate after `lr_warmup_step` before decaying. linear_warmup = (lr_warmup_init + (tf.cast(global_step, dtype=tf.float32) / lr_warmup_step * (peak_learning_rate - lr_warmup_init))) learning_rate = tf.where(global_step < lr_warmup_step, linear_warmup, peak_learning_rate) lr_schedule = [[1.0, lr_warmup_step], [0.1, first_lr_drop_step], [0.01, second_lr_drop_step]] for mult, start_global_step in lr_schedule: learning_rate = tf.where(global_step < start_global_step, learning_rate, peak_learning_rate * mult) return learning_rate
// Use the graphicContext polygon support to draw a huge arrow on the screen at the given position. private void drawTriangle() { graphicsContext.setFill(Color.BLACK); Point2D[] triangle = buildTriangle(trianglePosition.getX(), trianglePosition.getY(), 720 / 2); if(trianglePosition.getX() > 0) { if(!done) { graphicsContext.fillRect(0,0, trianglePosition.getX(), 720); } } double[][] triangleCords = pointsToDoubleArray(triangle[0], triangle[1], triangle[2]); graphicsContext.fillPolygon(triangleCords[0], triangleCords[1], 3); }
import { Injectable, OnInit } from "@angular/core"; import { CarTypeEnum } from "./car-type.enum"; import { ToyotaAvanza, ToyotaCamry, ToyotaCorollaAltis, ToyotaCorollaCross, ToyotaFortuner, ToyotaHilux, ToyotaInnova, ToyotaLandCruiser, ToyotaLandCruiserPrado, ToyotaRush, ToyotaVios, ToyotaWigo, ToyotaYaris } from "./cars"; import { CarInfoInterface, CarModelInfoInterface } from "./interfaces"; @Injectable({ providedIn: 'root' }) export class CarInventoryService implements OnInit { private readonly carInventory: CarInfoInterface[] = []; constructor() { // <NAME> this.carInventory.push(new ToyotaVios()); this.carInventory.push(new ToyotaCamry()); this.carInventory.push(new ToyotaCorollaAltis()); this.carInventory.push(new ToyotaWigo()); this.carInventory.push(new ToyotaYaris()) // Xe SUV this.carInventory.push(new ToyotaRush()); this.carInventory.push(new ToyotaFortuner()); this.carInventory.push(new ToyotaLandCruiserPrado()); this.carInventory.push(new ToyotaLandCruiser()); this.carInventory.push(new ToyotaCorollaCross()); // <NAME> this.carInventory.push(new ToyotaInnova()); this.carInventory.push(new ToyotaAvanza()); // <NAME>ai this.carInventory.push(new ToyotaHilux()); this.carInventory.forEach((car) => { const baseModel = car.models[0]; car.models.forEach((model) => { model.link = this.generateLink(model.brand); this.carModelNormalize(model, baseModel); }); car.link = car.models[0].link; car.lowestPrice = this.getLowestPrice(car); }); } public ngOnInit() {} public getCarInventory() { return this.carInventory; } public getCarList(): string[] { const carList: string[] = []; this.carInventory.forEach(car => { carList.push(car.name); }); return carList; } public getCar(name: string): CarInfoInterface | undefined{ return this.carInventory.find(car => car.name === name); } public getCarFromUri(uri: string): CarInfoInterface | undefined { var selectedCar: CarInfoInterface | undefined = undefined; this.carInventory.forEach((car) => { car.models.forEach((model) => { if (model.link!!.endsWith(uri) && selectedCar === undefined) { selectedCar = car; } }); }); console.log(selectedCar); return selectedCar; } public getCarModel(name: string, carModel: string): CarModelInfoInterface | undefined { const selectedCar = this.getCar(name); if (selectedCar) { return selectedCar.models.find((model) => model.brand === carModel) } else { return undefined; } } public getCarsByType(type: CarTypeEnum): CarInfoInterface[] { return this.carInventory.filter((car) => car.type === type); } public getCarModels(selectedCarName: string): string[] { const modelList: string[] = []; const selectedCar = this.getCar(selectedCarName); if (selectedCar) { selectedCar.models.forEach((model) => { modelList.push(model.brand); }); } return modelList; } public getCarPrice(name: string, model: string): number { const selectedModel = this.getCarModel(name, model); if (selectedModel) { return selectedModel.price; } else { return 0; } } public getLowestPrice(carInfo: CarInfoInterface): number { const selectedCar = this.carInventory.find((car) => car === carInfo); if (selectedCar != null) { const sortedList = selectedCar.models.sort((a, b) => a.price - b.price); return sortedList[0].price; } return 0; } private generateLink(name: string): string { const result = `xe-toyota/${name.toLowerCase().replace(/[^0-9a-z]/gi, '-')}`; return result; } private carModelNormalize(model: CarModelInfoInterface, baseModel: CarModelInfoInterface): CarModelInfoInterface { if (model.colors == null) { model.colors = baseModel.colors; } if (model.lingo == null) { model.lingo = baseModel.lingo; } if (model.seats == null) { model.seats = baseModel.seats; } if (model.type == null) { model.type = baseModel.type; } if (model.fuelType == null) { model.fuelType = baseModel.fuelType; } if (model.manufacture == null) { model.manufacture = baseModel.manufacture; } if (model.otherInfo == null){ model.otherInfo = baseModel.otherInfo; } if (model.promotion == null){ model.promotion = baseModel.promotion; } if (model.ngoaiThat == null) { model.ngoaiThat = baseModel.ngoaiThat; } if (model.noiThat == null) { model.noiThat = baseModel.noiThat; } if (model.tinhNang == null) { model.tinhNang = baseModel.tinhNang; } if (model.thongSo == null) { model.thongSo = baseModel.thongSo; } return model; } }
<reponame>zachbateman/evogression import unittest import sys sys.path.insert(1, '..') import evogression from test_data import linear_data import matplotlib import matplotlib.pyplot as plt class TestGroupComposite(unittest.TestCase): def test_evolution_group(self): group = evogression.evolution_group('y', linear_data, num_creatures=25, group_size=100, num_cycles=5, optimize=1, progressbar=False) calculation_x_values = [i / 2 for i in range(6, 30)] for evo in group: calculated_y_values = [evo.predict({'x': x}, 'pred')['pred'] for x in calculation_x_values] plt.plot(calculation_x_values, calculated_y_values, alpha=0.1) calculated_y_values = [sum(evo.predict({'x': x}, 'pred')['pred'] for evo in group) / len(group) for x in calculation_x_values] plt.plot(calculation_x_values, calculated_y_values, 'g--', alpha=1.0) plt.scatter([d['x'] for d in linear_data], [d['y'] for d in linear_data]) plt.xlabel('x') plt.ylabel('y') plt.title('Linear Regression - Group Composite Prediction Test') plt.show() evogression.output_usage(group) if __name__ == '__main__': unittest.main(buffer=True)
<reponame>TivonJJ/umi-plugin-better-theme import type * as React from 'react'; export interface FieldNames { value?: string; label?: string; children?: string; } export declare type CascaderValueType = React.Key[]; export interface DataNode { label: React.ReactNode; /** Customize hover title */ title?: string; value: string | number; disabled?: boolean; children?: DataNode[]; isLeaf?: boolean; } export interface InternalDataNode extends DataNode { node: DataNode; } export interface OptionDataNode extends Omit<InternalDataNode, 'label' | 'children' | 'title'> { title: React.ReactNode; children?: OptionDataNode[]; } export interface FlattenDataNode { key: React.Key; data: DataNode; path: React.Key[]; parent?: FlattenDataNode; } export interface ShowSearchType { filter?: (inputValue: string, options: DataNode[], fieldNames: FieldNames) => boolean; render?: (inputValue: string, path: DataNode[], prefixCls: string, fieldNames: FieldNames) => React.ReactNode; sort?: (a: DataNode[], b: DataNode[], inputValue: string, fieldNames: FieldNames) => number; matchInputWidth?: boolean; limit?: number | false; }
/** * Deletes the job corresponding to the given Id. * * @param jobId ID of the importer to delete * @return 200 if importer deleted */ @DELETE @Path("/{jobId}") @Produces({"application/json"}) public Response deleteJobWithDeleteVerb(@PathParam("jobId") @ApiParam("ID of the importer to delete") Long jobId) { return this.deleteJob(jobId); }
Turkey in the UN Security Council during the Cold War: elections, voting motivations and alliance commitments Abstract Turkey served for five years in the UN Security Council during the early Cold War period. Throughout its service, first in 1951–1952, then in 1954–1955, finally in 1961, Turkey joined 201 voting sessions, and gave many statements on matters before the Security Council. The three electoral campaigns of Turkey for the temporary seat in the Council, and its voting and statement performance during a 5-year service are very informative not only about Turkey’s foreign policy but also about the behavior of small powers during the early Cold War period and the working of the Security Council, the most important international institution. Therefore, this article aims to provide a short story of Turkey’s election to and performance in the Security Council, analyze its voting preferences during temporary membership, and debate Turkey’s voting motivations.
<reponame>KunalKavthekar/Biker-s-Portal from django.db import models from django.contrib.auth.models import User # Create your models here. class ToDoList(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE, related_name="todolist", null=True) name = models.CharField(max_length=200) src = models.CharField(max_length=100, default="src") dest = models.CharField(max_length=100, default="dest") def __str__(self): return self.name class Item(models.Model): todolist = models.ForeignKey(ToDoList, on_delete=models.CASCADE) text = models.CharField(max_length=300) complete = models.BooleanField() def __str__(self): return self.text class Search(models.Model): search = models.CharField(max_length=500) created = models.DateTimeField(auto_now=True) def __str__(self): return '{}'.format(self.search) class Meta: verbose_name_plural = 'Searches'
<reponame>krapnikkk/FairyGUI-createjs-example import * as fgui from 'fairygui-createjs'; export declare class WindowA extends fgui.Window { constructor(); protected onInit(): void; protected onShown(): void; }
/** * This class is part of JCodec ( www.jcodec.org ) This software is distributed * under FreeBSD License * * Integer to byte and vice versa conversion routines * * @author The JCodec project * */ public class DataConvert { public static int[] from16BE(byte[] b) { int[] result = new int[b.length >> 1]; int off = 0; for (int i = 0; i < result.length; i++) { result[i] = ((b[off++] & 0xff) << 8) | (b[off++] & 0xff); } return result; } public static int[] from24BE(byte[] b) { int[] result = new int[b.length / 3]; int off = 0; for (int i = 0; i < result.length; i++) { result[i] = ((b[off++] & 0xff) << 16) | ((b[off++] & 0xff) << 8) | (b[off++] & 0xff); } return result; } public static int[] from16LE(byte[] b) { int[] result = new int[b.length >> 1]; int off = 0; for (int i = 0; i < result.length; i++) { result[i] = (b[off++] & 0xff) | ((b[off++] & 0xff) << 8); } return result; } public static int[] from24LE(byte[] b) { int[] result = new int[b.length / 3]; int off = 0; for (int i = 0; i < result.length; i++) { result[i] = (b[off++] & 0xff) | ((b[off++] & 0xff) << 8) | ((b[off++] & 0xff) << 16); } return result; } public static byte[] to16BE(int[] ia) { byte[] result = new byte[ia.length << 1]; int off = 0; for (int i = 0; i < ia.length; i++) { result[off++] = (byte) ((ia[i] >> 8) & 0xff); result[off++] = (byte) (ia[i] & 0xff); } return result; } public static byte[] to24BE(int[] ia) { byte[] result = new byte[ia.length * 3]; int off = 0; for (int i = 0; i < ia.length; i++) { result[off++] = (byte) ((ia[i] >> 16) & 0xff); result[off++] = (byte) ((ia[i] >> 8) & 0xff); result[off++] = (byte) (ia[i] & 0xff); } return result; } public static byte[] to16LE(int[] ia) { byte[] result = new byte[ia.length << 1]; int off = 0; for (int i = 0; i < ia.length; i++) { result[off++] = (byte) (ia[i] & 0xff); result[off++] = (byte) ((ia[i] >> 8) & 0xff); } return result; } public static byte[] to24LE(int[] ia) { byte[] result = new byte[ia.length * 3]; int off = 0; for (int i = 0; i < ia.length; i++) { result[off++] = (byte) (ia[i] & 0xff); result[off++] = (byte) ((ia[i] >> 8) & 0xff); result[off++] = (byte) ((ia[i] >> 16) & 0xff); } return result; } /** * Generic byte-array to integer-array conversion * * Converts each depth-bit sequence from the input byte array into integer * * @param b * Input bytes * @param depth * Bit depth of the integers * @param isBe * If integers are big-endian or little-endian * @return */ public static int[] fromByte(byte[] b, int depth, boolean isBe) { if (depth == 24) if (isBe) return from24BE(b); else return from24LE(b); else if (depth == 16) if (isBe) return from16BE(b); else return from16LE(b); throw new IllegalArgumentException("Conversion from " + depth + "bit " + (isBe ? "big endian" : "little endian") + " is not supported."); } /** * Generic integer-array to byte-array conversion * * Converts each integer into depth-bit sequence in the output byte array * * @param ia * Integer array * @param depth * Bit depth of the integers * @param isBe * If integers are big-endian or little-endian * @return */ public static byte[] toByte(int[] ia, int depth, boolean isBe) { if (depth == 24) if (isBe) return to24BE(ia); else return to24LE(ia); else if (depth == 16) if (isBe) return to16BE(ia); else return to16LE(ia); throw new IllegalArgumentException("Conversion to " + depth + "bit " + (isBe ? "big endian" : "little endian") + " is not supported."); } }
When the second-generation Jaguar XF arrived in 2016 it made a splash no bigger than a raindrop falling into the Atlantic. Despite moving onto a new architecture and gaining two new four-cylinder engines, the wholly redesigned XF looks as if it received only a mild facelift. When the 2018 XF Sportbrake appears on roads in the United States near the end of this year, however, there will be no confusion about whether it’s Covington’s latest work. Jag hasn’t sold a wagon in this country since the unloved X-type departed nine years ago. Advertisement - Continue Reading Below For even deeper coverage of the XF Sportbrake, view our buyer’s guide in-depth review. Sportbrake sightings will be rare, though. Americans love a $71,445 wagon like they love Marmite, and this Jaguar’s entrance will make the mid-size luxury-wagon segment a crowded one. The Mercedes-Benz E400 and the Volvo V90 Cross Country, both boasting long wagon lineages in the States, have sybaritic luxury and comfort well covered. Jaguar hopes the Sportbrake can carve out its own niche within a niche as a sporty driver’s car for right-brained pragmatists. With the model’s success likely to be measured in hundreds of units sold every year, the Brits initially will import the Sportbrake to the States in a single configuration: the XF S Sportbrake with a supercharged 380-hp V-6, an eight-speed automatic transmission, and all-wheel drive. (Jaguar recently announced that more affordable Sportbrake models are coming here eventually, but no other details were given.) It Zigs, It Zags, It Kind of Mumbles The Sportbrake demonstrated typical Jaguar chassis prowess on asphalt snaking through northern Portugal’s rolling landscapes. The XF steers with on-center alacrity and just the right amount of power assist. Brake-based torque vectoring helps this roughly 4350-pounder turn-in and hold a line, yet it also left the pads and rotors radiating heat and stink on a spirited but not exactly aggressive run. Body roll is controlled well enough that this wagon still has an edge on Jaguar’s dynamically adept F-Pace crossover. Advertisement - Continue Reading Below We should mention that our European drive did tilt the playing field in the Jaguar’s favor. Continental ContiSportContact 5P summer tires elevated the Sportbrake's lateral grip beyond what buyers will experience in the U.S., where Jaguar will fit only all-season tires on either 19- or 20-inch wheels. And Portugal’s impeccably maintained roads offered few opportunities to evaluate impact harshness, so it’ll take us getting one on our home turf—and its pockmarked pavement—to render final judgment in that regard. It’s the powertrain that keeps the Sportbrake from fulfilling its complete mission as a dynamic standout. Despite its sizable output—about 60 horsepower more than the Mercedes or the Volvo—the 3.0-liter V-6 lacks the instant-on punch you expect of a supercharged engine. That’s exacerbated by the ZF-supplied eight-speed transmission that is slow to kick down. Shifts also lack the crispness that makes this same automatic gearbox so satisfying in dozens of Audi and BMW models. The engine note is a letdown, too, monotonous and mumbling even at full load. After investing big money in its new four-cylinder engines and aluminum-intensive architecture, it’s time for Jag to turn its attention to its sixes and eights. Advertisement - Continue Reading Below Advertisement - Continue Reading Below Great for Cargo, except When That Cargo Is Human All Sportbrakes come with a self-leveling air-spring suspension to combat the dragging-wagon rake that otherwise occurs when you fill the load space to capacity. Cargo volume expands from the XF sedan’s 19 cubic feet to 32 here with the rear seats up, only two less than the F-Pace. With the rear seats folded to make a flat load floor, the Sportbrake has 70 cubic feet of space, six cubes more than the F-Pace. The XF is less adept at carrying human cargo, though. The front seats are nearly as flat and firm as the cargo floor and grow tiresome over long drives, and those same complaints only grow louder when you sit in the shapeless rear seats. At least there’s generous legroom and headroom for adults back there. All U.S.-market Sportbrakes will come standard with features such as front and rear parking sensors, blind-spot monitoring, and adaptive dampers. Jaguar also will offer just 20 First Edition cars in the U.S. painted in Farallon Black, a metallic paint with subtle flakes of red and blue that’s typically reserved for use by Jaguar Land Rover’s SVO personalization division. First Edition cars add a selection of tech equipment as standard that is optional on the normal Sportbrake, including a Wi-Fi hotspot, an upgraded Meridian sound system, and Jaguar’s Activity Key that allows its owner to lock and unlock the car with a Fitbit-like wristband. There’s also a gesture-control feature that allows front-seat occupants to open the sunshade on the massive fixed-pane glass roof with an overhand wave. Advertisement - Continue Reading Below True to Form Back in the 1950s, Jaguar founder Sir William Lyons steered product development with the motto, “grace, space, and pace.” The Jaguar XF S Sportbrake appears tailor-built to that adage. The design is timeless, the interior is roomy enough for four adults and their sundries, and the chassis carves roads with confidence. In the brand’s current lineup, there is no other vehicle that better encapsulates Lyons’s founding principles.
class hyper_plsr: """PLSR regression with two different featuer selection - The first feature selection method (vip-model) is based on variable importance projection (VIP). The VIP function calculates the influence of each PLSR regression coefficient. VIP values greater than 1 are usally considered as important. (https://www.sciencedirect.com/science/article/pii/S0169743912001542) - The second feature selection method (vs-model) is based on discarding features that have small coefficients iteratively. The idea is to optimize for both numbers of components and features simultaneously. https://nirpyresearch.com/variable-selection-method-pls-python/ """ def __init__(self): self.model = None self.scores = None def simple_pls_cv(self, X, y, n_comp, scores=False): # Run PLS with suggested number of components pls = PLSRegression(n_components=n_comp) pls.fit(X, y) # Calculate R2 and mean square error if scores: y_c = pls.predict(X) # Cross-validation y_cv = cross_val_predict(pls, X, y, cv=10) # Calculate r2 for calibration and cross-validation r2_c = r2_score(y, y_c) r2_cv = r2_score(y, y_cv) # Calculate mean square error for calibration and cross validation mse_c = mean_squared_error(y, y_c) mse_cv = mean_squared_error(y, y_cv) return pls, r2_c, r2_cv, mse_c, mse_cv, y_cv return pls def vip(self, model): """Calculate Variable Importance Projection There is a dicsuccion to infclude this into skit-learn https://github.com/scikit-learn/scikit-learn/issues/7050 :argument sklearn-object model: The fitted plsr model """ t = model.x_scores_ w = model.x_weights_ q = model.y_loadings_ p, h = w.shape vips = np.zeros((p,)) s = np.diag(t.T @ t @ q.T @ q).reshape(h, -1) total_s = np.sum(s) for i in range(p): weight = np.array( [(w[i, j] / np.linalg.norm(w[:, j])) ** 2 for j in range(h)] ) vips[i] = np.sqrt(p * (s.T @ weight) / total_s) return vips def plsr_vip(self, X, y, max_comp): """fit PLSR based on vip feature selection :param np.array X: the feature matrix :param np.array y: the target matrix :param int max_comp: maximum components allowed for PLSR """ # Initiate matrices for later propogation # Mean sqaure error mse = np.zeros(max_comp) # list of selected index for each component idx_selected = [] # list of caculated VIPs for each component vip_values = np.zeros((max_comp, X.shape[1])) for i in range(max_comp): pls1 = self.simple_pls_cv(X, y, n_comp=i + 1, scores=False) vip_values[i, :] = self.vip(pls1) # Select VIP values greater than 1 idx = np.where(vip_values[i, :] > 1) # select spectra accordingly X_selected = np.squeeze(X[:, idx]) # fit plsr with selected bands pls_sel = self.simple_pls_cv(X_selected, y, n_comp=i + 1, scores=False) y_cv = cross_val_predict(pls_sel, X_selected, y, cv=10) mse[i] = mean_squared_error(y, y_cv) idx_selected.append(idx) # get the components and spectra that led to the minimum MSE opt_comp = np.argmin(mse) + 1 I = idx_selected[np.argmin(mse)] X_opt = np.squeeze(X[:, I]) pls_opt, r2_c, r2_cv, mse_c, mse_cv, y_cv = self.simple_pls_cv( X_opt, y, n_comp=opt_comp, scores=True ) self.model = pls_opt self.scores = [r2_c, r2_cv, mse_c, mse_cv] self.selected_index = I self.y_cv = y_cv def plsr_vs(self, X, y, max_comp): # Define MSE array to be populated mse = np.zeros((max_comp, X.shape[1])) # Loop over the number of PLS components for i in range(max_comp): # Regression with specified number of components, using full spectrum pls1 = PLSRegression(n_components=i + 1) pls1.fit(X, y) # Indices of sort spectra according to ascending absolute value of PLS coefficients sorted_ind = np.argsort(np.abs(pls1.coef_[:, 0])) # Sort spectra accordingly Xc = X[:, sorted_ind] # Discard one wavelength at a time of the sorted spectra, # regress, and calculate the MSE cross-validation for j in range(Xc.shape[1] - (i + 1)): pls2 = PLSRegression(n_components=i + 1) pls2.fit(Xc[:, j:], y) y_cv = cross_val_predict(pls2, Xc[:, j:], y, cv=5) mse[i, j] = mean_squared_error(y, y_cv) # # Calculate and print the position of minimum in MSE mseminx, mseminy = np.where(mse == np.min(mse[np.nonzero(mse)])) # Calculate PLS with optimal components and export values pls = PLSRegression(n_components=mseminx[0] + 1) pls.fit(X, y) sorted_ind = np.argsort(np.abs(pls.coef_[:, 0])) Xc = X[:, sorted_ind] opt_Xc = Xc[:, mseminy[0] :] opt_ncomp = mseminx[0] + 1 wav = mseminy[0] selected_index = sorted_ind[wav:] pls_opt, r2_c, r2_cv, mse_calib, mse_cv, y_cv = self.simple_pls_cv( opt_Xc, y, opt_ncomp, scores=True ) self.model = pls_opt self.scores = [r2_c, r2_cv, mse_calib, mse_cv] self.y_cv = y_cv self.selected_index = selected_index @staticmethod def predict(X_m, model): """Apply plsr model to new observation :param np.array X_m: new features :returns: predicted target (e.g. nitrogen) """ X_m = X_m - model._x_mean X_m = X_m / model._x_std Ypred = np.dot(X_m, model.coef_) return Ypred + model._y_mean @staticmethod def xr_predict(xdr, model, dim): """Wrapper around predict function to apply it to xarray objects :param xr.dataarray x_dr: the xarray image :param sklearn_obj model: the final plsr model :param str dim: dimension along which model should be applied (e.g. "band") """ pred = xr.apply_ufunc( hyper_plsr.predict, xdr, input_core_dims=[[dim]], kwargs={"model": model}, vectorize=True, ) return pred
/* Read char code and attribute from Virtual Text RAM (for AX)*/ void ReadVTRAMChar(uint16_t col, uint16_t row, uint16_t * result) { Bitu addr = real_readw(BIOSMEM_AX_SEG, BIOSMEM_AX_VTRAM_SEGADDR); addr <<= 4; addr += 2 * (80 * row + col); *result = mem_readw(addr); }
<gh_stars>1-10 /* * Copyright Debezium Authors. * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ package io.debezium.examples.kstreams.liveupdate.aggregator.health; import javax.enterprise.context.ApplicationScoped; import javax.inject.Inject; import org.eclipse.microprofile.health.Health; import org.eclipse.microprofile.health.HealthCheck; import org.eclipse.microprofile.health.HealthCheckResponse; import io.debezium.examples.kstreams.liveupdate.aggregator.StreamsPipelineManager; @Health @ApplicationScoped public class AggregatorStarted implements HealthCheck { @Inject private StreamsPipelineManager spm; @Override public HealthCheckResponse call() { return HealthCheckResponse.named("aggregator") .withData("KStreams pipeline started", spm.isStarted()) .state(spm.isStarted()) .build(); } }
/* * Connect to a server for getting/setting attributes, possibly on an existing * connection. This works similarly to SMBC_server(). */ SMBCSRV * SMBC_attr_server(TALLOC_CTX *ctx, SMBCCTX *context, const char *server, const char *share, char **pp_workgroup, char **pp_username, char **pp_password) { int flags; struct sockaddr_storage ss; struct cli_state *ipc_cli = NULL; struct rpc_pipe_client *pipe_hnd = NULL; NTSTATUS nt_status; SMBCSRV *srv=NULL; SMBCSRV *ipc_srv=NULL; srv = SMBC_server(ctx, context, true, server, share, pp_workgroup, pp_username, pp_password); if (!srv) { return NULL; } server = srv->cli->desthost; share = srv->cli->share; ipc_srv = SMBC_find_server(ctx, context, server, "*IPC$", pp_workgroup, pp_username, pp_password); if (!ipc_srv) { if (!*pp_password || (*pp_password)[0] == '\0') { SMBC_call_auth_fn(ctx, context, server, share, pp_workgroup, pp_username, pp_password); if (!*pp_workgroup || !*pp_username || !*pp_password) { errno = ENOMEM; return NULL; } } flags = 0; if (smbc_getOptionUseKerberos(context)) { flags |= CLI_FULL_CONNECTION_USE_KERBEROS; } if (smbc_getOptionUseCCache(context)) { flags |= CLI_FULL_CONNECTION_USE_CCACHE; } zero_sockaddr(&ss); nt_status = cli_full_connection(&ipc_cli, global_myname(), server, &ss, 0, "IPC$", "?????", *pp_username, *pp_workgroup, *pp_password, flags, Undefined, NULL); if (! NT_STATUS_IS_OK(nt_status)) { DEBUG(1,("cli_full_connection failed! (%s)\n", nt_errstr(nt_status))); errno = ENOTSUP; return NULL; } if (context->internal->smb_encryption_level) { if (!NT_STATUS_IS_OK(cli_force_encryption(ipc_cli, *pp_username, *pp_password, *pp_workgroup))) { DEBUG(4,(" SMB encrypt failed on IPC$\n")); if (context->internal->smb_encryption_level == 2) { cli_shutdown(ipc_cli); errno = EPERM; return NULL; } } DEBUG(4,(" SMB encrypt ok on IPC$\n")); } ipc_srv = SMB_MALLOC_P(SMBCSRV); if (!ipc_srv) { errno = ENOMEM; cli_shutdown(ipc_cli); return NULL; } ZERO_STRUCTP(ipc_srv); ipc_srv->cli = ipc_cli; nt_status = cli_rpc_pipe_open_noauth( ipc_srv->cli, &ndr_table_lsarpc.syntax_id, &pipe_hnd); if (!NT_STATUS_IS_OK(nt_status)) { DEBUG(1, ("cli_nt_session_open fail!\n")); errno = ENOTSUP; cli_shutdown(ipc_srv->cli); free(ipc_srv); return NULL; } nt_status = rpccli_lsa_open_policy( pipe_hnd, talloc_tos(), True, GENERIC_EXECUTE_ACCESS, &ipc_srv->pol); if (!NT_STATUS_IS_OK(nt_status)) { errno = SMBC_errno(context, ipc_srv->cli); cli_shutdown(ipc_srv->cli); return NULL; } errno = 0; if (smbc_getFunctionAddCachedServer(context)(context, ipc_srv, server, "*IPC$", *pp_workgroup, *pp_username)) { DEBUG(3, (" Failed to add server to cache\n")); if (errno == 0) { errno = ENOMEM; } cli_shutdown(ipc_srv->cli); free(ipc_srv); return NULL; } DLIST_ADD(context->internal->servers, ipc_srv); } return ipc_srv; }
<filename>src/main/java/de/vandermeer/skb/mvn/pm/model/PM_Context.java<gh_stars>1-10 /* Copyright 2016 <NAME> <<EMAIL>> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package de.vandermeer.skb.mvn.pm.model; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Properties; import java.util.TreeMap; import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.text.StrBuilder; /** * Context for the project model, as in everything it needs to generate and process a model. * * @author <NAME> &lt;<EMAIL>&gt; * @version v0.0.3 build 170404 (04-Apr-17) for Java 1.8 * @since v0.0.1 */ public class PM_Context { /** The directory where the projects store their properties and configurations. */ protected final String projectPmDir; /** Mapping of identifiers to dependency versions. */ protected final Map<String, Ctxt_DependencyVersion> dependencyVersions; /** Mapping of property key to version for plugin versions. */ protected final List<Map<String, String>> pluginVersions; /** * Creates a new project model context. * @param projectPmDir the standard project configuration directory * @throws NullPointerException if argument was null * @throws IllegalArgumentException if argument was blank */ public PM_Context(String projectPmDir){ Validate.notBlank(projectPmDir, "mc: standard project PM directory names as null"); this.projectPmDir = projectPmDir; this.dependencyVersions = new TreeMap<>(); this.pluginVersions = new ArrayList<>(); } /** * Returns the standard project PM directory. * @return standard project PM directory */ public String getProjectPmDir(){ return this.projectPmDir; } /** * Sets the dependency version information on the context (creates {@link Ctxt_DependencyVersion} objects). * @param dependencyVersions the dependency version properties * @throws IllegalArgumentException if any argument was problematic */ public void setDependencyVersions(Properties dependencyVersions){ StrBuilder errors = new StrBuilder(); for(Entry<Object, Object> p : dependencyVersions.entrySet()){ try{ Ctxt_DependencyVersion bv = new Ctxt_DependencyVersion(p.getKey().toString(), p.getValue().toString()); this.dependencyVersions.put(bv.getId(), bv); } catch(Exception ex){ errors.append(ex.getMessage()).appendNewLine(); } } if(errors.size()>0){ throw new IllegalArgumentException("PM Context, problems loading dependency versions, see below\n" + errors.toString()); } } /** * Returns the dependency version map of the context. * @return dependency version map, empty if none added successfully */ public Map<String, Ctxt_DependencyVersion> getDependencyVersions(){ return this.dependencyVersions; } /** * Sets the plugin version information on the context. * @param pluginVersions the plugin version properties * @throws IllegalArgumentException if any argument was problematic */ public void setPluginVersions(Properties pluginVersions){ StrBuilder errors = new StrBuilder(); for(Entry<Object, Object> p : pluginVersions.entrySet()){ try{ Map<String, String> version = new HashMap<>(); version.put("key", p.getKey().toString()); version.put("value", p.getValue().toString()); this.pluginVersions.add(version); } catch(Exception ex){ errors.append(ex.getMessage()).appendNewLine(); } } if(errors.size()>0){ throw new IllegalArgumentException("PM Context, problems loading plugin versions, see below\n" + errors.toString()); } } /** * Returns the plugin version map of the context. * @return plugin version map, empty if none added successfully */ public List<Map<String, String>> getPluginVersions(){ return this.pluginVersions; } }
def testGetFilteredByUnknownObjectIDs(self): tag = createTag(self.user, self.user.namespace, u'tag') createTagPermission(tag) createTagValue(self.user.id, tag.id, uuid4(), 42) self.assertEqual({}, self.tagValues.get(objectIDs=[uuid4()], paths=[u'username/tag']))
/** * Bean definition for the Person Information */ public class PersonBean implements Serializable { /** * Default Serial ID */ private static final long serialVersionUID = 1L; /** * Person Information */ private List<PersonInfoBean> person; /** * Method for getting Person Information * @return */ public List<PersonInfoBean> getPerson() { return person; } /** * Method for setting the Person Information * @param person */ public void setPerson(List<PersonInfoBean> person) { this.person = person; } }
export * from "./mahal_doc";
// UnmarshalText implements the encoding.TextUnmarshaler interface. // The formats it supports are "2006-01-02", "2006/01/02" and "02 Jan 2006". func (d *Date) UnmarshalText(b []byte) error { var err error for _, layout := range []string{"2006-01-02", "2006/01/02", "02 Jan 2006"} { if *d, err = Parse(layout, string(b)); err == nil { return nil } } return fmt.Errorf(`date: Unsupported format %s. Only "2006-01-02", "2006/01/02" and "02 Jan 2006" are supported`, b) }
test_cases=int(input()) for case in range(test_cases) : n,k=map(int,input().split(" ")) indices=list() s = input() s_list=list() for char in s: s_list.append(char) for char in range(len(s_list)): if s[char]=="*" : indices.append(char) count =0 min_num=0 last_star=0 for char in range(len(s_list)): if char==indices[0] or char==indices[len(indices)-1]: s_list[char]="x" min_num+=1 count=1 else: if s_list[char]=="x" :count=1 elif s_list[char]=="*": last_star=char count += 1 if count>k : s_list[char]="x" min_num+=1 count=1 else: if char>indices[0] and char<indices[len(indices)-1] : count += 1 if count>k : s_list[last_star] = "x" min_num+=1 count=char-last_star+1 print(min_num)
/** * Updates user, on success goes to the Previous Activity * @param {@code User} user * @param {@code FirebaseUser} authUser */ private void updateUser(final User user, final FirebaseUser authUser) { final String username = user.getUsername(); if (!TextUtils.isEmpty(newEmail.getText())) { authUser.updateEmail(newEmail.getText().toString()) .addOnCompleteListener(new OnCompleteListener<Void>() { @Override public void onComplete(@NonNull Task<Void> task) { if (task.isSuccessful()) { Log.d(TAG, "User email address updated."); user.setEmail(newEmail.getText().toString()); } else { Log.d(TAG, "Email address update failed"); } } }); } if (!TextUtils.isEmpty(newPhone.getText())) { user.setPhone(newPhone.getText().toString()); } db.collection("users") .document(username) .set(user) .addOnSuccessListener(new OnSuccessListener<Void>() { @Override public void onSuccess(Void aVoid) { Log.d(TAG, "DocumentSnapshot successfully written!"); finish(); /*Intent intent = new Intent(getBaseContext(),called.getClass()); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent);*/ } }) .addOnFailureListener(new OnFailureListener() { @Override public void onFailure(@NonNull Exception e) { Log.w(TAG, "Error writing document", e); } }); }
<gh_stars>10-100 /* Guarding still doesn't work right need to wort out weapontypeclass::compute_crc Crashes at Eip:00460200 */ #include "macros/patch.h" #include "TiberianSun.h" #include "patch.h" #define ArmorNameMAX 10 char *ArmorTypes[64]; char ArmorNames[64 * ArmorNameMAX] = {0}; SETDWORD(0x0044AF67, _ArmorTypes); SETDWORD(0x0044AFA7, _ArmorTypes); SETDWORD(0x00487071, _ArmorTypes); SETDWORD(0x0068132C, _ArmorTypes); SETDWORD(0x00681346, _ArmorTypes + 64 * 4); CALL(0x005C6A19, _RulesClass__ArmorTypes); void __thiscall RulesClass__ArmorTypes(void *this, INIClass ini) { int count = INIClass__EntryCount(ini, "ArmorTypes"); if (count == 0) { ArmorTypes[0] = "none"; ArmorTypes[1] = "wood"; ArmorTypes[2] = "light"; ArmorTypes[3] = "heavy"; ArmorTypes[4] = "concrete"; } char number[4] = "1"; char *dest; for (int i = 0; i < 64; i++) { if (ArmorTypes[i]) continue; _sprintf(number, "%d", i); dest = &ArmorNames[i*ArmorNameMAX]; INIClass__GetString(ini, "ArmorTypes", number, number, dest, ArmorNameMAX); WWDebug_Printf("armor[%d] = %s\n",i,dest); dest[ArmorNameMAX] = '\0'; ArmorTypes[i] = dest; } return RulesClass__Objects(this, ini); } //CLEAR(0x0066EEE1, 0x4D, 0x0066EEE2);//lea ecx, [ebp+0x68] //CLEAR(0x0066EEE8, 0x90, 0x0066EEF4); //CALL(0x0066EEE3, _WarheadTypeClass__init_versus); void __thiscall WarheadTypeClass__init_versus(double **versus) { WWDebug_Printf("Warhead versus @ %00000000x\n", versus); double *versus_buf = operator_new(64*sizeof(double)); for (int i = 0; i < 64; i++) versus_buf[i] = 1.0; *versus = versus_buf; } void WTF(char *warhead) { WWDebug_Printf("Basename = %s, UIName = %s\n", warhead[0x14], warhead[0x2D]); }
// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto /* Package v1beta1 is a generated protocol buffer package. It is generated from these files: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto It has these top-level messages: CustomResourceDefinition CustomResourceDefinitionCondition CustomResourceDefinitionList CustomResourceDefinitionNames CustomResourceDefinitionSpec CustomResourceDefinitionStatus CustomResourceSubresourceScale CustomResourceSubresourceStatus CustomResourceSubresources CustomResourceValidation ExternalDocumentation JSON JSONSchemaProps JSONSchemaPropsOrArray JSONSchemaPropsOrBool JSONSchemaPropsOrStringArray */ package v1beta1 import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import k8s_io_apimachinery_pkg_apis_meta_v1 "github.com/ericchiang/k8s/apis/meta/v1" import _ "github.com/ericchiang/k8s/runtime" import _ "github.com/ericchiang/k8s/runtime/schema" import _ "github.com/ericchiang/k8s/util/intstr" import encoding_binary "encoding/binary" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package // CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format // <.spec.name>.<.spec.group>. type CustomResourceDefinition struct { Metadata *k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta `protobuf:"bytes,1,opt,name=metadata" json:"metadata,omitempty"` // Spec describes how the user wants the resources to appear Spec *CustomResourceDefinitionSpec `protobuf:"bytes,2,opt,name=spec" json:"spec,omitempty"` // Status indicates the actual state of the CustomResourceDefinition Status *CustomResourceDefinitionStatus `protobuf:"bytes,3,opt,name=status" json:"status,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *CustomResourceDefinition) Reset() { *m = CustomResourceDefinition{} } func (m *CustomResourceDefinition) String() string { return proto.CompactTextString(m) } func (*CustomResourceDefinition) ProtoMessage() {} func (*CustomResourceDefinition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } func (m *CustomResourceDefinition) GetMetadata() *k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta { if m != nil { return m.Metadata } return nil } func (m *CustomResourceDefinition) GetSpec() *CustomResourceDefinitionSpec { if m != nil { return m.Spec } return nil } func (m *CustomResourceDefinition) GetStatus() *CustomResourceDefinitionStatus { if m != nil { return m.Status } return nil } // CustomResourceDefinitionCondition contains details for the current condition of this pod. type CustomResourceDefinitionCondition struct { // Type is the type of the condition. Type *string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"` // Status is the status of the condition. // Can be True, False, Unknown. Status *string `protobuf:"bytes,2,opt,name=status" json:"status,omitempty"` // Last time the condition transitioned from one status to another. // +optional LastTransitionTime *k8s_io_apimachinery_pkg_apis_meta_v1.Time `protobuf:"bytes,3,opt,name=lastTransitionTime" json:"lastTransitionTime,omitempty"` // Unique, one-word, CamelCase reason for the condition's last transition. // +optional Reason *string `protobuf:"bytes,4,opt,name=reason" json:"reason,omitempty"` // Human-readable message indicating details about last transition. // +optional Message *string `protobuf:"bytes,5,opt,name=message" json:"message,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *CustomResourceDefinitionCondition) Reset() { *m = CustomResourceDefinitionCondition{} } func (m *CustomResourceDefinitionCondition) String() string { return proto.CompactTextString(m) } func (*CustomResourceDefinitionCondition) ProtoMessage() {} func (*CustomResourceDefinitionCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } func (m *CustomResourceDefinitionCondition) GetType() string { if m != nil && m.Type != nil { return *m.Type } return "" } func (m *CustomResourceDefinitionCondition) GetStatus() string { if m != nil && m.Status != nil { return *m.Status } return "" } func (m *CustomResourceDefinitionCondition) GetLastTransitionTime() *k8s_io_apimachinery_pkg_apis_meta_v1.Time { if m != nil { return m.LastTransitionTime } return nil } func (m *CustomResourceDefinitionCondition) GetReason() string { if m != nil && m.Reason != nil { return *m.Reason } return "" } func (m *CustomResourceDefinitionCondition) GetMessage() string { if m != nil && m.Message != nil { return *m.Message } return "" } // CustomResourceDefinitionList is a list of CustomResourceDefinition objects. type CustomResourceDefinitionList struct { Metadata *k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta `protobuf:"bytes,1,opt,name=metadata" json:"metadata,omitempty"` // Items individual CustomResourceDefinitions Items []*CustomResourceDefinition `protobuf:"bytes,2,rep,name=items" json:"items,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *CustomResourceDefinitionList) Reset() { *m = CustomResourceDefinitionList{} } func (m *CustomResourceDefinitionList) String() string { return proto.CompactTextString(m) } func (*CustomResourceDefinitionList) ProtoMessage() {} func (*CustomResourceDefinitionList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } func (m *CustomResourceDefinitionList) GetMetadata() *k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta { if m != nil { return m.Metadata } return nil } func (m *CustomResourceDefinitionList) GetItems() []*CustomResourceDefinition { if m != nil { return m.Items } return nil } // CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition type CustomResourceDefinitionNames struct { // Plural is the plural name of the resource to serve. It must match the name of the CustomResourceDefinition-registration // too: plural.group and it must be all lowercase. Plural *string `protobuf:"bytes,1,opt,name=plural" json:"plural,omitempty"` // Singular is the singular name of the resource. It must be all lowercase Defaults to lowercased <kind> Singular *string `protobuf:"bytes,2,opt,name=singular" json:"singular,omitempty"` // ShortNames are short names for the resource. It must be all lowercase. ShortNames []string `protobuf:"bytes,3,rep,name=shortNames" json:"shortNames,omitempty"` // Kind is the serialized kind of the resource. It is normally CamelCase and singular. Kind *string `protobuf:"bytes,4,opt,name=kind" json:"kind,omitempty"` // ListKind is the serialized kind of the list for this resource. Defaults to <kind>List. ListKind *string `protobuf:"bytes,5,opt,name=listKind" json:"listKind,omitempty"` // Categories is a list of grouped resources custom resources belong to (e.g. 'all') // +optional Categories []string `protobuf:"bytes,6,rep,name=categories" json:"categories,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *CustomResourceDefinitionNames) Reset() { *m = CustomResourceDefinitionNames{} } func (m *CustomResourceDefinitionNames) String() string { return proto.CompactTextString(m) } func (*CustomResourceDefinitionNames) ProtoMessage() {} func (*CustomResourceDefinitionNames) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } func (m *CustomResourceDefinitionNames) GetPlural() string { if m != nil && m.Plural != nil { return *m.Plural } return "" } func (m *CustomResourceDefinitionNames) GetSingular() string { if m != nil && m.Singular != nil { return *m.Singular } return "" } func (m *CustomResourceDefinitionNames) GetShortNames() []string { if m != nil { return m.ShortNames } return nil } func (m *CustomResourceDefinitionNames) GetKind() string { if m != nil && m.Kind != nil { return *m.Kind } return "" } func (m *CustomResourceDefinitionNames) GetListKind() string { if m != nil && m.ListKind != nil { return *m.ListKind } return "" } func (m *CustomResourceDefinitionNames) GetCategories() []string { if m != nil { return m.Categories } return nil } // CustomResourceDefinitionSpec describes how a user wants their resource to appear type CustomResourceDefinitionSpec struct { // Group is the group this resource belongs in Group *string `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` // Version is the version this resource belongs in Version *string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` // Names are the names used to describe this custom resource Names *CustomResourceDefinitionNames `protobuf:"bytes,3,opt,name=names" json:"names,omitempty"` // Scope indicates whether this resource is cluster or namespace scoped. Default is namespaced Scope *string `protobuf:"bytes,4,opt,name=scope" json:"scope,omitempty"` // Validation describes the validation methods for CustomResources // +optional Validation *CustomResourceValidation `protobuf:"bytes,5,opt,name=validation" json:"validation,omitempty"` // Subresources describes the subresources for CustomResources // This field is alpha-level and should only be sent to servers that enable // subresources via the CustomResourceSubresources feature gate. // +optional Subresources *CustomResourceSubresources `protobuf:"bytes,6,opt,name=subresources" json:"subresources,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *CustomResourceDefinitionSpec) Reset() { *m = CustomResourceDefinitionSpec{} } func (m *CustomResourceDefinitionSpec) String() string { return proto.CompactTextString(m) } func (*CustomResourceDefinitionSpec) ProtoMessage() {} func (*CustomResourceDefinitionSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } func (m *CustomResourceDefinitionSpec) GetGroup() string { if m != nil && m.Group != nil { return *m.Group } return "" } func (m *CustomResourceDefinitionSpec) GetVersion() string { if m != nil && m.Version != nil { return *m.Version } return "" } func (m *CustomResourceDefinitionSpec) GetNames() *CustomResourceDefinitionNames { if m != nil { return m.Names } return nil } func (m *CustomResourceDefinitionSpec) GetScope() string { if m != nil && m.Scope != nil { return *m.Scope } return "" } func (m *CustomResourceDefinitionSpec) GetValidation() *CustomResourceValidation { if m != nil { return m.Validation } return nil } func (m *CustomResourceDefinitionSpec) GetSubresources() *CustomResourceSubresources { if m != nil { return m.Subresources } return nil } // CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition type CustomResourceDefinitionStatus struct { // Conditions indicate state for particular aspects of a CustomResourceDefinition Conditions []*CustomResourceDefinitionCondition `protobuf:"bytes,1,rep,name=conditions" json:"conditions,omitempty"` // AcceptedNames are the names that are actually being used to serve discovery // They may be different than the names in spec. AcceptedNames *CustomResourceDefinitionNames `protobuf:"bytes,2,opt,name=acceptedNames" json:"acceptedNames,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *CustomResourceDefinitionStatus) Reset() { *m = CustomResourceDefinitionStatus{} } func (m *CustomResourceDefinitionStatus) String() string { return proto.CompactTextString(m) } func (*CustomResourceDefinitionStatus) ProtoMessage() {} func (*CustomResourceDefinitionStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } func (m *CustomResourceDefinitionStatus) GetConditions() []*CustomResourceDefinitionCondition { if m != nil { return m.Conditions } return nil } func (m *CustomResourceDefinitionStatus) GetAcceptedNames() *CustomResourceDefinitionNames { if m != nil { return m.AcceptedNames } return nil } // CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. type CustomResourceSubresourceScale struct { // SpecReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Spec.Replicas. // Only JSON paths without the array notation are allowed. // Must be a JSON Path under .spec. // If there is no value under the given path in the CustomResource, the /scale subresource will return an error on GET. SpecReplicasPath *string `protobuf:"bytes,1,opt,name=specReplicasPath" json:"specReplicasPath,omitempty"` // StatusReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Replicas. // Only JSON paths without the array notation are allowed. // Must be a JSON Path under .status. // If there is no value under the given path in the CustomResource, the status replica value in the /scale subresource // will default to 0. StatusReplicasPath *string `protobuf:"bytes,2,opt,name=statusReplicasPath" json:"statusReplicasPath,omitempty"` // LabelSelectorPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Selector. // Only JSON paths without the array notation are allowed. // Must be a JSON Path under .status. // Must be set to work with HPA. // If there is no value under the given path in the CustomResource, the status label selector value in the /scale // subresource will default to the empty string. // +optional LabelSelectorPath *string `protobuf:"bytes,3,opt,name=labelSelectorPath" json:"labelSelectorPath,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *CustomResourceSubresourceScale) Reset() { *m = CustomResourceSubresourceScale{} } func (m *CustomResourceSubresourceScale) String() string { return proto.CompactTextString(m) } func (*CustomResourceSubresourceScale) ProtoMessage() {} func (*CustomResourceSubresourceScale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } func (m *CustomResourceSubresourceScale) GetSpecReplicasPath() string { if m != nil && m.SpecReplicasPath != nil { return *m.SpecReplicasPath } return "" } func (m *CustomResourceSubresourceScale) GetStatusReplicasPath() string { if m != nil && m.StatusReplicasPath != nil { return *m.StatusReplicasPath } return "" } func (m *CustomResourceSubresourceScale) GetLabelSelectorPath() string { if m != nil && m.LabelSelectorPath != nil { return *m.LabelSelectorPath } return "" } // CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. // Status is represented by the `.status` JSON path inside of a CustomResource. When set, // * exposes a /status subresource for the custom resource // * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza // * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza type CustomResourceSubresourceStatus struct { XXX_unrecognized []byte `json:"-"` } func (m *CustomResourceSubresourceStatus) Reset() { *m = CustomResourceSubresourceStatus{} } func (m *CustomResourceSubresourceStatus) String() string { return proto.CompactTextString(m) } func (*CustomResourceSubresourceStatus) ProtoMessage() {} func (*CustomResourceSubresourceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } // CustomResourceSubresources defines the status and scale subresources for CustomResources. type CustomResourceSubresources struct { // Status denotes the status subresource for CustomResources Status *CustomResourceSubresourceStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` // Scale denotes the scale subresource for CustomResources Scale *CustomResourceSubresourceScale `protobuf:"bytes,2,opt,name=scale" json:"scale,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *CustomResourceSubresources) Reset() { *m = CustomResourceSubresources{} } func (m *CustomResourceSubresources) String() string { return proto.CompactTextString(m) } func (*CustomResourceSubresources) ProtoMessage() {} func (*CustomResourceSubresources) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } func (m *CustomResourceSubresources) GetStatus() *CustomResourceSubresourceStatus { if m != nil { return m.Status } return nil } func (m *CustomResourceSubresources) GetScale() *CustomResourceSubresourceScale { if m != nil { return m.Scale } return nil } // CustomResourceValidation is a list of validation methods for CustomResources. type CustomResourceValidation struct { // OpenAPIV3Schema is the OpenAPI v3 schema to be validated against. OpenAPIV3Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=openAPIV3Schema" json:"openAPIV3Schema,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *CustomResourceValidation) Reset() { *m = CustomResourceValidation{} } func (m *CustomResourceValidation) String() string { return proto.CompactTextString(m) } func (*CustomResourceValidation) ProtoMessage() {} func (*CustomResourceValidation) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } func (m *CustomResourceValidation) GetOpenAPIV3Schema() *JSONSchemaProps { if m != nil { return m.OpenAPIV3Schema } return nil } // ExternalDocumentation allows referencing an external resource for extended documentation. type ExternalDocumentation struct { Description *string `protobuf:"bytes,1,opt,name=description" json:"description,omitempty"` Url *string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *ExternalDocumentation) Reset() { *m = ExternalDocumentation{} } func (m *ExternalDocumentation) String() string { return proto.CompactTextString(m) } func (*ExternalDocumentation) ProtoMessage() {} func (*ExternalDocumentation) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } func (m *ExternalDocumentation) GetDescription() string { if m != nil && m.Description != nil { return *m.Description } return "" } func (m *ExternalDocumentation) GetUrl() string { if m != nil && m.Url != nil { return *m.Url } return "" } // JSON represents any valid JSON value. // These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil. type JSON struct { Raw []byte `protobuf:"bytes,1,opt,name=raw" json:"raw,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *JSON) Reset() { *m = JSON{} } func (m *JSON) String() string { return proto.CompactTextString(m) } func (*JSON) ProtoMessage() {} func (*JSON) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } func (m *JSON) GetRaw() []byte { if m != nil { return m.Raw } return nil } // JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). type JSONSchemaProps struct { Id *string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Schema *string `protobuf:"bytes,2,opt,name=schema" json:"schema,omitempty"` Ref *string `protobuf:"bytes,3,opt,name=ref" json:"ref,omitempty"` Description *string `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"` Type *string `protobuf:"bytes,5,opt,name=type" json:"type,omitempty"` Format *string `protobuf:"bytes,6,opt,name=format" json:"format,omitempty"` Title *string `protobuf:"bytes,7,opt,name=title" json:"title,omitempty"` Default *JSON `protobuf:"bytes,8,opt,name=default" json:"default,omitempty"` Maximum *float64 `protobuf:"fixed64,9,opt,name=maximum" json:"maximum,omitempty"` ExclusiveMaximum *bool `protobuf:"varint,10,opt,name=exclusiveMaximum" json:"exclusiveMaximum,omitempty"` Minimum *float64 `protobuf:"fixed64,11,opt,name=minimum" json:"minimum,omitempty"` ExclusiveMinimum *bool `protobuf:"varint,12,opt,name=exclusiveMinimum" json:"exclusiveMinimum,omitempty"` MaxLength *int64 `protobuf:"varint,13,opt,name=maxLength" json:"maxLength,omitempty"` MinLength *int64 `protobuf:"varint,14,opt,name=minLength" json:"minLength,omitempty"` Pattern *string `protobuf:"bytes,15,opt,name=pattern" json:"pattern,omitempty"` MaxItems *int64 `protobuf:"varint,16,opt,name=maxItems" json:"maxItems,omitempty"` MinItems *int64 `protobuf:"varint,17,opt,name=minItems" json:"minItems,omitempty"` UniqueItems *bool `protobuf:"varint,18,opt,name=uniqueItems" json:"uniqueItems,omitempty"` MultipleOf *float64 `protobuf:"fixed64,19,opt,name=multipleOf" json:"multipleOf,omitempty"` Enum []*JSON `protobuf:"bytes,20,rep,name=enum" json:"enum,omitempty"` MaxProperties *int64 `protobuf:"varint,21,opt,name=maxProperties" json:"maxProperties,omitempty"` MinProperties *int64 `protobuf:"varint,22,opt,name=minProperties" json:"minProperties,omitempty"` Required []string `protobuf:"bytes,23,rep,name=required" json:"required,omitempty"` Items *JSONSchemaPropsOrArray `protobuf:"bytes,24,opt,name=items" json:"items,omitempty"` AllOf []*JSONSchemaProps `protobuf:"bytes,25,rep,name=allOf" json:"allOf,omitempty"` OneOf []*JSONSchemaProps `protobuf:"bytes,26,rep,name=oneOf" json:"oneOf,omitempty"` AnyOf []*JSONSchemaProps `protobuf:"bytes,27,rep,name=anyOf" json:"anyOf,omitempty"` Not *JSONSchemaProps `protobuf:"bytes,28,opt,name=not" json:"not,omitempty"` Properties map[string]*JSONSchemaProps `protobuf:"bytes,29,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` AdditionalProperties *JSONSchemaPropsOrBool `protobuf:"bytes,30,opt,name=additionalProperties" json:"additionalProperties,omitempty"` PatternProperties map[string]*JSONSchemaProps `protobuf:"bytes,31,rep,name=patternProperties" json:"patternProperties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` Dependencies map[string]*JSONSchemaPropsOrStringArray `protobuf:"bytes,32,rep,name=dependencies" json:"dependencies,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` AdditionalItems *JSONSchemaPropsOrBool `protobuf:"bytes,33,opt,name=additionalItems" json:"additionalItems,omitempty"` Definitions map[string]*JSONSchemaProps `protobuf:"bytes,34,rep,name=definitions" json:"definitions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` ExternalDocs *ExternalDocumentation `protobuf:"bytes,35,opt,name=externalDocs" json:"externalDocs,omitempty"` Example *JSON `protobuf:"bytes,36,opt,name=example" json:"example,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *JSONSchemaProps) Reset() { *m = JSONSchemaProps{} } func (m *JSONSchemaProps) String() string { return proto.CompactTextString(m) } func (*JSONSchemaProps) ProtoMessage() {} func (*JSONSchemaProps) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } func (m *JSONSchemaProps) GetId() string { if m != nil && m.Id != nil { return *m.Id } return "" } func (m *JSONSchemaProps) GetSchema() string { if m != nil && m.Schema != nil { return *m.Schema } return "" } func (m *JSONSchemaProps) GetRef() string { if m != nil && m.Ref != nil { return *m.Ref } return "" } func (m *JSONSchemaProps) GetDescription() string { if m != nil && m.Description != nil { return *m.Description } return "" } func (m *JSONSchemaProps) GetType() string { if m != nil && m.Type != nil { return *m.Type } return "" } func (m *JSONSchemaProps) GetFormat() string { if m != nil && m.Format != nil { return *m.Format } return "" } func (m *JSONSchemaProps) GetTitle() string { if m != nil && m.Title != nil { return *m.Title } return "" } func (m *JSONSchemaProps) GetDefault() *JSON { if m != nil { return m.Default } return nil } func (m *JSONSchemaProps) GetMaximum() float64 { if m != nil && m.Maximum != nil { return *m.Maximum } return 0 } func (m *JSONSchemaProps) GetExclusiveMaximum() bool { if m != nil && m.ExclusiveMaximum != nil { return *m.ExclusiveMaximum } return false } func (m *JSONSchemaProps) GetMinimum() float64 { if m != nil && m.Minimum != nil { return *m.Minimum } return 0 } func (m *JSONSchemaProps) GetExclusiveMinimum() bool { if m != nil && m.ExclusiveMinimum != nil { return *m.ExclusiveMinimum } return false } func (m *JSONSchemaProps) GetMaxLength() int64 { if m != nil && m.MaxLength != nil { return *m.MaxLength } return 0 } func (m *JSONSchemaProps) GetMinLength() int64 { if m != nil && m.MinLength != nil { return *m.MinLength } return 0 } func (m *JSONSchemaProps) GetPattern() string { if m != nil && m.Pattern != nil { return *m.Pattern } return "" } func (m *JSONSchemaProps) GetMaxItems() int64 { if m != nil && m.MaxItems != nil { return *m.MaxItems } return 0 } func (m *JSONSchemaProps) GetMinItems() int64 { if m != nil && m.MinItems != nil { return *m.MinItems } return 0 } func (m *JSONSchemaProps) GetUniqueItems() bool { if m != nil && m.UniqueItems != nil { return *m.UniqueItems } return false } func (m *JSONSchemaProps) GetMultipleOf() float64 { if m != nil && m.MultipleOf != nil { return *m.MultipleOf } return 0 } func (m *JSONSchemaProps) GetEnum() []*JSON { if m != nil { return m.Enum } return nil } func (m *JSONSchemaProps) GetMaxProperties() int64 { if m != nil && m.MaxProperties != nil { return *m.MaxProperties } return 0 } func (m *JSONSchemaProps) GetMinProperties() int64 { if m != nil && m.MinProperties != nil { return *m.MinProperties } return 0 } func (m *JSONSchemaProps) GetRequired() []string { if m != nil { return m.Required } return nil } func (m *JSONSchemaProps) GetItems() *JSONSchemaPropsOrArray { if m != nil { return m.Items } return nil } func (m *JSONSchemaProps) GetAllOf() []*JSONSchemaProps { if m != nil { return m.AllOf } return nil } func (m *JSONSchemaProps) GetOneOf() []*JSONSchemaProps { if m != nil { return m.OneOf } return nil } func (m *JSONSchemaProps) GetAnyOf() []*JSONSchemaProps { if m != nil { return m.AnyOf } return nil } func (m *JSONSchemaProps) GetNot() *JSONSchemaProps { if m != nil { return m.Not } return nil } func (m *JSONSchemaProps) GetProperties() map[string]*JSONSchemaProps { if m != nil { return m.Properties } return nil } func (m *JSONSchemaProps) GetAdditionalProperties() *JSONSchemaPropsOrBool { if m != nil { return m.AdditionalProperties } return nil } func (m *JSONSchemaProps) GetPatternProperties() map[string]*JSONSchemaProps { if m != nil { return m.PatternProperties } return nil } func (m *JSONSchemaProps) GetDependencies() map[string]*JSONSchemaPropsOrStringArray { if m != nil { return m.Dependencies } return nil } func (m *JSONSchemaProps) GetAdditionalItems() *JSONSchemaPropsOrBool { if m != nil { return m.AdditionalItems } return nil } func (m *JSONSchemaProps) GetDefinitions() map[string]*JSONSchemaProps { if m != nil { return m.Definitions } return nil } func (m *JSONSchemaProps) GetExternalDocs() *ExternalDocumentation { if m != nil { return m.ExternalDocs } return nil } func (m *JSONSchemaProps) GetExample() *JSON { if m != nil { return m.Example } return nil } // JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps // or an array of JSONSchemaProps. Mainly here for serialization purposes. type JSONSchemaPropsOrArray struct { Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema" json:"schema,omitempty"` JSONSchemas []*JSONSchemaProps `protobuf:"bytes,2,rep,name=jSONSchemas" json:"jSONSchemas,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *JSONSchemaPropsOrArray) Reset() { *m = JSONSchemaPropsOrArray{} } func (m *JSONSchemaPropsOrArray) String() string { return proto.CompactTextString(m) } func (*JSONSchemaPropsOrArray) ProtoMessage() {} func (*JSONSchemaPropsOrArray) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } func (m *JSONSchemaPropsOrArray) GetSchema() *JSONSchemaProps { if m != nil { return m.Schema } return nil } func (m *JSONSchemaPropsOrArray) GetJSONSchemas() []*JSONSchemaProps { if m != nil { return m.JSONSchemas } return nil } // JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. // Defaults to true for the boolean property. type JSONSchemaPropsOrBool struct { Allows *bool `protobuf:"varint,1,opt,name=allows" json:"allows,omitempty"` Schema *JSONSchemaProps `protobuf:"bytes,2,opt,name=schema" json:"schema,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *JSONSchemaPropsOrBool) Reset() { *m = JSONSchemaPropsOrBool{} } func (m *JSONSchemaPropsOrBool) String() string { return proto.CompactTextString(m) } func (*JSONSchemaPropsOrBool) ProtoMessage() {} func (*JSONSchemaPropsOrBool) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } func (m *JSONSchemaPropsOrBool) GetAllows() bool { if m != nil && m.Allows != nil { return *m.Allows } return false } func (m *JSONSchemaPropsOrBool) GetSchema() *JSONSchemaProps { if m != nil { return m.Schema } return nil } // JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array. type JSONSchemaPropsOrStringArray struct { Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema" json:"schema,omitempty"` Property []string `protobuf:"bytes,2,rep,name=property" json:"property,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *JSONSchemaPropsOrStringArray) Reset() { *m = JSONSchemaPropsOrStringArray{} } func (m *JSONSchemaPropsOrStringArray) String() string { return proto.CompactTextString(m) } func (*JSONSchemaPropsOrStringArray) ProtoMessage() {} func (*JSONSchemaPropsOrStringArray) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } func (m *JSONSchemaPropsOrStringArray) GetSchema() *JSONSchemaProps { if m != nil { return m.Schema } return nil } func (m *JSONSchemaPropsOrStringArray) GetProperty() []string { if m != nil { return m.Property } return nil } func init() { proto.RegisterType((*CustomResourceDefinition)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition") proto.RegisterType((*CustomResourceDefinitionCondition)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionCondition") proto.RegisterType((*CustomResourceDefinitionList)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionList") proto.RegisterType((*CustomResourceDefinitionNames)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionNames") proto.RegisterType((*CustomResourceDefinitionSpec)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionSpec") proto.RegisterType((*CustomResourceDefinitionStatus)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionStatus") proto.RegisterType((*CustomResourceSubresourceScale)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresourceScale") proto.RegisterType((*CustomResourceSubresourceStatus)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresourceStatus") proto.RegisterType((*CustomResourceSubresources)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresources") proto.RegisterType((*CustomResourceValidation)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceValidation") proto.RegisterType((*ExternalDocumentation)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.ExternalDocumentation") proto.RegisterType((*JSON)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSON") proto.RegisterType((*JSONSchemaProps)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps") proto.RegisterType((*JSONSchemaPropsOrArray)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrArray") proto.RegisterType((*JSONSchemaPropsOrBool)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrBool") proto.RegisterType((*JSONSchemaPropsOrStringArray)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrStringArray") } func (m *CustomResourceDefinition) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CustomResourceDefinition) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Metadata != nil { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Metadata.Size())) n1, err := m.Metadata.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n1 } if m.Spec != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) n2, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n2 } if m.Status != nil { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) n3, err := m.Status.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n3 } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } func (m *CustomResourceDefinitionCondition) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CustomResourceDefinitionCondition) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Type != nil { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Type))) i += copy(dAtA[i:], *m.Type) } if m.Status != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Status))) i += copy(dAtA[i:], *m.Status) } if m.LastTransitionTime != nil { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size())) n4, err := m.LastTransitionTime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n4 } if m.Reason != nil { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Reason))) i += copy(dAtA[i:], *m.Reason) } if m.Message != nil { dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Message))) i += copy(dAtA[i:], *m.Message) } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } func (m *CustomResourceDefinitionList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CustomResourceDefinitionList) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Metadata != nil { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Metadata.Size())) n5, err := m.Metadata.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n5 } if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } func (m *CustomResourceDefinitionNames) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CustomResourceDefinitionNames) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Plural != nil { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Plural))) i += copy(dAtA[i:], *m.Plural) } if m.Singular != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Singular))) i += copy(dAtA[i:], *m.Singular) } if len(m.ShortNames) > 0 { for _, s := range m.ShortNames { dAtA[i] = 0x1a i++ l = len(s) for l >= 1<<7 { dAtA[i] = uint8(uint64(l)&0x7f | 0x80) l >>= 7 i++ } dAtA[i] = uint8(l) i++ i += copy(dAtA[i:], s) } } if m.Kind != nil { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Kind))) i += copy(dAtA[i:], *m.Kind) } if m.ListKind != nil { dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ListKind))) i += copy(dAtA[i:], *m.ListKind) } if len(m.Categories) > 0 { for _, s := range m.Categories { dAtA[i] = 0x32 i++ l = len(s) for l >= 1<<7 { dAtA[i] = uint8(uint64(l)&0x7f | 0x80) l >>= 7 i++ } dAtA[i] = uint8(l) i++ i += copy(dAtA[i:], s) } } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } func (m *CustomResourceDefinitionSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CustomResourceDefinitionSpec) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Group != nil { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Group))) i += copy(dAtA[i:], *m.Group) } if m.Version != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Version))) i += copy(dAtA[i:], *m.Version) } if m.Names != nil { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Names.Size())) n6, err := m.Names.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n6 } if m.Scope != nil { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Scope))) i += copy(dAtA[i:], *m.Scope) } if m.Validation != nil { dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Validation.Size())) n7, err := m.Validation.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n7 } if m.Subresources != nil { dAtA[i] = 0x32 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Subresources.Size())) n8, err := m.Subresources.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n8 } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } func (m *CustomResourceDefinitionStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CustomResourceDefinitionStatus) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Conditions) > 0 { for _, msg := range m.Conditions { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } if m.AcceptedNames != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.AcceptedNames.Size())) n9, err := m.AcceptedNames.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n9 } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } func (m *CustomResourceSubresourceScale) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CustomResourceSubresourceScale) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.SpecReplicasPath != nil { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.SpecReplicasPath))) i += copy(dAtA[i:], *m.SpecReplicasPath) } if m.StatusReplicasPath != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.StatusReplicasPath))) i += copy(dAtA[i:], *m.StatusReplicasPath) } if m.LabelSelectorPath != nil { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.LabelSelectorPath))) i += copy(dAtA[i:], *m.LabelSelectorPath) } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } func (m *CustomResourceSubresourceStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CustomResourceSubresourceStatus) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } func (m *CustomResourceSubresources) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CustomResourceSubresources) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Status != nil { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) n10, err := m.Status.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n10 } if m.Scale != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Scale.Size())) n11, err := m.Scale.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n11 } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } func (m *CustomResourceValidation) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CustomResourceValidation) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.OpenAPIV3Schema != nil { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.OpenAPIV3Schema.Size())) n12, err := m.OpenAPIV3Schema.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n12 } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } func (m *ExternalDocumentation) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ExternalDocumentation) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Description != nil { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Description))) i += copy(dAtA[i:], *m.Description) } if m.Url != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Url))) i += copy(dAtA[i:], *m.Url) } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } func (m *JSON) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *JSON) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Raw != nil { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Raw))) i += copy(dAtA[i:], m.Raw) } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } func (m *JSONSchemaProps) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *JSONSchemaProps) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Id != nil { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Id))) i += copy(dAtA[i:], *m.Id) } if m.Schema != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Schema))) i += copy(dAtA[i:], *m.Schema) } if m.Ref != nil { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Ref))) i += copy(dAtA[i:], *m.Ref) } if m.Description != nil { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Description))) i += copy(dAtA[i:], *m.Description) } if m.Type != nil { dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Type))) i += copy(dAtA[i:], *m.Type) } if m.Format != nil { dAtA[i] = 0x32 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Format))) i += copy(dAtA[i:], *m.Format) } if m.Title != nil { dAtA[i] = 0x3a i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Title))) i += copy(dAtA[i:], *m.Title) } if m.Default != nil { dAtA[i] = 0x42 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Default.Size())) n13, err := m.Default.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n13 } if m.Maximum != nil { dAtA[i] = 0x49 i++ encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Maximum)))) i += 8 } if m.ExclusiveMaximum != nil { dAtA[i] = 0x50 i++ if *m.ExclusiveMaximum { dAtA[i] = 1 } else { dAtA[i] = 0 } i++ } if m.Minimum != nil { dAtA[i] = 0x59 i++ encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Minimum)))) i += 8 } if m.ExclusiveMinimum != nil { dAtA[i] = 0x60 i++ if *m.ExclusiveMinimum { dAtA[i] = 1 } else { dAtA[i] = 0 } i++ } if m.MaxLength != nil { dAtA[i] = 0x68 i++ i = encodeVarintGenerated(dAtA, i, uint64(*m.MaxLength)) } if m.MinLength != nil { dAtA[i] = 0x70 i++ i = encodeVarintGenerated(dAtA, i, uint64(*m.MinLength)) } if m.Pattern != nil { dAtA[i] = 0x7a i++ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Pattern))) i += copy(dAtA[i:], *m.Pattern) } if m.MaxItems != nil { dAtA[i] = 0x80 i++ dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(*m.MaxItems)) } if m.MinItems != nil { dAtA[i] = 0x88 i++ dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(*m.MinItems)) } if m.UniqueItems != nil { dAtA[i] = 0x90 i++ dAtA[i] = 0x1 i++ if *m.UniqueItems { dAtA[i] = 1 } else { dAtA[i] = 0 } i++ } if m.MultipleOf != nil { dAtA[i] = 0x99 i++ dAtA[i] = 0x1 i++ encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.MultipleOf)))) i += 8 } if len(m.Enum) > 0 { for _, msg := range m.Enum { dAtA[i] = 0xa2 i++ dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } if m.MaxProperties != nil { dAtA[i] = 0xa8 i++ dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(*m.MaxProperties)) } if m.MinProperties != nil { dAtA[i] = 0xb0 i++ dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(*m.MinProperties)) } if len(m.Required) > 0 { for _, s := range m.Required { dAtA[i] = 0xba i++ dAtA[i] = 0x1 i++ l = len(s) for l >= 1<<7 { dAtA[i] = uint8(uint64(l)&0x7f | 0x80) l >>= 7 i++ } dAtA[i] = uint8(l) i++ i += copy(dAtA[i:], s) } } if m.Items != nil { dAtA[i] = 0xc2 i++ dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Items.Size())) n14, err := m.Items.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n14 } if len(m.AllOf) > 0 { for _, msg := range m.AllOf { dAtA[i] = 0xca i++ dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } if len(m.OneOf) > 0 { for _, msg := range m.OneOf { dAtA[i] = 0xd2 i++ dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } if len(m.AnyOf) > 0 { for _, msg := range m.AnyOf { dAtA[i] = 0xda i++ dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } if m.Not != nil { dAtA[i] = 0xe2 i++ dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Not.Size())) n15, err := m.Not.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n15 } if len(m.Properties) > 0 { for k, _ := range m.Properties { dAtA[i] = 0xea i++ dAtA[i] = 0x1 i++ v := m.Properties[k] msgSize := 0 if v != nil { msgSize = v.Size() msgSize += 1 + sovGenerated(uint64(msgSize)) } mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize i = encodeVarintGenerated(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) if v != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(v.Size())) n16, err := v.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n16 } } } if m.AdditionalProperties != nil { dAtA[i] = 0xf2 i++ dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.AdditionalProperties.Size())) n17, err := m.AdditionalProperties.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n17 } if len(m.PatternProperties) > 0 { for k, _ := range m.PatternProperties { dAtA[i] = 0xfa i++ dAtA[i] = 0x1 i++ v := m.PatternProperties[k] msgSize := 0 if v != nil { msgSize = v.Size() msgSize += 1 + sovGenerated(uint64(msgSize)) } mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize i = encodeVarintGenerated(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) if v != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(v.Size())) n18, err := v.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n18 } } } if len(m.Dependencies) > 0 { for k, _ := range m.Dependencies { dAtA[i] = 0x82 i++ dAtA[i] = 0x2 i++ v := m.Dependencies[k] msgSize := 0 if v != nil { msgSize = v.Size() msgSize += 1 + sovGenerated(uint64(msgSize)) } mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize i = encodeVarintGenerated(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) if v != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(v.Size())) n19, err := v.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n19 } } } if m.AdditionalItems != nil { dAtA[i] = 0x8a i++ dAtA[i] = 0x2 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.AdditionalItems.Size())) n20, err := m.AdditionalItems.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n20 } if len(m.Definitions) > 0 { for k, _ := range m.Definitions { dAtA[i] = 0x92 i++ dAtA[i] = 0x2 i++ v := m.Definitions[k] msgSize := 0 if v != nil { msgSize = v.Size() msgSize += 1 + sovGenerated(uint64(msgSize)) } mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize i = encodeVarintGenerated(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) if v != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(v.Size())) n21, err := v.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n21 } } } if m.ExternalDocs != nil { dAtA[i] = 0x9a i++ dAtA[i] = 0x2 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ExternalDocs.Size())) n22, err := m.ExternalDocs.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n22 } if m.Example != nil { dAtA[i] = 0xa2 i++ dAtA[i] = 0x2 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Example.Size())) n23, err := m.Example.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n23 } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } func (m *JSONSchemaPropsOrArray) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *JSONSchemaPropsOrArray) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Schema != nil { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Schema.Size())) n24, err := m.Schema.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n24 } if len(m.JSONSchemas) > 0 { for _, msg := range m.JSONSchemas { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } func (m *JSONSchemaPropsOrBool) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *JSONSchemaPropsOrBool) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Allows != nil { dAtA[i] = 0x8 i++ if *m.Allows { dAtA[i] = 1 } else { dAtA[i] = 0 } i++ } if m.Schema != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Schema.Size())) n25, err := m.Schema.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n25 } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } func (m *JSONSchemaPropsOrStringArray) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *JSONSchemaPropsOrStringArray) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Schema != nil { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Schema.Size())) n26, err := m.Schema.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n26 } if len(m.Property) > 0 { for _, s := range m.Property { dAtA[i] = 0x12 i++ l = len(s) for l >= 1<<7 { dAtA[i] = uint8(uint64(l)&0x7f | 0x80) l >>= 7 i++ } dAtA[i] = uint8(l) i++ i += copy(dAtA[i:], s) } } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *CustomResourceDefinition) Size() (n int) { var l int _ = l if m.Metadata != nil { l = m.Metadata.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.Spec != nil { l = m.Spec.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.Status != nil { l = m.Status.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *CustomResourceDefinitionCondition) Size() (n int) { var l int _ = l if m.Type != nil { l = len(*m.Type) n += 1 + l + sovGenerated(uint64(l)) } if m.Status != nil { l = len(*m.Status) n += 1 + l + sovGenerated(uint64(l)) } if m.LastTransitionTime != nil { l = m.LastTransitionTime.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.Reason != nil { l = len(*m.Reason) n += 1 + l + sovGenerated(uint64(l)) } if m.Message != nil { l = len(*m.Message) n += 1 + l + sovGenerated(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *CustomResourceDefinitionList) Size() (n int) { var l int _ = l if m.Metadata != nil { l = m.Metadata.Size() n += 1 + l + sovGenerated(uint64(l)) } if len(m.Items) > 0 { for _, e := range m.Items { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *CustomResourceDefinitionNames) Size() (n int) { var l int _ = l if m.Plural != nil { l = len(*m.Plural) n += 1 + l + sovGenerated(uint64(l)) } if m.Singular != nil { l = len(*m.Singular) n += 1 + l + sovGenerated(uint64(l)) } if len(m.ShortNames) > 0 { for _, s := range m.ShortNames { l = len(s) n += 1 + l + sovGenerated(uint64(l)) } } if m.Kind != nil { l = len(*m.Kind) n += 1 + l + sovGenerated(uint64(l)) } if m.ListKind != nil { l = len(*m.ListKind) n += 1 + l + sovGenerated(uint64(l)) } if len(m.Categories) > 0 { for _, s := range m.Categories { l = len(s) n += 1 + l + sovGenerated(uint64(l)) } } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *CustomResourceDefinitionSpec) Size() (n int) { var l int _ = l if m.Group != nil { l = len(*m.Group) n += 1 + l + sovGenerated(uint64(l)) } if m.Version != nil { l = len(*m.Version) n += 1 + l + sovGenerated(uint64(l)) } if m.Names != nil { l = m.Names.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.Scope != nil { l = len(*m.Scope) n += 1 + l + sovGenerated(uint64(l)) } if m.Validation != nil { l = m.Validation.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.Subresources != nil { l = m.Subresources.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *CustomResourceDefinitionStatus) Size() (n int) { var l int _ = l if len(m.Conditions) > 0 { for _, e := range m.Conditions { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } if m.AcceptedNames != nil { l = m.AcceptedNames.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *CustomResourceSubresourceScale) Size() (n int) { var l int _ = l if m.SpecReplicasPath != nil { l = len(*m.SpecReplicasPath) n += 1 + l + sovGenerated(uint64(l)) } if m.StatusReplicasPath != nil { l = len(*m.StatusReplicasPath) n += 1 + l + sovGenerated(uint64(l)) } if m.LabelSelectorPath != nil { l = len(*m.LabelSelectorPath) n += 1 + l + sovGenerated(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *CustomResourceSubresourceStatus) Size() (n int) { var l int _ = l if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *CustomResourceSubresources) Size() (n int) { var l int _ = l if m.Status != nil { l = m.Status.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.Scale != nil { l = m.Scale.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *CustomResourceValidation) Size() (n int) { var l int _ = l if m.OpenAPIV3Schema != nil { l = m.OpenAPIV3Schema.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *ExternalDocumentation) Size() (n int) { var l int _ = l if m.Description != nil { l = len(*m.Description) n += 1 + l + sovGenerated(uint64(l)) } if m.Url != nil { l = len(*m.Url) n += 1 + l + sovGenerated(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *JSON) Size() (n int) { var l int _ = l if m.Raw != nil { l = len(m.Raw) n += 1 + l + sovGenerated(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *JSONSchemaProps) Size() (n int) { var l int _ = l if m.Id != nil { l = len(*m.Id) n += 1 + l + sovGenerated(uint64(l)) } if m.Schema != nil { l = len(*m.Schema) n += 1 + l + sovGenerated(uint64(l)) } if m.Ref != nil { l = len(*m.Ref) n += 1 + l + sovGenerated(uint64(l)) } if m.Description != nil { l = len(*m.Description) n += 1 + l + sovGenerated(uint64(l)) } if m.Type != nil { l = len(*m.Type) n += 1 + l + sovGenerated(uint64(l)) } if m.Format != nil { l = len(*m.Format) n += 1 + l + sovGenerated(uint64(l)) } if m.Title != nil { l = len(*m.Title) n += 1 + l + sovGenerated(uint64(l)) } if m.Default != nil { l = m.Default.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.Maximum != nil { n += 9 } if m.ExclusiveMaximum != nil { n += 2 } if m.Minimum != nil { n += 9 } if m.ExclusiveMinimum != nil { n += 2 } if m.MaxLength != nil { n += 1 + sovGenerated(uint64(*m.MaxLength)) } if m.MinLength != nil { n += 1 + sovGenerated(uint64(*m.MinLength)) } if m.Pattern != nil { l = len(*m.Pattern) n += 1 + l + sovGenerated(uint64(l)) } if m.MaxItems != nil { n += 2 + sovGenerated(uint64(*m.MaxItems)) } if m.MinItems != nil { n += 2 + sovGenerated(uint64(*m.MinItems)) } if m.UniqueItems != nil { n += 3 } if m.MultipleOf != nil { n += 10 } if len(m.Enum) > 0 { for _, e := range m.Enum { l = e.Size() n += 2 + l + sovGenerated(uint64(l)) } } if m.MaxProperties != nil { n += 2 + sovGenerated(uint64(*m.MaxProperties)) } if m.MinProperties != nil { n += 2 + sovGenerated(uint64(*m.MinProperties)) } if len(m.Required) > 0 { for _, s := range m.Required { l = len(s) n += 2 + l + sovGenerated(uint64(l)) } } if m.Items != nil { l = m.Items.Size() n += 2 + l + sovGenerated(uint64(l)) } if len(m.AllOf) > 0 { for _, e := range m.AllOf { l = e.Size() n += 2 + l + sovGenerated(uint64(l)) } } if len(m.OneOf) > 0 { for _, e := range m.OneOf { l = e.Size() n += 2 + l + sovGenerated(uint64(l)) } } if len(m.AnyOf) > 0 { for _, e := range m.AnyOf { l = e.Size() n += 2 + l + sovGenerated(uint64(l)) } } if m.Not != nil { l = m.Not.Size() n += 2 + l + sovGenerated(uint64(l)) } if len(m.Properties) > 0 { for k, v := range m.Properties { _ = k _ = v l = 0 if v != nil { l = v.Size() l += 1 + sovGenerated(uint64(l)) } mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + l n += mapEntrySize + 2 + sovGenerated(uint64(mapEntrySize)) } } if m.AdditionalProperties != nil { l = m.AdditionalProperties.Size() n += 2 + l + sovGenerated(uint64(l)) } if len(m.PatternProperties) > 0 { for k, v := range m.PatternProperties { _ = k _ = v l = 0 if v != nil { l = v.Size() l += 1 + sovGenerated(uint64(l)) } mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + l n += mapEntrySize + 2 + sovGenerated(uint64(mapEntrySize)) } } if len(m.Dependencies) > 0 { for k, v := range m.Dependencies { _ = k _ = v l = 0 if v != nil { l = v.Size() l += 1 + sovGenerated(uint64(l)) } mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + l n += mapEntrySize + 2 + sovGenerated(uint64(mapEntrySize)) } } if m.AdditionalItems != nil { l = m.AdditionalItems.Size() n += 2 + l + sovGenerated(uint64(l)) } if len(m.Definitions) > 0 { for k, v := range m.Definitions { _ = k _ = v l = 0 if v != nil { l = v.Size() l += 1 + sovGenerated(uint64(l)) } mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + l n += mapEntrySize + 2 + sovGenerated(uint64(mapEntrySize)) } } if m.ExternalDocs != nil { l = m.ExternalDocs.Size() n += 2 + l + sovGenerated(uint64(l)) } if m.Example != nil { l = m.Example.Size() n += 2 + l + sovGenerated(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *JSONSchemaPropsOrArray) Size() (n int) { var l int _ = l if m.Schema != nil { l = m.Schema.Size() n += 1 + l + sovGenerated(uint64(l)) } if len(m.JSONSchemas) > 0 { for _, e := range m.JSONSchemas { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *JSONSchemaPropsOrBool) Size() (n int) { var l int _ = l if m.Allows != nil { n += 2 } if m.Schema != nil { l = m.Schema.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *JSONSchemaPropsOrStringArray) Size() (n int) { var l int _ = l if m.Schema != nil { l = m.Schema.Size() n += 1 + l + sovGenerated(uint64(l)) } if len(m.Property) > 0 { for _, s := range m.Property { l = len(s) n += 1 + l + sovGenerated(uint64(l)) } } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func sovGenerated(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozGenerated(x uint64) (n int) { return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *CustomResourceDefinition) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CustomResourceDefinition: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CustomResourceDefinition: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Metadata == nil { m.Metadata = &k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta{} } if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Spec == nil { m.Spec = &CustomResourceDefinitionSpec{} } if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Status == nil { m.Status = &CustomResourceDefinitionStatus{} } if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CustomResourceDefinitionCondition) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CustomResourceDefinitionCondition: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CustomResourceDefinitionCondition: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.Type = &s iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.Status = &s iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.LastTransitionTime == nil { m.LastTransitionTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{} } if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.Reason = &s iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.Message = &s iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CustomResourceDefinitionList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CustomResourceDefinitionList: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CustomResourceDefinitionList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Metadata == nil { m.Metadata = &k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta{} } if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Items = append(m.Items, &CustomResourceDefinition{}) if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CustomResourceDefinitionNames) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CustomResourceDefinitionNames: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CustomResourceDefinitionNames: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Plural", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.Plural = &s iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Singular", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.Singular = &s iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ShortNames", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ShortNames = append(m.ShortNames, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.Kind = &s iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ListKind", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.ListKind = &s iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Categories", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Categories = append(m.Categories, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CustomResourceDefinitionSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CustomResourceDefinitionSpec: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CustomResourceDefinitionSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.Group = &s iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.Version = &s iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Names", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Names == nil { m.Names = &CustomResourceDefinitionNames{} } if err := m.Names.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.Scope = &s iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Validation", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Validation == nil { m.Validation = &CustomResourceValidation{} } if err := m.Validation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Subresources", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Subresources == nil { m.Subresources = &CustomResourceSubresources{} } if err := m.Subresources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CustomResourceDefinitionStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CustomResourceDefinitionStatus: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CustomResourceDefinitionStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Conditions = append(m.Conditions, &CustomResourceDefinitionCondition{}) if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AcceptedNames", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.AcceptedNames == nil { m.AcceptedNames = &CustomResourceDefinitionNames{} } if err := m.AcceptedNames.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CustomResourceSubresourceScale) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CustomResourceSubresourceScale: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CustomResourceSubresourceScale: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SpecReplicasPath", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.SpecReplicasPath = &s iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StatusReplicasPath", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.StatusReplicasPath = &s iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LabelSelectorPath", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.LabelSelectorPath = &s iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CustomResourceSubresourceStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CustomResourceSubresourceStatus: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CustomResourceSubresourceStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CustomResourceSubresources) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CustomResourceSubresources: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CustomResourceSubresources: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Status == nil { m.Status = &CustomResourceSubresourceStatus{} } if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Scale", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Scale == nil { m.Scale = &CustomResourceSubresourceScale{} } if err := m.Scale.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CustomResourceValidation) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CustomResourceValidation: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CustomResourceValidation: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OpenAPIV3Schema", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.OpenAPIV3Schema == nil { m.OpenAPIV3Schema = &JSONSchemaProps{} } if err := m.OpenAPIV3Schema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ExternalDocumentation) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ExternalDocumentation: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ExternalDocumentation: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.Description = &s iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.Url = &s iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *JSON) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: JSON: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: JSON: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } m.Raw = append(m.Raw[:0], dAtA[iNdEx:postIndex]...) if m.Raw == nil { m.Raw = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *JSONSchemaProps) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: JSONSchemaProps: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: JSONSchemaProps: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.Id = &s iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.Schema = &s iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.Ref = &s iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.Description = &s iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.Type = &s iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.Format = &s iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.Title = &s iNdEx = postIndex case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Default", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Default == nil { m.Default = &JSON{} } if err := m.Default.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 9: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field Maximum", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.Maximum = &v2 case 10: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ExclusiveMaximum", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.ExclusiveMaximum = &b case 11: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field Minimum", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.Minimum = &v2 case 12: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ExclusiveMinimum", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.ExclusiveMinimum = &b case 13: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MaxLength", wireType) } var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } m.MaxLength = &v case 14: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MinLength", wireType) } var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } m.MinLength = &v case 15: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pattern", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.Pattern = &s iNdEx = postIndex case 16: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MaxItems", wireType) } var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } m.MaxItems = &v case 17: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MinItems", wireType) } var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } m.MinItems = &v case 18: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field UniqueItems", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.UniqueItems = &b case 19: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field MultipleOf", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.MultipleOf = &v2 case 20: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Enum", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Enum = append(m.Enum, &JSON{}) if err := m.Enum[len(m.Enum)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 21: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MaxProperties", wireType) } var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } m.MaxProperties = &v case 22: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MinProperties", wireType) } var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } m.MinProperties = &v case 23: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Required", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Required = append(m.Required, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 24: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Items == nil { m.Items = &JSONSchemaPropsOrArray{} } if err := m.Items.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 25: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AllOf", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.AllOf = append(m.AllOf, &JSONSchemaProps{}) if err := m.AllOf[len(m.AllOf)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 26: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OneOf", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.OneOf = append(m.OneOf, &JSONSchemaProps{}) if err := m.OneOf[len(m.OneOf)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 27: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AnyOf", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.AnyOf = append(m.AnyOf, &JSONSchemaProps{}) if err := m.AnyOf[len(m.AnyOf)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 28: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Not", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Not == nil { m.Not = &JSONSchemaProps{} } if err := m.Not.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 29: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Properties", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Properties == nil { m.Properties = make(map[string]*JSONSchemaProps) } var mapkey string var mapvalue *JSONSchemaProps for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthGenerated } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return ErrInvalidLengthGenerated } postmsgIndex := iNdEx + mapmsglen if mapmsglen < 0 { return ErrInvalidLengthGenerated } if postmsgIndex > l { return io.ErrUnexpectedEOF } mapvalue = &JSONSchemaProps{} if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { return err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Properties[mapkey] = mapvalue iNdEx = postIndex case 30: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AdditionalProperties", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.AdditionalProperties == nil { m.AdditionalProperties = &JSONSchemaPropsOrBool{} } if err := m.AdditionalProperties.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 31: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PatternProperties", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.PatternProperties == nil { m.PatternProperties = make(map[string]*JSONSchemaProps) } var mapkey string var mapvalue *JSONSchemaProps for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthGenerated } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return ErrInvalidLengthGenerated } postmsgIndex := iNdEx + mapmsglen if mapmsglen < 0 { return ErrInvalidLengthGenerated } if postmsgIndex > l { return io.ErrUnexpectedEOF } mapvalue = &JSONSchemaProps{} if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { return err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.PatternProperties[mapkey] = mapvalue iNdEx = postIndex case 32: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Dependencies", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Dependencies == nil { m.Dependencies = make(map[string]*JSONSchemaPropsOrStringArray) } var mapkey string var mapvalue *JSONSchemaPropsOrStringArray for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthGenerated } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return ErrInvalidLengthGenerated } postmsgIndex := iNdEx + mapmsglen if mapmsglen < 0 { return ErrInvalidLengthGenerated } if postmsgIndex > l { return io.ErrUnexpectedEOF } mapvalue = &JSONSchemaPropsOrStringArray{} if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { return err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Dependencies[mapkey] = mapvalue iNdEx = postIndex case 33: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AdditionalItems", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.AdditionalItems == nil { m.AdditionalItems = &JSONSchemaPropsOrBool{} } if err := m.AdditionalItems.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 34: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Definitions", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Definitions == nil { m.Definitions = make(map[string]*JSONSchemaProps) } var mapkey string var mapvalue *JSONSchemaProps for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthGenerated } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return ErrInvalidLengthGenerated } postmsgIndex := iNdEx + mapmsglen if mapmsglen < 0 { return ErrInvalidLengthGenerated } if postmsgIndex > l { return io.ErrUnexpectedEOF } mapvalue = &JSONSchemaProps{} if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { return err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Definitions[mapkey] = mapvalue iNdEx = postIndex case 35: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ExternalDocs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.ExternalDocs == nil { m.ExternalDocs = &ExternalDocumentation{} } if err := m.ExternalDocs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 36: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Example", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Example == nil { m.Example = &JSON{} } if err := m.Example.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *JSONSchemaPropsOrArray) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: JSONSchemaPropsOrArray: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: JSONSchemaPropsOrArray: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Schema == nil { m.Schema = &JSONSchemaProps{} } if err := m.Schema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field JSONSchemas", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.JSONSchemas = append(m.JSONSchemas, &JSONSchemaProps{}) if err := m.JSONSchemas[len(m.JSONSchemas)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *JSONSchemaPropsOrBool) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: JSONSchemaPropsOrBool: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: JSONSchemaPropsOrBool: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Allows", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.Allows = &b case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Schema == nil { m.Schema = &JSONSchemaProps{} } if err := m.Schema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *JSONSchemaPropsOrStringArray) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: JSONSchemaPropsOrStringArray: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: JSONSchemaPropsOrStringArray: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Schema == nil { m.Schema = &JSONSchemaProps{} } if err := m.Schema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Property", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Property = append(m.Property, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowGenerated } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowGenerated } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowGenerated } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthGenerated } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowGenerated } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipGenerated(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto", fileDescriptorGenerated) } var fileDescriptorGenerated = []byte{ // 1550 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcb, 0x6f, 0x14, 0x47, 0x13, 0xff, 0x66, 0xd7, 0xc6, 0x76, 0xdb, 0x60, 0xbb, 0x3f, 0x30, 0xc3, 0x7e, 0xc6, 0x98, 0xf9, 0x38, 0x58, 0x28, 0x59, 0x07, 0x88, 0x22, 0x14, 0x29, 0x07, 0x5e, 0x07, 0x9e, 0x46, 0x63, 0x02, 0x0a, 0x84, 0x47, 0x7b, 0xa6, 0x76, 0xdd, 0x78, 0xa6, 0x67, 0xe8, 0xee, 0x59, 0xd6, 0x87, 0xa0, 0x24, 0xca, 0x81, 0x1c, 0x92, 0x4b, 0x90, 0x92, 0x43, 0x4e, 0x39, 0x45, 0xf9, 0x37, 0x72, 0xc9, 0x91, 0x6b, 0x0e, 0x91, 0x22, 0xf2, 0x1f, 0xe4, 0x2f, 0x88, 0xfa, 0xb1, 0xb3, 0xb3, 0x2f, 0x82, 0xc4, 0x2c, 0xdc, 0xa6, 0xba, 0xaa, 0xeb, 0x57, 0x5d, 0x55, 0x5d, 0xfd, 0xdb, 0x45, 0x57, 0x77, 0x4e, 0x8b, 0x3a, 0x4d, 0xd6, 0x49, 0x4a, 0xa1, 0x2d, 0x81, 0x09, 0x9a, 0x30, 0xf1, 0x2e, 0x49, 0xa9, 0x00, 0xde, 0x02, 0xbe, 0x9e, 0xee, 0x34, 0x95, 0x4e, 0xf4, 0x1a, 0xac, 0xb7, 0x4e, 0x6c, 0x81, 0x24, 0x27, 0xd6, 0x9b, 0xc0, 0x80, 0x13, 0x09, 0x61, 0x3d, 0xe5, 0x89, 0x4c, 0xf0, 0x47, 0xc6, 0x5d, 0xbd, 0xc7, 0xfa, 0x7e, 0xee, 0xae, 0x9e, 0xee, 0x34, 0x95, 0x4e, 0xf4, 0x1a, 0xd4, 0xad, 0xbb, 0xda, 0xfb, 0xdd, 0x68, 0x62, 0x12, 0x6c, 0x53, 0x06, 0x7c, 0xb7, 0x1b, 0x42, 0x0c, 0x92, 0xac, 0xb7, 0x06, 0x40, 0x6b, 0xeb, 0xa3, 0x76, 0xf1, 0x8c, 0x49, 0x1a, 0xc3, 0xc0, 0x86, 0x0f, 0xfe, 0x6d, 0x83, 0x08, 0xb6, 0x21, 0x26, 0x03, 0xfb, 0x4e, 0x8d, 0xda, 0x97, 0x49, 0x1a, 0xad, 0x53, 0x26, 0x85, 0xe4, 0xfd, 0x9b, 0xbc, 0xe7, 0x15, 0xe4, 0x9e, 0xcb, 0x84, 0x4c, 0x62, 0x1f, 0x44, 0x92, 0xf1, 0x00, 0xce, 0x43, 0x83, 0x32, 0x2a, 0x69, 0xc2, 0xf0, 0x15, 0x34, 0xad, 0x4e, 0x15, 0x12, 0x49, 0x5c, 0x67, 0xd5, 0x59, 0x9b, 0x3d, 0xf9, 0x5e, 0xbd, 0x9b, 0xc2, 0x1c, 0xa4, 0x9b, 0x37, 0x65, 0x5d, 0x6f, 0x9d, 0xa8, 0x6f, 0x6c, 0x3d, 0x84, 0x40, 0x5e, 0x05, 0x49, 0xfc, 0xdc, 0x03, 0x4e, 0xd0, 0x84, 0x48, 0x21, 0x70, 0x2b, 0xda, 0xd3, 0x9d, 0xfa, 0x6b, 0x15, 0xa3, 0x3e, 0x2a, 0xe8, 0xcd, 0x14, 0x02, 0x5f, 0x03, 0xe1, 0x0c, 0xed, 0x11, 0x92, 0xc8, 0x4c, 0xb8, 0x55, 0x0d, 0x79, 0x77, 0x5c, 0x90, 0x1a, 0xc4, 0xb7, 0x60, 0xde, 0x1f, 0x0e, 0x3a, 0x3a, 0xca, 0xf4, 0x5c, 0xc2, 0x42, 0x93, 0x5b, 0x8c, 0x26, 0xe4, 0x6e, 0x0a, 0x3a, 0xaf, 0x33, 0xbe, 0xfe, 0xc6, 0x4b, 0x79, 0xc0, 0x15, 0xbd, 0x6a, 0x25, 0x7c, 0x1b, 0xe1, 0x88, 0x08, 0x79, 0x83, 0x13, 0x26, 0xf4, 0xee, 0x1b, 0x34, 0x06, 0x7b, 0xa8, 0xe3, 0xaf, 0x56, 0x11, 0xb5, 0xc3, 0x1f, 0xe2, 0x45, 0x61, 0x72, 0x20, 0x22, 0x61, 0xee, 0x84, 0xc1, 0x34, 0x12, 0x76, 0xd1, 0x54, 0x0c, 0x42, 0x90, 0x26, 0xb8, 0x93, 0x5a, 0xd1, 0x11, 0xbd, 0xdf, 0x1d, 0xb4, 0x3c, 0xea, 0x7c, 0x57, 0xa8, 0x90, 0xf8, 0xd2, 0x40, 0xdb, 0xd4, 0x5f, 0x2d, 0x48, 0xb5, 0xbb, 0xaf, 0x69, 0x62, 0x34, 0x49, 0x25, 0xc4, 0x2a, 0x23, 0xd5, 0xb5, 0xd9, 0x93, 0xb7, 0xc6, 0x54, 0x42, 0xdf, 0xa0, 0x78, 0xbf, 0x3a, 0xe8, 0xf0, 0x28, 0x9b, 0x6b, 0x24, 0x06, 0xa1, 0xf2, 0x95, 0x46, 0x19, 0x27, 0x91, 0xad, 0x9c, 0x95, 0x70, 0x0d, 0x4d, 0x0b, 0xca, 0x9a, 0x59, 0x44, 0xb8, 0xad, 0x5e, 0x2e, 0xe3, 0x15, 0x84, 0xc4, 0x76, 0xc2, 0xa5, 0xf6, 0xe0, 0x56, 0x57, 0xab, 0x6b, 0x33, 0x7e, 0x61, 0x45, 0xf5, 0xc2, 0x0e, 0x65, 0xa1, 0xad, 0x80, 0xfe, 0x56, 0xfe, 0x22, 0x2a, 0xe4, 0x65, 0xb5, 0x6e, 0x0a, 0x90, 0xcb, 0xca, 0x5f, 0x40, 0x24, 0x34, 0x13, 0x4e, 0x41, 0xb8, 0x7b, 0x8c, 0xbf, 0xee, 0x8a, 0xf7, 0xbc, 0x3a, 0xba, 0x42, 0xea, 0x7e, 0xe0, 0xfd, 0x68, 0xb2, 0xc9, 0x93, 0x2c, 0xb5, 0x67, 0x30, 0x82, 0x2a, 0x79, 0x0b, 0xb8, 0x4a, 0x98, 0x3d, 0x41, 0x47, 0xc4, 0x1c, 0x4d, 0x32, 0x1b, 0xbb, 0x2a, 0xe7, 0xa7, 0x63, 0xaa, 0x82, 0xce, 0x86, 0x6f, 0xa0, 0x54, 0x8c, 0x22, 0x48, 0x52, 0xb0, 0x59, 0x31, 0x02, 0x7e, 0x8c, 0x50, 0x8b, 0x44, 0x34, 0x24, 0xca, 0x5e, 0x27, 0xa6, 0xec, 0xa6, 0xb8, 0x99, 0xbb, 0xf7, 0x0b, 0x50, 0xf8, 0x33, 0x34, 0x27, 0xb2, 0x2d, 0x6e, 0x8d, 0x54, 0xd6, 0x15, 0xf4, 0x27, 0xa5, 0x42, 0x6f, 0x16, 0x00, 0xfc, 0x1e, 0x38, 0xef, 0xe7, 0x0a, 0x5a, 0x79, 0xf9, 0xfc, 0xc1, 0x9f, 0x3b, 0x08, 0x05, 0x9d, 0xf9, 0x22, 0x5c, 0x47, 0x5f, 0x98, 0x07, 0x63, 0x2a, 0x55, 0x3e, 0xc8, 0xfc, 0x02, 0x26, 0xfe, 0xd2, 0x41, 0x7b, 0x49, 0x10, 0x40, 0x2a, 0x21, 0x34, 0xcd, 0x5e, 0x79, 0x03, 0x0d, 0xd3, 0x0b, 0xe9, 0xfd, 0xe2, 0xf4, 0xa7, 0xaa, 0x90, 0xd7, 0xcd, 0x80, 0x44, 0x80, 0x8f, 0xa3, 0x05, 0xf5, 0x42, 0xf8, 0x90, 0x46, 0x34, 0x20, 0xe2, 0x3a, 0x91, 0xdb, 0xf6, 0x2a, 0x0c, 0xac, 0xe3, 0x3a, 0xc2, 0x66, 0x0c, 0xf7, 0x58, 0x9b, 0x0b, 0x32, 0x44, 0x83, 0xdf, 0x41, 0x8b, 0x11, 0xd9, 0x82, 0x68, 0x13, 0x22, 0x08, 0x64, 0xc2, 0xb5, 0x79, 0x55, 0x9b, 0x0f, 0x2a, 0xbc, 0xa3, 0xe8, 0xc8, 0xe8, 0x58, 0xcd, 0x7b, 0xf2, 0x75, 0x05, 0xd5, 0x46, 0xf7, 0x09, 0x6e, 0xe5, 0x8f, 0x86, 0x99, 0xb5, 0xf7, 0xc6, 0xd5, 0x92, 0xbd, 0xcf, 0x1c, 0x16, 0xea, 0x7e, 0x92, 0x08, 0x6c, 0x89, 0xef, 0x8e, 0x0d, 0x56, 0x81, 0xf8, 0x06, 0xcb, 0x7b, 0xe6, 0xf4, 0xd3, 0x95, 0xee, 0x75, 0xc5, 0x6d, 0x34, 0x9f, 0xa4, 0xc0, 0xce, 0x5c, 0xbf, 0x78, 0xf3, 0xd4, 0xa6, 0xe6, 0x48, 0x36, 0x25, 0xd7, 0x5e, 0x33, 0xb6, 0x4b, 0x9b, 0x1b, 0xd7, 0x8c, 0xc3, 0xeb, 0x3c, 0x49, 0x85, 0xdf, 0x0f, 0xe3, 0x5d, 0x46, 0x07, 0x2e, 0xb4, 0x25, 0x70, 0x46, 0xa2, 0xf3, 0x49, 0x90, 0xc5, 0xc0, 0xa4, 0x09, 0x69, 0x15, 0xcd, 0x86, 0x20, 0x02, 0x4e, 0x53, 0x3d, 0xaf, 0x4c, 0x8f, 0x15, 0x97, 0xf0, 0x02, 0xaa, 0x66, 0x3c, 0xb2, 0xfd, 0xa4, 0x3e, 0x3d, 0x17, 0x4d, 0x28, 0x40, 0xa5, 0xe1, 0xe4, 0xb1, 0xde, 0x33, 0xe7, 0xab, 0x4f, 0xef, 0xe9, 0x41, 0x34, 0xdf, 0x17, 0x0b, 0xde, 0x87, 0x2a, 0x34, 0xb4, 0x8e, 0x2b, 0x34, 0xd4, 0x1c, 0xc2, 0x9c, 0xbd, 0xc3, 0x21, 0xb4, 0xa4, 0xbd, 0x41, 0xc3, 0x36, 0xa2, 0xfa, 0xec, 0x8f, 0x6d, 0x62, 0x30, 0xb6, 0x0e, 0x47, 0x99, 0xec, 0xe5, 0x28, 0x8d, 0x84, 0xc7, 0x44, 0xea, 0x09, 0x38, 0xe3, 0x5b, 0x49, 0x8d, 0x6b, 0x49, 0x65, 0x04, 0xee, 0x94, 0x19, 0xd7, 0x5a, 0xc0, 0x77, 0xd1, 0x54, 0x08, 0x0d, 0x92, 0x45, 0xd2, 0x9d, 0xd6, 0xa5, 0x38, 0x57, 0x42, 0x29, 0xfc, 0x8e, 0x4f, 0x4d, 0x52, 0x48, 0x9b, 0xc6, 0x59, 0xec, 0xce, 0xac, 0x3a, 0x6b, 0x8e, 0xdf, 0x11, 0xd5, 0x0d, 0x87, 0x76, 0x10, 0x65, 0x82, 0xb6, 0xe0, 0xaa, 0x35, 0x41, 0xab, 0xce, 0xda, 0xb4, 0x3f, 0xb0, 0xae, 0xbd, 0x50, 0xa6, 0x4d, 0x66, 0xad, 0x17, 0x23, 0xf6, 0x7a, 0xb1, 0x26, 0x73, 0xfd, 0x5e, 0xac, 0xed, 0x32, 0x9a, 0x89, 0x49, 0xfb, 0x0a, 0xb0, 0xa6, 0xdc, 0x76, 0xf7, 0xae, 0x3a, 0x6b, 0x55, 0xbf, 0xbb, 0xa0, 0xb5, 0x94, 0x59, 0xed, 0x3e, 0xab, 0xed, 0x2c, 0xa8, 0x08, 0x52, 0x22, 0x55, 0x03, 0xb9, 0xf3, 0xe6, 0xe5, 0xb5, 0xa2, 0xa2, 0x01, 0x31, 0x69, 0x5f, 0xd4, 0x14, 0x68, 0x41, 0x6f, 0xcb, 0x65, 0xad, 0xa3, 0xcc, 0xe8, 0x16, 0xad, 0xce, 0xca, 0xaa, 0xb8, 0x19, 0xa3, 0x8f, 0x32, 0x30, 0x6a, 0xac, 0x83, 0x2e, 0x2e, 0x29, 0x12, 0x11, 0x67, 0x91, 0xa4, 0x69, 0x04, 0x1b, 0x0d, 0xf7, 0xbf, 0xfa, 0xe0, 0x85, 0x15, 0x7c, 0x0b, 0x4d, 0x00, 0xcb, 0x62, 0x77, 0xbf, 0x7e, 0x47, 0x4a, 0xa9, 0x9b, 0x76, 0x88, 0x8f, 0xa1, 0xbd, 0x31, 0x69, 0xab, 0xee, 0x05, 0x2e, 0x15, 0x81, 0x39, 0xa0, 0x63, 0xef, 0x5d, 0xd4, 0x56, 0x94, 0x15, 0xac, 0x96, 0xac, 0x55, 0x71, 0x51, 0xa5, 0x80, 0xc3, 0xa3, 0x8c, 0x72, 0x08, 0xdd, 0x83, 0x9a, 0x07, 0xe5, 0x32, 0xde, 0xe9, 0x50, 0x47, 0x57, 0x77, 0xde, 0xc7, 0xe5, 0x0e, 0x81, 0x0d, 0x7e, 0x86, 0x73, 0xb2, 0x6b, 0x89, 0x23, 0x0e, 0xd1, 0x24, 0x89, 0xa2, 0x8d, 0x86, 0x7b, 0x48, 0xa7, 0xab, 0xec, 0x89, 0x63, 0x9c, 0x2b, 0x94, 0x84, 0xa9, 0x72, 0xd5, 0xc6, 0x83, 0xa2, 0x9d, 0xeb, 0xb3, 0xb0, 0xdd, 0x8d, 0x86, 0xfb, 0xbf, 0x31, 0x9d, 0x45, 0x39, 0xc7, 0x0f, 0x50, 0x95, 0x25, 0xd2, 0x5d, 0x1e, 0xcb, 0x84, 0x56, 0xae, 0xf1, 0x13, 0x84, 0xd2, 0x6e, 0xff, 0x1c, 0xd6, 0x87, 0xb9, 0x57, 0x2e, 0x50, 0xbd, 0xdb, 0x8b, 0x17, 0x98, 0xe4, 0xbb, 0x7e, 0x01, 0x11, 0x3f, 0x75, 0xd0, 0x7e, 0x12, 0x1a, 0x6e, 0x44, 0xa2, 0x42, 0x2b, 0xaf, 0xe8, 0x33, 0xdf, 0x28, 0xbb, 0x21, 0xcf, 0x26, 0x49, 0xe4, 0x0f, 0x45, 0xc4, 0xdf, 0x39, 0x68, 0xd1, 0x8e, 0x94, 0x42, 0x1c, 0x47, 0x74, 0x4a, 0xa0, 0xec, 0x94, 0xf4, 0xe3, 0x98, 0xcc, 0x0c, 0xe2, 0xe3, 0xaf, 0x1c, 0x34, 0x17, 0x42, 0x0a, 0x2c, 0x04, 0x16, 0xa8, 0x80, 0x56, 0x4b, 0xe1, 0xac, 0xfd, 0x01, 0x9d, 0x2f, 0x40, 0x98, 0x58, 0x7a, 0x50, 0xf1, 0x13, 0x34, 0xdf, 0x4d, 0x9a, 0x99, 0x97, 0x47, 0xc7, 0x58, 0xa1, 0x7e, 0x30, 0xfc, 0x85, 0xa3, 0x5e, 0xe2, 0x0e, 0xa7, 0x15, 0xae, 0xa7, 0xb3, 0x70, 0xbf, 0xf4, 0x2c, 0xe4, 0x08, 0x26, 0x09, 0x45, 0x4c, 0xdc, 0x46, 0x73, 0xd0, 0x65, 0x30, 0xc2, 0xfd, 0x7f, 0x29, 0x09, 0x18, 0x4a, 0x8a, 0xfc, 0x1e, 0x24, 0x45, 0x11, 0xa0, 0x4d, 0xe2, 0x34, 0x02, 0xf7, 0x58, 0x89, 0x14, 0xc1, 0xfa, 0xac, 0x7d, 0xe3, 0xa0, 0xf9, 0xbe, 0x56, 0x54, 0x5c, 0x68, 0x07, 0x76, 0x2d, 0x69, 0x52, 0x9f, 0x6a, 0xe4, 0xb5, 0x48, 0x94, 0x75, 0xc8, 0x6c, 0xe9, 0x23, 0x4f, 0x3b, 0xff, 0xb0, 0x72, 0xda, 0xa9, 0x3d, 0x73, 0xd0, 0xd2, 0xf0, 0x1b, 0xf2, 0x56, 0xc3, 0xfa, 0xd1, 0x41, 0x8b, 0x03, 0xf7, 0x64, 0x48, 0x44, 0x8f, 0x7a, 0x23, 0xba, 0x53, 0xf6, 0x0d, 0xd9, 0x94, 0x9c, 0xb2, 0xa6, 0x7d, 0x5a, 0xbb, 0xe1, 0x7d, 0xeb, 0xa0, 0x85, 0xfe, 0x06, 0x7e, 0x9b, 0xf9, 0xf2, 0xfe, 0x76, 0xd0, 0xd2, 0x70, 0x46, 0x80, 0x1b, 0x39, 0x03, 0x1f, 0xcf, 0xaf, 0x8f, 0x0e, 0xa3, 0x4f, 0xd1, 0xec, 0xc3, 0x5c, 0xd5, 0xf9, 0x83, 0xac, 0x6c, 0xb0, 0x22, 0x84, 0xf7, 0xbd, 0x83, 0x0e, 0x0c, 0x9d, 0x69, 0xea, 0x57, 0x01, 0x89, 0xa2, 0xe4, 0xb1, 0xf9, 0x11, 0x3a, 0xed, 0x5b, 0xa9, 0x90, 0x8b, 0xca, 0x38, 0x73, 0xe1, 0xfd, 0xe4, 0xa0, 0xe5, 0x97, 0xf5, 0xd2, 0x1b, 0x2b, 0x4a, 0x0d, 0x4d, 0x5b, 0x06, 0xb0, 0xab, 0x2b, 0x32, 0xe3, 0xe7, 0xf2, 0xd9, 0x43, 0xbf, 0xbd, 0x58, 0x71, 0x9e, 0xbf, 0x58, 0x71, 0xfe, 0x7c, 0xb1, 0xe2, 0xfc, 0xf0, 0xd7, 0xca, 0x7f, 0x6e, 0x4f, 0x59, 0x77, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xfd, 0xf0, 0x24, 0x51, 0xe9, 0x18, 0x00, 0x00, }
Penicillin treatment for early syphilis in the presence of HIV-1 infection: the long or the short of it? 1 Rooney G, Smith Y, Montgomery J. Do all patients attending genitourinary medicine services want to be seen within 48 hours? Int J STD & AIDS 2008;19:77–8 2 Carlin EM, Kellock DJ. Uptake of 48-hour access appointments in genitourinary medicine. Int J STD & AIDS 2008;19:79–82 3 Mercer CH, Sutcliffe L, Johnson AM, et al. How much do delayed healthcare seeking, delayed care provision, and diversion from primary care contribute to the transmission of STIs? Sex Transm Infect 2006;82:45–8 4 Singh G, McVerry S. Appropriateness of triage in GUM. Int J STD & AIDS 2006;11:786
/** * push into the leafset the specified node, by according the properties specified by the * mspastry protocol * * @param newNode long */ public void push(BigInteger newNode) { if (eq(newNode,nodeId)) return; if (cmp(newNode,nodeId)>0) pushToRight(newNode); else pushToLeft(newNode); }
import os red='\033[31m' green='\033[32m' orange='\033[33m' print(f"{orange}============================") print(f"{orange} made by bad_boy ") print(f"{orange}============================") print(f"{red}[1]start the hack") print("[2]exit") joker=int(input("==>")) if joker == 1: king=int(input("Enter Target phone Number : ")) print(f"{green}STARTED!") print("telegram.login ==> feaild\n" * 300 + "telegram.login ==> connect\n" * 30 + "code: 34890") elif joker == 2: os.system("clear") print("exiting!!")
/** * @author Paulo Cassola */ public class Ave extends Animal { //Classe Filha de Animal private String corPena; //Sobreposição dos métodos de animal @Override public void locomover() { System.out.println("Voando"); } @Override public void alimentar() { System.out.println("Comendo Frutas"); } @Override public void emitirSom() { System.out.println("Som de Ave"); } //Método unico dessa classe public void FazerNinho(){ System.out.println("Contruindo Ninho"); } //Encapsulamento getters e setters public String getCorPena() { return corPena; } public void setCorPena(String corPena) { this.corPena = corPena; } }
. 119 so-called "long-term" hospitalised patients (more than 4 months stay in the hospital) have been described by the records of illness and the AMDP documentation system. They were also examined 1 year after discharge. 92.5% of the "long-term" patients have been classified as "improved" or "well improved" when leaving the hospital. 1 year later 51.6% of those patients showed the same psychopathological state, 14.3% showed a better state and 28.6% had decreased. 5 patients had committed suicide. The family situation had improved only for 10% of the patients and 8.1% showed a decrease. The professional level of 20.9% decreased. Only 8.2% where able to improve themselves. The "typical long-term patient" suffers from a schizoaffective or affective psychosis. He is either between 18 and 29 or older then 60 years. He is unmarried, and has never or only few times been in hospital before. He leaves the hospital after long stay as "improved" or "well improved". One year later this success by a long-term indoor-treatment proved still to be stabile with 2/3 of the patients. The results are compared with those in literature and the problem of "long-term" hospitalisation is discussed.
/** * Created by marcos.salomao on 25/12/16. */ public class GradientDescentTest { @Test public void minimize() { DataSet dataSet = new SimpleDataSet(); dataSet.add(1.0, 1.0); dataSet.add(2.0, 2.0); dataSet.add(3.0, 3.0); Hypothesis h = (thetas, features) -> thetas.get(0) * features.get(0) + thetas.get(1) * features.get(1); GradientDescent gradientDescent = new GradientDescent(); Minimum minimum = gradientDescent.minimize(dataSet, h, 0.1, 1000); // Assert.assertThat(Precision.round(minimum.getCostFunction(), 2), CoreMatchers.equalTo(0.00)); } }
Outcomes of Renal Stone Surgery Performed Either as Predonation or Ex Vivo Bench Procedure in Renal Grafts from Living Donors: A Systematic Review Aims We aimed to summarize available evidence about intraoperative and postoperative donors' and recipients' outcomes following stone surgery in renal grafts from living donors performed either before donation or as ex vivo bench surgery at the time of living-donor nephrectomy. Methods A systematic review of PubMed, ISI Web of Knowledge, and Scopus databases was performed in September 2020. We included full papers that met the following criteria: original research, English language, human studies, and describing the results of stone surgery in renal grafts from living donors performed either before transplantation or as ex vivo bench surgery. Results We identified 11 studies involving 106 patients aged between 22 and 72 years. Predonation and bench stone surgery was performed in 9 (8.5%) and 96 (90.6%) patients, respectively. Predonation stone surgery involved extracorporeal shock wave lithotripsy, retrograde intrarenal surgery, and percutaneous nephrolithotomy in 8, 1, and 1 patient, respectively. The overall success rate of predonation stone surgery was 78%, and the complication rate was 0%. Bench stone surgery involved ureteroscopy, pyelolithotomy, or a combination of both in 79 (82.3%), 10 (10.4%), and 7 (7.3%) cases, respectively, with an overall success rate of 95.8% and an overall complication rate of 9.37%. Conclusions Predonation and bench stone surgery in grafts from living donors represents efficacious and safe procedures. Further studies on wider series with a longer follow-up are required. Introduction Renal transplantation (RT) from living donors provides significant advantages compared to transplantation from deceased donors including improved long-term survival, immediate functioning of the transplant, better transplant survival, and the possibility of transplanting preemptively . An ideal kidney donor has no renal disease, no active infection, and no transmissible malignancy. Unfortunately, although the total number of kidney transplants has increased in the last years, the number of total living donations has remained stable with a subsequent decrease in the proportion of living donor transplant procedures . Therefore, due to the shortage of living donors, centers have started using expanded criteria for donors, and RT from marginal donors has been proposed as a potential solution for organ shortage problems . Historically, stone-bearing kidneys have not been accepted for transplantation in many institutions . Indeed, stones located in the upper urinary tract of kidney donors represent a relative contraindication to RT because of complications like oliguria, hematuria, or rising creatinine in the receiver . Moreover, the donor is exposed to the risk of future stone formation in the remaining kidney, which could lead to obstruction, infections, and end-stage renal disease . Currently, the asymptomatic potential donor with a current single stone might be considered suitable for kidney donation in selected cases . The need to cope with the living graft shortage together with the development of minimally invasive surgery and ex vivo bench surgery stimulated research toward the treatment of stones either in the pretransplantation setting or during back-table procedures . In some institutions, the consideration of donors with stones has led to about 5% more RT than would otherwise have been possible . Therefore, stone surgery in the donor's kidney before or during RT is expected to be carried out in an increasing number of cases in the next years. However, the optimal operative management for such patients is still under debate. The present review is aimed at summarizing available clinical evidence about the outcomes of stone surgery performed either in the predonation setting or as ex vivo bench surgery at the time of living-donor nephrectomy. Evidence Acquisition This analysis was conducted and reported according to the general guidelines recommended by the Primary Reporting Items for Systematic Reviews and Meta-analyses (PRISMA) statement . To assess eligibility for the systematic review, PICOS (participants, intervention, comparisons, outcomes, study type) criteria were used . PICOS criteria were set as follows: participants-living kidney donors with urolithiasis involving the kidney selected for donation; intervention-surgery for stones in kidney selected for donation performed either before RT or as ex vivo bench surgery at the time of living-donor nephrectomy; comparison-none; outcome-intra-and postoperative surgical outcomes; study type-prospective and retrospective studies and case reports. Three databases (PubMed, Scopus, and ISI Web of Knowledge) were searched for articles published in English up to August 2020. The following combinations of keywords were used to retrieve relevant articles: "renal transplantation" AND "living donor" AND "urolithiasis". Abstracts (with no subsequent full-text publications) and articles that were not journal articles (letter, book, conference proceeding) or were not peer-reviewed studies were excluded. Two authors (GC and LN) reviewed the records separately to select relevant publications, with any discrepancies resolved by a third author (MC). The following data were extracted from the studies which included authors, year of publication, study period, study design, sample size, donors' age, gender, side of the kidney, stone size and location, type of surgery, operation time (OT), success of stone surgery, surgical complica-tions during stone surgery, early (within 30 days) and late (>30 days) donors' and recipients' complications, grade of complication according to the Clavien-Dindo Classification System , recipients' age and gender, donors' and recipients' follow-up, and stone recurrence in the graft. The quality of the studies was assessed using the Newcastle-Ottawa scale (NOS) . This scale measures three dimensions (selection, comparability of cohorts, and outcome). We rated the quality of the studies (good, fair, and poor) by awarding stars in each domain following the guidelines of the Newcastle-Ottawa Scale. A "good" quality score required 3 or 4 stars in selection, 1 or 2 stars in comparability, and 2 or 3 stars in outcomes. A "fair" quality score required 2 stars in selection, 1 or 2 stars in comparability, and 2 or 3 stars in outcomes. A "poor" quality score reflected 0 or 1 star(s) in selection, or 0 stars in comparability, or 0 or 1 star(s) in outcomes. Results The search strategy revealed 60 results. The screening of titles and abstracts revealed 18 full-text articles eligible for inclusion. Further assessment of eligibility, based on full-text papers, led to the exclusion of 7 papers. Finally, 11 studies involving 106 patients with a mean age ranging from 29.5 to 60 years who underwent stone surgery before or at RT from 1996 to 2020 were included in the final analysis ( Figure 1) . Specifically, seven studies (64%) were retrospective observational, two (18%) were prospective observational and two (18%) were case reports. The characteristics of the studies included as well as the features of donors and grafts are summarized in Table 1. The quality of the included studies is depicted in Table 2. 3.1. Predonation Stone Surgery. Overall, 9 (8.5%) patients underwent predonation stone surgery. Of them, 8 (88%), 1 (5%), and 1 (5%) underwent extracorporeal shockwave lithotripsy (ESWL), percutaneous lithotripsy (PCNL), and RIRS, respectively. Overall, these procedures were successful in 7 patients (78%). Intraoperative, early and late postoperative data about donors undergoing preoperative stone surgery and their recipients are reported in Table 3. Discussion The selection of an appropriate living donor is critical for a successful RT. Given the improvements in minimally invasive renal surgery observed in recent years, attempts have been made to expand the donor pool by including so-called marginal living donors such as patients with small renal mass or urolithiasis . Urolithiasis affecting living kidney donors represents a significant challenge. Historically, patients wishing to donate their kidneys were deemed ineligible if preoperative imaging demonstrated nephrolithiasis due to the risk of complications that may be related to the stone itself or to the procedure of stone removal including infections, upper urinary tract obstruction, and graft loss . The widespread use of computerized tomography angiography in the diagnostic workup of living donors has increased the detection of small asymptomatic renal stones with an incidence reaching up to 10% . Subjects with small asymptomatic incidentally discovered stones represent a considerable percentage that might increase the donor pool . The guidelines developed in 1996 by the Ad Hoc Clinical Practice Guidelines Subcommittee of the Patient Care and Education Committee of the American Society of Transplant Physicians stated that "nephrolithiasis is at least a relative contraindication to living donor nephrectomy because of the future risk that recurrent stones, obstructions, and infections will injure the remaining kidney" and that "nephrolithiasis not only places the donor at risk; inadvertent transplantation of a kidney with stone places the recipient at risk" . In 2004, kidney transplant physicians and surgeons met in Amsterdam for the International Forum on the Care of the Live Kidney Donor. During this forum, it was clearly stated that an asymptomatic potential donor with a current single stone might be considered suitable for kidney donation if (a) there is no hypercalciuria, hyperuricemia, or metabolic acidosis; (b) there is no cystinuria or hyperoxaluria; and (c) the current stone is <15 mm in size or potentially removable during transplant . In a more recent nationwide survey, it has been shown that 84% of sharing institutions accepted patients with a history of nephrolithiasis . Once the decision to proceed with RT has been made, possible options include the donation of the non-stonebearing kidney, donation of the stone-bearing kidney without stone removal, stone removal before RT, and bench stone removal at the time of RT . Typically, the use of the stone-bearing kidney is preferred for donation because of the potential risk to the donor of obstruction from a stone in a solitary remaining kidney . BioMed Research International The results from the present systematic review show that stone surgery is performed in living donors with mainly asymptomatic stones with a diameter ranging from 1 to 15 mm involving the whole pyelocalyceal system. Operative management options include predonation stone surgery and ex vivo bench stone surgery. Criteria for selection of treatment modality have been reported by Ganpule et al. . Authors treated hard stones with higher Hounsfield units (>1200) with ex vivo URS or PLT or preoperative RIRS with the choice between the two based on the pelvicalyceal anatomy (infundibular width, infundibular length, and pelvicalyceal angle) . On the other hand, soft stones (<1200 Hounsfield units) were managed with pretransplant ESWL performed with low energy, frequency, and power parameters . Most published series describe grafts treated through ex vivo bench surgery, and therefore, it represents the recommended treatment option for stones < 15 mm in size or potentially removable during RT . Potential advantages of ex vivo bench procedures include reduced donors' morbidity, shorter waiting times for donation, and lower costs . Ex vivo bench removal of upper urinary tract stones may be achieved by URS, PLT, basket retrieval, or a combination of them. The choice of surgical procedure depends on the size and location of stones. Available literature shows that URS represents the preferred option in most cases. Great diversity in the methods of bench URS exists that mostly reflects the wide variety of surgical devices used. Indeed, the procedure may be performed with cystoscopes and semirigid and flexible ureteroscopes. Moreover, stone clearance may be obtained through forceps, pneumatic, or laser lithotripsy. Finally, baskets can be used for the extraction of stones or fragments . Semirigid ureteroscopes are preferred over flexible ones for bench URS because of easier handling . Indeed, most calyces can be accessed on the bench using a semirigid scope due to ureteral mobility . Flexible scopes are useful when a stone needs to be extracted from a lower calyx with acute angulation . Pediatric cystoscopes have the advantage of better stability and maneuverability due to the short length of the shaft . Holmium laser is considered a better option than pneumatic energy thanks to the lower risk of mucosal injury in a kidney that is completely flaccid with a stone that lacks firm support . PLT is considered by some authors an excellent method for extracting intact stones during bench surgery mainly in the case of the extrarenal pelvis . It can be performed in combination with URS for stone extraction or if the ureter is tight . OT represents a critical variable to be addressed. Indeed, cold ischemia time > 8 h can potentially jeopardize renal function, increase acute rejection rates, or affect long-term graft survival . Interestingly, the mean OT reported by most available studies was within 30 minutes. Opinions about the technical complexity of bench stone surgery are controversial. Pushkar et al. consider bench URS a challenging procedure to be done by expert hands only as the kidney is unstable and avascular, and the intrarenal orientation can change with movements . Other authors consider bench surgery an easy-to-learn procedure with a short learning curve, as it is easier to handle and maneuver the kidney on the back table . The success rate with bench procedures is high in most series. Surgical failures may be due to anatomical abnormalities . For example, if stones are located in calyces with narrow infundibulum, they can be left in situ and transplantation can proceed as the risk of stone dislodgement is negligible . RT represents a complex surgical procedure that may be associated with several medical and surgical complications . Predonation and bench stone surgery may potentially increase the complication rate of RT both in the early and late postoperative stages. Interestingly, none of the recipients who received graft from living donors undergoing predonation stone surgery reported early postoperative complications. Short-term concerns with bench surgery include ureteric injury, hematuria, urine leak, and graft dysfunction . Notably, evidence demonstrates a low incidence of shortterm complications in recipients of grafts undergoing bench stone surgery. Indeed, early postoperative complications were recorded in 9 cases and in only two cases, these complications were attributed to bench stone surgery. One patient developed a urinary leakage after PLT that was repaired with primary suture . The second one involved a complete occlusion of the ureteroneocystostomy after bench URS and was treated with exploration and revision of the ureteroneocystostomy . Several risk-reduction strategies have been proposed to prevent ureteral injury during ex vivo endourologic manipulations: minimal handling of the ureter, a minimum influx of irrigant fluid to prevent the potential for pyelovenous and pyelolymphatic backflow, adoption of small instruments, and placement of a double-J ureteral stent . Stone recurrence in grafts is a potential long-term concern. Of note, none of the grafts undergoing stone surgery showed evidence of stone recurrence at the follow-up examination. Taken together, data synthesized in the present review support the role predonation and bench stone surgery in the case of urolithiasis involving renal grafts from living donors and emphasize the feasibility to extend the pool of living donors to subjects with stone bearing kidneys. However, potential limits of available literature must be acknowledged: available studies are few, of low methodological quality, and with short follow-up. They enroll a small number of patients, and often, populations and surgical 7 BioMed Research International techniques employed are different. Moreover, only a few studies reported complications according to the Clavien-Dindo Classification System. Therefore, available level of evidence is low and still inadequate to provide definitive recommendations. Further well-designed studies on wider series with long-term follow-up are strongly advocated to confirm these preliminary data. Conclusions Surgical treatment of urolithiasis in kidney grafts from living donors can be efficiently and safely addressed through both predonation and ex vivo bench procedures. These procedures are associated with a high success rate and low complication rate. No cases of stone recurrence in the graft have been reported. Data from larger studies with long-term follow-up are advocated. Data Availability No data were used to support this study.
Is off-pump technique a safer procedure for coronary revascularization? A propensity score analysis of 20 years of experience. OBJECTIVES We aim to describe our experience in coronary artery bypass grafting (CABG) with or without cardiopulmonary bypass by comparing intraoperative and postoperative outcomes. METHODS From January 1993 to June 2013, 3097 patients underwent consecutive emergency and scheduled CABG surgery. A total of 1770 patients underwent on-pump CABG (ONCABG) and 1327 off-pump CABG (OPCABG). A propensity score matching was performed to identify appropriate matched-pair patients; univariable and multivariable logistic regression analyses were performed to assess significant predictors of hospital and 30-day morbidity and mortality composite end-points. Morbidity composite end-point was defined as any renal, pulmonary, cardiovascular and neurological complication that occurred during hospital stay. We collected all-cause mortality data during the study period. RESULTS We identified 1004 patients in each group. There were no significant differences in thirty day mortality, 2.8 vs 3.8%, in OPCABG and ONCABG, respectively (P = 0.21). Cardiovascular, neurological, respiratory and renal complications were more frequent in the ONCABG group: 13.9 vs 8.7% (P < 0.001), 3.9 vs 2.2% (P = 0.03), 13.5 vs 7.5% (P < 0.001), 7.1 vs 5.3% (P = 0.095), respectively. The long-term all-cause mortality rate was 12.3 vs 12.9% in the OPCABG versus ONCABG group (P = 0.42), respectively. In both uni- and multivariable analysis preoperative renal failure, chronic obstructive pulmonary disease and ONCABG were independent predictors of mortality and morbidity composite end-points. CONCLUSIONS OPCABG is associated with less postoperative morbimortality and shorter hospital and intensive care unit length of stay. ONCABG resulted as an independent predictor of morbidity and mortality composite end-point. No statistically significant differences were observed in long-term all-cause mortality between groups.
import { Component, Input, OnInit, ElementRef } from '@angular/core'; import { SidebarsService } from '../../../kathra-sidebars'; import { K8sWsService, K8sEnvironment } from '../../../kathra-data'; import { KathraEnvComponent } from '../../../kathra-data'; import { ModalComponent, ModalsService } from '../../../kathra-modals'; @Component({ selector: 'kathra-environments', templateUrl: './environments.component.pug', styleUrls: ['./environments.component.scss'], providers: [ModalsService] }) export class EnvironmentsComponent implements OnInit { constructor( private sbService: SidebarsService ) {} ngOnInit() { this.sbService.closeAll(); } }
import java.util.*; import java.io.*; public class WriteCodeHere { public static void main(String[] args) throws IOException { st = new StringTokenizer(rd.readLine()); int n = Integer.parseInt(st.nextToken()); isHotel = new boolean[n+1]; st = new StringTokenizer(rd.readLine()); for(int i=1; i<=n; i++) isHotel[i] = (Integer.parseInt(st.nextToken())==0? false: true); G = new ArrayList[n+1]; for(int i=0; i<=n; i++) G[i] = new ArrayList<Integer>(); st = new StringTokenizer(rd.readLine()); int[] IN = new int[n+1]; for(int i=1; i<=n; i++){ int cur = Integer.parseInt(st.nextToken()); if(cur==0) continue; G[cur].add(i); IN[i] = cur; } for(int i=0; i<n; i++){ if(isHotel[i+1]){ start = i+1; break; } } boolean[] been = new boolean[n+1]; for(int i=1; i<=n; i++){ if(isHotel[i]) continue; if(!been[i] && !(IN[i]!=0 && G[IN[i]].size()==1)){ doJob(i, been); } } pw.println(size); int cur = start; if(size==1){ pw.println(cur); pw.flush(); return; } while(true){ pw.print(cur+" "); if(G[cur].size()==0) break; cur = G[cur].get(0); } pw.println(); pw.flush(); } static int doJob(int v, boolean[] been){ if(been[v]) return -1; // cycle been[v] = true; if(isHotel[v]) return 1; if(G[v].size()!=1) return -1; int ret = 1 + doJob(G[v].get(0), been); if(ret==0) return -1; if(ret > size){ size = ret; start = v; } return ret; } static boolean[] isHotel; static ArrayList<Integer> [] G; static int size = 1, start = -1; static BufferedReader rd = new BufferedReader(new InputStreamReader(System.in)); static PrintWriter pw = new PrintWriter(System.out); static StringTokenizer st; }
// Format a string to fit within a specified column width void a::format_fit(unsigned column_width, const string &input, vector<string> &output) { vector<string> forced; a::get_tokens('\n',input,forced); for (unsigned i=0; i<forced.size(); i++) { string current_line; vector<string> tokens; a::get_tokens(forced[i],tokens); for (unsigned j=0; j<tokens.size(); j++) { if (current_line.length()+tokens[j].length()<column_width) { current_line+=tokens[j]+' '; } else { if (tokens[j].length()+1>column_width) { unsigned this_count=column_width-current_line.length(); current_line+=tokens[j].substr(0,this_count); output.push_back(current_line); current_line=""; tokens[j]=tokens[j].substr(this_count,tokens[j].length()-this_count); j--; } else { output.push_back(current_line); current_line=tokens[j]+' '; } } } output.push_back(current_line); } return; }
def import_policy(self, fobj: BytesIO) -> Dict: filename = self._api.files.upload(fobj) return self._post('import', json={'file': filename})
/** * Created by HaPBoy on 5/18/16. */ public class BookNoteFragment extends Fragment { private static final String ARG_BOOK_ID = "book_id"; private int booId = 1; private TextView tvContent; private TextView tvDate; private ImageView ivIconDate; public static BookNoteFragment newInstance(int itemId) { BookNoteFragment fragment = new BookNoteFragment(); Bundle args = new Bundle(); args.putInt(ARG_BOOK_ID, itemId); fragment.setArguments(args); return fragment; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments() != null) { booId = getArguments().getInt(ARG_BOOK_ID); } } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View contentPanel = inflater.inflate(c.zju.jianshu.R.layout.fragment_book_note, container, false); tvContent = (TextView) contentPanel.findViewById(c.zju.jianshu.R.id.tv_content); tvDate = (TextView) contentPanel.findViewById(c.zju.jianshu.R.id.tv_date); ivIconDate = (ImageView) contentPanel.findViewById(c.zju.jianshu.R.id.iv_icon_date); // Edit Button ImageView ivEdit = (ImageView) contentPanel.findViewById(c.zju.jianshu.R.id.iv_edit); ivEdit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(getContext(), BookNoteEditActivity.class); intent.putExtra("id", booId); startActivity(intent); } }); return contentPanel; } public void loadData() { // 图书数据 Book book = DataSupport.find(Book.class, booId); String note = book.getNote(); String note_date = book.getNote_date(); if (note.isEmpty()) { note = "\n你还未对这本书有任何笔记,右上角点击添加。\n"; } tvContent.setText(note); if (note_date.isEmpty()) { ivIconDate.setAlpha(0f); tvContent.setGravity(Gravity.CENTER); } else { ivIconDate.setAlpha(1f); tvContent.setGravity(Gravity.NO_GRAVITY); } tvDate.setText(note_date); } @Override public void onResume() { super.onResume(); loadData(); } }
// ===================================================================================================================== // Adds GPU memory references to the per-queue global list which gets added to the patch/alloc list at submit time. Result Queue::AddGpuMemoryReferences( uint32 gpuMemRefCount, const GpuMemoryRef* pGpuMemoryRefs) { Result result = Result::Success; RWLockAuto<RWLock::ReadWrite> lock(&m_memListLock); for (uint32 idx = 0; idx < gpuMemRefCount; ++idx) { bool found = false; auto listIterator = m_memList.Begin(); while (listIterator.Get() != nullptr) { IGpuMemory* pMem = (*listIterator.Get()); if (pGpuMemoryRefs[idx].pGpuMemory == pMem) { found = true; break; } listIterator.Next(); } if (found == false) { m_memList.PushFront(pGpuMemoryRefs[idx].pGpuMemory); m_memListDirty = true; } } return result; }
A new carboxylesterase from Brevibacterium linens IFO 12171 responsible for the conversion of 1,4-butanediol diacrylate to 4-hydroxybutyl acrylate: purification, characterization, gene cloning, and gene expression in Escherichia coli. A carboxylesterase that is responsible for conversion of 1,4-butanediol diacrylate (BDA) to 4-hydroxybutyl acrylate (4HBA) was found in Brevibacterium lines IFO 12171, and purified to homogeneity. The purified enzyme was active toward a variety of diesters of ethylene glycol, 1,4-butanediol, and 1,6-hexanediol. The K(m) and kcat of the enzyme for BDA were 3.04 mM and 203,000 s-1, respectively. The reaction with the purified enzyme gave 98 mM 4HBA from 100 mM BDA for 60 min. The enzyme gene was cloned from the chromosomal DNA of the bacterium. The open reading frame encoding the enzyme was 1176 bp long, corresponding to a protein of 393 amino acid residues (molecular mass = 42,569 Da). The deduced amino acid sequence contained the tetra peptide motif sequence, STTK, and the serine residue was confirmed to be the catalytic center of BDA esterase by site-directed mutagenesis for several amino acid residues. The gene was expressed in Escherichia coli under the control of the lac promoter, and the gene product (a fusion protein with 6 amino acid residues from beta-galactosidase) showed the same catalytic properties as the enzyme from the parent strain.
Household Load forecasting using Deep Learning neural networks Advancements in different types of electrical meters and computing technologies aiding the data collection and sensing of various parameters of the electrical power system has been made possible with the availability of vast amount of electrical data. With the help of such technology and data, statistical prediction of load can be made smarter and more accurate. This can help stop excessive electricity production. With the help of deep learning techniques such as a long-short-term neural network (LSTM), it is possible to build time-series models that map non-linear parameters that can be used for precise memory sequences. An increase in recognition is witnessed in the field of forecasting with a short-term demand. In the field of power system control, it is now considered important. When proper pre-data is available, precision results can be high. Here, we are employing long short term neural network to forecast the load of a sample household. Introduction For effective load forecasting of a concise region, previous data is necessary to understand the historical pattern. This estimation is done by employing time series, longitudinal data, or cross-sectional methods. To employ methods that require prior information to be handled, we use neural networks that can use historical data as a source for formulating better algorithms. One such network is a recurrent neural network (RNN). RNNs can remember the past data which can be used to make a decision or an arbitration by analysing the previously given information. Electrical load demand's prediction of a region that can vary from a few hours to few weeks is referred to as short term forecasting. In the past, there has been very few prediction models built for electrical load forecasting. Most of the load forecasting has been built to predict a short-term output ranging around 2-3 week using Neurofuzzy logic, feed forward neural networks and basic support vector machines. An old methodology was also produced of algebraic modelling for comprehensive forecasting based on regression investigation that implemented a essential survey of the regular regression models, original algorithms, and results of combined classes is exponentially polynomial regression models (Mahendran, 2019; Aroulanandam, V. V., 2019). A few models using the ARMA and hybrid neural models have been employed. For long time few models using the ARMA, hybrid neural models and fuzzy logic models have been employed. However, majority of the mentioned works employ a year on year resolution of Maximum energy demand (MED) or Total Energy Utilization (TEU) for prediction of load ranging up to a decade. Ascribed to the lack of observations, these estimations are insufficient for informed devising, planning and investing for the utility companies. Genetic algorithm (GA), a heuristic search and optimization technique imitates the procedure of calculation with the purpose to minimize or maximize some function. Nevertheless, majority of the mentioned works employ a yearly resolution of Maximum energy demand (MED) or Total Energy Utilization (TEU) for prediction of load ranging up to a decade. Figure 1: A Recurrent Neural Network A scribed to the lack of observations. These estimations are insufficient for informed devising, planning and investing for the utility companies. Calculation of minimization or maximization of some objective function can be used to find suitable number of lags (Kanaga, 2015;Shankar, 2020) for time series model. Contrariwise, medium and short-term forecasting was not effectively calculated although their basic inputs for the power system scheduling and funds distribution . In this paper a long short-term memory neural network model is implemented for forecasting power demand of a household for a week. To train this model, real time power statistics are provided by the archives of UC Irvine. The forecasts have a daily rate which makes them highly advantageous for the use by the metering companies/consumers. For the forthcoming weeks, the maximum and daily load demand's meticulous and precise reports forecasts can also be processed on monthly basis. Frequently used Recurrent Neural Networks (RNNs) as shown in the figure 1 performs time series predictions (Hyndman, 2010;Sekaran, 2020)). However, it leads to a back propagation issue that leads to the slow elimination of the gradient descent. To build dependencies between training samples that are long term and surmount this issue, RNN-LSTM is applied which extensively improves the fidelity of the defined model (Ranjeeth, 2019). The prototype produced is calculated and reported to be reasonably exact with an overall Mean Absolute Percentage Error (MAPE) of approximately 110. A forecast of such time interval(a week) requires offline training weekly reason why the mentioned training time is commendatory in the given situation. Although an arduous and a taxing process for a low-end machine, it is gratifying. Recurrent Neural Network The past is memorized by the recurrent neural network and its judgments are inspired by what it has experienced and learnt from the earlier period from previous inputs. Basic F.F.N. "memorize" things too, but they memorize things they learnt during training. Remembering elements iterated from previous inputs while generating outputs is what the RNN network does. Every kind of neural network has its way of updating data. RNNs usually take a single or many input vectors which leads to the output(in the form of vectors).The factor that affects the output is not only the weights, because additionally a "hidden" state vector is formed that is formed based on the prior input(s) or output(s). So, the same input could generate a different output put through the previous inputs in the sequence. The figure below depicts an RNN network (Sampath Kumar, 2020; Latchoumi, 2017). Here ht is the current state, ht-1 is the previous state and xt is the input state. Formula for applying activation function - Here, whh is the weight at recurrent neuron and wxhis weight at input neuron Formula for calculating the output ___________________________________________________________________________________ Here, yt is the output why is the weight at output layer. Long Short-Term Neural Network In a vanilla Recurrent Neural Network, one input layer is enough to pass through the activation layer. In fact, even the hidden layer can be passed through it if a tanh function is used. Application of long short term memory networks enhances onto this and helps add a cell state to the model and gates. This allows an automatic and fundamental solution to a problem of saving or resetting context, across the large flowing data and that does not depend on the field of such framework resets. Long short-term memory systemsusually just called "LSTMs" are trained for long term conditional relationships are a type of extraordinary recurrent neural networks. Their refining was studied and later applied in various fields. Their applications exceed the field of usual convolutional neural networks due to their architectures. LSTM networks were made to deal with problems lingering in fields where long-term dependencies are needed to be dealt with. Collection of data for long periods of time is what LSTM networks can easily do. Every repetitive neural network is a repetitive chain of individual smaller networks or simply modules. Also, this repeating feature might start from a fundamental element/structure, just like a single activation layer. Each line conveys a whole vector, from the yield from one input node to the further respective nodes. The yellow envelopes are learned neural network layers, while the pinkish circles represent pointwise tasks, like vector summation (Vujošević, 1987). Lines merging indicate connection, while a line forking indicates its substance being duplicated and which goes to various areas. The primary phase in LSTM is to decide what data is going to bed is carding from the cell state (Tarassov, 2019). A layer called the "sigmoid layer" does this task for us which are also called as "forget gate layer". It looks at ht−1 and xt that proceeds to make the decision to select a number/float somewhere in the range of zero and one. Selecting any number from the cell state Ct−1,a '1' expresses the decision to "totally keep this" while a '0' expresses "totally dispose this." The cell state may incorporate the orientation of the present subject, with the goal that the right data can be utilized. When searching for new subject, one has to overlook the older one. The subsequent phase is to opt what fresh data will be hoarded in the cell position. This has two sections. Initially, a sigmoid layer called the "input gate layer" chooses what data could be reset/saved. Consequently, new candidate data is developed in the form of a vector using a tanһ layer that will be called -Ćt, that could be added to the state (Singh, 2020). To move forward, we will join these two to make an update to the memory. The model that we consider, an addition would be essential of the orientation of the new subject to the cell state, so that the ignored element can be replaced. Now we replace the old cell state, Ct−1, into the new cell state Ct. the past advances previously chose what to do. We increase the previous state by ft. At that point we include it * Ćt and ignore the old state. The new candidate values, considered by measuring the amount have to choose to refresh each state value. On account of the model, this is the place one would really drop the data about the old subject's orientation and include the new data, as one has to choose in the past advances. Ct =ft*Ct -1+it*Ćt (7) ot= σ The target must at output what we are going to get as output (ot) the harvest will be found on our cell state, in a filtered form. Initially, the running of a sigmoid layer which chooses what segment of the cell state we're going to yield. At that point, now place the cell state through tanh (to push the values to be somewhere in the middle of of −1 and 1) and increase it by the yield of the sigmoid gate, so can yield the parts wherever required. For the model, since it just observed a subject, it should yield data applicable to a desired output, if that is what is coming straightaway. Model Building Technically, this surrounding of the issue is referred to as a multi-step time arrangement determining issue, given the numerous figure steps. A model that utilizes various information factors might be alluded to as a multi-component multi-step time arrangement anticipating prototype. The building of such type of aprototype could be useful inside the domesticated unit in arranging consumptions. It may likewise become useful on the source unit for arranging power interest for a domesticated unit. This encircling of the dataset additionally proposes that it is helpful to compress the per-sixty second perceptions based on intensity utilization into the everyday consumptions. This is not required, yet bodes well, as we want information on total load for each day. An estimation of this sort will be contained of 6-7 qualities, one for every 24 hours of the 7 days ahead. For assessing time phases independently, regular multi stage prediction needs to take place. It is useful because: it remarks over expertise at a forwarded time (for example +1day versus + 3days). For differentiating such prototypes that are dependent on their aptitudes at various newer times (for example prototypes working well +1day versus the same working well at days+5). Kilowatts is the unit of the complete force that is helpful to utilise an error measurement unit that was additionally in similar units. Root Mean Squared Error and Mean Absolute Error (RMSE&MAE) are used here, even though RMSE's utilization is high and is embraced right now. Dissimilar to mean absolute error, root mean square error is more rebuffing of figure mistakes. The efficiency measurement unit for this issue will be the RMS error for each forwarded time from the first to seventh day. As an alternate way, it might become helpful for outlining the presentation of a model utilizing a grade to associate in model choice. A reasonable grade that can help utilize can have values of RMSE over completely forecasting days. Also, the utilization the initial 36 months of information for preparing prediction prototypes and the final year required to assess it is done. Weekly division of information in each dataset is practiced where the first day being Sunday and last being Saturday. The force utilization for the week ahead can be anticipated making this a promising and a helpful way for utilizing the picked encircling of the prototype. Additionally, useful with demonstrating, it is where such prototypes are utilized to foresee a day (for example Monday) otherwise with the entire arrangement. The test classifier dataset would be worked in reverse. The first and last 12 months of the information is from Dec 2006 to Nov 2010 from Sceux, France (Georges, 2016). The main Monday for 2010 was January 2nd. The information finishes in 2nd week of November of 2010 and the nearest last Monday in the data is November 22nd. This gives 11.5months of test data (Goldberg, 1987). This is the place our prototype is planned to make a 7-dayprediction; at that point, real information for those 7 days is caused accessible for the prototype which makes it utilizable for assessment on the ensuing week. This is sensible as the prototype might be helpful and become useful for the prototypes permitting to utilize the most qualifiable accessible information. By working with neural systems, and all things considered, they are commonly delayed preparing however quick to assess. This implies the favoured use of these prototypes is to manufacture these for one time on authentic information also to utilize these for conjecturing walk-forward validation's individual progression. These prototypes are static (for example not refreshed) when their assessment is done. These are distinctive against different prototypes that are quicker to prepare re-fitting or refreshing of a prototype after each progression of a stroll forward approval as new information is made accessible. After preparing the dataset by dividing it into train set and test-set, the train set of the dataset is fed to the developed LSTM module and thus, train the neural network. Now, for evaluating the input, the code is written in a manner that the input is loaded as a week's data, two, three or more in the form of number of days in that week. The input graphical representation is show as given below: Line Plot of RMSE per Day for Univariate LSTM with Vector Output has been shown in the figure below -The specific outputs may deviate given the stochastic nature of the contrivance (algorithm). We have tried running the example 7 times. The graphical input shows how the data was consumed by the household and its variations in different areas of the graph show the seasonal consumption change. This was employed using LSTM and the output was produced for the next 7 days of a given date. Conclusion We employed LSTM as an example to show how long-term data can be handled by a neural network which the fast paced RNN network could not. The output, though only shows the prediction of the next 7 days can be very useful to the consumers to handle their electricity bills, lower their consumption and plan the usage of their electrical equipment in the future accordingly. The users will not only be able to predict the output of their future consumption, but will also be able to analyse the areas where they will need to alter their routine in order to get a safer, more efficient utilisation of their machinery/electrical appliances. If temperature, sag, weather conditions were also noted in a similar manner as the load is noted from the system, and for a longer duration than just 4 years; the accuracy of the output would be possible to be increased to an applicable limit. Load forecasting of substations can also be possible if proper data is available. Data handling with a better accuracy and precision with lesser time durations in power stations needs to be practiced habitually and ethically for the application of automation using LSTMs and CNNs in the field of power system analysis, operation and control. Most of the wastage of power is due to the mishandling and mismanagement of electrical loads. Even though, the household loads aren't as big a problem as the industrial wastage is, if every household was able to analyse and find out how they could reduce the consumption of electricity and monitor how their future consumption could be changed, the Earth would be able to preserve a lot more of its non-conventional sources of energy allowing a greener, less polluted environment with a healthier place to be a part of.
Fertility 2022 Rising to global challenges 5–8th January 2022 SRF.1 Metabolomics to identify pregnancies at risk of preeclampsia Daniel McKeating, Tu’uhevaha Kaitu’u-Lino, Stephen Tong, Susan Walker, Teresa MacDonald, Anthony Perkins Cambridge University Department of Physiology, Development, and Neuroscience, UK; Mercy Perinatal, Research Department, Mercy Hospital for Women, VIC, Australia; School of Pharmacy and Medical Sciences, Griffith University, Gold Coast, QLD, Australia
/** * A table model to show MSD values across wells. * * @author Paola */ public class MsdWellTableModel extends AbstractTableModel { private Object[][] data; private final String[] columnNames = {"well", "time-lag", "MSD"}; /** * Constructor * * @param singleCellConditionDataHolder: the results holder from where to * get the track information */ public MsdWellTableModel(SingleCellConditionDataHolder singleCellConditionDataHolder) { initTable(singleCellConditionDataHolder); } @Override public int getRowCount() { return data.length; } @Override public int getColumnCount() { return columnNames.length; } @Override public Object getValueAt(int rowIndex, int columnIndex) { return data[rowIndex][columnIndex]; } @Override public String getColumnName(int col) { return columnNames[col]; } /** * Define the structure for the table. */ private void initTable(SingleCellConditionDataHolder singleCellConditionDataHolder) { int dimension = 0; dimension = singleCellConditionDataHolder.getSingleCellWellDataHolders().stream().map((_item) -> singleCellConditionDataHolder.getMsdArray().length).reduce(dimension, Integer::sum); // 'dimension' rows and 3 columns data = new Object[dimension][3]; int counter = 0; for (SingleCellWellDataHolder singleCellWellDataHolder : singleCellConditionDataHolder.getSingleCellWellDataHolders()) { double[][] temp = singleCellWellDataHolder.getMsdArray(); for (int row = 0; row < temp.length; row++) { data[counter][0] = singleCellWellDataHolder.getWell().toString(); data[counter][1] = temp[row][0]; data[counter][2] = temp[row][1]; counter++; } } } }
/** * The main purpose of this class is to bind the * {@link #bindCommandReader(CommandReader, WritableByteChannel) command reader} reading the commands from * {@link CommandReader}, serializing them and writing the stream to the * {@link WritableByteChannel sub-process}. It binds the * {@link #bindEventHandler(EventHandler, CountdownCloseable, ReadableByteChannel) event handler} deserializing * a received event and sends the event object to the {@link EventHandler event handler}. */ final class LegacyForkChannel extends ForkChannel { LegacyForkChannel( @Nonnull ForkNodeArguments arguments ) { super( arguments ); } @Override public void connectToClient() { } @Override public String getForkNodeConnectionString() { return "pipe://" + getArguments().getForkChannelId(); } @Override public int getCountdownCloseablePermits() { return 2; } @Override public CloseableDaemonThread bindCommandReader( @Nonnull CommandReader commands, WritableByteChannel stdIn ) { return new StreamFeeder( "std-in-fork-" + getArguments().getForkChannelId(), stdIn, commands, getArguments().getConsoleLogger() ); } @Override public CloseableDaemonThread bindEventHandler( @Nonnull EventHandler<Event> eventHandler, @Nonnull CountdownCloseable countdownCloseable, ReadableByteChannel stdOut ) { return new EventConsumerThread( "fork-" + getArguments().getForkChannelId() + "-event-thread", stdOut, eventHandler, countdownCloseable, getArguments() ); } @Override public void close() { } }
export * from './src/ProgressBar'; export { default as ProgressBar } from './src/ProgressBar';
<filename>quicktest.py<gh_stars>10-100 """ Source: http://datadesk.latimes.com/posts/2012/06/test-your-django-app-with-travisci/ Slightly modified by <NAME>. """ import os import argparse from django import setup from django.conf import settings from django.test.runner import DiscoverRunner class QuickDjangoTest(object): """ A quick way to run the Django test suite without a fully-configured project. Example usage: >>> QuickDjangoTest('app1', 'app2') Based on a script published by <NAME> at: http://stackoverflow.com/questions/3841725/how-to-launch-tests-for-django-reusable-app """ DIRNAME = os.path.dirname(__file__) INSTALLED_APPS = ( "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", ) WEBMASTER_VERIFICATION = {} def __init__(self, options, *args, **kwargs): self.apps = options.apps self.multicode = options.multicode self._tests() def _tests(self): """ Fire up the Django test suite developed for version 1.2 """ settings.configure( DEBUG=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": os.path.join(self.DIRNAME, "database.db"), "USER": "", "PASSWORD": "", "HOST": "", "PORT": "", } }, INSTALLED_APPS=self.INSTALLED_APPS + tuple(self.apps), WEBMASTER_VERIFICATION=self._get_wv_config(), ROOT_URLCONF="test_project.urls", TEMPLATES=[{ "BACKEND": "django.template.backends.django.DjangoTemplates", "DIRS": os.path.join(self.DIRNAME, "test_project", "templates",), "OPTIONS": { "context_processors": (), "loaders": [ ( "django.template.loaders.cached.Loader", [ "django.template.loaders.app_directories.Loader", ], ), ], }, }], MIDDLEWARE=[], ) # Django 1.8 setup() DiscoverRunner().run_tests(self.apps, verbosity=1) def _get_wv_config(self, key="default"): if self.multicode: conf = { "bing": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", "google": ("ffffffffffffffff", "aaaaaaaaaaaaaaaa",), "majestic": ( "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", ), "yandex": ("f0f0f0f0f0f0f0f0", "1919191919191919",), "alexa": ( "<KEY>", "12345abcdef1234567890ABCDEF", ), } else: conf = { "bing": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", "google": "ffffffffffffffff", "majestic": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", "yandex": "f0f0f0f0f0f0f0f0", "alexa": "<KEY>", } return conf if __name__ == "__main__": """ What do when the user hits this file from the shell. Example usage: $ python quicktest.py app1 app2 """ parser = argparse.ArgumentParser( usage="[args]", description="Run Django tests on the provided applications." ) parser.add_argument("apps", nargs="+", type=str) parser.add_argument( "--multicode", action="store_true", help="run the multicode tests" ) options = parser.parse_args() QuickDjangoTest(options)
On this week's Orlando City Coach's Show with Adrian Heath, the Lions' boss discusses Sunday's victory over Sporting Kansas City, updates on the recovery of injured players, and previews this coming weekend's game against the Chicago Fire. Winning at Home "It was a bit of payback for us because I think they (the fans) have been trying to get us over the line the last few games so we actually gave them something to cheer about at the weekend which was nice." "We spoke about starting well. When you're on the run we've been on where it's not been going as well as you would've liked, there's a lot of apprehension about and even the supporters are a bit nervous, the players are as well. I just sensed that if we could start really, really well and put them on the back foot and get them out of their comfort zone and maybe get a goal, I thought it would be the key to the game. And that's how it turned out." Brek Shea "Brek coming on obviously changed everything for the crowd. He got the crowd going and he's a very important player for us on and off the field. He came on at just the right time to give everybody a lift." "People don't realize how big he is. How powerful and athletic he is. He's six-four, he's incredibly quick, just a great athlete. And all of the sudden, when their fullback goes ‘Here's a guy who's quicker than me, faster than me, stronger than me," it just changes the dynamics a little bit." Bryan Rochez "Bryan Rochez gave us a huge lift." "It's been a frustrating year for Bryan Rochez. People haven't seen much of him. I thought we saw a little glimpse of a little bit more of him. He's upped his training levels, he's got his weight back under control, and I thought he gave us a little boost and I think it'll be interesting now to see if we can get more out of Bryan between now and the end of the season." "We now have an option. Bryan has shown us that he's fit enough to come on and have an influence on the game. That hasn't been the case. Bryan's really had a frustrating season with us. First he had an injury, then he didn't get fit, then he ended up losing his passport down in New Zealand at the Under-20 World Cup and he couldn't leave the island for six weeks." "I think in the next couple of weeks he'll get more time and hopefully get more goals." Cyle Larin "For the first time on Sunday, I thought Cyle looked really tired. We knew it would come at some stage but I thought that the week had caught up with him." "He's always got by on just being bigger and stronger than people he played with at college. And now it's a lot more physical for him. Mentally he's taken so much on he's mentally and physically tired. We've given him a break this week. He won't be in training until Thursday. Recharging the batteries and getting the life back in him." "I want him to get that goal because I think it's important he ends up being the top scoring rookie of the league. It's something we have to help him with because I think he's deserved that record." Sporting Kansas City Game "We knew they were going to press so their 4-3-3 becomes quickly a 4-4-2 when they push one of their midfield guys on. The first ten, fifteen minutes we got Lewis Neal and Adrian Winter into holes on either side of their midfield so we nearly had a box in midfield which is something we were working on. At times it worked well. At times our spacing on the field wasn't as I would've liked it. But it does cause that system a problem. Their deep lying midfield player didn't know whether to go to Luke (Boden) tight or go to the other hole to Adrian Winter. It was a problem for them." "I think them scoring the goal when they did actually helped us because then they had a better belief that they could go on and win it so they started to push men forward a little bit easier and a little earlier. I think that's when the game opened up and I think that's when we had the breakaway for Brek and then later on we had another breakaway." Importance of Three Points "It was a game where we knew we had to take the three points. As much as you put a brave face on it, had we not got a result it would've been ridiculously difficult for us to make the playoffs but we've given ourselves an opportunity and if we can pick a result up on the next two on the road, if we can go and get a result somewhere, and hopefully Montreal don't take maximum points which I don't think they will, we have a chance." Conor Donovan "Conor's had his operation and everything went well. He obviously had an ACL and he had some meniscus problems as well. He had to wait a little bit longer for his operation but he's up now and he's started his rehabilitation." Harrison Heath "Harrison's been training the last week so he's got this week to go and hopefully by then he'll be available for selection." Darwin Ceren "He's been training with the rest of the group today running in straight lines. We don't want to open him up too much at this moment in time. We're hopeful for the weekend." Kaká "Ricky's questionable but day-to-day." Corey Ashe "Corey's got a slight knock. He trained this morning. We're hopeful that if he has no repercussions overnight then he'll join in and maybe be available for the weekend." Seb Hines "Seb's back. He's been training so he'll be back for the weekend. He'll be available for selection. His knee's settled down." Kevin Molino "We've given Kevin a few days off, he's gone back home, and then he starts the final bit for himself. So Kevin's running now on the treadmill and the next two or three months are going to be huge for him. We need to get him back fit because we've certainly missed his creativity in the final third this year. He's going to be back, we think, for the start of next year." "He's been in the gym doing some weights which is incredible that we've managed to get him in the gym. He doesn't mind being on the training pitch working with the football but pumping iron in the gym is not Kevin's cup of tea." Injuries "We've had too many. Whether it's overtraining or undertraining, there are so many variables. The ACLs and MCLs, there's nothing you can do about them, they're going to happen. But the soft tissue injuries are something we're going to look at to see if there's some correlation between certain sessions over the year. Has it been an overload of games? Or has the training been too hard? Or not enough? So we'll go over it after the year." Luke Boden "Bodz's biggest strength is when he's in possession of the ball and going forward. That's not a secret. In terms of marking people in the box, it's something that he has improved on, got to get better. But I thought he was very, very good on Sunday. He was one of our better players. It's stuff that he's been working on because he's only been playing that position since he's been here in America." "He's going to be with us for quite some time." Winning without Kaká "The most important thing was to win. This is no disrespect to Ricky or anybody, the club is more important than any individual. We have to realize that we're all here. This club is going to be here long after we've all gone. Whether it be me, Phil Rawlins, or all the people that've been here from the beginning. The team will always come first. The team is always more important than individuals. So it was important for us to win full stop. I know people were asking ‘Can we win without Kaká?" We've won in the past without him and we'll win in the future without him. We want him in the team. We want him fit and well because over the next two or three years he's going to be integral part of what we do. Yeah we need him fit. Yeah we need him back. But we won and that's the most important thing." Cyle Larin Getting Back After Mistake "There are certain aspects that he's got to get better at. He does dwell on it too much when he, certainly that five seconds when he's made a mistake or he's done something, he does watch. But he's learning. He's getting better. He's still in the formative years of his career but he can be pleased with the year he's had. He's the least of our worries at this moment in time. Cyle Larin." Added Pressure Due to History with SKC "No added pressure, just the fact that we needed a result." International Players in College Soccer "It's a great opportunity for those like Dom Dwyer. Dom came through this route but that's not really doing an awful lot for American soccer long-term." Chicago Fire "They played all four (David Accam, Kennedy Igboananike, Patrick Nyarko, Gilberto) against us here. Accam played wide left and they played Igboananike through the middle with Gilberto and then played Nyarko on the right. So that's probably the strong part of their team. That's the strength on the counter attack. They're really, really quick. You saw their game against the Red Bulls last week. They were 2-0 up within 20 minutes and only the penalty that came for New York changed the game. Their attack is their strong point. Apparently, Igboananike is nursing an injury and Gilberto, they're not sure if he's going to be fit, so now you're worried whether Accam plays through the middle or plays wide left. Whatever they do you know it's a game they're going to be prepared for because I think it's the last chance for them if they have any hope of making the playoffs."
Designed zinc finger protein interacting with the HIV‐1 integrase recognition sequence at 2‐LTR‐circle junctions Integration of HIV‐1 cDNA into the host genome is a crucial step for viral propagation. Two nucleotides, cytosine and adenine (CA), conserved at the 3′ end of the viral cDNA genome, are cleaved by the viral integrase (IN) enzyme. As IN plays a crucial role in the early stages of the HIV‐1 life cycle, substrate blockage of IN is an attractive strategy for therapeutic interference. In this study, we used the 2‐LTR‐circle junctions of HIV‐1 DNA as a model to design zinc finger protein (ZFP) targeting at the end terminal portion of HIV‐1 LTR. A six‐contiguous ZFP, namely 2LTRZFP was designed using zinc finger tools. The designed motif was expressed and purified from E. coli to determine its binding properties. Surface plasmon resonance (SPR) was used to determine the binding affinity of 2LTRZFP to its target DNA. The level of dissociation constant (Kd) was 12.0 nM. The competitive SPR confirmed that 2LTRZFP specifically interacted with its target DNA. The qualitative binding activity was subsequently determined by EMSA and demonstrated the aforementioned correlation. In addition, molecular modeling and binding energy analyses were carried out to provide structural insight into the binding of 2LTRZFP to the specific and nonspecific DNA target. It is suggested that hydrogen‐bonding interactions play a key role in the DNA recognition mechanisms of the designed ZFP. Our study suggested an alternative HIV therapeutic strategy using ZFP interference of the HIV integration process.
/** * Similar to {@link #startBackupThreadAndGetLooper()} but with a custom exception handler and * returning the thread instead of the looper associated with it. * * @param exceptionHandler Uncaught exception handler for backup thread. * @return The backup thread. * @see #startBackupThreadAndGetLooper() */ public static HandlerThread startBackupThread(UncaughtExceptionHandler exceptionHandler) { HandlerThread backupThread = new HandlerThread("backup"); backupThread.setUncaughtExceptionHandler(exceptionHandler); backupThread.start(); return backupThread; }
<gh_stars>0 /** * @file Implementation of MessengerManager class. */ #include "messenger_manager.h" #include <loguru.hpp> #include <utility> namespace coordinator { MessengerManager::MessengerManager( std::shared_ptr<ParticipantManager> participants) : participants_(std::move(participants)) {} void MessengerManager::AddMessenger( const std::shared_ptr<Messenger>& messenger) { std::lock_guard<std::mutex> guard(mutex_); messengers_.insert(messenger); } void MessengerManager::DeleteMessenger( const std::shared_ptr<Messenger>& messenger) { std::lock_guard<std::mutex> guard(mutex_); messengers_.erase(messenger); } std::unordered_set<std::shared_ptr<Messenger>> MessengerManager::GetMessengers() { return messengers_; } bool MessengerManager::BroadcastMessage(MessageLog::Message *msg) { bool is_logged = false; for (auto& messenger : messengers_) { // only send message to connected participants. if (participants_->IsConnected(messenger->GetParticipant())) { messenger->SendMessage(*msg); LOG_F(INFO, "Sending message from Participant #%i to Participant #%i.", msg->participant_id, messenger->GetParticipant().id); // only log message once. // message will have timestamp of the first message sent. if (!is_logged) { messenger->LogMessage(msg); is_logged = true; } } } LOG_F(INFO, "Message from Participant #%i successfully broadcast.", msg->participant_id); return true; } } // namespace coordinator
def immutable(cls): return class_decorator_factory("immutable", "brief")(cls)
<reponame>Cezerin3/Admin-NX import express from "express" import helmet from "helmet" import responseTime from "response-time" import path from "path" import cookieParser from "cookie-parser" import winston from "winston" import settings from "../../../config/server" import robotsRendering from "./robotsRendering" import sitemapRendering from "./sitemapRendering" import redirects from "./redirects" import pageRendering from "./pageRendering" const app = express() const adminIndexPath = path.resolve("public/admin/index.html") const staticOptions = { maxAge: 1000 * 60 * 60 * 24 * 365, // One year } app.set("trust proxy", 1) app.use(helmet({ contentSecurityPolicy: false })) app.get("/images/:entity/:id/:size/:filename", (req, res, next) => { // A stub of image resizing (can be done with Nginx) const newUrl = `/images/${req.params.entity}/${req.params.id}/${req.params.filename}` req.url = newUrl next() }) app.use(express.static("public/content", staticOptions)) app.use("/assets", express.static("theme/assets", staticOptions)) app.use("/admin-assets", express.static("public/admin-assets", staticOptions)) app.use("/sw.js", express.static("theme/assets/sw.js")) app.use("/admin", (req, res) => { res.sendFile(adminIndexPath) }) app.get( /^.+\.(jpg|jpeg|gif|png|bmp|ico|webp|svg|css|js|zip|rar|flv|swf|xls)$/, (req, res) => { // Send 404 image res.sendFile(path.resolve("public/content/404.svg")) } ) app.get("/robots.txt", robotsRendering) app.get("/sitemap.xml", sitemapRendering) app.get("*", redirects) app.use(responseTime()) app.use(cookieParser(settings.cookieSecretKey)) app.get("*", pageRendering) const server = app.listen(settings.storeListenPort, () => { const serverAddress = server.address() winston.info(`Store running at http://localhost:${serverAddress.port}`) })