content
stringlengths
7
2.61M
<reponame>manojampalam/go-autorest package autorest // Copyright 2017 Microsoft Corporation // // 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. import ( "net/http" "testing" ) func TestNewSharedKeyAuthorizer(t *testing.T) { auth, err := NewSharedKeyAuthorizer("golangrocksonazure", "Y<PASSWORD>", SharedKey) if err != nil { t.Fatalf("create shared key authorizer: %v", err) } req, err := http.NewRequest(http.MethodGet, "https://golangrocksonazure.blob.core.windows.net/some/blob.dat", nil) if err != nil { t.Fatalf("create HTTP request: %v", err) } req.Header.Add(headerAcceptCharset, "UTF-8") req.Header.Add(headerContentType, "application/json") req.Header.Add(headerXMSDate, "Wed, 23 Sep 2015 16:40:05 GMT") req.Header.Add(headerContentLength, "0") req.Header.Add(headerXMSVersion, "2015-02-21") req.Header.Add(headerAccept, "application/json;odata=nometadata") req, err = Prepare(req, auth.WithAuthorization()) if err != nil { t.Fatalf("prepare HTTP request: %v", err) } const expected = "SharedKey golangrocksonazure:<KEY>+Fmj/i16W+lO0=" if auth := req.Header.Get(headerAuthorization); auth != expected { t.Fatalf("expected: %s, go %s", expected, auth) } } func TestNewSharedKeyAuthorizerWithRoot(t *testing.T) { auth, err := NewSharedKeyAuthorizer("golangrocksonazure", "YmFy", SharedKey) if err != nil { t.Fatalf("create shared key authorizer: %v", err) } req, err := http.NewRequest(http.MethodGet, "https://golangrocksonazure.blob.core.windows.net/?comp=properties&restype=service", nil) if err != nil { t.Fatalf("create HTTP request: %v", err) } req.Header.Add(headerAcceptCharset, "UTF-8") req.Header.Add(headerContentType, "application/json") req.Header.Add(headerXMSDate, "Tue, 10 Mar 2020 10:04:41 GMT") req.Header.Add(headerContentLength, "0") req.Header.Add(headerXMSVersion, "2018-11-09") req.Header.Add(headerAccept, "application/json;odata=nometadata") req, err = Prepare(req, auth.WithAuthorization()) if err != nil { t.Fatalf("prepare HTTP request: %v", err) } const expected = "SharedKey golangrocksonazure:BfdIC0K5OwkRbZjewqRXgjQJ2PBMZDoaBCCL3qhrEIs=" if auth := req.Header.Get(headerAuthorization); auth != expected { t.Fatalf("expected: %s, go %s", expected, auth) } } func TestNewSharedKeyAuthorizerWithoutRoot(t *testing.T) { auth, err := NewSharedKeyAuthorizer("golangrocksonazure", "YmFy", SharedKey) if err != nil { t.Fatalf("create shared key authorizer: %v", err) } req, err := http.NewRequest(http.MethodGet, "https://golangrocksonazure.blob.core.windows.net?comp=properties&restype=service", nil) if err != nil { t.Fatalf("create HTTP request: %v", err) } req.Header.Add(headerAcceptCharset, "UTF-8") req.Header.Add(headerContentType, "application/json") req.Header.Add(headerXMSDate, "Tue, 10 Mar 2020 10:04:41 GMT") req.Header.Add(headerContentLength, "0") req.Header.Add(headerXMSVersion, "2018-11-09") req.Header.Add(headerAccept, "application/json;odata=nometadata") req, err = Prepare(req, auth.WithAuthorization()) if err != nil { t.Fatalf("prepare HTTP request: %v", err) } const expected = "SharedKey golangrocksonazure:<KEY> if auth := req.Header.Get(headerAuthorization); auth != expected { t.Fatalf("expected: %s, go %s", expected, auth) } } func TestNewSharedKeyForTableAuthorizer(t *testing.T) { auth, err := NewSharedKeyAuthorizer("golangrocksonazure", "YmFy", SharedKeyForTable) if err != nil { t.Fatalf("create shared key authorizer: %v", err) } req, err := http.NewRequest(http.MethodGet, "https://golangrocksonazure.table.core.windows.net/tquery()", nil) if err != nil { t.Fatalf("create HTTP request: %v", err) } req.Header.Add(headerAcceptCharset, "UTF-8") req.Header.Add(headerContentType, "application/json") req.Header.Add(headerXMSDate, "Wed, 23 Sep 2015 16:40:05 GMT") req.Header.Add(headerContentLength, "0") req.Header.Add(headerXMSVersion, "2015-02-21") req.Header.Add(headerAccept, "application/json;odata=nometadata") req, err = Prepare(req, auth.WithAuthorization()) if err != nil { t.Fatalf("prepare HTTP request: %v", err) } const expected = "SharedKey golangrocksonazure:73oeIBA2dulLhOBdAlM3U0+DKIWS0UW6InBWCHpOY50=" if auth := req.Header.Get(headerAuthorization); auth != expected { t.Fatalf("expected: %s, go %s", expected, auth) } } func TestNewSharedKeyLiteAuthorizer(t *testing.T) { auth, err := NewSharedKeyAuthorizer("golangrocksonazure", "YmFy", SharedKeyLite) if err != nil { t.Fatalf("create shared key authorizer: %v", err) } req, err := http.NewRequest(http.MethodGet, "https://golangrocksonazure.file.core.windows.net/some/file.dat", nil) if err != nil { t.Fatalf("create HTTP request: %v", err) } req.Header.Add(headerAcceptCharset, "UTF-8") req.Header.Add(headerContentType, "application/json") req.Header.Add(headerXMSDate, "Wed, 23 Sep 2015 16:40:05 GMT") req.Header.Add(headerContentLength, "0") req.Header.Add(headerXMSVersion, "2015-02-21") req.Header.Add(headerAccept, "application/json;odata=nometadata") req, err = Prepare(req, auth.WithAuthorization()) if err != nil { t.Fatalf("prepare HTTP request: %v", err) } const expected = "SharedKeyLite golangrocksonazure:<KEY> if auth := req.Header.Get(headerAuthorization); auth != expected { t.Fatalf("expected: %s, go %s", expected, auth) } } func TestNewSharedKeyLiteForTableAuthorizer(t *testing.T) { auth, err := NewSharedKeyAuthorizer("golangrocksonazure", "YmFy", SharedKeyLiteForTable) if err != nil { t.Fatalf("create shared key authorizer: %v", err) } req, err := http.NewRequest(http.MethodGet, "https://golangrocksonazure.table.core.windows.net/tquery()", nil) if err != nil { t.Fatalf("create HTTP request: %v", err) } req.Header.Add(headerAcceptCharset, "UTF-8") req.Header.Add(headerContentType, "application/json") req.Header.Add(headerXMSDate, "Wed, 23 Sep 2015 16:40:05 GMT") req.Header.Add(headerContentLength, "0") req.Header.Add(headerXMSVersion, "2015-02-21") req.Header.Add(headerAccept, "application/json;odata=nometadata") req, err = Prepare(req, auth.WithAuthorization()) if err != nil { t.Fatalf("prepare HTTP request: %v", err) } const expected = "SharedKeyLite golangrocksonazure:<KEY> if auth := req.Header.Get(headerAuthorization); auth != expected { t.Fatalf("expected: %s, go %s", expected, auth) } }
TEWKSBURY, MASS. (WHDH) - A woman was carjacked while pumping gas at a Tewksbury gas station on Saturday, according to police. Surveillance video shows the woman struggling with that attacker before the he took off. The woman was taken to the hospital. The incident happened at the Mobil gas station on Andover Street. An employee inside the gas station said the woman came inside and asked to call 911. The employee said the woman was dragged a short distance, but before that she sprayed the suspect with gas. Police say they found the stolen car, a red Mazda, in Lowell, not long after the carjacking. Officials are still looking for the suspect. This is a developing story; stay with 7News for the latest updates.
Caesium bis(5-bromosalicylaldehyde thiosemicarbazonato-3O,N,S)ferrate(III): supramolecular arrangement of low-spin FeIII complex anions mediated by Cs+ cations. The synthesis and crystal structure determination (at 293K) of the title complex, Cs, are reported. The compound is composed of two dianionic O,N,S-tridentate 5-bromosalicylaldehyde thiosemicarbazonate(2-) ligands coordinated to an Fe(III) cation, displaying a distorted octahedral geometry. The ligands are orientated in two perpendicular planes, with the O- and S-donor atoms in cis positions and the N-donor atoms in trans positions. The complex displays intermolecular N-H...O and N-H...Br hydrogen bonds, creating R4 rings, which link the Fe(III) units in the a and b directions. The Fe(III) cation is in the low-spin state at 293K.
A novel method for measuring the ATP-related compounds in human erythrocytes. The ATP-related compounds in whole blood or red blood cells have been used to evaluate the energy status of erythrocytes and the degradation level of the phosphorylated compounds under various conditions, such as chronic renal failure, drug monitoring, cancer, exposure to environmental toxics, and organ preservation. The complete interpretation of the energetic homeostasis of erythrocytes is only performed using the compounds involved in the degradation pathway for adenine nucleotides alongside the uric acid value. For the first time, we report a liquid chromatographic method using a diode array detector that measures all of these compounds in a small human whole blood sample (125 L) within an acceptable time of 20 min. The stability was evaluated for all of the compounds and ranged from 96.3 to 105.1% versus the day zero values. The measurement had an adequate sensitivity for the ATP-related compounds (detection limits from 0.001 to 0.097 mol/L and quantification limits from 0.004 to 0.294 mol/L). This method is particularly useful for measuring inosine monophosphate, inosine, hypoxanthine, and uric acid. Moreover, this assay had acceptable linearity (r > 0.990), precision (coefficients of variation ranged from 0.1 to 2.0%), specificity (similar retention times and spectra in all samples) and recoveries (ranged from 89.2 to 104.9%). The newly developed method is invaluable for assessing the energetic homeostasis of red blood cells under diverse conditions, such as in vitro experiments and clinical settings.
<filename>lib/ome/files/PlaneRegion.h /* * #%L * OME-FILES C++ library for image IO. * Copyright © 2006 - 2015 Open Microscopy Environment: * - Massachusetts Institute of Technology * - National Institutes of Health * - University of Dundee * - Board of Regents of the University of Wisconsin-Madison * - Glencoe Software, Inc. * %% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. 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. * * 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 HOLDERS 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. * * The views and conclusions contained in the software and documentation are * those of the authors and should not be interpreted as representing official * policies, either expressed or implied, of any organization. * #L% */ #ifndef OME_FILES_PLANEREGION_H #define OME_FILES_PLANEREGION_H #include <ome/files/Types.h> #include <ome/xml/model/enums/PixelType.h> #ifdef _MSC_VER #pragma push_macro("min") #undef min #pragma push_macro("max") #undef max #endif namespace ome { namespace files { /** * A rectangular region. * * The region is specified by top-left (x,y) coordinates plus * width and height. */ struct PlaneRegion { /// The @c X coordinate of the upper-left corner of the region. dimension_size_type x; /// The @c Y coordinate of the upper-left corner of the region. dimension_size_type y; /// The width of the region. dimension_size_type w; /// The height of the region. dimension_size_type h; public: /** * Default construct. * * By default the region has zero width and height. */ PlaneRegion(): x(0), y(0), w(0), h(0) {} /** * Is the region valid? * * @returns @c true if the region has a nonzero width and * height, @c false otherwise. */ bool valid() const { return w && h; } /** * Construct from coordinates, width and height. * * @param x the @c X coordinate of the upper-left corner of the region. * @param y the @c Y coordinate of the upper-left corner of the region. * @param w the width of the region. * @param h the height of the region. */ PlaneRegion(dimension_size_type x, dimension_size_type y, dimension_size_type w, dimension_size_type h): x(x), y(y), w(w), h(h) {} /** * Get area. * * @returns the covered area. */ dimension_size_type area() const { return w * h; } }; /** * Intersect two regions. * * If the regions do not intersect, a default-constructed region * of zero size will be returned. * * @param a the first region. * @param b the second region. * @returns the intersection of the two regions. */ inline PlaneRegion operator&(const PlaneRegion& a, const PlaneRegion& b) { dimension_size_type l1 = a.x; dimension_size_type r1 = a.x + a.w; dimension_size_type l2 = b.x; dimension_size_type r2 = b.x + b.w; if (l1 > r2 || l2 > r1) return PlaneRegion(); dimension_size_type t1 = a.y; dimension_size_type b1 = a.y + a.h; dimension_size_type t2 = b.y; dimension_size_type b2 = b.y + b.h; if (t1 > b2 || t2 > b1) return PlaneRegion(); dimension_size_type il = std::max(l1, l2); dimension_size_type ir = std::min(r1, r2); dimension_size_type it = std::max(t1, t2); dimension_size_type ib = std::min(b1, b2); return PlaneRegion(il, it, ir-il, ib-it); } /** * Combine (union) two regions. * * If the regions do not abut about a common edge, a * default-constructed region of zero size will be returned. * * @param a the first region. * @param b the second region. * @returns the union of the two regions. */ inline PlaneRegion operator|(const PlaneRegion& a, const PlaneRegion& b) { dimension_size_type l1 = a.x; dimension_size_type r1 = a.x + a.w; dimension_size_type l2 = b.x; dimension_size_type r2 = b.x + b.w; dimension_size_type t1 = a.y; dimension_size_type b1 = a.y + a.h; dimension_size_type t2 = b.y; dimension_size_type b2 = b.y + b.h; if (l1 == l2 && r1 == r2 && (t1 == b2 || t2 == b1)) // union along top or bottom edges { dimension_size_type it = std::min(t1, t2); dimension_size_type ib = std::max(b1, b2); return PlaneRegion(l1, it, r1-l1, ib-it); } else if (t1 == t2 && b1 == b2 && (l1 == r2 || l2 == r1)) // union along left or right edges { dimension_size_type il = std::min(l1, l2); dimension_size_type ir = std::max(r1, r2); return PlaneRegion(il, t1, ir-il, b1-t1); } return PlaneRegion(); } /** * Output PlaneRegion to output stream. * * @param os the output stream. * @param region the PlaneRegion to output. * @returns the output stream. */ template<class charT, class traits> inline std::basic_ostream<charT,traits>& operator<< (std::basic_ostream<charT,traits>& os, const PlaneRegion& region) { return os << "x=" << region.x << " y=" << region.y << " w=" << region.w << " h=" << region.h; } } } #ifdef _MSC_VER #pragma pop_macro("min") #pragma pop_macro("max") #endif #endif // OME_FILES_PLANEREGION_H /* * Local Variables: * mode:C++ * End: */
THU0067Endothelial-to-Mesenchymal Transition in Cultured Human Dermal Microvascular Endothelial Cells: Effects of Endothelin-1 Background Endothelial/microvascular damage and myofibroblast activation are considered early events in the development of connective tissue diseases, such as systemic sclerosis (SSc). Recent studies showed that vascular endothelial cells may aquire matrix-producing myofibroblast features through the endothelial-to-mesenchymal transition (EndoMT) process. Objectives To investigate the possible direct effect of ET-1 in inducing the EndoMT in cultured human dermal microvascular endothelial cells (HMVECs). Methods HMVECs (Lonza Clonetic, Switzerland) were cultured in endothelial cell growth medium (EGM2-MV, Lonza Clonetic) and treated with or without ET-1 (100nM, EnzoLife Science, UK) for 6 days, according to recent studies. For the experiments, the cells were used between the second and fourth passages. Gene expression levels of -smooth muscle actin (-SMA) and fibroblast specific protein-1 (S100 calcium binding protein A4, S100A4), two markers of the myofibroblast phenotype, as well as plateled endothelial cell adhesion molecule (PECAM-1 or CD31), a marker of the endothelial phenotype, were evaluated by quantitative real time-polimerase chain reaction (qRT-PCR). Moreover, -SMA and CD31 protein expressions were evaluated by immunofluorescence (IF) using primary antibodies to human -SMA (dilution 1:50, Dako Cytomation, Denmark) and to human CD31 (dilution 1:200, CellSignaling Technology, Denver, USA). Results ET-1 induced the gene expression of -SMA and S100A4 without modulating the expression of CD31 in cultured HMVECs after 6 days of treatment, as detected by qRT-PCR. The IF analysis supported these results by showing that ET-1 induced the expression of -SMA but no changes in the expression of CD31 after 6 days of treatment. Results were obtained from three different experiments. Conclusions These preliminary observations show that ET-1 seems to induce in short term the expression of myofibroblast markers (-SMA and S100A4) in cultured dermal microvascular endothelial cells, supporting a possible direct involvement in the development of the EndoMT process. Longer term observations seem necessary to detect further changes in phenotype markers in treated endothelial cells (i.e. CD31, von Willebrand factor). References Wynn TA et al. Nat Med 2012;18:1028-40 Chaudhury V et al. J Cutan Pathol 2007;34:146-53 Zeisberg EM et al. Nat Med 2007;13:952-61 Kitao A et al. Am J Phatol 2009;175:616-26 Widyantoro B et al. Circulation 2010;121:2407-18 Soldano S et al Arthrit & Rheum 2012;64(Supplement):S640. Disclosure of Interest None Declared
// Package reflection uses reflection to provide dynamic functionalities. package reflection
LAS VEGAS — This is Carmelo Anthony’s “dream” — play in New York with LeBron James this season. That’s right. New York. Not Miami. Too bad it’s a long shot to happen. According to a friend of Anthony’s, Melo has held out faint hope Knicks president Phil Jackson can pull a miracle and clear out the necessary salary-cap space to get it done, but he is running out of time. Anthony’s decision could come in the next couple of days. It would require Jackson to ship out Amar’e Stoudemire and Andrea Bargnani’s expiring contracts, and for Anthony and James to take less than the max. Iman Shumpert might have to be dealt, and the rights to Jeremy Tyler renounced. One report said Jackson conceivably can move $40 million under the cap with a flurry of moves — as long as he doesn’t take back salary. “He really wants LeBron to come to New York,’’ the source said. “That’s his dream right now. Phil is trying to get it done.’’ The Knicks have talked to the 76ers regarding taking on undesirable expiring contracts, something Philadelphia may be amenable to as long as a pawn is added. The Sixers have considered taking on Stoudemire’s $23.4 million but want Shumpert in addition. Philadelphia has $30 million in cap space, but has talked to the Rockets about inheriting Jeremy Lin, and they can’t do both. There also has been a report of Jackson turning down a deal for Bargnani and Tim Hardaway Jr. Obviously there’s no point of doing such a deal unless the Knicks have a commitment from a prominent free agent such as James — or maybe even Pau Gasol. Jackson appears eager to clear room and not wait until 2015. The Zen Master hinted at that during the draft late last month. But it really does seem to be — to borrow Pat Riley’s phrase — “a pipe dream.’’ The Knicks’ payroll for 2014-15 declined by $3.7 million because of their trade with the Mavericks, in which the Knicks shed Tyson Chandler and Raymond Felton. But Jackson has a long way to go. “We have many handicaps with our salary cap,’’ Jackson said on draft night. “There’s always a possibility. I’m not going to rule ourselves out of anything with a chance to do something special.’’ Special likely meant James, who spurned the Knicks in 2010 free agency but may have an open mind this time. “He didn’t want no part of New York in 2010,’’ the source said. “But he loves Phil and the chance to play with Melo.’’ Ironically, Jackson is in Las Vegas with the Knicks’ summer-league team while James is here with his Nike basketball high-school camp. Reports are James is meeting with Heat president Pat Riley on Wednesday. Most people in the league feel James will wind up back in Miami reuniting the original Big Three with Chris Bosh and Dwyane Wade, not with Anthony. One NBA source said the hype surrounding a possible James return to Cleveland is emanating from the Cavaliers, who are trying to save face for their 2010 debacle. Jackson’s move to try to get under the salary cap further demonstrates Anthony’s preference is to make it work in New York, but he still has roster concerns for 2014-15. The Lakers, too, have looked into trying to fit both James and Anthony with their cap space but to no avail. They would have to dump Steve Nash’s contract. James could sign a two-year max deal with Miami with an opt-out after the first year, giving him a chance at New York in 2015 or in 2016, when the Knicks also could have space. The scenario in which Anthony could join Miami to form a new Big Three with Wade if Bosh accepted the max offer from Houston is tantalizing. But Anthony would rather do it in New York. Whether Anthony wants to stay in New York without James is an issue only he can resolve. “He hasn’t gotten a clue yet,” the source said. The Bulls, Lakers, Rockets, Mavericks and Knicks are awaiting answers. Knicks rookie coach Derek Fisher wouldn’t answer when asked whether he felt good about the situation. The Bulls would need a sign-and-trade to net Anthony, and an NBA source said Jackson probably would do it if he thought he would lose him to the Lakers for no compensation. Scottie Pippen, who had dinner with Anthony last week during his Chicago visit, said on SiriusXM NBA Radio: “I think we put our best foot forward and we pretty much wanted him to feel that we wanted him to be a part of our team and, you know, this is family here and we want him to be a part of it.”
Q: when is it safe to click through an SSL warning message? How does a user know if it's safe to click through scary browser warnings about SSL certificates? Ideally, a user should never need to click through these warning messages, but sometimes honest websites run by honest, but not clueful, people will have a broken certificate. A: SSL serves three purposes (I'll use a snail-mail analogy to illustrate): Keep the communication secret: prevent the mailman from reading your letters. Verify that the communication is unaltered: prevent the mailman from altering your letters. Verify the identity of the sender: prevent someone else from sending you letters under a false name. Note that points 1 and 2 are worthless unless 3 is intact: if someone else can impersonate the originator of a message, then encrypting it does nothing but prevent yet another attacker from hacking your already-compromised communication. If you click through an unverified or untrusted certificate, this is what you are risking - the communication will still be encrypted, but the server you're talking to may not be legit. That said, there are a few situations where it is relatively safe to click through the warning: When you're not sending or receiving any confidential data, such as passwords or credit card details; note that cookies containing session IDs etc. are also confidential, so you shouldn't do this when you plan to use anything that requires logging in. Also, consider that a bad certificate can be a sign of malicious activity, so you should be extra careful when this happens. When you can verify the identity of the server through other means: when the server is on the same local area network (behind the same router / firewall), and the server IP has been obtained through a trusted DNS or a local hosts file; when you can check the certificate's (SHA-1 or other) fingerprint through a different channel (e.g. logging into the server and checking it there): as seen from the client, it must match the known certificate as installed on the server. The connection could still be hijacked, but doing this from outside the network is only possible if the firewall / router is compromised (and when that happens, you have other things to worry about). TL;DR: Unless you know exactly what is going on, my advice is to not click through but rather properly resolve the issue. A: On a theoretical point of view, an HTTPS site with a warning on the certificate is no better, but no worse either, than a plain HTTP site. As long as you only browse, reading data but not sending anything, and not especially trusting what you read, then you can ignore the warning. However, it is quite rare that a reading-only site goes to the trouble of setting up SSL and a certificate. On a practical point of view, an HTTPS site with a warning on the certificate is worse than a plain HTTP site. Most plain HTTP connections go through without any attack because there are just too many of them, and so many are worthless for an attacker. On the other hand, if some attacker went to the trouble of impersonating an HTTPS server with a fake certificate, then this is a sign that your connection is being actively threatened. Therefore a browser warning on an HTTPS certificate means one of the two following things: the server administrator did not do his job properly; you are being actively attacked right now. So you have to be quite sure that proposition 1 is the right one, if you still want to bypass the warning. A relatively safe situation is when the only thing which gives the willies to your browser is that the server certificate expired not long ago (a few hours, maybe a few days): this just means that some sysadmin was overworked or on holiday, and missed the renewal date for his certificate. Most other cases are not safe: indeed, one can assume that even the most moronic sysadmin tried at least once browsing his own site, so if there is a "permanent" invalidity reason (e.g. the name in the certificate does not match the host name) then the sysadmin must have seen it. Hence the general advice: if there is a warning, then don't go there. Just for fun, a marvelous quote from some guy named "Mark Bondurant", in the alt.computer.security Usenet group (quote reported by Peter Gutmann in his X.509 style guide -- a somewhat old but still must-read document, if only for stylistic literary reasons): I knew a guy who set up his own digital ID hierarchy, could issue his own certificates, sign his own controls, ran SSL on his servers, etc. I don't need to pay Verisign a million bucks a year for keys that expire and expire. I just need to turn off the friggen browser warning messages. A: I like the point that SSL provides: Point to point confidentiality - the ssl provider on the server side and your browser are sharing an encrypted session that is not easily breakable by a man in the middle - this gives you both privacy, and integrity between the points. Assurance of the server's identity - when the server side certificate provides proper authentication. There are a TON of reasons that a user will get "scary browser warnings about SSL certificates" and they vary with both the type of browser, it's version, and the settings within the browser. I used to be able to list them all for the major browsers, but at this point, I believe it's hubris to think its possible, there's so much variation. Sadly, there is no easy answer I could give a completely novice user on whether to accept risk or not when dealing with a scary browser warning. Here's a few cases, and things to consider: Know the risk of what you're transmitting. This is a personal decision. Chances are everybody should be wary of credit card info, social security numbers, or other private data to an untrusted party. But whether you care to send the password for the social network -- well it depends on the risk inherent in having your account hacked -- for some that's huge - their network is the public face of their business. For others - no big deal, it just means they need a new way to find out about family reunions. Know the state of the server/service provider and react accordingly. For example, if google, yahoo, or amazon.com offer me a failed certificate, I think twice -- these are HUGE companies, with good reputations, who ought to have enough system admins and foresight to manage their certificates appropriately. The reservation system in the backwater restaraunt that has an expired certificate? Eh, I'll take the risk, they don't need my credit card, and what's the chance that the Mom and Pop restaraunt realized they needed to have the certificate renewed every year. Not an average user thing - but I click through these warnings CONSTANTLY in a test environment where I'm sure that I'm talking to the right server on the internal LAN. Here's a few particular genres of error and what they mean: Certificate validity failure/expiration- means that the certificate is not currently valid, but it was at one time. Generally means it's not hacked, it's just too old. It can mean your computer has the wrong time setting, but more likely, if it's a small site, it means they haven't updated their servers properly. Use at your peril, but if it's a small site, it's probably on an attack Certificate not signed by a trusted authority - your browser has a cache of trusted CA certificates, they are used to sign off that the server provider is who they say they are. Most of the Trusted CAs in major browsers have a decent process of vetting the identity of who they sign for. So if this is the failure, it means that either the requestor when to a lower end CA provider (with worse authentication procedures) or they self-signed the certificate. This may be because you're working on a test site, it may come from a server crash (where the server reset to a default) or it may be someone impersonating the site you want. If I'm buying something, this error will usually make me take a pass. For other purposes, I may take the risk. Certificate name does not match URL - This can be because of a bad certificate, but it can also mean that configuration changes have changed the nature of the URL. I may actually write to the site's tech support on this, since a good site should be able to fix the break. But once and a while, I've been able to know an insider scoop that lets me trust the site, even with the mis-match. From here, IT departments can vary the mileage hugely - you can get all sorts of errors about certificate status checking, which can be a site problem, but it also be an access problem on the part of your network or browser.
#!/usr/bin/env python3 ''' Merge .stats files generated by llvm tools merge-stats.py takes as argument a list of stats files to merge and output the result on stdout Usage: merge-stats.py $(find ./builddir/ -name "*.stats") > total.stats ''' import json import sys result = {} for arg in range(1, len(sys.argv)): with open(sys.argv[arg], "r", encoding='utf-8', errors='ignore') as f: text = f.read() try: data = json.loads(text) except: print('ignored %s: failed to parse' % sys.argv[arg], file= sys.stderr) continue for key in data: if key in result: result[key] += data[key] else: result[key] = data[key] out = json.dumps(result, indent=2) print(out)
MUMBAI: The income tax department is leaving no stone unturned in its bid to make the income declaration scheme IDS ) a success.With less than 10 days to go before the September 30 deadline, small businesses and roadside eateries-—many of which have never seen an IT officer before — are the latest to feel the heat.In Mumbai alone, about 50 — including a well-known vada pav centre in Thane, a dosa centre in Ghatkopar, a sandwich centre in Andheri and a jalebiwallah in south Mumbai — were raided and the owners asked to declare their black money under IDS.Also, about 100 raids or surveys were conducted in Ahmedabad and eateries and well-known shops in New Delhi and Kolkata.The raids are based on information collected by the tax department in the last six months. According to a tax official ET spoke to, about 1 lakh small businessmen and shopkeepers have been identified by the government as possible evaders. It is also understood that the government has given targets for each city.As in Mumbai and New Delhi, tax departments are said to have been given a target of Rs 2,500 crore. ET could not independently confirm these figures from tax officials. Experts said raids and surveys have increased in the past week.“In my 25 years of experience, I have not heard of any raids or surveys on these eateries. They seized cash from the shops, many shopkeepers were taken by surprise as they have never dealt with tax officials ever,” said a chartered accountant who is advising some of those raided in Mumbai. As much as Rs 2 crore may have been seized, according to some estimates.The push is set to intensify. People with knowledge of the matter said tax officials are expected to conduct about 1,000 similar raids or surveys across India by September 30.“Many smalltime businessmen have now been on the receiving end as the income tax department seems to be going after them. In most cases the tax officials are asking the tax payers to declare all the money under the IDS,” said Paras Savla, partner, KPB & Associates, a tax consultancy.On Monday, about 400 tax officials descended on Khau Galli in Mumbai in one such exercise. This paralleled swoops on shop owners in other parts of Mumbai and in New Delhi and Kolkata.At least 20 raids are to be conducted every day in major Indian cities, said the people cited above. Apart from Mumbai and New Delhi, tax officials are also targeting small businessmen in Kolkata.“Anyone who has ever dealt in penny stocks or has a company that has a lot of related party transactions has been questioned,” said the head of a tax firm based in Kolkata. “Surprisingly, many companies that have filed for returns were also told by the tax officials to declare money under IDS.”Tax officials are also pursuing expenses and tax deduction claims by companies. In Mumbai and New Delhi, some real estate developers were raided.
<reponame>abdelhak-mes/javacard-api<filename>src/java/lang/Object.java /** * Java Card 3.0.5 API * url: https://docs.oracle.com/javacard/3.0.5/index.html * * Copyright (C) 2020, Oracle and/or its affiliates. All rights reserved. */ package java.lang; /** * Class <code>Object</code> is the root of the Java Card platform class * hierarchy. Every class has <code>Object</code> as a superclass. All * objects, including arrays, implement the methods of this class. * <p> * This Java Card platform class's functionality is a strict subset of the * definition in the * <em>Java<sup>TM</sup> Platform Standard Edition (Java SE<sup>TM</sup>) API * Specification</em>. <p> */ public class Object { public Object() {} /** * Compares two Objects for equality. * <p> * The <code>equals</code> method implements an equivalence relation: * <ul> * <li>It is <i>reflexive</i>: for any reference value <code>x</code>, * <code>x.equals(x)</code> should return <code>true</code>. * <li>It is <i>symmetric</i>: for any reference values <code>x</code> * and <code>y</code>, <code>x.equals(y)</code> should return * <code>true</code> if and only if <code>y.equals(x)</code> returns * <code>true</code>. * <li>It is <i>transitive</i>: for any reference values <code>x</code>, * <code>y</code>, and <code>z</code>, if <code>x.equals(y)</code> * returns <code>true</code> and <code>y.equals(z)</code> returns * <code>true</code>, then <code>x.equals(z)</code> should return * <code>true</code>. * <li>It is <i>consistent</i>: for any reference values <code>x</code> * and <code>y</code>, multiple invocations of <code>x.equals(y)</code> * consistently return <code>true</code> or consistently return * <code>false</code>. * <li>For any reference value <code>x</code>, * <code>x.equals(null)</code> should return <code>false</code>. * </ul> * <p> * The <code>equals</code> method for class <code>Object</code> * implements the most discriminating possible equivalence relation on * objects; that is, for any reference values <code>x</code> and * <code>y</code>, this method returns <code>true</code> if and only if * <code>x</code> and <code>y</code> refer to the same object * (<code>x==y</code> has the value <code>true</code>). * * @param obj * the reference object with which to compare. * @return <code>true</code> if this object is the same as the obj * argument; <code>false</code> otherwise. */ public boolean equals(Object obj) { return (this == obj); } }
/** * ForwardCurve for Equity assets that are modelled to pay known discrete dividends * with an affine form: d(i) = alpha[i] + beta[i]*share_price(tau[i]) */ public class ForwardCurveAffineDividends extends ForwardCurve { private final YieldAndDiscountCurve _riskFreeCurve; private final AffineDividends _dividends; public ForwardCurveAffineDividends(final double spot, final YieldAndDiscountCurve riskFreeCurve, final AffineDividends dividends) { super(getForwardCurve(spot, riskFreeCurve, dividends)); _riskFreeCurve = riskFreeCurve; _dividends = dividends; } /** * @param spot The spot, greater than zero * @param riskFreeCurve The discount curve, not null * @param dividends The dividends, not null * @return FunctionalDoublesCurve with discrete dividends of an affine form: d(i) = alpha[i] + beta[i]*share_price(tau[i]) */ protected static Curve<Double, Double> getForwardCurve(final double spot, final YieldAndDiscountCurve riskFreeCurve, final AffineDividends dividends) { ArgumentChecker.isTrue(spot > 0, "Negative spot. S_0 = {}", spot); ArgumentChecker.notNull(riskFreeCurve, "null risk free curve"); ArgumentChecker.notNull(dividends, "null dividends"); if (dividends.getNumberOfDividends() == 0) { return getForwardCurve(spot, riskFreeCurve, YieldCurve.from(ConstantDoublesCurve.from(0.0))); } final Function1D<Double, Double> f = new Function1D<Double, Double>() { @Override public Double evaluate(final Double t) { final int n = dividends.getNumberOfDividends(); final double[] growthFactor = new double[n]; final double[] accumProd = new double[n]; final double[] accumSum = new double[n]; double prod = 1.0; double sum = 0.0; for (int i = 0; i < n; i++) { prod *= (1 - dividends.getBeta(i)); accumProd[i] = prod; growthFactor[i] = prod / riskFreeCurve.getDiscountFactor(dividends.getTau(i)); sum += dividends.getAlpha(i) / growthFactor[i]; accumSum[i] = sum; } if (t < dividends.getTau(0)) { return spot / riskFreeCurve.getDiscountFactor(t); } final int index = getLowerBoundIndex(dividends.getTau(), t); final double total = accumSum[index]; return accumProd[index] / riskFreeCurve.getDiscountFactor(t) * (spot - total); } }; return new FunctionalDoublesCurve(f) { public Object writeReplace() { return new InvokedSerializedForm(ForwardCurveAffineDividends.class, "getForwardCurve", spot, riskFreeCurve, dividends); } }; } public YieldAndDiscountCurve getRiskFreeCurve() { return _riskFreeCurve; } public AffineDividends getDividends() { return _dividends; } /** * Shift the forward curve by a fractional amount, shift, such that the new curve F'(T) = (1 + shift) * F(T), has * an unchanged drift. * @param shift The fractional shift amount, i.e. 0.1 will produce a curve 10% larger than the original * @return The shifted curve */ @Override public ForwardCurveAffineDividends withFractionalShift(final double shift) { ArgumentChecker.isTrue(shift > -1, "shift must be > -1"); return new ForwardCurveAffineDividends((1 + shift) * getSpot(), getRiskFreeCurve(), getDividends()); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + getDriftCurve().hashCode(); result = prime * result + getForwardCurve().hashCode(); long temp; temp = Double.doubleToLongBits(getSpot()); result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + getRiskFreeCurve().hashCode(); result = prime * result + getDividends().hashCode(); return result; } @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final ForwardCurveAffineDividends other = (ForwardCurveAffineDividends) obj; if (!ObjectUtils.equals(getRiskFreeCurve(), other.getRiskFreeCurve())) { return false; } if (!ObjectUtils.equals(getDividends(), other.getDividends())) { return false; } if (Double.doubleToLongBits(getSpot()) != Double.doubleToLongBits(other.getSpot())) { return false; } return true; } }
/// Creates a new HtmlQuery to search from the root nodes down. /// /// # Arguments /// /// * `root` - A reference to the vector of nodes that the Query object /// begins searching from. pub fn new(root: &'a Vec<HtmlNode>) -> HtmlQuery<'a> { HtmlQuery { root: root, results: vec![], } }
<filename>src/main/java/com/lazada/platform/bean/PackedByMarketplaceOrderItemBean.java package com.lazada.platform.bean; /** * Created by LCC on 2018/6/3. */ public class PackedByMarketplaceOrderItemBean { /** * order_item_id : 203019891286539 * tracking_number : LZDCB00094640894 * shipment_provider : LGS-FM40 * package_id : OP06192011999277 */ private long order_item_id; private String tracking_number; private String shipment_provider; private String package_id; public long getOrder_item_id() { return order_item_id; } public void setOrder_item_id(long order_item_id) { this.order_item_id = order_item_id; } public String getTracking_number() { return tracking_number; } public void setTracking_number(String tracking_number) { this.tracking_number = tracking_number; } public String getShipment_provider() { return shipment_provider; } public void setShipment_provider(String shipment_provider) { this.shipment_provider = shipment_provider; } public String getPackage_id() { return package_id; } public void setPackage_id(String package_id) { this.package_id = package_id; } }
What Weights Work for You? Adapting Weights for Any Pareto Front Shape in Decomposition-Based Evolutionary Multiobjective Optimisation The quality of solution sets generated by decomposition-based evolutionary multi-objective optimisation (EMO) algorithms depends heavily on the consistency between a given problem's Pareto front shape and the specified weights' distribution. A set of weights distributed uniformly in a simplex often leads to a set of well-distributed solutions on a Pareto front with a simplex-like shape, but may fail on other Pareto front shapes. It is an open problem on how to specify a set of appropriate weights without the information of the problem's Pareto front beforehand. In this article, we propose an approach to adapt weights during the evolutionary process (called AdaW). AdaW progressively seeks a suitable distribution of weights for the given problem by elaborating several key parts in weight adaptationweight generation, weight addition, weight deletion, and weight update frequency. Experimental results have shown the effectiveness of the proposed approach. AdaW works well for Pareto fronts with very different shapes: 1) the simplex-like, 2) the inverted simplex-like, 3) the highly nonlinear, 4) the disconnect, 5) the degenerate, 6) the scaled, and 7) the high-dimensional.
def _find_files(metadata): ret = [] found = {} for bucket_dict in metadata: for bucket_name, data in bucket_dict.items(): file_paths = [k['Key'] for k in data] file_paths = [k for k in file_paths if not k.endswith('/')] if bucket_name not in found: found[bucket_name] = True ret.append({bucket_name: file_paths}) else: for bucket in ret: if bucket_name in bucket: bucket[bucket_name] += file_paths break return ret
# -*- coding: utf-8 -*- from urllib.parse import urlparse import oss2 from airflow.exceptions import AirflowException from airflow.hooks.base_hook import BaseHook class OSSHook(BaseHook): """ Interact with Aliyun OSS, using the oss2 library. """ def __init__(self, oss_conn_id="oss_default", *args, **kwargs): conn = self.get_connection(oss_conn_id) self.access_key_id = conn.login self.access_key_secret = conn.password self.region = conn.host self.bucket_name = conn.schema @staticmethod def parse_oss_url(ossurl): parsed_url = urlparse(ossurl) if not parsed_url.netloc: raise AirflowException( 'Please provide a bucket_name instead of "%s"' % ossurl ) else: bucket_name = parsed_url.netloc key = parsed_url.path.strip("/") return bucket_name, key def get_conn(self): auth = oss2.Auth(self.access_key_id, self.access_key_secret) bucket = oss2.Bucket(auth, self.region, self.bucket_name) return bucket def load_string(self, key, string_data, bucket_name=None, replace=False): """ Loads a string to PSS This is provided as a convenience to drop a string in OSS. It uses the oss2 put_object to ship a file to oss. :param string_data: str to set as content for the key. :type string_data: str :param key: OSS key that will point to the file :type key: str """ if urlparse(key).netloc != "": (self.bucket_name, key) = self.parse_oss_url(key) if not replace and self.get_key(key): raise ValueError("The key {key} already exists.".format(key=key)) if replace: self.get_conn().delete_object(key) result = self.get_conn().put_object(key=key, data=string_data) if result.status != 200: raise AirflowException("Upload string file fail") def get_key(self, key): """ Check if key exists in remote storage :param key: the path to the key :type key: str """ if urlparse(key).netloc != "": (self.bucket_name, key) = self.parse_oss_url(key) return self.get_conn().object_exists(key) def read_key(self, key): """ Reads a key from OSS :param key: OSS key that will point to the file :type key: str """ if urlparse(key).netloc != "": (self.bucket_name, key) = self.parse_oss_url(key) return self.get_conn().get_object(key).read().decode("utf-8")
This calculator can help you navigate the ins and outs of reconciling investment gains and losses. Investors love to pick winning investments, but you'll inevitably find some losers in your portfolio as well. When you sell your investments, you'll recognize gains or losses for income tax purposes, and you'll have to break out those capital gains against capital losses by their holding period if you want to account for them correctly for tax purposes. In general, you can use losses to offset gains, and then take up to an annual limit of $3,000 of additional losses as a deduction against other types of income. This gain and loss calculator can get you started, but you'll also need to know more tax rules to finish the job. Let's look more closely at how gains and losses work and how the calculator can help you get off on the right foot. When you sell a stock, whether you have a capital gain or loss depends on what you paid for it and what you got when you sold it. If you paid more than you received, you'll have a loss; otherwise, you'll have a gain. You also have to pay attention to the holding period, because tax treatment differs depending on how long you've owned a stock. Sell after a year or less, and you'll have short-term capital gain or loss. Hold onto the stock for more than a year before selling, and you'll have long-term capital gain or loss. Within each holding period category, you'll want to figure the total gains and losses, and then offset them to get either a net gain or a net loss. The calculator helps you do that. For instance, say you have a $1,500 short-term gain, a $1,000 short-term loss, a $500 long-term gain, and a $2,000 long-term loss. Run those numbers through the calculator, and you'll get a net short-term gain of $500 and a net long-term loss of $1,500. That's where the calculator stops, but there's more to the story. Once you've figured out the net gain or loss in each holding period category, you must use the losses in one category to offset the gains in the other. In this situation, you'd take $500 of the long-term loss to cancel out the short-term gain. That leaves you with $1,000 of long-term losses remaining. After that, you can take any remaining loss from either category and use it to offset other types of income. For instance, if you have investment income or earnings from a job, you could take the $1,000 of long-term losses remaining and reduce your taxable income by that amount. If you have a terrible year and your losses exceed $3,000, then you won't be able to claim all of your losses against income in the current year. However, any amount you've lost beyond the $3,000 that you're able to use this year can be carried forward to future years. It might take time for you to use up a major loss, but there's no time limit for the number of years you can carry forward those losses into the future. Finally, if you sell a stock at a loss, be sure that you know the rules that govern recognizing that loss for tax purposes. Specifically, the tax laws don't allow you to buy back the same stock you sold at a loss within 30 days of the sale. If you do so, then your capital loss will be disallowed. This is known as the wash sale rule, and it only applies to losses. You can sell a stock at a gain and buy it back immediately, and the IRS will be happy to collect taxes on the gain. Selling your investments is something even long-term investors have to deal with, and the tax consequences can be sizable. By knowing how to weigh gains and losses against each other, you'll be in a better position to predict how much tax your investment sales might cost you in the end.
Effect of Combination of Acapella Device and Breathing Exercises on Treatment of Pulmonary Complications After Upper Abdominal Surgeries Introduction: Background. Upper abdominal surgery alters postoperative pulmonary function, as observed by impairment of lung volumes such as total lung capacity, vital capacity. Impaired clearance of sputum results in a vicious cycle of colonization and infection of bronchi with pathogenic organisms, dilation of bronchi and further production of sputum. The aim was to investigate the effect of combination of Acapella device and breathing exercises on treatment of post operative pulmonary complications after upper abdominal surgeries. Subjects and methods: Sixty patients underwent upper abdominal surgery were assigned randomly into two equal groups; their ages ranged from 20-50 years. The study group received breathing exercises, Acapella device and traditional chest physical therapy program (postural drainage. percussion, vibration, cough training and early ambulation). Control group received traditional chest physical therapy program (postural drainage. percussion, vibration, cough training and early ambulation). All groups received three sessions per week for four successful weeks. The data were collected before and after the same period of treatment for both groups. Evaluation procedures were carried out to measure pulmonary function: Forced vital capacity (FVC) and Forced expiratory volume in one second (FEV1) using electronic spirometer. Results: Post treatment results showed that there was a significant improvement difference in FVC and FEV1 in both groups in favor of the study group. Percentage of improvement of FVC in the study group was 42.28%, while it was 16.31%in the control group. Percentage of improvement of FEV1 in the study group was 49.05%, while it was 20.79%in the control group. Conclusion: Combination of Acapella device and breathing exercises were considered to be an effective modality for treatment of postoperative pulmonary complications and removal of secretions after upper abdominal surgeries. Introduction Patients submitted to upper abdominal surgery (UAS) usually develop a restrictive lung pattern, with changes to pulmonary mechanics in the first post operative days. This can cause a reduction in inspiratory capacity, total inspiratory time, and ventilation at the lung bases, leading to a high risk of developing post operative pulmonary complications (PPCs). For adequate pulmonary ventilation to occur, it is fundamental that the forces that act on the respiratory system favor the thoracic and abdominal movements, especially the respiratory muscle strength that is compromised after UAS. A major decline in pulmonary function is observed on the first day after upper abdominal surgery. This decline can reduce vital and inspiratory capacity and can culminate in restrictive lung diseases that cause atelectasis, reduced diaphragm movement, and respiratory insufficiency. PPC defined as new onset or exacerbation of respiratory failure following surgery, occur frequently. A thorough understanding of the clinical effects of PPC is hindered by inconsistency in the definition of PPC among researchers. The diagnoses classically considered PPC including atelectasis, bronchospasm, pneumonia, pulmonary edema, and respiratory failure. Respiratory failure itself is not clearly defined, although the most common criterion is failure to be extubated within 48 hours of surgery. Airway secretions, particularly those in peripheral airways, require a forced expiratory maneuver for expectoration. To facilitate passage of air to alveoli beyond the secretions, a deep breathing maneuver is adopted prior to the application of forced expiratory techniques. The Acapella (Smiths Medical Inc, Carlsbad, California, USA) is a handheld airway clearance device that operates on the same principle as the Flutter, i.e. a valve interrupting expiratory flow generating oscillating PEP. Utilizing a counterweighted plug and magnet to achieve valve closure, the Acapella is not gravity dependent like the Flutter. The Acapella comes in three models, a low flow (<15 L/min), high flow (>15 L/min) and the Acapella Choice. The high and low flow models have a dial to set expiratory resistance while the Choice model has a numeric dial to adjust frequency. Oscillating devices such as the flutter and acapella have a twofold effect on secretion clearance. Oscillation has been shown to decrease the viscoelastic properties of mucus hence making it easier to mobilize up the airways. The second effect of the oscillations is to cause short bursts of increased acceleration of the expiratory airflow which assist in mobilizing the secretions up the airways. The aim of this study was to investigate the effect of combination of Acapella device and breathing exercises in treatment of post operative pulmonary complications after upper abdominal surgeries. Subjects, Materials and Methods This study was carried out on 60 adult patients of both sexes suffering from pulmonary complications and accumulation of secretions after upper abdominal surgery, their ages ranged from 20 to 50 years and selected from general surgery department at Om El Masryeen Hospital, Giza, Egypt during the period of February2015 to August 2015.Patients were randomly assigned into two equal groups; Group A (Study group) and Group B (Control group).Group A received deep breathing exercises, Acapella device and traditional chest physical therapy program (postural drainage. percussion, vibration, cough training and early ambulation)and group B received traditional chest physical therapy program (Postural drainage, percussion, vibration, cough training and early ambulation). Patients with the following conditions were excluded from the study; malignant disease, infection, active inflammation or sepsis. Patients spent more than 48 hours on mechanical ventilation, Instability of patient's medical condition, heavy smokers, alcohol drinking and patient with any spirometry contra-indications (e.g. Unstable cardiovascular status, pneumothorax, active hemoptysis and abdominal or cerebral aneurysms) were also excluded. The work has been carried out in accordance with the ethics of committee for experiments at Faculty of Physical Therapy, Cairo University involving humans, and parents filled approval consent to share in the study. The assessment approach was: Spirometer which is a computerized instrument that records: forced vital capacity (FVC) and forced expiratory volume in the first second (FEV1) at the beginning of the study (1st day post operative) and after four successive weeks. Preparation of Acapella device: The Acapella adjustment frequency dial turned counterclockwise to lowest resistance setting. As the patient improve, adjust proper resistance upward by turn the dial clockwise, the patient instructed to: 1-Sit in a comfortable position. 2-Take in breath that larger than normal but not to fill the lunges completely.3-Position the mouthpiece maintaining a tight seal with his lips. 4-Hold breath for 2 or 3 sec. 5-Try not to cough and exhale slowly for 2 to 3 sec through the device while it vibrates. 6-Remove the mouthpiece and cough or "huff cough". To huff cough, take a deep breath. Hold it for 1-3 seconds. Then, force air out of his lungs with his mouth open like he would do if he were trying to fog a mirror. 7-Continue breathing with the Acapella with breaks to cough about every 5 minutes for a total treatment time of 20 -30 minutes. Statistical Analysis Descriptive statistics and T-test for comparison of the mean age of both groups. Independent T-test for comparison of FVC and FEV1 between both groups. Paired T-test for comparison between pre and post treatment mean values of FVC and FEV1 in each group. The level of significance for all statistical tests was set at p < 0.05. All statistical tests were performed through the statistical package for social studies. (SPSS) version 19 for windows (IBM SPSS, Chicago, IL, USA). Results The statistical analysis for patient's socio-demographic data (age, sex) revealed a non significant difference between both groups. Results revealed that; There was no significant difference in mean values of FVC between both groups pre treatment (p = 0.26). While there was a significant increase in FVC in group A post treatment compared to that of group B (p = 0.0001) as shown in table1and figure1. There was no significant difference in mean values of FEV1 between both groups pre treatment (p = 0.41). While there was a significant increase in FEV1 in group A post treatment compared to that of group B (p = 0.0001) as shown in table 2 and figure 2. Statistical analysis of results showed a significant improvement in FVC and FEV1 in group A and group B after 4 weeks of treatment as follows: Results of FVC: The mean ± SD pre treatment of group A was 1.49 ± 0.23 L and that post treatment was 2.12 ± 0.33 L. The mean difference was -0.63 L and the percent of improvement was 42.28%. There was a significant increase in mean value of FVC post treatment compared with pre treatment in group A (p = 0.0001). While in group B the mean ± SD of FVC pre treatment was 1.41 ± 0.26 L and that post treatment was 1.64 ± 0.32 L. The mean difference was -0.23 L and the percent of improvement was 16.31%. There was a significant increase in mean value of FVC post treatment compared with pre treatment in group B (p = 0.0001) as shown in table 3 and figure 3. Results of FEV1: The mean ± SD pre treatment of group A was 1.06 ± 0.16 L and that post treatment was 1.58 ± 0.24 L. The mean difference was -0.52 L and the percent of improvement was 49.05%. There was a significant increase in mean value of FEV1 post treatment compared with pre treatment in group A (p = 0.0001). While in group B the mean ± SD of FEV1 pre treatment was 1.01 ± 0.22 L and that post treatment was 1.22 ± 0.24 L. The mean difference was -0.21 L and the percent of improvement was 20.79%. There was a significant increase in mean value of FEV1 post treatment compared with pre treatment in group B (p = 0.0001) as shown in table 4 and figure 4. Discussion The findings of this study indicated that patients suffering from pulmonary complications following upper abdominal surgery had a significant improvement in FVC and FEV1 after application of Acapella device with breathing exercises. The statistical analysis revealed a significant improvement of FVC in the study group than that of the control group; the percentage of improvement was 42.28%and 16.31%for the two groups respectively. Also there is a significant improvement of FEV1 in the study group than that of the control group; the percentage of improvement was 49.05%and 20.79%for the two groups respectively. These results are consistent with authors who supported that combination of Acapella device and breathing exercises is an effective modality in improving pulmonary function and reducing sputum after upper abdominal surgery as follows: after the use of oscillatory positive expiratory pressure (OPEP) there was a statistically significant (p < 0.05) improvement in FEV1 23% and FVC 43% compared to baseline with combined bronchodilator therapy. As the OPEP devices have shown a significant increase in lung function parameters (FVC, FEV1 and forced expiratory flow) after more prolonged use in an outpatient setting. The Acapella device characterization showed an oscillation frequency varying from 8 Hz to 21 Hz, mean pressure ranging from 3 cm H2O to 23 cm H2O, and oscillation amplitude from 4 cm H2O to 9 cm H2O. These parameters increased with flow and instrument adjustment. The Acapella devices elicit higher vibration amplitudes (5 to 8 cmH 2 O) than the water bottle (1.8 cmH 2 O). The Acapella devices may be more efficient for secretion mobilization than the water bottle, because they elicit greater amplitude of vibrations. The OPEP provides an improvement both in pulmonary function tests (FVC, FEV1) and quality of life. This treatment should be included among the principal options in chest physiotherapy. There was a significant improvement of FVC and FEV1 also arterial oxygen pressure (PaO2), carbon dioxide pressure (PaCO2) improved after 4 weeks in patients with chronic obstructive pulmonary diseases (COPD) after upper abdominal surgery. Breathing exercises with positive expiratory pressure (PEP) are commonly recommended for the prevention of pulmonary complications after abdominal surgery. Scientific documentation of the effects of PEP treatment is limited. In total, 24 (54%) of the physical therapists answered the questionnaire. All reported using breathing exercises with PEP as a treatment option after abdominal surgery. Application of Acapella device for chest physiotherapy when compared with multimodality chest physiotherapy resulted in significant increase in the mean values of sputum amount, significant decrease in sputum viscosity, improved radiological signs of atelactasis, shorter duration of ventilator support, and less ICU stay. So, Acapella device is a good representative to all conventional multi-modality chest physiotherapy procedures with high success rate and can replace the exhausting, costy, and time consuming conventional procedures in COPD patients. Positive expiratory pressure technique provides a significantly greater improvement in the pulmonary function when compared to postural drainage with percussion. Other procedures are also utilized such as the Flutter device, autogenic drainage, the positive expiratory pressure technique, forced expiration techniques and intrapulmonary percussive ventilation. Pulmonary function tests: forced vital capacity (FVC), forced expiratory volume in the first second (FEV1), FEV1/FVC ratio, peak expiratory flow (PEF) and diaphragm excursion values between preoperative and postoperative (first, second) days were found to be higher in the exercise group diaphragmatic breathing exercise, (other therapies like bronchial hygiene therapy, Thoracic mobility exercise and mobilization)when compared to control group performed on twenty sample sizes who underwent laparoscopic surgery.In addition, the effect of breathing exercises during the immediate postoperative period following upper abdominal surgery seem to provide some benefit in improving pulmonary function, reducing pulmonary complications and postoperative hospital stay, as the study group showed significant improvement in FEV1 (21.47%) (P<0.001), FVC (12.96%) (P<0.05) as compared to the control group. In contrast it was found that there were no statistically significant differences among the airway clearance regimens of the active cycle of breathing techniques (ACBT), autogenic drainage (AD), positive expiratory pressure (PEP) and the oscillating PEP devices of the Flutter and RC when used over a period of one year, in the sitting position, by adults with cystic fibrosis. It is likely that to optimize adherence to treatment and consequently improvements in morbidity and mortality, the patient should be involved in the selection of his/her airway clearance regimen. It was found that there was no significant difference between weight of sputum expectorated with ACBT treatment and weight of sputum expectorated with Acapella treatment.The Acapella is as effective method of airway clearance as ACBT and may offer a user-friendly alternative to ACBT for patients with bronchiectasis. From the gained results it could be concluded that combination of breathing exercises and Acapella device had a significant improvement of FVC and FEV1 and decrease of post operative pulmonary complications after upper abdominal surgery.
// DirectMap returns the map for the directly pinned keys func (p *pinner) DirectMap(ctx context.Context) (*cid.Map, error) { p.lock.RLock() defer p.lock.RUnlock() return p.directPinMap, nil }
/* * MIT License * * Copyright (c) 2021 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and * associated documentation files (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, publish, distribute, * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or * substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ package com.github.weisj.jsvg.nodes.filter; import java.util.HashMap; import java.util.Map; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import com.github.weisj.jsvg.attributes.filter.DefaultFilterChannel; public class FilterContext { private final @NotNull Map<@NotNull Object, @NotNull Channel> resultChannels = new HashMap<>(); private final Filter.FilterInfo info; public FilterContext(@NotNull Filter.FilterInfo info) { this.info = info; } public @NotNull Filter.FilterInfo info() { return info; } public void addResult(@NotNull Object key, @NotNull Channel channel) { resultChannels.put(key.toString(), channel); } public void addResult(@NotNull DefaultFilterChannel key, @NotNull Channel channel) { resultChannels.put(key.toString(), channel); } public @Nullable Channel getChannel(@NotNull Object kex) { return resultChannels.get(kex.toString()); } }
1. Field of the Invention The present invention relates to a heat-shrinkable cylindrical label which is attached to a container or the like by heat shrinkage, and a method of producing a longitudinal cylindrical label continuum wherein the cylindrical label is continuously extend sectioned. 2. Background Art Heat-shrinkable cylindrical labels (shrinkable labels each formed into a cylindrical form) are used in the state that they are attached to containers such as drink bottles or cosmetic containers. Such a heat-shrinkable cylindrical label is made of a label substrate which has a sheet (generally called a film in some cases) made of a synthetic resin and having heat shrinkability. Both side end sections of this label substrate are overlapped with each other, and the overlapped portions are stuck onto each other, thereby forming a center seal section. As this label substrate, there are used substrates of various kinds, examples of which include not only a substrate having a mono-layered structure of a sheet having heat shrinkability but also a substrate having a laminated structure wherein two or more sheets are laminated. As an example wherein a laminate is used as a label substrate, Japanese Patent Application Laid-Open (JP-A) No. 8-106252 describes a heat-shrinkable cylindrical label wherein a label substrate which comprises a heat-shrinkable sheet (represented as a heat-shrinkable film in the same publication) and a foamed resin sheet (represented as a heat-shrinkable foamed sheet in the publication) laminated onto the heat-shrinkable sheet is made into a cylindrical form, and then a center seal section is formed. In this heat-shrinkable cylindrical label, the laminated foamed resin sheet has heat insulating effect. Accordingly, even if a container or the like to which this cylindrical label is attached is heated or cooled, the heat of the container or the like is not easily conducted to the user. Thus, the label is a preferred label. The structure of a center seal section of such a heat-shrinkable cylindrical label, which is made of a laminate, is described in the above-mentioned publication. Specifically, the following structures are disclosed: as illustrated in FIG. 20(a) attached, a structure wherein the rear face of a foamed resin sheet 102 at one side end section 103a of the laminate is overlapped with the front face of a heat-shrinkable sheet 101 at the other side end section 103b, and the overlapped faces are stuck onto each other through an adhesive 105; and as illustrated in FIG. 20(b), a structure wherein the rear face of a foamed resin sheet 102 at one side end section 103a is overlapped with the front face of a heat-shrinkable sheet 101 at the other side end section 103b, and the overlapped faces are stuck onto each other with a tape 106. However, when the rear face of the one side end section 103a of the label substrate 103 is overlapped with the front face of the other side end section 103b and the faces are stuck to each other through the adhesive 105, portions of the foamed resin sheet 102 are overlapped with each other in the vertical direction in the resultant center seal section so that the center seal section becomes very thick. As a result, when the cylindrical label continuum wherein the cylindrical label is continuously extended is wound into a roll form, there is caused a problem that the length of the winding becomes short. Furthermore, after the cylindrical label is attached to a container or the like by heat shrinkage, a site which partially swells into a large thickness is generated in the longitudinal direction of the cylindrical label. The structure shown in FIG. 20(a) also has a problem that: the adhesive 105 is coated onto the foamed resin sheet 102; thus, if the amount of the adhesive is small, a sufficient adhesive strength is not obtained at ease. Additionally, the side edge of the foamed resin layer becomes oblique so as to be exposed to the outside when this label is attached to a product by shrinkage. For this reason, the external appearance of the product to which the label is attached is bad. About a label having portions stuck to each other with a tape, as illustrated in FIG. 20(b), at the time of performing center sealing, it is essential to adjust or match tensile tensions or forwarding-timings of a tape 106 and a label substrate 103 skillfully. Thus, the adjustment is complicated. These matters are not problems limited to laminates wherein a foamed resin sheet is laminated onto a heat-shrinkable sheet. For example, similar problems are caused in the case of using a label substrate wherein a nonwoven cloth, Japanese paper or the like is laminated. Furthermore, when the material of a heat-shrinkable sheet is different from that of a foamed resin sheet or nonwoven cloth, the two may be unable to be stuck to each other with a solvent. The present invention has been made in order to provide: a heat-shrinkable cylindrical label comprising an inner layer sheet laminated onto the rear face of an outer layer sheet, the label being characterized by being improved in such a manner that its center seal section does not become thick; and a method of producing this cylindrical label continuum. A further object of the invention is to provide a heat-shrinkable cylindrical label which exhibits a beautiful external appearance after this label is attached to a product by shrinkage.
<reponame>takeratta/twitter4j /* * Copyright 2007 <NAME> * * 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 twitter4j; import junit.framework.TestCase; import java.io.File; /** * @author <NAME> - yusuke at mac.com */ public class ApacheHttpClientTest extends TestCase { public ApacheHttpClientTest(String name) { super(name); } Twitter twitterAPI1 = null; protected void setUp() throws Exception { super.setUp(); twitterAPI1 = new TwitterFactory().getInstance(); } protected void tearDown() throws Exception { super.tearDown(); } public void testOAuth() throws Exception { //get twitterAPI1.verifyCredentials(); //post twitterAPI1.updateStatus(new StatusUpdate(new java.util.Date() + " test")); //multipart-post twitterAPI1.updateProfileBackgroundImage(new File("src/test/resources/t4j-reverse.gif"), false); } }
Mode instability dynamics in high-power low-numerical-aperture step-index fiber amplifier. The study on mode instability (MI) in the large-mode-area fiber is generating great interest regarding the high-power applications of fiber lasers. To the best of our knowledge, we have investigated for the first time the dynamics of the output beam from a kilowatt-level all-fiber amplifier based on the low-numerical-aperture (<0.04) step-index (SI) fiber before and after the onset of the MI, including the temporal dynamics and mode evolution. The temporal power fluctuations indicate three evolution stages apart from the onset threshold of the MI, defined as stable, transition, and chaotic regions. In addition, the mode decomposition technique is utilized to accurately observe and investigate the mode evolution and relevant modal content corresponding to the transition and chaotic regions in the SI fiber laser for the first time. According to the mode decomposition results, the reduction of the extracted power can be explained by the high bending loss of the high-order mode excited in the MI process. Finally, the difference of MI dynamics between the fiber lasers based on the SI fiber and rod-type photonic crystal fiber is discussed.
See the must-have top fashion trends for spring! There’ll be something for everyone from apparel, home décor, jewelry, toys, sporting goods, dinner gift cards, best-selling books, and more! All in Fairfield!
Deception and Being Human alum Lenora Crichlow has been cast opposite Hugh Laurie, Zach Woods, Suzy Nakamura, Rebecca Front, Josh Gad and Nikki Amuka-Bird in Armando Iannucci’s HBO space comedy pilot Avenue 5. Created, written and executive produced by Iannucci, the tentatively titled project is set in the future, mostly in space. Crichlow will play Billie McEvoy, the second engineer. Young, outspoken, smart and career-focused but exhausted by responsibility, she loves building and fixing things but is terrified of dying in space. The UK-born Crichlow most recently had a series-regular role last season on ABC’s Deception, in which Jack Cutmore-Scott played a superstar magician who worked for the FBI. It was canceled in May after one season. She also was the lead in the “White Bear” episode of Netflix/Channel 4’s Black Mirror and co-starred on Netflix’s Will Arnett-starring Flaked after breaking out on Channel 4’s Sugar Rush. Her TV credits also include ABC’s Back in the Game, NBC’s A to Z, the BBC’s Material Girl and the BBC America pic Burton and Taylor. On the film side, she starred in Fast Girls with Lily James. She is repped by APA, Authentic and The BWH agency in the UK.
Performance evaluation of IEEE 802.16e mobile WiMAX for long distance control of UAV swarms The IEEE 802.16e mobile WiMAX standard allows for a wide variety of different application. Especially in cases where people rely on high speed network access in greater areas which is exclusively dedicated to them mobile WiMAX is a viable solution. One of these scenarios is the control of a swarm of miniature unmanned aerial vehicles (MUAV). These flying robots can be used for a wide set of different applications which range from airborne surveillance to traffic control and more. In the AirShield project, sponsored by the German Ministry for Education and Research, the MUAV swarm is used to measure the concentration of different harmful substances which occur in the case of fire or a malfunction in industrial facilities. Due to the fact that the clouds of contaminant may travel over several of kilometers a reliable communication system which can handle these distances and furthermore ensures some QoS guarantees is needed. In this paper we investigate in how far mobile WiMAX can ensure these guarantees in terms of packet loss, delay, jitter and throughput under different channel conditions. Therefore a laboratory testbed based on the E6651 mobile WiMAX base station emulator by Agilent Technologies is used for the different measurements.
/* * Infinitest, a Continuous Test Runner. * * Copyright (C) 2010-2013 * "<NAME>" <<EMAIL>>, * "<NAME>" <<EMAIL>>, * "<NAME>" <<EMAIL>> * "<NAME>" <<EMAIL>>, et al. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package org.infinitest.eclipse; import static com.google.common.collect.Iterables.*; import static java.util.Arrays.*; import static org.infinitest.eclipse.prefs.PreferencesConstants.*; import static org.infinitest.util.InfinitestGlobalSettings.*; import static org.infinitest.util.InfinitestUtils.*; import org.eclipse.core.runtime.*; import org.eclipse.jface.preference.*; import org.eclipse.ui.plugin.*; import org.infinitest.eclipse.workspace.*; import org.infinitest.util.*; import org.osgi.framework.*; import org.springframework.context.*; import org.springframework.context.annotation.*; import org.springframework.context.support.*; import com.google.common.annotations.*; /** * Controls the plug-in life cycle. */ public class InfinitestPlugin extends AbstractUIPlugin { public static final String PLUGIN_ID = "org.infinitest.eclipse"; private static InfinitestPlugin sharedInstance; private static Bundle pluginBundle; private ApplicationContext context; static { addLoggingListener(new EclipseLoggingListener()); } @Override // CHECKSTYLE:OFF // Idiomatic OSGI and checkstyle don't like each other public void start(BundleContext context) throws Exception // CHECKSTYLE:ON { super.start(context); sharedInstance = this; } @Override // CHECKSTYLE:OFF // Idiomatic OSGI and checkstyle don't like each other public void stop(BundleContext context) throws Exception // CHECKSTYLE:ON { sharedInstance = null; super.stop(context); } // Idiomatic OSGI public static InfinitestPlugin getInstance() { return sharedInstance; } public void startContinuouslyTesting() { getPluginController().enable(); } @Override protected void initializeDefaultPreferences(IPreferenceStore store) { store.setDefault(PARALLEL_CORES, 1); store.setDefault(SLOW_TEST_WARNING, getSlowTestTimeLimit()); } // Only used for testing. public void setPluginBundle(Bundle bundle) { pluginBundle = bundle; } public Bundle getPluginBundle() { if ((pluginBundle == null) && (InfinitestPlugin.getInstance() != null)) { return InfinitestPlugin.getInstance().getBundle(); } return pluginBundle; } public PluginActivationController getPluginController() { return getBean(PluginActivationController.class); } @SuppressWarnings("unchecked") public <T> T getBean(Class<T> beanClass) { if (context == null) { context = new AnnotationConfigApplicationContext(InfinitestConfig.class); restoreSavedPreferences(getPluginPreferences(), getBean(CoreSettings.class)); InfinitestUtils.log("Beans loaded: " + asList(context.getBeanDefinitionNames())); } return getOnlyElement(context.getBeansOfType(beanClass).values()); } @VisibleForTesting void restoreSavedPreferences(Preferences preferences, CoreSettings coreSettings) { coreSettings.setConcurrentCoreCount(preferences.getInt(PARALLEL_CORES)); InfinitestGlobalSettings.setSlowTestTimeLimit(preferences.getLong(SLOW_TEST_WARNING)); } }
<reponame>froddd/digital-form-builder<filename>designer/server/plugins/routes/__tests__/app.jest.ts const { createServer } = require("../../../createServer"); describe("App routes test", () => { const startServer = async (): Promise<hapi.Server> => { const server = await createServer(); await server.start(); return server; }; let server; beforeAll(async () => { server = await startServer(); const { persistenceService } = server.services(); persistenceService.listAllConfigurations = () => { return Promise.resolve([]); }; persistenceService.copyConfiguration = () => { return Promise.resolve([]); }; persistenceService.uploadConfiguration = () => { return Promise.resolve([]); }; }); afterAll(async () => { await server.stop(); }); test("GET / should redirect to /app", async () => { const options = { method: "get", url: "/", }; const res = await server.inject(options); expect(res.statusCode).toEqual(302); expect(res.headers.location).toEqual("/app"); }); test("GET /app should serve designer landing page", async () => { const options = { method: "get", url: "/app", }; const res = await server.inject(options); expect(res.statusCode).toEqual(200); expect(res.result.indexOf('<main id="root">') > -1).toEqual(true); }); test("GET /app/* should serve designer landing page", async () => { const options = { method: "get", url: "/app/designer/test", }; const res = await server.inject(options); expect(res.statusCode).toEqual(200); expect(res.result.indexOf('<main id="root">') > -1).toEqual(true); }); test("GET /{id} should redirect to designer page", async () => { const options = { method: "get", url: "/test", }; const res = await server.inject(options); expect(res.statusCode).toEqual(301); expect(res.headers.location).toEqual("/app/designer/test"); }); test("GET /new should redirect to /app", async () => { const options = { method: "get", url: "/new", }; const res = await server.inject(options); expect(res.statusCode).toEqual(301); expect(res.headers.location).toEqual("/app"); }); });
class Solution { public: bool lemonadeChange(vector<int>& bills) { int five = 0, ten = 0; for (int i : bills) { if (i == 5) five++; else if (i == 10) ten++, five--; else if (ten > 0) ten--, five--; else five -= 3; if (five < 0) return false; } return true; } };
Hal Draper on Israel, 1948: War of independence or expansion? Editorial from the US Marxist newspaper Labor Action. "War of Independence or Expansion? appeared on 24 and 31 May 1948, soon after Israel’s declaration of independence. Read more about Hal Draper on Israel, 1948: War of independence or expansion? At last, seventy years after its first publication in French and half a century after the first abridged English translation, we have the Victor Serge’s fantastic Memoirs of a Revolutionary in full. Around one-eighth of the 1963 edition was trimmed by nearly two hundred cuts under duress from the publishers. This new unexpurgated edition has been restored by George Paizis and annotated by Richard Greeman. It deserves to be read by today’s generation of socialists, activists and trade unionists. For three weeks in May and June 1989, the Chinese government lost control of a large part of Beijing. It lost control of its capital city to the people who live there, spearheaded by the students and workers demanding radical democratic reform. Download pdf or read online here.
<filename>docs/exts/markdowntransform.py import re def processLink(app, docname, source): original = source[0] subbed = re.sub(r"\.md", r"\.html", original) source[0] = subbed def setup(app): app.connect('source-read', processLink)
<reponame>johngeorgewright/typescript-runtime-schema<filename>packages/generate-docs/types/expand-template.d.ts declare module "expand-template" { function expandTemplate(options?: { sep: string; }): (template: string, data: Record<string, unknown>) => string; export default expandTemplate; }
// appendDirPaths calls appendFilePath for all files in `dir` that end in `.txt` func appendDirPaths(dir string, pathsPtr *[]string) { files, err := ioutil.ReadDir(dir) if err != nil { panic(red(err)) } for _, file := range files { ext := filepath.Ext(file.Name()) if ext != ".txt" { continue } fullPath := filepath.Join(dir, file.Name()) appendFilePath(fullPath, pathsPtr) } }
// Starting a character token works slightly differently than starting // other types of tokens because we want to save a per-character branch. void ensureIsCharacterToken() { ASSERT(m_type == Uninitialized || m_type == Character); m_type = Character; }
<reponame>smartZZD/gulimall package com.zzd.gulimall.order.service.impl; import org.springframework.stereotype.Service; import java.util.Map; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.zzd.gulimall.order.dao.OrderOperateHistoryDao; import com.zzd.gulimall.order.entity.OrderOperateHistoryEntity; import com.zzd.gulimall.order.service.OrderOperateHistoryService; @Service("orderOperateHistoryService") public class OrderOperateHistoryServiceImpl extends ServiceImpl<OrderOperateHistoryDao, OrderOperateHistoryEntity> implements OrderOperateHistoryService { }
// // WXModel.h // Industrial // // Created by boce on 2019/9/16. // Copyright © 2019 boce. All rights reserved. // #import <Foundation/Foundation.h> #import "WXApi.h" NS_ASSUME_NONNULL_BEGIN @interface WXModel : BaseReq /** 商户ID */ @property(strong,nonatomic)NSString *partnerId; /** 预付单ID */ @property(strong,nonatomic)NSString *prepayId; /** 预留(先写死) */ @property(strong,nonatomic)NSString *package; /** 随机串(用于校验签名) */ @property(strong,nonatomic)NSString *nonceStr; /** 时间戳 */ @property(assign,nonatomic)double timeStamp; /** 签名(根据随机串生成) */ @property(strong,nonatomic)NSString *sign; @end NS_ASSUME_NONNULL_END
The two-dimensional array of 2048 tilting micromirrors for astronomical spectroscopy In multi-object spectrometers, field selectors, which are located in the focal plane of the telescopes, are required for the selection of astronomical objects, such as stars or faint galaxies. We present a two-dimensional micromirror array as a field selector. Object selection is achieved through the precise tilting of micromirrors, which reflect the light of objects toward the spectrometer. These arrays were composed of 2048 (32 64) electrostatically actuated silicon micromirrors that measured 100 200 m2. The micromirrors were addressed either by lines or individually using a linecolumn addressing scheme. The fabrication process of these devices involved three wafers and two wafer-level bondings. Characterization, by white light interferometry, revealed a tilt angle of 25° at a voltage of 121V, and a coated micromirror deformation below 10nm. A fill factor of 82% and a contrast of 1000:1 were also observed. Demonstration of the linecolumn addressing scheme was achieved through its application to a sub-array of 2 2 micromirrors.
<reponame>brijoe/LaunchStarter<filename>starter/src/main/java/com/github/brijoe/starter/Starter.java<gh_stars>10-100 package com.github.brijoe.starter; import android.os.Looper; import android.support.annotation.NonNull; import android.support.annotation.UiThread; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicBoolean; /** * Starter 对外提供方法 * <p> * TaskDispatcher 管理任务 负责 将任务 交给对应的执行器 */ public enum Starter { INSTANCE; private Map<Class<? extends StartTask>, TaskWrapper> taskMap = new ConcurrentHashMap<>(); private AtomicBoolean hasStarted = new AtomicBoolean(false); private Linker linker = new Linker(); /** * 向调度器里面添加一个任务,必须在UI 线程调度 * * @param startTask * @return */ @UiThread public Starter addTask(@NonNull StartTask startTask) { assertNotNull(startTask, "task can't be null,please check"); assertMainThread(); taskMap.put(startTask.getClass(), new TaskWrapper(startTask, linker.taskTracker)); return this; } /** * 启动调度器,必须在UI线程调度 */ @UiThread public void start() { assertMainThread(); assertInit(); if (hasStarted.compareAndSet(false, true)) { linker.init(taskMap); } } private void assertNotNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } } private void assertMainThread() { if (Looper.myLooper() != Looper.getMainLooper()) { throw new IllegalStateException("must be called in UI Thread"); } } private void assertInit() { if (hasStarted.get()) { throw new IllegalStateException("can not be start again!"); } } }
3D stacked MEMS and ICs in a miniaturized sensor node 3D integration of micro electromechanical systems (MEMS) is expected to reduce the foot print of existing MEMS products and enable production of miniaturized sensor nodes on a large scale. However, 3D integration of MEMS is in general different from 3D integration of planar integrated circuits (ICs) due to additional mechanical requirements. Specifications regarding properties like stiffness, volume, and mass must be taken into consideration when selecting stacking technologies for MEMS. A demonstrator with a 3D integrated MEMS and the ideas behind the selection of stacking technologies are presented in this paper.
<gh_stars>0 package main import ( "testing" ) var testCases = []struct { in string out string }{ { in: "12:00:00AM", out: "00:00:00", }, { in: "12:00:00PM", out: "12:00:00", }, { in: "07:05:45PM", out: "19:05:45", }, { in: "05:15:50PM", out: "17:15:50", }, { in: "07:05:45AM", out: "07:05:45", }, { in: "05:15:50AM", out: "05:15:50", }, } func TestTimeConversion(t *testing.T) { // t.Skip("time conversion") for _, tt := range testCases { str := tt.in want := tt.out got := timeConversion(tt.in) t.Run("", func(t *testing.T) { if got != want { t.Errorf("string %q\ngot %q\nwant %q", str, got, want) } }) } }
/** * @author WMXPY * @description Addon * @fileoverview table card rough */ enum DOC_TABLE_ELEMENT_IMPORTANT_LEVEL { NORMAL = 0, MAJOR = 1, CRITICAL = 2, } interface IDocTableElement { name: string; value: string; important?: DOC_TABLE_ELEMENT_IMPORTANT_LEVEL; } enum EXPRESS_SPECIAL_MARK { DEPRECATED = 'DEPRECATED', REMOVED = 'REMOVED', RISKY = 'RISKY', WARNING = 'WARNING', DEBUG = 'DEBUG', } const outerStyle: string = 'width:auto;margin-top:30px;margin-bottom:30px;padding:15px'; const tableStyle: string = 'border:1px solid black;width:100%;border-collapse:collapse'; const textStyle: string = 'font-size:26px;font-weight:bold'; const leftStyle: string = 'border:1px solid black;width:25%;padding:3px;padding-right:5px;font-weight:bold;text-align:right'; const rightStyle: string = 'padding:3px;padding-left:5px;border:1px solid black'; const badgeStyle: string = 'font-size:18px;color:red;font-weight:bold'; const getBadge = (marks: EXPRESS_SPECIAL_MARK[]): string => `<div style="${badgeStyle}">${marks.join(', ')}</div>`; const getRow = (row: IDocTableElement): string => `<tr style="${rightStyle}"><td style="${leftStyle}">${row.name} </td><td style="${rightStyle}">${row.value}</td></tr>`; const getCard = (icon: string, title: string, content: IDocTableElement[], marks: EXPRESS_SPECIAL_MARK[]) => { const result = (` <div style="${outerStyle}"> <div style="display:flex;align-items:flex-end"> <div style="width:100px"> <img src="${icon}" width="100px" height="100px"> </div> <div style="flex:1;padding:8px"> ${getBadge(marks)} <div style="${textStyle}">${title}</div> </div> </div> <table style="${tableStyle}"> <tbody> ${content.map(getRow).join('')} </tbody> </table> </div> `); const contentElement: HTMLElement | null = document.getElementById('content'); if (contentElement) { contentElement.innerHTML = result; } else { alert('ERROR'); } };
Imagine you’re a single parent trying to provide for your family on the minimum wage. Even though you work full-time, you take home just $1,257 a month – below the poverty line if you’re raising one child, and well below for a two-child family. You need to pay rent, utilities, transportation and food for you and your child. You’ve got to pay for childcare too, which can often cost more than rent. Could you make that budget work? What would happen if your child gets sick or your car breaks down? It’s impossible. And yet, every day, millions of people try. ADVERTISEMENT It’s time to give Americans a raise to $15 an hour. That’s why we introduced the Raise the Wage Act, which would raise the federal minimum wage to $15 an hour. This shouldn’t be a partisan issue – and as it turns out, it’s not. Three quarters of Americans support raising the minimum wage, and almost two-thirds support raising it to $15 an hour. Nineteen states increased their minimum wage this year – from Arkansas to New York. And cities are leading the way as well, with 19 cities raising the minimum wage to $15 an hour from Seattle, Wash., to Flagstaff, Ariz. But that’s not enough. Often the problem folks have isn’t getting a job –Too many people are working longer hours and getting paid less, often times needing multiple jobs to make ends meet. In the past eight years, the value of an hour’s work at minimum wage has decreased by almost a dollar. Millions of people are working 50, 60, even 80 hours a week and still struggling to make ends meet. While many Republicans pretend minimum wage jobs are held by teenagers or young adults without dependents, it’s just not the case. The majority of people working for minimum wage are adults who contribute to their household’s income. Many are the primary breadwinner. Sixty-two percent of workers making minimum wage are women – and 6 million of those women are mothers. This hurts our communities and is bad for our economy. But most importantly, it’s just not right. If you work hard and play by the rules, you shouldn’t be struggling to survive. That’s not the America we want. Nobody knows the struggle of trying to survive on $7.25 an hour better than the workers who live it every day. That’s why in union halls and on picket lines across the country, working Americans are standing up and demanding justice and fairness for themselves, their families and the future of all working people. The Fight for $15 movement, along with dozens of labor unions and worker advocacy groups, has spent the last four years leading this effort. They’ve made the call for “$15 and a union” the rallying cry for thousands of people. And Democrats are hearing their voices. With more co-sponsors than ever before, Democrats are united in our fight for economic justice, and will stand arm-in-arm with workers demanding a better future. We also would set for the first time one fair federal minimum wage – doing away with a separate unfair wage for tipped workers (currently a paltry $2.13). Tipped workers earn 37 percent less than those who do not rely on tips, and as most tipped workers are women, this widens the gender pay gap. We stand with those protesting in the streets – poverty wages are no longer acceptable. Every single working person in this country deserves a living wage. After all, they can’t afford to accept anything less. Ellison represents Minnesota’s 5th District and is deputy chair of the DNC. Scott represents Virginia's 3rd District and is the ranking member of the Education and The Workforce Committee. The views expressed by this author are their own and are not the views of The Hill.
/** * <p> * A node which creates a user in ForgeRock IDM by calling the user endpoint * with the action query parameter set to create: * <b><i>{@code ?_action=create}</i></b>. * </p> */ @Node.Metadata(configClass = LegacyFRCreateForgeRockUser.LegacyFRCreateForgeRockUserConfig.class, outcomeProvider = AbstractLegacyCreateForgeRockUserNode.OutcomeProvider.class) public class LegacyFRCreateForgeRockUser extends AbstractLegacyCreateForgeRockUserNode { private final Logger logger = LoggerFactory.getLogger(LegacyFRCreateForgeRockUser.class); private final LegacyFRCreateForgeRockUserConfig config; LegacyFRObjectAttributesHandler legacyFRObjectAttributesHandler; LegacyFRService legacyFRService; public interface LegacyFRCreateForgeRockUserConfig extends AbstractLegacyCreateForgeRockUserNode.Config { @Attribute(order = 2, validators = { RequiredValueValidator.class }) Map<String, String> migrationAttributesMap(); } /** * Creates a LegacyFRUserAttributesCollector node with the provided * configuration * * @param config the configuration for this Node. * @param realm the realm of the current Node. * @param serviceRegistry instance of the tree's service config. */ @Inject public LegacyFRCreateForgeRockUser(@Assisted Realm realm, @Assisted LegacyFRCreateForgeRockUserConfig config, AnnotatedServiceRegistry serviceRegistry) { this.config = config; this.legacyFRObjectAttributesHandler = LegacyFRObjectAttributesHandler.getInstance(); try { legacyFRService = serviceRegistry.getRealmSingleton(LegacyFRService.class, realm).get(); } catch (SSOException | SMSException e) { e.printStackTrace(); } } /** * Main method called when the node is triggered. */ @Override public Action process(TreeContext context) { logger.info("LegacyFRCreateForgeRockUser::process > Started"); String legacyCookie = context.sharedState.get(LEGACY_COOKIE_SHARED_STATE_PARAM).asString(); String userName = context.sharedState.get(USERNAME).asString(); if (legacyCookie != null) { Response response; JsonValue entity; try { response = getUser(legacyFRService.legacyEnvURL() + userName, legacyCookie); if (!response.getStatus().isSuccessful()) { return goTo(false).build(); } entity = JsonValue.json(response.getEntity().getJson()); return updateStates(context, entity); } catch (RuntimeException e) { logger.error("LegacyFRCreateForgeRockUser::process > RuntimeException {0}", e); } catch (IOException e) { logger.error("LegacyFRCreateForgeRockUser::process > IOException {0}", e); } catch (InterruptedException e) { logger.error("LegacyFRCreateForgeRockUser::process > InterruptedException {0}", e); Thread.currentThread().interrupt(); } } else { logger.warn("LegacyFRCreateForgeRockUser::process > Legacy Cookie is null"); } return goTo(false).build(); } /** * Updates both the sharedState and the transientState (if it's the case) * SharedState will receive an OBJECT_ATTRIBUTES object which will contain all * the relevant info for the specified user TransientState will receive a * password set for the specified user * * @param context the tree context * @param entity the response body * @return the action */ public Action updateStates(TreeContext context, JsonValue entity) { JsonValue copySharedState = context.sharedState.copy(); Action.ActionBuilder resultedAction = goTo(true); JsonValue userAttributes = legacyFRObjectAttributesHandler.updateObjectAttributes(entity, copySharedState, config.migrationAttributesMap()); if (config.setPasswordReset()) { JsonValue userAttributesTransientState = setPassword(context); if (userAttributesTransientState == null) { return goTo(true).build(); } resultedAction .replaceTransientState(context.transientState.put(OBJECT_ATTRIBUTES, userAttributesTransientState)); } if (userAttributes != null) { resultedAction.replaceSharedState(context.sharedState.put(OBJECT_ATTRIBUTES, userAttributes)); } return resultedAction.build(); } /** * Puts the user's password on OBJECT_ATTRIBUTES * * @param context the context of the currently running node * @return the updated OBJECT_ATTRIBUTES that will be added or updated on * Transient State */ public static JsonValue setPassword(TreeContext context) { String password; JsonValue userAttributesTransientState = null; if (context.transientState.isDefined(PASSWORD)) { // The password is defined on transient state password = context.transientState.get(PASSWORD).asString(); if (context.transientState.isDefined(OBJECT_ATTRIBUTES)) { // The OBJECT_ATTRIBUTES is defined on transient state JsonValue objectAttributes = context.transientState.get(OBJECT_ATTRIBUTES); if (objectAttributes.isDefined(PASSWORD)) { objectAttributes.remove(PASSWORD); } // Add the password to OBJECT_ATTRIBUTES objectAttributes.add(PASSWORD, password); userAttributesTransientState = objectAttributes; } else { // The OBJECT_ATTRIBUTES is not defined on transient state userAttributesTransientState = JsonValue.json(JsonValue.object(JsonValue.field(PASSWORD, password))); } } return userAttributesTransientState; } /** * Get the user information from the legacy AM's DS * * @param endpoint the endpoint * @param legacyCookie the legacy cookie * @return the client response * @throws InterruptedException when exception occurs */ public Response getUser(String endpoint, String legacyCookie) throws InterruptedException { try (Request request = new Request()) { request.setMethod(GET).setUri(endpoint); request.getHeaders().add(COOKIE, legacyCookie); request.getHeaders().add(CONTENT_TYPE, APPLICATION_JSON); logger.info("LegacyFRCreateForgeRockUser::getUser > Sending request"); try (HttpClientHandler httpClientHandler = new HttpClientHandler()) { return new Client(httpClientHandler).send(request).getOrThrow(); } } catch (URISyntaxException | HttpApplicationException | IOException e) { logger.error("LegacyFRCreateForgeRockUser::getUser > Failed. Exception: {0}", e); } return null; } }
1. Field of the Invention The present invention relates in general to an optical waveguide device and in particular to an optical device that requires the use of an optical waveguide modulator and a polarizing filter for separating a polarization light. 2. Description of Related Art In the case of an optical waveguide device using a substrate having an electro-optical effect, a portion having a high index of refraction is created in the substrate. In addition, electrodes between which a voltage is applied are created above the wave guide or in close proximity to it. A voltage applied between the electrodes generates an electric field in the substrate, changing the index of refraction of a waveguide. Variations in index of refraction occurring in the waveguide in turn modulate the phase and intensity of a light or switch the path of the light. First of all, the following description briefly explains the structure and operation of a light-intensity modulating device that utilizes an electro-optical effect closely related to the present invention as an example of an optical waveguide device. In addition, a technology for separating a polarization light is also described briefly as well. In general, a niobium-acid lithium substrate having a relatively high electro-optical effect among strong dielectrical materials is used as the substrate of the optical waveguide device. In the optical waveguide device using a niobium-acid lithium substrate, a titanium film created on the substrate undergoes a patterning process to form a waveguide pattern. Later on, a wave guide is formed by thermal diffusion for several hours at a high temperature of about 1,000 degrees Celsius. A silicon dioxide buffer film layer which is referred to hereafter as an SiO.sub.2 film is created on the wave guide. Electrodes each made of a metallic film are further created on the SiO.sub.2 film. In some cases, a silicon film which is referred to hereafter as an Si film is created between the SiO2 film and the metallic film. In the optical waveguide device, it is possible to integrate a function for modulating a light and a function for switching the path of a light on the substrate. In addition, since these functions are high-speed functions, development of the optical waveguide device as an external modulator used in mass optical communication and an optical-path switch employed in an OTDR (Optical Time Domain Reflectometer) is under way. Depending upon the application of the optical waveguide device, a polarization-light independent type and a low driving voltage type are demanded. It is important that the polarization-light independent type be used in an optical-path switch of an OTDR. On the other hand, it is important that the low driving voltage type can be used for a high-speed optical modulator. Normally, in an optical waveguide device of the latter type, either a TE mode (that is, a mode in which the electric field component of a waveguide light is parallel to the substrate) or a TM mode (that is, a mode in which the magnetic field component is parallel to the substrate) is selected in order to reduce the driving voltage. When a niobium-acid lithium Z-cut substrate is used, a waveguide light of the TM mode with a driving voltage of about one-third of that of the TE mode is used. When only one polarization wave is to be applied to the optical waveguide device, or when a polarization wave is to be split into components which are then each applied to the optical waveguide device, it is necessary to increase the polarization-wave quenching ratio (that is, a ratio of a TE component to a TM component) of the light source. In addition, it is also necessary to provide a polarization maintain fiber, which is referred to hereafter as a PMF, for optically connecting the light source to the end surface of a waveguide and, at the same time, to also sustain the main axis of the PMF in a stable state in directions perpendicular and parallel to the waveguide. In the case of such a configuration, it is theoretically possible to apply only a predetermined polarization component to the waveguide. Because of angle adjustment of the main axis, fiber related factors, or factors external to the fiber such as variations in temperature and a stress applied to the fiber, however, it is quite within the bounds of possibility that the polarization-wave quenching ratio deteriorates. The deterioration of the polarization-wave quenching ratio in turn gives rise to distortion of the modulated waveform, degrading the transmission quality. In addition, the three conventional polarization-light separating technologies described previously require a special structure of the waveguide and special processes for manufacturing the waveguide in order to obtain the necessary functions. As a result, the conventional optical waveguide device has problems that elements constituting the waveguide increase in size while the structure of the waveguide becomes complex and, on the top of that, the number of manufacturing processes increases and it becomes difficult to maintain a high manufacturing yield.
1. Field of the Invention The present invention relates to an image pickup apparatus having an openable and closable display panel, a control method therefor, and a computer-readable storage medium storing a program for implementing the control method. 2. Description of the Related Art A camera or video camera whose case is rendered waterproof (hereafter referred to as the “waterproof camera”) so as to prevent water from entering an interior of the camera has been commercialized. Because the waterproof camera itself does not have to be covered with a special housing (waterproof case), input operations on operation keys are not limited (operability is not impaired), and because accidental submersion in water can be prevented, the waterproof camera is particularly suitable for outdoor use. The waterproof camera is used on water or in water in many scenes, and hence operation keys may be unexpectedly depressed under the influence of a water stream or water pressure. To address this, there has been proposed a technique that, when a pushbutton switch for use only on water has been continuously depressed for a predetermined time period or longer, determines that this is an erroneous operation, and disables operation inputs (see, for example, Japanese Laid-Open Patent Publication (Kokai) No. 2001-100270). Also, there has been proposed a pushbutton switch having a mechanical structure that cancels water pressure applied to the pushbutton switch according to water pressure (see, for example, Japanese Laid-Open Patent Publication (Kokai) No. 2006-156116). A video camera is generally provided with an openable and closable display panel (such as an LCD panel) as well as a pushbutton switch as described above, and opening and closing of the display panel is used as a switch. For example, it has been known that when closing of the display panel is detected, shooting is terminated, and the video camera is switched into a standby mode. Because the area of a display panel is larger than that of a pushbutton switch, the display panel is susceptible to water streams and wind. Thus, for example, under the influence of a strong wind or wind gust at any usage location, or under the influence of a water stream such as unexpectedly becoming covered with a wave during use near water, the display panel may be closed, causing shooting to be unintentionally terminated to end in failure.
Green Oaks has bounced back from an 'inadequate' rating two years ago to score 'good' in its latest inspection. A Northampton primary school that once earned the lowest rating available from Ofsted has been praised by the watchdog for making 'a complete transformation'. The pupils of Green Oaks Primary Academy are celebrating after climbing back from the damning inspection into a 'good' rating in just two years. In the latest inspection published yesterday (November 29), Principal Wendy Gordon and her team were praised for turning the failing school around and lifting it out of special measures. The report reads: "The principal and the new leadership team have transformed the school. "Leaders have been successful in eradicating previously inadequate teaching... There is a harmonious busy and purposeful atmosphere in classrooms. "Pupils are polite, behave well and are kept safe. Instances of bullying are extremely rare." In 2016, Green Oaks was handed an 'inadequate' rating by Ofsted after inspectors found what they called a 'legacy of underachievement'. The acting headteacher - Mrs Erica Holt - and four teachers left shortly after. Principal Gordon took her post in January 2017, and since then, spot visits by the watchdog reported 'improvement at a rapid pace'. Now, the school is celebrating after earning the stamp of approval. Students and teachers gathered yesterday to unveil a new banner with the rating to hang on the school fence. Principal Gordon said: "I am thrilled with the latest Ofsted rating, which clearly recognises our hard work. It has been a real team effort and I would like to thank everyone, including our parents, for the parts they have played. "I am proud that the children at Green Oaks are happy, achieving well and proud to wear their uniforms. "We will continue to hold our high expectations and work on the groundwork we've laid in the past two years." The academy's sponsor, Greenwood Academies Trust, was also commended for supporting the staff.
<reponame>Eyadplayz/Project-Architesis #pragma once #include <SDL2/SDL_render.h> #include "GuiElement.h" class GuiTextureData { public: GuiTextureData(void *buffer, uint32_t filesize, bool freesrc = false); explicit GuiTextureData(SDL_Texture *texture); explicit GuiTextureData(const std::string &path); //!Destructor ~GuiTextureData(); void draw(Renderer *pVideo, const SDL_Rect &rect, float angle); int setBlendMode(SDL_BlendMode blendMode); [[nodiscard]] int32_t getWidth() const { return width; } [[nodiscard]] int32_t getHeight() const { return height; } protected: void loadSurface(SDL_Surface *pSurface); SDL_Surface *imgSurface = nullptr; void cleanUp(); SDL_Texture *texture = nullptr; int32_t width = 0; int32_t height = 0; SDL_BlendMode blendMode; };
A stirring system using suspended magnetically-actuated pillars for controlled cell clustering Controlled stirring of a solution is a household task in most laboratories. However, most stirring methods are perturbative or require vessels with predefined shapes and sizes. Here we propose a novel stirring system based on suspended magnetically-actuated pillars (SMAPs), inspired by the ability of biological flagella and cilia to generate flow. We fabricated flexible, millimeter-scale magnetic pillars grafted on transparent polydimethylsiloxane (PDMS) substrates and built a simple actuation setup to control the motion of the pillars remotely. We tested the system with a standard 24-well plate routinely used in most research laboratories and demonstrate that the magnetic actuation results in robust bending of the pillars and large-scale fluid flow in the wells. Quantitative analysis using computational fluid dynamics modeling indicates that the flow profile in the well can be tuned by modulating the applied magnetic field and the geometries of the well and the pillar. Finally, we show that, by employing the stirring system in a standard cell culture plate, we were able to obtain controlled clustering of cells. The SMAP stirring system is therefore a promising cost-effective and scalable stirring approach for various types of studies involving colloids as well as soft and biological materials. Introduction Stirring a solution or a particle dispersion is a common task performed in everyday life as well as in most industrial and academic research laboratories. Many scientific applications, such as the aggregation and break-up of colloidal suspensions, droplet coalescence, and studies of peptide/protein-particle interactions, require controlled stirring with well-defined speed, flow profile, and intermittence. 1 In most research laboratories, controlled stirring is applied using a standard, commerciallyavailable magnetic stirrer plate together with stirrer bars, which are placed at the bottom of the vessel holding the solution to be stirred. This stirring system, while simple, is expensive (hundreds to thousands USD) and necessitates relatively large sample volumes in the range of mL to L. These large required volumes are sometimes prohibitive, especially for studies involving precious materials. Such a stirring system is also much less applicable in the context of cell biological research, as the motion of the stirrer bar at the bottom of the flask would disrupt and damage the culture of adherent cells. Other, more specialized stirring methods have been developed and commercialized for cell research, such as spinner flasks and various types of stirred-tank and wheel reactors (see a recent critical summary by Schnitzler et al. 2 ). These approaches can induce fluid flow in the vessel yet eliminate possible cell damage caused by the stirrer bar, either by effecting whole-vessel movements or by physically separating the cell culture from the impeller. However, all these technologies are costly, involve special equipment and application-specific vessels with predefined shapes and sizes that are often single-use, and still require large sample volumes (mL to L and kL). A scalable, cost-effective solution is required, especially with the growing appreciation and rapid advance of three-dimensional cultures that mimic in vivo environments. 3,4 In this study, we introduce a novel stirring system that circumvents the above issues using a suspended magneticallyactuated pillar (SMAP). The approach is inspired by biological flagella, which are ubiquitous structures used by microorganisms to propel themselves forward and 'swim'. 5,6 As the beating motion of the flagella (and, in a similar fashion, the collective beating motion of hairy cilia) is very effective in generating fluid flow, including in low-Reynolds-number environments, 7 researchers have over the past decade intensively explored the usefulness of creating synthetic analogs of flagella and cilia for sensing and controlling local flow. 8 These artificial cilia and flagella are slender, flexible filaments that are grafted onto the walls of a microchannel and externally actuated, and have been used for pumping and mixing purposes in microfluidic setups. Recently, we developed a micro-molding method to fabricate an array of flexible magnetic artificial cilia made of a composite material consisting of polydimethylsiloxane (PDMS) and magnetic microparticles. 21 These artificial cilia were successfully demonstrated to induce versatile flow in microfluidic channels, and have the added advantage of being compatible with biological fluids and cells. Here we ask whether the same principle can be applied at a larger scale (mm-cm), as a stirring system. To ensure that the stirring system is minimally destructive, we built suspended millimeter-sized pillars from the same PDMS-based composite material that can be magnetically actuated, and determined the flow that can be induced experimentally and computationally. We found that SMAP can indeed effectively generate the desired macroscale flows. As a potential application of this system, we show that SMAP can be used in a typical 24-well cell-culture plate to effectively induce 3D spatial clustering of mammalian cells. The SMAP stirring system therefore offers a scalable, low-cost, and versatile approach that can be easily adopted for a wide range of applications. Fabrication of suspended magnetic pillars The magnetic precursor material used to fabricate the SMAPs is composed of thermally curable polydimethylsiloxane (PDMS, Sylgard 184, Dow Corning, Moerdijk, the Netherlands; 10 : 1 base to curing agent weight ratio) and carbonyl iron powder (CIP, 5 mm diameter, 99.5%, Sigma-Aldrich, Zwijndrecht, the Netherlands). The weight ratio between PDMS and CIP was kept at 1 : 1, except for the pillars with concentrated magnetic particles at the tips (see below), for which the weight ratio was 5 : 1. The magnetic precursor material was prepared by vigorously mixing PDMS and CIP by hand for 10 min. The SMAPs were fabricated using a molding method that was adapted from the micro-molding approach reported earlier for the fabrication of magnetic artificial cilia. 21 Briefly, it consisted of 6 main steps (Fig. 1A). Step 1, a polycarbonate (PC) mold was fabricated using micro-milling (Mikron wf 21C), featuring wells with a diameter of 1 mm and a height of 7 mm. Step 2, the prepared magnetic precursor material was poured onto the mold and degassed using a vacuum pump at a vacuum pressure of 2 mbar to remove air bubbles. Step 3, the excess precursor material outside the wells was erased with a scraper and cleanroom tissues (Technicloth TX606, Texwipe). Step 4, pure PDMS solution (i.e., without the CIP) was poured onto the mold. This layer will function as a transparent substrate for suspending the magnetic pillar. Note that, in order to minimize the vertical distance between the SMAP and the actuating magnet in our setup (described in the next section), the thickness of this PDMS substrate was set to 6 mm. Step 5, the mixture was cured in an oven for 2 h at 65 1C. Step 6, the cured PDMS structure was peeled off the PC mold with the help of isopropanol to facilitate the release of the structure. Finally, the pillars, supported by a transparent PDMS substrate, were obtained. This protocol results in magnetic pillars with a homogeneous distribution of magnetic particles (hSMAP). Previous studies have indicated that variations in the distribution of magnetic particles can influence the magnetic properties and actuated motion of artificial cilia, due to the anisotropy of the cilia shape and of the particle arrangement. 21,22 This provides a possible strategy to tune the magnetic susceptibility of the SMAPs and therefore enhance their actuation properties, by varying the distribution of CIP in the SMAPs. To test this, in addition to the SMAP with random distribution of magnetic particles, we also fabricated two other types of SMAP: pillars with an aligned magnetic particle distribution (aSMAP) and pillars with a concentrated magnetic particle distribution at the tips (cSMAP). The fabrication processes for aSMAP and cSMAP were based on that of hSMAP. To fabricate the aSMAP, a permanent magnet (10 10 5 mm 3 ) with a remnant flux density of 1.3 T was placed under the mold during step 5 to align the magnetic particles along the magnetic field (Fig. 1B). The cSMAP was fabricated making use of the relatively high mass density of the magnetic particles compared to that of the PDMS solution (r CIP : r PDMS E 8 : 1). Utilizing Stokes' law and the known physical properties of the PDMS solution and the magnetic particles, 21 the travel time for the particles to reach the bottom of the mold can be estimated to be 2-3 h under ideal conditions. Directly after step 4, the sample was placed in a fridge at 5 1C for 3 days to slow down the curing of the PDMS, offering enough time for the magnetic particles to settle at the bottom of the mold (Fig. 1C). This is in contrast to the fabrication process of the hSMAP, where the magnetic particles did not have enough time to settle before the PDMS is solidified, resulting in a homogeneous distribution of the particles in the hSMAPs. We also found that when weight ratio between PDMS and CIP was maintained at 1 : 1, the interactions between the highly-concentrated particles and the high viscosity of the PDMS solution prevented the particles from settling at the bottom even after 3 days. For this reason, we used a reduced weight ratio of 5 : 1 for obtaining cSMAPs. After these modified steps, the pillars can be released from the mold to obtain aSMAP and cSMAP. Actuation setup A simple home-built magnetic actuation setup was used to actuate the SMAPs ( Fig. 2A). The setup consists of a unipolar stepper motor (Wantai Nema 17) with an aluminium supporting plate for the stacked three pieces of permanent magnets. The setup was fixed in the center of a transparent safety box made from poly (methyl methacrylate) (PMMA) (Fig. 2B). Each magnet has a geometry of 20 20 5 mm 3 with a remnant flux density of 1.3 T. The top surface of the safety box contains a circular opening of 40 mm in diameter, which allows the magnet to rotate freely and minimizes the vertical distance h between the magnets and the SMAP on top of the safety box. In our setup, h was set to be 20 mm, close to the height of a 24-well plate used in the cell experiment. The SMAP, supported by a glass plate which was used as the lid of the well, was aligned with the rotating axis of the motor with the help of a stereo microscope (Olympus SZ61, Leiden, the Netherlands) for capturing the flow in the well. The magnets were placed with an offset distance d of 4 mm with respect to the rotation axis of the motor to induce bending of the pillar towards the stronger magnetic field and thus actuate the SMAP to perform a vertical cone motion. The choice of the parameter values of h and d in this study was based on the constraining dimensions of the well plates and the magnets; other parameter values can be chosen as suited to the specific experimental setup. Note that this actuation scheme, in which the magnetic gradient force actuates the pillar, differs from that used previously for magnetic artificial cilia, where the cilia tend to align with the applied magnetic field due to the magnetic torque acting on them. 21 To control the motor, we used a microcontroller board (Arduino Uno), a dual H-bridge drive controller board (L298N), an analog potentiometer to tune the motor speed, and a LED screen to display the speed. Characterization of pillar motion and medium flow A high-speed camera (Phantom V9, Vision Research, Bedford, UK) mounted on the stereo microscope was used to capture the topview motion of the SMAPs and the generated liquid flow. The tip deflection of the SMAPs, projected on the x-y (horizontal) plane, was measured from static snapshots and averaged for each type of SMAP. To characterize the flow generated by the SMAP, we filled one well of a 24-well plate with deionized water seeded with 30 mm polylactic acid particles (micromod Partikeltechnologie GmbH, Rostock, Germany) as fiducial markers, and then we placed the SMAP onto this well. Subsequently the SMAP was actuated by the magnetic setup to perform the vertical cone motion. The high-speed camera was used to capture the generated flow at a frame rate of 150 fps. The generated flows close to the SMAP tip were measured by a Manual Tracking analyses in ImageJ. Computational fluid dynamics (CFD) analysis Flow patterns in the well were quantified by numerically solving the Navier-Stokes equations using ANSYS CFX (Ansys Inc., Canonsburg, PA, USA). An accurate computer-aided design model of the well in a 24-well plate culture chamber, as used in the experimental setup (height = 16.5 mm, bottom diameter = 15.7 mm, top diameter = 16.28 mm), was constructed using SolidWorks (Dassault Systmes, Vlizy-Villacoublay, France). The fluid domain and the magnetic pillar were meshed using 9633 hexahedral and 14 048 tetrahedral elements, respectively, using ANSYS Meshing (Ansys Inc., Canonsburg, PA, USA). To keep the computational cost affordable, we assumed that the magnetically-actuated bending of the SMAPs and any effect of hydrodynamic forces achieve a steady state, after which there is no further deformation of the pillar. This allows us to model the magnetic pillar as a rigid-body spinning at a constant rotation, thus circumventing the need to couple a finiteelement-based structural solver to compute the motion of the magnetic pillar. As a result, ANSYS CFX's build-in immersed solid method was used to resolve the fluid-structure interaction. Furthermore, we made two assumptions: the flow is laminar. This assumption is always satisfied within the range of angular rotations that we experimentally investigated in this study (150-300 rpm; Reynold's number o 1). The fluid is single phase, isothermal, incompressible, and Newtonian. Flow profiles generated by a 7 mm magnetic pillar in water at 37 1C were visualized at four actuation speeds: 150, 200, 250, and 300 rpm. To model stirring using the aSMAPs, the geometry of the deformed pillar during stirring was constructed to capture the experimental tip deflection of the aSMAPs. No-slip boundary conditions were prescribed on the domain walls while the fluid motions was resolved by prescribing a constant rpm to the magnetic pillar. Cell stirring experiments MDA-MB-231 cells were cultured in RPMI medium containing 10% FBS and 1% penicillin-streptomycin at 37 1C and 5% CO 2. The SMAP, attached to a cover slip, was fixed to the lid of a 24 well-plate with tape and sterilized with 70% ethanol and UV exposure for 5 minutes. For the stirring experiments, 5 10 5 cells were seeded into a 24-well plate culture chamber (Greiner Bio-One CELLSTAR, 662160, Alphen a/d Rijn, the Netherlands). The lid containing the SMAP was placed on top of the 24-well plate, and the sample was transported to the actuation setup in an incubator at 37 1C and 5% CO 2. After 20 h of stirring, micrographs of the cells were taken with an EVOS XL Core Cell Imaging System (Thermo Fisher Scientific, Waltham, MA, USA) equipped with a 4 objective lens. Magnetic particle distribution affects pillar deflection Fig. 3A-C shows optical microscopy images of the 3 types of fabricated SMAPs and the corresponding magnetic particle distributions. The SMAPs are shown to be cylindrically shaped with a pointed tip, reflecting the shape of the mold used in the fabrication process, with a diameter of 1 mm and a length of 7 mm. For the hSMAPs, the magnetic particles are homogeneously distributed as expected, with only a few randomly-located regions of high or low magnetic particle concentrations (Fig. 3A). For the aSMAPs, the application of the magnetic field during the fabrication process results in an ordering of magnetic particles into linear chains oriented along the length of the pillars (Fig. 3B). The slow curing step in the fabrication of the cSMAPs successfully leads to a concentrated region of magnetic particles at the tip of the pillar, with a clear boundary between the CIPrich section and the pure PDMS section at the root of the pillar (Fig. 3C). With our fabrication protocol, the average length ratio between these two sections is found to be 1 : 2. To assess how the variations in the magnetic particle distribution influence the effectiveness of SMAPs as a stirring system, we actuated the different types of SMAP with our actuation setup and recorded the motion of the SMAPs. The projected tip deflections of the SMAPs are shown in Fig. 3D. We find that the deflection of the aSMAPs is significantly larger than the deflection of the other two types of SMAPs. This is consistent with the theoretical prediction that aligned magnetic View Article Online particle distribution enhances the overall magnetic susceptibility. 21 The deflection of the cSMAPs is the smallest and is close to that of the hSMAPs. This can be explained by the prediction that the magnetic forces acting on the pillars are proportional to the weight of the magnetic particles, 21 as the cSMAPs contain only 20% of the magnetic particles compared to hSMAPs and aSMAPs, resulting in a decreased tip deflection. Since the aSMAPs show the best actuation performance, indicated by the largest tip deflection, we used them for the remainder of the present study. Pillar motion is enough for stirring We next asked whether the magnetically-induced bending and rotation of the SMAPs was enough to generate fluid flow in a well. To be able to visualize the fluid flow, we added microparticles as fiducial markers in the fluid and recorded their motion in water resulting from SMAP motion. As shown in Fig. S1 and Video S1 in the ESI, the SMAP rotating motion is strong enough to generate flow in the whole well. It can be seen that the flow is faster near the tip of the pillars, compared to further away from the pillar tip. However, the flow is not homogeneous, making it difficult to experimentally resolve the flow at different depth and locations in the well. To obtain more insights into the flow induced by the motion of the SMAPs, we performed CFD simulations of the SMAP stirring. Furthermore, we tested the effect of different stirring speeds on the flow by applying angular frequencies in the range of 150-300 rpm. This range of stirring speeds lies within the range accessible for most commercial stirrer plates as well as our magnetic actuation setup. The flow velocity profiles generated by the stirring motion of a 7 mm pillar in a well of the same dimensions as that used in the experiments are shown in Fig. 4. Consistent with the experimental observation, the simulations indicate that the pillar motion can effectively induce large-scale flow in the well, even at heights more than 2 mm below from the tip of the pillars (Fig. 4A). The flow is highest at the trajectory of the pillar, reaching 40-90 mm s 1, and decays with increasing distance from the pillar (Fig. 4B). View Article Online Increasing the rotation speed results in higher fluid flow at all locations in the well. The vertical cross-sectional flow profiles suggest that circumferential flow is maintained away from the pillar ( Fig. 4B and C), reaching B40% of the maximum flow at the opposite face of the well (Fig. 4D). Moreover, the stirring motion generated a vortex along the rotation axis of the pillar, characterized by a local drop in the flow velocity. Interestingly, the flow profile near the bottom of the wells show a clear dependence both on the rotation speed and on the radial location ( Fig. 4C and E). At the center and near the edge of the well, the flow in the radial direction is close to zero, while at other locations there is a counter-current directed towards the center of the well. Flow-induced cell clustering The rotation-speed-dependent radial flow suggests that tuning the stirring speed can be a simple approach to control the shear stresses at the bottom of the wells, which in turn can regulate the spatial deposition of particles. This is particularly interesting for cell culture, as it may offer a way to promote controlled clustering of cells without labeling. As a proof of concept, we experimentally performed the stirring experiment in cell-seeded wells with different stirring speeds (Fig. 5A), and observed the distribution of MDA-MB-231 cells at the bottom of the well after 20 h of culturing (Fig. 5B). The MDA-MB-231 breast cancer cell line, cultured either as single cells, clusters, or spheroids, is commonly used as a tumor model for studying cancer invasion and testing drug efficacy. Stirring using SMAP at 200, 250, and 300 rpm was found to induce clustering of cells in the center of the well (Fig. 5C, E and G) and, to a lower extent, at the edge (i.e., close to the wall) of the well (Fig. S2B-D in the ESI ). Moreover, the stirring speed influenced the size of the cluster: increasing the stirring speed from 200 to 250 and 300 rpm resulted in monotonically decreasing cluster size. The clusters remained stable even after 2 days of further culture and change of medium without stirring. This indicates that the clusters were not only aggregates but the cells actually formed stable cell-cell adhesions that support 3D cell spheroid, as is expected for MDA-MB-231 cells. 27 In contrast, a control experiment at 0 rpm did not result in any cluster formation (Fig. S3 in the ESI ), whereas stirring at 150 rpm only generated clusters at the edge, but not in the middle, of the well (Fig. S2A in the ESI ). We hypothesize that the formation of cell clusters in the middle and at the edge of the well is associated with SMAPinduced radial flow of medium (Fig. 4E) and the associated wall shear stress (WSS) at the bottom of the well. To check this, we plot the WSS profiles, which are remarkably consistent with the locations of the cluster formation: areas of low WSS are associated with cluster formation for all stirring speeds (Fig. 5D, F and H), including at the edge of the well (Fig. S2 in the ESI ). This suggests that radial flow near the bottom of the well pushes the cells towards the center and the edge of the well, where flow and WSS are low or even close to zero. When the stirring speed is too low (150 rpm), the WSS is not strong enough to redistribute the cells towards the center of the well and cluster formation only happens at the edge of the well. Comparison between the experimental and simulation results suggests a threshold WSS around 10 mPa (dashed circles in Fig. 5D, F and H), below which local cluster formation occurs. It is worth noting that the magnitudes of WSS experienced by the cells at the bottom of the wells as induced by our stirring system is very low (in the order of mPa), and are thereby not expected to affect cell viability or phenotype. Discussion In this paper, we introduce a stirring system using suspended magnetically-actuated pillars (SMAPs) that can be simply constructed with minimal technical requirements. The SMAPs are fabricated by molding a mixture of PDMS and magnetic particles. The dimensions of the mold and therefore the SMAPs can be adapted depending on the required size of the vessel to be stirred. Here we demonstrate the use of SMAPs, together with a home-built magnetic actuator, as a stirring system in a standard 24-well culture plate. While here we focus on the proof-of-concept experiment of stirring in a single well, parallelizing for stirring in multiple wells can be achieved in a straightforward manner by implementing a standard mechanical design of a gear system controlling the rotating motion of multiple magnets. To match the dimensions of the gear system with the well plate, one can either employ magnets and support plates with smaller sizes than those used in the present study or opt for larger wells (e.g., a 6-well plate or even a custom-sized well plate as desired). Scaling down of the stirring system to smaller dimensions (i.e., micrometer scale) has been achieved in our earlier work. 21 Scaling up to larger wells (or well plates) is in theory straightforward, by fabricating larger SMAPs. Indeed, the magnetic susceptibility and the resulting deflection of the SMAPs can be tuned in multiple ways: by modifying the distribution of the magnetic particles in the SMAPs (as we showed through the comparison of hSMAP, aSMAP, and cSMAP), by changing the dimensions and/or stiffness of the pillars, by using magnets with different flux densities, or by varying the distance between the SMAP and the actuating magnets. These strategies give flexibility to the experimenter to adjust the design of the stirring system based on the exact experimental setup, and therefore makes the system scalable. The stirring motion of the SMAP is able to generate largescale fluid flow, which can be characterized numerically using CFD analysis. Here we performed the computational analysis assuming a non-deformable pillar. Although this is sufficient in the case of steady-state and constant stirring rotation, it will not be suited to model experiments with dynamically varying stirring speed. To get an impression on the variation of the flow profiles caused by different geometric modeling of the pillar, we performed an additional set of simulations, assuming that the pillar was a completely rigid (i.e., rather than bendable) rod ( Fig. S4 in the ESI ). Although the overall flow profiles are comparable to those of bent pillars (Fig. 4), it can be seen that the magnitude of the flow velocities are slightly larger in the case of the rigid rod. We therefore recommend a careful characterization of flow using realistic pillar geometries and hydrodynamics when dynamic stirring is required. Our study demonstrates that the flow generated by the SMAP motion can be exploited for controlling spatial distribution of particles. More specifically, qualitative comparison between our experimental and computational data suggests that the radial flow and wall shear stress at the bottom determine the deposition of particles. Indeed, as one potential application of our SMAP stirring system, we showed that the system is able to produce controlled multicellular clustering, which is an important first step to obtain 3D cell culture, in standard 24-well cell culture plates. Comparison between cluster formation at different stirring speeds indicates that the size of the cluster depends on the stirring speed: cluster size decreases with increasing stirring speed. This trend is consistent with previous reports of flow-induced cell clustering obtained using commercial orbital rotary shaker or spinner flasks. 28,29 It is worth noting that the magnitude of the angular velocities in these studies (25-75 rpm) is significantly lower than that used in our present study (200-300 rpm), because of the large vessel size necessitated by these methods. Moreover, we find that a 150 rpm stirring speed fails to produce cell clusters, suggesting that there may be an optimal window of the flow speed in the well that enables cell clustering. We emphasize that a quantitative comparison between our experimental and computational results would be speculative at this stage; more detailed flow simulations involving fluid-structure interactions and modeling of the dispersed, deformable particles or cells are required. Further, we note that, in practice, the resulting cell cluster size is dependent not only on the stirring speed, but also on other detailed experimental variables, such as the cell seeding density, fluid volume, well size, and potentially also cell type. A systematic investigation into the effect of modulating these experimental variables on cell clustering can provide an interesting avenue for future studies especially involving 3D cell culture. 3D cell culture is increasingly recognized to better mimic in vivo conditions than conventional 2D cell culture. 30,31 To date, various methods to obtain 3D cell culture have been developed, but these methods have several important drawbacks. 4 For example, agitation-based approaches such as spinner-flask bioreactors 32,33 require specialized equipment and consumables and are commercially available only in predefined shapes and size; the hanging-drop and forced-floating 37 methods often suffer from limitations in the size and variability of cell spheroids and are either labor-intensive (when custom-prepared) or expensive (with commercial products); microwell-based approaches are suitable for high-throughput production of well-defined cell aggregates but may require extensive and costly optimization process of the fabricated microwell patterns; contactless cell manipulation such as the magnetic levitation method inherently involves magnetization of cells that raises toxicity and epigenetics questions; whereas microfluidics-based 44 and scaffolds-based 45 approaches require expertise in microfabrication or polymer chemistry and entail difficult sample retrieval and analysis. The SMAP stirring system circumvents some of these drawbacks by allowing the experimenter to steer the organization of cells with any standard culture plate with simple scaling of the SMAP geometry. The stirring procedure is contactless, label-free, and single-step, thereby making the strategy timeand labor-efficient. Another advantage of the SMAP stirring system is that in principle it requires no specialized equipment. In this article we employed a home-built magnetic actuation setup to demonstrate the simplicity and cost-effectiveness of building the complete system (total cost o USD 50). However, the SMAP can also be actuated using common laboratory stirrers with only minimal modification: a magnet should be affixed off-axis on the rotator of the stirrer. Conclusions We propose a novel stirring system based on suspended magnetically-actuated pillars (SMAPs). The main strengths of this system are that it is cost-effective, contactless, simple to fabricate, easily scalable to fit the geometry of the vessel of choice, and requires no specialized equipment. Moreover, it is straightforward to modulate the resulting flow by taking into account the geometries of the SMAP and the vessel and to parallelize the system to perform high-throughput experiments. Thus, we anticipate that this system can be a versatile tool for various applications, such as mesofluidic mixing, colloid selfassembly, directed assembly and separation of microparticles and biological cells, 46,47 as well as generation of cell spheroids for cell biological and drug screening studies. 48,49 Conflicts of interest There are no conflicts to declare.
Scanning image systems generally form a map of some optical characteristic of a surface of interest by moving a focused beam of light in a deliberate and repeatable pattern over the surface and measuring some response. The response is generally time correlated to the position of the scanning beam in order to form a map of the response with respect to its location on the surface. In instances where the features of interest are arranged systematically across the surface (i.e. in an array), it is important to be able to infer the position of the surface represented by each pixel of a surface scan. It is also important to have a high level of confidence that the pixel spacing is uniform within some tolerance dictated by the size of the features being scanned. The moving and optical components that position the scanning spot relative to the surface generally exhibit some systematic position errors. Such errors can be either dynamical (i.e. time dependent) or position dependent. Examples of time dependant errors include those which are a function of the scan profile being performed, the system response of the beam positioning apparatus, or errors due to a non-settled system. Examples of position dependant errors include those which are a function of the static alignment and shape of the scan lens, nonlinear properties of the spot positioning apparatus, or measurements performed at the extreme ends of the scanning system range. Generally, such errors can be categorized as reproducible and non-reproducible deviations from ideal behavior. While prior systems have attempted to address such concerns, there still exists a need for an improved method and system which will allow systematic errors, regardless of their type or source, to be readily sensed, calibrated, and stored. The resulting compensations to remove the errors can then be applied at a later time to improve the linearity of a scan across the surface of interest.
Yesterday, the hatches between the International Space Station and Space Shuttle Atlantis were sealed for the final time and the combined crew were forced to say their goodbyes and separate into their respective chambers. News of the last Space Shuttle mission continues to fascinate as the trip nears its end -- and we'll continue to share moments from the expedition until the crew safely lands. This photograph, which was taken on Friday, July 8, 2011 -- launch day -- shows Dwayne Hutcheson, an employee of the NASA Kennedy Space Center, sweeping the lobby floor in the Launch Control Center. Hutcheson was preparing for the serving of beans and corn bread, a tradition that follows every successful launch.
Ga Substitution during Modification of ZSM-5 and Its Influences on Catalytic Aromatization Performance ZSM-5 zeolites, Ga modified via different methods (in situ hydrothermal synthesis, mechanical mixing, incipient wetness impregnation, solid-state ion exchange, and liquid phase ion exchange), were systematically investigated by X-ray diffraction (XRD), X-ray photoelectron spectroscopy (XPS), 29Si, 27Al, and 71Ga magic-angle spinning (MAS) NMR, and H2 temperature-programmed reduction (H2-TPR). It is important to prove that both impregnation and liquid phase ion exchange could facilitate the incorporation of Ga species into the framework in addition to in situ hydrothermal synthesis. The liquid phase ion exchange method drove part of the Ga species into the framework, and it was further migrated into the framework by drying, while the incipient wetness impregnation method promoted part of the Ga species into the framework only during the calcination process. In the n-heptane catalytic aromatization procedure on the fixed bed, Ga modified ZSM-5 by in situ hydrothermal synthesis showed the highest benzene, to...
Hypertension Signs and symptoms Hypertension is rarely accompanied by symptoms, and its identification is usually through screening, or when seeking healthcare for an unrelated problem. Some people with high blood pressure report headaches (particularly at the back of the head and in the morning), as well as lightheadedness, vertigo, tinnitus (buzzing or hissing in the ears), altered vision or fainting episodes. These symptoms, however, might be related to associated anxiety rather than the high blood pressure itself. On physical examination, hypertension may be associated with the presence of changes in the optic fundus seen by ophthalmoscopy. The severity of the changes typical of hypertensive retinopathy is graded from I to IV; grades I and II may be difficult to differentiate. The severity of the retinopathy correlates roughly with the duration or the severity of the hypertension. Secondary hypertension Hypertension with certain specific additional signs and symptoms may suggest secondary hypertension, i.e. hypertension due to an identifiable cause. For example, Cushing's syndrome frequently causes truncal obesity, glucose intolerance, moon face, a hump of fat behind the neck/shoulder (referred to as a buffalo hump), and purple abdominal stretch marks. Hyperthyroidism frequently causes weight loss with increased appetite, fast heart rate, bulging eyes, and tremor. Renal artery stenosis (RAS) may be associated with a localized abdominal bruit to the left or right of the midline (unilateral RAS), or in both locations (bilateral RAS). Coarctation of the aorta frequently causes a decreased blood pressure in the lower extremities relative to the arms, or delayed or absent femoral arterial pulses. Pheochromocytoma may cause abrupt ("paroxysmal") episodes of hypertension accompanied by headache, palpitations, pale appearance, and excessive sweating. Hypertensive crisis Severely elevated blood pressure (equal to or greater than a systolic 180 or diastolic of 110) is referred to as a hypertensive crisis. Hypertensive crisis is categorized as either hypertensive urgency or hypertensive emergency, according to the absence or presence of end organ damage, respectively. In hypertensive urgency, there is no evidence of end organ damage resulting from the elevated blood pressure. In these cases, oral medications are used to lower the BP gradually over 24 to 48 hours. In hypertensive emergency, there is evidence of direct damage to one or more organs. The most affected organs include the brain, kidney, heart and lungs, producing symptoms which may include confusion, drowsiness, chest pain and breathlessness. In hypertensive emergency, the blood pressure must be reduced more rapidly to stop ongoing organ damage, however, there is a lack of randomized controlled trial evidence for this approach. Pregnancy Hypertension occurs in approximately 8–10% of pregnancies. Two blood pressure measurements six hours apart of greater than 140/90 mm Hg are diagnostic of hypertension in pregnancy. High blood pressure in pregnancy can be classified as pre-existing hypertension, gestational hypertension, or pre-eclampsia. Pre-eclampsia is a serious condition of the second half of pregnancy and following delivery characterised by increased blood pressure and the presence of protein in the urine. It occurs in about 5% of pregnancies and is responsible for approximately 16% of all maternal deaths globally. Pre-eclampsia also doubles the risk of death of the baby around the time of birth. Usually there are no symptoms in pre-eclampsia and it is detected by routine screening. When symptoms of pre-eclampsia occur the most common are headache, visual disturbance (often "flashing lights"), vomiting, pain over the stomach, and swelling. Pre-eclampsia can occasionally progress to a life-threatening condition called eclampsia, which is a hypertensive emergency and has several serious complications including vision loss, brain swelling, seizures, kidney failure, pulmonary edema, and disseminated intravascular coagulation (a blood clotting disorder). In contrast, gestational hypertension is defined as new-onset hypertension during pregnancy without protein in the urine. Children Failure to thrive, seizures, irritability, lack of energy, and difficulty in breathing can be associated with hypertension in newborns and young infants. In older infants and children, hypertension can cause headache, unexplained irritability, fatigue, failure to thrive, blurred vision, nosebleeds, and facial paralysis. Primary hypertension Hypertension results from a complex interaction of genes and environmental factors. Numerous common genetic variants with small effects on blood pressure have been identified as well as some rare genetic variants with large effects on blood pressure. Also, genome-wide association studies (GWAS) have identified 35 genetic loci related to blood pressure; 12 of these genetic loci influencing blood pressure were newly found. Sentinel SNP for each new genetic locus identified has shown an association with DNA methylation at multiple nearby CpG sites. These sentinel SNP are located within genes related to vascular smooth muscle and renal function. DNA methylation might affect in some way linking common genetic variation to multiple phenotypes even though mechanisms underlying these associations are not understood. Single variant test performed in this study for the 35 sentinel SNP (known and new) showed that genetic variants singly or in aggregate contribute to risk of clinical phenotypes related to high blood pressure. Blood pressure rises with aging and the risk of becoming hypertensive in later life is considerable. Several environmental factors influence blood pressure. High salt intake raises the blood pressure in salt sensitive individuals; lack of exercise, central obesity can play a role in individual cases. The possible roles of other factors such as caffeine consumption, and vitamin D deficiency are less clear. Insulin resistance, which is common in obesity and is a component of syndrome X (or the metabolic syndrome), is also thought to contribute to hypertension. One review suggests that sugar may play an important role in hypertension and salt is just an innocent bystander. Events in early life, such as low birth weight, maternal smoking, and lack of breastfeeding may be risk factors for adult essential hypertension, although the mechanisms linking these exposures to adult hypertension remain unclear. An increased rate of high blood urea has been found in untreated people with hypertension in comparison with people with normal blood pressure, although it is uncertain whether the former plays a causal role or is subsidiary to poor kidney function. Average blood pressure may be higher in the winter than in the summer. Periodontal disease is also associated with high blood pressure. Secondary hypertension Secondary hypertension results from an identifiable cause. Kidney disease is the most common secondary cause of hypertension. Hypertension can also be caused by endocrine conditions, such as Cushing's syndrome, hyperthyroidism, hypothyroidism, acromegaly, Conn's syndrome or hyperaldosteronism, renal artery stenosis (from atherosclerosis or fibromuscular dysplasia), hyperparathyroidism, and pheochromocytoma. Other causes of secondary hypertension include obesity, sleep apnea, pregnancy, coarctation of the aorta, excessive eating of liquorice, excessive drinking of alcohol, certain prescription medicines, herbal remedies, and stimulants such as cocaine and methamphetamine. Arsenic exposure through drinking water has been shown to correlate with elevated blood pressure. Depression was also linked to hypertension. A 2018 review found that any alcohol increased blood pressure in males while over one or two drinks increased the risk in females. Pathophysiology In most people with established essential hypertension, increased resistance to blood flow (total peripheral resistance) accounts for the high pressure while cardiac output remains normal. There is evidence that some younger people with prehypertension or 'borderline hypertension' have high cardiac output, an elevated heart rate and normal peripheral resistance, termed hyperkinetic borderline hypertension. These individuals develop the typical features of established essential hypertension in later life as their cardiac output falls and peripheral resistance rises with age. Whether this pattern is typical of all people who ultimately develop hypertension is disputed. The increased peripheral resistance in established hypertension is mainly attributable to structural narrowing of small arteries and arterioles, although a reduction in the number or density of capillaries may also contribute. It is not clear whether or not vasoconstriction of arteriolar blood vessels plays a role in hypertension. Hypertension is also associated with decreased peripheral venous compliance which may increase venous return, increase cardiac preload and, ultimately, cause diastolic dysfunction. Pulse pressure (the difference between systolic and diastolic blood pressure) is frequently increased in older people with hypertension. This can mean that systolic pressure is abnormally high, but diastolic pressure may be normal or low, a condition termed isolated systolic hypertension. The high pulse pressure in elderly people with hypertension or isolated systolic hypertension is explained by increased arterial stiffness, which typically accompanies aging and may be exacerbated by high blood pressure. Many mechanisms have been proposed to account for the rise in peripheral resistance in hypertension. Most evidence implicates either disturbances in the kidneys' salt and water handling (particularly abnormalities in the intrarenal renin–angiotensin system) or abnormalities of the sympathetic nervous system. These mechanisms are not mutually exclusive and it is likely that both contribute to some extent in most cases of essential hypertension. It has also been suggested that endothelial dysfunction and vascular inflammation may also contribute to increased peripheral resistance and vascular damage in hypertension. Interleukin 17 has garnered interest for its role in increasing the production of several other immune system chemical signals thought to be involved in hypertension such as tumor necrosis factor alpha, interleukin 1, interleukin 6, and interleukin 8. Consumption of excessive sodium and/or insufficient potassium leads to excessive intracellular sodium, which contracts vascular smooth muscle, restricting blood flow and so increases blood pressure. Diagnosis Hypertension is diagnosed on the basis of a persistently high resting blood pressure. The American Heart Association recommends at least three resting measurements on at least two separate health care visits. The UK National Institute for Health and Care Excellence recommends ambulatory blood pressure monitoring to confirm the diagnosis of hypertension if a clinic blood pressure is 140/90 mmHg or higher. Measurement technique For an accurate diagnosis of hypertension to be made, it is essential for proper blood pressure measurement technique to be used. Improper measurement of blood pressure is common and can change the blood pressure reading by up to 10 mmHg, which can lead to misdiagnosis and misclassification of hypertension. Correct blood pressure measurement technique involves several steps. Proper blood pressure measurement requires the person whose blood pressure is being measured to sit quietly for at least five minutes which is then followed by application of a properly fitted blood pressure cuff to a bare upper arm. The person should be seated with their back supported, feet flat on the floor, and with their legs uncrossed. The person whose blood pressure is being measured should avoid talking or moving during this process. The arm being measured should be supported on a flat surface at the level of the heart. Blood pressure measurement should be done in a quiet room so the medical professional checking the blood pressure can hear the Korotkoff sounds while listening to the brachial artery with a stethoscope for accurate blood pressure measurements. The blood pressure cuff should be deflated slowly (2-3 mmHg per second) while listening for the Korotkoff sounds. The bladder should be emptied before a person's blood pressure is measured since this can increase blood pressure by up to 15/10 mmHg. Multiple blood pressure readings (at least two) spaced 1–2 minutes apart should be obtained to ensure accuracy. Ambulatory blood pressure monitoring over 12 to 24 hours is the most accurate method to confirm the diagnosis. An exception to this is those with very high blood pressure readings especially when there is poor organ function. With the availability of 24-hour ambulatory blood pressure monitors and home blood pressure machines, the importance of not wrongly diagnosing those who have white coat hypertension has led to a change in protocols. In the United Kingdom, current best practice is to follow up a single raised clinic reading with ambulatory measurement, or less ideally with home blood pressure monitoring over the course of 7 days. The United States Preventive Services Task Force also recommends getting measurements outside of the healthcare environment. Pseudohypertension in the elderly or noncompressibility artery syndrome may also require consideration. This condition is believed to be due to calcification of the arteries resulting in abnormally high blood pressure readings with a blood pressure cuff while intra arterial measurements of blood pressure are normal. Orthostatic hypertension is when blood pressure increases upon standing. Hypertension in children Hypertension occurs in around 0.2 to 3% of newborns; however, blood pressure is not measured routinely in healthy newborns. Hypertension is more common in high risk newborns. A variety of factors, such as gestational age, postconceptional age and birth weight needs to be taken into account when deciding if a blood pressure is normal in a newborn. Hypertension defined as elevated blood pressure over several visits affects 1% to 5% of children and adolescents and is associated with long term risks of ill-health. Blood pressure rises with age in childhood and, in children, hypertension is defined as an average systolic or diastolic blood pressure on three or more occasions equal or higher than the 95th percentile appropriate for the sex, age and height of the child. High blood pressure must be confirmed on repeated visits however before characterizing a child as having hypertension. Prehypertension in children has been defined as average systolic or diastolic blood pressure that is greater than or equal to the 90th percentile, but less than the 95th percentile. In adolescents, it has been proposed that hypertension and pre-hypertension are diagnosed and classified using the same criteria as in adults. The value of routine screening for hypertension in children over the age of 3 years is debated. In 2004 the National High Blood Pressure Education Program recommended that children aged 3 years and older have blood pressure measurement at least once at every health care visit and the National Heart, Lung, and Blood Institute and American Academy of Pediatrics made a similar recommendation. However, the American Academy of Family Physicians supports the view of the U.S. Preventive Services Task Force that the available evidence is insufficient to determine the balance of benefits and harms of screening for hypertension in children and adolescents who do not have symptoms. Management According to one review published in 2003, reduction of the blood pressure by 5 mmHg can decrease the risk of stroke by 34%, of ischemic heart disease by 21%, and reduce the likelihood of dementia, heart failure, and mortality from cardiovascular disease. Target blood pressure Various expert groups have produced guidelines regarding how low the blood pressure target should be when a person is treated for hypertension. These groups recommend a target below the range 140–160 / 90–100 mmHg for the general population. Cochrane reviews recommend similar targets for subgroups such as people with diabetes and people with prior cardiovascular disease. Many expert groups recommend a slightly higher target of 150/90 mmHg for those over somewhere between 60 and 80 years of age. The JNC-8 and American College of Physicians recommend the target of 150/90 mmHg for those over 60 years of age, but some experts within these groups disagree with this recommendation. Some expert groups have also recommended slightly lower targets in those with diabetes or chronic kidney disease with protein loss in the urine, but others recommend the same target as for the general population. The issue of what is the best target and whether targets should differ for high risk individuals is unresolved, although some experts propose more intensive blood pressure lowering than advocated in some guidelines. For people who have never experienced cardiovascular disease who are at a 10 year risk of cardiovascular disease of less than 10%, the 2017 American Heart Association guidelines recommend medications if the systolic blood pressure is >140 mmHg or if the diastolic BP is >90 mmHg. For people who have experienced cardiovascular disease or those who are at a 10 year risk of cardiovascular disease of greater than 10%, it recommends medications if the systolic blood pressure is >130 mmHg or if the diastolic BP is >80 mmHg. Lifestyle modifications The first line of treatment for hypertension is lifestyle changes, including dietary changes, physical exercise, and weight loss. Though these have all been recommended in scientific advisories, a Cochrane systematic review found no evidence for effects of weight loss diets on death, long-term complications or adverse events in persons with hypertension. The review did find a decrease in blood pressure. Their potential effectiveness is similar to and at times exceeds a single medication. If hypertension is high enough to justify immediate use of medications, lifestyle changes are still recommended in conjunction with medication. Dietary changes shown to reduce blood pressure include diets with low sodium, the DASH diet, vegetarian diets, and green tea consumption. Increasing dietary potassium has a potential benefit for lowering the risk of hypertension. The 2015 Dietary Guidelines Advisory Committee (DGAC) stated that potassium is one of the shortfall nutrients which is under-consumed in the United States. However, people who take certain antihypertensive medications (such as ACE-inhibitors or ARBs) should not take potassium supplements or potassium-enriched salts due to the risk of high levels of potassium. Physical exercise regimens which are shown to reduce blood pressure include isometric resistance exercise, aerobic exercise, resistance exercise, and device-guided breathing. Stress reduction techniques such as biofeedback or transcendental meditation may be considered as an add-on to other treatments to reduce hypertension, but do not have evidence for preventing cardiovascular disease on their own. Self-monitoring and appointment reminders might support the use of other strategies to improve blood pressure control, but need further evaluation. Medications Several classes of medications, collectively referred to as antihypertensive medications, are available for treating hypertension. First-line medications for hypertension include thiazide-diuretics, calcium channel blockers, angiotensin converting enzyme inhibitors (ACE inhibitors), and angiotensin receptor blockers (ARBs). These medications may be used alone or in combination (ACE inhibitors and ARBs are not recommended for use in combination); the latter option may serve to minimize counter-regulatory mechanisms that act to restore blood pressure values to pre-treatment levels. Most people require more than one medication to control their hypertension. Medications for blood pressure control should be implemented by a stepped care approach when target levels are not reached. Previously beta-blockers such as atenolol were thought to have similar beneficial effects when used as first-line therapy for hypertension. However, a Cochrane review that included 13 trials found that the effects of beta-blockers are inferior to that of other antihypertensive medications in preventing cardiovascular disease. Resistant hypertension Resistant hypertension is defined as high blood pressure that remains above a target level, in spite of being prescribed three or more antihypertensive drugs simultaneously with different mechanisms of action. Failing to take the prescribed drugs, is an important cause of resistant hypertension. Resistant hypertension may also result from chronically high activity of the autonomic nervous system, an effect known as "neurogenic hypertension". Electrical therapies that stimulate the baroreflex are being studied as an option for lowering blood pressure in people in this situation. Adults As of 2014, approximately one billion adults or ~22% of the population of the world have hypertension. It is slightly more frequent in men, in those of low socioeconomic status, and it becomes more common with age. It is common in high, medium, and low income countries. In 2004 rates of high blood pressure were highest in Africa, (30% for both sexes) and lowest in the Americas (18% for both sexes). Rates also vary markedly within regions with rates as low as 3.4% (men) and 6.8% (women) in rural India and as high as 68.9% (men) and 72.5% (women) in Poland. Rates in Africa were about 45% in 2016. In Europe hypertension occurs in about 30-45% of people as of 2013. In 1995 it was estimated that 43 million people (24% of the population) in the United States had hypertension or were taking antihypertensive medication. By 2004 this had increased to 29% and further to 32% (76 million US adults) by 2017. In 2017, with the change in definitions for hypertension, 46% of people in the United States are affected. African-American adults in the United States have among the highest rates of hypertension in the world at 44%. It is also more common in Filipino Americans and less common in US whites and Mexican Americans. Differences in hypertension rates are multifactorial and under study. Children Rates of high blood pressure in children and adolescents have increased in the last 20 years in the United States. Childhood hypertension, particularly in pre-adolescents, is more often secondary to an underlying disorder than in adults. Kidney disease is the most common secondary cause of hypertension in children and adolescents. Nevertheless, primary or essential hypertension accounts for most cases. Outcomes Hypertension is the most important preventable risk factor for premature death worldwide. It increases the risk of ischemic heart disease, strokes, peripheral vascular disease, and other cardiovascular diseases, including heart failure, aortic aneurysms, diffuse atherosclerosis, chronic kidney disease, atrial fibrillation, and pulmonary embolism. Hypertension is also a risk factor for cognitive impairment and dementia. Other complications include hypertensive retinopathy and hypertensive nephropathy. Measurement Modern understanding of the cardiovascular system began with the work of physician William Harvey (1578–1657), who described the circulation of blood in his book "De motu cordis". The English clergyman Stephen Hales made the first published measurement of blood pressure in 1733. However, hypertension as a clinical entity came into its own with the invention of the cuff-based sphygmomanometer by Scipione Riva-Rocci in 1896. This allowed easy measurement of systolic pressure in the clinic. In 1905, Nikolai Korotkoff improved the technique by describing the Korotkoff sounds that are heard when the artery is ausculted with a stethoscope while the sphygmomanometer cuff is deflated. This permitted systolic and diastolic pressure to be measured. Identification The symptoms similar to symptoms of patients with hypertensive crisis are discussed in medieval Persian medical texts in the chapter of "fullness disease". The symptoms include headache, heaviness in the head, sluggish movements, general redness and warm to touch feel of the body, prominent, distended and tense vessels, fullness of the pulse, distension of the skin, coloured and dense urine, loss of appetite, weak eyesight, impairment of thinking, yawning, drowsiness, vascular rupture, and hemorrhagic stroke. Fullness disease was presumed to be due to an excessive amount of blood within the blood vessels. Descriptions of hypertension as a disease came among others from Thomas Young in 1808 and especially Richard Bright in 1836. The first report of elevated blood pressure in a person without evidence of kidney disease was made by Frederick Akbar Mahomed (1849–1884). Treatment Historically the treatment for what was called the "hard pulse disease" consisted in reducing the quantity of blood by bloodletting or the application of leeches. This was advocated by The Yellow Emperor of China, Cornelius Celsus, Galen, and Hippocrates. The therapeutic approach for the treatment of hard pulse disease included changes in lifestyle (staying away from anger and sexual intercourse) and dietary program for patients (avoiding the consumption of wine, meat, and pastries, reducing the volume of food in a meal, maintaining a low-energy diet and the dietary usage of spinach and vinegar). In the 19th and 20th centuries, before effective pharmacological treatment for hypertension became possible, three treatment modalities were used, all with numerous side-effects: strict sodium restriction (for example the rice diet), sympathectomy (surgical ablation of parts of the sympathetic nervous system), and pyrogen therapy (injection of substances that caused a fever, indirectly reducing blood pressure). The first chemical for hypertension, sodium thiocyanate, was used in 1900 but had many side effects and was unpopular. Several other agents were developed after the Second World War, the most popular and reasonably effective of which were tetramethylammonium chloride, hexamethonium, hydralazine, and reserpine (derived from the medicinal plant Rauwolfia serpentina). None of these were well tolerated. A major breakthrough was achieved with the discovery of the first well-tolerated orally available agents. The first was chlorothiazide, the first thiazide diuretic and developed from the antibiotic sulfanilamide, which became available in 1958. Subsequently, beta blockers, calcium channel blockers, angiotensin converting enzyme (ACE) inhibitors, angiotensin receptor blockers, and renin inhibitors were developed as antihypertensive agents. Awareness The World Health Organization has identified hypertension, or high blood pressure, as the leading cause of cardiovascular mortality. The World Hypertension League (WHL), an umbrella organization of 85 national hypertension societies and leagues, recognized that more than 50% of the hypertensive population worldwide are unaware of their condition. To address this problem, the WHL initiated a global awareness campaign on hypertension in 2005 and dedicated May 17 of each year as World Hypertension Day (WHD). Over the past three years, more national societies have been engaging in WHD and have been innovative in their activities to get the message to the public. In 2007, there was record participation from 47 member countries of the WHL. During the week of WHD, all these countries – in partnership with their local governments, professional societies, nongovernmental organizations and private industries – promoted hypertension awareness among the public through several media and public rallies. Using mass media such as Internet and television, the message reached more than 250 million people. As the momentum picks up year after year, the WHL is confident that almost all the estimated 1.5 billion people affected by elevated blood pressure can be reached. Economics High blood pressure is the most common chronic medical problem prompting visits to primary health care providers in USA. The American Heart Association estimated the direct and indirect costs of high blood pressure in 2010 as $76.6 billion. In the US 80% of people with hypertension are aware of their condition, 71% take some antihypertensive medication, but only 48% of people aware that they have hypertension adequately control it. Adequate management of hypertension can be hampered by inadequacies in the diagnosis, treatment, or control of high blood pressure. Health care providers face many obstacles to achieving blood pressure control, including resistance to taking multiple medications to reach blood pressure goals. People also face the challenges of adhering to medicine schedules and making lifestyle changes. Nonetheless, the achievement of blood pressure goals is possible, and most importantly, lowering blood pressure significantly reduces the risk of death due to heart disease and stroke, the development of other debilitating conditions, and the cost associated with advanced medical care. Research A 2015 review of several studies found that restoring blood vitamin D levels by using supplements (more than 1,000 IU per day) reduced blood pressure in hypertensive individuals when they had existing vitamin D deficiency. The results also demonstrated a correlation of chronically low vitamin D levels with a higher chance of becoming hypertensive. Supplementation with vitamin D over 18 months in normotensive individuals with vitamin D deficiency did not significantly affect blood pressure. There is tentative evidence that an increased calcium intake may help in preventing hypertension. However, more studies are needed to assess the optimal dose and the possible side effects. Cats Hypertension in cats is indicated with a systolic blood pressure greater than 150 mm Hg, with amlodipine the usual first-line treatment. Dogs Normal blood pressure can differ substantially between breeds but hypertension in dogs is often diagnosed if systolic blood pressure is above 160 mm Hg particularly if this is associated with target organ damage. Inhibitors of the renin-angiotensin system and calcium channel blockers are often used to treat hypertension in dogs, although other drugs may be indicated for specific conditions causing high blood pressure.
/** * GUITest.java */ package uk.co.bluettduncanj; import static org.junit.Assert.*; import org.junit.After; import org.junit.Before; import org.junit.Test; import uk.co.bluettduncanj.view.GUI; /** * @author <NAME> */ public class GUITest { private GUI gui; /** * @throws java.lang.Exception */ @Before public void setUp() throws Exception { gui = new GUI(); } /** * @throws java.lang.Exception */ @After public void tearDown() throws Exception { gui = null; } /** * Test method for {@link uk.co.bluettduncanj.view.GUI#GUI()}. */ @Test public void testGUI() { assertNotNull("The GUI is null", gui); // Make sure the isInitialStateOK method is not commented out before testing! assertEquals("At least one of the internal JComponents are null", true, gui.isInitialStateOK()); } }
from launch import LaunchDescription from launch_ros.actions import Node import os params = os.path.join( '/home/rgoulart/workspaces/ros2_ws/src/ezgripper', 'config', 'params.yaml' ) def generate_launch_description(): return LaunchDescription([ Node( package='ezgripper', executable='ezgripper_node', name='ezgripper_node', parameters=[params], output='screen' ), Node( package='ezgripper', executable='ezgripper_node', name='ezgripper2_node', parameters=[params], output='screen' ) ])
Multimycotoxin and fungal analysis of maize grains from south and southwestern Ethiopia ABSTRACT The natural occurrence of fungi, mycotoxins and fungal metabolites was investigated in 100 samples of maize grains collected from south and southwestern Ethiopia in 2015. The maize samples were contaminated by Fusarium, Aspergillus and Penicillium species. Using liquid chromatography tandem mass spectrometry 127 secondary metabolites were analysed. Zearalenone was the most prevalent mycotoxin, occurring in about 96% of the samples. Zearalenone sulfate was the second most prevalent, present in 81% of the samples. Fumonisin B1 was detected in 70% of the samples with a mean level of 606 g kg−1 in positive samples, while FB2, FB3 and FB4 were detected in 62%, 51% and 60% of the maize samples with mean levels of 202, 136 and 85 g kg−1, respectively. Up to 8% of the samples were contaminated with aflatoxins, with a maximum level of aflatoxin B1 of 513 g kg−1. Results were higher than earlier reports for maize from Ethiopia.
Population pharmacokinetics of methadone in opiate users: characterization of time-dependent changes. AIMS Although methadone is widely used to treat opiate dependence, guidelines for its dosage are poorly defined. There is increasing evidence to suggest that a strategy based on plasma drug monitoring may be useful to detect non-compliance. Therefore, we have developed a population-based pharmacokinetic (POP-PK) model that characterises adaptive changes in methadone kinetics. METHODS Sparse plasma rac-methadone concentrations measured in 35 opiate-users were assessed using the P-Pharm software. The final structural model comprised a biexponential function with first-order input and allowance for time-dependent change in both clearance (CL) and initial volume of distribution (V ). Values of these parameters were allowed to increase or decrease exponentially to an asymptotic value. RESULTS Increase in individual values of CL and increase or decrease in individual values of V with time was observed in applying the model to the experimental data. CONCLUSIONS A time-dependent increase in the clearance of methadone is consistent with auto-induction of CYP3A4, the enzyme responsible for much of the metabolism of the drug. The changes in V with time might reflect both up- and down-regulation of alpha1-acid glycoprotein, the major plasma binding site for methadone. By accounting for adaptive kinetic changes, the POP-PK model provides an improved basis for forecasting plasma methadone concentrations to predict and adjust dosage of the drug and to monitor compliance in opiate-users on maintenance treatment.
Why Has Income Inequality Remained on the Sidelines of Public Policy for So Long? For all the talk about inequality these days, Robert Wade argues that little is done about it. He cites eight reasons. But perhaps the most important is that the center-left in country after country has bought into the prevailing neoclassical model that it is actually efficient economically. Wade says that for the sake of our futures, we had better change our tune.
Colour Display Strategies for Enhanced Representation of MERIS Data In this paper the problem of enhanced colour representation of MERIS data is discussed. Four methods are presented which tackle the problem of multispectral data colour visualisation. In order to assess these colour display strategies a data analysis using both statistical and information measures is presented. The performance of the proposed methods is evaluated objectively by means of mutual information.
<filename>spring-core/src/main/java/org/springframework/core/annotation/AliasFor.java<gh_stars>0 package org.springframework.core.annotation; import java.lang.annotation.Annotation; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * @author <NAME> * @date 2019/09/29 * @since 4.2 * @see MergedAnnotations * @see SynthesizedAnnotation */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) @Documented public @interface AliasFor { @AliasFor("attribute") String value() default ""; @AliasFor("value") String attribute() default ""; Class<? extends Annotation> annotation() default Annotation.class; }
<filename>lib/PointerAnalysis/MemoryModel/ArrayLayout.cpp #include "PointerAnalysis/MemoryModel/Type/ArrayLayout.h" namespace tpa { static bool validateTripleList(const ArrayLayout::ArrayTripleList& list) { for (auto const& triple: list) { if (triple.start + triple.size > triple.end) return false; if ((triple.end - triple.start) % triple.size != 0) return false; } auto isSorted = std::is_sorted( list.begin(), list.end(), [] (auto const& lhs, auto const& rhs) { return (lhs.start < rhs.start) || (lhs.start == rhs.start && lhs.size > rhs.size); } ); if (!isSorted) return false; return std::unordered_set<ArrayTriple>(list.begin(), list.end()).size() == list.size(); } const ArrayLayout* ArrayLayout::getLayout(ArrayTripleList&& list) { assert(validateTripleList(list)); auto itr = layoutSet.insert(ArrayLayout(std::move(list))).first; return &(*itr); } const ArrayLayout* ArrayLayout::getLayout(std::initializer_list<ArrayTriple> ilist) { ArrayTripleList list(ilist); return getLayout(std::move(list)); } const ArrayLayout* ArrayLayout::getByteArrayLayout() { return getLayout({{0, std::numeric_limits<size_t>::max(), 1}}); } const ArrayLayout* ArrayLayout::getDefaultLayout() { return defaultLayout; } std::pair<size_t, bool> ArrayLayout::offsetInto(size_t offset) const { bool hitArray = false; for (auto const& triple: arrayLayout) { if (triple.start > offset) break; if (triple.start <= offset && offset < triple.end) { hitArray = true; offset = triple.start + (offset - triple.start) % triple.size; } } return std::make_pair(offset, hitArray); } }
Clear, a biometric identification service that allowed time-crunched travelers to zip through security lines, is set to return to airports this fall. Alclear LLC said Tuesday that it’s in the process of restarting the program after it purchased the Clear assets out of bankruptcy for $5.87 million last month. Clear, which allowed customers to use dedicated lines at airport security checkpoints, shut down in June 2009 after its owner, Verified Identity Pass Inc., was unable to keep up with payments on a $32 million loan. Verified Identity filed for Chapter 11 protection in December of last year to sell its assets.
<reponame>hannah-scott/wallcolor #!/usr/bin/python from PIL import Image import numpy as np SCREEN_WIDTH=1920 SCREEN_HEIGHT=1080 h = input("Enter hex code: ").strip('#') rgb = tuple(int(h[i:i+2], 16) for i in (0, 2, 4)) array = np.zeros([SCREEN_HEIGHT, SCREEN_WIDTH, 3], dtype=np.uint8) array[:,:] = rgb img = Image.fromarray(array) img.save('wallcolor_{}_{}_{}.png'.format(rgb[0], rgb[1], rgb[2]))
In response to the White House press team’s troubling habit of refusing to do on-camera press briefings, CNN has found a workaround that also functions as a dry critique: It sent in a courtroom sketch artist. The images Friday provided a much-needed visual element for CNN, and also highlight the silliness of Trump Administration officials refusing to be seen speaking for the chief executive. (Accountability is important, given the president’s propensity for lying, which is meticulously documented here.) Asked this week why briefings are being held off-camera, Trump adviser Steve Bannon explained, “Sean got fat,” referring to embattled press secretary Sean Spicer. Also Read: Steve Bannon: Press Briefings Went Off-Camera Because Sean Spicer 'Got Fatter' It’s great that everyone — or at least Bannon and CNN — have such a great sense of humor about the White House’s latest refusal to be held accountable for the things that come out of its officials’ mouths. But many of CNN’s critics — many of whom are also CNN fans — have another idea for how CNN and other officials could handle the no-cameras order: By rejecting it. Dear @CNN, I don't want to see drawings by your sketch artist. I want to see you refuse to turn off your cameras when ordered by Trump & Co. — Peter Gleick (@PeterGleick) June 23, 2017 “Dear @CNN, I don’t want to see drawings by your sketch artist. I want to see you refuse to turn off your cameras when ordered by Trump & Co.,” wrote environmental scientist Peter Gleick. the cnn courtroom sketch artist is kind of cutesy ha ha but they could just turn on the camera and dare spicer to shut them down — Oliver Willis (@owillis) June 23, 2017 “The CNN courtroom sketch artist is kind of cutesy ha ha but they could just turn on the camera and dare Spicer to shut them down,” noted liberal writer Oliver Willis. WHITE HOUSE: Let's undermine the press and destroy democratic norms WHITE HOUSE PRESS: Let's send a sketch artist in protest — Jesse Berney (@jesseberney) June 23, 2017 People on the right didn’t like the sketch idea, either. “File this one under, ‘no, this not a joke,'” wrote NewsBusters. “For Friday’s off-camera White House press briefing, CNN hired a sketch artist to render images of press secretary Sean Spicer as yet another example of their pathetic meltdowns over the Trump communications team’s decisions about access.” CNN did not respond to TheWrap’s request for comment. But CNN’s Jim Acosta, one of the biggest critics of the off-camera briefings, also weighed in on Twitter, as did CNN: So sketchy to not have cameras at WH briefing. So CNN sent sketch artist to capture the moment. pic.twitter.com/tNAoDHkozj — Jim Acosta (@Acosta) June 23, 2017 CNN sent Bill Hennessy, the network's regular Supreme Court sketch artist, to the White House briefing today. https://t.co/c0yvofNinq pic.twitter.com/issRqyl9i8 — Brian Stelter (@brianstelter) June 23, 2017 The color images are now in: https://t.co/vCMxYsWyjF — Brian Stelter (@brianstelter) June 23, 2017 It seems like mixed reviews at best for CNN’s art project. Back to the drawing board? Susan Seager contributed to this story.
def exists_file(filename): dirname = os.path.dirname(filename) dirname = dirname if len(dirname) != 0 else os.path.curdir filepath = os.path.join(dirname, filename) return os.path.exists(filepath)
<reponame>matheuspb/Tetris import java.awt.*; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; import javax.swing.*; public class Panel extends JPanel { private static final long serialVersionUID = 1L; private Board board; private Image blue, cyan, green, magenta, orange, red, yellow, restartbutton; public final static int BLOCK_SIZE = 24; public static int RESTART_IMG_X; public static int RESTART_IMG_Y; private JLabel scoreLabel; private JLabel highScoresLabel; public Panel(Board board, int frameHeight) { super(); try { blue = ImageIO.read(new File("resources/blue.png")); cyan = ImageIO.read(new File("resources/cyan.png")); green = ImageIO.read(new File("resources/green.png")); magenta = ImageIO.read(new File("resources/magenta.png")); orange = ImageIO.read(new File("resources/orange.png")); red = ImageIO.read(new File("resources/red.png")); yellow = ImageIO.read(new File("resources/yellow.png")); restartbutton = ImageIO .read(new File("resources/restartbutton.png")); } catch (IOException e) { System.out.println(e.getMessage()); } this.board = board; RESTART_IMG_X = BLOCK_SIZE * 11; RESTART_IMG_Y = frameHeight - BLOCK_SIZE * 5; scoreLabel = new JLabel("Score: "); this.add(scoreLabel); highScoresLabel = new JLabel("Top 5: "); this.add(highScoresLabel); } private void drawGrid(Graphics g) { // Draws the grid behind the pieces for (int i = 0; i < 20; i++) { for (int j = 0; j < 10; j++) { g.setColor(Color.LIGHT_GRAY); g.drawRect(BLOCK_SIZE * j, BLOCK_SIZE * i, BLOCK_SIZE, BLOCK_SIZE); } } } private void drawBlock(Graphics g, int i, int j, Image img) { // Draws a block on the correct position of the panel g.drawImage(img, BLOCK_SIZE * j, BLOCK_SIZE * i, BLOCK_SIZE, BLOCK_SIZE, this); } private void drawNextBlock(Graphics g, char piece) { if (piece == 'I') { drawBlock(g, 5, 11, cyan); drawBlock(g, 5, 12, cyan); drawBlock(g, 5, 13, cyan); drawBlock(g, 5, 14, cyan); } else if (piece == 'J') { drawBlock(g, 4, 12, blue); drawBlock(g, 5, 12, blue); drawBlock(g, 5, 13, blue); drawBlock(g, 5, 14, blue); } else if (piece == 'L') { drawBlock(g, 5, 12, orange); drawBlock(g, 5, 13, orange); drawBlock(g, 5, 14, orange); drawBlock(g, 4, 14, orange); } else if (piece == 'S') { drawBlock(g, 5, 12, green); drawBlock(g, 5, 13, green); drawBlock(g, 4, 13, green); drawBlock(g, 4, 14, green); } else if (piece == 'Z') { drawBlock(g, 4, 12, red); drawBlock(g, 4, 13, red); drawBlock(g, 5, 13, red); drawBlock(g, 5, 14, red); } else if (piece == 'T') { drawBlock(g, 5, 12, magenta); drawBlock(g, 5, 13, magenta); drawBlock(g, 4, 13, magenta); drawBlock(g, 5, 14, magenta); } else if (piece == 'O') { drawBlock(g, 4, 12, yellow); drawBlock(g, 5, 12, yellow); drawBlock(g, 4, 13, yellow); drawBlock(g, 5, 13, yellow); } } @Override public void paintComponent(Graphics g) { // Draws block images on the correct positions based on board.matrix() super.paintComponent(g); scoreLabel.setLocation(BLOCK_SIZE * 12, BLOCK_SIZE * 2); scoreLabel.setText("Score: " + board.score()); highScoresLabel.setLocation(BLOCK_SIZE * 12, BLOCK_SIZE * 8); highScoresLabel.setText(board.topFive()); drawGrid(g); drawNextBlock(g, board.nextPiece()); g.drawImage(restartbutton, BLOCK_SIZE * 11, BLOCK_SIZE * 15, 100, 35, this); char[][] matrix = board.matrix(); // See matrix() method in Board for (int i = 0; i < matrix.length; i++) { for (int j = 0; j < matrix[0].length; j++) { if (matrix[i][j] == 'I') { drawBlock(g, i, j, cyan); } else if (matrix[i][j] == 'J') { drawBlock(g, i, j, blue); } else if (matrix[i][j] == 'L') { drawBlock(g, i, j, orange); } else if (matrix[i][j] == 'S') { drawBlock(g, i, j, green); } else if (matrix[i][j] == 'Z') { drawBlock(g, i, j, red); } else if (matrix[i][j] == 'T') { drawBlock(g, i, j, magenta); } else if (matrix[i][j] == 'O') { drawBlock(g, i, j, yellow); } } } } }
<reponame>Kaecchi/mroczko_python<gh_stars>0 # -*- coding: utf-8 -*- n = 0 suma = 0 while suma < 10: n += 1 suma += 1/n print(n, suma)
. In reviewing 91 cases of bronchogenic carcinoma, traditional radiology (TR) and CT patterns were compared versus surgical/pathologic findings. CT always gave clearer assessment of the mediastinum and thoracic wall invasion. In the evaluation of metastatic spread to hilar and mediastinal lymph nodes the false negative rate was higher with TR than with CT; on the other hand, there was a higher false positive rate with CT. The advantage of CT in the staging of bronchogenic carcinoma is verified and a rationalized flow-chart which includes TR, endoscopy, CT and mediastinoscopy is suggested.
Give to: Everyone that has to cook for a family, or a cooking enthusiast that demands perfection at every meal! The name Ferran Adrià immediately summons thoughts of molecular gastronomy: his famous spherical olives which appear as jellied green blobs jiggling on a spoon but burst to fill the mouth with the flavor of intense olive juice. Or the frozen Gorgonzola balloon, a hollow white sphere, about eight inches across and the color of fresh ricotta, topped with a grate of nutmeg meant to be broken (with your fist?) and eaten in shards. Ferran Adrià is the father and inspiration of a creative culinary era of deconstructing the dish and reassembling in a way you’ve never seen. His three Michelin star restaurant El Bulli closed last July after 24 years. He will reopen in two years most likely transforming the space as he transforms food. When I first saw The Family Meal: Home Cooking with Ferran Adria, I wondered if I need buy a chemistry set or cylinder of liquid nitrogen. No, this truly is home cooking, the maestro demonstrating in detail how a dish should be done. You see, “the family meals” are the repasts of his restaurant family; the menus of dinners prepared and eaten daily by his staff of 75. He insisted on good food, easy-to-find ingredients that are mostly fresh and, the aggregate couldn’t be expensive. (I think I read that the cost could not exceed €6/person but I can’t confirm). Open the Book. There are 31 meals within. Each meal has a starter, a main, and a dessert. Recipe ingredients are listed for 2, 6, 20 or 75 and carefully calculated (not mathematically but via testing at each level) for each group. So using a bit of math, we know that 31 meals x 3 recipes equals 93 recipes. Each recipe has photos showing every step i.e. about 15 photos per recipe. That’s almost 1,400 photos not counting the photo stack of appetizer, main and dessert preceding the meal, photos of utensils, types of fish and more. It’s a blog but on paper i.e. each step of every recipe is a photo with instructions superimposed. One almost doesn’t need to read English. Aside: is this some sort of Bizarro world? Maybe the first caveman's recipes were chiseled into a rock wall. Then the Egyptians invented paper making recipes were portable and accompanied by illustrations and later photos. Fast-forward to the internet: food blogs have photos of every step of the recipe. Is this where the world turns around? Now photos of every step put back on paper? Should we be sharpening our chisels? Here is the entrée from Meal 24 which consists of Garbanzo Beans with Spinach & Egg, Glazed Teriyaki Pork Belly, and Sweet Potato with Honey & Cream. I've only shown ingredient amounts to serve 6. Teriyaki is a sweet Japanese sauce used for marinating before roasting or broiling. You can make the teriyaki sauce yourself or use a good-quality, store-bought sauce. 1. Using a rolling pin or other heavy utensil, crush the lemongrass and ginger. 2. Put the chicken stock, sugar, and soy sauce into a large saucepan. 4. Add the crushed lemongrass and ginger. Put the pan over medium heat, bring to a boil, then boil for 15 minutes. 1. Put the pork into a large pan with the water. The pork should be well covered, so add more (water) if necessary. Add the salt and peppercorns. 2. Coarsely chop the onions and add to the pan with the garlic. 3. Bring the water to a simmer. 4. Cook the pork covered, for 1 1/2 hours, until cooked through, adding more water if necessary to cover. Remove and place on a cutting board. 5. Preheat the oven to 350°F. 6. Cut the pork into strips about 3/4 inch thick. 7. Place the pork in a roasting pan in a single layer, then cover with the teriyaki sauce. 8. Roast the pork for 30 minutes, regularly basting with teriyaki sauce to glaze. 9. Serve the pork with spoonfuls of the teriyaki sauce.
Optimizing T-705 (favipiravir) treatment of severe influenza B virus infection in the immunocompromised mouse model Background Influenza B virus infections remain insufficiently studied and antiviral management in immunocompromised patients is not well defined. The treatment regimens for these high-risk patients, which have elevated risk of severe disease-associated complications, require optimization and can be partly addressed via animal models. Methods We examined the efficacy of monotherapy with the RNA-dependent RNA polymerase inhibitor T-705 (favipiravir) in protecting genetically modified, permanently immunocompromised BALB scid mice against lethal infection with B/Brisbane/60/2008 (BR/08) virus. Beginning at 24h post-infection, BALB scid mice received oral T-705 twice daily (10, 50 or 250mg/kg/day) for 5 or 10days. Results T-705 had a dose-dependent effect on survival after BR/08 challenge, resulting in 100% protection at the highest dosages. With the 5day regimens, dosages of 50 or 250mg/kg/day reduced the peak lung viral titres within the treatment window, but could not efficiently clear the virus after completion of treatment. With the 10day regimens, dosages of 50 or 250mg/kg/day significantly suppressed virus replication in the lungs, particularly at 45days post-infection, limiting viral spread and pulmonary pathology. No T-705 regimen decreased virus growth in the nasal turbinates of mice, which potentially contributed to the viral dynamics in the lungs. The susceptibility of influenza B viruses isolated from T-705-treated mice remained comparable to that of viruses from untreated control animals. Conclusions T-705 treatment is efficacious against lethal challenge with BR/08 virus in immunocompromised mice. The antiviral benefit was greatest when longer T-705 treatment was combined with higher dosages.
<gh_stars>0 package tw.com.ksmt.cloud.ui; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.DialogInterface; import android.os.Bundle; import android.os.Message; import android.support.v4.app.Fragment; import android.text.InputFilter; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.Button; import android.widget.EditText; import android.widget.ListView; import com.handmark.pulltorefresh.library.PullToRefreshBase; import com.handmark.pulltorefresh.library.PullToRefreshListView; import org.apache.http.message.BasicNameValuePair; import org.json.JSONObject; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import java.util.Timer; import java.util.TimerTask; import tw.com.ksmt.cloud.PrjCfg; import tw.com.ksmt.cloud.R; import tw.com.ksmt.cloud.iface.Account; import tw.com.ksmt.cloud.iface.ListItem; import tw.com.ksmt.cloud.libs.JSONReq; import tw.com.ksmt.cloud.libs.Kdialog; import tw.com.ksmt.cloud.libs.MHandler; import tw.com.ksmt.cloud.libs.StrUtils; import tw.com.ksmt.cloud.libs.Utils; import tw.com.ksmt.cloud.libs.WebUtils; public class AccountEditFragment extends Fragment implements AdapterView.OnItemClickListener, PullToRefreshBase.OnRefreshListener2<ListView> { private AccountPager context; private Timer pollingTimer; private Timer saveTimer; private Timer applyTimer; private MsgHandler mHandler; private ProgressDialog mDialog; private AccountEditAdapter adapter; private PullToRefreshListView prListView; private ListView listView; private List<Account> accountList; protected Account editAcnt; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setHasOptionsMenu(true); editAcnt = (Account) getArguments().getSerializable("account"); accountList = (List<Account>) getArguments().getSerializable("accList"); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { context = (AccountPager) getActivity(); mHandler = new MsgHandler(this); mDialog = Kdialog.getProgress(context, mDialog); context.setTitle(editAcnt.name); // Now find the PullToRefreshLayout to setup View view = inflater.inflate(R.layout.pull_list_view, container, false); prListView = (PullToRefreshListView) view.findViewById(R.id.listView); prListView.setOnRefreshListener(this); // Actual ListView adapter = new AccountEditAdapter(context, this); listView = prListView.getRefreshableView(); listView.setAdapter(adapter); listView.setOnItemClickListener(this); setPollingTimer(); return view; } @Override public void onPause() { super.onPause(); if (pollingTimer != null) { pollingTimer.cancel(); } if(applyTimer != null) { applyTimer.cancel(); } if (mDialog != null) { mDialog.cancel(); } } @Override public void onResume() { super.onResume(); } @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { //Log.e(Dbg._TAG_(), "pos: " + position + ", id: " + id); final ListItem listItem = (ListItem) adapter.getItem(position - 1); if(listItem.type == ListItem.INPUT) { final LayoutInflater inflater = LayoutInflater.from(context); final View layout = inflater.inflate(R.layout.input_text, null); final EditText editText = (EditText) layout.findViewById(R.id.text); editText.setFilters(Utils.arrayMerge(editText.getFilters(), new InputFilter[]{Utils.EMOJI_FILTER})); editText.setText(listItem.value); final AlertDialog dialog = Kdialog.getDefInputDialog(context).create(); dialog.setView(layout); dialog.setTitle(listItem.key); dialog.setOnShowListener(new DialogInterface.OnShowListener() { @Override public void onShow(DialogInterface dialogIface) { Button btn = dialog.getButton(AlertDialog.BUTTON_POSITIVE); btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Boolean noError = true; String input = editText.getText().toString().trim(); if (!StrUtils.validateInput(StrUtils.IN_TYPE_NONE_EMPTY, input)) { noError = false; editText.setError(getString(R.string.err_msg_empty)); } else if (input.equalsIgnoreCase("Admin")) { noError = false; editText.setError(getString(R.string.err_msg_name_reserved)); } else if(!StrUtils.validateInput(StrUtils.IN_TYPE_STRING, input)) { noError = false; editText.setError(getString(R.string.err_msg_invalid_str)); } if (noError) { dialog.dismiss(); editAcnt.update(input, editAcnt.account, editAcnt.admin, editAcnt.activate); setSaveTimer(); } } }); } }); dialog.show(); } else if(listItem.type == ListItem.CHECKBOX) { if (listItem.key.equals(context.getString(R.string.activate))) { editAcnt.activate = !editAcnt.activate; setSaveTimer(); } else if (listItem.key.equals(context.getString(R.string.admin))) { editAcnt.admin = !editAcnt.admin; setSaveTimer(true); } } else if(listItem.type == ListItem.NEW_PASSWORD) { final LayoutInflater inflater = LayoutInflater.from(context); final View layout = inflater.inflate(R.layout.input_new_password, null); final EditText editPassword = (EditText) layout.findViewById(R.id.password); final EditText editConfimPassword = (EditText) layout.findViewById(R.id.confimPassword); editPassword.setFilters(Utils.arrayMerge(editPassword.getFilters(), new InputFilter[]{Utils.EMOJI_FILTER})); editConfimPassword.setFilters(Utils.arrayMerge(editConfimPassword.getFilters(), new InputFilter[]{Utils.EMOJI_FILTER})); final AlertDialog dialog = Kdialog.getDefInputDialog(context).create(); dialog.setView(layout); dialog.setTitle(listItem.key); dialog.setOnShowListener(new DialogInterface.OnShowListener() { @Override public void onShow(DialogInterface dialogIface) { Button btn = dialog.getButton(AlertDialog.BUTTON_POSITIVE); btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Boolean noError = true; String password = <PASSWORD>Password.getText().toString().trim(); String confirmPassword = <PASSWORD>ConfimPassword.getText().toString().trim(); if (!StrUtils.validateInput(StrUtils.IN_TYPE_NONE_EMPTY, password)) { noError = false; editPassword.setError(getString(R.string.err_msg_empty)); } else if (!StrUtils.validateInput(StrUtils.IN_TYPE_STRONG_PSWD, password)) { noError = false; editPassword.setError(getString(R.string.err_msg_strong_password)); } if (!StrUtils.validateInput(StrUtils.IN_TYPE_NONE_EMPTY, confirmPassword)) { noError = false; editConfimPassword.setError(getString(R.string.err_msg_empty)); } else if(!password.equals(confirmPassword)) { noError = false; editPassword.setError(getString(R.string.err_msg_password_not_equal)); } if (noError) { dialog.dismiss(); editAcnt.update(editAcnt.name, editAcnt.account, password, editAcnt.admin, editAcnt.activate, editAcnt.trial); setSaveTimer(); } } }); } }); dialog.show(); } else if(listItem.type == ListItem.BUTTON && listItem.key.equals(getString(R.string.apply_permission))) { final List<CharSequence> accNameList = new LinkedList<CharSequence>(); final List<CharSequence> accList = new LinkedList<CharSequence>(); for(Account account: accountList) { if(!account.account.equals(editAcnt.account) && !account.admin) { accList.add(account.account); accNameList.add(account.name); } } final CharSequence[] accNameArray = new CharSequence[accNameList.size()]; accNameList.toArray(accNameArray); final AlertDialog dialog; final AlertDialog.Builder builder = new AlertDialog.Builder(context); builder.setTitle(getString(R.string.apply_permission)); builder.setIcon(R.drawable.ic_refresh); builder.setSingleChoiceItems(accNameArray, -1, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); mDialog = Kdialog.getProgress(context, mDialog); applyTimer = new Timer(); applyTimer.schedule(new ApplyPermission(accList.get(which)), 0, PrjCfg.RUN_ONCE); } }).setNegativeButton(getString(R.string.cancel), null); dialog = builder.create(); dialog.show(); } } @Override public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) { //Log.e(Dbg._TAG_(), "onRefresh.. "); if(pollingTimer != null) { pollingTimer.cancel(); } setPollingTimer(); } @Override public void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) { } public void setPollingTimer() { MHandler.exec(mHandler, MHandler.CLEAR_LIST); pollingTimer = new Timer(); pollingTimer.schedule(new PollingTimerTask(), 0, PrjCfg.RUN_ONCE); } public void setSaveTimer() { setSaveTimer(false); } public void setSaveTimer(boolean resetActivity) { mDialog = Kdialog.getProgress(context, mDialog); saveTimer = new Timer(); saveTimer.schedule(new SaveTimerTask(resetActivity), 0, PrjCfg.RUN_ONCE); } private class SaveTimerTask extends TimerTask { private boolean resetActivity = false; public SaveTimerTask() { this(false); } public SaveTimerTask(boolean resetActivity) { this.resetActivity = resetActivity; } public void run() { try { JSONObject jObject = JSONReq.multipart(context, "PUT", PrjCfg.CLOUD_URL + "/api/user/edit", editAcnt.toMultiPart()); //Log.e(Dbg._TAG_(), jObject.toString()); if (jObject == null || jObject.getInt("code") != 200) { mDialog.dismiss(); MHandler.exec(mHandler, MHandler.SHOW_ERR_MSG, getString(R.string.err_save)); return; } else { if(resetActivity) { MHandler.exec(mHandler, MHandler.TOAST_MSG, getString(R.string.success_save)); Utils.restartActivity(context); } else { setPollingTimer(); MHandler.exec(mHandler, MHandler.TOAST_MSG, getString(R.string.success_save)); } } } catch (Exception e) { if(PrjCfg.USER_MODE == PrjCfg.MODE_KSMT_DEBUG) { MHandler.exec(mHandler, MHandler.SHOW_ERR_MSG, Arrays.toString(e.getStackTrace())); } e.printStackTrace(); } finally { saveTimer.cancel(); } } } private class PollingTimerTask extends TimerTask { public void run() { try { JSONObject jObject = JSONReq.send(context, "GET", PrjCfg.CLOUD_URL + "/api/user/" + WebUtils.encode(editAcnt.account)); if (jObject == null || jObject.getInt("code") != 200) { MHandler.exec(mHandler, MHandler.GO_BACK, getString(R.string.err_get_account)); return; } JSONObject jUser = jObject.getJSONObject("user"); editAcnt.update(jUser); MHandler.exec(mHandler, MHandler.UPDATE); } catch (Exception e) { e.printStackTrace(); } finally { pollingTimer.cancel(); mDialog.dismiss(); } } } private class ApplyPermission extends TimerTask { private CharSequence account; public ApplyPermission(CharSequence account) { this.account = account; } public void run() { try { JSONObject jObject = JSONReq.send(context, "GET", PrjCfg.CLOUD_URL + "/api/user/auth/" + WebUtils.encode((String) account)); if (jObject == null || jObject.getInt("code") != 200) { MHandler.exec(mHandler, MHandler.SHOW_ERR_MSG, getString(R.string.err_get_account)); return; } JSONObject jUserAuth = new JSONObject(); jUserAuth.put("account", editAcnt.account); jUserAuth.put("devices", jObject.getJSONArray("devices")); List<BasicNameValuePair> params = new LinkedList<BasicNameValuePair>(); params.add(new BasicNameValuePair("json", jUserAuth.toString())); jObject = JSONReq.send(context, "PUT-JSON", PrjCfg.CLOUD_URL + "/api/user/auth", params); if (jObject == null || jObject.getInt("code") != 200) { MHandler.exec(mHandler, MHandler.SHOW_ERR_MSG, getString(R.string.err_save)); } else { MHandler.exec(mHandler, MHandler.TOAST_MSG, getString(R.string.success_save)); Utils.restartActivity(context); } } catch (Exception e) { if(PrjCfg.USER_MODE == PrjCfg.MODE_KSMT_DEBUG) { MHandler.exec(mHandler, MHandler.SHOW_ERR_MSG, Arrays.toString(e.getStackTrace())); } e.printStackTrace(); } finally { applyTimer.cancel(); mDialog.dismiss(); } } } private static class MsgHandler extends MHandler { private AccountEditFragment fragment; public MsgHandler(AccountEditFragment fragment) { super(fragment.context); this.fragment = fragment; } @Override public void handleMessage(Message msg) { switch (msg.what) { case MHandler.UPDATE: { fragment.context.setTitle(fragment.editAcnt.name); fragment.adapter.addList(fragment.editAcnt); fragment.adapter.notifyDataSetChanged(); fragment.prListView.onRefreshComplete(); break; } case MHandler.CLEAR_LIST: { fragment.adapter.clearList(); break; } default: { super.handleMessage(msg); } } } } }
The 11.6 inch Chromebook C204 and 14 inch C403 are the two clamshell laptops. There’s also the 14 inch Chromebook Flip C214 convertible. The Chromebook Tablet CT100 is a new form factor for this series with a 9.7 inch display. It’s the first Chrome OS tablet from Asus. The tablet has a hexa-core OP1 processor with 4GB of RAM and 32GB storage. There’s a 35Wh battery and USB Type-C for charging. The Chromebook C204 has a dual-core Celeron processor with 4GB RAM and 32GB storage. There’s a microSD card slot, two USB Type-C ports, HD webcam, and a 50Wh battery. The Chromebook Flip C214 features an N4000 processor with 4GB RAM and 32GB storage. It also has the same connectivity options. Asus Chromebook C403 has its 14 inch display, a dual-core processor from Intel and the same amount of memory and storage. Asus promises enhanced durability for these products with spill and tamper resistant keyboards and all-around rubber bumpers. These devices have similar specs and a common design aesthetic.
<filename>app/handlers/private/start.py from aiogram import Dispatcher from aiogram.types import Message async def get_start_message(m: Message): await m.answer("Hello") def setup(dp: Dispatcher): dp.message.register(get_start_message, commands="start")
<gh_stars>0 import asyncio import atexit import getpass import fbchat import os import json import toml import logging import httpx import re import base64 from aiohttp import ClientSession import secrets if os.name == "nt": asyncio.DefaultEventLoopPolicy = asyncio.WindowsSelectorEventLoopPolicy threads = dict() users = dict() # Reverse lookup reverse_threads = dict() remote_nick_format = "" stream_api_url = '' message_api_url = '' api_client = httpx.AsyncClient() fb_listener_global = None run_infinite_timer = True timeout_listen = 3600 # Send message to matterbridge async def send_msg_to_api(gateway, text, username=''): if text is not None: headers = {'content-type': 'application/json'} payload = {"text": text, "username": username, "gateway": gateway} async with httpx.AsyncClient() as client: await client.post(message_api_url, data=json.dumps(payload), headers=headers) def load_cookies(filename): try: # Load cookies from file with open(filename) as f: return json.load(f) except FileNotFoundError as e: logging.error(e) return # No cookies yet def save_cookies(filename, cookies): with open(filename, "w") as f: json.dump(cookies, f) async def load_session(cookies, cookie_domain): if not cookies: return try: return await fbchat.Session.from_cookies(cookies, domain=cookie_domain) except fbchat.FacebookError as e: logging.error(e) return # Failed loading from cookies async def find_file_type(search_text, search_link=True, url_protocol="http"): types = {"image": ["jpg", "png", "jpeg", "gif", "webp"], "video": ["webm"]} found_type = None found_url = None found_cat = None for tp in types: for find_tp in types[tp]: try: if search_link is True: find_img_url = re.search(url_protocol + r".+\.(" + find_tp + ")", search_text) else: find_img_url = re.search(r".+\.(" + find_tp + ')$', search_text) except TypeError as e: logging.info(f"searching for file returned: {e}") break else: if find_img_url: found_url = find_img_url.group(0) found_type = find_img_url.group(1) found_cat = tp logging.info(f"found_url: {found_url} ; found_type: {found_type} ; found_cat: {found_cat}") break if found_type == "jpg": found_type = "jpeg" if found_type == "webp": found_type = "png" return found_type, found_url, found_cat async def listen_api(session, fbchat_client): timeout = httpx.Timeout(10.0, read=None) logging.info("Starting api_client stream") async with api_client.stream(method="GET", url=stream_api_url, timeout=timeout) as r: logging.info(f"response: {r}") try: async for msg in r.aiter_lines(): resp_json = json.loads(msg) if resp_json: got_gateway = resp_json.get("gateway") got_text = resp_json.get("text") got_username = resp_json.get("username") search_link = True try: filedata = resp_json["Extra"]["file"][0]["Data"] except (KeyError, TypeError): logging.info(f"From api received json: {resp_json}") else: search_link = False filedata = base64.standard_b64decode(filedata) got_text = resp_json["Extra"]["file"][0]["Name"] img_type_result, filename, cat = await find_file_type(search_text=got_text, search_link=search_link) if filename == got_text and search_link is False: got_text = f"sent {img_type_result} file" if got_gateway: fb_thread = reverse_threads[got_gateway] if fb_thread in users: thread = fbchat.User(session=session, id=fb_thread) else: thread = fbchat.Group(session=session, id=fb_thread) if img_type_result is not None: if search_link is True: async with ClientSession() as sess, sess.get(filename) as resp: image_data = await resp.read() else: image_data = filedata try: files = await fbchat_client.upload( [(filename, image_data, cat + "/" + img_type_result)] ) try: await thread.send_text(text=f"{got_username}", files=files) except fbchat.FacebookError as e: logging.error(e) except fbchat.ExternalError as e: logging.error(e) if len(got_text.splitlines()) > 1 and got_text.startswith('>'): split_lines = got_text.splitlines() got_text = '' count = 0 for line in split_lines: if not line.startswith('>'): break count += 1 try: split_lines[count] = '\n' + split_lines[count] except IndexError: pass for line in split_lines: got_text += '\n' + line elif got_text.startswith('>'): got_text = '\n' + got_text logging.info(f"From api sending message: username: {got_username} | text: {got_text}") try: await thread.send_text(f"{got_username}{got_text}") except fbchat.FacebookError as e: logging.error(e) logging.info(f"Sent message: username: {got_username} | text: {got_text}") except httpx.RemoteProtocolError as e: logging.error(e) logging.error(f"out of api_client stream") try: fb_listener_global.disconnect() except fbchat.FacebookError as e: logging.error(e) global run_infinite_timer run_infinite_timer = False global timeout_listen timeout_listen = 1 logging.info("Stopping infinite timer loop.") async def get_attachments(attachments, send_text, client): url = '' if isinstance(attachments[0], fbchat.ShareAttachment) or \ isinstance(attachments[0], fbchat.VideoAttachment) or \ isinstance(attachments[0], fbchat.AudioAttachment): # TODO: Finish me return send_text # you need to find a way to extract the attachments if isinstance(attachments[0], fbchat.ImageAttachment): url = await client.fetch_image_url(attachments[0].id) logging.info(f"Got URL: {url}") if send_text is not None: send_text = f"{url} {send_text}" else: send_text = f"{url}" return send_text async def listen_fb(fb_listener, session, client): logging.info("Listening for fb events") try: async for event in fb_listener.listen(): if isinstance(event, fbchat.MessageEvent) or isinstance(event, fbchat.MessageReplyEvent): run_rest = True # Don't echo back messages to api that are received from the api if event.author.id == session.user.id: try: # Find the configured pattern to ignore regex = re.search(r'' + remote_nick_format, event.message.text) except TypeError: pass # Just go on error, so that the script doesn't stop else: if regex: run_rest = False if run_rest is True: logging.info(f"From fb event: {event}") logging.info( f"From fb received: " f"message: {event.message.text} | " f"from user: {event.author.id} | " f"in thread: {event.thread.id}") gateway = "" username = "" if event.thread.id in threads: gateway = threads[event.thread.id] if event.author.id in users: username = users[event.author.id] send_text = event.message.text if event.message.attachments: send_text = await get_attachments(event.message.attachments, send_text, client) if isinstance(event, fbchat.MessageEvent): logging.info( f"From fb sending to api: " f"username: {username} | " f"gateway: {gateway} | " f"message: {event.message.text}") await send_msg_to_api(gateway, send_text, username) logging.info(f"Sent message to api: event.message.text: {event.message.text}") elif isinstance(event, fbchat.MessageReplyEvent): random_token = secrets.token_hex(nbytes=2) reply = event.replied_to logging.info( f"From fb sending to api (reply): " f"username: {username} | " f"gateway: {gateway} | " f"message: {event.message.text} | " f"reply author: {reply.author}") event_msg = send_text author_nick = None if reply.author != '': author_nick = users.get(reply.author) format_event_msg = '' for line in event_msg.splitlines(keepends=True): format_event_msg += f"({random_token}) {line}" event_msg = f"[Reply]: \n" + format_event_msg if event.replied_to.attachments: event_msg = await get_attachments(event.replied_to.attachments, event_msg, client) event_msg += f"\n({random_token}) [Attachment from]: {author_nick}" format_only_reply_msg = '' if reply.text is not None: format_only_reply_msg += f"[Quote from]: {author_nick}:\n" for line in reply.text.splitlines(keepends=True): format_only_reply_msg += f"({random_token}) {line}" format_whole_reply_msg = \ f"({random_token}) {format_only_reply_msg}\n" \ f"({random_token}) {event_msg}" await send_msg_to_api(gateway, format_whole_reply_msg, username) logging.info(f"Sent message to api: event_msg: {event_msg}") logging.warning("Out of fb listener loop.") except fbchat.FacebookError as e: logging.error(e) await api_client.aclose() return async def timeout_listen_fb(): logging.info(f"Fb listener timeout restarted: {timeout_listen} sec") await asyncio.sleep(timeout_listen) try: fb_listener_global.disconnect() except fbchat.FacebookError as e: logging.error(e) exit() logging.info("Executed listener disconnect") async def main(): logging.basicConfig(level=logging.INFO) # You cen set the level to DEBUG for more info logging.info("Logging started") global threads global users global reverse_threads global remote_nick_format global stream_api_url global message_api_url if not os.path.exists("fbridge-config.toml"): logging.error("Config file fbridge-config.toml doesn't exist") return parsed_toml = toml.load("fbridge-config.toml") stream_api_url = parsed_toml["stream_api_url"] message_api_url = parsed_toml["message_api_url"] cookie_domain = parsed_toml["cookie_domain"] th = parsed_toml["threads"] us = parsed_toml["users"] for key, value in th.items(): threads[key] = value["gateway"] for key, value in us.items(): users[key] = value["username"] reverse_threads = {v: k for k, v in threads.items()} remote_nick_format = parsed_toml["RemoteNickFormat"] cookies = load_cookies("session.json") session = await load_session(cookies, cookie_domain) if not session: logging.error("Session could not be loaded, login instead!") session = await fbchat.Session.login(getpass.getuser(), getpass.getpass()) # Save session cookies to file when the program exits atexit.register(lambda: save_cookies("session.json", session.get_cookies())) if session: client = fbchat.Client(session=session) global fb_listener_global fb_listener_global = fbchat.Listener(session=session, chat_on=True, foreground=False) fb_listener = fb_listener_global listen_fb_task = asyncio.create_task(listen_fb(fb_listener, session, client)) client.sequence_id_callback = fb_listener.set_sequence_id await client.fetch_threads(limit=1).__anext__() asyncio.create_task(listen_api(session, client)) while run_infinite_timer is True: asyncio.create_task(timeout_listen_fb()) await listen_fb_task listen_fb_task = asyncio.create_task(listen_fb(fb_listener, session, client)) else: logging.error("No session was loaded, you either need the cookies or a proper login.") asyncio.run(main())
<reponame>elenaborisova/LeetCode-Solutions def sum_odd_length_subarrays(arr): subarrays_sum = 0 for i in range(len(arr)): for j in range(i, len(arr) + 1): curr_subarray = arr[i:j] if len(curr_subarray) % 2 == 1: subarrays_sum += sum(curr_subarray) return subarrays_sum print(sum_odd_length_subarrays([1, 4, 2, 5, 3])) print(sum_odd_length_subarrays([1, 2])) print(sum_odd_length_subarrays([10, 11, 12]))
//! Naive x86-64 code generator for expression in reverse polish form. //! Takes an expression on the command-line and emit nasm assembly on stdout. //! //! As the goal is to play with code generation, the input language is minimal. //! There is notably no lexical analyzer. All tokens are one ASCII character long //! and spaces between tokens are not allowed. //! //! Grammar: //! program -> expr | program ';' expr //! expr -> primary | expr expr binary_operator //! primary -> number | variable //! number -> '0' .. '9' //! variable -> 'A' .. 'Z' | 'a' .. 'z' //! binary_operator -> '+' | '*' | '=' use std::collections::HashSet; use std::env; use std::fmt; fn main() { let args = env::args().skip(1).collect::<Vec<String>>(); if args.len() != 1 { panic!("usage: input_string"); } compile(&args[0]); } /// Parses expression and calls code generator. fn compile(input: &str) { let mut cg = CodeGen::new(); cg.prologue(); for ch in input.chars() { match ch { '0'..='9' => cg.number(ch.to_digit(10).unwrap()), 'a'..='z' | 'A'..='Z' => cg.variable(ch), '+' => cg.add(), '-' => cg.sub(), '*' => cg.mul(), ';' => cg.end_of_expr(), '=' => cg.assign(), _ => panic!("unexpected input: {}", ch), } } cg.epilogue(); } /// Naive code generator. /// Exposes "semantic actions" called from the parser. #[derive(Debug)] struct CodeGen { // Keeps track of location of all terms of expression to generate code for. stack: Vec<Location>, symbols: HashSet<char>, } /// Operand location. #[derive(Debug)] enum Location { OnOperandStack(Operand), InAccumulator, OnCpuStack, } /// Operand flavors. #[derive(Debug)] enum Operand { Integer(u32), Variable(char), } impl fmt::Display for Operand { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { Operand::Integer(n) => write!(f, "{}", n), Operand::Variable(v) => write!(f, "[rel {}]", v), } } } impl CodeGen { fn new() -> CodeGen { CodeGen { stack: vec![], symbols: HashSet::new(), } } fn prologue(&mut self) { println!("global _evaluate"); println!("section .text"); println!("_evaluate:"); } fn epilogue(&mut self) { self.end_of_expr(); println!("\tret"); if self.symbols.len() > 0 { println!("section .data"); for s in &self.symbols { println!("{}: dd 0", *s); } } } fn end_of_expr(&mut self) { match self.stack.pop() { Some(Location::OnOperandStack(o)) => println!("\tmov eax, {}", o), Some(Location::OnCpuStack) => panic!("unbalanced stack: {:?}", self.stack), Some(Location::InAccumulator) | None => (), } assert_eq!(self.stack.len(), 0); } fn number(&mut self, n: u32) { self.stack .push(Location::OnOperandStack(Operand::Integer(n))) } fn variable(&mut self, v: char) { self.symbols.insert(v); self.stack .push(Location::OnOperandStack(Operand::Variable(v))) } fn add(&mut self) { self.rvalue_binop(|n| println!("\tadd eax, {}", n)); } fn sub(&mut self) { self.rvalue_binop(|n| println!("\tsub eax, {}", n)); } fn mul(&mut self) { self.rvalue_binop(|n| { println!("\tmov ebx, {}", n); println!("\tmul ebx"); }); } fn assign(&mut self) { match self.prepare_binop() { (Location::OnOperandStack(Operand::Variable(v)), Location::OnOperandStack(r)) => { println!("\tmov eax, {}", r); println!("\tmov dword [rel {}], eax", v); self.stack.push(Location::InAccumulator); } (Location::OnOperandStack(Operand::Variable(v)), Location::InAccumulator) => { println!("\tmov dword [rel {}], eax", v); self.stack.push(Location::InAccumulator); } (lhs, rhs) => panic!("unexpected stack: {:?} {:?} {:?}", self.stack, lhs, rhs), } } /// Emits code for binary operation with rvalue operands. fn rvalue_binop<F: FnOnce(&str)>(&mut self, emit_binop: F) { let (lhs, rhs) = self.prepare_binop(); match (lhs, rhs) { (Location::OnOperandStack(l), Location::OnOperandStack(r)) => { println!("\tmov eax, {}", l); emit_binop(&r.to_string()); self.stack.push(Location::InAccumulator); } (Location::OnOperandStack(l), Location::InAccumulator) => { println!("\tmov ebx, eax"); println!("\tmov eax, {}", l); emit_binop("ebx"); self.stack.push(Location::InAccumulator); } (Location::InAccumulator, Location::OnOperandStack(r)) => { emit_binop(&r.to_string()); self.stack.push(Location::InAccumulator); } (Location::OnCpuStack, Location::InAccumulator) => { println!("\tpop rbx"); emit_binop("ebx"); self.stack.push(Location::InAccumulator); } (lhs, rhs) => panic!("unexpected stack: {:?} {:?} {:?}", self.stack, lhs, rhs), } } /// Pops operands for binary operation and spill if needed. fn prepare_binop(&mut self) -> (Location, Location) { // Get location of operands. debug_assert!(self.stack.len() >= 2); let rhs = self.stack.pop().unwrap(); let lhs = self.stack.pop().unwrap(); // Spill partial result for lower-precedence operation. let len = self.stack.len(); for (i, ol) in self.stack.iter_mut().enumerate() { match ol { Location::OnOperandStack(Operand::Integer(_)) => {} Location::OnOperandStack(Operand::Variable(_)) => {} Location::OnCpuStack => (), Location::InAccumulator => { if i != len - 1 { panic!("unexpected stack: {:?}", self.stack); } println!("\tpush rax"); *ol = Location::OnCpuStack; } } } (lhs, rhs) } }
AMMAN, Jordan (AP) — Jordan's prime minister says the country is hosting 900 U.S. military personnel to bolster its defense capabilities against potential threats from the Syrian civil war. The first Jordanian public official to speak publicly of the numbers of U.S. troops in the kingdom, Abdullah Ensour told reporters Saturday that 200 of the personnel were experts training for how to handle a chemical attack. He said the remaining 700 are manning a Patriot missile defense system and F-16 fighter jets which Washington deployed this month in case the Syrian war worsens. Jordan is concerned its larger northern neighbor would use chemical weapons against Syrian refugee camps in Jordan and other neighboring countries, or that the stockpile may fall into the hands of al-Qaida or other militants if President Bashar Assad loses control.
Bleeding in patients undergoing percutaneous coronary intervention: factors associated with procedural outcomes and major bleeding complications Bleeding complications are infrequent in patients undergoing percutaneous coronary interventions (PCI), however they are associated with a poor outcome and increased mortality and morbidity rates. To assess bleeding complications in patients undergoing PCI adjusting for other factors such as estimated glomerular filtration rate (eGFR), sex, left ventricular ejection fraction (EF), ST-segment elevation myocardial infarction (STEMI), intra-aortic balloon pump (IABP) and/or Impella, age, and prior coronary artery bypass graft (CABG). Data was collected for quality control on all patients that underwent PCI between 2010 and 2018 at 6 tertiary care hospitals in our system. Outcomes were classified and reported in accordance with the Bleeding Academic Research Consortium (BARC) criteria. BARC Type 4 (CABG-related) and BARC Type 5 (fatal) bleeds were excluded. Major bleeding was defined as BARC Type ≥3. Major adverse cardiac and cerebrovascular events (MACCE) was the combined endpoint of hospital death; post procedural myocardial infarction; cerebrovascular events (ischemic and hemorrhagic) and major bleeding complications. Due to the clustering of patients within hospitals, hierarchical generalized linear mixed models were used. Due to the high intraclass correlation of procedures within patients, only the first procedure within the study period was selected from each patient for analysis. A total of 25,647 patients underwent PCI during the time period. Baseline and procedural characteristics are shown in the Table. Patients with major bleeding (BARC ≥3) differed significantly from patients with BARC <3 bleeding complications. By multivariate analysis, age (OR: 1.15, CI: 1.11.2), femoral site (OR: 1.5, CI: 1.21.8), CKD (OR: 1.7, CI: 1.42.0), STEMI (OR: 3.3, CI: 2.84.0), prior cardiogenic shock (OR: 5.8, CI: 4.18.3), and use of IABP/Impella (OR: 5.5, CI: 4.46.9) were associated withBARC ≥3 (Figure). In large contemporary dataset of patients undergoing PCI: 1) patients with BARC ≥3 bleeding complications were significantly different from those having BARC<3 bleeding complications; 2) femoral access, chronic kidney disease, STEMI on presentation and the use of mechanical circulatory devices were associated with major bleeding complications; and 3) male patients had significantly lower odds of major bleeding complications. Type of funding sources: None.
def calculate_file_url(name_bytes, base_url): try: rel_name = base64.b64decode(name_bytes).decode('utf8') except binascii.Error: return None full_url = urllib.parse.urljoin(base_url, rel_name) log.debug('rel_name: {}, full_url: {}'.format(rel_name, full_url)) if urllib.parse.urlparse(full_url).scheme not in ('http', 'https'): raise ValueError('Unknown URL scheme in {}'.format(repr(full_url))) if base_url and not full_url.startswith(base_url): raise ValueError('URL outside of {}: {}'.format(base_url, repr(full_url))) return full_url
#include "tp_image_utils/ToGray.h" #include "tp_image_utils/ColorMap.h" namespace tp_image_utils { //################################################################################################## ByteMap toGray(const ColorMap& src) { ByteMap dst(src.width(), src.height()); uint8_t* d = dst.data(); const TPPixel* s = src.constData(); const TPPixel* sMax = s + src.size(); while(s<sMax) { *d = uint8_t((int(s->r) + int(s->g) + int(s->b))/3); s++; d++; } return dst; } }
Incidence of endstage renal disease after heart transplantation and effect of its treatment on survival Abstract Aims Many heart transplant recipients will develop endstage renal disease in the postoperative course. The aim of this study was to identify the longterm incidence of endstage renal disease, determine its risk factors, and investigate what subsequent therapy was associated with the best survival. Methods and results A retrospective, singlecentre study was performed in all adult heart transplant patients from 1984 to 2016. Risk factors for endstage renal disease were analysed by means of multivariable regression analysis and survival by means of KaplanMeier. Of 685 heart transplant recipients, 71 were excluded: 64 were under 18 years of age and seven were retransplantations. During a median followup of 8.6 years, 121 (19.7%) patients developed endstage renal disease: 22 received conservative therapy, 80 were treated with dialysis (46 haemodialysis and 34 peritoneal dialysis), and 19 received a kidney transplant. Development of endstage renal disease (examined as a timedependent variable) inferred a hazard ratio of 6.45 (95% confidence interval 4.878.54, P < 0.001) for mortality. Tacrolimusbased therapy decreased, and acute kidney injury requiring renal replacement therapy increased the risk for endstage renal disease development (hazard ratio 0.40, 95% confidence interval 0.260.62, P < 0.001, and hazard ratio 4.18, 95% confidence interval 2.307.59, P < 0.001, respectively). Kidney transplantation was associated with the best median survival compared with dialysis or conservative therapy: 6.4 vs. 2.2 vs. 0.3 years (P < 0.0001), respectively, after endstage renal disease development. Conclusions Endstage renal disease is a frequent complication after heart transplant and is associated with poor survival. Kidney transplantation resulted in the longest survival of patients with endstage renal disease. Introduction The incidence of chronic kidney disease (CKD) after heart transplantation (HT) is high with percentages up to 80% reported in some studies. In a recent study, 19% of the 268 HT recipients developed end-stage renal disease (ESRD) during a median follow-up of 76 months. 7 Risk factors for the development of CKD after HT include the type of calcineurin inhibitor (CNI) used and the presence of comorbidities. 2,3,8,9 Estimating the true incidence of ESRD after HT and its effect on patient outcome is complicated by the fact that the definition of ESRD differed between studies. The definitions used in the literature can be as broad as a glomerular filtration rate (GFR) ≤ 45 mL/min/1.73 m 2. Other studies only took patients who received renal replacement therapy (RRT), either dialysis and/or kidney transplantation into consideration. A small overview of ESRD definitions used is provided in Supporting Information, Table S1. However, according to the Kidney Disease: Improving Global Outcomes (KDIGO) CKD guidelines, ESRD is defined as an estimated GFR (eGFR) ≤ 15 mL/min/1.73 m 2 or the need for RRT. 10 Moreover, HT recipients with ESRD who were treated conservatively were not included. In several studies, the survival of patients who received a kidney transplant (KT) after HT was compared with the survival of KT or simultaneous kidney and heart transplant recipients. There is only one study that compared dialysis with KT, demonstrating a survival benefit associated with KT. 7 The purpose of this study was to investigate the long-term incidence of ESRD in a large cohort of HT recipients, determine risk factors for ESRD, and investigate the effect of ESRD on survival. Furthermore, the effect of different modalities of RRT on long-term survival was analysed. Patient cohort In this retrospective study, all adult patients who received an HT at the Erasmus MC between June 1984 and May 2016 were included. The investigation conforms with the principles outlined in the Declaration of Helsinki. 14 The study was approved by the Medical Ethical Review Committee of the Erasmus MC (MEC-2017-421). When a patient had a retransplantation, only the first HT was included. When retransplanted, the patient was censored at the date of the second transplantation. Pre-operative kidney function An eGFR of 30 mL/min/1.73 m 2 before HT is normally an absolute contraindication for HT. However, this is only the case when a patient has a decreased kidney function because of a renal disease. When a patient has a decreased eGFR, we test for reversibility in order to exclude pre-renal insufficiency, which is frequently encountered in heart failure patients who are on the waiting list. When reversibility is demonstrated (by inotropic ± temporary mechanical support), the patient can still be listed for transplantation. To monitor kidney function before HT, proteinuria is monitored frequently in order to see whether a patient develops a kidney disease (such as hypertensive or diabetic nephropathy). Post-transplantation immunosuppressive regimen The immunosuppressive regimen used at our centre was described previously. 15,16 Until 2000, maintenance immunosuppression consisted of ciclosporin (CsA) in combination with prednisone. If patients experienced rejection, azathioprine or mycophenolate mofetil was added. After 2000, CsA was replaced by tacrolimus as the CNI of choice. Comorbidity after heart transplantation Kidney function was classified according to the 2012 KDIGO CKD evaluation guidelines and the 2014 National Institute for Health and Care Excellence guidelines. 10,17 ESRD (CKD Stage 5) was defined as an eGFR ≤ 15 mL/min/1.73 m 2 or when a patient received RRT. RRT was defined as treatment with dialysis (haemodialysis or peritoneal dialysis) or a KT. Patients who declined dialysis and/or KT or who were not deemed fit for dialysis or KT were considered as patients who received conservative therapy. Data on kidney function were collected before HT (considered as baseline), at Month 12 after HT, and then annually. Estimated GFR was calculated with the CKD-EPI method. 18 In addition, demographic and (pre-HT) clinical characteristics were collected from the electronic patient files and from our electronic database. Patients were seen at the Erasmus MC at least twice a year. Patients who developed acute on chronic renal failure within the first year but improved (within the first posttransplant year) were not classified as having ESRD. Rather, these patients were classified based on their eGFR at Year 1 and the corresponding CKD stage. Patients were considered to have diabetes mellitus when they used any kind of glucose-lowering drug at the time of HT. Post-transplantation diabetes mellitus was diagnosed whenever a patient developed the need for any such drug after HT, and this need persisted for more than 3 months. Hypertension was defined according to the European Society of Cardiology guidelines. 19 All patients had a coronary angiogram routinely performed at Years 1 and 4 after HT. After 4 years, patients underwent a stress myocardial perfusion imaging annually. When any abnormalities were observed, the patient underwent coronary angiography. Cardiac allograft vasculopathy (CAV) was defined according the 2010 International Society for Heart and Lung Transplantation (ISHLT) guideline. 20 Statistical analysis The distribution of continuous variables was examined for normality by means of histograms and skewness coefficients. Normally distributed continuous variables are presented as mean ± standard deviation and non-normally distributed variables as median and interquartile range (IQR). Associations between baseline characteristics and occurrence of ESRD and mortality were examined by means of Cox regression. Patients lost to follow-up were considered at risk until the date of last contact, at which time point they were censored. Moreover, to account for the fact that patients treated with tacrolimus were unable to reach followup times as long as those of CsA-treated patients, follow-up was censored at 15 years for all patients for this analysis. The Cox proportional hazards assumption was assessed by means of log-log plots. First, univariable Cox models were used. Subsequently, a multivariable analysis was performed with variables with a threshold P-value ≤ 0.1. In the setting of our study, the main event of interest, ESRD, could have been precluded by death. In that case, Kaplan-Meier curves overestimate the incidence of the outcome and Cox regression models may inflate the relative differences between the groups resulting in biased hazard ratios (HRs). 21 Therefore, in order to further verify the association between baseline characteristics and ESRD, the analysis of competing risks was performed with ESRD as event of interest and death as competing event according to a model proposed by Fine and Gray. 22 We present subdistribution HRs from the multivariable Fine and Gray model. To investigate the risk of death associated with the development of ESRD during follow-up, ESRD was entered into an extended Cox model as a time-dependent variable. In patients who developed ESRD, univariable Cox models were used to examine associations between clinical characteristics and KT. To examine the effect of RRT modalities on survival, the cumulative event rates per RRT modality were estimated according to the Kaplan-Meier method. Kaplan-Meier event curves were compared by log-rank tests. Results From June 1984 to May 2016, 685 HTs were performed in 678 patients. Of these 685 transplantations, 71 were excluded from the present analysis: 64 patients were aged under 18 years at the time of transplantation and seven were re-transplantations. The characteristics of the included 614 patients are described in Table 1 End-stage renal disease after heart transplantation End-stage renal disease after heart transplantation During follow-up, 121 (19.7%) patients developed ESRD. The median time between HT and development of ESRD was 7.7 years (IQR 5.0-10.7). ESRD-free survival at 1, 5, and 10 years of follow-up was 86%, 76%, and 53%, respectively. ESRD occurred more frequently in male than in female patients ( Table 1). One patient had CKD Stage 5 before HT but did not develop ESRD after transplantation. This patient had an eGFR around 70 mL/min/1.73 m 2 in the year before HT until the patient developed severe forward failure and needed inotropic and mechanical support before HT. The patient was transplanted urgently. After HT, the eGFR normalized to 73 mL/min/1.73 m 2. In total, 80 patients were treated with dialysis only: 46 with haemodialysis and 34 with peritoneal dialysis. Nineteen patients underwent a KT. One of these 19 patients received a second KT. Only data on the first KT were included in the present analysis. Twenty-two patients were treated conservatively. These patients either declined or were considered too frail for RRT. In more detail, five (22.7%) patients had cardiac comorbidities, 11 (50%) patients had non-cardiac comorbidities, four (18.2%) patients were not willing to undergo RRT, one (4.5%) patient died before the RRT could be initiated, and one (4.5%) patient was still being screened for RRT at the end of follow-up. Timing of development of end-stage renal disease after heart transplantation Of the 121 patients who developed ESRD, 30 developed ESRD within the first 5 years after HT, 58 between 5 and 10 years, and 33 after 10 years. In Table 2, the baseline characteristics before HT are shown according to the timing of ESRD development. A higher eGFR before HT was associated with a later onset of ESRD. Heart failure aetiology or the presence of diabetes mellitus before HT was not associated with the timing of ESRD development. AKI requiring RRT was associated with an increased risk to develop ESRD (in both the short term and the long term). Causes of AKI after HT could be divided into one of the following categories: the haemodynamic insult of the transplant surgery, pre-renal kidney insufficiency due to heart failure, the introduction of immunosuppression after HT, and other complications after HT like rejection or infection. Specific percentages cannot be given, as a combination of factors eventually leads to AKI after HT. CsA-based therapy increased the risk to develop ESRD in the long term . Tacrolimus-based treatment reduced this risk significantly . Survival after heart transplantation in relation to end-stage renal disease The overall median long-term survival of the cohort after HT was 11.7 years (IQR 10.7-12.7). The extended Cox regression analysis with ESRD entered as a time-dependent variable demonstrated an HR of 6.45 (95% CI 4.87-8.54, P < 0.001) for mortality when corrected for age, eGFR at HT, heart failure aetiology, CsA-based therapy and AKI requiring RRT. Kidney after heart transplantation In total, 19 patients received a KT. Five patients received a kidney from a deceased donor and 14 patients from a living donor. Of these 14 living donors, seven were related and seven were unrelated donors. Four patients received a preemptive KT, and 15 were treated with dialysis first. In Table 3, the baseline characteristics of these 19 patients are presented. The median time between HT and ESRD was shorter in patients who received a KT compared with patients who did not (7.1 vs. 8.7 years, P < 0.0001). The median time between HT and KT was 8.0 years (IQR 4.8-12.1). The median time between the development of ESRD and KT was 1.5 years (IQR 0.7-2.7). Figure 1A depicts the survival of patients who underwent a KT compared with patients who did not from the time of ESRD diagnosis. The survival of patients with ESRD who received a KT was significantly better than patients who did not (P < 0.0001). When the group of patients who did not receive a KT was divided into a conservative and a dialysis group, the same pattern was observed: KT resulted in the best survival , followed by dialysis and conservative therapy ; P < 0.0001 ( Figure 1B). Patients who received a KT from a living donor had a better survival compared with those who received a KT from a deceased donor (P = 0.02; Supporting Information, Figure S1A). Among recipients of a living donor KT, a living-related donor resulted in a better survival than a living-unrelated donor (P = 0.02; Supporting Information, Figure S1B). 15 4 12 15 1. Discussion The present study demonstrates that ESRD is a frequent complication of HT and is associated with a more than six-fold increased risk of death compared with patients who do not develop ESRD. This is in line with other studies. 2,3 In the multivariable analysis, CsA-based therapy (in comparison with tacrolimus-based therapy) and AKI requiring RRT were independent risk factors for ESRD development. Patients who received a kidney-after-heart transplant had a better survival compared with ESRD patients who were treated with dialysis or conservative therapy. Living donor KT resulted in a better survival compared with deceased donor KT. The long-term incidence of ESRD after HT in this study (19.7%) is comparable with the incidence found by Grupper et al. 7 who reported an incidence of 19% in a cohort of 268 patients. The 2017 ISHLT Registry Report reports an incidence of severe renal dysfunction (defined as the development of a serum creatinine ≥221 mol/L, chronic dialysis, or renal transplant within 10 years) of 29.2% among 8261 HT recipients of whom 10.5% received chronic dialysis or renal transplant. 23 In comparison with Grupper et al., we used the KDIGO criteria to define ESRD, which encompasses a wider range of renal insufficiency. Furthermore, our median follow-up time was significantly longer (103 vs. 76 months, respectively). The median time between HT and the development ESRD in our study was 92 months (IQR 59-128), which was longer compared with other studies. Both Grupper et al. and Cassuto et al. 7,13 noticed a shorter onset of ESRD after HT (83 and 65 months, respectively). This implies that the renal function of our patients was better and longer preserved in comparison with other studies. As renal failure remains one of the Achilles' heels of the survival after HT, a nephrologist has participated in the HT team since the start of our programme. Monitoring proteinuria is now an integral part of our post-HT surveillance and is recommended by both KDIGO and National Institute for Health and Care Excellence guidelines. 10,17 Ciclosporin was an independent predictor of ESRD in our study, conforming the results of earlier studies. 1,2 In addition to reducing the incidence of acute rejection, this is an important advantage of tacrolimus over CsA. Furthermore, AKI requiring RRT was a predictor for both ESRD and mortality. This is in line with studies of Fortrie et al. and Ojo et al.. 2,15 The fact that we added a competing risk analysis to our study strengthens the result found in this study. The exact reason why patients develop ESRD after transplant is unknown. Many factors play a role in the deterioration of kidney function after transplantation. AKI is one of the factors leading to ESRD in HT recipients. 15 In a recent review by Fortrie et al. 24 on the relationship between AKI and ESRD, this is further discussed. Normally, the kidney is capable to repair damaged tissue and has enough residual function. In patients with pre-existing comorbidities (i.e. hypertension or diabetes mellitus), this capacity is diminished. When these patients develop AKI, inflammatory cytokines are activated, leading to hyperfiltration. This can promote glomerulosclerosis and tubulointerstitial fibrosis and finally ESRD. 24 Furthermore, the use of CNIs (CsA and tacrolimus) has deleterious effects on the kidney function as demonstrated in this manuscript. Further research is needed to understand the causes of ESRD in HT patients in order to develop therapeutic or even preventive options for this patient group. End-stage renal disease after heart transplantation One question that may arise in the light of our results is whether combined kidney-HT (KHT) is an option for patients with compromised kidney function (or even renal failure) and whether this will result in less ESRD in the long term. Several studies (both single-centre and national) have demonstrated a good survival after KHT. In some studies using the United Network for Organ Sharing database, there was even a survival benefit for patients undergoing combined KHT in comparison with HT alone. 26,27 Even though these studies suggest a benefit of combined KHT (although all studies have a maximum follow-up of around 6 years), this type of transplant is not performed in the Netherlands due to the shortage of suitable donors. This study has several limitations. First of all, it is a singlecentre study with a low number of KT after HT. Second, better survival in patients treated with KT may be influenced by selection bias. Patients who develop ESRD early are usually less frail compared with patients who develop ESRD longer after HT (although not measured and described). This selection bias is something present in daily practice, where the best patients are considered suitable candidates for KT. Third, the association between the risk of ESRD and CsA or tacrolimus exposure was not analysed in this study. Patients with a high CNI exposure may have had an increased risk to develop ESRD as a result of the drugs' nephrotoxicity. However, in clinical practice, in patients with an impaired renal function, the CNI dose is often decreased, which could result in the paradoxical finding that HT recipients with the worst renal function actually have the lowest exposure to CNI, suggesting that these drugs are nephroprotective. Fourth, kidney biopsies are not routinely performed in our centre. However, all patients with CKD following HT are seen by a nephrologist to aid in diagnosing the cause of the renal insufficiency and help limit the deterioration of the renal function. In conclusion, ESRD is a frequently occurring long-term complication of HT. Patients who develop ESRD have a worse survival than patients who do not develop ESRD. CsA-based therapy and AKI requiring RRT were independent risk factors for the development of ESRD. When patients developed ESRD, KT, preferably from a living donor, gave a better survival than dialysis or conservative therapy. Funding None. Supporting information Additional supporting information may be found online in the Supporting Information section at the end of the article. Table S1. Definitions end-stage renal disease in literature
<filename>webapp/precommender/testdata/generator.py import random import numpy as np def f(p_x, p_0, a_x, a_prev): if a_x == a_prev: if a_x == 1: return (p_x * p_0)**0.75 else: return 1-((1-p_x)*(1-p_0))**0.75 else: if a_x == 1: return p_0**1.5 else: return 1-(1-p_0)**1.5 def generate(probs, prods): n = 28 pxs = np.zeros((n,len(prods))) data = np.zeros((n,len(prods))) for i, prob in enumerate(probs): data[0][i] = np.random.choice([0,1], p=[1-prob,prob]) px = f(prob,prob,data[0][1],-1) for j in range(1,n): data[j][i] = np.random.choice([0,1], p=[1-px,px]) pxs[j][i] = px px = f(px,prob,data[j][i], data[j-1][i]) return data, pxs def generateFromGenFile(file): file = open(file, "r") lines = file.readlines() lines = np.array([lines[i].replace(" ", "").strip().upper().split(",") for i in range(len(lines))]) features = lines[:,0] num_features = len(features) vectors = [] pxes = [] for user in range(1,len(lines[0])): probs = lines[:,user] data, pxs = generate(probs.astype(np.float),features) pxes.append(pxs) vectors.append(data) return features, vectors, pxes
/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 2000 Silicon Graphics, Inc. * Copyright (C) 2005 Ralf Baechle <[email protected]> */ #ifndef __ASM_MACH_IP27_KERNEL_ENTRY_H #define __ASM_MACH_IP27_KERNEL_ENTRY_H #include <asm/sn/addrs.h> #include <asm/sn/sn0/hubni.h> #include <asm/sn/klkernvars.h> /* * Returns the local nasid into res. */ .macro GET_NASID_ASM res dli \res, LOCAL_HUB_ADDR(NI_STATUS_REV_ID) ld \res, (\res) and \res, NSRI_NODEID_MASK dsrl \res, NSRI_NODEID_SHFT .endm /* * Intentionally empty macro, used in head.S. Override in * arch/mips/mach-xxx/kernel-entry-init.h when necessary. */ .macro kernel_entry_setup GET_NASID_ASM t1 move t2, t1 # text and data are here MAPPED_KERNEL_SETUP_TLB .endm /* * Do SMP slave processor setup necessary before we can savely execute C code. */ .macro smp_slave_setup GET_NASID_ASM t1 dli t0, KLDIR_OFFSET + (KLI_KERN_VARS * KLDIR_ENT_SIZE) + \ KLDIR_OFF_POINTER + CAC_BASE dsll t1, NASID_SHFT or t0, t0, t1 ld t0, 0(t0) # t0 points to kern_vars struct lh t1, KV_RO_NASID_OFFSET(t0) lh t2, KV_RW_NASID_OFFSET(t0) MAPPED_KERNEL_SETUP_TLB ARC64_TWIDDLE_PC .endm #endif /* __ASM_MACH_IP27_KERNEL_ENTRY_H */
Collective Reparations as a Partial Remedy for State-Perpetrated Blanket Violations of the Rights of Targeted Child Asylum Seeker Groups This article argues for the entitlement of discrete refugee groups to collective reparations for targeted state-perpetrated blanket grievous human rights violations against their group whether by the home, transit or prospective asylum state. A review of selected international law and international principles of justice are discussed as a grounding for the applicability of collective reparations in such a refugee context. The example is discussed of children from Central America who accompanied their parent or parents to the US-Mexican border in search of refugee asylum most of whom, but not all, crossed the US border irregularly and then were separated from their parents as a result of President Trumps so-called zero-tolerance migration policy and held in US custody. Over 500 of these children are still, at the time of writing, separated from their parents and for a significant number of those, their parents have been deported without them.
Investigating Installers of Security Software in 20 Countries: Individual- and Country-Level Differences This article provides detailed evidence about the installers of online security software on personal computers according to differences among clusters of countries and various other country characteristics. The study presents unique data based on real installations around the world. The data are based on a large-scale quantitative study ( N = 18,727 ) which was prepared in cooperation with an international security company. The cluster analyses revealed four distinct clusters of software installers: those who install the software for a different user, those who are IT technicians and mostly install the software for other users, those who install the software for themselves and others on a shared computer, and those who install the software only for themselves. A second cluster analysis revealed four different country clusters. Within these clusters, countries handle online security software installation similarly; however, there are differences for the clusters according to industrialized, English-speaking countries and the cluster of developing countries. This study presents unique cluster analyses of the countries to shed light on the cross-culture differences in security software adoption and installation. The results implicate that software companies should consider providing different versions of the security software to match the country characteristics.
Heartburn in patients with achalasia. Heartburn, the main symptom of gastrooesophageal reflux disease (GORD), might be expected to occur infrequently in achalasia, a disorder characterised by a hypertensive lower oesophageal sphincter (LOS) that fails to relax. Nevertheless, it is often described by patients with achalasia. The medical records of 32 patients with untreated achalasia who complained of heartburn, and of 35 similar patients who denied the symptom, were reviewed to explore the implications of heartburn in this condition. Data on endoscopic and manometric findings, and on the onset and duration of oesophageal symptoms were collected. Three patterns of heartburn were observed: in 8 patients (25%) the onset of heartburn followed the onset of dysphagia, in 15 patients (47%) heartburn preceded the onset of dysphagia and persisted as dysphagia progressed, and in 9 patients (28%), heartburn preceded the onset of dysphagia and stopped as dysphagia progressed. The mean (SD) basal LOS pressure in the patients with heartburn (38 mm Hg) was significantly lower than that in patients without the symptom (52 mm Hg); the lowest LOS pressure (29 mm Hg) was observed in the subset of patients whose heartburn preceded the onset of dysphagia and then stopped. It is concluded that patients who have achalasia with heartburn have lower basal LOS pressures than patients who have achalasia without this symptom. In some patients with achalasia, the appearance of dysphagia is heralded by the disappearance of longstanding heartburn. For these patients, it is speculated that achalasia develops in the setting of underlying GORD.
Robert Durst leaves federal court in an Orleans Parish Sheriff's vehicle after his arraignment Tuesday, April 14, 2015, in New Orleans. Durst pleaded not guilty Tuesday to a federal charge of possessing a gun after a felony conviction. (Photo11: Gerald Herbert, AP) WHITE PLAINS, N.Y. — He's been acquitted of murder in Texas and now faces a murder charge in California and gun charges in Louisiana. But a resolution of the case for which multimillionaire real estate scion Robert Durst has been a suspect the longest — the Jan. 31, 1982, disappearance and presumed death of his first wife Kathie — has eluded law enforcement. What evidence do Westchester investigators have against the Scarsdale, N.Y., native and what are they lacking? Durst, 71, is an estranged member of a prominent New York City family that owns a multibillion-dollar real-estate company. He was arrested in New Orleans in March on a first-degree murder charge out of Los Angeles. A federal grand jury indicted Durst on April 10 on being a felony in possession of a weapon. WHAT THEY DON'T HAVE A body: Not a deal breaker for a murder prosecution but close. There's inherent reasonable doubt — "What do you mean he killed her? Prove she's dead." Westchester prosecutors won a murder conviction against White Plains, N.Y., jeweler Werner Lippe in the 2008 death of his wife, who was believed to have been burned in an oil drum. But in Lippe's case, he confessed and prosecutors used some of his activities in the wake of her disappearance to corroborate the confession. A crime scene: The cottage in South Salem, N.Y., where Durst and his first wife had their final argument was not searched until 1999 — 17 years later and nearly a decade after Durst sold the house. The lake also was searched but "nothing of evidentiary value" turned up, state police investigator Joseph Becerra said in the documentary. Investigators have never said publicly what, if anything, was found in the house. Eyewitnesses: Only the couple was there when they argued that night. Susan Berman: She was known to be fiercely loyal and even if she had anything on her pal Durst she might not have shared. But Kathie Durst's friends were all certain that if anyone knew anything, it was Berman. They put Westchester investigators onto Berman — but law enforcement didn't act quick enough. Seven weeks after news of the reopened investigation broke, she was murdered in her Los Angeles home. Durst is charged with Berman's murder. Kathleen Durst and Robert Durst on their wedding day. (Photo11: HBO) WHAT THEY HAVE Durst's lies: Durst remains adamant about putting his wife on the 9:17 Manhattan-bound train in Katonah, N.Y., on Jan. 31, 1982. But he has acknowledged lying to police about later speaking with her by phone. It was a key detail that, along with a dubious sighting of her later that night, kept New York City detectives from looking at the South Salem cottage. "I don't know how he killed her but I don't think she ever got on the train, that's for sure," Edward Murphy, a senior investigator with the Westchester District Attorney's Office, said on The Jinx: The Life and Deaths of Robert Durst, the 6-part HBO documentary series that recently aired. Troubled marriage: This was the "guts" of Westchester's case, that the marriage had "spun out of control" and become "increasingly volatile," former Westchester Assistant District Attorney Kevin Hynes told the filmmakers. One physical confrontation had sent Kathie Durst to the hospital and she was talking divorce. Three days before she disappeared, her lawyer told her that Durst had rejected the divorce offer, Murphy said on the documentary. Collect phone calls: Two collect calls were made from a laundry at Ship Bottom, N.J., near the Pine Barrens, to the Durst Organization in Manhattan on Feb. 2, 1982. Durst was known to call the office collect — let his father Seymour pay, was his mantra. A nice detail to sew up a case if a body had been found nearby, for example, but investigators have no proof who placed the calls and even less about their content. Durst insists it wasn't him. "Bob didn't make those calls. Bob was not in Ship Bottom," he told the filmmakers. A "confession?": At the conclusion of the documentary, Durst was heard off camera saying "What the hell did I do? Killed them all, of course." Legal analysts are in near unanimity that the statement would be admissible but not on how much weight a jury might give it. "Is he sincere or is he making a flippant statement? And who in particular is he referring to?" said Dan Schorr, a former Westchester prosecutor now an associate managing director at Kroll. "It's a very helpful comment to the prosecution but its not a full confession to a particular killing." Contributing: WWL-TV, New Orleans Read or Share this story: http://usat.ly/1yya0Fh
Supine Versus Prone Position in Percutaneous Nephrolithotomy for Kidney Calculi: A Meta-Analysis. BACKGROUND There are several positions in the operation of percutaneous nephrolithotomy (PCNL), such as prone position, supine position, flank position, and modified supine position for PCNL, but the supine and prone positions are the main two choices for several years. However, there is still discrepancy on the optimal position for PCNL. Therefore, we performed this meta-analysis to evaluate safety and efficacy of the supine versus the prone position in PCNL for renal calculi. METHODS We searched MEDLINE, SCOPUS, and the Cochrane database libraries to look for relevant studies. All eligible controlled trials comparing supine versus prone positions for treating renal calculi were included in the meta-analysis. The main outcome of efficacy (stone-free rate, mean operative time, and hospitalization time) and safety (complication, blood transfusions) were assessed by using Review Manager 4.2 software. We calculated the estimate of effect associated with the two positions according to the heterogeneity using random-effects or fixed-effects models. RESULTS Thirteen studies (six randomized controlled trials and seven retrospective studies) with a total of 6881 patients contributed to this meta-analysis. The meta-analysis indicated/suggested that PCNL in the prone position was associated with a higher rate of stone clearance than PCNL in the supine position (odds ratio : 0.74; 95% confidence interval : 0.65, 0.84; p<0.00001). A shorter mean operative time was observed in the supine groups (weighted mean difference : -18.27; 95% CI: -35.77, -0.77; p=0.04). Compared with the prone position, there was also a lower incidence of blood transfusions in the supine groups (WMD: 0.73; 95% CI: 0.56, 0.95; p=0.02). No difference was observed between the positions with regard to the hospital stay (WMD: -0.14; 95% CI: -0.76, 0.47; p=0.65) and complications (OR: 0.88; 95% CI: 0.76, 1.02; p=0.10). CONCLUSION Compared with the prone position, the PCNL in the supine position has a slightly lower rate of stone clearance, albeit shorter mean operative time, and lower incidence of blood transfusions. The meta-analysis suggests that the PCNL in the supine position is a promising alternative.
from sklearn.svm import SVC from sklearn.metrics import accuracy_score import numpy as np from pykernels.basic import RBF X = np.array([[1,1], [0,0], [1,0], [0,1]]) y = np.array([1, 1, 0, 0]) print 'Testing XOR' for clf, name in [(SVC(kernel=RBF(), C=1000), 'pykernel'), (SVC(kernel='rbf', C=1000), 'sklearn')]: clf.fit(X, y) print name print clf print 'Predictions:', clf.predict(X) print 'Accuracy:', accuracy_score(clf.predict(X), y) print
Anticholinergic and antiglutamatergic agents protect against soman-induced brain damage and cognitive dysfunction. Soman, a powerful inhibitor of acetylcholinesterase, causes an array of toxic effects in the central nervous system including convulsions, learning and memory impairments, and, ultimately, death. We report on the protection afforded by postexposure antidotal treatments, combined with pyridostigmine (0.1 mg/kg) pretreatment, against these consequences associated with soman poisoning. Scopolamine (0.1 mg/kg) or caramiphen (10 mg/kg) were administered 5 min after soman (1.2 LD50), whereas TAB (i.e., TMB4, atropine, and benactyzine, 7.5, 3, and 1 mg/kg, respectively) was injected in rats concomitant with the development of toxic signs. Atropine (4 mg/kg) was given to the two former groups at the onset of toxic symptoms. Caramiphen and TAB completely abolished electrographic seizure activity while scopolamine treatment exhibited only partial protection. Additionally, no significant alteration in the density of peripheral benzodiazepine receptors was noted following caramiphen or TAB administration, while scopolamine application resulted in a complex outcome: a portion of the animals demonstrated no change in the number of these sites whereas the others exhibited markedly higher densities. Cognitive functions (i.e., learning and memory processes) evaluated using the Morris water maze improved considerably by the three treatments when compared to soman-injected animals; the following rank order was observed: caramiphen > TAB > scopolamine. Additionally, statistically significant correlations (r = 0.72, r = 0.73) were demonstrated between two learning parameters and Ro5-4864 binding to brain membrane. These results show that drugs with a pharmacological profile consisting of anticholinergic and antiglutamatergic properties such as caramiphen and TAB, have a substantial potential as postexposure therapies against intoxication by organophosphates.
<reponame>EnriqueSampaio/aero-livechat<filename>node_modules/aerospike/aerospike-client-c/package/usr/include/aerospike/as_map.h<gh_stars>0 /* * Copyright 2008-2015 Aerospike, Inc. * * Portions may be licensed to Aerospike, Inc. under one or more contributor * license agreements. * * 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. */ #pragma once #include <aerospike/as_iterator.h> #include <aerospike/as_util.h> #include <aerospike/as_val.h> #include <stdbool.h> #include <stdint.h> #ifdef __cplusplus extern "C" { #endif /****************************************************************************** * TYPES *****************************************************************************/ union as_map_iterator_u; struct as_map_hooks_s; /** * Callback function for `as_map_foreach()`. Called for each entry in the * map. * * @param key The key of the current entry. * @param value The value of the current entry. * @param udata The user-data provided to the `as_list_foreach()`. * * @return true to continue iterating through the list. * false to stop iterating. */ typedef bool (* as_map_foreach_callback) (const as_val * key, const as_val * value, void * udata); /** * as_map is an interface for Map based data types. * * Implementations: * - as_hashmap * * @extends as_val * @ingroup aerospike_t */ typedef struct as_map_s { /** * @private * as_map is a subtype of as_val. * You can cast as_map to as_val. */ as_val _; /** * Pointer to the data for this list. */ void * data; /** * Hooks for sybtypes of as_list to implement. */ const struct as_map_hooks_s * hooks; } as_map; /** * Map Function Hooks */ typedef struct as_map_hooks_s { /*************************************************************************** * instance hooks **************************************************************************/ /** * Releases the subtype of as_map. * * @param map The map instance to destroy. * * @return true on success. Otherwise false. */ bool (* destroy)(as_map * map); /*************************************************************************** * info hooks **************************************************************************/ /** * The hash value of an as_map. * * @param map The map to get the hashcode value for. * * @return The hashcode value. */ uint32_t (* hashcode)(const as_map * map); /** * The size of the as_map. * * @param map The map to get the size of. * * @return The number of entries in the map. */ uint32_t (* size)(const as_map * map); /*************************************************************************** * accessor and modifier hooks **************************************************************************/ /** * Set a value of the given key in a map. * * @param map The map to store the (key,value) pair. * @param key The key for the given value. * @param val The value for the given key. * * @return 0 on success. Otherwise an error occurred. */ int (* set)(as_map * map, const as_val * key, const as_val * val); /** * Set a value at the given key of the map. * * @param map The map to containing the (key,value) pair. * @param key The key of the value. * * @return The value on success. Otherwise NULL. */ as_val * (* get)(const as_map * map, const as_val * key); /** * Clear all entries of the map. * * @param map The map to clear. * * @return 0 on success. Otherwise an error occurred. */ int (* clear)(as_map * map); /** * Remove the entry specified by the key. * * @param map The map to remove the entry from. * @param key The key of the entry to be removed. * * @return 0 on success. Otherwise an error occurred. */ int (* remove)(as_map * map, const as_val * key); /*************************************************************************** * iteration hooks **************************************************************************/ /** * Iterate over each entry in the map can call the callback function. * * @param map The map to iterate. * @param callback The function to call for each entry in the map. * @param udata User-data to be passed to the callback. * * @return true on success. Otherwise false. */ bool (* foreach)(const as_map * map, as_map_foreach_callback callback, void * udata); /** * Create and initialize a new heap allocated iterator to traverse over the entries map. * * @param map The map to iterate. * * @return true on success. Otherwise false. */ union as_map_iterator_u * (* iterator_new)(const as_map * map); /** * Initialize a stack allocated iterator to traverse over the entries map. * * @param map The map to iterate. * * @return true on success. Otherwise false. */ union as_map_iterator_u * (* iterator_init)(const as_map * map, union as_map_iterator_u * it); } as_map_hooks; /****************************************************************************** * INSTANCE FUNCTIONS *****************************************************************************/ /** * @private * Utilized by subtypes of as_map to initialize the parent. * * @param map The map to initialize * @param free If TRUE, then as_map_destory() will free the map. * @param data Data for the map. * @param hooks Implementaton for the map interface. * * @return The initialized as_map on success. Otherwise NULL. * @relatesalso as_map */ as_map * as_map_cons(as_map * map, bool free, void * data, const as_map_hooks * hooks); /** * Initialize a stack allocated map. * * @param map Stack allocated map to initialize. * @param data Data for the map. * @param hooks Implementation for the map interface. * * @return On success, the initialized map. Otherwise NULL. * @relatesalso as_map */ as_map * as_map_init(as_map * map, void * data, const as_map_hooks * hooks); /** * Create and initialize a new heap allocated map. * * @param data Data for the list. * @param hooks Implementation for the list interface. * * @return On success, a new list. Otherwise NULL. * @relatesalso as_map */ as_map * as_map_new(void * data, const as_map_hooks * hooks); /** * Destroy the as_map and associated resources. * @relatesalso as_map */ static inline void as_map_destroy(as_map * map) { as_val_destroy((as_val *) map); } /******************************************************************************* * INFO FUNCTIONS ******************************************************************************/ /** * Hash value for the map * * @param map The map * * @return The hashcode value of the map. * @relatesalso as_map */ static inline uint32_t as_map_hashcode(const as_map * map) { return as_util_hook(hashcode, 0, map); } /** * Get the number of entries in the map. * * @param map The map * * @return The size of the map. * @relatesalso as_map */ static inline uint32_t as_map_size(const as_map * map) { return as_util_hook(size, 0, map); } /******************************************************************************* * ACCESSOR AND MODIFIER FUNCTIONS ******************************************************************************/ /** * Get the value for specified key. * * @param map The map. * @param key The key. * * @return The value for the specified key on success. Otherwise NULL. * @relatesalso as_map */ static inline as_val * as_map_get(const as_map * map, const as_val * key) { return as_util_hook(get, NULL, map, key); } /** * Set the value for specified key. * * @param map The map. * @param key The key. * @param val The value for the key. * * @return 0 on success. Otherwise an error occurred. * @relatesalso as_map */ static inline int as_map_set(as_map * map, const as_val * key, const as_val * val) { return as_util_hook(set, 1, map, key, val); } /** * Remove all entries from the map. * * @param map The map. * * @return 0 on success. Otherwise an error occurred. * @relatesalso as_map */ static inline int as_map_clear(as_map * map) { return as_util_hook(clear, 1, map); } /** * Remove the entry specified by the key. * * @param map The map to remove the entry from. * @param key The key of the entry to be removed. * * @return 0 on success. Otherwise an error occurred. * * @relatesalso as_map */ static inline int as_map_remove(as_map * map, const as_val * key) { return as_util_hook(remove, 1, map, key); } /****************************************************************************** * ITERATION FUNCTIONS *****************************************************************************/ /** * Call the callback function for each entry in the map. * * @param map The map. * @param callback The function to call for each entry. * @param udata User-data to be passed to the callback. * * @return true if iteration completes fully. false if iteration was aborted. * * @relatesalso as_map */ static inline bool as_map_foreach(const as_map * map, as_map_foreach_callback callback, void * udata) { return as_util_hook(foreach, false, map, callback, udata); } /** * Creates and initializes a new heap allocated iterator over the given map. * * @param map The map to iterate. * * @return On success, a new as_iterator. Otherwise NULL. * @relatesalso as_map */ static inline union as_map_iterator_u * as_map_iterator_new(const as_map * map) { return as_util_hook(iterator_new, NULL, map); } /** * Initialzies a stack allocated iterator over the given map. * * @param map The map to iterate. * @param it The iterator to initialize. * * @return On success, the initializes as_iterator. Otherwise NULL. * @relatesalso as_map */ static inline union as_map_iterator_u * as_map_iterator_init(union as_map_iterator_u * it, const as_map * map) { return as_util_hook(iterator_init, NULL, map, it); } /****************************************************************************** * CONVERSION FUNCTIONS *****************************************************************************/ /** * Convert to an as_val. * @relatesalso as_map */ static inline as_val * as_map_toval(const as_map * map) { return (as_val *) map; } /** * Convert from an as_val. * @relatesalso as_map */ static inline as_map * as_map_fromval(const as_val * val) { return as_util_fromval(val, AS_MAP, as_map); } /****************************************************************************** * as_val FUNCTIONS *****************************************************************************/ /** * @private * Internal helper function for destroying an as_val. */ void as_map_val_destroy(as_val * val); /** * @private * Internal helper function for getting the hashcode of an as_val. */ uint32_t as_map_val_hashcode(const as_val * val); /** * @private * Internal helper function for getting the string representation of an as_val. */ char * as_map_val_tostring(const as_val * val); #ifdef __cplusplus } // end extern "C" #endif
<gh_stars>0 package data // Person is a mock entity. type Person struct { name string age int } // Database is a mock ORM around the Person type. type Database struct { people []Person } var database = Database{}
David de la Mora Early life After qualifying as a dental technician, De La Mora is currently majoring in media studies at the University Center of Tijuana. Professional career De La Mora is managed by Antonio Lozada Sr. of Baja Boxing and trains under Romulo Quirarte's guidance. In April 2010, De La Mora beat veteran Jovanny Soto by T.K.O. to win the WBC FECARBOX Bantamweight Championship. The bout was the main-event of a Televisa boxing card at the Palenque of Morelos Park in Tijuana, Baja California, Mexico. WBA World Bantamweight Championship De La Mora fought against Kōki Kameda for the WBA Bantamweight Championship in front of 9,500 spectators (announced by the organizer) at the Nippon Budokan in Tokyo, Japan, on August 31, 2011. He opened a cut above Kameda's left eye with his right cross in the third round, but was knocked down once in the same round. As a result, he lost via a unanimous decision on the judges' scorecards. The three judges' scores were 113–114, 113–115 and 112–115. This card was staged by Kameda Promotions whose president is Kōki Kameda himself, as the TBS televised co-main event to Hugo Cázares vs.Tomonobu Shimizu. Antonio Lozada Sr. protested the decisions of the judges of those two title bouts, especially Kameda vs. De La Mora, and stated he would send a letter to the WBA. WBA Super World Bantamweight Championship De La Mora and his team had been eager for a second world title shot against Kameda or other champions, and he earned the opportunity to fight for the WBA Super World Bantamweight Title against Anselmo Moreno in the Showtime-televised co-main event at the Don Haskins Center on April 21, 2012. Lozada Sr. mentioned that De La Mora grew up in all aspects after the Kameda fight and that he would conquer a tricky championship. Mora vs. Isawa On December 27, David De La Moraaa faced off Ryosuke Isawa. Both were around 118 pounds, Isawa won by unanimous decision in the 10th round with all judges scorecards with 100-90. This was a non-title fight. This was known as De La Mora's first time losing 2 times in a row.
/** * App Info DTO * * @author pwalser * @since 19.06.2019 */ @ApiModel("AppInfo") @JsonPropertyOrder({"name", "description", "version", "cpu", "memory"}) public class AppInfo { private final static NumberFormat PERCENT_FORMAT = new DecimalFormat("0.00%"); private final static NumberFormat NUMBER_FORMAT = new DecimalFormat("0.##"); @JsonProperty("cpu") @ApiModelProperty(notes = "CPU usage information", position = 4) private final Cpu cpu = new Cpu(); @JsonProperty("memory") @ApiModelProperty(notes = "Memory usage information", position = 4) private final Memory memory = new Memory(); @JsonProperty("name") @ApiModelProperty(notes = "application name", example = "spring-multi-module", position = 1) private String name; @JsonProperty("description") @ApiModelProperty(notes = "application description", example = "Spring Boot Multi Module Project", position = 2) private String description; @JsonProperty("version") @ApiModelProperty(notes = "application version", example = "1.0.0-SNAPSHOT", position = 3) private String version; private static String formatMemory(long memory) { if (memory < 0) { return "-" + formatMemory(-memory); } String[] units = {"Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"}; double value = (double) memory; for (String unit : units) { if (value <= 1024) { return NUMBER_FORMAT.format(value) + unit; } value /= 1024; } return value + "YB"; } public Cpu getCpu() { return cpu; } public Memory getMemory() { return memory; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getVersion() { return version; } public void setVersion(String version) { this.version = version; } @ApiModel(value = "AppInfo-CPU", description = "CPU usage information") public static class Cpu { @JsonIgnore private double usage; public double getUsage() { return usage; } public void setUsage(double usage) { this.usage = usage; } @JsonProperty("usage") @ApiModelProperty(notes = "CPU usage [%]", example = "5.7%") public String getUsagePercent() { return PERCENT_FORMAT.format(usage); } } @ApiModel(value = "AppInfo-Memory", description = "Memory usage information") @JsonPropertyOrder({"used", "allocated", "usage"}) public static class Memory { @JsonIgnore private long used; @JsonIgnore private long allocated; @JsonIgnore private double getUsage() { if (allocated == 0) { return 0; } return (double) used / (double) allocated; } public long getUsed() { return used; } public void setUsed(long used) { this.used = used; } public long getAllocated() { return allocated; } public void setAllocated(long allocated) { this.allocated = allocated; } @JsonProperty("usage") @ApiModelProperty(notes = "Memory usage [%]", example = "36.94%", position = 1) public String getUsagePercent() { return PERCENT_FORMAT.format(getUsage()); } @JsonProperty("used") @ApiModelProperty(notes = "Memory used by the VM", example = "360.5MB", position = 2) public String getUsedDisplay() { return formatMemory(used); } @JsonProperty("allocated") @ApiModelProperty(notes = "Memory allocated by the VM", example = "976.02MB", position = 3) public String getAllocatedDisplay() { return formatMemory(allocated); } } }
<gh_stars>1-10 package com.Booking.contracts; import net.corda.testing.node.MockNetwork; import net.corda.testing.node.MockNetworkParameters; import net.corda.testing.node.MockServices; import org.junit.After; import org.junit.Test; import static java.util.Collections.singletonList; import static net.corda.testing.node.internal.InternalTestUtilsKt.findCordapp; public class ContractTests { private final MockServices ledgerServices = new MockServices(); @Test public void dummyTest() { } }
Direct measuring position encoder for axial transversal flux machine The paper presents a direct measuring absolute position encoder for a previously unpublished axial transversal flux machine. It addresses requirements of encoders that are not sufficiently fulfilled with common encoders. The encoder is small in size and directly mounted in the machine. It contains no mechanical parts and measures the magnetic field of the permanent magnet disc rotor directly by digital hall elements. Therefore, the encoder is scaled referring to the pole pair number of the machine in the radial direction. The encoder works under any speed and load condition, which is especially important at zero to low speed, where sensorless methods have drawbacks. The paper explains the sensor and describes the analysis of the output, during idle operation and under full load.
Turkish authorities claimed they identified the man suspected of shooting up an Istanbul nightclub on New Year’s Eve, but it appears they arrested the wrong man. Lakhe Mashrapov, a 28-year-old citizen of Kyrgyzstan, was apprehended and questioned by Turkish authorities, who believed he was the Islamic State adherent responsible for the attack that left 39 dead and approximately 70 wounded. Turkish authorities released a picture of Mashrapov’s passport Tuesday, believing he looked similar to the suspect. Turkish authorities have confirmed that the #Istanbul attacker is Lakhe Mashrapov, a 28-year old citizen from Kyrgystan pic.twitter.com/s4cY0ncKHg — Michael Horowitz (@michaelh992) January 3, 2017 Mashrapov told Kyrgyz media that he was in Istanbul on business. He noted he has been working as a trader since 2011 and was not even in Istanbul the night of the attack, having traveled to Istanbul for business on Dec. 28 and leaving on Dec. 30. Mashrapov returned to Istanbul on New Year’s Day and boarded a return flight on Jan. 3. Turkish police hauled him off his plane and interrogated him for hours before apologizing and putting him on another return flight. Turkish authorities have arrested 12 people in connection to the Reina nightclub massacre, but they have yet to catch the man responsible for the attack. They released a selfie video of the alleged unnamed perpetrator walking around Istanbul’s Taksim Square, a popular tourist destination. It is unclear how authorities obtained the video. Revelan la identidad del terrorista de Estambul: es Lakhe Mashrapov, de 28 años y natural de Kirguizistán pic.twitter.com/SHBb9VoMA8 — CANELATV (@CANELATV) January 3, 2017 A security camera video of the mass shooting leaked on the internet Monday, showing the beginning of the shooter’s assault on the club. Most of the victims were foreigners, and it appeared that the terrorist purposefully targeted Reina due its popularity with tourists. ISIS took credit for the shooting Sunday through its Amaq news agency, a known propaganda outlet. Follow Russ Read on Twitter Send tips to [email protected]. Content created by The Daily Caller News Foundation is available without charge to any eligible news publisher that can provide a large audience. For licensing opportunities of our original content, please contact [email protected].
// NewMockExt1FieldLogger creates a new mock instance func NewMockExt1FieldLogger(ctrl *gomock.Controller) *MockExt1FieldLogger { mock := &MockExt1FieldLogger{ctrl: ctrl} mock.recorder = &MockExt1FieldLoggerMockRecorder{mock} return mock }
Towards Internet Interconnection Co-ordination: Measuring Internet Topology The infrastructure of the Internet consists of many interconnected networks. The free market for Internet connections has led to an enormous growth of the Internet. The maturing of this market may lead to competition issues like those in the telecommunications market. Moreover, there is little understanding on how the interconnection policies of the Internets constituents (Internet Service Providers or ISPs) determine the topology of the Internet. We have developed a method to create a map of the Internet on the level of ISPs. This map can also be viewed as a map of the interconnection agreements between ISPs, measured from the outside, without asking each and every ISP what other ISPs they interconnect with. When viewed over time, the maps can be used to assess current trends in the Internet infrastructure regarding issues like market power, concentration, dependence upon one or few parties for Internet service, and so on.