content
stringlengths
7
2.61M
Lymph Node Micrometastases in Head and Neck Cancer: A Review ALFIO FERLITO, MAXINE PARTRIDGE, JOSEPH BRENNAN and HIROYUKI HAMAKAWA From the Department of OtolaryngologyHead and Neck Surgery, Uniersity of Udine, Udine, Italy, Department of Maxillofacial Surgery, Kings College Hospital, London, UK, Department of OtolaryngologyHead and Neck Surgery, Wilford Hall Medical Center, Lackland Air Force Base, Texas, USA and Department of Oral and Maxillofacial Surgery, Ehime Uniersity School of Medicine, Ehime, Japan
"I always say, when I grab a stick, I get a bunch of good ideas." That is how Patrick Dougherty of Chapel Hill explains the hundreds of dwelling-sized stick sculptures he's created over the last twenty years. Dougherty is the subject of a new documentary, "Bending Sticks," that is currently screening in cities around the country (the nearest screening to Boston is in New York on October 19). As he explained in an interview last year, it takes him about three weeks to choose a site, collect nearby saplings, and build each of his folkloric constructions (often with the help of local volunteers). Dougherty's sculptures are enchanting and striking as art, but still, it's impossible not to think about them the way you would have as a child: How cool would it be to build that! Image credits, from top: "Little Ballroom" (2012), photo by Megan Cullen; "Lean on Me" (2012), photo by Thomas O’Laughlin; "Ain’t Misbehavin’" (2010), photo by Zan Maddox. A blockbuster about Plato, starring Brad Pitt?
Studies of symbiotically important Rhizobium meliloti exopolysaccharides EPSII and succinoglycan There is interest in the study of the genetics of the assembly, export, and processing of EPS II in the nitrogen-fixing bacterium Rhizobium meliloti. This study began with the assigning of functions to open reading frames in the exp region. The exp genes whose roles were examined are hypothesized to deal with EPS II subunit assembly and putative transport of polymer. In vitro radiolabeling of exp mutants was used to identify the function of the gene disrupted. UDP--Gal was introduced into R. meliloti cells by a freeze-thaw protocol or by electroporation and the resulting radiolabeled oligosaccharides were examined by thin-layer chromotography (TLC) and P4 gel filtration. The electroporated expR101 exoB exoY cells had material in their supernatant that appeared in the void volume of the P4 column. From these same cells oligosaccharides (visible on TLC) could be organically extracted, indicating that EPS II was made on a lipid carrier. Additionally, all of the exp mutations transduced into the expRiOl exoB exoY cells (prior to electroporation and labeling), with the exception of the expD mutation, severely impaired the appearance of material in the void volume of the P4 column. This study also looked for gene(s) responsible for the control of the molecular weight distribution of EPS II. A screen was planned to restore the ability of mucR to produce low molecular weight EPS II by conjugal transfer of a Rhizobium cosmid genomic library. The purpose of this was to find the library plasmid responsible and to obtain a subcloned fragment of DNA.
<reponame>gleissen/goolong package node import ( "bufio" "encoding/binary" "fastrpc" "fmt" "io" "log" "net" "os" "time" ) const CHAN_BUFFER_SIZE = 200000 type RPCPair struct { Obj fastrpc.Serializable Chans []chan fastrpc.Serializable } type Node struct { id int numPeers int // number of connections IsServer bool AddrList []string // array with the IP:port addresses MyAddr string Peers []net.Conn // cache of connections to all other nodes PeerIds []int Listener net.Listener Readers []*bufio.Reader Writers []*bufio.Writer Connected chan bool Done chan bool rpcTable map[uint8]*RPCPair rpcCode uint8 Stop bool } func MakeNode(id int, myaddr string, peerAddrList []string, isServer bool) *Node { N := len(peerAddrList) peerIds := makePeerIds(N) n := &Node{ id, N, isServer, peerAddrList, myaddr, make([]net.Conn, N), peerIds, nil, make([]*bufio.Reader, N), make([]*bufio.Writer, N), make(chan bool, 1), make(chan bool, 1), make(map[uint8]*RPCPair), 0, false} return n } func (n *Node) NumPeers() int { return n.numPeers } func (n *Node) MyId() int32 { return int32(n.id) } func makePeerIds(N int) []int { ids := make([]int, N) for i := range ids { ids[i] = i } return ids } // Connect to peers func (n *Node) Connect() { fmt.Printf("node: waiting for connections\n") if !n.IsServer { n.waitForConnections() //(done) } else { var b [4]byte bs := b[:4] //connect to peers for i := 0; i < n.numPeers; i++ { for done := false; !done; { if conn, err := net.Dial("tcp", n.AddrList[i]); err == nil { n.Peers[i] = conn done = true } else { time.Sleep(1e9) } } binary.LittleEndian.PutUint32(bs, uint32(n.id)) if _, err := n.Peers[i].Write(bs); err != nil { fmt.Println("Write id error:", err) continue } n.Readers[i] = bufio.NewReader(n.Peers[i]) n.Writers[i] = bufio.NewWriter(n.Peers[i]) } } //<-done fmt.Printf("Replica id: %d. Done connecting.\n", n.id) n.Connected <- true // listen for messages from each peer node for rid, reader := range n.Readers { go n.msgListener(rid, reader) } } /* Connection dispatcher */ func (n *Node) waitForConnections() { //done chan bool) { var b [4]byte bs := b[:4] var err error n.Listener, err = net.Listen("tcp", n.MyAddr) if err != nil { log.Printf("error creating listener:%v\n", err) os.Exit(1) } for i := 0; i < n.numPeers; i++ { conn, err := n.Listener.Accept() if err != nil { fmt.Println("Accept error:", err) continue } if _, err := io.ReadFull(conn, bs); err != nil { fmt.Println("Connection error:", err) continue } //id := int32(binary.LittleEndian.Uint32(bs)) n.Peers[i] = conn n.Readers[i] = bufio.NewReader(conn) n.Writers[i] = bufio.NewWriter(conn) } //done <- true //fmt.Printf("Replica id: %d. Done connecting to peers\n", n.Id) } func (n *Node) msgListener(id int, reader *bufio.Reader) { for { // loop until we get a done messsage select { case <-n.Done: break default: // read a byte containing the message type msgType, err := reader.ReadByte() if err != nil { break } thisRpc := n.rpcTable[msgType] obj := thisRpc.Obj.New() if err := obj.Unmarshal(reader); err != nil { break } thisRpc.Chans[id] <- obj } } } func (n *Node) RegisterRPC(msgObj fastrpc.Serializable, chans []chan fastrpc.Serializable) uint8 { code := n.rpcCode n.rpcCode++ n.rpcTable[code] = &RPCPair{Obj: msgObj, Chans: chans} return code } func (n *Node) NSend(id int, code uint8, msg fastrpc.Serializable) { wire := n.Writers[id] wire.WriteByte(code) msg.Marshal(wire) wire.Flush() } func (n *Node) Run() { n.Connect() }
Extra Matters Decree the Relatively Heavy Higgs of Mass about 125 GeV in the Supersymmetric Model We show that the Higgs mass about 125 GeV is easily realized in supersymmetric model with extra matters, simultaneously explaining the anomaly in the muon anomalous magnetic moment and the dark matter density. Introduction We have not found any convincing and fundamental theory for explaining the observed masses of quarks and leptons. However, it was pointed out, long ago, that if one introduces a pair of extra matters, 10 and10, in supersymmetric (SUSY) standard model, the Yukawa coupling y t for the top quark has a quasi infrared fixed point at y t ∼ 1. This is an extremely interesting observation, since we can understand the observed mass of the top quark as a low-energy prediction of the theory. Furthermore, it has been, recently, pointed out that the extra matters, 10 and10, cancels anomalies of a discrete R symmetry in the SUSY standard model, provided that the sum of their R charges is zero. (See also.) This is itself very interesting in the LHC phenomenology, since they naturally have a SUSY-invariant mass at the electro-weak scale through the Giudice-Masiero mechanism. The further crucial and important point is that a new Yukawa coupling y U for the extra matters has also a quasi infrared fixed point at y U ≃ 1 which gives additional large contribution to the mass of the lightest Higgs boson, and as a consequence the lightest Higgs boson acquires naturally a relatively large mass of 120 − 130 GeV. Recently, the ATLAS and CMS experiments have announced the latest results of their searches for Higgs boson. In particular, the ATLAS has found 3.6 local excess of the Higgs-like signal near m h ≃ 126 GeV. The CMS has also observed more than 2 local excess of the signal at m h ≃ 124 GeV. Although the significances decrease once we take into account the so-called "look-elsewhere effect," these excesses may be the indication of the existence of the Higgs boson at around m h ≃ 125 GeV. (If we consider the global probability, the excesses are at 2.3 by ATLAS and at 1.9 by CMS.) If the Higgs mass is as large as ∼ 125 GeV in the framework of minimal SUSY standard model (MSSM), the mass scale of the superparticles are required to be relatively high ( a few TeV) to enhance the Higgs mass via radiative corrections. However, as we have mentioned, this is not the case if there exist extra matters. In this letter, taking the excesses of Higgs-like signals at around m h ≃ 125 GeV seriously, we consider SUSY standard model with extra matters. We show that the Higgs mass of m h ≃ 125 GeV is easily explained in the model with extra matters if their masses are in a rage of 500 GeV−1 TeV. Surprising is that there is a wide range of parameter space in which not only the Higgs boson mass but also the dark matter density and the anomalous magnetic dipole moment (MDM) of the muon are simultaneously explained. We also show that the gluino is most likely lighter than 1 TeV which can be tested soon at the LHC. Model As we have mentioned in the introduction, we consider the SSM with extra matters which are 10 and10 representations in SU GUT, which we denote 10 and10, respectively. #1 #1 For another possibility, we can consider the model with three pairs of 5 and5; for the enhancement of the Higgs mass, the same number of singlets should be also introduced. In such a case, the quasi fixed point To discuss the low-energy phenomenology, we decompose the extra matters as 10 = Q + U + E and10 =Q + +, where Q(3, 2, 1/6), U(3, 1, −2/3), E,Q(3, 2, −1/6), U (3, 1, 2/3), and(1, 1, −1) are gauge eigenstates of the standard-model gauge group. (The gauge quantum numbers for SU C, SU L and U Y are shown in the parenthesis.) Then, the superpotential relevant for the discussion of the low-energy phenomenology is where W (MSSM) is the superpotential of the minimal SUSY standard model (MSSM), H u is the up-type Higgs multiplet, y U is the Yukawa coupling constant for the extra matters, while M U, M Q, and M E are mass parameters whose origin is assumed to be the Giudice-Masiero mechanism. In our study, we neglect the superpotential of the form5 H 10 10 (where5 H denotes the Higgs multiplet in5 representation contains down-type Higgs) because it is not important for the following discussion. In addition, the soft SUSY breaking terms are given by #2 where "tilde" is used for superpartners. The low energy parameters (in particular, the soft SUSY breaking parameters) given above are related to fundamental parameters given at high scale. As in the case of conventional study, we assume that the boundary condition of the low-scale parameters are given at the so-called GUT scale M GUT, which we take M GUT = 2 10 16 GeV. Because the GUT is one of the strong motivation to consider SUSY, we consider a boundary condition which respects SU symmetry. In order to reduce the number of free parameters (as well as to avoid dangerous flavor problems), we adopt the following boundary condition at the GUT scale: All the gaugino masses are unified to m 1/2 at the GUT scale. All the matter fields in5 representation except Higgs have universal SUSY breaking mass-squared parameter, denoted as m 2 5. All the matter fields in 10 and10 representations have universal SUSY breaking masssquared parameter, denoted as m 2 10. The up-and down-type Higgses have SUSY breaking mass-squared parameters m 2 5 H and m 2 5 H, respectively. value of the Yukawa coupling constant relevant for the enhancement of the Higgs mass is smaller compared to the model with 10 and10 representations. Even so, a significant enhancement of the Higgs mass may be possible in particular when the mass of the extra matters are relatively low. Detailed discussion on this case will be given elsewhere. #2 We neglect the bi-linear SUSY breaking terms for extra matters for simplicity. For simplicity, we assume that the SUSY breaking tri-linear scalar couplings vanish at the GUT scale. Notice that the following results are almost unchanged even if we relax this assumption, since the tri-linear scalar couplings become small at quasi infrared fixed points in the present model. Notice that, in the following, the above mass-squared parameters are allowed to be negative, which is important to have a viable low-energy phenomenology as we will see below. Once the boundary condition is fixed, we solve the renormalization group equation from M GUT to M SUSY, where M SUSY is the typical mass scale of the superparticles. We mostly use the one-loop -functions. However, the two-loop effects on the gaugino masses (in particular, gluino mass) are significant, so we also take into account O( 2 3 ) (as well as O( 2 1 ) and O( 2 2 )) contributions to the -functions of gaugino masses and gauge coupling constants. Then, using the soft SUSY breaking parameters at low energy scale, we solve the conditions of electro-weak symmetry breaking to determine the SUSY invariant Higgs mass (i.e., so-called -parameter) as well as bi-linear SUSY breaking Higgs mass parameter (i.e., so-called B-parameter); in our analysis, we use the tree-level minimization condition of the Higgs potential. With the low-energy parameters given above, we calculate experimental observables, in particular, the muon MDM a and the relic density of the lightest superparticle as well as the the lightest Higgs mass m h. The relevant formula to calculate a can be found in. For the calculation of the density parameter of the LSP LSP, we use DarkSUSY package. For the calculation of the Higgs mass, we use the fact that the model is well described by the standard model once the extra matters and superparticles decouple. Then, we denote the potential of the standard-model like Higgs H SM as and the Higgs mass is given by where v ≃ 246 GeV is the vacuum expectation value of the standard-model-like Higgs boson. The quartic Higgs coupling is determined by the parameters in the supersymmetric model at the mass scale of superpartners and extra matters as where g 2 and g 1 are gauge coupling constants for SU L and U Y, respectively, and is the contribution from the extra matters. Then, (M SUSY ) and (m h ) are related by using the standard-model renormalization group equations. In our analysis, we estimate from one-loop effective potential obtained by integrating out the extra matters. Denoting such an effective potential as ∆V (extra), we obtain The one-loop contribution of the extra matters to the Higgs potential is given by where ∆V is given by where and while Notice that we are interested in the case where the tri-linear coupling constants tend to go to the fixed-point values, which are significantly smaller than the soft SUSY breaking masssquared parameters. Thus, in our analysis, we neglect the effects of the tri-linear coupling constants in the estimation of the Higgs mass. 3 Higgs Mass, Muon MDM, and LSP Now we numerically calculate the Higgs mass, the muon MDM, and the relic density of the LSP. Our main purpose is to show that there exists a parameter region where the observed Higgs mass (∼ 125 GeV) as well as the muon MDM and the dark matter abundance are simultaneously explained in the present framework. Thus, we fix some of the parameters rather than performing a systematic scan of the full parameter space. (More complete analysis will be given elsewhere.) Here, we take m 2 5 H = m 2 5 H = 0. Because we would like to enhance the SUSY contribution to the muon MDM, we adopt a large value of tan ; numerically, we take tan = 50. In addition, taking account of the quasi fixed point behavior of the Yukawa coupling constant, we take y U (M SUSY ) = 1. (Here, we take M SUSY = 1.5 TeV, which is the typical mass scale of the superparticle in the following analysis. The results given below are quite insensitive to this value.) Furthermore, we approximate M Q = M U for simplicity. plane. In the gray-shaded region, the lightest slepton mass becomes smaller than 100 GeV. On the dotted line, the lightest slepton mass becomes equal to the lightest neutralino mass. In the pink (blue) region, the muon MDM becomes consistent with the experimental value at 1 (2) level. Here, we take tan = 50, M U = 550 GeV, and m 1/2 ≃ 1.1 TeV (which corresponds to the Bino, Wino, and gluino masses of 170 GeV, 240 GeV, 700 GeV, respectively). In Figs. 1 and 2, we show the results of our numerical calculations, where we take m 1/2 ≃ 1.1 and 1.3 TeV, respectively. (The predicted Bino, Wino, and gluino masses are 170 GeV, 240 GeV, 700 GeV, and 210 GeV, 310 GeV, 900 GeV, respectively.) In Fig. 1 (Fig. 2), we take M U = 550 GeV (650 GeV); these values of the mass of extra generation quarks are above the present experimental lower bound on the mass of fourth-generation quarks. In the gray-shaded region, the stau becomes lighter than 100 GeV. (In fact, in most of the gray-shaded region, the lighter stau becomes tachyonic.) In addition, on the dotted line, the stau and the lightest neutralino become degenerate. Thus, the stau is the LSP in the region between the dotted line and the gray-shaded region while the lightest neutralino (which is almost purely Bino) is the LSP in the region right to the dotted line. It is notable that the allowed parameter region extends to the region with negative mass-squared parameter at the GUT scale. This is due to the fact that, in the present model, the gaugino masses are more enhanced at high scale compared to the case of the MSSM. Consequently, gaugino contributions to the renormalization group running of the scalar masses are significantly enhanced. For the left-handed sleptons, such an enhancement is so significant that the masses of the left-handed sleptons (at M SUSY ) can be positive even if m 2 5 < 0. Notice that, even if some of the scalar masses are negative at the GUT scale, they become positive at the scale orders of magnitude larger than M SUSY. Thus, the tunneling to the unwanted true vacuum is strongly suppressed and irrelevant. In the figures, the (almost) horizontal lines are contours of constant Higgs mass. As we mentioned earlier, the Higgs mass can be as large as 125 GeV in the present framework. The Higgs mass is more enhanced for larger value of m 2 10. This is due to the fact that the leading contribution to the Higgs mass from the extra matters is approximately proportional to log(m /M U ). This fact also indicates that, if we increase (decrease) M U, the Higgs mass becomes smaller (larger). In the same figures, we also show the region where the SUSY contribution to the muon MDM ∆a where a is approximately proportional to tan. Thus, in order to make ∆a (SUSY) sizable, at least one of the left-or right-handed smuon should be relatively light. As we have discussed, by taking m 2 5 < 0, the left-handed slepton masses can be small even though the renormalization group effect on the sfermion masses is significant. Then, with our present choice of tan = 50 and the light slepton masses, we obtain sufficient ∆a to realize Eq.. Next, we discuss the thermal relic density of the LSP. In particular, on the right of dotted line, the lightest neutralino is the LSP, so it is a viable candidate of dark matter. However, in the bulk of such a region, sleptons are much heavier than the lightest neutralino. In addition, the lightest neutralino is (almost) purely Bino. Thus, the pair annihilation cross section of the lightest neutralino is so small that LSP becomes too large to be consistent with the present dark matter density if there is no other annihilation process. As we have mentioned, in the parameter region near the dotted line, the lightest neutralino almost degenerates with the stau and the co-annihilation process becomes important. In particular, if the mass difference between the lightest neutralino and the stau is a few GeV, the relic density of the lightest neutralino becomes consistent with the present dark matter density c h 2 = 0.1116 (with h being the Hubble parameter in units of km/sec/Mpc). We have checked that there indeed exists a contour on which LSP h 2 = 0.1116 so that the lightest neutralino can be dark matter. If we draw such a contour on the figure, it is (almost) indistinguishable from the dotted line, and it crosses the contour of m h = 125 GeV in the region where the muon MDM anomaly can be explained at 1 level. A similar situation was also studied in, where the simultaneous explanation of m h = 125 GeV, the muon MDM anomaly at 1 level, and the dark matter density was hardly realized in the so-called mSUGRA model. Compared to, our result crucially depends on the fact that we allowed soft SUSY breaking mass-squared parameters to be negative. Finally, we comment on the gluino mass constraint. In the limit of heavy squark masses, the present experimental lower bound on the gluino mass is ∼ 700 GeV. (Here, we have used the constraints on so-called "squark-gluino-neutralino model.") On the first sample point used in our numerical calculation, the predicted gluino mass is marginally consistent with the bound. In other points, like our second sample point, m h ≃ 125 GeV, the muon MDM, and the dark matter density can be simultaneously explained with heavier gluino mass. Even in such a case, the gluino mass can be well within the reach of future LHC experiment. We comment here that, with very large gluino mass, it becomes difficult to solve the muon MDM anomaly. This is because, adopting larger value of m 1/2, the renormalization effect on the SUSY breaking mass-squared parameter of the up-type Higgs boson becomes more negative. Then, in order to realize the proper electro-weak symmetry breaking, a large value of the -parameter is needed, resulting in the suppression of the muon MDM. Thus, the search for the gluino signal at the LHC is a crucial test of the present scenario. We also note here that the muon MDM can be enhanced if our assumptions on the mass spectrum of superparticles are relaxed. For example, with the gluino mass being fixed, the muon MDM becomes larger if the Wino and Bino masses are somehow suppressed. Such a mass spectrum is possible if the GUT relation among the gaugino masses is violated; in the product group GUT scenario, this may be the case. Summary In this letter, we have argued that the Higgs mass of ∼ 125 GeV, around which ATLAS and CMS have observed excesses of Higgs-like signals, can be well explained in SUSY models with extra matters. In the MSSM, it is often the case where large values of superparticle masses are preferred to realize such a value of the Higgs mass. However, such a mass spectrum tends to suppress the SUSY contribution to the muon MDM, and also makes the LHC searches for the superparticles difficult. However, in the present model, m h ≃ 125 GeV is realized in the region where the SUSY contribution to the muon MDM can be large enough to explain the ∼ 3 discrepancy between the experimental and standard-model values of the muon MDM (at 1). Simultaneously, the relic density of the lightest neutralino can become consistent with the present dark matter density. We have seen that, for the the simultaneous explanation of the Higgs mass, the muon MDM, and the dark matter density, some of the SUSY breaking mass-squared parameters is preferred to be negative at the GUT scale. In the parameter region we are interested in, the gluino mass as well as the masses of extra matters can be below ∼ 1 TeV, so they are within the reach of future LHC experiments.
# --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- import json import logging import os import pickle import numpy as np import pandas as pd import joblib import azureml.automl.core from azureml.automl.core.shared import logging_utilities, log_server from azureml.telemetry import INSTRUMENTATION_KEY from inference_schema.schema_decorators import input_schema, output_schema from inference_schema.parameter_types.numpy_parameter_type import NumpyParameterType from inference_schema.parameter_types.pandas_parameter_type import PandasParameterType input_sample = pd.DataFrame({"date": pd.Series(["2000-1-1"], dtype="datetime64[ns]"), "instant": pd.Series([0], dtype="int64"), "season": pd.Series([0], dtype="int64"), "yr": pd.Series([0], dtype="int64"), "mnth": pd.Series([0], dtype="int64"), "weekday": pd.Series([0], dtype="int64"), "weathersit": pd.Series([0], dtype="int64"), "temp": pd.Series([0.0], dtype="float64"), "atemp": pd.Series([0.0], dtype="float64"), "hum": pd.Series([0.0], dtype="float64"), "windspeed": pd.Series([0.0], dtype="float64"), "casual": pd.Series([0], dtype="int64"), "registered": pd.Series([0], dtype="int64")}) try: log_server.enable_telemetry(INSTRUMENTATION_KEY) log_server.set_verbosity('INFO') logger = logging.getLogger('azureml.automl.core.scoring_script_forecasting') except Exception: pass def init(): global model # This name is model.id of model that we want to deploy deserialize the model file back # into a sklearn model model_path = os.path.join(os.getenv('AZUREML_MODEL_DIR'), 'model.pkl') path = os.path.normpath(model_path) path_split = path.split(os.sep) log_server.update_custom_dimensions({'model_name': path_split[-3], 'model_version': path_split[-2]}) try: logger.info("Loading model from path.") model = joblib.load(model_path) logger.info("Loading successful.") except Exception as e: logging_utilities.log_traceback(e, logger) raise @input_schema('data', PandasParameterType(input_sample, enforce_shape=False)) def run(data): try: y_query = None if 'y_query' in data.columns: y_query = data.pop('y_query').values result = model.forecast(data, y_query) except Exception as e: result = str(e) return json.dumps({"error": result}) forecast_as_list = result[0].tolist() index_as_df = result[1].index.to_frame().reset_index(drop=True) return json.dumps({"forecast": forecast_as_list, # return the minimum over the wire: "index": json.loads(index_as_df.to_json(orient='records')) # no forecast and its featurized values })
Antidiabetic and Anticancer Activities of Mangifera Indica Cv. Okrong Leaves Diabetes and cancer are a major global public health problem. Plantderived agents with undesirable sideeffects were required. This study aimed to evaluate antidiabetic and anticancer activities of the ethanolic leaf extract of Mangifera indica cv. Okrong and its active phytochemical compound, mangiferin. Antidiabetic activities against yeast glucosidase and rat intestinal glucosidase were determined using 1 mM of pnitro phenylDglucopyranoside as substrate. Inhibitory activity against porcine pancreatic amylase was performed using 1 mM of 2chloro4 nitrophenolDmaltotroside3 as substrate. Nitrophenol product was spectrophotometrically measured at 405 nm. Anticancer activity was evaluated against five human cancer cell lines compared to two human normal cell lines using INTRODUCTION Diabetes mellitus is a chronic metabolic disorder characterized by an uncontrolled increase in blood glucose level. Key enzymes for hydrolysis of carbohydrates are -amylase, which is participating in hydrolysis of polysaccharides and oligosaccharides and -glucosidase which further hydrolysis di-and tri-saccharides to glucose and other monosaccharides. Cancer is a group of diseases differentiated by the uncontrolled growth and spread of abnormal cells. There are many occurrences common cancer types, that is, breast, lung, liver and colorectal cancers. Currently, chemical agents such as acarbose and doxorubicin are available for treatment of diabetes and cancer, respectively. However, all of these treatments are related with undesirable side effect 6,7] leading to increase in ethnobotanical use of medicinal plants which may be safer and less destructive to human body. Mango (Mangifera indica L.), a long living large evergreen tree, belong to the Anacardiaceae family. It possesses pharmacological effects, that is, antidiabetic, antioxidant, antimicrobial, anticancer, and anti-inflammatory analyzed in triplicate. The percent inhibition was calculated by the following formula: Inhibition of rat alpha-glucosidase activity The enzyme inhibition activity against intestinal acetone powders from rat (Sigma-Aldrich, USA) were determined using 1 mM of PNPG as substrate, according to Lordan et al. and Hemalatha et al. with minor modifications. Intestinal acetone powders from rat (30 mg/ml) in 0.1 M sodium phosphate buffer (pH 6.9) was sonicated for 20 min. The suspension was centrifuged at 3500 rpm for 30 min to remove particulate matter. In 96 well plate, 50 l of tested inhibitors in DMSO, 100 l of substrate and 50 l of enzyme solution (0.5 U/ml) were mixed and incubated at 37°C for 30 min. The absorbance was measured at 405 nm using microplate reader. All tested inhibitors were analyzed in triplicate. The percent inhibition was calculated as aforementioned formula. Inhibition of pancreatic alpha-amylase activity The enzyme inhibition activity against -amylase from porcine pancreas (Sigma-Aldrich, USA) were determined using 1 mM of 2-chloro-4 nitrophenol--D-maltotroside-3 as substrate, following a method as described previously by Yonemoto et al. with modifications. In 96 well plate, 30 l of enzyme solution (25 U/ml) and 30 l of tested inhibitors in DMSO were mixed and preincubated at 37°C for 10 min. Then, 30 l of substrate were added and incubated again at 37°C for 20 min. The absorbance was measured at 405 nm using microplate reader. All tests were analyzed in triplicate. The percent inhibition was calculated as aforementioned formula. Materials and chemicals M. i n d i c a " O k r o n g " l e a ve s we r e c o l l e c t e d i n Thailand. They were authenticated by Assoc. Prof. Dr. Nijsiri Ruangrungsi. Voucher specimens were deposited at College of Public Health Sciences, Chulalongkorn University, Thailand. Leaf samples were washed with water and dried in hot air oven at 50°C. The dried leaves were pulverized and exhaustively extracted with ethanol by Soxhlet apparatus. The extract was filtered through Whatman number 1 filter paper and evaporated to dryness in vacuo. The yield was recorded and the extract was stored at −20°C. Anticancer activity Mango leaf extract, at 200 g/ml, showed cytotoxicity against all tested cancer cell lines. Mangiferin did not significantly affect % survival of tested cancer cells . Doxorubicin was used as a positive control; normal skin fibroblast (CCD) and normal lung fibroblast (Wi-38) were comparable cell lines in this study. Mango leaf extract, at high dose, also showed toxicity on lung fibroblast. On the contrary, the extract increased %survival of skin fibroblast. At high dose, mangiferin tended to increase the survival of skin and lung fibroblasts . The IC 50 for cytotoxic activities of the extract, mangiferin and doxorubicin are shown in Table 2. DISCUSSION -Glucosidase may be largely divided into two types due to the difference in primary structure, Types I (yeast) and II (mammals). Previous studies reported that various foods were active for yeast -glucosidase, they had the potential to inhibit yeast -glucosidase more than rat -glucosidase and had inhibited those -glucosidase more than -amylase. On the contrary, acarbose which was anti-diabetic drug, had more potential to inhibit -amylase than -glucosidase and had slightly or no ability to inhibit yeast -glucosidase relative to rat -glucosidase. The similar results were found that both mango peels and mango seeds extracts had potential to inhibit -glucosidase more than -amylase with the IC 50 of 3.5, 4.0 and 0.34, 0.71 g/ml, respectively. Their leaf extract inhibited -glucosidase with the IC 50 of 59.0 g/ml. They were active for yeast -glucosidase, these dose-dependent inhibitory activity were significantly higher than acarbose. Different solvent extractions gave different inhibited potency. As an example, mango stem barks ethanolic extract showed the maximum inhibitory effects with the IC 50 of 37.86 g/ml; hexane extract showed moderate inhibitory effects with the IC 50 of 114.13 g/ml; petroleum ether, chloroform and aqueous showed no inhibitory effects on alpha-amylase activities. However, the low IC 50 value may be because the occurrence of other phenolic acids, flavonoids and carotenoids. Previous study compared antidiabetic potential of mature and tender mango leaves aqueous methanolic extracts. Mature leaves extract inhibited -glucosidase and -amylase with the IC 50 of 21.03 and 35.73 g/ml, respectively due to their higher saponin, polyphenol, flavonoid contents. Tender leaves extract inhibited -glucosidase and -amylase with the IC 50 of 27.16 and 22.01 g/ml, respectively. They concluded that mango mature leaf had more potential to inhibit -glucosidase; whereas, mango tender leaf had potential to inhibit -amylase when compared to each other. Mangiferin had more potent to inhibit -glucosidase than -amylase with the IC 50 of 41.88 and 74.35 g/ml, respectively. In addition, many flavonoids were weakly inhibiting rat -glucosidase. Our findings, mango leaf extract had strong potential to inhibit yeast -glucosidase when compared to acarbose and mangiferin. It had the potential to inhibit -glucosidase more than -amylase. Mangiferin had strong potential for rat -glucosidase when compared to acarbose and mango leaves extract. It also had more potent to inhibit -glucosidase than -amylase. Acarbose had strong potential to inhibit -amylase compared to -glucosidase. The leaf extract at high dose (IC 50 >200 g/ml) possessed cytotoxic activities against all tested cancer cell lines (ductal carcinoma, bronchogenic carcinoma, liver hepatoblastoma, gastric carcinoma, and colon adenocarcinoma). However, at that high dose, the toxicity on lung fibroblast normal cell line was also shown; whereas there was no toxic effect, especially enhancing effect toward skin fibroblast normal cell line. The antiproliferative potential of mango extracts might be due to their bioactive compounds synergistic actions. Mangiferin is one of the natural xanthone, which was extracted from mango tree. It was shown to inhibit cancer cell lines, including liver, breast, prostate, colon and nasopharyngeal cancer cell lines. From the findings, mangiferin did not show significantly toxicity against all tested cancer cell lines. The previous study also reported that only high dose of mangiferin inhibited tested cancer cell lines. This study found that mangiferin also had the potential on increasing the survival of skin and lung normal cell lines. CONCLUSION Mango leaf extract and its active compound, mangiferin showed in vitro inhibitory potential on key enzymes involving glucose metabolism, that is, -amylase and -glucosidase. Mango leaf extract, ≥200 g/ml, showed cytotoxicity against tested cancer cell lines. Both mango leaf extract and mangiferin increased % survival of skin fibroblast. Financial support and sponsorship Chulalongkorn University fund (Ratchadaphiseksomphot Endowment Fund) was GCUGR1125592015D, and Mae Fah Luang University scholarship was MFU002/2555.
<reponame>Robert-Muil/bezier-curved-edges-networkx import networkx as nx import matplotlib.pyplot as plt from matplotlib.collections import LineCollection from fa2 import ForceAtlas2 import pandas as pd import numpy as np from curved_edges import curved_edges if __name__ == "__main__": # Concatenate seasons 1-8 got_data = 'data/got-s{}-edges.csv' dfg = pd.DataFrame() for i in range(8): df_current = pd.read_csv(got_data.format(i + 1), names=['source', 'target', 'weight', 'season'], skiprows=1) dfg = pd.concat([dfg, df_current]) dfg.drop(['season'], axis=1, inplace=True) # Group by the edges so they are not duplicated dfgt = dfg.groupby(['source', 'target'], as_index=False).agg({'weight': 'sum'}) # Remove some outliers outliers = ['BLACK_JACK', 'KEGS', 'MULLY'] dfgt = dfgt[~dfgt.source.isin(outliers) & ~dfgt.target.isin(outliers)] # Load graph from pandas and calculate positions G = nx.from_pandas_edgelist(dfgt, source='source', target='target', edge_attr='weight') forceatlas2 = ForceAtlas2(edgeWeightInfluence=0) positions = forceatlas2.forceatlas2_networkx_layout(G, pos=None, iterations=1000) # Get curves curves = curved_edges(G, positions) # Make a matplotlib LineCollection - styled as you wish weights = np.array([x[2]['weight'] for x in G.edges(data=True)]) widths = 0.5 * np.log(weights) lc = LineCollection(curves, color='w', alpha=0.25, linewidths=widths) # Plot plt.figure(figsize=(10, 10)) plt.gca().set_facecolor('k') nx.draw_networkx_nodes(G, positions, node_size=10, node_color='w', alpha=0.5) plt.gca().add_collection(lc) plt.tick_params(axis='both', which='both', bottom=False, left=False, labelbottom=False, labelleft=False) plt.show()
#include "pxr/imaging/hgiVk/computeEncoder.h" #include "pxr/imaging/hgiVk/device.h" #include "pxr/imaging/hgiVk/diagnostic.h" #include "pxr/imaging/hgiVk/pipeline.h" #include "pxr/imaging/hgiVk/renderPass.h" #include "pxr/imaging/hgiVk/resourceBindings.h" #include "pxr/imaging/hgiVk/vulkan.h" PXR_NAMESPACE_OPEN_SCOPE HgiVkComputeEncoder::HgiVkComputeEncoder( HgiVkDevice* device, HgiVkCommandBuffer* cb) : HgiComputeEncoder() , _device(device) , _commandBuffer(_commandBuffer) , _isRecording(true) { } HgiVkComputeEncoder::~HgiVkComputeEncoder() { if (_isRecording) { TF_WARN("ComputeEncoder: [%x] is missing an EndEncodig() call.", this); EndEncoding(); } } void HgiVkComputeEncoder::EndEncoding() { _commandBuffer = nullptr; _isRecording = false; } void HgiVkComputeEncoder::BindPipeline(HgiPipelineHandle pipeline) { if (HgiVkPipeline* p = static_cast<HgiVkPipeline*>(pipeline)) { p->BindPipeline(_commandBuffer, /*renderpass*/ nullptr); } } void HgiVkComputeEncoder::BindResources(HgiResourceBindingsHandle res) { if (HgiVkResourceBindings* r = static_cast<HgiVkResourceBindings*>(res)) { r->BindResources(_commandBuffer); } } void HgiVkComputeEncoder::Dispatch( uint32_t threadGrpCntX, uint32_t threadGrpCntY, uint32_t threadGrpCntZ) { vkCmdDispatch( _commandBuffer->GetCommandBufferForRecoding(), threadGrpCntX, threadGrpCntY, threadGrpCntZ); } void HgiVkComputeEncoder::PushDebugGroup(const char* label) { if (!TF_VERIFY(_isRecording && _commandBuffer)) return; HgiVkBeginDebugMarker(_commandBuffer, label); } void HgiVkComputeEncoder::PopDebugGroup() { if (!TF_VERIFY(_isRecording && _commandBuffer)) return; HgiVkEndDebugMarker(_commandBuffer); } PXR_NAMESPACE_CLOSE_SCOPE
Antimicrobial Resistance and Virulence: a Successful or Deleterious Association in the Bacterial World? SUMMARY Hosts and bacteria have coevolved over millions of years, during which pathogenic bacteria have modified their virulence mechanisms to adapt to host defense systems. Although the spread of pathogens has been hindered by the discovery and widespread use of antimicrobial agents, antimicrobial resistance has increased globally. The emergence of resistant bacteria has accelerated in recent years, mainly as a result of increased selective pressure. However, although antimicrobial resistance and bacterial virulence have developed on different timescales, they share some common characteristics. This review considers how bacterial virulence and fitness are affected by antibiotic resistance and also how the relationship between virulence and resistance is affected by different genetic mechanisms (e.g., coselection and compensatory mutations) and by the most prevalent global responses. The interplay between these factors and the associated biological costs depend on four main factors: the bacterial species involved, virulence and resistance mechanisms, the ecological niche, and the host. The development of new strategies involving new antimicrobials or nonantimicrobial compounds and of novel diagnostic methods that focus on high-risk clones and rapid tests to detect virulence markers may help to resolve the increasing problem of the association between virulence and resistance, which is becoming more beneficial for pathogenic bacteria.
. The subject of the study is a systematizing analysis of present research concerned with the barriers which prevent scientific findings about hygiene from being carried out and which hamper the obvious adoption of hygienically and psycho-hygienically relevant prophylactic measures. A general interpretive model with explanatory value for health- and hygiene-related behavior is being developed. Future studies will particularly have to clarify what significance and what interpretative relevance do the diverse influencing factors have for a particular person in a particular position and situation and how in the course of one's biography even something like lifestyles of hygienic behavior develop and change. For the necessity of improvement as regards the hygienic status in various realms of life the knowledge about existing barriers is a basic essential. The following quantities and constructs pass into the theoretic interpretive model which should also provide the basis for further evolvement of theories as well as the starting point for specific research hypotheses but not least for the development of specific research and evaluation designs: Standard of information, informational behavior and quality of information. The individual risk assessment: A function of the subjective importance and probability that benefit and cost factors of prophylactic behavior will occur. Additional influencing factors essential to the development of a desirable health- and hygiene-related behavior are: Objective shortcomings with regard to prophylaxis: deficits of the hygienic research including the deficits concerning the development of feasible and universally applicable disinfection methods. Hazards connected to prophylaxis: Objective risks with regard to prophylaxis (disinfection methods which may cause allergies, which involve problems with the compatibility of materials and so forth) and psychological risks (impaired relations between physician and patient due to the wearing of a mouth guard in dental practice, and others) are being differentiated. The degree importance attached to hygiene in organisations: prerequisites for this are: matters of hygiene as features characteristic of a specific job and as a part of employee evaluation, laying down of responsibilities and spheres of competence in matters of hygiene, normative binding character of job-related hygienic guidelines, exemplary behavior of the management.(ABSTRACT TRUNCATED AT 400 WORDS)
Book Review: Sexuality in Adolescence: Current Trends, edited by Susan Moore and Doreen Rosenthal. New York: Routledge, 2006, 294 pp. (paperback) The attention that researchers and society at large have paid to the subject of sexuality among adolescents has gone through significant changes in the past two decadesfrom an often ignored to widely investigated subject. Nevertheless, in Western societies, sexuality is often still an extremely uncomfortable topic for both the parent and the adolescent. The resulting neglect of the subject is unfortunate, as research suggests that sexual behavior among adolescents is a pressing psychological and health-related issue. This edition is a worthy endeavor undertaken by two experts in the field who examine current issues affecting adolescent sexuality. Sexuality in Adolescence reviews and integrates contemporary psychological, sociological, and public healthrelated studies of youth sexuality in multiple contexts, including individual, familial, and communal. Through an extensive and comprehensive review of the literature on adolescent sexuality, the authors survey and discuss major past and present theories and their relevance to the 21st century. The authors review and discuss the way in which sexual behaviors engaged in by youth increase their risk for developing problems such as conflict with parents, unwanted pregnancies, HIV/STIs (sexually transmitted infections), and partner violence. The authors discuss these issues within the context of the new millennium cultural milieu (e.g., the advent of online sex, cell phones). The book, therefore, provides a broad yet contemporary review of an evolving body of literature regarding adolescent sexuality for a wide readership, including educators, mental health practitioners, parents, and researchers. Although adolescent sexuality encompasses a broad range of disciplines and areas, the book offers valuable critiques and evaluations of current knowledge, based on the latest research on youth sexual behavior. The authors provide an implicit critique of traditional cultural ignorance and stereotypes as they pertain to adolescent sexuality, including the ways in which they feed biased perceptions and risky sexual conduct among youth, and hinder progress in risk prevention efforts. For example, the authors discuss maladaptive consequences such as partner violence, sexual abuse, and unwanted pregnancy emanating from the common gender-related power differential. With some variations, in most Western cultures, males are Journal of Adolescent Research Volume 24 Number 2 March 2009 268-270 © 2009 Sage Publications http://jar.sagepub.com hosted at http://online.sagepub.com
Synthesis and application of novel bifunctional spin labels. The synthesis of new bifunctional spin-labeled cross-linking reagents is described. Covalent attachment to papain was achieved via a thiol-specific thiosulfonate residue and, for the second anchor point, via a nonspecific photoreactive azido function. The thiosulfonate formed a reversible disulfide linkage, which could be cleaved again reductively by dithiothreitol. The spin label, a pyrroline-1-oxyl radical, was highly immobilized after attachment to papain by both functional groups and showed little if any relative motion with respect to the protein.
import { info, warn } from "../utils/logger"; export default function FastReloadBlock(maxCalls: number, wait: number) { return function FastReloadingThrottleDecorator( target: any, property: string, descriptor: PropertyDescriptor ) { const originalMethod = descriptor.value; let calls = 0; let inWait = false; descriptor.value = function(...args) { if (inWait) { return; } else if (calls === maxCalls) { calls = 0; inWait = true; let interval = wait / 1000; warn( `Please wait ${ interval } secs. for next reload to prevent your extension being blocked` ); const logInterval = setInterval(() => warn(`${--interval} ...`), 1000); setTimeout(() => { clearInterval(logInterval); info("Signing for reload now"); originalMethod.apply(this, args); inWait = false; }, wait); } else { calls++; return originalMethod.apply(this, args); } }; }; }
The Vancouver Canucks took a step back last season in their ongoing attempt to keep getting younger without sacrificing a chance to make the Stanley Cup Playoffs. NHL.com is providing in-depth analysis for each of its 30 teams throughout August. Today, the biggest reasons for optimism and the biggest questions facing the Vancouver Canucks. The Canucks finished 28th in the NHL standings last season, and despite calls from some for a more complete tear-down and rebuild, general manager Jim Benning continued an admittedly tough juggling act with offseason moves designed to get them back to the playoffs this season. Top-four defenseman Erik Gudbranson was acquired in a trade with the Florida Panthers, and 31-year-old free agent Loui Eriksson was signed to improve the versatility of the top six forwards. Canucks 30 in 30: Season outlook | Top prospects | Fantasy outlook Video: 30 in 30: Vancouver Canucks 2016-17 season preview Here are four reasons for optimism entering this season: 1. A full season of Brandon Sutter Acquired as a foundation piece and second-line center in a trade with the Pittsburgh Penguins last summer, Sutter played 20 games in his first season with the Canucks, limited by sports hernia surgery and a broken jaw. It's a tiny sample size, but in those 20 games, Sutter scored five goals and nine points and was on pace to match his NHL career high 21 goals. More important to the Canucks' playoff hopes, they were 7-4-5 with him in the lineup to start the season and 8-6-6 overall, a 90-point pace, compared to 23-32-7 and a 70-point pace without him. "He can match up against top lines and he can score," Benning said. "We missed him." 2. Another reliable goaltending tandem Ryan Miller's .916 save percentage last season was just below the NHL average and 28th among regular goaltenders, but when you examine shot quality as measured by location, things are a little more flattering. Accounting for that in the adjusted goals saved above average metric compiled by analyst Nick Mercadante, Miller was 10th in the NHL, one spot ahead of Vezina Trophy finalist Ben Bishop of the Tampa Bay Lightning. The adjusted numbers weren't as flattering for Canucks backup Jacob Markstrom, who had a similar .915 save percentage but was 29th on the adjusted list, though he clearly made strides after missing the first month with a hamstring injury. Having Miller (36) and Markstrom (26) from the start should allow the Canucks to rest Miller, increasing the likelihood he can longer maintain last season's often spectacular start. 3. Erik Gudbranson clearing the crease Though there are questions about Gudbranson's ability to generate offense, the 6-foot-5, 216-pound defenseman should help in front of the Canucks net. "We were giving up too many grade-A chances," Benning said. "In front of our net guys would get a shot and we weren't clearing players out and they got second and third chances too." With Gudbranson added to the second defense pair, Alexander Edler back on the top unit after missing the last two months of last season with a broken leg, and either Luca Sbisa or 6-foot-7 Nikita Tryamkin on the third pair, Benning said he feels he has a physical presence on each pair. "We have guys now that can make it uncomfortable for the other team's forwards," he said. Video: NYI@FLA, Gm5: Gudbranson puts a big check on Nielsen 4. Bo Horvat and Sven Baertschi in the second half Horvat struggled in the first half, especially when Sutter's absence forced him into tougher matchups. He had eight points through mid-December and a 27-game goalless drought into early January but finished with 30 points in his final 40 games. Baertschi was a healthy scratch early and had two goals and seven points his first 27 games, including a 13-game drought into mid-December. Sparked by power-play time and playing with Horvat, Baertschi finished with 13 goals and 21 points in his final 42 games. The Canucks need Horvat and Baertschi, who signed a two-year, $3.7 million contract in June, to pick up where they left off. Here are three key questions facing the Canucks: 1. Can the defense score too? Vancouver's defense was the fourth-lowest scoring in the NHL last season, one spot ahead of Florida, so many wondered how the addition of Gudbranson, who has 43 points in 309 NHL games and poor possession numbers, was going to help a team struggling to score. Despite a trend toward defensemen who can get the puck out of their end quickly, Benning wants to balance skill with a defensive presence on each pair. He said the Canucks already have it with Edler and Christopher Tanev on the top unit and can achieve it by pairing Gudbranson with the puck skills of second-year pro Ben Hutton on the second. "We want a puck-moving defenseman with kind of a stay-at-home, physical player," Benning said, adding they hope Philip Larsen can bring that skill to a third-pair with Sbisa or Tryamkin. "It's not so much about a style of defenseman, but it's finding a good fit with the pairings." 2. Are Loui Eriksson and Philip Larsen enough to fix the power play? It's hard to envision the Canucks gaining enough ground in goal scoring without significant improvements on a power play that fell from 11th in the NHL two seasons ago to 27th last season continuing to run through Daniel Sedin and Henrik Sedin off the right boards. Video: Analyzing the Canucks' signing of Loui Eriksson Vancouver hasn't had a quarterback at the point since defenseman Christian Ehrhoff left as a free agent after the 2010-11 run to the Stanley Cup Final, but hopes Larsen, who was the fifth highest scoring defenseman in the Kontinental Hockey League last season, can provide that right-shot presence. Whether that, along with the addition of Eriksson up front, will be enough remains to be seen, especially because Larsen has to earn a spot in the rotation at even-strength. 3. Is there enough top-end skill in the top six? Though most assume Eriksson will reprise his role from the Sweden national team on the right side of a top line with the Sedins, the Canucks may need to move him around to balance their lines and make up for the lack of proven scoring on left wing, especially if they want to keep Baertschi and Horvat together on a third line. Anton Rodin, who was the Swedish League MVP last season, Eriksson, Emerson Etem and Alexandre Burrows can play either right wing or left wing, but Rodin has never played in the NHL and is coming off a knee injury that ended his season in January, and the latter two seem better suited for a bottom six role. "We got some versatility," Benning said. "It will be up to the coaching staff to find the right fit."
Healthcare and wider societal implications of stillbirth: a populationbased costofillness study Objective To extend previous work and estimate health and social care costs, litigation costs, funeralrelated costs, and productivity losses associated with stillbirth in the UK. Design A populationbased costofillness study using a synthesis of secondary data. Setting The National Health Service (NHS) and wider society in the UK. Population Stillbirths occurring within a 12month period and subsequent events occurring over the following 2 years. Methods Costs were estimated using published data on events, resource use, and unit costs. Main outcome measures Mean health and social care costs, litigation costs, funeralrelated costs, and productivity costs for 2 years, reported for a single stillbirth and at a national level. Results Mean health and social care costs per stillbirth were £4191. Additionally, funeralrelated costs were £559, and workplace absence (parents and healthcare professionals) was estimated to cost £3829 per stillbirth. For the UK, the annual health and social care costs were estimated at £13.6 million, and total productivity losses amounted to £706.1 million (98% of this cost was attributable to the loss of the life of the baby). The figures for total productivity losses were sensitive to the perspective adopted about the loss of life of the baby. Conclusion This work expands the current intelligence on the costs of stillbirth beyond the health service to costs for parents and society, and yet these additional findings must still be regarded as conservative estimates of the true economic costs. Tweetable abstract The costs of stillbirth are significant, affecting the health service, parents, professionals, and society. Plain Language Summary Why and how was the study carried out? The personal, social, and emotional consequences of stillbirth are profound. Placing a monetary value on such consequences is emotive, yet necessary, when deciding how best to invest limited healthcare resources. We estimated the average costs associated with a single stillbirth and the costs for all stillbirths occurring in the UK over a 1year period. What were the main findings? The average cost to the National Health Service (NHS) of care related to the stillbirth and a first subsequent pregnancy was £4191 for each stillbirth. For the UK, this cost was £13.6 million annually. Clinical negligence payments to bereaved parents were estimated at £2.5 million per year. Parents were estimated to spend £1.8 million per year on funerals. The cost of workplace absence as parents cope with the effects of grief was estimated at £2476 per stillbirth. For the UK, this cost was £8.1 million annually. The loss of a baby is also the loss of an individual with the potential to become a valued and productive member of society. The expected value of an adult's lifetime working hours was taken as an estimate of this productivity loss, and was £213,304 for each stillbirth. The annual cost for all stillbirths was £694 million. We know from parents that the birth of a subsequent child in no way replaces a stillborn baby. We found that 52% of women fall pregnant within 12 months of a stillbirth. From a purely economic perspective concerned only with the number of individuals in society, babies born during this period could potentially replace the productivity losses of the stillborn baby. Adopting this approach, which we understand is controversial and difficult for bereaved parents, the expected productivity losses would be lower, at £333 million. What are the limitations of the work? For some categories, existing data were unavailable and we used clinical opinion to estimate costs. Furthermore, we were unable to quantify some indirect consequences, for example the psychological distress experienced by wider family members. What is the implication for parents? Placing a monetary value on what is for parents a profound personal tragedy may seem unkind. It is, however, unavoidable if we are to provide policy makers with vital information on the wideranging consequences that could be prevented through future investments in initiatives to reduce stillbirth. Introduction In 2014 there were 3252 stillbirths in the UK, and at 1.4% per 1000 births, the annual rate of reduction of stillbirth remains slower than in neighbouring countries, including the Netherlands (6.8% per 1000 births) and the Republic of Ireland (3.5% per 1000 births). 1 Although stillbirth poses a substantial emotional and financial burden for women, families, healthcare professionals, and wider society, no comprehensive cost estimates have been derived to date. A recent UK-based study conducted a preliminary exploration of the healthcare costs associated with stillbirth. 2 The authors acknowledged that other costs had not been accounted for, but their initial assessment was restricted to a health service perspective. The lack of accurate data regarding the costs of stillbirth impedes the economic analysis of efforts to prevent stillbirth. The impact of stillbirth is more wide reaching than the healthcare sector, and includes: the immediate effects of grief on the mental health and psychological wellbeing of the bereaved parents, and wider family members; the effects on the medical staff involved and their ability to work; and the longer-term effects of parental bereavement, which can result in anxiety and/or depression and post-traumatic stress disorder (PTSD). These have the potential to affect the parents' ability to care for existing and subsequent children, and their ability to work, which can result in family debt, leading in some cases, to homelessness and family break-up. 3 An additional cost rarely considered is that although the loss of a baby is a profoundly sad personal tragedy, it also represents the loss to society of a potential economically productive member. These wider, indirect, societal costs are much harder to quantify. 3 The recent 2016 Ending Preventable Stillbirths Lancet series identified that the scarcity of data about the psychological effects and social care costs, in particular for fathers, wider family, and healthcare professionals, has prevented accurate figures of the economic costs of stillbirth. 4 As a result, the economic impact of stillbirth remains an under-researched area. 4 Our aim was to expand the work started by Mistry and colleagues and conduct a 'cost of illness study' capturing the societal costs associated with stillbirth in the UK using secondary analyses of currently available evidence. Methods The study used a prevalence-based cohort approach in which costs associated with a cohort of stillbirths during a 12-month period in the UK were estimated for up to 2 years after the stillbirth. Costs represented additional resources consumed compared with a live birth: this reflects de novo costs for some categories of resource use or additional costs (or savings) compared with a live birth. Costs following a single stillbirth were estimated by applying unit costs to resource-use estimates identified from secondary sources. Costs were scaled up to a national level using information about the total number of stillbirths in the UK in 2014. 5 The following costs were estimated: health and social care, funeral-related, litigation, and productivity costs, and were expressed in 2013/14 UK pounds. Detailed information on the costing methodology is provided in Appendix S1, with abridged detail presented below. Unit costs are listed in Table S1 in Appendix S1. Costing health and social care Health and social care costs were estimated for seven ordered phases, derived to include events with known resource consequences ( Figure 1). Column 1 of Table 1 details the care in phases relating to the pregnancy affected by the stillbirth (phases 1-4), with columns 2 and 4 showing the associated probability of receiving that care and its unit cost, respectively. Table 2 shows the same information for a subsequent pregnancy (phases 5-7). Phase 1: care provided at the time that an antepartum stillbirth is suspected and confirmed About 90% of stillbirths in England occur in the antepartum period. 5 Care provided at this point was costed using data on healthcare contacts and investigations reported by bereaved parents in the 'Listening to Parents' (LTP) survey (Table S2 in Appendix S1). 6 For stillbirths occurring during labour, care provided up until the tragedy was assumed to be the same as for a live birth, and no additional costs were included as part of phase 1. Phase 2: immediate postpartum care Women were assumed to stay in hospital on average 0.43 fewer days than women having a live birth (Table 1; Section 3.1.2, Appendix S1). 6,7 The types of postmortem conducted were costed, as were other routine post-stillbirth investigations (Table 1 and Table S3 in Appendix S1). 2,8,9 The LTP survey provided information on the proportion of parents meeting with a consultant, and the mean number of visits from various healthcare professionals in the 3 months following hospital discharge. 6 When costing, adjustments were made for contacts that women would have received had they had a live birth (Table 1 and Table S4 in Appendix S1). Phase 3: parental anxiety and depression The additional proportions of women experiencing symptoms of anxiety and depression as a result of a stillbirth were estimated. 6,10 The proportion then likely to receive care was estimated, and a treatment duration of 12 months was assumed and costed (Table 1). 11 The prevalence and cost of paternal anxiety and depression was estimated using the same approach (Table S5 in Appendix S1). 6,12 Phase 4: experiences of healthcare professionals Published data revealed that 33% of midwives involved in the care of families experiencing perinatal tragedies had symptoms of post-traumatic stress, and around 17% of obstetricians reported 'very much' experiencing depression. 13,14 The proportion of these professionals likely to have received treatment was estimated and appropriate unit costs were assigned (Table 1 and Table S6 in Appendix S1). Phase 5: pre-conception and antenatal care during a subsequent pregnancy within 12 months of the stillbirth Following a stillbirth, around 52% of women become pregnant again within 12 months. 15 It was assumed that prospective parents plan for a specific family size and therefore the costs of monitoring and delivering these pregnancies were included. Costs were assumed to include tailored preconception and antenatal care (clinic visits and ultrasound scans; Table 2, Tables S7 and S8 in Appendix S1). 2,9,16,17 Phase 6: outcome of subsequent pregnancies occurring within 12 months of a prior stillbirth The proportions of women with a subsequent pregnancy within 12 months and having a live birth delivery were estimated and costed ( Table 2 and Table S9 in Appendix S1). 7, Sadly, around 2% of women experience a second stillbirth, and care was costed as described in phases 1 and 2 above. 16 Phase 7: excess preterm births Following stillbirth the risk of a subsequent preterm live birth is increased. 16,19 Published data were used to estimate the proportion of pregnancies ending in a live preterm birth in the general population, and the proportion ending in a live preterm birth in women conceiving within 12 months of a stillbirth (Table S10, Appendix S1). 15, 16,20 The difference between these proportions ( Table 2) was multiplied by the additional costs associated with preterm birth (Table S1 in Appendix S1). 19 NHS litigation costs The NHS Litigation Authority data showed that between 2000 and 2010, litigation costs relating to stillbirth made up, on average, around 0.5% of all NHS maternity litigation costs in England. 21 This proportion was assumed to remain constant and was applied to the total litigation payment figure for obstetrics in England in 2013/14 (£398,614,623). 22 The resulting estimated stillbirth-related litigation cost was then divided by the total number of registered stillbirths in England during 2014 to estimate a mean cost of litigation per stillbirth. Funeral and related costs Responses to the International Stillbirth Alliance survey from a subset of UK parents were used to identify the proportions incurring costs relating to the funeral service, and the burial or cremation of their baby. 4 Data were also analysed for the proportion purchasing memorials or headstones and other funeral-related items. Proportions were multiplied by the appropriate unit costs (Table S11 in Appendix S1). 23 Table S1 in Appendix S1, unless otherwise indicated. Unit cost multiplied by proportion of patients with event/mean duration of event. Unit cost estimation described in Table S2 in Appendix S1. § Proportions and unit cost estimation described in Table S3 in Appendix S1. **Estimation of mean visits is described in Table S4 in Appendix S1. General practitioner contacts assumed to be surgery based following a live birth (the 6-week check) and home based following a stillbirth. For the associated unit costs, see Table S1 in Appendix S1. Proportion estimations are described in Table S5 in Appendix S1. § § Proportion estimations are described in Table S6 in Appendix S1. ***In the absence of a cost for post-traumatic stress, the unit cost used is an average of the cost for anxiety (£1146) and for depression (£2231). Productivity costs Productivity costs associated with stillbirth included the cost of absence from the workplace by grieving parents and healthcare professionals, and the cost of the lost opportunity for the stillborn baby to reach adulthood, gain employment, and contribute to the nation's productivity over a lifetime. Parental productivity costs It was assumed that parental absence from the workplace resulted in lost productivity only for the 64% of stillbirths occurring before 37 weeks of gestation. 5 For these stillbirths, the mean duration of paternal compassionate leave was costed using male mean gross wage rates, 6,25 and for mothers, the expected number of working days lost from the time of the stillbirth up to 37 weeks of gestation was calculated and costed using female mean gross wage rates. 5,25 Each of these costs were multiplied by an ageand sex-specific likelihood of being in paid employment (Table S12 in Appendix S1). 26,27 Healthcare professional productivity costs Managing a stillbirth is one of the most difficult experiences for healthcare professionals. 28 Published data show that 12% of midwives involved in traumatic perinatal events were consequently absent from the workplace. 14 An absence of 1 month was assumed and costed using a midwife salary. 29 Around one-fifth of midwives also reported reducing their working shifts in the short term. 14 Fulltime hours were assumed to be reduced to half-time hours for a period of 1 month, and this absence was costed. 29 In the absence of data for obstetricians, the relative risks of workplace absence and reduced working hours in midwives reporting PTSD symptoms were calculated and assumed to apply to the 17% of obstetricians reporting feeling 'very much' depressed (Section 3.4, Appendix S1). 13 Productivity losses from the loss of the baby's life A stillbirth can be considered a loss to society, as the stillborn baby represents a lost future adult who would have contributed to a nation's productivity over its lifetime. 30 When calculating this cost, the greater risk of preterm birth in this cohort had they not been stillborn was acknowledged, together with evidence to show that preterm birth impacts negatively upon an individual's future earnings. The cost of lost productivity was estimated separately for males and females by calculating working life years lost, and estimating for each year lost the probability that the individual would have been in full-or part-time paid employment. Estimated gender-specific mean gross salary costs for adults born full term and Table S1 in Appendix S1, unless otherwise indicated. Unit cost multiplied by proportion of patients with event/mean duration of event. For additional details, see Tables S1, S7, and S8 in Appendix S1. § The proportion shown is a product of several individual proportions, as detailed in Table S9 in Appendix S1. **The proportion shown is a difference between two proportions, which were calculated as the products of a number of individual proportions; see Table S10 in Appendix S1. preterm were multiplied by the number of working years lost to estimate total productivity losses for each gender/ term group (Tables S13 and S14 in Appendix S1). 25 Gender proportions for stillborn babies were then used to estimate a weighted total average of productivity costs for each term group, and then these costs were weighted by estimated proportions of births likely to be preterm and full term to give an overall productivity loss. 9 As these costs would be incurred in the future, a discount rate of 3.5% was used. 34 Statistical and sensitivity analysis The costing exercise was conducted in Microsoft EXCEL 2013. Mean total health and social care costs per stillbirth were estimated by summing the costs for phases 1-7. Mean total productivity costs per stillbirth were estimated by summing the three productivity cost groups. We categorised the source information for each parameter into one of a number of categories, following a convention used elsewhere. 35,36 Classifications reflected the most to least preferential input sources (labelled A-H), and the categorisation for each input parameter is listed in Table S15 in Appendix S1. Parameters classified as D-H were subjected to one-way sensitivity analyses in which their base-case estimates were increased and decreased by 25%. Two additional scenario analyses were performed. In the first, we considered that parents might not plan ahead for a specific family size, and so in the 12 months following the stillbirth only the costs of additional pregnancies (additional when compared with those that would have been expected within 12 months of a prior live birth) were considered (Section 4.1, Appendix S1). In the second analysis, it was assumed that the 52% of women falling pregnant within 12 months of a stillbirth would go on to have a live birth, and so from a purely economic perspective productivity losses of the stillborn child would decrease by this proportion. Table 1 shows the mean cost of investigating and confirming antepartum stillbirth was £215 per death, and costs incurred immediately following a stillbirth were £802 per death. The cost of treating symptoms of parental anxiety and depression was estimated at £549 per death, and treatment of healthcare professionals experiencing mental health problems was estimated to be £604 per death. Table 2 shows estimated costs associated with a subsequent pregnancy within 12 months of a stillbirth (phases 5-7). Pre-conception and antenatal care was estimated to cost £795 for each previous stillbirth, with the mean cost of providing care at the final outcome of the pregnancy calculated for each previous stillbirth as £1167. The increased risk of preterm birth was estimated to cost £60 for each previous stillbirth. Health and social care costs The total health and social care costs were estimated to be £4191 for each stillbirth (Table 3), almost half of which was attributable to care relating to a subsequent pregnancy within 12 months of a stillbirth, and a quarter was attributable to care provided at the time of, or immediately after, the stillbirth. Litigation costs The mean litigation cost for each stillbirth was £778. Funeral and related costs Funeral and related costs for each stillbirth were estimated to be £559, as shown in Table 3. Table 3 summarises the productivity cost estimates. Overall, total productivity losses per stillbirth were estimated to be £217,133, with the lost productivity of the stillborn child accounting for around 98% of these costs (£213,304). National cost estimates for the UK In 2014, there were 3252 stillbirths in the UK. 5 Multiplying the mean total health and social care cost by this figure generated a national cost estimate of £13.6 million. For UK parents, funeral-related expenses amounted to an estimated £1.8 million. At the UK level, litigation costs were £2.5 million, productivity losses of parents and healthcare professionals were valued at £12.5 million, and the productivity losses associated with the stillborn child were estimated as £693.7 million. Table 3 shows the total cost data for the UK and for each country separately. Sensitivity analysis Nine parameters used to estimate costs in phases 1-7 were subjected to sensitivity analysis ( Figure S1 in Appendix S1). The total UK healthcare costs were relatively insensitive to changes in most parameter estimates. Altering the proportion of women falling pregnant within 12 months of a stillbirth by 25% had the largest impact: raising or lowering the total UK healthcare costs by around 20% (£2.78 million) to £16.41 and £10.86 million, respectively. Additional sensitivity analysis results relating to litigation, funeral and productivity cost parameters are shown in Section 4.2 of Appendix S1. The results of the first scenario analysis, in which only additional subsequent pregnancies were costed, showed that UK healthcare costs decreased from £13.6 to £10.5 million. In the second scenario analysis, productivity losses from the loss of the baby decreased from £693.7 to £333.0 million. Main findings This paper reports a comprehensive cost-of-illness study of the economic burden of stillbirth in the UK. Findings show that in 2014, stillbirth was estimated to cost: the NHS £13.6 million in terms of healthcare costs and £2.5 million in litigation costs; society £706.1 million, by way of quantifiable productivity losses (with 98% of this cost attributable to the loss of life of the potential child); and parents £1.8 million in funeral-related costs. Strengths and limitations This study expanded the work started by Mistry et al. and includes a wider perspective on the economic costs associated with stillbirth. Indeed, the consideration of resourceuse items identified by data sources such as the LTP study and the International Stillbirth Alliance Survey allowed the inclusion of cost categories that may not have previously been considered. Comparing the healthcare costs estimated here and by Mistry et al. is problematic on account of the different costing methodologies employed. For example, Mistry et al. included postmortem costs for all cases, whereas here, based on uptake data, we assumed less than half of parents would consent to an examination. 2,9 Furthermore, and unlike Mistry et al., our study captured the incremental costs of stillbirth and so adjusted for the costs of care that would have been received had the pregnancy resulted in a live birth rather than a stillbirth. We also considered the additional health and social costs associated with the psychological distress and mental health problems of parents and health professionals following a stillbirth. We have effectively assumed that parents not receiving treatment for mental health problems did not incur any costs, whereas in reality a lack of treatment may result in a need for treatment at a later point; it is likely that there were many more parents who could have benefited from such care. As a consequence, these figures In the absence of data, we were also unable to estimate the costs associated with the distress to wider family members. It is undoubtedly the case that other relatives experience distress, and for some this may lead to conditions requiring treatment and possibly productivity losses as they support bereaved family members. Novel aspects of our analysis included the consideration of the wider impact of stillbirths from the point of view of the lost productivity of parents, health professionals, and the stillborn child. A lack of published data and difficulty in placing monetary valuations on some wider-reaching consequences, often referred to as 'intangible' costs, must be acknowledged however. 3 Families may lose their homes, relationships and friendships can falter, and couples can break up. Funeral expenses and lost productivity address only two elements of these personal tragedies. 3 Critically, just because we have not been able to account for other intangible costs does not diminish their importance, nor the need to acknowledge them. In conducting this analysis, it was necessary to make simplifying assumptions. For example, about the duration of maternal workplace absence and the proportion of obstetricians taking time away from work. Analyses showed the results to be sensitive to a small number of study parameters (in particular the proportion of women falling pregnant within 12 months of a stillbirth), and so indicate a need for further research. One further assumption was that couples plan ahead for a final family size, and that when a pregnancy results in stillbirth that a further pregnancy will be attempted. We hope parents may not find this notion offensive; we know from charities supporting parents that the birth of a subsequent child does not replace a stillborn child, but this was a necessary assumption to capture the costs to the NHS of providing health care for a pregnancy that may not have happened had the stillbirth not occurred. Relaxing this assumption and instead costing only the excess pregnancies arising following a stillbirth reduced healthcare costs by £3.1 million annually. The calculation of productivity losses from the loss of a baby was also sensitive to the assumption of whether the birth of a subsequent child alleviates the loss of a member of society from a purely economic perspective. In this case, productivity costs were reduced by £360.7 million, indicating that estimates are affected by the perspective chosen for the analysis. Finally, we present only mean costs. Conventional simulation analyses were not performed to generate estimates of uncertainty around mean costs because in this context they would reflect only the size of the studies contributing model input data, rather than their quality. Interpretation Healthcare costs associated with stillbirth are a fraction of the cost of NHS health care overall, and are small compared with common chronic diseases: for example, dementia (£1.2 billion), cancer (£4 billion), and cardiovascular disease (£2.2 billion). 36,40,41 The prevalence of stillbirth is substantially lower than many of these chronic conditions, although no less important. This study corroborates previous work that the economic burden of stillbirth extends far beyond the NHS to families and the wider economy, and by depicting costs should help bring about a better appreciation of the need for cost-effectiveness analyses. 4 A substantial proportion of stillbirths could still potentially be avoided, thereby reducing the personal suffering, and monetary expense experienced by bereaved parents, their wider family, and healthcare professionals. 42 Evaluations of initiatives to reduce stillbirth such as the 'Saving Babies Lives' Care Bundle in England need to acknowledge and consider the costs associated with stillbirth. 43 Conclusion The economic burden of stillbirth extends far beyond the NHS to families and the wider economy. The figures reported here provide the most up-to-date information on the economic burden of stillbirth in the UK, yet must still be regarded as conservative as the data available for some cost categories were sparse or absent. Further data collected in the context of robust research would help to refine many of the assumptions made in this analysis. Future research should combine our results with estimates of the burden of disease, assessing mortality and morbidity of stillbirth, to provide a complete framework of the implications at a population level. Disclosure of interests None declared. Completed disclosure of interests form available to view online as supporting information. Contribution to authorship HEC conducted the cost estimation, and produced a first draft and approved the final version of the manuscript. JJK planned the project, advised on aspects of the costing, facilitated access to data sources, read and revised the manuscript, and approved the final version. AEPH advised on aspects of the costing, provided summary data for the analysis, read and revised the manuscript, and approved the final version. JL advised on aspects of the costing, read and revised the manuscript, and approved the final version. ORA planned and led the project, supervised the cost estimation, read and revised the manuscript, and approved the final version. All authors accept responsibility for the paper as published. Details of ethics approval The study used only summary data from previously published research, and therefore no ethical approval was sought. Funding This independent study was funded by the Department of Health funded Policy Research Unit in Maternal Health and Care Programme. The views expressed are not necessarily those of the Department of Health. providing comments on the manuscript and the reviewers for their thoughtful comments and suggestions on the paper. Supporting Information Additional Supporting Information may be found in the online version of this article: Figure S1. Sensitivity analysis results for total UK health and social care costs of stillbirth (phases 1-7). Table S1. Unit costs (2013/14 UK £) used when estimating the cost of stillbirth. Table S2. Healthcare contacts and investigations reported at the time an antepartum stillbirth is suspected and confirmed. Table S3. Other investigations performed following a stillbirth. Table S4. Home visits in the 3 months following discharge from hospital after a stillbirth and live birth. Table S5. Maternal and paternal anxiety and depression following stillbirth and live birth. Table S6. Health care professional anxiety and depression following stillbirth. Table S7. Proportions used to identify 12 mutually exclusive groups for whom antenatal care in a subsequent pregnancy is likely to vary. Table S8. Antenatal care provided to women according to the cause of the previous stillbirth and early and final outcomes of the subsequent pregnancy. Table S9. Data used to estimate final outcomes for a subsequent pregnancy occurring within 12 months. Table S10. Data used to estimate the excess proportion of live preterm births attributable to stillbirth. Table S11. Funeral and related costs. Table S12. Data used when estimating parental productivity costs associated with stillbirth. Table S13. Estimation of lifetime productivity losses for full-term males and females. Table S14. Estimation of lifetime productivity losses for preterm males and females. Table S15. Evidence classification for study parameters. Appendix S1. Detailed information on the costing methods. &
<gh_stars>0 package api import ( "encoding/json" "net/http" "net/http/httptest" "testing" "go.xiaosongfu.com/link/handlers" ) func TestGetLinksByCategoryId(t *testing.T) { // 创建一个请求 request := httptest.NewRequest(http.MethodGet, "categoryId=1", nil) //request.Header.Set("Content-Type", "application/x-www-form-urlencoded") // 创建一个 ResponseRecorder 来记录响应 responseRecorder := httptest.NewRecorder() // 直接调用 RootHandler GetLinksByCategoryId(responseRecorder, request) // 检测返回的状态码 if responseRecorder.Code != http.StatusOK { t.Errorf("response code is %v", responseRecorder.Code) } // 检测返回的数据 var res = handlers.BasicResponse{} json.Unmarshal(responseRecorder.Body.Bytes(), &res) t.Log(res) if res.Code != 1 { t.Errorf("handler returned unexpected code: got %d want %d", res.Code, 1) } }
Kolenkitbuurt is a neighbourhood in western Amsterdam with a bad reputation. It was built shortly after the second world war as part of a major urban expansion plan, following the garden city principles outlined by Ebenezer Howard. Today, the neighbourhood is characterised by a repetitive pattern of monotonous, four-storey tenement blocks. Ninety-five per cent of the mostly small houses are in the social-rent sector, and they are occupied by some 7,000 people, many of them from large immigrant families. Built between 1949 and 1953, the neighbourhood wasn’t originally given a name, just a number, so residents began calling it by the same nickname as the church around which it was built: Kolenkit, or “coal-scuttle”. Fifty years on, the area had fallen into despair and in 2004 was proclaimed the least popular neighbourhood in Amsterdam, with all “liveability” indicators in the red: high unemployment, poverty, youth crime and a relatively high rate of high-school drop-outs. By then an urban renewal programme had started, demolishing more than 1,000 houses and building back bigger homes to diversify the housing stock and attract more wealthy residents. Yet in 2007, when neighbourhood liveability and social security were made priorities on the national political agenda, Kolenkitbuurt was still listed as one of the worst neighbourhoods in the Netherlands. All 40 areas on that list were targeted with an intensified programme to prevent ghettoisation. The need for a different approach to solving the problems of disadvantaged neighbourhoods has been widely supported in theory and practice. Academics argue that “bottom-up” urbanism can respond more quickly to societal needs, compared to a top-down approach. Kolenkitbuurt is an example of this strategy – for the social part of the programme, the district government adopted an unusual approach. A tender call was put out to garner ideas on improving liveability in the neighbourhood. The eventual winner would be awarded the opportunity (and an operational budget) to execute their plan for a limited amount of time, during which they could prove their value to the neighbourhood. The tender was won by Cascoland, a small international network of artists, architects and designers formed by Dutch community artists Fiona Bell and Roel Schoenmakers. Cascoland has guided participatory projects in South African slums and in Rio de Janeiro, among other cities; each time it has provided an empty casco (“frame”) of facilitation and artistic skills which is eventually given meaning by local communities. Cascoland had already been working in the Kolenkit area for three years as part of a study by the University of Amsterdam into the role of cultural enterprises in disadvantaged neighbourhoods. The fact they were already known by major stakeholders in the area – indeed were residents themselves – created the preconditions for a higher degree of local involvement, which was an advantage over other competitors. According to Stephen Graham, professor of cities and society at Newcastle University, one of the benefits of bottom-up urbanism is that it highlights creativity – in addition to encouraging entrepreneurship, providing incentives to property owners to maintain properties, and supporting environmentally sustainable development. In this sense, Bell and Schoenmakers have acted as cultural process managers for bottom-up initiatives and ideas. Due to the open character of their approach, however, no promises could be made about the outcome – which meant policymakers were initially reluctant to accept Cascoland unconditionally. The collective was allowed to run a pilot project for eight months from August 2010, with an operational budget that enabled two or three artists to work in the neighbourhood. The local housing corporation also made two small locations available for free; to gain a better understanding of the local residents and what services or activities were lacking, Cascoland began by organising weekly activities in these locations. The first was an open neighbourhood dinner where ideas were exchanged over an affordable meal. By hosting activities with a low barrier to entry, Schoenmakers and Bell gathered many participants to share information about what small additions would impact the quality of life in the neighbourhood most efficiently. This research phase revealed that the issue of liveability in itself was not perceived as problematic. Instead, the local families, many originating from rural areas of Morocco and Turkey, expressed a desire to keep small cattle as they had done in their home countries. According to Nina Wallerstein, professor of family and community medicine at the University of New Mexico, “empowerment is a social-action process that promotes participation of people, organisations and communities towards the goals of increased individual and community control, political efficacy, improved quality of community life and social justice”. Cascoland’s involvement in Kolenkit increased its residents’ feeling of responsibility about the interventions and services developed in the neighbourhood. Moreover, the empowerment process increased the residents’ happiness with their living environments, because they could replicate some habits and activities typical of life in their home countries. For example, residents said they wanted more meeting places such as parks in the area. As a result, one of Cascoland’s first interventions focused on a one-acre plot that had been vacant for years: the plot was derelict and surrounded by a fence, and perceived as a source of discomfort. Still, this piece of land was valuable because of its central location and its proximity to shops and the main walking routes in the neighbourhood, so Cascoland began by organising playful activities connected to the boundaries of the site – creating a labyrinth made from the fences so people could interact with the fenced environment in a positive way. As some residents had expressed a desire to keep chickens, Cascoland also developed four mobile henhouses for the site, which were designed and made in collaboration with the residents. Several neighbourhood families with children were selected to keep the chickens, under the condition that they would feed them and clean the henhouse. Gradually, the vacant plot developed into a meeting place. The henhouses stimulated commitment from neighbours and encouraged them to take responsibility for the management of their public space. The government saw the success of this intervention and eventually removed the remaining fences, allowing the community to fully reappropriate the unused plot. Indeed, the mobile henhouses proved such a success that Cascoland could not meet the demand of neighbours interested in keeping chickens. Schoenmakers and Bell saw this as an opportunity to implement another important aspect of their approach: empowerment. They helped these interested neighbours apply for a permit at the district office to enlarge the henhouse project, and ultimately enabled the community to co-operatively design and build a large chicken coop surrounded by fruit trees. Meanwhile, Kolenkitbuurt residents who frequented barbecue spots outside the city expressed a wish to have the same facility within their neighbourhood. At the time, other districts of Amsterdam were imposing stricter regulations to prevent the development of barbecues in parks and squares, but thanks to the moderation of Cascoland and the involvement of the local community, Kolenkit was able to implement this project. The HoutsKolenkit, a publicly accessible area furnished with three barbecue grills and several picnic tables, created a viable place for residents to cook dinner and eat together; it was a valuable social asset to the neighbourhood. Cascoland’s strategy went further than simply facilitating general requests from residents, however. It was also able to identify less visible problems around the neighbourhood – for instance, children at the local school who were often appearing tired in class. Upon investigation, this was traced to families letting visiting relatives sleep in children’s bedrooms due to lack of space. The kids, forced to sleep on the couch, were tired the following day. Cascoland and the residents came up with a simple solution: one of the vacant apartments was turned into a neighbourhood guestroom, maintained and managed by neighbours, that can be booked for a small amount. In all, more than 20 interventions have been implemented since the beginning of the Cascoland project in 2010. Others include the decoration of a formerly dark and dank tunnel by neighbours, the creation of an ice-skating rink and a festive neighbourhood breakfast. Each project has its own purpose, its own planning, management and financing process, and different combinations of artists and residents are involved in each one. In the beginning, policymakers had been reluctant to agree to such an open-ended approach to the Kolenkitbuurt programme. However, the openness of Cascoland’s strategy – which did not include a precise set of outcomes, only a working method – can be considered its strength. No single “result” should be regarded as the final stage of an urban revival process, and when institutions support the creation of a bottom-up initiative, they should also define how to transmit the management of the process to the citizens themselves. Cascoland was always focused on empowering the community to keep the programme going in the long term, helping residents to initiate and manage their own projects without outside assistance. In theory, this makes the Kolenkit programme resilient and Cascoland, in itself, redundant – so they can move on and focus on new initiatives.
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.android_webview.test; import android.test.suitebuilder.annotation.SmallTest; import android.util.Pair; import org.chromium.android_webview.AwContents; import org.chromium.base.test.util.Feature; import org.chromium.content.browser.test.util.CallbackHelper; import org.chromium.net.test.util.TestWebServer; import java.util.ArrayList; import java.util.List; /** * Tests for the AwContentsClient.onReceivedLoginRequest callback. */ public class AwContentsClientAutoLoginTest extends AwTestBase { public static class OnReceivedLoginRequestHelper extends CallbackHelper { String mRealm; String mAccount; String mArgs; public String getRealm() { assert getCallCount() > 0; return mRealm; } public String getAccount() { assert getCallCount() > 0; return mAccount; } public String getArgs() { assert getCallCount() > 0; return mArgs; } public void notifyCalled(String realm, String account, String args) { mRealm = realm; mAccount = account; mArgs = args; notifyCalled(); } } private static class TestAwContentsClient extends org.chromium.android_webview.test.TestAwContentsClient { private OnReceivedLoginRequestHelper mOnReceivedLoginRequestHelper; public TestAwContentsClient() { mOnReceivedLoginRequestHelper = new OnReceivedLoginRequestHelper(); } public OnReceivedLoginRequestHelper getOnReceivedLoginRequestHelper() { return mOnReceivedLoginRequestHelper; } @Override public void onReceivedLoginRequest(String realm, String account, String args) { getOnReceivedLoginRequestHelper().notifyCalled(realm, account, args); } } private TestAwContentsClient mContentsClient = new TestAwContentsClient(); private void autoLoginTestHelper(final String testName, final String xAutoLoginHeader, final String expectedRealm, final String expectedAccount, final String expectedArgs) throws Throwable { AwTestContainerView testView = createAwTestContainerViewOnMainSync(mContentsClient); AwContents awContents = testView.getAwContents(); final OnReceivedLoginRequestHelper loginRequestHelper = mContentsClient.getOnReceivedLoginRequestHelper(); final String path = "/" + testName + ".html"; final String html = testName; List<Pair<String, String>> headers = new ArrayList<Pair<String, String>>(); headers.add(Pair.create("x-auto-login", xAutoLoginHeader)); TestWebServer webServer = null; try { webServer = new TestWebServer(false); final String pageUrl = webServer.setResponse(path, html, headers); final int callCount = loginRequestHelper.getCallCount(); loadUrlAsync(awContents, pageUrl); loginRequestHelper.waitForCallback(callCount); assertEquals(expectedRealm, loginRequestHelper.getRealm()); assertEquals(expectedAccount, loginRequestHelper.getAccount()); assertEquals(expectedArgs, loginRequestHelper.getArgs()); } finally { if (webServer != null) webServer.shutdown(); } } @Feature({"AndroidWebView"}) @SmallTest public void testAutoLoginOnGoogleCom() throws Throwable { autoLoginTestHelper( "testAutoLoginOnGoogleCom", /* testName */ "realm=com.google&account=foo%40bar.com&args=random_string", /* xAutoLoginHeader */ "com.google", /* expectedRealm */ "<EMAIL>", /* expectedAccount */ "random_string" /* expectedArgs */); } @Feature({"AndroidWebView"}) @SmallTest public void testAutoLoginWithNullAccount() throws Throwable { autoLoginTestHelper( "testAutoLoginOnGoogleCom", /* testName */ "realm=com.google&args=not.very.inventive", /* xAutoLoginHeader */ "com.google", /* expectedRealm */ null, /* expectedAccount */ "not.very.inventive" /* expectedArgs */); } @Feature({"AndroidWebView"}) @SmallTest public void testAutoLoginOnNonGoogle() throws Throwable { autoLoginTestHelper( "testAutoLoginOnGoogleCom", /* testName */ "realm=com.bar&account=<EMAIL>%4<EMAIL>&args=args", /* xAutoLoginHeader */ "com.bar", /* expectedRealm */ "<EMAIL>", /* expectedAccount */ "args" /* expectedArgs */); } }
Observation of polar stratospheric clouds over McMurdo (77.85°S, 166.67°E) (20062010) Polar stratospheric clouds (PSCs) have been observed in the Antarctic winter from 2006 to 2010 at the Antarctic base of McMurdo Station using a newly developed Rayleigh lidar. Total backscatter ratio and volume depolarization at 532 nm have been measured from 9 km up to 30 km with an average of 90 measurements per winter season. The data set was analyzed in order to evaluate the occurrence of PSCs based on their altitude, seasonal variability, geometrical thickness, and cloud typology derived from observed optical parameters. We have adopted the latest version of the scheme used to classify PSCs detected by the CALIPSO satellitebased lidar in order to facilitate comparison of groundbased and satelliteborne lidars. This allowed us to approximately identify how processes acting at different spatial scales might affect the formation of different PSC particles. The McMurdo lidar observations are dominated by PSC layers during the Antarctic winter. A clear difference between the different type of PSCs classified according to the observed optical parameters and their geometrical thickness was observed. Ice and supercooled ternary solution PSCs are observed predominantly as thin layers, while thicker layers are associated with nitric acid trihydrate particles. The same classification scheme has been adopted to reanalyze the 19952001 McMurdo lidar data in order to compare both data sets (19952001 versus 20062010).
def post_run( self, *, dump: Union[bool, str] = False, outline: bool = False, **__kwargs: Any, ) -> None: if not outline and self.context.config.post_destroy: handle_hooks( stage="post_destroy", hooks=self.context.config.post_destroy, provider=self.provider, context=self.context, )
/* FRYZA: RW PIN NOT IMPLEMENTED ==> DO NOT USE THIS FUNCTION */ static uint8_t lcd_read(uint8_t rs) { uint8_t data; if (rs) lcd_rs_high(); else lcd_rs_low(); lcd_rw_high(); if ( ( &LCD_DATA0_PORT == &LCD_DATA1_PORT) && ( &LCD_DATA1_PORT == &LCD_DATA2_PORT ) && ( &LCD_DATA2_PORT == &LCD_DATA3_PORT ) && ( LCD_DATA0_PIN == 0 ) && (LCD_DATA1_PIN == 1) && (LCD_DATA2_PIN == 2) && (LCD_DATA3_PIN == 3) ) { DDR(LCD_DATA0_PORT) &= 0xF0; lcd_e_high(); lcd_e_delay(); data = PIN(LCD_DATA0_PORT) << 4; lcd_e_low(); lcd_e_delay(); lcd_e_high(); lcd_e_delay(); data |= PIN(LCD_DATA0_PORT) & 0x0F; lcd_e_low(); } else { DDR(LCD_DATA0_PORT) &= ~_BV(LCD_DATA0_PIN); DDR(LCD_DATA1_PORT) &= ~_BV(LCD_DATA1_PIN); DDR(LCD_DATA2_PORT) &= ~_BV(LCD_DATA2_PIN); DDR(LCD_DATA3_PORT) &= ~_BV(LCD_DATA3_PIN); lcd_e_high(); lcd_e_delay(); data = 0; if (PIN(LCD_DATA0_PORT) & _BV(LCD_DATA0_PIN) ) data |= 0x10; if (PIN(LCD_DATA1_PORT) & _BV(LCD_DATA1_PIN) ) data |= 0x20; if (PIN(LCD_DATA2_PORT) & _BV(LCD_DATA2_PIN) ) data |= 0x40; if (PIN(LCD_DATA3_PORT) & _BV(LCD_DATA3_PIN) ) data |= 0x80; lcd_e_low(); lcd_e_delay(); lcd_e_high(); lcd_e_delay(); if (PIN(LCD_DATA0_PORT) & _BV(LCD_DATA0_PIN) ) data |= 0x01; if (PIN(LCD_DATA1_PORT) & _BV(LCD_DATA1_PIN) ) data |= 0x02; if (PIN(LCD_DATA2_PORT) & _BV(LCD_DATA2_PIN) ) data |= 0x04; if (PIN(LCD_DATA3_PORT) & _BV(LCD_DATA3_PIN) ) data |= 0x08; lcd_e_low(); } return data; }
//find the maximum width of a tree i.e, the maximum num of nodes at any level #include<iostream> #include<queue> using namespace std; struct Node{ int data; Node* right; Node* left; }; //creates node Node* createNode(int data){ Node* node = new Node; if(node){ node->left = node->right = NULL; node->data = data; return node; } return NULL; } //finds the maximum width of a tree int getMaxWidth(Node* root){ if(root == NULL) return NULL; int c = 0; int maxCount = 0; Node *curr = NULL; queue<Node*> q; Node* dummy = NULL; q.push(root); q.push(dummy); while(!q.empty()){ curr = q.front(); q.pop(); if(curr == NULL){ if(c >maxCount) maxCount = c; c = 0; if(q.empty()) break; q.push(dummy); } else{ if(curr->left){ q.push(curr->left); ++c; } if(curr->right){ q.push(curr->right); ++c; } } } return maxCount; } main(){ /* 1 / \ 2 5 / \ 3 4 */ Node *root=createNode(1); root->right=createNode(5); root->left=createNode(2); root->left->left=createNode(3); root->left->right=createNode(4); cout<<getMaxWidth(root); }
Shannon Denton Biography SHANNON ERIC DENTON is a veteran storyteller and artist with credits at Cartoon Network, Warner Bros., Showtime, Jerry Bruckheimer Films, NBC, Disney, Sony, LEGO, Marvel Entertainment, FoxKids, Paramount, CBS, Dimension Films, DC Comics and Nickelodeon. Shannon Eric Denton was a storyboard artist on the Oscar-nominated feature Jimmy Neutron: Boy Genius and directed the original commercial animations for the movie. He has written for Cartoon Network, Warner Bros. and Disney/Marvel and worked in live action on shows like Community, Con Man, Ally McBeal, Las Vegas, US of Tara and his projects have been featured in Entertainment Weekly and Publishers Weekly. In 1992, Shannon was an artist for Image Comic's Extreme Studios working with Deadpool creator Rob Liefeld. From 1995-1999 Shannon contributed to the design and development of almost every animated action adventure show produced by the Fox Kids Network, including X-Men, Spider-Man and the Annie nominated Silver Surfer series, as well as doing comic work for DC Comics, Dark Horse, Image Comics and Marvel on titles ranging from Deadpool to Star Wars. He is featured in a section of the book Toon Art: The Graphic Art of Digital Cartooning and contributed to the cover art. In 2000 he founded Komikwerks, an independent comic publishing entity with partner Patrick Coyle, which has partnered with AOL and comics legend Stan Lee. Komikwerks has also launched a new line of illustrated children's action books under the Actionopolis imprint. He has worked for publishers Tokyopop, Desperado Publishing, Boom, AiT/Planet Lar, IDW, Dynamite and Image Comics. Shannon was also nominated for the 27th, 28th and 29th Annual ComicBuyersGuide Fan Awards for Favorite Editor. His book GRUNTS: War Stories is also nominated for the 29th Annual ComicBuyersGuide Fan Awards for Favorite Graphic Novel. He worked on the Eisner & Harvey Nominated OUTLAW TERRITORY from Image Comics. His book GRAVESLINGER was nominated for a 2010 Harvey Award. Shannon's co-creation, FLESHDIGGER, was picked as an entrant in Image Comics/TopCow's 2011 Pilot Season project and he was featured on MTV. Shannon won the 2011 Shel Dorf Award for Editor Of The Year and was again nominated in 2012. Shannon is currently working with Alan Tudyk, Nathan Fillion and PJ Haarsma on their sci-fi epic SPECTRUM (spinning out of the Lionsgate/ComicCon HQ Con Man series) and overseeing production of the comic and animation. Shannon was a producer on Season 2 of CON MAN. Shannon and Actionopolis are represented by Circle Of Confusion
<reponame>NeonOcean/Environment from event_testing.resolver import SingleSimResolver from vet.vet_clinic_tuning import VetClinicTuning, logger import services def get_vet_clinic_zone_director(): venue_service = services.venue_service() if venue_service is None or not venue_service.venue_is_type(VetClinicTuning.VET_CLINIC_VENUE): return return venue_service.get_zone_director() def get_bonus_payment(difficulty): for bonus_item in reversed(VetClinicTuning.DIFFICULTY_BONUS_PAYMENT): if bonus_item.threshold.compare(difficulty): return bonus_item.bonus_amount return 0 def get_value_of_service_buff(markup, vet_sim_info): resolver = SingleSimResolver(vet_sim_info) for markup_tests in reversed(VetClinicTuning.VALUE_OF_SERVICE_AWARDS): if markup_tests.markup_threshold.compare(markup): for skill_tests in reversed(markup_tests.skill_to_buffs): if resolver(skill_tests.skill_range): return skill_tests.value_of_service_buff logger.error('Could not find an appropriate value of service buff for {}. Please verify there are no holes in VALUE_OF_SERVICE_AWARDS tuning', vet_sim_info)
def Msg(string, level=LOG.INFO): output = "[%s] %s" % (timestamp(), string) if state.platform == 'linux': if level is LOG.INFO: output = "%s%s%s" % ("\033[32m", output, "\033[0m") elif level is LOG.SUCCESS: output = "%s%s%s" % ("\033[1;32m", output, "\033[0m") elif level is LOG.ERROR: output = "%s%s%s" % ("\033[31m", output, "\033[0m") elif level is LOG.DEBUG: if state.isdebug: output = "%s%s%s" % ("\033[34m", output, "\033[0m") else: output = None elif level is LOG.UPDATE: output = "%s%s%s" % ("\033[33m", output, "\033[0m") if level is LOG.DEBUG and not state.isdebug: return if output: print output log(string)
package com.github.jbox.mongo; import lombok.Getter; import lombok.Setter; /** * @author <EMAIL> (FeiQing) * @version 1.0 * @since 2018-03-06 15:19:00. */ public class MongoCommandExecuteException extends RuntimeException { private static final long serialVersionUID = -8181715563606319069L; @Getter @Setter private int errorCode; @Getter @Setter private String codeName; @Getter @Setter private int ok; @Getter @Setter private String errmsg; @Override public String toString() { return "MongoCommandExecuteException{" + "errorCode=" + errorCode + ", codeName='" + codeName + '\'' + ", ok=" + ok + ", errmsg='" + errmsg + '\'' + '}'; } }
Regulation of urokinase receptor function and pericellular proteolysis by the integrin alphabeta. Interactions between the uPA receptor (uPAR) and various integrins, including alphabeta, are known to modulate integrin-dependent cell adhesion, and we have shown that the integrin-associated tetraspanin protein CD82 down-regulates uPAR-dependent plasminogen activation by affecting alphabeta cellular localisation. Here we have investigated whether overexpression of alphabeta directly affects uPAR-dependent pericellular proteolysis. CHO cells overexpressing alphabeta were found to activate plasminogen at a rate up to 18-fold faster than B2CHO cells which are alpha-deficient. This effect was dependent on the activation state of alphabeta, as it was maximal in the presence of Mn(2+). To determine the role of uPAR-alphabeta interactions in this effect, we determined the adhesion of these cells to immobilised soluble uPAR (suPAR). Neither cell-type was found to adhere to suPAR, but both cell types were found to adhere to an anti-uPAR monoclonal antibody in a uPAR- and integrin-dependent manner. This adhesion was 10-fold greater in the absence of alphabeta, possibly implicating the involvement of non-alpha-integrins. Soluble forms of the various components were used to investigate the molecular basis of these effects, but no direct interactions could be demonstrated between alphabeta and either uPAR, uPA or uPA-uPAR complex. This suggests that assembly of these components on the plasma membrane is required to influence uPAR function, increasing uPAR-dependent pericellular proteolysis and decreasing uPAR-dependent cell adhesion. These interactions may be modified by other integrins, suggesting a complex interplay between uPAR and integrins on the cell surface with the potential to regulate invasive cell migration.
Effects of Acute Anxiety Induction on Speech Perception Improving the validity of speech-recognition models requires an understanding of the conditions in which speech is experienced on a daily basis. Listening conditions leading to a degradation of the signal (e.g., noise) can be modeled at the interface between sensory processes and long-term memory for words. Conditions leading solely to an increase in cognitive effort can be modeled in a similar fashion. Specifically, Mattys and Wiget showed that dividing attention between a speech task and a nonlinguistic visual task causes a lexical drift, whereby listeners tend to ignore important acoustic details in the speech signal and rely too much on the lexical plausibility of its content. In contrast, little is known about the effect on speech perception of listening conditions that neither degrade the signal nor overtly require additional mental operations for example, listening to speech in a state of anxiety, a condition often encountered in everyday life. Research shows that anxiety is associated with a broad dysregulation of attentional control and enhanced sensitivity to distraction (Bishop, 2009; Eysenck, Derakshan, Santos, & Calvo, 2007). We therefore hypothesized that the effect of anxiety on speech perception might be similar to that of divided attention. To test this hypothesis, we measured the effect of acutely induced anxiety on performance of a classic speechperception task, phoneme categorization (Liberman, Harris, Hoffman, & Griffith, 1957). In phoneme-categorization experiments, participants report which of two phonemes (e.g., /g/ or /k/) they heard at the beginning of a syllable. The phoneme is either unambiguous (a clear /g/ or /k/) or ambiguous (a blend between /g/ and /k/). A key finding, called the Ganong effect, is that phoneme categorization is influenced by the lexical status of the syllable. For example, English listeners report more /g/ responses for stimuli along a gift-kift continuum and more /k/ responses for stimuli along a giss-kiss continuum. Mattys and Wiget found that performing this task in a divided-attention condition (i.e., with a simultaneous visual search task) increased the Ganong effect and decreased perceptual discrimination between phonemes (Fig. 1b). In the present experiment, we replaced the visual search task with a well-established anxiety-inducing manipulation, the 7.5% carbon dioxide (CO 2 ) challenge (Bailey, Argyropoulos, Kendrick, & Nutt, 2005). This procedure, which is used extensively to test novel anxiolytic medications for potential efficacy (Bailey, Kendrick, Diaper, Potokar, & Nutt, 2007), has been shown to elicit cognitive biases that are a core feature of psychological models of anxiety (Garner, Attwood, Baldwin, James, & Munaf, 2011). In the anxiety condition, listeners performed the categorization task and a discrimination task while inhaling air enriched with 7.5% CO 2. In a control condition, they inhaled air while they performed the tasks.
package hust.cs.javacourse.search.query.impl; import hust.cs.javacourse.search.index.AbstractPosting; import hust.cs.javacourse.search.index.AbstractPostingList; import hust.cs.javacourse.search.index.AbstractTerm; import hust.cs.javacourse.search.index.impl.Index; import hust.cs.javacourse.search.query.AbstractHit; import hust.cs.javacourse.search.query.AbstractIndexSearcher; import hust.cs.javacourse.search.query.Sort; import hust.cs.javacourse.search.util.Config; import java.io.File; import java.util.ArrayList; import java.util.List; public class IndexSearcher extends AbstractIndexSearcher { @Override public void open(String indexFile) { this.index = new Index(); index.load(new File(indexFile)); } @Override public AbstractHit[] search(AbstractTerm queryTerm, Sort sorter) { // 忽略大小写 if (Config.IGNORE_CASE) { queryTerm.setContent(queryTerm.getContent().toLowerCase()); } AbstractPostingList indexSearchResult = index.search(queryTerm); if (indexSearchResult == null) { return new Hit[0]; } List<AbstractHit> result = new ArrayList<>(); for (int i = 0; i < indexSearchResult.size(); i++) { AbstractPosting posting = indexSearchResult.get(i); AbstractHit hit = new Hit(posting.getDocId(), index.getDocName(posting.getDocId())); hit.getTermPostingMapping().put(queryTerm, posting); hit.setScore(sorter.score(hit)); result.add(hit); } sorter.sort(result); AbstractHit[] returnResult = new AbstractHit[result.size()]; return result.toArray(returnResult); } @Override public AbstractHit[] search(AbstractTerm queryTerm1, AbstractTerm queryTerm2, Sort sorter, LogicalCombination combine) { AbstractPostingList indexSearchResult1 = index.search(queryTerm1); AbstractPostingList indexSearchResult2 = index.search(queryTerm2); // 如果两个都没找到直接就是空的数组 if (indexSearchResult1 == null && indexSearchResult2 == null) { return new Hit[0]; } List<AbstractHit> result = new ArrayList<>(); if (combine == LogicalCombination.AND) { // 如果有一个词语根本就不存在,那就直接返回空的数组 if (indexSearchResult1 == null || indexSearchResult2 == null) { return new Hit[0]; } // 求交集 for (int i = 0; i < indexSearchResult1.size(); i++) { // 获取docId int docId = indexSearchResult1.get(i).getDocId(); int sub_index = indexSearchResult2.indexOf(docId); if (sub_index != -1) { AbstractHit hit = new Hit(docId, index.getDocName(docId)); hit.getTermPostingMapping().put(queryTerm1, indexSearchResult1.get(i)); hit.getTermPostingMapping().put(queryTerm2, indexSearchResult2.get(sub_index)); hit.setScore(sorter.score(hit)); result.add(hit); } } } else if (combine == LogicalCombination.OR) { // 如果有一个词语不存在直接退化为对另外一个词语的搜索 if (indexSearchResult1 == null) { return search(queryTerm2, sorter); } if (indexSearchResult2 == null) { return search(queryTerm1, sorter); } for (int i = 0; i < indexSearchResult1.size(); i++) { // 首先添加 int docId = indexSearchResult1.get(i).getDocId(); int sub_index = indexSearchResult2.indexOf(docId); if (sub_index == -1) { // 如果在另外一个词语中没有,那就正常添加 AbstractHit hit = new Hit(docId, index.getDocName(docId)); hit.getTermPostingMapping().put(queryTerm1, indexSearchResult1.get(i)); hit.setScore(sorter.score(hit)); result.add(hit); } else { // 如果在另外一个中有, 那就要做一些修改 AbstractHit hit = new Hit(docId, index.getDocName(docId)); hit.getTermPostingMapping().put(queryTerm1, indexSearchResult1.get(i)); hit.getTermPostingMapping().put(queryTerm2, indexSearchResult2.get(sub_index)); // 这个地方其实有点奇怪 hit.setScore(sorter.score(hit)); result.add(hit); } } for (int i = 0; i < indexSearchResult2.size(); i++) { int docId = indexSearchResult2.get(i).getDocId(); int sub_index = indexSearchResult1.indexOf(docId); if (sub_index == -1) { // 只有当1中不存在的时候才添加 AbstractHit hit = new Hit(docId, index.getDocName(docId)); hit.getTermPostingMapping().put(queryTerm2, indexSearchResult2.get(i)); hit.setScore(sorter.score(hit)); result.add(hit); } } } sorter.sort(result); AbstractHit[] returnResult = new AbstractHit[result.size()]; return result.toArray(returnResult); } }
10th International IFAC Symposium on Computer Applications in Biotechnology 8th International IFAC Symposium on Dynamics and Control of Process Systems CONTROL OPPORTUNITIES IN SYSTEMS BIOLOGY Systems biology has developed rapidly as a result of advances in high throughput biological measurement and more recently through mathematical modelling of cellular and metabolic processes. As a result of these developments it has become clear that control and systems theory will play an important role in understanding the mechanisms of life. Consequently, there are many exciting opportunities for control experts who want to shift their interests to systems biology. But how can a newcomer identify worthwhile problems? This article is an attempt to answer this question by outlining the area and describing the opportunities for control and systems theory.
<reponame>JonathanGailliez/azure-sdk-for-python # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- from msrest.serialization import Model class VirtualMachineExtensionInstanceView(Model): """The instance view of a virtual machine extension. :param name: The virtual machine extension name. :type name: str :param type: Specifies the type of the extension; an example is "CustomScriptExtension". :type type: str :param type_handler_version: Specifies the version of the script handler. :type type_handler_version: str :param substatuses: The resource status information. :type substatuses: list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] :param statuses: The resource status information. :type statuses: list[~azure.mgmt.compute.v2017_03_30.models.InstanceViewStatus] """ _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, 'substatuses': {'key': 'substatuses', 'type': '[InstanceViewStatus]'}, 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, } def __init__(self, *, name: str=None, type: str=None, type_handler_version: str=None, substatuses=None, statuses=None, **kwargs) -> None: super(VirtualMachineExtensionInstanceView, self).__init__(**kwargs) self.name = name self.type = type self.type_handler_version = type_handler_version self.substatuses = substatuses self.statuses = statuses
Uncommon presentation of cutaneous leishmaniasis as eczemalike eruption To the Editor: Although cutaneous leishmaniasis (CL) usually causes ulcerated papules or nodules, it has various atypical forms, such as plaque, impetiginized, hyperkeratotic, warty, zosteriform, erysipeloid sporotrichoid and eczematoid types . Therefore, CL should be included in the differential diagnosis of cases presenting various types of skin problems, especially in regions where CL is endemic. We describe a patient with CL, clinically resembling allergic contact dermatitis. A 31-year old man was admitted with pruntic erythematous, edematous, exudative and partly lichenified plaques 15-20 cm in diameter on the dorsal surfaces of his left hand and left foot (Fig. 1). These lesions had been present for 2.5 years. He had also suffered from hemophilia since birth and psoriasis for 2 years. The case was diagnosed clinically as allergic contact dermatitis. Since there was no response to administration of topical and systemic cortisone, a biopsy was obtained. Histopathological findings were focal parakeratosis. Munro's microabscesses, focal hypergranulosis, slight spongiosis, acanthosis, papillomatosis, erythrocyte extravasation in the upper dermis, and a diffuse infiltration composed of histocytes, lymphocytes and plasma cells throughout the entire dermis (Fig. 2). Abundant intraand extra-cellular parasites were seen in the dermal infiltrate. Similar bodies were also detected in the spongiotic areas of the epidermis. Diagnosis of CL was confirmed by demonstration of amastigotes in Giemsa-stained thin smears of scrapped materials and by growth of promastigotes in cultures of aspirated materials on NNN medium. Leishmanin skin test was strongly positive. Results of erythrocyte sedimentation rate, complete blood counts, blood chemistry and urine analysis; counts of Pan-T, Pan-B, CD4 and CD8 positive cells in peripheral blood; and blood levels of immunoglobulins were within normal ranges. ELISA tests for antiH IV-I and I1 antibodies were negative. Courses of intravenous sodium stibogluconate ( 10 mgkg per day for 2 weeks) were repeated three times with intervals of 2 4 weeks. The third course was combined with oral ketoconazole (400 mg per day for 6 weeks). After this treatment, the lesions healed both clinically and histopathologically. There was no recurrence in the follow-up period of 9 months. The incidence of the eczematoid form of CL has been reported to be 2.3% or 2.4% in studies from Iran. We think that CL should be included in the differential diagnosis of recalcitrant eczematous eruptions especially in regions where CL is epidemic or endemic, such as our region. Development of eczematous lesions in CL may be explained both by cell-mediated hypersensitivity and by invasion of parasites in the epidermis, as seen in other cutaneous infections or infestations. For example, vesiculobullous lesions of tinea pedis are usually associated with a severe cell-mediated hypersensitivity to fungal elements and some vesicles of scabies may develop around the mite, Sarcoptes scabiei, which
// // CommentCell.h // XWDC // // Created by mac on 16/2/24. // Copyright © 2016年 hcb. All rights reserved. // #import <UIKit/UIKit.h> #define Count 5 //一行最多放几张图片 #define ImageWidth ([UIScreen mainScreen].bounds.size.width-80)/Count @interface CommentCell : UICollectionViewCell @property (nonatomic , retain)UIImageView *imageView; @property (nonatomic , retain) UIButton *cancelBtn; @end
Influence of various DEM shape representation methods on packing and shearing of granular assemblies Realistic yet efficient representation of particle shape is a major challenge for the Discrete Element Method. This paper uses angle-of-repose and direct-shear test simulations to describe the influence of several shape representation methods, and their parameters, on the bulk response of granular assemblies. Three rolling resistance models, with varying coefficient of rolling friction, are considered for spherical particles. For non-spherical particles, superquadrics with varying blockiness and multi-spheres with varying bumpiness are used to model cuboids and cylinders of several aspect ratios. We present extensive quantitative results showing how the various ways used to represent shape affect the bulk response, allowing comparisons between different approaches. Simulations of angle-of-repose tests show that all three rolling friction models can model the avalanching characteristics of cube/cuboid and cylindrical particles. Simulations of direct-shear tests suggest that both the shear strength and the dilative response of the considered non-spherical particles (but not their porosity) can only be predicted by the elasto-plastic rolling resistance model. The quantitative nature of the results allows identifying values of the shape-description parameters that can be used to obtain similar results when using alternative shape representation methods. Introduction For granular materials, particle shape is an important factor that can highly influence the contact-level behaviour of single particles and, accordingly, affect the bulk-scale response. Non-spherical shapes lead to geometric interlocking between particles, which hinders the motion of the particles and changes the rheology of the granular assemblies. Achieving a realistic, yet efficient, representation of particle shape is currently one of the most important challenges for the Discrete Element Method (DEM). In DEM, spheres are usually employed to describe particle shape, due to their simplicity and low computational cost. Restraining rotations through rolling resistance models has been suggested to overcome the inherent inability of the spheres to provide geometric interlocking, and thus represent indirectly the effect of particle shape. A more realistic, but computationally more expensive, alternative is to simulate the particle shape either through rigid clumps of spheres (multi-spheres ) or through explicit descriptions of particle shapes (e.g. using polyhedrals, superquadrics or other shapes). While there is extensive literature on particle shape in DEM, we only consider below several studies that have compared the bulk response of various shaped particles, namely spheres with rolling resistance, multispheres, superquadrics, and polyhedrals. Zhou et al. proposed a methodology to feed DEM simulations with realistic-shaped particles of natural sand. This article is part of the Topical Collection: Multiscale analysis of particulate micro and macro processes. They utilized X-ray micro-computed tomography to scan the sand particles. The obtained images are then passed through several image processing techniques, which are followed by the reconstruction of particle surfaces (based on spherical harmonic analysis). The real particle shapes are approximated by clumps of overlapping spheres and fed into DEM simulations. A set of direct shear tests are then performed with the generated complex shape particles and results are compared to spherical assemblies. It is shown that non-spherical particles, due to increased interlocking, yield a higher initial void ratio, peak, and residual strength. Seelen et al. developed a DEM code to simulate particles of any convex shape. Their study consists of assessing positional and orientational ordering of the generated random granular packings in a cylindrical container. It is observed that the solid fraction is highest in the core of all samples (loose packings of spheres, cuboids, cylinders, and ellipsoids), while it is gradually decreasing towards the boundaries (walls). For cuboids and cylinders, it is shown that the solid fraction smoothly decreases as the aspect ratio AR increases (for AR > 1 ), while spheres provide the lowest solid fraction. In the case of ellipsoids with aspect ratios higher than one, however, the solid fraction of the samples increases. Zhao et al. compared the response of spherical particles with rolling resistance to superquadric shape particles (i.e. superballs and ellipsoids) in triaxial compression tests. They showed that increasing shape deviation from the sphere affects the shear strength and dilative response of the granular assembly. Additionally, adjusting rolling resistance can provide a similar influence as the shape parameter on the shear strength, however, it greatly overpredicts the volume change during shearing. They also suggested that the application of rolling resistance, to mimic the behaviour of non-spherical particles, is limited to particle shapes without elongation. Zhou et al. employed the rolling resistance model proposed for disks by Iwashita and Oda, and compared the results with the response of non-spherical particles (triangle and square clumps). They reported that the two approaches present different localisation modes of particle rotation and shear strain at the peak state. The sample with disks shows a clear localization band, while the sample with clump particles exhibits a more uniform localization pattern. They stated that, although the consideration of rolling resistance for disks affects the macroscopic strength and dilatancy of the samples, it is not able to reproduce the rotational behaviour as exhibited by non-spherical particles. Wensrich and Katterfeld proposed relating the coefficient of rolling friction to a normalized average eccentricity of contact. They evaluated the proposed solution through conducting angle-of-repose tests and compared the results for spheres with rolling resistance, to simple clumped particles. It was seen that similar angle of repose with nonspherical particles can be reached for spheres by considering approximately half of the estimated rolling friction. They suggested that the discrepancy can be justified by considering that the artificial rolling resistance, applied through the proposed methodology, is always acting in the reverse direction of rotation, while real interlocking among particles sometimes can lead to acceleration of the rotation. Estrada et al. compared the response of discs with rolling resistance, with regular polygonal particles (in 2D). The tests were conducted in simple shear conditions, assessing various aspects of the bulk response. They observed that the rolling friction coefficient can be successfully related to the number of sides in polygonal particles. They also reported that there exists a good agreement between the two types of particle packings in terms of shear strength, solid fraction, force and fabric anisotropy, and probability distribution of contact forces. In a previous study, we have compared the influence of multi-sphere bumpiness and superquadric blockiness on the response of assemblies of cubical particles in several micro-and macro-scale tests. We have observed that singleparticle behaviour is a direct function of both surface and edge properties, and that shape complexity only significantly affects the shear strength, porosity and mode of motion once the packing is dense. A comprehensive comparison between spheres, with restrained rotation, and non-spherical particles is yet missing, with the above-mentioned studies only partially clarifying this issue. We address this by testing various shape complexity factors under various stress states, namely free flowing and dense shearing regimes. We significantly extend our previous work, by considering cylinders in addition to cubes, and varying the particle aspect ratio. Additionally, the present work not only discusses the influence of shape complexity factors, but also specifically focuses on the capability of spheres with rolling friction to simulate characteristics of complex-shaped particles. The main novelty of the current study is therefore to compare shape representations across multiple aspects, considering different rolling friction models and comparing with different particle shapes and aspect ratios, shape-representation methods, and shape parameters, considering also different testing scenarios and initial densities. To do so, we simulate angle-of-repose and direct-shear tests to assess the macro-scale influence of several shape complexity factors: rolling friction for spheres (using three models) and shape representation (multi-sphere or superquadric), shape parameter (bumpiness or blockiness), and aspect ratio for cuboids and cylinders. Methodology This section provides information on the material properties and the testing procedures that have been followed. The considered particles are spheres with 10 % of polydispersity and mean radius of 1 mm (diameter ranging from 1.9mm to 2.1mm and following a normal distribution with a mean diameter of 2 mm and a standard deviation of 0.1). Both cubes and cylinders are simulated with various complexities at aspect ratios (AR) between 1 and 3. Additionally, nonspherical particles are monodisperse. The diameter of the spheres is equal to the edge length of non-spheres at AR = 1. Cubes/cuboids and cylinders are approximated by two approaches: superquadric (SQ) particles in LIGGGHTS and multi-sphere (MS) particles in EDEM. Regarding the use of two distinct DEM codes, it should be noted that the contact detection algorithm and force calculation methodology are different for multi-sphere and superquadric particles. Furthermore, for modelling spherical particles, both codes are used to consider various rolling resistance models, see Sect. 2.3. The considered rolling resistance models are already implemented in the employed codes and are widely used in the literature. The parameters for the considered material are chosen so that the computational cost is reasonable for non-spherical particles. Table 1 shows the material properties used in the simulations. The Hertz model with viscous damping is used for normal forces, the Mindlin-Deresiewicz model is used for tangential forces, and no rolling friction model is used for MS and SQ particles. Anand et al. used DEM to model the discharge of bulk granular materials from a quasi-3D, wedge-shaped hopper. The coefficient of restitution (CoR) was shown to have negligible influence on the discharge rate. Kasina considered four different values of CoR ( 10 −4, 0.1, 0.6 and 1) and investigated its influence on the bulk internal friction. It is observed that the predicted shear response is insensitive to CoR, since collisions are absent during shearing. Accordingly, as suggested by Kasina, a low CoR value of 10 −4 is considered to enhance the settlement of the particle assembly (i.e. to accelerate the process of reaching the steady-state during the filling). The current study focuses on the impact of various shape complexity factors (i.e. three rolling friction models, bumpiness, blockiness, and aspect ratio). Polydispersity is only considered, to avoid crystallization, for spherical particles. The size distribution is rarely discussed for non-spherical particles in the literature and is not considered in this study. This is to limit the number of parameters for non-spherical particles in the current study. Additionally, the computational cost increases for polydisperse systems, and this is more critical for multispheres, where the time-step is calculated based on diametre of the smallest sub-sphere. For a 2D set of particles, Nguyen et al. presented a detailed numerical investigation of the combined effects of size and shape polydispersity, reporting that triangles and hexagons spontaneously assemble into crystalline structures. However, for square particles with mostly side-side contacts, packings tend to form column-like structures. Superquadrics The equation of the shape of a SQ particle in its local coordinate system is : where a, b, c are the half-lengths of the particle along its principal axes, and n 1 and n 2 are parameters that control the shape. For instance, cubical ( a = b = c = d∕2 ) and prolate cuboidal ( a = b = d∕2, c = AR ⋅ a ) particles can be modelled by superquadrics with n 1 = n 2 = N > 2, while prolate cylindrical particles ( a = b = d∕2, c = AR ⋅ a ) can be modelled by taking n 1 = N > 2, n 2 = 2, where N controls particle blockiness. Multi-sphere approach Multi-spheres, which approximate the shape of particles by overlapping or touching spheres, are used as an approxima- any desired shape. The contact force between neighbouring particles is calculated from their element spheres, using sphere-sphere contact detection. Details of the algorithm and mechanical calculations can be found in. Cubes, as multi-spheres, were modelled using the EDEM software with equal-radius (d/4) overlapping sub-spheres. The number of sub-spheres in each edge of the cubes varies between 2 and 4, resulting in 8, 27 and 64 total sub-spheres per particle, denoted as MS, MS and MS correspondingly (see Fig. 1). We have also considered an extension in the number of sub-spheres around a single axis to investigate the effect of the aspect ratio (AR), another shape complexity parameter. Due to an excessive increase in the number of sub-spheres, the extension of MS is not considered (remains with AR = 1 ). For the angle-of-repose test, AR is increased up to 3 (for both MS and MS particles), while for the direct shear test, the particle extension is considered up to AR = 2 (due to the high computational time required). Furthermore, the representation of the cylindrical particles is addressed through considering overlapping spheres, which are aligned along a single axis. The particles consist of 2, 3, 4 and 30 sub-spheres, which leads to variation of the bumpiness. For MS, MS and MS, the bumpiness is changed along the circumference of the particles, while for MS a top and bottom bumpiness are also added, see Fig. 1. Note that all the non-spherical particles have equal edge length (2 mm), which is equal to diametre of the simulated spherical particles. Rolling friction models Spherical particles have no geometrical interlocking, thus failing for example to capture the formation of stable angles of repose. Consequently, additional rolling friction models (RF) are often used to represent the effects of particle shape. Therefore, when a bulk solid is represented by perfect spheres, the coefficient of rolling friction r is considered as a DEM shape parameter. Ai et al. reviewed the commonly used rolling friction models proposed in the literature and assessed them in a series of 2D small-scale tests. The current study uses three rolling resistance models. The first model, called here RF RVD, is the Relative Velocity Dependent (RVD) rolling friction model in EDEM. It considers equivalent radius R * and unit average rotational velocity vector RVD of the particles. The RF RVD model applies to each particle i in contact with a particle j a torque where and n ij is a unit vector pointing from particle i to the point of contact. The second model, called here RF CI, is the default rolling resistance model in EDEM, which incorporates the radius R i and unit rotational velocity vector i of an individual particle into the torque calculation According to the definition by, this model is a contactindependent model (type D). The third model, called here RF EPSD, is the EPSD2 model in LIGGGHTS, which is a modified version of the elastic-plastic spring-dashpot model (type C in ). In this modification, the viscous damping term is switched Non-spherical particles (cubes and cylinders), simulated by means of superquadric (top 2 rows, with increasing blockiness parameter from left to right) and multi-sphere (bottom 2 rows, with increasing bumpiness from left to right) shape representation techniques off, since it is only effective during dynamic events and to reduce the number of unknown parameters (i.e. rolling viscous damping parameter, which needs to be calibrated ). The torque is therefore computed incrementally using only the spring term, as where r is the incremental relative rotation angle between two particles and k r is the rolling stiffness. The magnitude of the spring term is bounded by: For determining the k r value, Ai et al. suggested the approach proposed by Bardet and Huang : where J n is a dimensionless parameter varying between 0.25 and 0.5 ; they showed however that, when considering only the spring term, the model is susceptible to oscillations. To overcome this deficiency, Wensrich and Katterfeld, recommended the use of the following equation, initially proposed by Iwashita and Oda ) where, k t is the tangential stiffness. Wensrich and Katterfeld pointed out that the rolling stiffness k r calculated from Eq. results in a larger value than from Eq.. It is shown that higher k r value leads to mobilization of shear dissipation in contacts, which further hinders the rotation of particles (nullifying the need for a damping term). As suggested by Jiang et al. the relative rotation of two 3D particles in contact, can be decomposed into two components: a) about the contact normal direction, which renders a twisting resistance torque b) on the tangential contact plane, which leads to rolling resistance moment. It is shown that both components are influencing the relative motion of the particles, which results in increased dilation (in sample volume) at both triaxial and plane-strain compression tests. However, it is shown that once rolling resistance is excluded from contacts, the strength and dilatancy reduce more (compared to the case where twisting resistance is off), which suggests the importance of rolling resistance. Consequently, in this study, to minimize the number of varying parameters and to highlight the influence of the rolling resistance component, the twisting resistance is not activated. Table 1 shows the properties of the simulated particles. Figure 2 shows the simulation set-up and the dimensions used. The orifice of the funnel has a diameter of 24mm, which is almost 12 to 4 times the equivalent particle diameter. This ensures free flow of all particles. Test set-up and methodology Miura et al. observed a decrease in angle of repose (AoR) with increasing number of particles. Wensrich and Katterfeld simulated the AoR test using both clumped particles and spherical particles with rolling friction (7000 particles). Similarly, Chen et al. simulated the AoR test for super-ellipsoids, with 8000 particles. We use here 6000 particles, to avoid excessive computational time. The particles are distributed randomly in the cone and allowed to settle under gravity for 1 s simulation time. After the packing is formed, the orifice is opened, and the discharge commences. The simulation continues until a heap is formed, and then the angle of repose is estimated using the algorithm described in. For the spherical assemblies with RF RVD, special care must be taken for the simulation period after formation of the heap, as particles with RF RVD are susceptible to oscillation in static packings. In the angle-of-repose test, after particles are discharged and an initial heap is formed, the rotational and translational velocities tend to reduce, however the constantly generated torque prevents static equilibrium. Applying the artificial torque to the single particles, which are at rest, increases the kinetic energy of the system and this can lead to instability. RF CI has a similar mechanism as RF RVD for applying the torque, thus facing the same problem of ignoring the particle being static or in motion. Based on our observations and those in, this deficiency is more problematic for higher values of r and larger timesteps. Consequently, a small time-step is assigned (1% of Fig. 2 Angle-of-repose simulation set-up the Rayleigh time) for these simulations to minimize the effect of the instabilities. Furthermore, the angle of repose (AoR) is measured at several instances (after the initial heap is formed), to detect any time-dependent changes in the heap geometry. The error bars in Fig. 3 show that for RF RVD the difference in AoR is less than 1 for r ≤ 0.2, while this difference is less than 2 for RF CI (between 1 s and 3 s of simulation time). For larger values of r the overall difference is less than 3 for both models. Thus, to have consistency between the measured data, all simulations are stopped at exactly 3 s from the opening of the orifice. Figure 3 shows that the rolling friction models highly affect the heap formation characteristics of the spherical particles. For r ≤ 0.05 comparable AoR values are obtained for the three models, however by increasing r, RF CI leads to larger heap angles compared to those of RF RVD and RF EPSD (at saturation, the difference is 25%). The difference in AoR between RF RVD and RF EPSD is relatively small (especially for r ≤ 0.2, which is the most frequently used range). The very high AoR for the packings with RF CI can be explained by the fact that this model applies the torque to every single particle always in the opposite direction of the rotation (ignoring the relative rotational velocity of the contacting particles). Angle or repose results Another important objective of this study is to evaluate the capability of the rolling resistance models in describing the bulk response of non-spherical particles. Accordingly, we have considered the simulation of non-spherical particles using multi-sphere and superquadric approaches for cubes/ cuboids and cylindrical particle shapes (varying bumpiness and blockiness). Figure 4 shows the AoR for cube/cuboid shape particles. For AR = 1, as already reported in, increasing blockiness from 4 to 8 contributes to an increase of the AoR of 7. The increase of bumpiness from MS to MS has an insignificant effect, whereas MS, with higher interlocking, provides a larger AoR value. Additionally, varying the aspect ratio from 1 to 3 increases the AoR for all MS and SQ particle types (note that results for MS are only computed for AR = 1 due to the requirement of high computational time). The results also suggest that, compared to the sharp increase for SQ(N4), SQ(N6) and MS, the AoR for particles with the highest bumpiness and blockiness are less affected by the increase of AR. Another important observation in Fig. 4 is that increasing AR (specially for AR > 2 ) the difference for the measured AoR between different particles decreases, compared to the difference at AR = 1. To further investigate the avalanching characteristics of the non-spherical particles, the AoR test has been also carried out considering cylindrical particles with different aspect ratios (Fig. 5). The first set of tests has been conducted considering SQ particles with different blockiness levels. The results show that increasing the N parameter from 4 to 6 contributes to formation of heaps with higher AoR values (at all aspect ratios). However, cylindrical particles with further blockiness (i.e. N = 8 and N = 10 ) do not result in any further significant effect on AoR value (this holds true for all ranges of AR). The second set of simulations, for cylindrical particles, has been done using MS particles with varying number of sub-spheres. These tests are only conducted at AR = 1.5 with particles consisting of 2, 3, 4 and 30 sub-spheres, where the former three types have only bumpiness at the circumference, whereas MS has bumpiness both on its edges (top Fig. 3 Angle of repose for spherical particles with different r values Fig. 4 Angle of repose for cube/cuboid particles and bottom) and on its circumference, see Fig. 1. Results for MS particles suggest that increasing the bumpiness at the circumference (from MS to MS ) has little influence on the AoR. Increased bumpiness at the edges (i.e. MS ) is also required to achieve higher AoR angles. Particles like MS have significantly increased computational cost (both due to increased number of sub-spheres and the need for sub-spheres with smaller radii), whereas changing N has no effect on the computational performance of SQ particles, see. Consequently, the representation of cylinders with MS approach is not extended to other aspect ratios. Simulation of direct shear test This section evaluates the response of granular systems in a shear cell and provides detailed information regarding the influence of different rolling resistance models on initial porosity, shear strength and volume change characteristics of spherical particles. These results are further compared with the response of MS and SQ particles with various shape complexities. The direct shear test (commonly referred as Jenike shear in bulk solid handling problems) is widely used for measuring flow properties of particulate solids,. In this test, the granular material is placed in a split cylindrical box. Then, the material is compressed by applying a constant vertical load v ( 10kPa ) to the lid section (consolidation state). Later, the top half of the cylinder (ring) is sheared at a constant translational velocity ( 2mm∕s ), see Fig. 6. The measured quantity is the force required for this movement that can be converted to average shear stress. The velocity of the lid in LIGGGHTS is controlled by a standard PID controller that compares the current acting force with the predefined target value (in the vertical direction). In EDEM, the position and velocity of the lid are controlled by means of a body-force model written in the API interface of EDEM software. The DEM time-step was chosen as t = 2 10 −6 s (5% of Rayleigh time) in all simulations. Two types of packing were generated to assess the dependence of the results on the density state of the initial packing. In the dense packing, the particle-particle sliding friction s and rolling friction r coefficients were set to zero at the filling stage (thus all simulations were carried out based on a single initial packing). Next, before applying v, s is changed back to 0.56 and r is systematically increased for individual packing ( r = 0.01, 0.1, 0.2, 0.3, 0.5, 0.8 and 1). For these packings, the system is allowed to rest for 0.5 s of simulation time, prior to consolidation. Accordingly, this set of simulations are referred to as equivalent dense initial packing (EDIP), or simply as dense packings. The sample preparation is carried out by air pluviation. Particles are discharged from a funnel from a certain height to achieve the desired void ratio in the system. To have identical density all over the sample, the factory which generates the particles moves upward with a constant speed. It must be noted that the friction coefficient equals zero for nonspherical particles during the filling. A second type of packing was established, with s = 0.56 at all stages of the test. Furthermore, r is applied to the granular assemblies both during filling and shearing (approximating the inclusion of particle shape during the packing). This is done to clarify the importance of the shape parameter (i.e. rolling resistance) in imposing the arrangement of the particles and further evaluate the shearing response of the looser packings (depending on the incorporated value of r ). For all simulations, material properties were kept identical and packings of equivalent bulk volume were generated for all types of particles (for detailed information regarding the packing density of MS and SQ cubes refer to ). Furthermore, Soltanbeigi et al. reported that the shape factor is more influential (on bulk response) in densely packed assemblies, accordingly the cylindrical and cube/ cuboid particles are only simulated in the dense state (i.e. by having zero sliding friction during the filling stage). In the following section (4.1), the effect of including an artificial particle shape parameter on the packing density is evaluated. Successively, the shearing response of the particles is assessed in Sect. 4.3. Initial porosity It is known that applying any type of rolling resistance model affects particle arrangement, and thus the porosity of the granular packing (this is an inherent feature since all models reduce the movement of single particles). Accordingly, the initial porosity ( init ) of the samples was measured before consolidation, by dividing the total volume of the voids over the volume of the shear tester, as an indication of how densely the particles are packed in the system. As mentioned before, the packings are prepared in dense and loose states (by turning on or off s and r ). There are many studies in the literature for determining the packing characteristics of spherical particles with various properties. For the spherical particles (using DEM), Jerier et al. varied the particle radius (ratio of the largest radius to the smallest one is changed between 2 and 7) and determined a solid fraction within 0.58 to 0.75 (corresponding to 0.25 < init < 0.42 ). Aste reported that pouring mono-sized spheres into a container, typically a solid fraction between 0.61 and 0.62 ( init = 0.38 and 0.39) is obtained (depending on the geometry of the container, speed and height of filling). It is mentioned that slightly denser packings (i.e. solid fraction of 0.63) can be obtained by gently tapping the container. Additionally, it is reported that to achieve the random close packing limit (i.e. solid fraction of 0.64), the sample must be simultaneously tapped and compressed. Figure 7 shows porosity for different values of the rolling friction coefficient, for each of the three models. The sliding friction is only changed once, from 0 to 0.56 and then it is kept constant. For dense packings, init is shown as a single point in Fig. 7 ( s = r = 0 ), which has the lowest value as init = 0.377 (this is in line with results from ). Additionally, it is observed that enabling the sliding friction (i.e. s = 0.56 ) affects the init (loosens the packing to init = 0.4 ). Moreover, considering higher r values, further increases the porosity in the granular system (compared to the case with no rolling resistance, the maximum difference is about 20 %). For RF RVD, init increases linearly, while its values are smaller than for the other two models (for the full range of r ). Additionally, for r < 0.2 the RF EPSD model provides the highest init values (i.e. looser packings). For r ≥ 0.2, results of RF CI and RF EPSD are almost comparable (i.e. both models have similar influence on packing, despite their different rotation retardation mechanisms). Overall, all three models are seen to be effective in governing the particle motion and thus influence the particle arrangement. Additionally, it is clear from the comparison of Figs. 7 and 8 that spheres always reveal larger porosities compared to non-spherical particles. Ma et al. simulated a monosize pack of spheres and varied rolling friction between 0 and 0.2. It is shown that the initial porosity is increased as rolling friction approximates the particle shape effect and enhances inter-particle interlocking. Values of init for particles with various shapes are also computed, and summarized in Fig. 8 (results of cubes with AR = 1 have already been discussed in ). For SQ cuboids, it is seen that increasing aspect ratio leads to slightly increased init for SQ(N6) and SQ(N8) with AR = 1.25, while SQ(N4) is independent of the AR value, Fig. 8a. For MS particles, the sharpest increase in init is seen for the MS particle. However, MS shows almost a constant value for init (a slight increase for init is seen while moving from AR = 1 to AR = 1.25 ). Note that, similar to Sect. 3, MS is not simulated for AR > 1. Furthermore, the results for cylindrical particles are plotted in Fig. 8b. A cylindrical particle with N = 2 would represent a sphere if AR = 1, while ellipsoids are formed for AR > 1. It is clearly seen that the initial porosity is affected once the spheres are converted to ellipsoids. In general, it can be suggested that cylinders, at any level of shape complexity, have lower porosity than spheres. The difference in porosity for spheres (with r = 0 and s = 0.56 ) in Figs. 7 and 8b can be justified by the fact that the spheres generated by the superquadric approach are mono-sized (thus have larger init ). Moreover, for SQ(N4), SQ(N6) and SQ(N8) the aspect ratio parameter is not affecting the packing porosity (at AR > 1.5, identical init values are obtained for all N values). Information regarding particle number and porosity is summarized in Table 2. Finally, the packing characteristics of spherical particles (in the presence/absence of rolling resistance models), are compared to those of cuboids and cylinders through assessing Figs. 7 and 8. It can be pointed out that except for MS, which has an extra porosity between adjacent sub-spheres, all cubes/cuboids and cylinders (in dense state) have lower porosities than spheres. Volume change during shearing It is also useful to monitor the vertical displacement of the lid, during the shearing of the granular assemblies, to determine the mode of volume change (i.e. contractive or dilative). For the dense packings, as observed in Fig. 9, for all three rolling friction models contraction of the assemblies is insignificant and dilation is the dominant mode of volume change. The packings with RF RVD experience similar lid displacement and are thus almost independent of the r value (at the shearing stage). For a certain range of rolling friction coefficients (i.e. 0.01 < r < 0.3 ) the packings with RF CI follow a similar trend compared to RF RVD. However, for r > 0.3, the vertical displacement D L decreases slightly (i.e. the system starts to dilate to a lesser extent). It is already seen in Sect. 3 that RF CI can provide comparable AoR to those of non-spherical particles by assigning r < 0.18. Accordingly, it can be suggested that in the case of RF CI, the value of r has to be less than 0.2, to get reasonable results. For RF CI with r > 0.3 sliding starts to happen among most of contacts, and accordingly the packing experiences less dilation. A high value of r or s nullifies the respective degree of freedom, and therefore contributes to occurrence of alternative mode of relative motion. A similar observation is reported by Estrada et al., in which they simulated shearing of a polydisperse system under simple shear conditions and systematically varied sliding and rolling friction coefficients. Their results suggested that when sliding friction is high enough, while r is constant, the dominant mode of motion is contact rolling (the reverse case is also valid, where sliding occurs for major portion of the mobilized contacts). For packings with RF EPSD, it can be seen that increasing rolling resistance has a more significant impact on the increase of the lid's vertical movement (i.e. D L, in this case, can be 2 times larger than that of for RF RVD and RF CI ). For relatively loose packings (with enabled s and r for both filling and shearing), RF RVD shows a contractive Fig. 8 Initial porosity of the packings with a cube/cuboid b cylindrical particles behaviour (i.e. the samples follow the characteristics of a loose assembly) for almost all applied r, see Fig. 10a. It is only the packing with a very small value of rolling friction coefficient (i.e. r = 0.01 ) that undergoes a volume reduction. 9 Vertical displacement of the lid during shearing for dense packings a RF RVD b RF CI c RF EPSD ▸ for the first part of shearing and then starts to present a volume expansion (i.e. behaves approximately similar to a medium dense sample). Consequently, it can be said that although RF RVD contributes to the formation of looser packings, it is unable to provide particles with dilative behaviour during the shearing process once r > 0.01. Moreover, it can be seen that RF CI is approximately following RF RVD (except for higher volume expansion when 0.01 ≤ r ≤ 0.1 ). Meanwhile, packings with RF EPSD provide a different response compared to those of RF RVD and RF CI ; regardless of the initial porosity, all the samples (except r = 0.01 ) present a half-half contractive/dilative behaviour (i.e. until the half of the total shearing distance, samples are compressed and once a threshold for is reached, dilation is initiated), which represents characteristics of a mediumdense sample. Shear strength under direct shear The curves of shear stress as a function of shear displacement (D), for spherical particles, are shown in Figs. 11 and 12. It can be seen that for dense packings, RF RVD has the following characteristics: a) there is a slight increase in maximum shear strength once rolling resistance is considered, but it saturates at r = 0.1 (overall, the maximum shear strength is increased by 15% compared to r = 0 ); b) for the initial stiffness and the residual strength, the effect of rolling resistance is indeed insignificant. Additionally, for r < 0.3, packings with RF CI have a similar shearing response to that of r = 0. However, for larger values of r a lower shear strength is observed. As mentioned earlier, for RF CI with r > 0.3 sliding starts to happen among most of contacts, and accordingly the packing experiences a strength loss. Results for RF EPSD are markedly different to those for RF CI and RF RVD ; increase of r results in significantly higher shear strength for the dense samples and its effect saturates in the range r = 0.5 0.8. Additionally, the largest peak shear strength is almost two times the maximum shear strength for RF CI and RF RVD. For dense packings, therefore, only RF EPSD has a significant influence on the shear strength of the granular assembly, which increases with increasing rolling friction value. Figure 7 shows that rolling resistance contributes to the formation of loose packings. However, it is not clear whether applying rolling resistance for loose packings can influence the shearing response of the granular assemblies. Accordingly, the shearing response of the relatively loose packings is summarized in Fig. 12. Fig. 10 Vertical displacement of the lid during the shearing for loose packings a RF RVD b RF CI c RF EPSD ▸ For both RF RVD and RF CI, increasing r decreases to a large extent both the initial stiffness and the maximum shear stress for the packings; nonetheless, the shear strength at critical state is approximately comparable. This reduction in shear strength can be partially related to lower packing density, however, it seems that these two models fail to calculate appropriate opposing torque once particles are compressed. This hypothesis arises from the dependence of the torque calculation on the normal force magnitude; here, due to the presence of higher normal forces in a shear cell, the calculated torque is over-predicted for these models, which forces the particle to mobilize by sliding. Some kinks are observed for RF CI and RF RVD models, at intermediate shear displacement in Fig. 12. This can be justified by the fact that the volume contraction, happening during the shearing in loose samples, can slightly contribute to an increase in shear strength. A similar behaviour is seen in results provided by Wang and Gutierrez, and similarly reported by Jo et al.. For packings with RF EPSD it is clear that, despite the initially loose packings, the shear strength is increased by increasing the rolling friction coefficient (up to r = 0.5 ). This response is completely different from the observations for RF RVD and RF CI, which makes RF EPSD the only appropriate rolling resistance model for obtaining reasonable direct shear results (for both loose and dense packings). A more detailed comparison is provided in Fig. 13 for the maximum friction angle of all the spherical packings. For dense packing, results from the three models are shown, however, the loose packings are only presented for RF EPSD (since both RF CI and RF RVD fail to influence the shearing response reasonably). It is seen that only RF EPSD, with both loose and dense packing, increases its shear strength with r variation. Results provided in Sects. 4.1, 4.2 and 4.3 give an overall understanding regarding the applicability of the three rolling resistance models to simulate packing, shearing and dilative behaviour of non-spherical particles. It is observed that all three models can affect the density of packing. However, it must be noted that RF CI and RF RVD models are not suitable for simulation of the dense shearing regimes (i.e. direct shear test). This can be justified by the fact that calculated torque in RF CI and RF RVD is a direct function of normal contact force, and no limitation is applied to gauge a maximum torque value. Since in direct shear test, an external vertical force is acting through the lid, a higher normal contact force, and thus a high torque value is foreseen. A high value of r cancels the rotational degree of freedom. Therefore, for both Fig. 11 Shear stress-displacement curves considering various values of r, for dense packings a RF RVD b RF CI c RF EPSD ▸ rolling resistance models sliding starts to happen among most contacts and accordingly the packing experiences a non-physical change in strength and dilation (this is not in agreement with mechanical expectations from shape factor). Conversely, RF EPSD can be applied for estimating shear strength and dilative response of the non-spherical granular assembly. Non-spherical particles Similar to Sect. 3, the effect of aspect ratio on cuboids and cylindrical particles (with various surface and edge properties) is investigated within the shear cell, see Fig. 14. The peak friction angle ( p ) of the packings, which is obtained through dividing the maximum value of normal and shear stresses, is plotted with respect to AR. For SQ cuboids, p increases sharply for SQ(N4) up to AR = 1.5, whereas for SQ(N6) and SQ(N8) the change in p is smaller and limited by AR = 1.25, see Fig. 14a. However, MS cuboids show less dependency on the AR value (only MS shows an increase for AR = 1.25). On the other hand, cylindrical particle with N = 2 and AR = 1 (i.e. spheres) have the lowest p, which is significantly increased at AR = 1.25 (i.e. converting to ellipsoid), see Fig. 14b. For AR > 1.25 results for SQ(N2) and SQ(N4) overlap. Other cylindrical particles with sharper edges only show a small change in p for AR = 1.25 (no changes are seen for AR > 1.25). Discussion In this section results from angle-of-repose and direct-shear tests are compared for spherical and non-spherical particles. Considering AoR results for cuboidal and cylindrical particles with various AR and comparing them with those of spherical particles (accompanied by three rolling resistance models), the following can be pointed out: a) RF RVD and RF EPSD can provide a similar AoR to that of AR = 1 for cubes with 0.2 < r < 0.4 and for cylinders with 0.1 < r < 0.2 (see Fig. 15), b) for AR > 1, to compensate a similar AoR (for both cuboid and cylinders), spherical particles with RF RVD and RF EPSD need to have a maximum value of r = s = 0.56 (it is usually suggested that rolling resistance coefficient must be smaller/equal to sliding friction coefficient) c) for RF CI, it can be seen that assigning 0.08 < r < 0.18 can provide AoR values comparable to all range of AR (for both cubes and cylinders). Consequently, it is clarified in this section that for the angle-of-repose test, the incorporation of rolling resistance models can well mimic the avalanching response of non-spherical particles. Furthermore, the shear strength for cubes/cuboids and cylinders is compared with spherical particles. As already discussed, only RF EPSD provides an approximately monotonic increase for the peak friction angle of spherical assemblies (i.e. with increase of r ). Accordingly, the peak friction angle of the spherical packings with RF EPSD is summarized in Fig. 16. Results in Fig. 16 suggest that dense packings with RF EPSD can be calibrated (by varying r ) to obtain p values similar to that obtained for non-spherical particles. Conclusions The current work compares the avalanching, packing, shearing and dilative response for spherical particles (in presence of three different rolling resistance models) with common non-spherical particles with aspect ratios of one and higher (cylinders and cubes/cuboids). The non-spherical shapes are simulated by multi-sphere (MS) and superquadric (SQ) shape representation methods, each of which has unique shape complexity properties (MS particles have an inherent surface pseudo-bumpiness, whereas SQ approach can well-produce sharp edges). Accordingly, the ability of the artificial shape representation techniques (i.e. rolling resistance models) to simulate a wide range of shape complexity parameters is evaluated. For the AoR test, results suggest that tuning the rolling friction parameter r, as a shape parameter for spheres (considering all three models), can lead to the desired heap characteristics (which is comparable to the results of nonspherical particles with various bumpiness, blockiness and aspect ratios). For the direct shear test, it is seen that including rolling resistance can provide a wide range of initial porosities init. However, it is seen that spherical packings provide always a higher init than cubes and cylinders. Additionally, the capability of the considered rolling resistance models in providing dilative response, as it happens for non-spherical particles during shearing, is evaluated. Results suggest that RF RVD and RF CI are addressing this phenomenon only for dense packing. However, RF EPSD is well capable of providing dilation for the granular assemblies almost for the entire range of packing densities (which is in agreement with results reported in, where it is shown that even loose samples of non-spherical particles tend to dilate). For the shear strength, once r is varied for packings with various init, only RF EPSD provides p that is well matching with those obtained for cubical/cuboidal and cylindrical shape particles. The issue associated with RF CDT and RF CI, in case of dilative response and shear strength, has been explored further. It is proposed that since the calculated torque is dependent on normal force magnitude, which is high in case of shear test, the calculated torque is over-predicted. Restricting rotational freedom of the spheres results in pure sliding of particles (this deficiency is less prominent for dense packings, where due to dense arrangement of particles sliding is happening the least). In summary, the results for RF EPSD suggested that it is possible to calibrate the rolling friction r to obtain the desired individual macro-scale response of non-spherical particles (e.g. angle of repose and shear strength). Meanwhile, results clearly showed the defects of both RF CI for RF RVD models in a dense shearing regime. A future study should consider the influence of polydispersity on bulk response of non-spherical particles, as well as consider a loose initial packing with different rolling friction only during the shearing (similar to that applied to dense packings). Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/. Fig. 15 Graphical description of equivalent r for obtaining similar AoR values with a cubes and cylinders with AR=1 b cuboids and cylinders with AR> 1 Fig. 16 Graphical description of equivalent r for obtaining similar peak friction angle to cuboid and cylinder particles
Do you know what a sunshower is? Chances are you're not from Idaho if you do. If you say "pop" when referring to a sugary can of carbonation, you're more likely to be from Coeur d'Alene than Boise. And when it comes to what Boiseans call a sale of unwanted stuff, it's kind of a toss-up: "garage sale" and "yard sale" are both acceptable terms. This is all according to a dialect map produced by a North Carolina doctoral student. The map allows you to look at certain phrases and words used in the U.S., and see how far these speech patterns stretch. Perhaps not surprisingly, a lot of the West and Midwest pronounces words like "pajamas" the same, while the East and South say it differently. Tim Thornes teaches linguistics at Boise State. He says this mapping project is interesting, because it lets people see how regional dialect patterns play out across the country. Thornes says it’s important to keep doing surveys like this because the way a certain city or region talks changes over time. Thornes says when it comes to studying U.S. dialect variations, most of the diversity is on the East Coast. That’s due to historical European settling patterns. Many of the places that we think have accents were places where white settlers originally set up shop. “Then out West, there hasn’t been time I would say for there to be a lot of diversification," says Thornes. "People are still moving in and out so you still get people from all over the country coming to places like Idaho and influencing the regional dialect patterns.” But Thornes contends that just because much of the West speaks similarly – doesn’t mean that it’s linguistically boring. In Idaho, he points out a divide in the state when it comes to the pronunciation of certain words. How do you say, "realtor"? As it turns out, people buying and selling homes in the Treasure and Magic Valleys are more likely to enlist the help of a “real-tor” – while in Lewiston you’ll probably ask for a “real-uh-tor.” Thornes says syllabic variance is one way language can differ within Idaho. And if you were wondering what a sunshower is: It's what people in the Northeast and Upper Midwest might say when it rains and the sun is shining.
<reponame>rambo/arDuBUS #ifndef ardubus_aircore_h #define ardubus_aircore_h #include <Arduino.h> #include <i2c_device.h> // Enumerate the aircore pins from the preprocessor const byte ardubus_aircore_boards[] = ARDUBUS_AIRCORE_BOARDS; // Declare a Servo object for each i2c_device ardubus_aircores[sizeof(ardubus_aircore_boards)]; inline void ardubus_aircore_setup() { I2c.begin(); for (byte i=0; i < sizeof(ardubus_aircore_boards); i++) { ardubus_aircores[i].begin(ardubus_aircore_boards[i], false); } } inline void ardubus_aircore_update() { // This is a no-op (but defined so that all submodules have same API) } inline void ardubus_aircore_report() { // TODO: Do we want reports of led states ? } inline void ardubus_aircore_process_command(char *incoming_command) { switch(incoming_command[0]) { case 0x41: // ASCII "A" (A<indexbyte><motorbyte><value>) //Note that the indexbyte is index of the aircores-array, not pin number, ledbyte is the number of the led on the board bool status = ardubus_aircores[incoming_command[1]-ARDUBUS_INDEX_OFFSET].write(incoming_command[2]-ARDUBUS_INDEX_OFFSET, incoming_command[3]); Serial.print(F("A")); Serial.print(incoming_command[1]); Serial.print(incoming_command[2]); Serial.print(incoming_command[3]); if (!status) { return ardubus_nack(); } return ardubus_ack(); break; } } #endif // *********** END OF CODE **********
package com.javapatterns.observerawt.mouse3; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; public class ConcreteListener extends MouseAdapter { ConcreteListener() { } public void mouseClicked(MouseEvent e) { System.out.println(e.getWhen()); } }
The stock market can seem unpredictable — there are a thousand details to think about and remember, and there's no shortage of anecdotal stories of massive loss and lucky wins from friends, family and co-workers. Your best bet? Becoming an informed investor. Part of being informed is understanding where your assets are held, diversifying your portfolio to minimize risk and investing across asset classes and types. In other words, get familiar with portfolio allocation and what kind of arrangement of assets works best for you and your goals. Portfolio allocation is an investment strategy that aims to balance risk and reward. Allocation aligns assets according to your goals, risk tolerance and time frame. There are three main asset classes — stocks, bonds or cash — and they all have different levels of risk and return. That means each one will behave differently, based on different factors, and perform in a particular way that's unique compared to the other two types of assets you hold. You can find additional subclasses of assets within these three main types. These include assets like small-cap stocks, corporate bonds and money market funds. Allocation is the specific mix of asset classes you hold in your portfolio. And your specific portfolio allocation won't look exactly like someone else's. It gives you a group of investments tailored to you. Diversification means spreading your investments across different asset classes, industries and risk levels to ensure that your money is as protected from risk as possible. For example, your portfolio shouldn't be 100 percent technology. You probably don't want to hold 85 percent bonds, either. Both of those examples are too focused on one area. If one of those asset classes suffers, your whole portfolio tanks with it. Allocating your portfolio will depend on your age, your comfort with risk and your goals. A 60-year-old and a 20-year-old will have very different-looking portfolios because their needs and timelines are far apart. • What you plan to do with the money that you invest. • When you plan to use that money. • How much risk you want to take with investments. Let's say you are 30 and your portfolio is dedicated solely to retirement. The average age of retirement in the U.S. as of 2016 is 63. That means you have 33 years of investing ahead of you. Traditional investing advice is to be more aggressive when you're younger. As a 30-year-old focused on retirement, your portfolio should be weighted toward stocks (or exchange-traded funds and mutual funds composed of stocks). You have a long-range timeline, so stocks give you the best chance of growth while you are young. In this situation, an aggressive investment portfolio would be 80 to 100 percent stocks; a moderate-risk portfolio would be made up of 45 to 79 percent stocks. And a conservative portfolio would be 20 to 44 percent stocks. By keeping your portfolio allocated toward diversity in asset classes, aligned with your goals, and in step with your age, you create a solid investment base for yourself. Charlie Shipman, managing principal at Blue Keel Financial Planning in Weston, Conn., wrote this for NerdWallet, a personal finance website.
Anhedonia and activity deficits in rats: impact of post-stroke depression Abstract Animal models may allow investigation into the aetiology and treatment of various human disorders. In the present study, a rat model for post-stroke depression (PSD) has been developed using middle cerebral artery occlusion (MCAO), followed by an 18-day chronic mild stress (CMS) paradigm in conjuncture with isolation rearing. The open-field test (OFT) and the sucrose consumption test were used to assess depression-like behaviour and the effects of the antidepressant citalopram. CMS induced behavioural changes in the ischemic animals, including decreased locomotor and rearing activity and reduced sucrose preference (compared with baseline, control and stroke groups respectively), all these behaviours were reversed by chronic administration of citalopram. During the recovery period for the PSD models, the open-field activity and preference for sweet sucrose solution decreased continually, opposed to rats subjected to stress only. Decreased locomotor and rearing represents activity deficits, whereas reduced sucrose preference may indicate desensitisation of the brain reward mechanism (anhedonia). Our findings suggest that anhedonia, one of the core symptoms in patients with PSD, and activity deficits can be found in the MCAO+CMS group of animals. Furthermore, citalopram can ameliorate the behavioural abnormalities observed in these animals. With high validity, good operability and repeatability, our findings suggest that the ischemic rat CMS model is an appropriate model for further PSD research.
Effect of Adipose-Derived Mesenchymal Stem Cells (ADMSCs) Application in Achilles-Tendon Injury in an Animal Model Background: Achilles-tendon rupture prevails as a common tendon pathology. Adipose-derived mesenchymal stem cells (ADMSCs) are multipotent stem cells derived from adipose tissue with attractive regeneration properties; thus, their application in tendinopathies could be beneficial. Methods: Male rabbit ADMSCs were obtained from the falciform ligament according to previously established methods. After tenotomy and suture of the Achilles tendon, 1 106 flow-cytometry-characterized male ADMSCs were injected in four female New Zealand white rabbits in the experimental group (ADMSC group), whereas four rabbits were left untreated (lesion group). Confirmation of ADMSC presence in the injured site after 12 weeks was performed with quantitative sex-determining region Y (SRY)-gene RT-PCR. At Week 12, histochemical analysis was performed to evaluate tissue regeneration along with quantitative RT-PCR of collagen I and collagen III mRNA. Results: Presence of male ADMSCs was confirmed at Week 12. No statistically significant differences were found in the histochemical analysis; however, statistically significant differences between ADMSC and lesion group expression of collagen I and collagen III were evidenced, with 36.6% and 24.1% GAPDH-normalized mean expression, respectively, for collagen I (p < 0.05) and 26.3% and 11.9% GAPDH-normalized mean expression, respectively, for collagen III (p < 0.05). The expression ratio between the ADMSC and lesion group was 1.5 and 2.2 for collagen I and collagen III, respectively. Conclusion: Our results make an important contribution to the understanding and effect of ADMSCs in Achilles-tendon rupture. Introduction Anatomically and functionally, the Achilles tendon, also called the calcaneal tendon, is the thickest and largest in the human body. This tendon is involved in the movement of three joints, namely knee flexion, plantar flexion, and hindfoot inversion. The primary function of the Achilles tendon is to serve as an attachment structure between bones and muscles, and due to its anatomy and location between the calcaneus and calf muscles in the lower extremity, the tendon must be capable of withstanding high stretch tension caused by the traction of the muscles on the heel. To fulfill this function, at the cellular and molecular level, tenocytes have motor proteins such as actin and myosin, which allow the tendon tissue to have properties of motor transmissibility, as well as resistance to high tensile forces. It is estimated that the tendons have the capacity to stretch up to 4% of their length of the Autonomous University of Nuevo Len with the registration number OR14-001. Throughout the trial, it was ensured that the rabbits could move freely within the cage. They were kept on food and clean water. In order to perform the tenotomies, all rabbits were administered analgesia and antibiotic therapy. Sacrifice was performed by sedation in accordance with the Official Mexican regulation NOM-062-ZOO-1999 (Technical Specifications for the Production, Care, and Use of Laboratory Animals). Group Description In the present study, we used twelve healthy adult rabbits of three months of age and 2.5 kg on average, four of which were males and eight were females. Animal models were divided into three groups. ADMSC group-Cell treatment. Four female New Zealand white rabbits underwent percutaneous Achilles-tendon tenotomy with fixation at both ends; 1 10 6 cells were applied in the injured area. Lesion group-Injured control. Four female New Zealand white rabbits underwent percutaneous Achilles-tendon tenotomy with fixation at both ends and no treatment. Healthy group-Four male New Zealand white rabbits without any intervention. Male rabbits of this group were also adipose tissue donors. Extraction of ADMSC from Donor Rabbits, Cell Culture, and Flow Cytometry Characterization The adipose tissue samples obtained from the liver falciform ligament of male New Zealand white rabbits were processed in a class II laminar flow hood (SterilGARD ® III Advance. THE BAKER COMPANY, Gatehouse Road. Sanford, FL, USA). The adipose tissue was placed in a sterile 50 mL Falcon tube and washed with PBS buffer supplemented with gentamicin in order to remove as much blood and stromal tissue as possible. The adipose tissue was placed in a flask with a magnetic stirrer inside and was resuspended in 20 mL of collagenase type I (GIBCO-BRL LIFE TECHNOLOGIES, Grand Island, NY, USA) at 0.1% for digestion of the stromal matrix. At the end of the enzymatic digestion time, 2 volumes of PBS were added in order to form two phases with the adipose tissue at the top and cells at the bottom. The lower phase was recovered and the washing process with PBS was repeated on two more occasions to recover as many cells as possible. The cells were cultured for two weeks in DMEM supplemented with 10% FBS in order to obtain enough cells to cover the dosage needs for the ADMSC group. For flow cytometry analysis, an average of 3 10 6 cells were used, which were resuspended in 50 L of staining buffer (SB, Becton Dickinson Pharmingen). 10 L of each antibody was added at a 1:10 dilution and incubated for 20 min (Table 1). Samples were washed with 1 mL of 1 PBS and centrifuged at 2000 rpm for 10 min at 4 C. The stained cells from each tube were resuspended in 250 L of 1 PBS and passed through the flow cytometer (BD LSRFortessa TM, Franklin Lakes, NJ, USA). Percutaneous Tenotomy New Zealand white female rabbits were intramuscularly anesthetized with Acepromazine (0.5 mg/kg), Ketamine (50 mg/kg), and Xylazine (5 mg/kg) in order to perform the percutaneous tenotomy. Vital signs were monitored during the procedure. Subsequently, a catheter was placed in the marginal vein to supply tramadol (5 mg/kg) and to maintain sedation if necessary. Both groups underwent asepsis of both legs in the area of the Achilles tendon, and percutaneous tenotomy was performed with a #15 scalpel blade making a 3 mm incision, taking the rabbit's ankle in maximum dorsiflexion until the rupture of the Achilles tendon was felt. This procedure was performed bilaterally and both ends were sutured with Vicryl 3-0 to prevent the retraction of both ends of the tendon. Finally, the wound was sutured with 3-0 nylon. ADMSC Administration In order to obtain a suspension of ADMSCs, cell cultures were incubated with Trypsin/EDTA 0.25% for 5 min. Then, 1 PBS washings were performed, and cells were counted to obtain 1 10 6 prior to 10 min centrifugation at 1500 rpm. Cells were resuspended in 250 L of PBS. The 250 L solution of ADMSCs was injected into the ADMSC group directly in the lesion area. The rabbits were maintained with food and water ad libitum until reaching 12 weeks after cell treatment, established as the sacrifice moment. Histopathological Analysis The tissue changes were evaluated at Week 12 post-cell administration. Masson's trichrome and H&E staining were performed to identify the organization of collagen fibers. The Grande Histological Biomechanical Correlation Score (GHBCS), described by Andrew et al., was employed in order to compare histological results in surgically repaired tendon, rating collagen orientation, angiogenesis, and induction for cartilage formation. The analysis was carried out with three blinded pathologist observers, who graded the tissue under observation corresponding to the groups previously described. Molecular Analysis DNA extraction was performed from biopsies taken from both groups at the injured area using Triton X-100 2%, SDS 1%, NaCl, 100 mM, Tris HCI 10 mM pH 8, and EDTA 1 mM pH 8. To locate the cells of the male rabbits (donors), an endpoint PCR was performed using markers previously reported in the gene bank to identify the sex-determining region Y (SRY) gene (Accession Number; AY785433), with the following primer sequences; Forward: AGC GGC CAG GAA CGG GTC AAG, Reverse: CCT TCC GGC GAG GTC TGT ACT TG). GAPDH was used as an endogenous gene control (Accession Number: L23961) with the following primer sequences; Forward: TGA ACG GAT TTG GCC GCA TTG, Reverse: ATG CCG AAG TGG TCG TGG ATG). PCR conditions were the following: 98 C for 30 s, TTG CAC ATT TTA TAT GTG TTC CTT TTG TTC TAA TCT TGT C). GAPDH quantification was performed with the following primer sequences; Forward: TGC ACC ACC ACC AAC TGC TTA G, Reverse: GGT CTT CTG GGT GGC AGT GTG A, TaqMan Probe: TCA TCC ACG ACC ACT TCG GCA TTG T and used as a housekeeping gene. Expression levels were normalized to GAPDH using the delta-delta Ct method. We used the formula 2 −∆Ct to obtain normalized fold gene expression values relative to GAPDH for each of the four evaluated animals per group. Then, the mean of this relative fold gene expression value for each group was obtained and expressed as a percentage relative to the housekeeping gene. Finally, the expression ratio between the experimental (ADMSC) and control (Lesion) groups (2 −∆∆Ct ) was calculated. Statistical Analysis The Mann-Whitney U test was used to compare two independent samples. The results were considered statistically significant if p < 0.05 was reached. Mean, interquartile range (IQR), and standard error of the mean (SEM) were carried out with the SPSSV24 package along with the aforementioned Mann-Whitney U test. Results In order to evaluate the efficacy of ADMSCs to accelerate tendon tissue repair, 1 10 6 male flow-cytometry-characterized ADMSCs obtained from the liver falciform ligament were injected into female rabbits directly in the lesion (ADMSC group) and compared to the untreated group (lesion group) 12 weeks later via molecular and histological assays. A basic scheme of the experiments is depicted in Figure 1. alytik Jena, Upland, CA, USA) camera. In order to quantify the expression of collagens I and III, an RT-qPCR was performed using mRNA obtained with TRIzol reagent from the isolated cells using primer sets D49399 (Forward: TTC TGC AGG GCT CCA ATG A, Reverse: TCG ACA AGA ACA GTG TAA GTG AAC CT, TaqMan probe: TTG AAC TTG TTG CCG AGG GCA ACA G) for collagen I and S83371 for collagen III (Forward: CCT GAA GCC CCA GCA GAA, Reverse: AAC AGA AAT TTA GTT GGT CAC TTG TAC TG, TaqMan probe: TTG CAC ATT TTA TAT GTG TTC CTT TTG TTC TAA TCT TGT C). GAPDH quantification was performed with the following primer sequences; Forward: TGC ACC ACC ACC AAC TGC TTA G, Reverse: GGT CTT CTG GGT GGC AGT GTG A, TaqMan Probe: TCA TCC ACG ACC ACT TCG GCA TTG T and used as a housekeeping gene. Expression levels were normalized to GAPDH using the delta-delta Ct method. We used the formula 2^-(Ct) to obtain normalized fold gene expression values relative to GAPDH for each of the four evaluated animals per group. Then, the mean of this relative fold gene expression value for each group was obtained and expressed as a percentage relative to the housekeeping gene. Finally, the expression ratio between the experimental (ADMSC) and control (Lesion) groups (2^-(Ct)) was calculated. Statistical Analysis The Mann-Whitney U test was used to compare two independent samples. The results were considered statistically significant if p < 0.05 was reached. Mean, interquartile range (IQR), and standard error of the mean (SEM) were carried out with the SPSSV24 package along with the aforementioned Mann-Whitney U test. Results In order to evaluate the efficacy of ADMSCs to accelerate tendon tissue repair, 1 10 6 male flow-cytometry-characterized ADMSCs obtained from the liver falciform ligament were injected into female rabbits directly in the lesion (ADMSC group) and compared to the untreated group (lesion group) 12 weeks later via molecular and histological assays. A basic scheme of the experiments is depicted in Figure 1. Eight female New Zealand white rabbits in which tenotomy was performed, were divided into two groups (four animals per group). The ADMSC group received male ADMSCs after tenotomy, whereas the lesion group remained untreated (no intervention). At Week Figure 1. Workflow scheme. Eight female New Zealand white rabbits in which tenotomy was performed, were divided into two groups (four animals per group). The ADMSC group received male ADMSCs after tenotomy, whereas the lesion group remained untreated (no intervention). At Week 12, tissue biopsies of both groups were taken in order to perform histological and molecular analysis. An additional healthy group of four male rabbits was simultaneously analyzed as a control. Flow Cytometry Analysis Prior to administration into the ADMSC group, characterization of the falciform ligament-obtained cells was performed with flow cytometry. Immunophenotyping of the ADMSC group revealed no surface markers associated with hematopoietic cells (CD34 and CD14), making possible the distinction of cells with characteristics of a mesenchymal origin, as revealed by the CD73+, CD44+, and CD105+ markers previously accepted by the International Society for Cellular Therapy (ISCT) and found in the cells subjected to study ( Figure 2). Flow Cytometry Analysis Prior to administration into the ADMSC group, characterization of the falciform ligament-obtained cells was performed with flow cytometry. Immunophenotyping of the ADMSC group revealed no surface markers associated with hematopoietic cells (CD34 and CD14), making possible the distinction of cells with characteristics of a mesenchymal origin, as revealed by the CD73+, CD44+, and CD105+ markers previously accepted by the International Society for Cellular Therapy (ISCT) and found in the cells subjected to study ( Figure 2). Figure 2. Flow cytometry analysis. Adherent cells that showed MSC morphology were characterized using specific markers for stem cells according to the International Society for Cellular Therapy (ISCT). Negative controls of each antibody's own isotype were included to rule out nonspecific signals and unlabeled cells (dotted line curves). CD73, CD44, and CD105 stained datasets were found positive after overlay, whereas CD34 and CD14 stained datasets were negative, thus discarding a hematopoietic origin of the sampled cells and suggesting an MSC phenotype. Molecular Analysis To better differentiate between self or implanted ADMSCs, male ADMSCs were detected among host female cells via the SRY gene detection, located in the Y chromosome. PCR was performed in both ADMSC and lesion groups with the aim of detecting the aforementioned SRY gene. The SRY gene was identified in the tissue obtained from three out of four sacrificed rabbits in the ADMSC group but was undetected in any of the members of the lesion group, indicating that the ADMSCs migrated and remain viable at the site of injury at Week 12 post-cell administration (Figure 3). Figure 2. Flow cytometry analysis. Adherent cells that showed MSC morphology were characterized using specific markers for stem cells according to the International Society for Cellular Therapy (ISCT). Negative controls of each antibody's own isotype were included to rule out nonspecific signals and unlabeled cells (dotted line curves). CD73, CD44, and CD105 stained datasets were found positive after overlay, whereas CD34 and CD14 stained datasets were negative, thus discarding a hematopoietic origin of the sampled cells and suggesting an MSC phenotype. Molecular Analysis To better differentiate between self or implanted ADMSCs, male ADMSCs were detected among host female cells via the SRY gene detection, located in the Y chromosome. PCR was performed in both ADMSC and lesion groups with the aim of detecting the aforementioned SRY gene. The SRY gene was identified in the tissue obtained from three out of four sacrificed rabbits in the ADMSC group but was undetected in any of the members of the lesion group, indicating that the ADMSCs migrated and remain viable at the site of injury at Week 12 post-cell administration (Figure 3). Quantitative RT-PCR was performed in all the animal models tested for SRY gene presence in order to evaluate the expression of collagens, which are reliable markers of repair activity. The expression levels were normalized to GAPDH expression and reported as mean fold gene expression percentages relative to this housekeeping gene, called mean expression levels hereinafter in the text (Tables 2 and 3). The mean expression levels for collagen I in the ADMSC and lesion groups were 36.6% and 24.1%, respectively. This indicates that the cells derived from adipose tissue were able to stimulate a greater expression of type I collagen, which is critical in the structure of the Achilles tendon ( Figure 4). Quantitative RT-PCR was performed in all the animal models tested for SRY gene presence in order to evaluate the expression of collagens, which are reliable markers of repair activity. The expression levels were normalized to GAPDH expression and reported as mean fold gene expression percentages relative to this housekeeping gene, called mean expression levels hereinafter in the text (Tables 2 and 3). The mean expression levels for collagen I in the ADMSC and lesion groups were 36.6% and 24.1%, respectively. This indicates that the cells derived from adipose tissue were able to stimulate a greater expression of type I collagen, which is critical in the structure of the Achilles tendon (Figure 4). On the other hand, the mean expression levels for collagen III in the ADM lesion groups were 26.3% and 11.9%, respectively. This indicates that the applie On the other hand, the mean expression levels for collagen III in the ADMSC and lesion groups were 26.3% and 11.9%, respectively. This indicates that the applied cells were able to stimulate a higher formation of type III collagen, which directly influences the arrangement of type I collagen fibers, thus not correlating with the histopathological observations ( Figure 5). The expression ratio between the ADMSC group and the lesion group was 1.5 and 2.2 for collagen I and collagen III, respectively ( Table 4). Ratios of collagen III/collagen I mean expression reported as a parameter in some studies were 0.7 for the ADMSC group and 0.5 for the lesion group. lesion groups determined by quantitative RT-PCR. Standard error of the mean (SE picted. * p < 0.05. On the other hand, the mean expression levels for collagen III in the lesion groups were 26.3% and 11.9%, respectively. This indicates that the were able to stimulate a higher formation of type III collagen, which direct the arrangement of type I collagen fibers, thus not correlating with the histo observations ( Figure 5). The expression ratio between the ADMSC group a group was 1.5 and 2.2 for collagen I and collagen III, respectively (Table 4). lagen III/collagen I mean expression reported as a parameter in some studies for the ADMSC group and 0.5 for the lesion group. Histological Analysis Once we observed differences in collagen expression between the ADMS groups, we proceeded to identify any differences at the tissue level histologi After Masson's trichrome and H&E staining, the results of the histopath ysis graded by the GHBCS indicated no statistically significant change Histological Analysis Once we observed differences in collagen expression between the ADMSC and lesion groups, we proceeded to identify any differences at the tissue level histologically. After Masson's trichrome and H&E staining, the results of the histopathological analysis graded by the GHBCS indicated no statistically significant changes in collagen fiber orientation or angiogenesis in the ADMSC group compared to the lesion group. No cartilage formation was detected in any of the studied groups ( Figure 6) ( Table 5). fiber orientation or angiogenesis in the ADMSC group compared to the lesion group. No cartilage formation was detected in any of the studied groups ( Figure 6) ( Table 5). Discussion Acute Achilles-tendon injuries are relatively common and present a slow, complex, and inefficient natural repair process due to their intrinsic low cellularity and low vascularity. This represents a clinical challenge for orthopedists looking for the best treatment option. The most frequent causes of tendon injuries are mainly associated with the practice of sports, aging, tendinopathies, hypothyroidism, hypertension, diabetes mellitus, arthropathies, corticosteroids, and vitamin C deficiency, among other causes. Biological approaches using mesenchymal stem cells, such as those derived from adipose tissue, pose a potential treatment option. Although there is currently little evidence for their clinical therapeutic use, it is thought that the efficacy of ADMSCs in regenerative medicine may be due to the release of growth factors and cytokines, as well as their immunomodulatory effects via extracellular vesicles (EVs) to promote certain cellular events associated with tissue repair. Moreover, there are only a few studies using animal models to determine whether ADMSCs injected in situ are capable of improving histological signs of tendon healing. Discussion Acute Achilles-tendon injuries are relatively common and present a slow, complex, and inefficient natural repair process due to their intrinsic low cellularity and low vascularity. This represents a clinical challenge for orthopedists looking for the best treatment option. The most frequent causes of tendon injuries are mainly associated with the practice of sports, aging, tendinopathies, hypothyroidism, hypertension, diabetes mellitus, arthropathies, corticosteroids, and vitamin C deficiency, among other causes. Biological approaches using mesenchymal stem cells, such as those derived from adipose tissue, pose a potential treatment option. Although there is currently little evidence for their clinical therapeutic use, it is thought that the efficacy of ADMSCs in regenerative medicine may be due to the release of growth factors and cytokines, as well as their immunomodulatory effects via extracellular vesicles (EVs) to promote certain cellular events associated with tissue repair. Moreover, there are only a few studies using animal models to determine whether ADMSCs injected in situ are capable of improving histological signs of tendon healing. In our study, using an animal model of a larger evolutionary scale, saline solution as a means of cell transport, and the SRY gene to track male rabbit ADMSCs directly administered in the lesion of female rabbits, we observed the presence of the stem cells at Week 12 post-treatment in three out of four treated rabbits in the ADMSC group, both with no presence in the lesion group. The reason for the absence of ADMSCs at Week 12 in a unique animal model in the ADMSC group is unknown; however, it could be speculated that a low level of cell homing or permanence could cause this result. Interestingly, this apparent SRY-negative animal model was positive for an increment in both collagen I and collagen III, similar to the rest of the animal models in the same group. This particular observation could suggest a future experiment to interrogate the possibility of tissue healing or at least augmented collagen expression in late stages of repair in the absence of ADMSCs via prolonged induction or host stem cells recruiting without the permanence of the originally implanted ADMSCs. In addition, no significant histopathological changes in collagen formation were observed in the group that received ADMSCs compared to the untreated group at Week 12 post-administration. Indeed, the absence of significant histological changes, including increases in collagen fibers, has previously been suggested despite mechanical improvement of Achilles-tendon injuries 3 weeks after administration of hydrogel-containing ADMSCs in rats. These findings, when contrasting with ours, could indicate that the histological findings are present after 12 weeks post-treatment or that the histological analysis is not a useful parameter to measure the functional improvement of the tissue in this particular case. Another study reported an improvement in the organization of collagen fibers and morphometric nuclear parameters at Week 3 post-treatment, but did not find statistically significant differences with the control at Weeks 6 and 12 in the same model used in the present study, which seems to consolidate our results at Week 12 while contrasting with the research that establishes an improvement at Week 3 as previously mentioned. The discrepancies reported here appear to be largely due to differences in the vehicle used, the technique by which the tendon was damaged, the number of cells administered, and the animal model used. The mean expression level for collagen I in the group of animals that received treatment with ADMSCs was 36.6%, in contrast with the 24.1% of the lesion group. Moreover, the expression ratio between these groups was 1.5 for collagen I. This indicates that the cells derived from adipose tissue were able to stimulate a greater expression of type I collagen, which is an important component of the Achilles-tendon structure. Mean expression level for collagen III in the group of animals that were treated with ADMSCs was 26.3%. On the other hand, the lesion group achieved 11.9% of mean collagen III expression level. The expression ratio between these groups was 2.2 for collagen III. This indicates that the applied cells were able to stimulate a higher formation of type III collagen, which directly influences the arrangement of type I collagen fibers. Several histologic phases of tendon repair have been previously suggested. These findings establish that during Weeks 12 to 14, the repair continues with a return to the normal concentration and proportion of collagens, with predominance mainly of type I collagen. This observation could indicate that a greater expression of collagen I and III could be expected in times shorter than 12 weeks, as observed in the present study. Likewise, in the present work, using the SRY gene as a method of identification of ADMSCs, we were able to determine the presence of the cells applied in the area of the lesion at Week 12, which is consistent with previous studies that show the presence of the cells in that temporality by microscopy, which complements our findings. Moreover, several groups also evaluate the effects of ADMSCs with collagens expression ratios. In a recent study, ADMSCs were assayed in a collagenase-induced rat model of tendinopathy. In this study, using quantitative RT-PCR to measure the ratio of expression of collagens in injured tendons, the ratio of type III collagen to type I collagen (collagen III/collagen I) was found to be significantly lower in the ADMSC group than in the lesion group at Week 12. Furthermore, this proportion decreased over time in the treated group with ADMSCs, while it increased over time in the lesion group. This result contrasts with ours in which the inverse was observed. It could be possible that the evaluation of this ratio is not a useful parameter or simply does not correlate with the tissue repair status. Instead, according to what was seen in our work, we suggest that the augment of both types of collagens represents a better parameter of tendon healing; however, this suggestion remains to be confirmed. Moreover, as previously mentioned, most of the discrepancies could be at least partially due to the different animal models employed in different studies. Nevertheless, since we employed an animal model, which is of a higher evolutionary scale than rats and with a greater demand in the biomechanics of its Achilles tendon that could better resemble human tendinous tissue, we believe that our results represent a valuable observation to stem cell therapy applied to human patients. However, limitations in the current study such as small sample size and absence of analyses of other important markers such as scleraxis and tenomodulin can be covered in the future to support our findings. Conclusions The findings of the present study suggest that the application of ADMSCs in Achillestendon injuries may favor structural repair by augmenting the expression of collagen I and III genes even though structural changes were not observed as in previous work of several research groups. It requires longer observation times to determine the completeness or extension of tissue repair, as well as studies that analyze the stress modulus in order to estimate if the pathological findings are consistent with resistance to biomechanics in the animal model employed. Patents A patent was not generated from this research work.
/* * Wi-Fi Direct - P2P module * Copyright (c) 2009-2010, Atheros Communications * * This software may be distributed under the terms of the BSD license. * See README for more details. */ #ifndef P2P_H #define P2P_H /** * P2P_MAX_REG_CLASSES - Maximum number of regulatory classes */ #define P2P_MAX_REG_CLASSES 10 /** * P2P_MAX_REG_CLASS_CHANNELS - Maximum number of channels per regulatory class */ #define P2P_MAX_REG_CLASS_CHANNELS 20 /** * struct p2p_channels - List of supported channels */ struct p2p_channels { /** * struct p2p_reg_class - Supported regulatory class */ struct p2p_reg_class { /** * reg_class - Regulatory class (IEEE 802.11-2007, Annex J) */ u8 reg_class; /** * channel - Supported channels */ u8 channel[P2P_MAX_REG_CLASS_CHANNELS]; /** * channels - Number of channel entries in use */ size_t channels; } reg_class[P2P_MAX_REG_CLASSES]; /** * reg_classes - Number of reg_class entries in use */ size_t reg_classes; }; enum p2p_wps_method { WPS_NOT_READY, WPS_PIN_DISPLAY, WPS_PIN_KEYPAD, WPS_PBC }; /** * struct p2p_go_neg_results - P2P Group Owner Negotiation results */ struct p2p_go_neg_results { /** * status - Negotiation result (Status Code) * * 0 (P2P_SC_SUCCESS) indicates success. Non-zero values indicate * failed negotiation. */ int status; /** * role_go - Whether local end is Group Owner */ int role_go; /** * freq - Frequency of the group operational channel in MHz */ int freq; int ht40; /** * ssid - SSID of the group */ u8 ssid[32]; /** * ssid_len - Length of SSID in octets */ size_t ssid_len; /** * passphrase - WPA2-Personal passphrase for the group (GO only) */ char passphrase[64]; /** * peer_device_addr - P2P Device Address of the peer */ u8 peer_device_addr[ETH_ALEN]; /** * peer_interface_addr - P2P Interface Address of the peer */ u8 peer_interface_addr[ETH_ALEN]; /** * wps_method - WPS method to be used during provisioning */ enum p2p_wps_method wps_method; #define P2P_MAX_CHANNELS 50 /** * freq_list - Zero-terminated list of possible operational channels */ int freq_list[P2P_MAX_CHANNELS]; /** * persistent_group - Whether the group should be made persistent * 0 = not persistent * 1 = persistent group without persistent reconnect * 2 = persistent group with persistent reconnect */ int persistent_group; /** * peer_config_timeout - Peer configuration timeout (in 10 msec units) */ unsigned int peer_config_timeout; }; struct p2p_data; enum p2p_scan_type { P2P_SCAN_SOCIAL, P2P_SCAN_FULL, P2P_SCAN_SOCIAL_PLUS_ONE }; #define P2P_MAX_WPS_VENDOR_EXT 10 /** * struct p2p_peer_info - P2P peer information */ struct p2p_peer_info { /** * p2p_device_addr - P2P Device Address of the peer */ u8 p2p_device_addr[ETH_ALEN]; /** * pri_dev_type - Primary Device Type */ u8 pri_dev_type[8]; /** * device_name - Device Name (0..32 octets encoded in UTF-8) */ char device_name[33]; /** * manufacturer - Manufacturer (0..64 octets encoded in UTF-8) */ char manufacturer[65]; /** * model_name - Model Name (0..32 octets encoded in UTF-8) */ char model_name[33]; /** * model_number - Model Number (0..32 octets encoded in UTF-8) */ char model_number[33]; /** * serial_number - Serial Number (0..32 octets encoded in UTF-8) */ char serial_number[33]; /** * level - Signal level */ int level; /** * config_methods - WPS Configuration Methods */ u16 config_methods; /** * dev_capab - Device Capabilities */ u8 dev_capab; /** * group_capab - Group Capabilities */ u8 group_capab; /** * wps_sec_dev_type_list - WPS secondary device type list * * This list includes from 0 to 16 Secondary Device Types as indicated * by wps_sec_dev_type_list_len (8 * number of types). */ u8 wps_sec_dev_type_list[128]; /** * wps_sec_dev_type_list_len - Length of secondary device type list */ size_t wps_sec_dev_type_list_len; struct wpabuf *wps_vendor_ext[P2P_MAX_WPS_VENDOR_EXT]; /** * wfd_subelems - Wi-Fi Display subelements from WFD IE(s) */ struct wpabuf *wfd_subelems; }; enum p2p_prov_disc_status { P2P_PROV_DISC_SUCCESS, P2P_PROV_DISC_TIMEOUT, P2P_PROV_DISC_REJECTED, }; struct p2p_channel { u8 op_class; u8 chan; }; /** * struct p2p_config - P2P configuration * * This configuration is provided to the P2P module during initialization with * p2p_init(). */ struct p2p_config { /** * country - Country code to use in P2P operations */ char country[3]; /** * reg_class - Regulatory class for own listen channel */ u8 reg_class; /** * channel - Own listen channel */ u8 channel; /** * Regulatory class for own operational channel */ u8 op_reg_class; /** * op_channel - Own operational channel */ u8 op_channel; /** * cfg_op_channel - Whether op_channel is hardcoded in configuration */ u8 cfg_op_channel; /** * channels - Own supported regulatory classes and channels * * List of supposerted channels per regulatory class. The regulatory * classes are defined in IEEE Std 802.11-2007 Annex J and the * numbering of the clases depends on the configured country code. */ struct p2p_channels channels; /** * num_pref_chan - Number of pref_chan entries */ unsigned int num_pref_chan; /** * pref_chan - Preferred channels for GO Negotiation */ struct p2p_channel *pref_chan; /** * pri_dev_type - Primary Device Type (see WPS) */ u8 pri_dev_type[8]; /** * P2P_SEC_DEVICE_TYPES - Maximum number of secondary device types */ #define P2P_SEC_DEVICE_TYPES 5 /** * sec_dev_type - Optional secondary device types */ u8 sec_dev_type[P2P_SEC_DEVICE_TYPES][8]; /** * num_sec_dev_types - Number of sec_dev_type entries */ size_t num_sec_dev_types; /** * dev_addr - P2P Device Address */ u8 dev_addr[ETH_ALEN]; /** * dev_name - Device Name */ char *dev_name; char *manufacturer; char *model_name; char *model_number; char *serial_number; u8 uuid[16]; u16 config_methods; /** * concurrent_operations - Whether concurrent operations are supported */ int concurrent_operations; /** * max_peers - Maximum number of discovered peers to remember * * If more peers are discovered, older entries will be removed to make * room for the new ones. */ size_t max_peers; /** * p2p_intra_bss - Intra BSS communication is supported */ int p2p_intra_bss; /** * ssid_postfix - Postfix data to add to the SSID * * This data will be added to the end of the SSID after the * DIRECT-<random two octets> prefix. */ u8 ssid_postfix[32 - 9]; /** * ssid_postfix_len - Length of the ssid_postfix data */ size_t ssid_postfix_len; /** * msg_ctx - Context to use with wpa_msg() calls */ void *msg_ctx; /** * cb_ctx - Context to use with callback functions */ void *cb_ctx; /* Callbacks to request lower layer driver operations */ /** * p2p_scan - Request a P2P scan/search * @ctx: Callback context from cb_ctx * @type: Scan type * @freq: Specific frequency (MHz) to scan or 0 for no restriction * @num_req_dev_types: Number of requested device types * @req_dev_types: Array containing requested device types * @dev_id: Device ID to search for or %NULL to find all devices * @pw_id: Device Password ID * Returns: 0 on success, -1 on failure * * This callback function is used to request a P2P scan or search * operation to be completed. Type type argument specifies which type * of scan is to be done. @P2P_SCAN_SOCIAL indicates that only the * social channels (1, 6, 11) should be scanned. @P2P_SCAN_FULL * indicates that all channels are to be scanned. * @P2P_SCAN_SOCIAL_PLUS_ONE request scan of all the social channels * plus one extra channel specified by freq. * * The full scan is used for the initial scan to find group owners from * all. The other types are used during search phase scan of the social * channels (with potential variation if the Listen channel of the * target peer is known or if other channels are scanned in steps). * * The scan results are returned after this call by calling * p2p_scan_res_handler() for each scan result that has a P2P IE and * then calling p2p_scan_res_handled() to indicate that all scan * results have been indicated. */ int (*p2p_scan)(void *ctx, enum p2p_scan_type type, int freq, unsigned int num_req_dev_types, const u8 *req_dev_types, const u8 *dev_id, u16 pw_id); /** * send_probe_resp - Transmit a Probe Response frame * @ctx: Callback context from cb_ctx * @buf: Probe Response frame (including the header and body) * Returns: 0 on success, -1 on failure * * This function is used to reply to Probe Request frames that were * indicated with a call to p2p_probe_req_rx(). The response is to be * sent on the same channel or to be dropped if the driver is not * anymore listening to Probe Request frames. * * Alternatively, the responsibility for building the Probe Response * frames in Listen state may be in another system component in which * case this function need to be implemented (i.e., the function * pointer can be %NULL). The WPS and P2P IEs to be added for Probe * Response frames in such a case are available from the * start_listen() callback. It should be noted that the received Probe * Request frames must be indicated by calling p2p_probe_req_rx() even * if this send_probe_resp() is not used. */ int (*send_probe_resp)(void *ctx, const struct wpabuf *buf); /** * send_action - Transmit an Action frame * @ctx: Callback context from cb_ctx * @freq: Frequency in MHz for the channel on which to transmit * @dst: Destination MAC address (Address 1) * @src: Source MAC address (Address 2) * @bssid: BSSID (Address 3) * @buf: Frame body (starting from Category field) * @len: Length of buf in octets * @wait_time: How many msec to wait for a response frame * Returns: 0 on success, -1 on failure * * The Action frame may not be transmitted immediately and the status * of the transmission must be reported by calling * p2p_send_action_cb() once the frame has either been transmitted or * it has been dropped due to excessive retries or other failure to * transmit. */ int (*send_action)(void *ctx, unsigned int freq, const u8 *dst, const u8 *src, const u8 *bssid, const u8 *buf, size_t len, unsigned int wait_time); /** * send_action_done - Notify that Action frame sequence was completed * @ctx: Callback context from cb_ctx * * This function is called when the Action frame sequence that was * started with send_action() has been completed, i.e., when there is * no need to wait for a response from the destination peer anymore. */ void (*send_action_done)(void *ctx); /** * start_listen - Start Listen state * @ctx: Callback context from cb_ctx * @freq: Frequency of the listen channel in MHz * @duration: Duration for the Listen state in milliseconds * @probe_resp_ie: IE(s) to be added to Probe Response frames * Returns: 0 on success, -1 on failure * * This Listen state may not start immediately since the driver may * have other pending operations to complete first. Once the Listen * state has started, p2p_listen_cb() must be called to notify the P2P * module. Once the Listen state is stopped, p2p_listen_end() must be * called to notify the P2P module that the driver is not in the Listen * state anymore. * * If the send_probe_resp() is not used for generating the response, * the IEs from probe_resp_ie need to be added to the end of the Probe * Response frame body. If send_probe_resp() is used, the probe_resp_ie * information can be ignored. */ int (*start_listen)(void *ctx, unsigned int freq, unsigned int duration, const struct wpabuf *probe_resp_ie); /** * stop_listen - Stop Listen state * @ctx: Callback context from cb_ctx * * This callback can be used to stop a Listen state operation that was * previously requested with start_listen(). */ void (*stop_listen)(void *ctx); /** * get_noa - Get current Notice of Absence attribute payload * @ctx: Callback context from cb_ctx * @interface_addr: P2P Interface Address of the GO * @buf: Buffer for returning NoA * @buf_len: Buffer length in octets * Returns: Number of octets used in buf, 0 to indicate no NoA is being * advertized, or -1 on failure * * This function is used to fetch the current Notice of Absence * attribute value from GO. */ int (*get_noa)(void *ctx, const u8 *interface_addr, u8 *buf, size_t buf_len); /* Callbacks to notify events to upper layer management entity */ /** * dev_found - Notification of a found P2P Device * @ctx: Callback context from cb_ctx * @addr: Source address of the message triggering this notification * @info: P2P peer information * @new_device: Inform if the peer is newly found * * This callback is used to notify that a new P2P Device has been * found. This may happen, e.g., during Search state based on scan * results or during Listen state based on receive Probe Request and * Group Owner Negotiation Request. */ void (*dev_found)(void *ctx, const u8 *addr, const struct p2p_peer_info *info, int new_device); /** * dev_lost - Notification of a lost P2P Device * @ctx: Callback context from cb_ctx * @dev_addr: P2P Device Address of the lost P2P Device * * This callback is used to notify that a P2P Device has been deleted. */ void (*dev_lost)(void *ctx, const u8 *dev_addr); /** * go_neg_req_rx - Notification of a receive GO Negotiation Request * @ctx: Callback context from cb_ctx * @src: Source address of the message triggering this notification * @dev_passwd_id: <PASSWORD> Device Password ID * * This callback is used to notify that a P2P Device is requesting * group owner negotiation with us, but we do not have all the * necessary information to start GO Negotiation. This indicates that * the local user has not authorized the connection yet by providing a * PIN or PBC button press. This information can be provided with a * call to p2p_connect(). */ void (*go_neg_req_rx)(void *ctx, const u8 *src, u16 dev_passwd_id); /** * go_neg_completed - Notification of GO Negotiation results * @ctx: Callback context from cb_ctx * @res: GO Negotiation results * * This callback is used to notify that Group Owner Negotiation has * been completed. Non-zero struct p2p_go_neg_results::status indicates * failed negotiation. In case of success, this function is responsible * for creating a new group interface (or using the existing interface * depending on driver features), setting up the group interface in * proper mode based on struct p2p_go_neg_results::role_go and * initializing WPS provisioning either as a Registrar (if GO) or as an * Enrollee. Successful WPS provisioning must be indicated by calling * p2p_wps_success_cb(). The callee is responsible for timing out group * formation if WPS provisioning cannot be completed successfully * within 15 seconds. */ void (*go_neg_completed)(void *ctx, struct p2p_go_neg_results *res); /** * sd_request - Callback on Service Discovery Request * @ctx: Callback context from cb_ctx * @freq: Frequency (in MHz) of the channel * @sa: Source address of the request * @dialog_token: Dialog token * @update_indic: Service Update Indicator from the source of request * @tlvs: P2P Service Request TLV(s) * @tlvs_len: Length of tlvs buffer in octets * * This callback is used to indicate reception of a service discovery * request. Response to the query must be indicated by calling * p2p_sd_response() with the context information from the arguments to * this callback function. * * This callback handler can be set to %NULL to indicate that service * discovery is not supported. */ void (*sd_request)(void *ctx, int freq, const u8 *sa, u8 dialog_token, u16 update_indic, const u8 *tlvs, size_t tlvs_len); /** * sd_response - Callback on Service Discovery Response * @ctx: Callback context from cb_ctx * @sa: Source address of the request * @update_indic: Service Update Indicator from the source of response * @tlvs: P2P Service Response TLV(s) * @tlvs_len: Length of tlvs buffer in octets * * This callback is used to indicate reception of a service discovery * response. This callback handler can be set to %NULL if no service * discovery requests are used. The information provided with this call * is replies to the queries scheduled with p2p_sd_request(). */ void (*sd_response)(void *ctx, const u8 *sa, u16 update_indic, const u8 *tlvs, size_t tlvs_len); /** * prov_disc_req - Callback on Provisiong Discovery Request * @ctx: Callback context from cb_ctx * @peer: Source address of the request * @config_methods: Requested WPS Config Method * @dev_addr: P2P Device Address of the found P2P Device * @pri_dev_type: Primary Device Type * @dev_name: Device Name * @supp_config_methods: Supported configuration Methods * @dev_capab: Device Capabilities * @group_capab: Group Capabilities * @group_id: P2P Group ID (or %NULL if not included) * @group_id_len: Length of P2P Group ID * * This callback is used to indicate reception of a Provision Discovery * Request frame that the P2P module accepted. */ void (*prov_disc_req)(void *ctx, const u8 *peer, u16 config_methods, const u8 *dev_addr, const u8 *pri_dev_type, const char *dev_name, u16 supp_config_methods, u8 dev_capab, u8 group_capab, const u8 *group_id, size_t group_id_len); /** * prov_disc_resp - Callback on Provisiong Discovery Response * @ctx: Callback context from cb_ctx * @peer: Source address of the response * @config_methods: Value from p2p_prov_disc_req() or 0 on failure * * This callback is used to indicate reception of a Provision Discovery * Response frame for a pending request scheduled with * p2p_prov_disc_req(). This callback handler can be set to %NULL if * provision discovery is not used. */ void (*prov_disc_resp)(void *ctx, const u8 *peer, u16 config_methods); /** * prov_disc_fail - Callback on Provision Discovery failure * @ctx: Callback context from cb_ctx * @peer: Source address of the response * @status: Cause of failure, will not be %P2P_PROV_DISC_SUCCESS * * This callback is used to indicate either a failure or no response * to an earlier provision discovery request. * * This callback handler can be set to %NULL if provision discovery * is not used or failures do not need to be indicated. */ void (*prov_disc_fail)(void *ctx, const u8 *peer, enum p2p_prov_disc_status status); /** * invitation_process - Optional callback for processing Invitations * @ctx: Callback context from cb_ctx * @sa: Source address of the Invitation Request * @bssid: P2P Group BSSID from the request or %NULL if not included * @go_dev_addr: GO Device Address from P2P Group ID * @ssid: SSID from P2P Group ID * @ssid_len: Length of ssid buffer in octets * @go: Variable for returning whether the local end is GO in the group * @group_bssid: Buffer for returning P2P Group BSSID (if local end GO) * @force_freq: Variable for returning forced frequency for the group * @persistent_group: Whether this is an invitation to reinvoke a * persistent group (instead of invitation to join an active * group) * Returns: Status code (P2P_SC_*) * * This optional callback can be used to implement persistent reconnect * by allowing automatic restarting of persistent groups without user * interaction. If this callback is not implemented (i.e., is %NULL), * the received Invitation Request frames are replied with * %P2P_SC_REQ_RECEIVED status and indicated to upper layer with the * invitation_result() callback. * * If the requested parameters are acceptable and the group is known, * %P2P_SC_SUCCESS may be returned. If the requested group is unknown, * %P2P_SC_FAIL_UNKNOWN_GROUP should be returned. %P2P_SC_REQ_RECEIVED * can be returned if there is not enough data to provide immediate * response, i.e., if some sort of user interaction is needed. The * invitation_received() callback will be called in that case * immediately after this call. */ u8 (*invitation_process)(void *ctx, const u8 *sa, const u8 *bssid, const u8 *go_dev_addr, const u8 *ssid, size_t ssid_len, int *go, u8 *group_bssid, int *force_freq, int persistent_group); /** * invitation_received - Callback on Invitation Request RX * @ctx: Callback context from cb_ctx * @sa: Source address of the Invitation Request * @bssid: P2P Group BSSID or %NULL if not received * @ssid: SSID of the group * @ssid_len: Length of ssid in octets * @go_dev_addr: GO Device Address * @status: Response Status * @op_freq: Operational frequency for the group * * This callback is used to indicate sending of an Invitation Response * for a received Invitation Request. If status == 0 (success), the * upper layer code is responsible for starting the group. status == 1 * indicates need to get user authorization for the group. Other status * values indicate that the invitation request was rejected. */ void (*invitation_received)(void *ctx, const u8 *sa, const u8 *bssid, const u8 *ssid, size_t ssid_len, const u8 *go_dev_addr, u8 status, int op_freq); /** * invitation_result - Callback on Invitation result * @ctx: Callback context from cb_ctx * @status: Negotiation result (Status Code) * @bssid: P2P Group BSSID or %NULL if not received * * This callback is used to indicate result of an Invitation procedure * started with a call to p2p_invite(). The indicated status code is * the value received from the peer in Invitation Response with 0 * (P2P_SC_SUCCESS) indicating success or -1 to indicate a timeout or a * local failure in transmitting the Invitation Request. */ void (*invitation_result)(void *ctx, int status, const u8 *bssid); /** * go_connected - Check whether we are connected to a GO * @ctx: Callback context from cb_ctx * @dev_addr: P2P Device Address of a GO * Returns: 1 if we are connected as a P2P client to the specified GO * or 0 if not. */ int (*go_connected)(void *ctx, const u8 *dev_addr); }; /* P2P module initialization/deinitialization */ /** * p2p_init - Initialize P2P module * @cfg: P2P module configuration * Returns: Pointer to private data or %NULL on failure * * This function is used to initialize global P2P module context (one per * device). The P2P module will keep a copy of the configuration data, so the * caller does not need to maintain this structure. However, the callback * functions and the context parameters to them must be kept available until * the P2P module is deinitialized with p2p_deinit(). */ struct p2p_data * p2p_init(const struct p2p_config *cfg); /** * p2p_deinit - Deinitialize P2P module * @p2p: P2P module context from p2p_init() */ void p2p_deinit(struct p2p_data *p2p); /** * p2p_flush - Flush P2P module state * @p2p: P2P module context from p2p_init() * * This command removes the P2P module state like peer device entries. */ void p2p_flush(struct p2p_data *p2p); /** * p2p_unauthorize - Unauthorize the specified peer device * @p2p: P2P module context from p2p_init() * @addr: P2P peer entry to be unauthorized * Returns: 0 on success, -1 on failure * * This command removes any connection authorization from the specified P2P * peer device address. This can be used, e.g., to cancel effect of a previous * p2p_authorize() or p2p_connect() call that has not yet resulted in completed * GO Negotiation. */ int p2p_unauthorize(struct p2p_data *p2p, const u8 *addr); /** * p2p_set_dev_name - Set device name * @p2p: P2P module context from p2p_init() * Returns: 0 on success, -1 on failure * * This function can be used to update the P2P module configuration with * information that was not available at the time of the p2p_init() call. */ int p2p_set_dev_name(struct p2p_data *p2p, const char *dev_name); int p2p_set_manufacturer(struct p2p_data *p2p, const char *manufacturer); int p2p_set_model_name(struct p2p_data *p2p, const char *model_name); int p2p_set_model_number(struct p2p_data *p2p, const char *model_number); int p2p_set_serial_number(struct p2p_data *p2p, const char *serial_number); void p2p_set_config_methods(struct p2p_data *p2p, u16 config_methods); void p2p_set_uuid(struct p2p_data *p2p, const u8 *uuid); /** * p2p_set_pri_dev_type - Set primary device type * @p2p: P2P module context from p2p_init() * Returns: 0 on success, -1 on failure * * This function can be used to update the P2P module configuration with * information that was not available at the time of the p2p_init() call. */ int p2p_set_pri_dev_type(struct p2p_data *p2p, const u8 *pri_dev_type); /** * p2p_set_sec_dev_types - Set secondary device types * @p2p: P2P module context from p2p_init() * Returns: 0 on success, -1 on failure * * This function can be used to update the P2P module configuration with * information that was not available at the time of the p2p_init() call. */ int p2p_set_sec_dev_types(struct p2p_data *p2p, const u8 dev_types[][8], size_t num_dev_types); int p2p_set_country(struct p2p_data *p2p, const char *country); /* Commands from upper layer management entity */ enum p2p_discovery_type { P2P_FIND_START_WITH_FULL, P2P_FIND_ONLY_SOCIAL, P2P_FIND_PROGRESSIVE }; /** * p2p_find - Start P2P Find (Device Discovery) * @p2p: P2P module context from p2p_init() * @timeout: Timeout for find operation in seconds or 0 for no timeout * @type: Device Discovery type * @num_req_dev_types: Number of requested device types * @req_dev_types: Requested device types array, must be an array * containing num_req_dev_types * WPS_DEV_TYPE_LEN bytes; %NULL if no * requested device types. * @dev_id: Device ID to search for or %NULL to find all devices * @search_delay: Extra delay in milliseconds between search iterations * Returns: 0 on success, -1 on failure */ int p2p_find(struct p2p_data *p2p, unsigned int timeout, enum p2p_discovery_type type, unsigned int num_req_dev_types, const u8 *req_dev_types, const u8 *dev_id, unsigned int search_delay); /** * p2p_stop_find - Stop P2P Find (Device Discovery) * @p2p: P2P module context from p2p_init() */ void p2p_stop_find(struct p2p_data *p2p); /** * p2p_stop_find_for_freq - Stop P2P Find for next oper on specific freq * @p2p: P2P module context from p2p_init() * @freq: Frequency in MHz for next operation * * This is like p2p_stop_find(), but Listen state is not stopped if we are * already on the same frequency. */ void p2p_stop_find_for_freq(struct p2p_data *p2p, int freq); /** * p2p_listen - Start P2P Listen state for specified duration * @p2p: P2P module context from p2p_init() * @timeout: Listen state duration in milliseconds * Returns: 0 on success, -1 on failure * * This function can be used to request the P2P module to keep the device * discoverable on the listen channel for an extended set of time. At least in * its current form, this is mainly used for testing purposes and may not be of * much use for normal P2P operations. */ int p2p_listen(struct p2p_data *p2p, unsigned int timeout); /** * p2p_connect - Start P2P group formation (GO negotiation) * @p2p: P2P module context from p2p_init() * @peer_addr: MAC address of the peer P2P client * @wps_method: WPS method to be used in provisioning * @go_intent: Local GO intent value (1..15) * @own_interface_addr: Intended interface address to use with the group * @force_freq: The only allowed channel frequency in MHz or 0 * @persistent_group: Whether to create a persistent group (0 = no, 1 = * persistent group without persistent reconnect, 2 = persistent group with * persistent reconnect) * @force_ssid: Forced SSID for the group if we become GO or %NULL to generate * a new SSID * @force_ssid_len: Length of $force_ssid buffer * @pd_before_go_neg: Whether to send Provision Discovery prior to GO * Negotiation as an interoperability workaround when initiating group * formation * Returns: 0 on success, -1 on failure */ int p2p_connect(struct p2p_data *p2p, const u8 *peer_addr, enum p2p_wps_method wps_method, int go_intent, const u8 *own_interface_addr, unsigned int force_freq, int persistent_group, const u8 *force_ssid, size_t force_ssid_len, int pd_before_go_neg); /** * p2p_authorize - Authorize P2P group formation (GO negotiation) * @p2p: P2P module context from p2p_init() * @peer_addr: MAC address of the peer P2P client * @wps_method: WPS method to be used in provisioning * @go_intent: Local GO intent value (1..15) * @own_interface_addr: Intended interface address to use with the group * @force_freq: The only allowed channel frequency in MHz or 0 * @persistent_group: Whether to create a persistent group (0 = no, 1 = * persistent group without persistent reconnect, 2 = persistent group with * persistent reconnect) * @force_ssid: Forced SSID for the group if we become GO or %NULL to generate * a new SSID * @force_ssid_len: Length of $force_ssid buffer * Returns: 0 on success, -1 on failure * * This is like p2p_connect(), but the actual group negotiation is not * initiated automatically, i.e., the other end is expected to do that. */ int p2p_authorize(struct p2p_data *p2p, const u8 *peer_addr, enum p2p_wps_method wps_method, int go_intent, const u8 *own_interface_addr, unsigned int force_freq, int persistent_group, const u8 *force_ssid, size_t force_ssid_len); /** * p2p_reject - Reject peer device (explicitly block connection attempts) * @p2p: P2P module context from p2p_init() * @peer_addr: MAC address of the peer P2P client * Returns: 0 on success, -1 on failure */ int p2p_reject(struct p2p_data *p2p, const u8 *peer_addr); /** * p2p_prov_disc_req - Send Provision Discovery Request * @p2p: P2P module context from p2p_init() * @peer_addr: MAC address of the peer P2P client * @config_methods: WPS Config Methods value (only one bit set) * @join: Whether this is used by a client joining an active group * @force_freq: Forced TX frequency for the frame (mainly for the join case) * Returns: 0 on success, -1 on failure * * This function can be used to request a discovered P2P peer to display a PIN * (config_methods = WPS_CONFIG_DISPLAY) or be prepared to enter a PIN from us * (config_methods = WPS_CONFIG_KEYPAD). The Provision Discovery Request frame * is transmitted once immediately and if no response is received, the frame * will be sent again whenever the target device is discovered during device * dsicovery (start with a p2p_find() call). Response from the peer is * indicated with the p2p_config::prov_disc_resp() callback. */ int p2p_prov_disc_req(struct p2p_data *p2p, const u8 *peer_addr, u16 config_methods, int join, int force_freq); /** * p2p_sd_request - Schedule a service discovery query * @p2p: P2P module context from p2p_init() * @dst: Destination peer or %NULL to apply for all peers * @tlvs: P2P Service Query TLV(s) * Returns: Reference to the query or %NULL on failure * * Response to the query is indicated with the p2p_config::sd_response() * callback. */ void * p2p_sd_request(struct p2p_data *p2p, const u8 *dst, const struct wpabuf *tlvs); #ifdef CONFIG_WIFI_DISPLAY void * p2p_sd_request_wfd(struct p2p_data *p2p, const u8 *dst, const struct wpabuf *tlvs); #endif /* CONFIG_WIFI_DISPLAY */ /** * p2p_sd_cancel_request - Cancel a pending service discovery query * @p2p: P2P module context from p2p_init() * @req: Query reference from p2p_sd_request() * Returns: 0 if request for cancelled; -1 if not found */ int p2p_sd_cancel_request(struct p2p_data *p2p, void *req); /** * p2p_sd_response - Send response to a service discovery query * @p2p: P2P module context from p2p_init() * @freq: Frequency from p2p_config::sd_request() callback * @dst: Destination address from p2p_config::sd_request() callback * @dialog_token: Dialog token from p2p_config::sd_request() callback * @resp_tlvs: P2P Service Response TLV(s) * * This function is called as a response to the request indicated with * p2p_config::sd_request() callback. */ void p2p_sd_response(struct p2p_data *p2p, int freq, const u8 *dst, u8 dialog_token, const struct wpabuf *resp_tlvs); /** * p2p_sd_service_update - Indicate a change in local services * @p2p: P2P module context from p2p_init() * * This function needs to be called whenever there is a change in availability * of the local services. This will increment the Service Update Indicator * value which will be used in SD Request and Response frames. */ void p2p_sd_service_update(struct p2p_data *p2p); enum p2p_invite_role { P2P_INVITE_ROLE_GO, P2P_INVITE_ROLE_ACTIVE_GO, P2P_INVITE_ROLE_CLIENT }; /** * p2p_invite - Invite a P2P Device into a group * @p2p: P2P module context from p2p_init() * @peer: Device Address of the peer P2P Device * @role: Local role in the group * @bssid: Group BSSID or %NULL if not known * @ssid: Group SSID * @ssid_len: Length of ssid in octets * @force_freq: The only allowed channel frequency in MHz or 0 * @go_dev_addr: Forced GO Device Address or %NULL if none * @persistent_group: Whether this is to reinvoke a persistent group * Returns: 0 on success, -1 on failure */ int p2p_invite(struct p2p_data *p2p, const u8 *peer, enum p2p_invite_role role, const u8 *bssid, const u8 *ssid, size_t ssid_len, unsigned int force_freq, const u8 *go_dev_addr, int persistent_group); /** * p2p_presence_req - Request GO presence * @p2p: P2P module context from p2p_init() * @go_interface_addr: GO P2P Interface Address * @own_interface_addr: Own P2P Interface Address for this group * @freq: Group operating frequence (in MHz) * @duration1: Preferred presence duration in microseconds * @interval1: Preferred presence interval in microseconds * @duration2: Acceptable presence duration in microseconds * @interval2: Acceptable presence interval in microseconds * Returns: 0 on success, -1 on failure * * If both duration and interval values are zero, the parameter pair is not * specified (i.e., to remove Presence Request, use duration1 = interval1 = 0). */ int p2p_presence_req(struct p2p_data *p2p, const u8 *go_interface_addr, const u8 *own_interface_addr, unsigned int freq, u32 duration1, u32 interval1, u32 duration2, u32 interval2); /** * p2p_ext_listen - Set Extended Listen Timing * @p2p: P2P module context from p2p_init() * @freq: Group operating frequence (in MHz) * @period: Availability period in milliseconds (1-65535; 0 to disable) * @interval: Availability interval in milliseconds (1-65535; 0 to disable) * Returns: 0 on success, -1 on failure * * This function can be used to enable or disable (period = interval = 0) * Extended Listen Timing. When enabled, the P2P Device will become * discoverable (go into Listen State) every @interval milliseconds for at * least @period milliseconds. */ int p2p_ext_listen(struct p2p_data *p2p, unsigned int period, unsigned int interval); /* Event notifications from upper layer management operations */ /** * p2p_wps_success_cb - Report successfully completed WPS provisioning * @p2p: P2P module context from p2p_init() * @mac_addr: Peer address * * This function is used to report successfully completed WPS provisioning * during group formation in both GO/Registrar and client/Enrollee roles. */ void p2p_wps_success_cb(struct p2p_data *p2p, const u8 *mac_addr); /** * p2p_group_formation_failed - Report failed WPS provisioning * @p2p: P2P module context from p2p_init() * * This function is used to report failed group formation. This can happen * either due to failed WPS provisioning or due to 15 second timeout during * the provisioning phase. */ void p2p_group_formation_failed(struct p2p_data *p2p); /** * p2p_get_provisioning_info - Get any stored provisioning info * @p2p: P2P module context from p2p_init() * @addr: Peer P2P Device Address * Returns: WPS provisioning information (WPS config method) or 0 if no * information is available * * This function is used to retrieve stored WPS provisioning info for the given * peer. */ u16 p2p_get_provisioning_info(struct p2p_data *p2p, const u8 *addr); /** * p2p_clear_provisioning_info - Clear any stored provisioning info * @p2p: P2P module context from p2p_init() * @iface_addr: Peer P2P Device Address * * This function is used to clear stored WPS provisioning info for the given * peer. */ void p2p_clear_provisioning_info(struct p2p_data *p2p, const u8 *addr); /* Event notifications from lower layer driver operations */ /** * enum p2p_probe_req_status * * @P2P_PREQ_MALFORMED: frame was not well-formed * @P2P_PREQ_NOT_LISTEN: device isn't in listen state, frame ignored * @P2P_PREQ_NOT_P2P: frame was not a P2P probe request * @P2P_PREQ_P2P_NOT_PROCESSED: frame was P2P but wasn't processed * @P2P_PREQ_P2P_PROCESSED: frame has been processed by P2P */ enum p2p_probe_req_status { P2P_PREQ_MALFORMED, P2P_PREQ_NOT_LISTEN, P2P_PREQ_NOT_P2P, P2P_PREQ_NOT_PROCESSED, P2P_PREQ_PROCESSED }; /** * p2p_probe_req_rx - Report reception of a Probe Request frame * @p2p: P2P module context from p2p_init() * @addr: Source MAC address * @dst: Destination MAC address if available or %NULL * @bssid: BSSID if available or %NULL * @ie: Information elements from the Probe Request frame body * @ie_len: Length of ie buffer in octets * Returns: value indicating the type and status of the probe request */ enum p2p_probe_req_status p2p_probe_req_rx(struct p2p_data *p2p, const u8 *addr, const u8 *dst, const u8 *bssid, const u8 *ie, size_t ie_len); /** * p2p_rx_action - Report received Action frame * @p2p: P2P module context from p2p_init() * @da: Destination address of the received Action frame * @sa: Source address of the received Action frame * @bssid: Address 3 of the received Action frame * @category: Category of the received Action frame * @data: Action frame body after the Category field * @len: Length of the data buffer in octets * @freq: Frequency (in MHz) on which the frame was received */ void p2p_rx_action(struct p2p_data *p2p, const u8 *da, const u8 *sa, const u8 *bssid, u8 category, const u8 *data, size_t len, int freq); /** * p2p_scan_res_handler - Indicate a P2P scan results * @p2p: P2P module context from p2p_init() * @bssid: BSSID of the scan result * @freq: Frequency of the channel on which the device was found in MHz * @level: Signal level (signal strength of the received Beacon/Probe Response * frame) * @ies: Pointer to IEs from the scan result * @ies_len: Length of the ies buffer * Returns: 0 to continue or 1 to stop scan result indication * * This function is called to indicate a scan result entry with P2P IE from a * scan requested with struct p2p_config::p2p_scan(). This can be called during * the actual scan process (i.e., whenever a new device is found) or as a * sequence of calls after the full scan has been completed. The former option * can result in optimized operations, but may not be supported by all * driver/firmware designs. The ies buffer need to include at least the P2P IE, * but it is recommended to include all IEs received from the device. The * caller does not need to check that the IEs contain a P2P IE before calling * this function since frames will be filtered internally if needed. * * This function will return 1 if it wants to stop scan result iteration (and * scan in general if it is still in progress). This is used to allow faster * start of a pending operation, e.g., to start a pending GO negotiation. */ int p2p_scan_res_handler(struct p2p_data *p2p, const u8 *bssid, int freq, int level, const u8 *ies, size_t ies_len); /** * p2p_scan_res_handled - Indicate end of scan results * @p2p: P2P module context from p2p_init() * * This function is called to indicate that all P2P scan results from a scan * have been reported with zero or more calls to p2p_scan_res_handler(). This * function must be called as a response to successful * struct p2p_config::p2p_scan() call if none of the p2p_scan_res_handler() * calls stopped iteration. */ void p2p_scan_res_handled(struct p2p_data *p2p); enum p2p_send_action_result { P2P_SEND_ACTION_SUCCESS /* Frame was send and acknowledged */, P2P_SEND_ACTION_NO_ACK /* Frame was sent, but not acknowledged */, P2P_SEND_ACTION_FAILED /* Frame was not sent due to a failure */ }; /** * p2p_send_action_cb - Notify TX status of an Action frame * @p2p: P2P module context from p2p_init() * @freq: Channel frequency in MHz * @dst: Destination MAC address (Address 1) * @src: Source MAC address (Address 2) * @bssid: BSSID (Address 3) * @result: Result of the transmission attempt * * This function is used to indicate the result of an Action frame transmission * that was requested with struct p2p_config::send_action() callback. */ void p2p_send_action_cb(struct p2p_data *p2p, unsigned int freq, const u8 *dst, const u8 *src, const u8 *bssid, enum p2p_send_action_result result); /** * p2p_listen_cb - Indicate the start of a requested Listen state * @p2p: P2P module context from p2p_init() * @freq: Listen channel frequency in MHz * @duration: Duration for the Listen state in milliseconds * * This function is used to indicate that a Listen state requested with * struct p2p_config::start_listen() callback has started. */ void p2p_listen_cb(struct p2p_data *p2p, unsigned int freq, unsigned int duration); /** * p2p_listen_end - Indicate the end of a requested Listen state * @p2p: P2P module context from p2p_init() * @freq: Listen channel frequency in MHz * Returns: 0 if no operations were started, 1 if an operation was started * * This function is used to indicate that a Listen state requested with * struct p2p_config::start_listen() callback has ended. */ int p2p_listen_end(struct p2p_data *p2p, unsigned int freq); void p2p_deauth_notif(struct p2p_data *p2p, const u8 *bssid, u16 reason_code, const u8 *ie, size_t ie_len); void p2p_disassoc_notif(struct p2p_data *p2p, const u8 *bssid, u16 reason_code, const u8 *ie, size_t ie_len); /* Per-group P2P state for GO */ struct p2p_group; /** * struct p2p_group_config - P2P group configuration * * This configuration is provided to the P2P module during initialization of * the per-group information with p2p_group_init(). */ struct p2p_group_config { /** * persistent_group - Whether the group is persistent * 0 = not a persistent group * 1 = persistent group without persistent reconnect * 2 = persistent group with persistent reconnect */ int persistent_group; /** * interface_addr - P2P Interface Address of the group */ u8 interface_addr[ETH_ALEN]; /** * max_clients - Maximum number of clients in the group */ unsigned int max_clients; /** * ssid - Group SSID */ u8 ssid[32]; /** * ssid_len - Length of SSID */ size_t ssid_len; /** * cb_ctx - Context to use with callback functions */ void *cb_ctx; /** * ie_update - Notification of IE update * @ctx: Callback context from cb_ctx * @beacon_ies: P2P IE for Beacon frames or %NULL if no change * @proberesp_ies: P2P Ie for Probe Response frames * * P2P module uses this callback function to notify whenever the P2P IE * in Beacon or Probe Response frames should be updated based on group * events. * * The callee is responsible for freeing the returned buffer(s) with * wpabuf_free(). */ void (*ie_update)(void *ctx, struct wpabuf *beacon_ies, struct wpabuf *proberesp_ies); /** * idle_update - Notification of changes in group idle state * @ctx: Callback context from cb_ctx * @idle: Whether the group is idle (no associated stations) */ void (*idle_update)(void *ctx, int idle); }; /** * p2p_group_init - Initialize P2P group * @p2p: P2P module context from p2p_init() * @config: P2P group configuration (will be freed by p2p_group_deinit()) * Returns: Pointer to private data or %NULL on failure * * This function is used to initialize per-group P2P module context. Currently, * this is only used to manage GO functionality and P2P clients do not need to * create an instance of this per-group information. */ struct p2p_group * p2p_group_init(struct p2p_data *p2p, struct p2p_group_config *config); /** * p2p_group_deinit - Deinitialize P2P group * @group: P2P group context from p2p_group_init() */ void p2p_group_deinit(struct p2p_group *group); /** * p2p_group_notif_assoc - Notification of P2P client association with GO * @group: P2P group context from p2p_group_init() * @addr: Interface address of the P2P client * @ie: IEs from the (Re)association Request frame * @len: Length of the ie buffer in octets * Returns: 0 on success, -1 on failure */ int p2p_group_notif_assoc(struct p2p_group *group, const u8 *addr, const u8 *ie, size_t len); /** * p2p_group_assoc_resp_ie - Build P2P IE for (re)association response * @group: P2P group context from p2p_group_init() * @status: Status value (P2P_SC_SUCCESS if association succeeded) * Returns: P2P IE for (Re)association Response or %NULL on failure * * The caller is responsible for freeing the returned buffer with * wpabuf_free(). */ struct wpabuf * p2p_group_assoc_resp_ie(struct p2p_group *group, u8 status); /** * p2p_group_notif_disassoc - Notification of P2P client disassociation from GO * @group: P2P group context from p2p_group_init() * @addr: Interface address of the P2P client */ void p2p_group_notif_disassoc(struct p2p_group *group, const u8 *addr); /** * p2p_group_notif_formation_done - Notification of completed group formation * @group: P2P group context from p2p_group_init() */ void p2p_group_notif_formation_done(struct p2p_group *group); /** * p2p_group_notif_noa - Notification of NoA change * @group: P2P group context from p2p_group_init() * @noa: Notice of Absence attribute payload, %NULL if none * @noa_len: Length of noa buffer in octets * Returns: 0 on success, -1 on failure * * Notify the P2P group management about a new NoA contents. This will be * inserted into the P2P IEs in Beacon and Probe Response frames with rest of * the group information. */ int p2p_group_notif_noa(struct p2p_group *group, const u8 *noa, size_t noa_len); /** * p2p_group_match_dev_type - Match device types in group with requested type * @group: P2P group context from p2p_group_init() * @wps: WPS TLVs from Probe Request frame (concatenated WPS IEs) * Returns: 1 on match, 0 on mismatch * * This function can be used to match the Requested Device Type attribute in * WPS IE with the device types of a group member for deciding whether a GO * should reply to a Probe Request frame. Match will be reported if the WPS IE * is not requested any specific device type. */ int p2p_group_match_dev_type(struct p2p_group *group, struct wpabuf *wps); /** * p2p_group_match_dev_id - Match P2P Device Address in group with requested device id */ int p2p_group_match_dev_id(struct p2p_group *group, struct wpabuf *p2p); /** * p2p_group_go_discover - Send GO Discoverability Request to a group client * @group: P2P group context from p2p_group_init() * Returns: 0 on success (frame scheduled); -1 if client was not found */ int p2p_group_go_discover(struct p2p_group *group, const u8 *dev_id, const u8 *searching_dev, int rx_freq); /* Generic helper functions */ /** * p2p_ie_text - Build text format description of P2P IE * @p2p_ie: P2P IE * @buf: Buffer for returning text * @end: Pointer to the end of the buf area * Returns: Number of octets written to the buffer or -1 on failure * * This function can be used to parse P2P IE contents into text format * field=value lines. */ int p2p_ie_text(struct wpabuf *p2p_ie, char *buf, char *end); /** * p2p_scan_result_text - Build text format description of P2P IE * @ies: Information elements from scan results * @ies_len: ies buffer length in octets * @buf: Buffer for returning text * @end: Pointer to the end of the buf area * Returns: Number of octets written to the buffer or -1 on failure * * This function can be used to parse P2P IE contents into text format * field=value lines. */ int p2p_scan_result_text(const u8 *ies, size_t ies_len, char *buf, char *end); /** * p2p_parse_dev_addr_in_p2p_ie - Parse P2P Device Address from a concatenated * P2P IE * @p2p_ie: P2P IE * @dev_addr: Buffer for returning P2P Device Address * Returns: 0 on success or -1 if P2P Device Address could not be parsed */ int p2p_parse_dev_addr_in_p2p_ie(struct wpabuf *p2p_ie, u8 *dev_addr); /** * p2p_parse_dev_addr - Parse P2P Device Address from P2P IE(s) * @ies: Information elements from scan results * @ies_len: ies buffer length in octets * @dev_addr: Buffer for returning P2P Device Address * Returns: 0 on success or -1 if P2P Device Address could not be parsed */ int p2p_parse_dev_addr(const u8 *ies, size_t ies_len, u8 *dev_addr); /** * p2p_assoc_req_ie - Build P2P IE for (Re)Association Request frame * @p2p: P2P module context from p2p_init() * @bssid: BSSID * @buf: Buffer for writing the P2P IE * @len: Maximum buf length in octets * @p2p_group: Whether this is for association with a P2P GO * @p2p_ie: Reassembled P2P IE data from scan results or %NULL if none * Returns: Number of octets written into buf or -1 on failure */ int p2p_assoc_req_ie(struct p2p_data *p2p, const u8 *bssid, u8 *buf, size_t len, int p2p_group, struct wpabuf *p2p_ie); /** * p2p_scan_ie - Build P2P IE for Probe Request * @p2p: P2P module context from p2p_init() * @ies: Buffer for writing P2P IE * @dev_id: Device ID to search for or %NULL for any */ void p2p_scan_ie(struct p2p_data *p2p, struct wpabuf *ies, const u8 *dev_id); /** * p2p_scan_ie_buf_len - Get maximum buffer length needed for p2p_scan_ie * @p2p: P2P module context from p2p_init() * Returns: Number of octets that p2p_scan_ie() may add to the buffer */ size_t p2p_scan_ie_buf_len(struct p2p_data *p2p); /** * p2p_go_params - Generate random P2P group parameters * @p2p: P2P module context from p2p_init() * @params: Buffer for parameters * Returns: 0 on success, -1 on failure */ int p2p_go_params(struct p2p_data *p2p, struct p2p_go_neg_results *params); /** * p2p_get_group_capab - Get Group Capability from P2P IE data * @p2p_ie: P2P IE(s) contents * Returns: Group Capability */ u8 p2p_get_group_capab(const struct wpabuf *p2p_ie); /** * p2p_get_cross_connect_disallowed - Does WLAN AP disallows cross connection * @p2p_ie: P2P IE(s) contents * Returns: 0 if cross connection is allow, 1 if not */ int p2p_get_cross_connect_disallowed(const struct wpabuf *p2p_ie); /** * p2p_get_go_dev_addr - Get P2P Device Address from P2P IE data * @p2p_ie: P2P IE(s) contents * Returns: Pointer to P2P Device Address or %NULL if not included */ const u8 * p2p_get_go_dev_addr(const struct wpabuf *p2p_ie); /** * p2p_get_peer_info - Get P2P peer information * @p2p: P2P module context from p2p_init() * @addr: P2P Device Address of the peer or %NULL to indicate the first peer * @next: Whether to select the peer entry following the one indicated by addr * Returns: Pointer to peer info or %NULL if not found */ const struct p2p_peer_info * p2p_get_peer_info(struct p2p_data *p2p, const u8 *addr, int next); /** * p2p_get_peer_info_txt - Get internal P2P peer information in text format * @info: Pointer to P2P peer info from p2p_get_peer_info() * @buf: Buffer for returning text * @buflen: Maximum buffer length * Returns: Number of octets written to the buffer or -1 on failure * * Note: This information is internal to the P2P module and subject to change. * As such, this should not really be used by external programs for purposes * other than debugging. */ int p2p_get_peer_info_txt(const struct p2p_peer_info *info, char *buf, size_t buflen); /** * p2p_peer_known - Check whether P2P peer is known * @p2p: P2P module context from p2p_init() * @addr: P2P Device Address of the peer * Returns: 1 if the specified device is in the P2P peer table or 0 if not */ int p2p_peer_known(struct p2p_data *p2p, const u8 *addr); /** * p2p_set_client_discoverability - Set client discoverability capability * @p2p: P2P module context from p2p_init() * @enabled: Whether client discoverability will be enabled * * This function can be used to disable (and re-enable) client discoverability. * This capability is enabled by default and should not be disabled in normal * use cases, i.e., this is mainly for testing purposes. */ void p2p_set_client_discoverability(struct p2p_data *p2p, int enabled); /** * p2p_set_managed_oper - Set managed P2P Device operations capability * @p2p: P2P module context from p2p_init() * @enabled: Whether managed P2P Device operations will be enabled */ void p2p_set_managed_oper(struct p2p_data *p2p, int enabled); int p2p_set_listen_channel(struct p2p_data *p2p, u8 reg_class, u8 channel); int p2p_set_ssid_postfix(struct p2p_data *p2p, const u8 *postfix, size_t len); int p2p_get_interface_addr(struct p2p_data *p2p, const u8 *dev_addr, u8 *iface_addr); int p2p_get_dev_addr(struct p2p_data *p2p, const u8 *iface_addr, u8 *dev_addr); void p2p_set_peer_filter(struct p2p_data *p2p, const u8 *addr); /** * p2p_set_cross_connect - Set cross connection capability * @p2p: P2P module context from p2p_init() * @enabled: Whether cross connection will be enabled */ void p2p_set_cross_connect(struct p2p_data *p2p, int enabled); int p2p_get_oper_freq(struct p2p_data *p2p, const u8 *iface_addr); /** * p2p_set_intra_bss_dist - Set intra BSS distribution * @p2p: P2P module context from p2p_init() * @enabled: Whether intra BSS distribution will be enabled */ void p2p_set_intra_bss_dist(struct p2p_data *p2p, int enabled); /** * p2p_supported_freq - Check whether channel is supported for P2P * @p2p: P2P module context from p2p_init() * @freq: Channel frequency in MHz * Returns: 0 if channel not usable for P2P, 1 if usable for P2P */ int p2p_supported_freq(struct p2p_data *p2p, unsigned int freq); void p2p_update_channel_list(struct p2p_data *p2p, struct p2p_channels *chan); /** * p2p_set_best_channels - Update best channel information * @p2p: P2P module context from p2p_init() * @freq_24: Frequency (MHz) of best channel in 2.4 GHz band * @freq_5: Frequency (MHz) of best channel in 5 GHz band * @freq_overall: Frequency (MHz) of best channel overall */ void p2p_set_best_channels(struct p2p_data *p2p, int freq_24, int freq_5, int freq_overall); const u8 * p2p_get_go_neg_peer(struct p2p_data *p2p); /** * p2p_get_group_num_members - Get number of members in group * @group: P2P group context from p2p_group_init() * Returns: Number of members in the group */ unsigned int p2p_get_group_num_members(struct p2p_group *group); /** * p2p_iterate_group_members - Iterate group members * @group: P2P group context from p2p_group_init() * @next: iteration pointer, must be a pointer to a void * that is set to %NULL * on the first call and not modified later * Returns: A P2P Interface Address for each call and %NULL for no more members */ const u8 * p2p_iterate_group_members(struct p2p_group *group, void **next); /** * p2p_group_get_dev_addr - Get a P2P Device Address of a client in a group * @group: P2P group context from p2p_group_init() * @addr: P2P Interface Address of the client * Returns: P2P Device Address of the client if found or %NULL if no match * found */ const u8 * p2p_group_get_dev_addr(struct p2p_group *group, const u8 *addr); /** * p2p_group_is_client_connected - Check whether a specific client is connected * @group: P2P group context from p2p_group_init() * @addr: P2P Device Address of the client * Returns: 1 if client is connected or 0 if not */ int p2p_group_is_client_connected(struct p2p_group *group, const u8 *dev_addr); /** * p2p_get_peer_found - Get P2P peer info structure of a found peer * @p2p: P2P module context from p2p_init() * @addr: P2P Device Address of the peer or %NULL to indicate the first peer * @next: Whether to select the peer entry following the one indicated by addr * Returns: The first P2P peer info available or %NULL if no such peer exists */ const struct p2p_peer_info * p2p_get_peer_found(struct p2p_data *p2p, const u8 *addr, int next); /** * p2p_remove_wps_vendor_extensions - Remove WPS vendor extensions * @p2p: P2P module context from p2p_init() */ void p2p_remove_wps_vendor_extensions(struct p2p_data *p2p); /** * p2p_add_wps_vendor_extension - Add a WPS vendor extension * @p2p: P2P module context from p2p_init() * @vendor_ext: The vendor extensions to add * Returns: 0 on success, -1 on failure * * The wpabuf structures in the array are owned by the P2P * module after this call. */ int p2p_add_wps_vendor_extension(struct p2p_data *p2p, const struct wpabuf *vendor_ext); /** * p2p_set_oper_channel - Set the P2P operating channel * @p2p: P2P module context from p2p_init() * @op_reg_class: Operating regulatory class to set * @op_channel: operating channel to set * @cfg_op_channel : Whether op_channel is hardcoded in configuration * Returns: 0 on success, -1 on failure */ int p2p_set_oper_channel(struct p2p_data *p2p, u8 op_reg_class, u8 op_channel, int cfg_op_channel); /** * p2p_set_pref_chan - Set P2P preferred channel list * @p2p: P2P module context from p2p_init() * @num_pref_chan: Number of entries in pref_chan list * @pref_chan: Preferred channels or %NULL to remove preferences * Returns: 0 on success, -1 on failure */ int p2p_set_pref_chan(struct p2p_data *p2p, unsigned int num_pref_chan, const struct p2p_channel *pref_chan); /** * p2p_in_progress - Check whether a P2P operation is progress * @p2p: P2P module context from p2p_init() * Returns: 0 if P2P module is idle or 1 if an operation is in progress */ int p2p_in_progress(struct p2p_data *p2p); /** * p2p_other_scan_completed - Notify completion of non-P2P scan * @p2p: P2P module context from p2p_init() * Returns: 0 if P2P module is idle or 1 if an operation was started */ int p2p_other_scan_completed(struct p2p_data *p2p); const char * p2p_wps_method_text(enum p2p_wps_method method); /** * p2p_set_config_timeout - Set local config timeouts * @p2p: P2P module context from p2p_init() * @go_timeout: Time in 10 ms units it takes to start the GO mode * @client_timeout: Time in 10 ms units it takes to start the client mode */ void p2p_set_config_timeout(struct p2p_data *p2p, u8 go_timeout, u8 client_timeout); void p2p_increase_search_delay(struct p2p_data *p2p, unsigned int delay); int p2p_set_wfd_ie_beacon(struct p2p_data *p2p, struct wpabuf *ie); int p2p_set_wfd_ie_probe_req(struct p2p_data *p2p, struct wpabuf *ie); int p2p_set_wfd_ie_probe_resp(struct p2p_data *p2p, struct wpabuf *ie); int p2p_set_wfd_ie_assoc_req(struct p2p_data *p2p, struct wpabuf *ie); int p2p_set_wfd_ie_invitation(struct p2p_data *p2p, struct wpabuf *ie); int p2p_set_wfd_ie_prov_disc_req(struct p2p_data *p2p, struct wpabuf *ie); int p2p_set_wfd_ie_prov_disc_resp(struct p2p_data *p2p, struct wpabuf *ie); int p2p_set_wfd_ie_go_neg(struct p2p_data *p2p, struct wpabuf *ie); int p2p_set_wfd_dev_info(struct p2p_data *p2p, const struct wpabuf *elem); int p2p_set_wfd_assoc_bssid(struct p2p_data *p2p, const struct wpabuf *elem); int p2p_set_wfd_coupled_sink_info(struct p2p_data *p2p, const struct wpabuf *elem); struct wpabuf * wifi_display_encaps(struct wpabuf *subelems); #endif /* P2P_H */
<gh_stars>1-10 use crate::ffi::methodobject::PyMethodDef; use crate::ffi::moduleobject::PyModuleDef; use crate::ffi::object::PyObject; use crate::ffi::pyport::Py_ssize_t; use std::os::raw::{c_char, c_int, c_long}; extern "C" { #[cfg_attr(PyPy, link_name = "PyPyArg_Parse")] pub fn PyArg_Parse(arg1: *mut PyObject, arg2: *const c_char, ...) -> c_int; #[cfg_attr(PyPy, link_name = "PyPyArg_ParseTuple")] pub fn PyArg_ParseTuple(arg1: *mut PyObject, arg2: *const c_char, ...) -> c_int; #[cfg_attr(PyPy, link_name = "PyPyArg_ParseTupleAndKeywords")] pub fn PyArg_ParseTupleAndKeywords( arg1: *mut PyObject, arg2: *mut PyObject, arg3: *const c_char, arg4: *mut *mut c_char, ... ) -> c_int; pub fn PyArg_ValidateKeywordArguments(arg1: *mut PyObject) -> c_int; #[cfg_attr(PyPy, link_name = "PyPyArg_UnpackTuple")] pub fn PyArg_UnpackTuple( arg1: *mut PyObject, arg2: *const c_char, arg3: Py_ssize_t, arg4: Py_ssize_t, ... ) -> c_int; #[cfg_attr(PyPy, link_name = "PyPy_BuildValue")] pub fn Py_BuildValue(arg1: *const c_char, ...) -> *mut PyObject; // #[cfg_attr(PyPy, link_name = "_PyPy_BuildValue_SizeT")] //pub fn _Py_BuildValue_SizeT(arg1: *const c_char, ...) // -> *mut PyObject; // #[cfg_attr(PyPy, link_name = "PyPy_VaBuildValue")] // skipped non-limited _PyArg_UnpackStack // skipped non-limited _PyArg_NoKeywords // skipped non-limited _PyArg_NoKwnames // skipped non-limited _PyArg_NoPositional // skipped non-limited _PyArg_BadArgument // skipped non-limited _PyArg_CheckPositional //pub fn Py_VaBuildValue(arg1: *const c_char, arg2: va_list) // -> *mut PyObject; // skipped non-limited _Py_VaBuildStack // skipped non-limited _PyArg_Parser // skipped non-limited _PyArg_ParseTupleAndKeywordsFast // skipped non-limited _PyArg_ParseStack // skipped non-limited _PyArg_ParseStackAndKeywords // skipped non-limited _PyArg_VaParseTupleAndKeywordsFast // skipped non-limited _PyArg_UnpackKeywords // skipped non-limited _PyArg_Fini #[cfg(Py_3_10)] pub fn PyModule_AddObjectRef( module: *mut PyObject, name: *const c_char, value: *mut PyObject, ) -> c_int; #[cfg_attr(PyPy, link_name = "PyPyModule_AddObject")] pub fn PyModule_AddObject( module: *mut PyObject, name: *const c_char, value: *mut PyObject, ) -> c_int; #[cfg_attr(PyPy, link_name = "PyPyModule_AddIntConstant")] pub fn PyModule_AddIntConstant( module: *mut PyObject, name: *const c_char, value: c_long, ) -> c_int; #[cfg_attr(PyPy, link_name = "PyPyModule_AddStringConstant")] pub fn PyModule_AddStringConstant( module: *mut PyObject, name: *const c_char, value: *const c_char, ) -> c_int; // skipped non-limited / 3.9 PyModule_AddType // skipped PyModule_AddIntMacro // skipped PyModule_AddStringMacro pub fn PyModule_SetDocString(arg1: *mut PyObject, arg2: *const c_char) -> c_int; pub fn PyModule_AddFunctions(arg1: *mut PyObject, arg2: *mut PyMethodDef) -> c_int; pub fn PyModule_ExecDef(module: *mut PyObject, def: *mut PyModuleDef) -> c_int; } pub const Py_CLEANUP_SUPPORTED: i32 = 0x2_0000; pub const PYTHON_API_VERSION: i32 = 1013; pub const PYTHON_ABI_VERSION: i32 = 3; extern "C" { #[cfg(not(py_sys_config = "Py_TRACE_REFS"))] #[cfg_attr(PyPy, link_name = "PyPyModule_Create2")] pub fn PyModule_Create2(module: *mut PyModuleDef, apiver: c_int) -> *mut PyObject; #[cfg(py_sys_config = "Py_TRACE_REFS")] fn PyModule_Create2TraceRefs(module: *mut PyModuleDef, apiver: c_int) -> *mut PyObject; #[cfg(not(py_sys_config = "Py_TRACE_REFS"))] pub fn PyModule_FromDefAndSpec2( def: *mut PyModuleDef, spec: *mut PyObject, module_api_version: c_int, ) -> *mut PyObject; #[cfg(py_sys_config = "Py_TRACE_REFS")] fn PyModule_FromDefAndSpec2TraceRefs( def: *mut PyModuleDef, spec: *mut PyObject, module_api_version: c_int, ) -> *mut PyObject; } #[cfg(py_sys_config = "Py_TRACE_REFS")] #[inline] pub unsafe fn PyModule_Create2(module: *mut PyModuleDef, apiver: c_int) -> *mut PyObject { PyModule_Create2TraceRefs(module, apiver) } #[cfg(py_sys_config = "Py_TRACE_REFS")] #[inline] pub unsafe fn PyModule_FromDefAndSpec2( def: *mut PyModuleDef, spec: *mut PyObject, module_api_version: c_int, ) -> *mut PyObject { PyModule_FromDefAndSpec2TraceRefs(def, spec, module_api_version) } #[inline] pub unsafe fn PyModule_Create(module: *mut PyModuleDef) -> *mut PyObject { PyModule_Create2( module, if cfg!(Py_LIMITED_API) { PYTHON_ABI_VERSION } else { PYTHON_API_VERSION }, ) } #[inline] pub unsafe fn PyModule_FromDefAndSpec(def: *mut PyModuleDef, spec: *mut PyObject) -> *mut PyObject { PyModule_FromDefAndSpec2( def, spec, if cfg!(Py_LIMITED_API) { PYTHON_ABI_VERSION } else { PYTHON_API_VERSION }, ) } #[cfg(not(Py_LIMITED_API))] #[cfg_attr(windows, link(name = "pythonXY"))] extern "C" { pub static mut _Py_PackageContext: *const c_char; }
Sidney Morgenbesser, the philosopher's philosopher, died on August 1. Sidney was one of a kind. Sidney Morgenbesser, the philosopher’s philosopher, died on August 1. Sidney was one of a kind. An ordained rabbi who didn’t practice (but belonged to Americans for Peace Now); a scholar who mostly didn’t publish (if your grandmother knows it, don’t publish it, he would say, adding, “Moses only published one book”); a teacher whose main classroom was Broadway between 110th and 116th Streets (where he would wander like a kibitzing Socrates asking Columbia colleagues, students, friends and passers-by essential questions that as often as not had no answers); and not least, for many years a member of The Nation‘s editorial board who made constructive trouble, and whose jokes, analytic interventions and nagging pushed us in the direction of clarity, logic, moral intelligence and humanism.
Smoking is now banned in every NHS mental health unit in England, under the terms of the Health Act in 2007. Now some hospitals in England and Wales, and all hospitals in Scotland, are bringing in a blanket ban so there is no smoking in the grounds at all. I feel this is cruel and unusual. For a start, when you stay in a mental health unit – for anywhere from a few days to a number of months – it becomes your home for that period of time. Most people are free to smoke in their own homes, so surely it’s unfair that mental health patients – when at their lowest ebb – are prevented from smoking? But if the patient is temporarily living on a unit, surely they should have the freedom to do what many believe alleviates some unpleasant symptoms? Barry Curtis, Online Coordinator for the Campaign Against Smoking Bans In Psychiatric Units agrees. He tells Metro.co.uk: ‘Forcing people to quit smoking, even outside, whilst they are suffering from a mental breakdown, severe anxiety or depression, is the height of cruelty. We’re not alone in feeling the smoking ban on the grounds of mental health hospitals is cruel. Former in-patient and vape-fan, Nutan Modha, says: ‘It’s really, really atrocious. The other heavy-weight psychiatry journal, The Lancet Psychiatry, proved more service-user-friendly in its smoking ban coverage, and surely it’s the service users’ comfort and recovery that should be at the core of the debate? ‘Clinicians, mental health patient advocacy groups, and the tobacco industry have argued that encouragement of smoking cessation should not be a priority for people with severe mental health problems, and could even impede treatment for their conditions,’ the journal states. The same journal has also published research and service user voices that recognise how many patients, especially those with schizophrenia, smoke to eliminate some symptoms yet admit that it is not known why. For me, when I am unwell enough to be admitted, the only pleasure I can find is in the solitary, meditative puff of a cigarette – over and over again. Certainly my minimal joys will not be found in the lack of visitors, piss-scented rooms or the screaming down the corridors from other more troubled patients. The smoking ban means I’m now far less likely to agree to a hospital stay – so, if it’s an actual deterrent to treatment, surely that’s no good thing?
THE ACCURACY OF SST RETRIEVALS FROM AATSR : SYNTHESIS AND INTEGRATION OF COMPARISONS TO BUOYS AND RADIOMETERS The Advanced Along-Track Scanning Radiometer (AATSR), launched on ENVISAT in March 2002, is the third in a series of instrument designed to make precise and accurate global Sea Surface Temperature (SST) estimations. At the time of the ENVISAT Symposium 2007, geophysical validation indicates that the AATSR 1 km and 10' spatially averaged D3 SSTs are generally in specification, in that AATSR 1 km D3 SSTs have a warm bias of +0.10 K ( = 0.38 K) in the Caribbean with a smaller bias +0.01 K ( = 0.24 K) observed in the Bay of Biscay. Corresponding AATSR 10' D3 SSTs have a warm bias of +0.17 K ( = 0.24 K) in the Caribbean with a smaller bias -0.02 K ( = 0.28 K) observed in the Bay of Biscay. Detailed analysis of both D2-N2 and D3-N3 radiometer match-ups indicates a bio-modal distribution, which can be used to provide improved confidence in the AATSR data by removing aerosol and cloud contaminated data.
/* * Copyright (C) by Argonne National Laboratory * See COPYRIGHT in top-level directory */ #ifndef MPID_RMA_ISSUE_H_INCLUDED #define MPID_RMA_ISSUE_H_INCLUDED #include "utlist.h" #include "mpid_rma_types.h" /* =========================================================== */ /* auxiliary functions */ /* =========================================================== */ /* immed_copy() copys data from origin buffer to IMMED packet header. */ static inline int immed_copy(void *src, void *dest, size_t len) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_IMMED_COPY); MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_IMMED_COPY); if (src == NULL || dest == NULL || len == 0) goto fn_exit; switch (len) { case 1: *(uint8_t *) dest = *(uint8_t *) src; break; #ifndef NEEDS_STRICT_ALIGNMENT /* Following copy is unsafe on platforms that require strict * alignment (e.g., SPARC). Because the buffers may not be aligned * for data type access except char. */ case 2: *(uint16_t *) dest = *(uint16_t *) src; break; case 4: *(uint32_t *) dest = *(uint32_t *) src; break; case 8: *(uint64_t *) dest = *(uint64_t *) src; break; #endif default: MPIR_Memcpy(dest, (void *) src, len); } fn_exit: MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_IMMED_COPY); return mpi_errno; fn_fail: goto fn_exit; } /* =========================================================== */ /* extended packet functions */ /* =========================================================== */ /* Set extended header for ACC operation and return its real size. */ static int init_stream_dtype_ext_pkt(int pkt_flags, MPIR_Datatype* target_dtp, intptr_t stream_offset, void **ext_hdr_ptr, MPI_Aint * ext_hdr_sz, int *flattened_type_size) { MPI_Aint _total_sz = 0, stream_hdr_sz = 0; void *flattened_type, *total_hdr; int mpi_errno = MPI_SUCCESS; MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_INIT_ACCUM_EXT_PKT); MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_INIT_ACCUM_EXT_PKT); /* * The extended header consists of two parts: * * 1. Stream header: if the size of the data is large and needs * to be chunked into multiple pieces. * * 2. Flattened datatype: if the target is a derived datatype. */ if ((pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM)) stream_hdr_sz = sizeof(MPIDI_CH3_Ext_pkt_stream_t); else stream_hdr_sz = 0; if (target_dtp != NULL) MPIR_Typerep_flatten_size(target_dtp, flattened_type_size); else *flattened_type_size = 0; _total_sz = stream_hdr_sz + *flattened_type_size; if (_total_sz) { total_hdr = MPL_malloc(_total_sz, MPL_MEM_RMA); if (total_hdr == NULL) { MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %d", _total_sz); } MPL_VG_MEM_INIT(total_hdr, _total_sz); } else { total_hdr = NULL; } if ((pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM)) { ((MPIDI_CH3_Ext_pkt_stream_t *) total_hdr)->stream_offset = stream_offset; } if (target_dtp != NULL) { flattened_type = (void *) ((char *) total_hdr + stream_hdr_sz); MPIR_Typerep_flatten(target_dtp, flattened_type); } (*ext_hdr_ptr) = total_hdr; (*ext_hdr_sz) = _total_sz; fn_exit: MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_INIT_ACCUM_EXT_PKT); return mpi_errno; fn_fail: MPL_free((*ext_hdr_ptr)); (*ext_hdr_ptr) = NULL; (*ext_hdr_sz) = 0; goto fn_exit; } /* =========================================================== */ /* issuinng functions */ /* =========================================================== */ /* issue_from_origin_buffer() issues data from origin buffer (i.e. non-IMMED operation). */ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc, void *ext_hdr_ptr, MPI_Aint ext_hdr_sz, intptr_t stream_offset, intptr_t stream_size, MPIR_Request ** req_ptr) { MPI_Datatype target_datatype; MPIR_Datatype*target_dtp = NULL, *origin_dtp = NULL; int is_origin_contig; struct iovec iov[MPL_IOV_LIMIT]; int iovcnt = 0; MPIR_Request *req = NULL; MPI_Aint dt_true_lb; int pkt_flags; int is_empty_origin = FALSE; int mpi_errno = MPI_SUCCESS; MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_ISSUE_FROM_ORIGIN_BUFFER); MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_ISSUE_FROM_ORIGIN_BUFFER); /* Judge if origin buffer is empty (this can only happens for * GACC and FOP when op is MPI_NO_OP). */ if ((rma_op->pkt).type == MPIDI_CH3_PKT_GET_ACCUM || (rma_op->pkt).type == MPIDI_CH3_PKT_FOP) { MPI_Op op; MPIDI_CH3_PKT_RMA_GET_OP(rma_op->pkt, op, mpi_errno); if (op == MPI_NO_OP) is_empty_origin = TRUE; } /* Judge if target datatype is derived datatype. */ MPIDI_CH3_PKT_RMA_GET_TARGET_DATATYPE(rma_op->pkt, target_datatype, mpi_errno); if (!MPIR_DATATYPE_IS_PREDEFINED(target_datatype)) { MPIR_Datatype_get_ptr(target_datatype, target_dtp); } if (is_empty_origin == FALSE) { /* Judge if origin datatype is derived datatype. */ if (!MPIR_DATATYPE_IS_PREDEFINED(rma_op->origin_datatype)) { MPIR_Datatype_get_ptr(rma_op->origin_datatype, origin_dtp); } /* check if origin data is contiguous and get true lb */ MPIR_Datatype_is_contig(rma_op->origin_datatype, &is_origin_contig); MPIR_Datatype_get_true_lb(rma_op->origin_datatype, &dt_true_lb); } else { /* origin buffer is empty, mark origin data as contig and true_lb as 0. */ is_origin_contig = 1; dt_true_lb = 0; } iov[iovcnt].iov_base = (void *) & (rma_op->pkt); iov[iovcnt].iov_len = sizeof(rma_op->pkt); iovcnt++; MPIDI_CH3_PKT_RMA_GET_FLAGS(rma_op->pkt, pkt_flags, mpi_errno); if (!(pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) && target_dtp == NULL && is_origin_contig) { /* Fast path --- use iStartMsgv() to issue the data, which does not need a request * to be passed in: * (1) non-streamed op (do not need to send extended packet header); * (2) target datatype is predefined (do not need to send derived datatype info); * (3) origin datatype is contiguous (do not need to pack the data and send); */ if (is_empty_origin == FALSE) { iov[iovcnt].iov_base = (void *) ((char *) rma_op->origin_addr + dt_true_lb + stream_offset); iov[iovcnt].iov_len = stream_size; iovcnt++; } MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex); mpi_errno = MPIDI_CH3_iStartMsgv(vc, iov, iovcnt, &req); MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex); MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg"); if (origin_dtp != NULL) { if (req == NULL) { MPIR_Datatype_ptr_release(origin_dtp); } else { /* this will cause the datatype to be freed when the request * is freed. */ req->dev.datatype_ptr = origin_dtp; } } goto fn_exit; } /* Normal path: use iSendv() and sendNoncontig_fn() to issue the data, which * always need a request to be passed in. */ /* create a new request */ req = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); MPIR_ERR_CHKANDJUMP(req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq"); MPIR_Object_set_ref(req, 2); /* set extended packet header, it is freed when the request is freed. */ if (ext_hdr_sz > 0) { req->dev.ext_hdr_sz = ext_hdr_sz; req->dev.ext_hdr_ptr = ext_hdr_ptr; req->dev.flattened_type = NULL; iov[iovcnt].iov_base = (void *) req->dev.ext_hdr_ptr; iov[iovcnt].iov_len = ext_hdr_sz; iovcnt++; } if (origin_dtp != NULL) { req->dev.datatype_ptr = origin_dtp; /* this will cause the datatype to be freed when the request * is freed. */ } if (is_origin_contig) { /* origin data is contiguous */ if (is_empty_origin == FALSE) { iov[iovcnt].iov_base = (void *) ((char *) rma_op->origin_addr + dt_true_lb + stream_offset); iov[iovcnt].iov_len = stream_size; iovcnt++; } MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex); mpi_errno = MPIDI_CH3_iSendv(vc, req, iov, iovcnt); MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex); MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg"); } else { /* origin data is non-contiguous */ req->dev.user_buf = rma_op->origin_addr; req->dev.user_count = rma_op->origin_count; req->dev.datatype = rma_op->origin_datatype; req->dev.msg_offset = stream_offset; req->dev.msgsize = stream_offset + stream_size; req->dev.OnFinal = 0; req->dev.OnDataAvail = 0; MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex); mpi_errno = vc->sendNoncontig_fn(vc, req, iov[0].iov_base, iov[0].iov_len, &iov[1], iovcnt - 1); MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex); MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg"); } fn_exit: /* release the target datatype */ if (target_dtp) MPIR_Datatype_ptr_release(target_dtp); (*req_ptr) = req; MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_ISSUE_FROM_ORIGIN_BUFFER); return mpi_errno; fn_fail: if (req) { if (req->dev.datatype_ptr) MPIR_Datatype_ptr_release(req->dev.datatype_ptr); MPL_free(req->dev.ext_hdr_ptr); MPIR_Request_free(req); } (*req_ptr) = NULL; goto fn_exit; } /* issue_put_op() issues PUT packet header and data. */ static int issue_put_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, MPIDI_RMA_Target_t * target_ptr, int pkt_flags) { MPIDI_VC_t *vc = NULL; MPIR_Comm *comm_ptr = win_ptr->comm_ptr; MPIDI_CH3_Pkt_put_t *put_pkt = &rma_op->pkt.put; MPIR_Request *curr_req = NULL; MPI_Datatype target_datatype; MPIR_Datatype*target_dtp_ptr = NULL; int mpi_errno = MPI_SUCCESS; MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_ISSUE_PUT_OP); MPIR_FUNC_VERBOSE_RMA_ENTER(MPID_STATE_ISSUE_PUT_OP); put_pkt->pkt_flags |= pkt_flags; MPIDI_Comm_get_vc_set_active(comm_ptr, rma_op->target_rank, &vc); if (rma_op->pkt.type == MPIDI_CH3_PKT_PUT_IMMED) { /* All origin data is in packet header, issue the header. */ MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex); mpi_errno = MPIDI_CH3_iStartMsg(vc, put_pkt, sizeof(*put_pkt), &curr_req); MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex); MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg"); } else { MPI_Aint origin_type_size; void *ext_hdr_ptr = NULL; MPI_Aint ext_hdr_sz = 0; MPIR_Datatype_get_size_macro(rma_op->origin_datatype, origin_type_size); /* If derived datatype on target, add extended packet header. */ MPIDI_CH3_PKT_RMA_GET_TARGET_DATATYPE(rma_op->pkt, target_datatype, mpi_errno); if (!MPIR_DATATYPE_IS_PREDEFINED(target_datatype)) { MPIR_Datatype_get_ptr(target_datatype, target_dtp_ptr); MPIR_Typerep_flatten_size(target_dtp_ptr, &put_pkt->info.flattened_type_size); ext_hdr_ptr = MPL_malloc(put_pkt->info.flattened_type_size, MPL_MEM_RMA); if (ext_hdr_ptr == NULL) { MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %d", put_pkt->info.flattened_type_size); } MPL_VG_MEM_INIT(ext_hdr_ptr, put_pkt->info.flattened_type_size); MPIR_Typerep_flatten(target_dtp_ptr, ext_hdr_ptr); ext_hdr_sz = put_pkt->info.flattened_type_size; } mpi_errno = issue_from_origin_buffer(rma_op, vc, ext_hdr_ptr, ext_hdr_sz, 0, rma_op->origin_count * origin_type_size, &curr_req); MPIR_ERR_CHECK(mpi_errno); } if (curr_req != NULL) { rma_op->reqs_size = 1; rma_op->single_req = curr_req; } fn_exit: MPIR_FUNC_VERBOSE_RMA_EXIT(MPID_STATE_ISSUE_PUT_OP); return mpi_errno; /* --BEGIN ERROR HANDLING-- */ fn_fail: rma_op->single_req = NULL; rma_op->reqs_size = 0; goto fn_exit; /* --END ERROR HANDLING-- */ } #define ALL_STREAM_UNITS_ISSUED (-1) /* issue_acc_op() send ACC packet header and data. */ static int issue_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, MPIDI_RMA_Target_t * target_ptr, int pkt_flags) { MPIDI_VC_t *vc = NULL; MPIR_Comm *comm_ptr = win_ptr->comm_ptr; MPIDI_CH3_Pkt_accum_t *accum_pkt = &rma_op->pkt.accum; int i, j; MPI_Aint stream_elem_count, stream_unit_count; MPI_Aint predefined_dtp_size, predefined_dtp_extent, predefined_dtp_count; MPI_Aint total_len, rest_len; MPI_Aint origin_dtp_size; MPIR_Datatype*origin_dtp_ptr = NULL; MPIR_Datatype*target_dtp_ptr = NULL; void *ext_hdr_ptr = NULL; MPI_Aint ext_hdr_sz = 0; int mpi_errno = MPI_SUCCESS; MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_ISSUE_ACC_OP); MPIR_FUNC_VERBOSE_RMA_ENTER(MPID_STATE_ISSUE_ACC_OP); MPIDI_Comm_get_vc_set_active(comm_ptr, rma_op->target_rank, &vc); if (rma_op->pkt.type == MPIDI_CH3_PKT_ACCUMULATE_IMMED) { MPIR_Request *curr_req = NULL; accum_pkt->pkt_flags |= pkt_flags; /* All origin data is in packet header, issue the header. */ MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex); mpi_errno = MPIDI_CH3_iStartMsg(vc, accum_pkt, sizeof(*accum_pkt), &curr_req); MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex); MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg"); if (curr_req != NULL) { MPIR_Assert(rma_op->reqs_size == 0 && rma_op->single_req == NULL); rma_op->reqs_size = 1; rma_op->single_req = curr_req; } goto fn_exit; } /* Get total length of origin data */ MPIR_Datatype_get_size_macro(rma_op->origin_datatype, origin_dtp_size); total_len = origin_dtp_size * rma_op->origin_count; /* Get size and count for predefined datatype elements */ if (MPIR_DATATYPE_IS_PREDEFINED(rma_op->origin_datatype)) { predefined_dtp_size = origin_dtp_size; predefined_dtp_count = rma_op->origin_count; MPIR_Datatype_get_extent_macro(rma_op->origin_datatype, predefined_dtp_extent); } else { MPIR_Datatype_get_ptr(rma_op->origin_datatype, origin_dtp_ptr); MPIR_Assert(origin_dtp_ptr != NULL && origin_dtp_ptr->basic_type != MPI_DATATYPE_NULL); MPIR_Datatype_get_size_macro(origin_dtp_ptr->basic_type, predefined_dtp_size); predefined_dtp_count = total_len / predefined_dtp_size; MPIR_Datatype_get_extent_macro(origin_dtp_ptr->basic_type, predefined_dtp_extent); } MPIR_Assert(predefined_dtp_count > 0 && predefined_dtp_size > 0 && predefined_dtp_extent > 0); /* Calculate number of predefined elements in each stream unit, and * total number of stream units. */ stream_elem_count = MPIDI_CH3U_Acc_stream_size / predefined_dtp_extent; stream_unit_count = (predefined_dtp_count - 1) / stream_elem_count + 1; MPIR_Assert(stream_elem_count > 0 && stream_unit_count > 0); /* If there are more than one stream unit, mark the current packet * as stream packet */ if (stream_unit_count > 1) pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_STREAM; /* Get target datatype */ if (!MPIR_DATATYPE_IS_PREDEFINED(accum_pkt->datatype)) MPIR_Datatype_get_ptr(accum_pkt->datatype, target_dtp_ptr); rest_len = total_len; MPIR_Assert(rma_op->issued_stream_count >= 0); for (j = 0; j < stream_unit_count; j++) { intptr_t stream_offset, stream_size; MPIR_Request *curr_req = NULL; if (j < rma_op->issued_stream_count) continue; accum_pkt->pkt_flags |= pkt_flags; if (j != 0) { accum_pkt->pkt_flags &= ~MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED; accum_pkt->pkt_flags &= ~MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE; } if (j != stream_unit_count - 1) { accum_pkt->pkt_flags &= ~MPIDI_CH3_PKT_FLAG_RMA_UNLOCK; accum_pkt->pkt_flags &= ~MPIDI_CH3_PKT_FLAG_RMA_FLUSH; accum_pkt->pkt_flags &= ~MPIDI_CH3_PKT_FLAG_RMA_DECR_AT_COUNTER; } stream_offset = j * stream_elem_count * predefined_dtp_size; stream_size = MPL_MIN(stream_elem_count * predefined_dtp_size, rest_len); rest_len -= stream_size; /* Set extended packet header if needed. */ init_stream_dtype_ext_pkt(pkt_flags, target_dtp_ptr, stream_offset, &ext_hdr_ptr, &ext_hdr_sz, &accum_pkt->info.flattened_type_size); mpi_errno = issue_from_origin_buffer(rma_op, vc, ext_hdr_ptr, ext_hdr_sz, stream_offset, stream_size, &curr_req); MPIR_ERR_CHECK(mpi_errno); if (curr_req != NULL) { if (rma_op->reqs_size == 0) { MPIR_Assert(rma_op->single_req == NULL && rma_op->multi_reqs == NULL); rma_op->reqs_size = stream_unit_count; if (stream_unit_count > 1) { rma_op->multi_reqs = (MPIR_Request **) MPL_malloc(sizeof(MPIR_Request *) * rma_op->reqs_size, MPL_MEM_RMA); for (i = 0; i < rma_op->reqs_size; i++) rma_op->multi_reqs[i] = NULL; } } if (rma_op->reqs_size == 1) rma_op->single_req = curr_req; else rma_op->multi_reqs[j] = curr_req; } rma_op->issued_stream_count++; if (accum_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || accum_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) { /* if piggybacked with LOCK flag, we * only issue the first streaming unit */ MPIR_Assert(j == 0); break; } } /* end of for loop */ if (rma_op->issued_stream_count == stream_unit_count) { /* Mark that all stream units have been issued */ rma_op->issued_stream_count = ALL_STREAM_UNITS_ISSUED; } fn_exit: MPIR_FUNC_VERBOSE_RMA_EXIT(MPID_STATE_ISSUE_ACC_OP); return mpi_errno; fn_fail: if (rma_op->reqs_size == 1) { rma_op->single_req = NULL; } else if (rma_op->reqs_size > 1) { MPL_free(rma_op->multi_reqs); rma_op->multi_reqs = NULL; } rma_op->reqs_size = 0; goto fn_exit; } /* issue_get_acc_op() send GACC packet header and data. */ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, MPIDI_RMA_Target_t * target_ptr, int pkt_flags) { MPIDI_VC_t *vc = NULL; MPIR_Comm *comm_ptr = win_ptr->comm_ptr; MPIDI_CH3_Pkt_get_accum_t *get_accum_pkt = &rma_op->pkt.get_accum; int i, j; MPI_Aint stream_elem_count, stream_unit_count; MPI_Aint predefined_dtp_size, predefined_dtp_count, predefined_dtp_extent; MPI_Aint total_len, rest_len; MPI_Aint target_dtp_size; MPIR_Datatype*target_dtp_ptr = NULL; void *ext_hdr_ptr = NULL; MPI_Aint ext_hdr_sz = 0; int mpi_errno = MPI_SUCCESS; MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_ISSUE_GET_ACC_OP); MPIR_FUNC_VERBOSE_RMA_ENTER(MPID_STATE_ISSUE_GET_ACC_OP); MPIDI_Comm_get_vc_set_active(comm_ptr, rma_op->target_rank, &vc); if (rma_op->pkt.type == MPIDI_CH3_PKT_GET_ACCUM_IMMED) { MPIR_Request *resp_req = NULL; MPIR_Request *curr_req = NULL; get_accum_pkt->pkt_flags |= pkt_flags; rma_op->reqs_size = 1; /* Create a request for the GACC response. Store the response buf, count, and * datatype in it, and pass the request's handle in the GACC packet. When the * response comes from the target, it will contain the request handle. */ resp_req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); MPIR_ERR_CHKANDJUMP(resp_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq"); MPIR_Object_set_ref(resp_req, 2); resp_req->dev.user_buf = rma_op->result_addr; resp_req->dev.user_count = rma_op->result_count; resp_req->dev.datatype = rma_op->result_datatype; resp_req->dev.target_win_handle = MPI_WIN_NULL; resp_req->dev.source_win_handle = win_ptr->handle; /* Note: Get_accumulate uses the same packet type as accumulate */ get_accum_pkt->request_handle = resp_req->handle; /* All origin data is in packet header, issue the header. */ MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex); mpi_errno = MPIDI_CH3_iStartMsg(vc, get_accum_pkt, sizeof(*get_accum_pkt), &curr_req); MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex); MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg"); if (curr_req != NULL) { MPIR_Request_free(curr_req); } rma_op->single_req = resp_req; goto fn_exit; } /* Get total length of target data */ MPIR_Datatype_get_size_macro(get_accum_pkt->datatype, target_dtp_size); total_len = target_dtp_size * get_accum_pkt->count; /* Get size and count for predefined datatype elements */ if (MPIR_DATATYPE_IS_PREDEFINED(get_accum_pkt->datatype)) { predefined_dtp_size = target_dtp_size; predefined_dtp_count = get_accum_pkt->count; MPIR_Datatype_get_extent_macro(get_accum_pkt->datatype, predefined_dtp_extent); } else { MPIR_Datatype_get_ptr(get_accum_pkt->datatype, target_dtp_ptr); MPIR_Assert(target_dtp_ptr != NULL && target_dtp_ptr->basic_type != MPI_DATATYPE_NULL); MPIR_Datatype_get_size_macro(target_dtp_ptr->basic_type, predefined_dtp_size); predefined_dtp_count = total_len / predefined_dtp_size; MPIR_Datatype_get_extent_macro(target_dtp_ptr->basic_type, predefined_dtp_extent); } MPIR_Assert(predefined_dtp_count > 0 && predefined_dtp_size > 0 && predefined_dtp_extent > 0); /* Calculate number of predefined elements in each stream unit, and * total number of stream units. */ stream_elem_count = MPIDI_CH3U_Acc_stream_size / predefined_dtp_extent; stream_unit_count = (predefined_dtp_count - 1) / stream_elem_count + 1; MPIR_Assert(stream_elem_count > 0 && stream_unit_count > 0); /* If there are more than one stream unit, mark the current packet * as stream packet */ if (stream_unit_count > 1) pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_STREAM; rest_len = total_len; rma_op->reqs_size = stream_unit_count; if (rma_op->reqs_size > 1) { rma_op->multi_reqs = (MPIR_Request **) MPL_malloc(sizeof(MPIR_Request *) * rma_op->reqs_size, MPL_MEM_RMA); for (i = 0; i < rma_op->reqs_size; i++) rma_op->multi_reqs[i] = NULL; } MPIR_Assert(rma_op->issued_stream_count >= 0); for (j = 0; j < stream_unit_count; j++) { intptr_t stream_offset, stream_size; MPIR_Request *resp_req = NULL; MPIR_Request *curr_req = NULL; if (j < rma_op->issued_stream_count) continue; get_accum_pkt->pkt_flags |= pkt_flags; if (j != 0) { get_accum_pkt->pkt_flags &= ~MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED; get_accum_pkt->pkt_flags &= ~MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE; } if (j != stream_unit_count - 1) { get_accum_pkt->pkt_flags &= ~MPIDI_CH3_PKT_FLAG_RMA_UNLOCK; get_accum_pkt->pkt_flags &= ~MPIDI_CH3_PKT_FLAG_RMA_FLUSH; get_accum_pkt->pkt_flags &= ~MPIDI_CH3_PKT_FLAG_RMA_DECR_AT_COUNTER; } /* Create a request for the GACC response. Store the response buf, count, and * datatype in it, and pass the request's handle in the GACC packet. When the * response comes from the target, it will contain the request handle. */ resp_req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); MPIR_ERR_CHKANDJUMP(resp_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq"); MPIR_Object_set_ref(resp_req, 2); resp_req->dev.user_buf = rma_op->result_addr; resp_req->dev.user_count = rma_op->result_count; resp_req->dev.datatype = rma_op->result_datatype; resp_req->dev.target_win_handle = MPI_WIN_NULL; resp_req->dev.source_win_handle = win_ptr->handle; resp_req->dev.pkt_flags = pkt_flags; if (!MPIR_DATATYPE_IS_PREDEFINED(resp_req->dev.datatype)) { MPIR_Datatype*result_dtp = NULL; MPIR_Datatype_get_ptr(resp_req->dev.datatype, result_dtp); resp_req->dev.datatype_ptr = result_dtp; /* this will cause the datatype to be freed when the * request is freed. */ } /* Note: Get_accumulate uses the same packet type as accumulate */ get_accum_pkt->request_handle = resp_req->handle; stream_offset = j * stream_elem_count * predefined_dtp_size; stream_size = MPL_MIN(stream_elem_count * predefined_dtp_size, rest_len); rest_len -= stream_size; /* Set extended packet header if needed. */ init_stream_dtype_ext_pkt(pkt_flags, target_dtp_ptr, stream_offset, &ext_hdr_ptr, &ext_hdr_sz, &get_accum_pkt->info.flattened_type_size); /* Note: here we need to allocate an extended packet header in response request, * in order to store the stream_offset locally and use it in PktHandler_Get_AccumResp. * This extended packet header only contains stream_offset and does not contain any * other information. */ { int dummy; init_stream_dtype_ext_pkt(pkt_flags, NULL /* target_dtp_ptr */ , stream_offset, &(resp_req->dev.ext_hdr_ptr), &(resp_req->dev.ext_hdr_sz), &dummy); } mpi_errno = issue_from_origin_buffer(rma_op, vc, ext_hdr_ptr, ext_hdr_sz, stream_offset, stream_size, &curr_req); MPIR_ERR_CHECK(mpi_errno); if (curr_req != NULL) { MPIR_Request_free(curr_req); } if (rma_op->reqs_size == 1) rma_op->single_req = resp_req; else rma_op->multi_reqs[j] = resp_req; rma_op->issued_stream_count++; if (get_accum_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || get_accum_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) { /* if piggybacked with LOCK flag, we * only issue the first streaming unit */ MPIR_Assert(j == 0); break; } } /* end of for loop */ if (rma_op->issued_stream_count == stream_unit_count) { /* Mark that all stream units have been issued */ rma_op->issued_stream_count = ALL_STREAM_UNITS_ISSUED; } fn_exit: MPIR_FUNC_VERBOSE_RMA_EXIT(MPID_STATE_ISSUE_GET_ACC_OP); return mpi_errno; /* --BEGIN ERROR HANDLING-- */ fn_fail: if (rma_op->reqs_size == 1) { /* error case: drop both our reference to the request and the * progress engine's reference to it, since the progress * engine didn't get a chance to see it yet. */ MPIR_Request_free(rma_op->single_req); MPIR_Request_free(rma_op->single_req); rma_op->single_req = NULL; } else if (rma_op->reqs_size > 1) { for (i = 0; i < rma_op->reqs_size; i++) { if (rma_op->multi_reqs[i] != NULL) { /* error case: drop both our reference to the request * and the progress engine's reference to it, since * the progress engine didn't get a chance to see it * yet. */ MPIR_Request_free(rma_op->multi_reqs[i]); MPIR_Request_free(rma_op->multi_reqs[i]); } } MPL_free(rma_op->multi_reqs); rma_op->multi_reqs = NULL; } rma_op->reqs_size = 0; goto fn_exit; /* --END ERROR HANDLING-- */ } static int issue_get_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, MPIDI_RMA_Target_t * target_ptr, int pkt_flags) { MPIDI_CH3_Pkt_get_t *get_pkt = &rma_op->pkt.get; int mpi_errno = MPI_SUCCESS; MPIDI_VC_t *vc; MPIR_Comm *comm_ptr; MPIR_Datatype*dtp; MPI_Datatype target_datatype; MPIR_Request *req = NULL; MPIR_Request *curr_req = NULL; struct iovec iov[MPL_IOV_LIMIT]; MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_ISSUE_GET_OP); MPIR_FUNC_VERBOSE_RMA_ENTER(MPID_STATE_ISSUE_GET_OP); rma_op->reqs_size = 1; /* create a request, store the origin buf, cnt, datatype in it, * and pass a handle to it in the get packet. When the get * response comes from the target, it will contain the request * handle. */ curr_req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); if (curr_req == NULL) { MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomemreq"); } MPIR_Object_set_ref(curr_req, 2); curr_req->dev.user_buf = rma_op->origin_addr; curr_req->dev.user_count = rma_op->origin_count; curr_req->dev.datatype = rma_op->origin_datatype; curr_req->dev.target_win_handle = MPI_WIN_NULL; curr_req->dev.source_win_handle = win_ptr->handle; if (!MPIR_DATATYPE_IS_PREDEFINED(curr_req->dev.datatype)) { MPIR_Datatype_get_ptr(curr_req->dev.datatype, dtp); curr_req->dev.datatype_ptr = dtp; /* this will cause the datatype to be freed when the * request is freed. */ } get_pkt->request_handle = curr_req->handle; get_pkt->pkt_flags |= pkt_flags; comm_ptr = win_ptr->comm_ptr; MPIDI_Comm_get_vc_set_active(comm_ptr, rma_op->target_rank, &vc); MPIDI_CH3_PKT_RMA_GET_TARGET_DATATYPE(rma_op->pkt, target_datatype, mpi_errno); if (MPIR_DATATYPE_IS_PREDEFINED(target_datatype)) { /* basic datatype on target. simply send the get_pkt. */ MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex); mpi_errno = MPIDI_CH3_iStartMsg(vc, get_pkt, sizeof(*get_pkt), &req); MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex); } else { /* derived datatype on target. */ void *ext_hdr_ptr = NULL; MPI_Aint ext_hdr_sz = 0; MPIR_Datatype_get_ptr(target_datatype, dtp); MPIR_Typerep_flatten_size(dtp, &get_pkt->info.flattened_type_size); ext_hdr_ptr = MPL_malloc(get_pkt->info.flattened_type_size, MPL_MEM_RMA); if (ext_hdr_ptr == NULL) { MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %d", get_pkt->info.flattened_type_size); } MPL_VG_MEM_INIT(ext_hdr_ptr, get_pkt->info.flattened_type_size); MPIR_Typerep_flatten(dtp, ext_hdr_ptr); ext_hdr_sz = get_pkt->info.flattened_type_size; iov[0].iov_base = (void *) get_pkt; iov[0].iov_len = sizeof(*get_pkt); iov[1].iov_base = (void *) ext_hdr_ptr; iov[1].iov_len = ext_hdr_sz; MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex); mpi_errno = MPIDI_CH3_iStartMsgv(vc, iov, 2, &req); MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex); /* release the target datatype */ MPIR_Datatype_ptr_release(dtp); /* If send is finished, we free extended header immediately. * Otherwise, store its pointer in request thus it can be freed when request is freed.*/ if (req != NULL) { req->dev.ext_hdr_ptr = ext_hdr_ptr; } else { MPL_free(ext_hdr_ptr); } } if (mpi_errno != MPI_SUCCESS) { MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg"); } /* release the request returned by iStartMsg or iStartMsgv */ if (req != NULL) { MPIR_Request_free(req); } rma_op->single_req = curr_req; fn_exit: MPIR_FUNC_VERBOSE_RMA_EXIT(MPID_STATE_ISSUE_GET_OP); return mpi_errno; /* --BEGIN ERROR HANDLING-- */ fn_fail: rma_op->single_req = NULL; rma_op->reqs_size = 0; goto fn_exit; /* --END ERROR HANDLING-- */ } static int issue_cas_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, MPIDI_RMA_Target_t * target_ptr, int pkt_flags) { MPIDI_VC_t *vc = NULL; MPIR_Comm *comm_ptr = win_ptr->comm_ptr; MPIDI_CH3_Pkt_cas_t *cas_pkt = &rma_op->pkt.cas; MPIR_Request *rmw_req = NULL; MPIR_Request *curr_req = NULL; int mpi_errno = MPI_SUCCESS; MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_ISSUE_CAS_OP); MPIR_FUNC_VERBOSE_RMA_ENTER(MPID_STATE_ISSUE_CAS_OP); rma_op->reqs_size = 1; /* Create a request for the RMW response. Store the origin buf, count, and * datatype in it, and pass the request's handle RMW packet. When the * response comes from the target, it will contain the request handle. */ curr_req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); MPIR_ERR_CHKANDJUMP(curr_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq"); /* Set refs on the request to 2: one for the response message, and one for * the partial completion handler */ MPIR_Object_set_ref(curr_req, 2); curr_req->dev.user_buf = rma_op->result_addr; curr_req->dev.datatype = rma_op->result_datatype; curr_req->dev.target_win_handle = MPI_WIN_NULL; curr_req->dev.source_win_handle = win_ptr->handle; cas_pkt->request_handle = curr_req->handle; cas_pkt->pkt_flags |= pkt_flags; MPIDI_Comm_get_vc_set_active(comm_ptr, rma_op->target_rank, &vc); MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex); mpi_errno = MPIDI_CH3_iStartMsg(vc, cas_pkt, sizeof(*cas_pkt), &rmw_req); MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex); MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg"); if (rmw_req != NULL) { MPIR_Request_free(rmw_req); } rma_op->single_req = curr_req; fn_exit: MPIR_FUNC_VERBOSE_RMA_EXIT(MPID_STATE_ISSUE_CAS_OP); return mpi_errno; /* --BEGIN ERROR HANDLING-- */ fn_fail: rma_op->single_req = NULL; rma_op->reqs_size = 0; goto fn_exit; /* --END ERROR HANDLING-- */ } static int issue_fop_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, MPIDI_RMA_Target_t * target_ptr, int pkt_flags) { MPIDI_VC_t *vc = NULL; MPIR_Comm *comm_ptr = win_ptr->comm_ptr; MPIDI_CH3_Pkt_fop_t *fop_pkt = &rma_op->pkt.fop; MPIR_Request *resp_req = NULL; MPIR_Request *curr_req = NULL; int mpi_errno = MPI_SUCCESS; MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_ISSUE_FOP_OP); MPIR_FUNC_VERBOSE_RMA_ENTER(MPID_STATE_ISSUE_FOP_OP); rma_op->reqs_size = 1; /* Create a request for the GACC response. Store the response buf, count, and * datatype in it, and pass the request's handle in the GACC packet. When the * response comes from the target, it will contain the request handle. */ resp_req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); MPIR_ERR_CHKANDJUMP(resp_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq"); MPIR_Object_set_ref(resp_req, 2); resp_req->dev.user_buf = rma_op->result_addr; resp_req->dev.datatype = rma_op->result_datatype; resp_req->dev.target_win_handle = MPI_WIN_NULL; resp_req->dev.source_win_handle = win_ptr->handle; fop_pkt->request_handle = resp_req->handle; fop_pkt->pkt_flags |= pkt_flags; MPIDI_Comm_get_vc_set_active(comm_ptr, rma_op->target_rank, &vc); if (rma_op->pkt.type == MPIDI_CH3_PKT_FOP_IMMED) { /* All origin data is in packet header, issue the header. */ MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex); mpi_errno = MPIDI_CH3_iStartMsg(vc, fop_pkt, sizeof(*fop_pkt), &curr_req); MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex); MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg"); } else { MPI_Aint origin_dtp_size; MPIR_Datatype_get_size_macro(rma_op->origin_datatype, origin_dtp_size); mpi_errno = issue_from_origin_buffer(rma_op, vc, NULL, 0, /*ext_hdr_ptr, ext_hdr_sz */ 0, 1 * origin_dtp_size, &curr_req); MPIR_ERR_CHECK(mpi_errno); } if (curr_req != NULL) { MPIR_Request_free(curr_req); } rma_op->single_req = resp_req; fn_exit: MPIR_FUNC_VERBOSE_RMA_EXIT(MPID_STATE_ISSUE_FOP_OP); return mpi_errno; /* --BEGIN ERROR HANDLING-- */ fn_fail: rma_op->single_req = NULL; rma_op->reqs_size = 0; goto fn_exit; /* --END ERROR HANDLING-- */ } /* issue_rma_op() is called by ch3u_rma_progress.c, it triggers proper issuing functions according to packet type. */ static inline int issue_rma_op(MPIDI_RMA_Op_t * op_ptr, MPIR_Win * win_ptr, MPIDI_RMA_Target_t * target_ptr, int pkt_flags) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_ISSUE_RMA_OP); MPIR_FUNC_VERBOSE_RMA_ENTER(MPID_STATE_ISSUE_RMA_OP); switch (op_ptr->pkt.type) { case (MPIDI_CH3_PKT_PUT): case (MPIDI_CH3_PKT_PUT_IMMED): mpi_errno = issue_put_op(op_ptr, win_ptr, target_ptr, pkt_flags); break; case (MPIDI_CH3_PKT_ACCUMULATE): case (MPIDI_CH3_PKT_ACCUMULATE_IMMED): mpi_errno = issue_acc_op(op_ptr, win_ptr, target_ptr, pkt_flags); break; case (MPIDI_CH3_PKT_GET_ACCUM): case (MPIDI_CH3_PKT_GET_ACCUM_IMMED): mpi_errno = issue_get_acc_op(op_ptr, win_ptr, target_ptr, pkt_flags); break; case (MPIDI_CH3_PKT_GET): mpi_errno = issue_get_op(op_ptr, win_ptr, target_ptr, pkt_flags); break; case (MPIDI_CH3_PKT_CAS_IMMED): mpi_errno = issue_cas_op(op_ptr, win_ptr, target_ptr, pkt_flags); break; case (MPIDI_CH3_PKT_FOP): case (MPIDI_CH3_PKT_FOP_IMMED): mpi_errno = issue_fop_op(op_ptr, win_ptr, target_ptr, pkt_flags); break; default: MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**winInvalidOp"); } MPIR_ERR_CHECK(mpi_errno); fn_exit: MPIR_FUNC_VERBOSE_RMA_EXIT(MPID_STATE_ISSUE_RMA_OP); return mpi_errno; /* --BEGIN ERROR HANDLING-- */ fn_fail: goto fn_exit; /* --END ERROR HANDLING-- */ } #endif /* MPID_RMA_ISSUE_H_INCLUDED */
On the Alekseev-Gr\"obner formula in Banach spaces The Alekseev-Gr\"obner formula is a well known tool in numerical analysis for describing the effect that a perturbation of an ordinary differential equation (ODE) has on its solution. In this article we provide an extension of the Alekseev-Gr\"obner formula for Banach space valued ODEs under, loosely speaking, mild conditions on the perturbation of the considered ODEs. Introduction The Alekseev-Grbner formula (see, e.g., Alekseev, Grbner, and Hairer et al. ) is a well known tool in deterministic numerical analysis for describing the effect that a perturbation of an ordinary differential equation (ODE) has on its solution. Considering numerical methods for ODEs as appropriate perturbations of the underlying equations makes the Alekseev-Grbner formula applicable for estimating errors of numerical methods (see, e.g., Hairer et al. , Iserles , Iserles , and Niesen ). It is the main contribution of this work to provide an extension of the Alekseev-Grbner formula for Banach space valued ODEs under, loosely speaking, mild conditions on the perturbation of the considered ODEs (see Corollary 5.2 in Section 5 and Theorem 1.1 below). As a consequence, our main result is well suited for the analysis of pathwise approximation errors between exact solutions of stochastic partial differential equations (SPDEs) of evolutionary type and their numerical approximations. In particular, it can be used as a key ingredient for establishing strong convergence rates for numerical approximations of SPDEs with a non-globally Lipschitz continuous, non-globally monotone nonlinearity, and additive trace-class noise. The precise result will be the subject of a future research article. In this introductory section we now present our main result. Theorem 1.1 is proven as Corollary 5.2 in Section 5 below. The rest of this article is structured as follows. In Section 2 we recall some elementary and well known properties for Banach space valued functions (see Lemmas 2.1-2.6, Corollary 2.7, and Lemma 2.8). Thereafter we combine these elementary results to prove an abstract version of the Alekseev-Grbner formula for Banach space valued ODEs under, roughly speaking, restrictive conditions on the solution as well as on the perturbation of the considered ODE; see Proposition 2.9 in Section 2 below for details. Sections 3 and 4 are devoted to presenting in detail some partially well known results on continuous differentiability of solutions to a class of Banach space valued ODEs with respect to initial value, initial time, and current time (see Lemma 4.8 in Section 4 below). Finally, we combine Proposition 2.9, Lemma 3.7 (the flow property of solutions to ODEs), and Lemma 4.8 to establish in Corollary 5.2 in Section 5 below the main result of this article. Extended chain rule property for Banach space valued functions In this section we prove an abstract version of the Alekseev-Grbner formula for Banach space valued ODEs under, loosely speaking, restrictive conditions in Proposition 2.9. This will be used in Section 5 to prove in Corollary 5.2 an extension of the Alekseev-Grbner formula (cf., e.g., Hairer This and the fact that A ⊆ X is dense imply that for every V ∈ Y with f (X) ∩ V = ∅ there exists a ∈ A such that f (a) ∈ V. The fact that A ⊆ X is countable therefore implies that f (A) ⊆ f (X) is a countable dense subset of f (X). This and the fact that f is measurable complete the proof of Lemma 2.1. Proof of Lemma 2.2. Throughout this proof let (c n ) n∈AE ⊆ im(f ) be a dense subset of im(f ). Note that the fundamental theorem of calculus assures that for all t ∈ , n ∈ AE it holds that lim sup This implies for all t ∈ , n ∈ AE that lim sup The fact that ( Therefore, we obtain for every t ∈ that lim sup This completes the proof of Lemma 2.2. Combining this with Lemma 2. The proof of Lemma 2.3 is thus completed. Then it holds for all t ∈ that Proof of Lemma 2.4. Throughout this proof let G : → V be the function which satisfies This and the fact that, ) and p L (t) = 0. This proves that for every L ∈ L(V, ) the function p L is constant. The fact that the space L(V, ) separates points (see, e.g., Brezis [2, Corollary 1.3 in The proof of Lemma 2.4 is thus completed. is continuous. Proof of Lemma 2.5. Throughout this proof let ∈ (0, ∞). Observe that the assumption that Moreover, note that the fact that is compact ensures that for every This and demonstrate that for all As ∈ (0, ∞) was arbitrary, the proof of Lemma 2.5 is completed. is continuous and the assumption that f is strongly measurable and integrable hence establish items (i) and (ii). Next observe that Lemma 2.3 (with V = V, a = a, b = b, f = f n, F = F n for n ∈ AE in the notation of Lemma 2.3) ensures that for every n ∈ AE it for n ∈ AE in the notation of Lemma 2.4) and the chain rule for Frchet derivatives therefore prove that for all n ∈ AE, t ∈ it holds that Moreover, note that for all n ∈ AE, t ∈ it holds that This assures that The fact that ∈ C 1 (V, W ) hence shows that for every t ∈ it holds that and Next observe that for all n ∈ AE, t ∈ it holds that ∈ L(V, W )) in the notation of Lemma 2.5) and prove that for every ∈ (0, ∞) there exists N ∈ AE such that for every n ∈ [N, ∞) ∩ AE it holds that In particular, this and the fact that Combining - and the fact that Moreover, observe that shows that for all t ∈ it holds that This,, and establish item (iii). The proof of Lemma 2.6 is thus completed., and let f : → V be a strongly measurable function which satisfies for all Proof of Corollary 2.7. Throughout this proof let ∈ C 1 ( V, W ) be a function which sat- (1, f (s)) ∈ V ) in the notation of Lemma 2.6) establishes items (i)-(iii). The proof of Corollary 2.7 is thus completed. Observe that Lemma 2.4 (with V = V, a = a, b = b, F = f n for n ∈ AE in the notation of Lemma 2.4) shows that for all n ∈ AE, t ∈ it holds that The assumption that The dominated convergence theorem therefore proves that for every t ∈ it holds that lim sup This and imply that for all t ∈ it holds that The fact that g ∈ C(, V ),, and Lemma 2.. The proof of Lemma 2.8 is thus completed., and assume for all Proof of Proposition 2.9. Throughout this proof let Next observe that the assumption that Moreover, note that the assumption that for all Combining the fact that for all ∈ (0, ( n ∈ [2, ∞) ∩ AE, x ∈ V in the notation of Lemma 2.8), and the assumptions that Hence, we obtain that for all s ∈ (t 0, t), x ∈ V it holds that This and imply that for all s Combining this with items (A)-(C) completes the proof of Proposition 2.9. Continuity of solutions to initial value problems In this section we prove in Corollary 3.8 joint continuity of the solution to a Banach space valued ODE with respect to initial value, initial time, and current time. More precisely, we first apply Lemma 3.1 to prove a local existence and uniqueness result for initial value problems in Lemma 3.2. Then we combine Lemma 3.2, Lemma 3.3, Corollary 3.4, and Lemmas 3.5-3.7 to establish Corollary 3.8. Hence, we obtain that for all This shows that for all Moreover, observe that the fact that X and Y are continuous ensures that X = Y and X = Y. Combining this with demonstrates that = a and = b. The proof of Lemma 3.1 is thus completed. Proof of Lemma 3.2. Throughout this proof let A be the set given by Note that for all This ensures that there exist functions B s, Next observe that and demonstrate that for all This shows that for all Banach's fixed point theorem hence proves that there exist continuous functions X and Combining this and Lemma 3. Then Proof of Lemma 3.3. Note that and the hypothesis that f : The proof of Lemma 3.3 is thus completed. is uniformly continuous. Proof of Lemma 3.5. Throughout this proof let, L ∈ be real numbers which satisfy that and let M ∈ be the extended real number given by Note that Lemma 3. Proof of Lemma 3.6. Throughout this proof let f 0,1 : Moreover, observe that the fact that is compact ensures that there exist n ∈ AE, t 1,..., t n ∈ such that This and demonstrate that there exist n ∈ AE, t 1,..., t n ∈ such that for all x ∈ V, Hence, we obtain that for all t The proof of Lemma 3.6 is thus completed. t ) t∈ : → V be a continuous function which satisfies for all Proof of Corollary 3.8. Throughout this proof we denote by ∠ T ⊆ 2 the set given by and let ∈ (0, ∞). Note that Lemma 3.6 (with V = V, T = T, x 0 = x, f = f for x ∈ V in the notation of Lemma 3.6) shows that there exists a function r : V → (0, ∞) such that for every x ∈ V it holds that is a uniformly continuous function. Furthermore, note that the fact that ∀ This demonstrates that there exist real numbers j ∈ (s 0, t 0 ), j ∈ ∩ AE, such that for all j ∈ ∩ AE it holds that Moreover, note that Furthermore, observe that (with t = s j, = j for j ∈ ∩ AE) ensures that x ∈ V in the notation of Lemma 3.7) ensure that there exist j ∈ (0, min{1, s j,X x 0 In addition, note that (with s = s 0, x = x 0 ) shows that there exists 0 ∈ (0, min{1, Combining this with and implies that for all s ∈ [0, Hence, we obtain that there exists ∈ (0, ∞) such that for all (s, t, The proof of Corollary 3.8 is thus completed. Continuous differentiability of solutions to initial value problems In this section we prove in Lemma 4.8 (cf., e.g., Driver ) differentiability properties of solutions to initial value problems. In order to do so, we recall a few elementary auxiliary results in Lemmas 4.1-4.3 (cf., e.g., Driver ), Lemma 4.4 (cf., e.g., Driver ), and Lemmas 4.5-4.6. Then we combine them to establish continuous differentiability of the solution to the considered initial value problem with respect to the initial data in Lemma 4.7. In addition, we establish in Lemma 4.8 continuous differentiability of the solution to the considered initial value problem with respect to the initial time as well as the current time. Hence, we obtain that for all s ∈ , t, u ∈ it holds that In addition, note that for all s, u, t ∈ with s, u ∈ it holds that Combining and assures that for all s, t, u, v ∈ with s ≤ t, u ≤ v, and u ≤ t it holds that The dominated convergence theorem hence completes the proof of Lemma 4.1. This ensures that for all y, g, h ∈ C(∠ T, V ) it holds that sup (s,t)∈∠ T Combining this with shows that for all y ∈ C(∠ T, V ) it holds that The proof of Lemma 4.3 is thus completed. Proof of Lemma 4.4. Throughout this proof let o 1, o 2 : X X → Z be the functions which satisfy for all x, h ∈ X that and Observe that and imply for all x, h ∈ X that Moreover, note that the fact that f is continuous and the assumption that g is differentiable assure that for every x ∈ X there exists a function w : X → [0, ∞) such that for every h ∈ X it holds that lim sup X∋u→0 w(u) = 0 and This shows that for every x ∈ X there exists ∈ (0, ∞) such that for all h ∈ X with h X < it holds that Equation hence proves that for every x ∈ X there exists ∈ (0, ∞) such that for all h ∈ X with h X < it holds that Therefore, we establish that for every x ∈ X there exists ∈ (0, ∞) such that for all h ∈ X with h X < it holds that Furthermore, note that the fact that ensures that for every x ∈ X there exists ∈ (0, ∞) such that for all h ∈ X with 0 < h X < it holds that Equation hence proves that for every x ∈ X there exists ∈ (0, ∞) such that for all h ∈ X with 0 < h X < it holds that This shows that for every x ∈ X there exists ∈ (0, ∞) such that for all h ∈ {y ∈ X : Combining this with implies that for every x ∈ X it holds that lim sup Equation therefore establishes that for every x ∈ X there exists ∈ (0, ∞) such that for all h ∈ X with 0 < h X < it holds that This,, and demonstrate that f is differentiable and that item (ii) holds. The fact that in the notation of Lemma 4.1)) and (f n+1 (x))(s, t) = (f n (f 1 (x)))(s, t), and let N ⊆ AE satisfy that Note that for all x, y ∈ C(∠ T, V ), (s, t) ∈ ∠ T it holds that This implies that 1 ∈ N and that f 1 is continuous. Moreover, observe that for all n ∈ N, The fact that 1 ∈ N hence shows that N = AE. This proves that for all n ∈ AE, x, y ∈ C(∠ T, V ), In particular, for all m, n ∈ AE, x ∈ C(∠ T, V ), (s, t) ∈ ∠ T it holds that Therefore, we establish that for all m, n ∈ AE, x, y ∈ C(∠ T, V ) it holds that This ensures that for every Moreover, note that for all Combining this with and the fact that f 1 : C(∠ T, V ) → C(∠ T, V ) is continuous demonstrates that there exists z ∈ C(∠ T, V ) such that In addition, note that implies that for all N ∈ AE, x, y ∈ C(∠ T, V ) with f 1 (x) = x, This and show that there exists a unique z ∈ C(∠ T, V ) such that f 1 (z) = z. The proof of Lemma 4.5 is thus completed. Lemma 4.6. Let (V, V ) be an -Banach space and let T ∈ (0, ∞), Then Proof of Lemma 4.6. Note that for all (s, t) ∈ ∠ T it holds that Gronwall's lemma hence shows that for all (s, t) ∈ ∠ T it holds that The proof of Lemma 4.6 is thus completed., v ∈ V in the notation of Lemma 4.5) shows that for every v ∈ V it holds that F (G(v)) ∈ L(C(∠ T, V ), C(∠ T, V )) is invertible. In addition, Lemma 4.6 (with, v ∈ V in the notation of Lemma 4.6) ensures that for every v ∈ V it holds that Moreover, observe that for all v ∈ V, (s, t) ∈ ∠ T it holds that Next we intend to prove that G ∈ C(V, C(∠ T, V )). For this note that Corollary 3. The fact that for all v 0 ∈ V, ∈ (0, ∞) it holds that and the compactness of ∠ T prove that for all v 0 ∈ V, ∈ (0, ∞) there exist N ∈ AE, (s 1, t 1 ),..., (s N, t N ) ∈ ∠ T such that Combining this with demonstrates that for all v 0 ∈ V, ∈ (0, ∞) there exist This ensures that holds. Furthermore, note that H is continuously differentiable and that for all v, w ∈ V it holds that Equation hence shows that F G is continuously differentiable. This,,, the facts that for every v ∈ V it holds that F is continuously differentiable and F (G(v)) ∈ L(C(∠ T, V ), C(∠ T, V )) is invertible, and Lemma 4.4 (with X = V, Y = C(∠ T, V ), Z = (v) it holds that (∠ T V ∋ (s, t, x) → X x Next we intend to prove an upper bound for the l.h.s. of. To do so, we will estimate the terms on the r.h.s. of separately. For this note that the fact that ∀ x ∈ V : (∠ T ∋ (s, t) → X x s,t ∈ V ) ∈ C(∠ T, V ) shows that for all x ∈ V, s ∈ Alekseev-Grbner formula In this section we combine Proposition 2.9, Lemma 3.7, and Lemma 4.8 to establish in Corollary 5.2 an extension of the Alekseev-Grbner formula (cf., e.g., Hairer et al. ) for Banach space valued functions. Proof of Lemma 5.1. Throughout this proof let : V → W be the function which satisfies for all t ∈ R, x ∈ V, k ∈ AE that let 1,0 : V → W be the function which satisfies for all t ∈ R, x ∈ V, k ∈ AE that and let 0,1 : V → L(V, W ) be the function which satisfies for all t ∈, x ∈ V, k ∈ AE that Note that the fact that V ∋ (t, x) → (t, x) ∈ W is continuous ensures that ∈ C( V, W ). Combining this and proves that Moreover, note that items (i), (ii), and (v) of Lemma 4.8 (with V = V, T = T, f = f, X x s,t = X x s,t for (s, t) ∈ ∠ T, x ∈ V in the notation of items (i), (ii), and (v) of Lemma 4.8) and Lemma 5.1 (with V = V, W = V, a = s, b = t, = ( V ∋ (u, x) → X x u,t ∈ V ) for s ∈ in the notation of Lemma 5.1) ensure that for all s ∈ it holds that Combining item (ii), Lemma 3.7 (with V = V, T = T, f = f, X x s,t = X x s,t for (s, t) ∈ ∠ T, x ∈ V in the notation of Lemma 3.7), items (i) and (viii) of Lemma 4.8 (with V = V, T = T, f = f, X x s,t = X x s,t for (s, t) ∈ ∠ T, x ∈ V in the notation of items (i) and (viii) of Lemma 4.8), and Proposition 2., v ∈ , w ∈ in the notation of Proposition 2.9) hence demonstrates that for all (s, t) ∈ ∠ T it holds that Moreover, note that Lemma 2.
Trunk extensors endurance with arms parallel to the trunk is superior to other arms positions: Randomized controlled trial. Objectives To compare the effect of arms positions on the static endurance ability of trunk extensors, and to investigate the effect of home endurance training of trunk extensors on isokinetic outputs. METHODS The prospective, randomised, assessor-blinded, controlled- intervention study was conducted from December 2017 to October 2019 at the College of Medical Rehabilitation Sciences, Taibah University, Madinah, Saudi Arabia, and comprised males aged 20-24 years who were randomly assigned to one of the four groups. Group A had their hands above the head, group B had their hands behind the head, group C had their hands parallel to their trunk, and group D had their hands on the chest. Data was collected at baseline, and after 6 and 8 weeks of static trunk extensors endurance training. Isokinetic outputs of peak torque and average power were also measured. Data was analysed using SPSS 23. RESULTS Of the 60 participants, 15(25%) were in each of the four groups. The overall mean age was 22.02±1.2 years. At baseline, there was no significant difference among the groups (p>0.05). There was significant intra-group improvement for all outcome variables after 6 and 8 weeks of training (p<0.05). CONCLUSIONS Static endurance of the trunk extensors with having arms parallel to the trunk was superior to other arm positions, especially after six and eight weeks of training but didn't affect the isokinetic outputs. Clinical Trial Number NCT03107676.
<gh_stars>0 #include <iostream> using namespace std; int main() { ios::sync_with_stdio(false); int t; cin >> t; for (int l = 1; l <= t; l++) { int n, m, k; cin >> n >> m >> k; int p[n][m]; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { cin >> p[i][j]; if (i > 0) { p[i][j] += p[i - 1][j]; } } } int max_area = 0; int max_price = 0; for (int i1 = 0; i1 < n; i1++) { for (int i2 = i1; i2 < n; i2++) { int j1 = 0; int j2 = -1; int price = 0; while (j1 < m) { if (price <= k) { int area = (j2 - j1 + 1) * (i2 - i1 + 1); if (max_area < area) { max_area = area; max_price = price; } else if (max_area == area && max_price > price) { max_price = price; } j2++; if (j2 == m) { break; } price += p[i2][j2] - (i1 > 0 ? p[i1 - 1][j2] : 0); } else { price -= p[i2][j1] - (i1 > 0 ? p[i1 - 1][j1] : 0); j1++; } } } } cout << "Case #" << l << ": " << max_area << ' ' << max_price << endl; } }
Changes on the Development of Rigor Mortis in Cultured Tilapia (Oreochromis niloticus) Fed with a Mixture of Plant Proteins In recent years it has been pointed out that the feed of farmed fish has an effect on the quality of the final product. Therefore, this study evaluated the effect of fishmeal (FM) replacement by a mixture of plant protein (MPP) on the development of rigor mortis of tilapia (Oreochromis niloticus). One hundred and twenty fish at an initial average weight of 123±6.3g were fed with three extruded isonitrogenous and isolipidic 6.2% crude lipids experimental diets, in which FM were replaced by 0% (D0), 50% (D50), and 100% (D100) of MPP (soybean meal, corn meal, wheat meal, and sorghum meal). A reference diet (DC) containing FM as the main protein source was used as a control. The fish were divided into triplicate groups per dietary treatment. The experiment was conducted in a tank system at 26.8°C water temperature for 67 days. The chemical composition of experimental diets and muscle were determined. The glycogen, adenosine 5-triphosphate (ATP) and related compounds, pH, shear force, and rigor index (RI%) were monitored during storage on ice for 48h. The results indicated that FM replacement affected (p≤0.05) the muscle composition, where the fish fed with D100 presented the higher content of lipids and ash. Fish fed with D0 and DC presented a more pronounced onset of rigor mortis and also showed a higher IR%, a lower content of glycogen, ATP, adenosine 5-diphosphate (ADP), adenosine 5-monophosphate (AMP), pH, and shear force. The changes in chemical composition of muscle and other parameters evaluated indicated that FM replacement increases energy reserves (glycogen, ATP, ADP, and AMP) which delayed the onset of rigor mortis, as well as a lower pH and shear force in the muscle of tilapia. Therefore, the substitution of FM by MPP could contribute to delaying the onset of rigor mortis and with this, the quality and shelf life of tilapia could be increased. Introduction e Nile tilapia is a tropical fish with rapid growth rate, good quality flesh, high resistance to disease, adaptability to a wide range of environmental conditions, ability to reproduce and grow in captivity, and feeds efficiently on natural fauna and flora. e world production of tilapia in 2015 was 5,576,800 mt and is expected to increase in the coming years. Tilapia culture is considered as a dynamic activity and is increasing. Currently, consumption of tilapia fish has been widely accepted by consumers. Besides being considered as an excellent food source, culture of tilapia represents a potential source of income. e development and profitability of fish cultivation such as tilapia depends inevitably on the availability of commercial foods that meet the essential nutrients requirements to ensure optimal growth and performance of the fish. However, a factor that represents the largest expenditure of operations in fish culture is the balanced feed. e fish under culture require high levels of protein to meet their nutritional requirements. To accomplish this, fishmeal (FM) is used as the main ingredient because it has high palatability and high nutritional value; however, it is very expensive and is not always available. For this reason the search for alternative sources that are suitable, inexpensive, and available to replace fishmeal with plant protein is under course. At present, one plant protein source used for the partial replacement of fishmeal in feed is soybean meal, which has high protein content, it is abundant and at low cost. Other alternative proteins used are wheat, sorghum, corn meal products, and byproducts of terrestrial animals such as blood meal, feather, and bone steak. ese sources have been used because of their viability as a replacement and low cost. ose alternative sources have been found to promote a performance similar or better than that obtained with formulations containing fishmeal. Currently, research in fish cultivation has focused on improving production system, such as knowledge of reproductive physiology, genetic aspects, and nutritional requirements. However, product quality aspects have been overlooked. It has been described that the muscle quality of any aquatic organism (fish, crustaceans, and molluscs) decreases immediately after the capture and death of the animal, and due to the fact that the blood circulation stops, the oxygen transport and the natural defenses against bacteria cease. Consequently, an anaerobic condition is generated in the muscle and the tissue becomes more susceptible to deterioration. From there, a series of biochemical changes are developed, such as rigor mortis, energy production, autolysis by endogenous proteases, degradation of adenosine-5-triphosphate (ATP), pH decrease, and protein denaturation. ese changes cause an increase in the ammonia concentration, TMA, peptides, and other amines, as well as changes in color, texture, taste, and odor. Of these changes, rigor mortis is one of the most important postmortem events in the muscle of different fish species; it starts immediately after death of fish, when the glycogen reserves and ATP are depleted, or if the fish is stressed, and is manifested by stiffness and muscle inextensibility. In fish muscle, ATP is metabolized according to the following sequence: ATP ⟶ adenosine-5-diphosphate (ADP) ⟶ adenosine-5-monophosphate (AMP ⟶ inosine-5-monophosphate (IMP ⟶ inosine (HxR) ⟶ hypoxanthine (Hx). ATP rapidly decreases within the first 24 h postmortem, and depending on the rate of degradation of the ATP, it will impact on the rate of onset of rigor mortis. As a consequence, the quality of the product is affected, modifying appearance, water holding capacity, color, and texture of the final product. Different studies have evaluated factors related to the development of rigor mortis such as species, stress, fasting, acclimation temperature, and method of slaughter. However, to date there are no studies of how diet, composition, and origin of ingredients affect the rigor mortis of the organisms. is study was carried out to evaluate physics, chemistry, and biochemistry changes on the development of rigor mortis in tilapia (Oreochromis niloticus) fed with a mixture of plant proteins. Likewise, a growth trial was carried out to show that the fish were growing normally using the MPP (the results of this trial is not shown). Experimental Diets. ree extruded isonitrogenous and isoenergetic experimental diets (37% crude protein) were formulated replacing 0% (D0), 50% (D50), and 100% (D100) of the protein from fishmeal (FM) by a mixture of plant proteins (soybean meal, corn, wheat, and sorghum) ( Table 1). e D0 was formulated to simulate a commercial diet, while a commercial diet was used as a reference diet (DC) containing FM as the main protein source was used as control. Prior to the preparation of the experimental diets, all ingredients were pulverized and sieved through a 500 m mesh sieve. Dry ingredients of each diet were mixed thoroughly in a food mixer and oil (mixed fish oil and soybean lecithin) was added. Once the oil was dispersed in the dry ingredients, water was added to make a homogenous mixture. e resulting mixture was extruded using a simple Brabender laboratory screw extruder (Model E 19/25 D, Instruments Inc., South Hackensack, NJ, U.S.A) with the following characteristics: four heating zones, screw compression force 1 : 1, longitude/diameter relation (L/D) 20 : 1, and internal diameter of the exit die being 3 mm. e pellets were dried during the extrusion process, obtaining a moisture content between 8.8 and 8.9%, were manually reduced to approximately 0.35 mm, and stored in sealed polyethylene bags at 4°C until use. Growth Trial. A 67-day growth trial was conducted in an outdoor tank water system with 90% daily water exchange, at the Wet Laboratory of Department of Scientific and Technological Research of the University of Sonora. e experimental system consisted of 16 tanks of 250 L capacity, which were filled with 230 L of water. Each dietary treatment was randomly assigned to four replicate tanks to evaluate the effects on biological performance of tilapia. Oreochromis niloticus adults were obtained from the fish farm Crilab at La Victoria, Sonora, Mexico. ey were fed with 38% crude protein (CP) commercial diet three times daily for 10 days while acclimating to the laboratory conditions. Ten tilapia of similar size were randomly assigned in each tank at a density of 67 per m 3 with an average size and weight of 18.8 ± 0.3 cm and 123 ± 6.3 g. Tilapia were fed ad libitum three times daily (09 : 00, 13 : 00, and 17 : 00 h). e feeding rate was adjusted to 2.5% of the body weight, by weighing fish weekly. Uneaten feed and fecal wastes were removed daily before the next feeding. Sampling Procedures. Once the feeding trial was over, the water level in the tanks was reduced, and ice was added; therefore, the specimens were slaughtered by immersion in water/ice slurry. ey had an average size and weight of 22.5 ± 0.1 cm and 223.1 ± 9.7 g, respectively. Immediately, ten slaughtered specimens per treatment were taken at random for the rigor index (RI%) evaluation. Slaughtered fish were placed on ice inside a hermetic cooler and transported to the Laboratory of Food Research at the University of Sonora. Fish samples were divided into two lots; one consisted of whole fish, which were stored for 48 h in ice and used to evaluate the effect of feed on rigor index in the whole fish. For the second lot, the fish was filleted, packed in polyethylene bags, and stored for 48 h in ice. At intervals of 6 h, samples of fillets were obtained, frozen, and stored at −80°C until analysis. ATP concentration, glycogen, pH, and shear force were determined for each sampling time. For each sampling time 6 fillets were analyzed. Chemical Analysis. e chemical composition of the formulated diets and muscle of the tilapia after the bioassay were determined according to the standard methods reported in the AOAC. Moisture, protein, lipid, ash, and crude fiber were determined. Samples were dried in a convection oven at 105°C for 5 h to determine moisture content. Crude protein (CP) was analyzed by Kjeldahl method and calculated from sample N content (total nitrogen 6.25 � CP). Crude fat was analyzed using an FOSS semiautomatic extraction system (ST 243 Soxtec) with petroleum ether as the extracting solvent, and ash was determined by incineration at 550°C in a muffle furnace. Crude fiber was loss on ignition of dried residue remaining after digestion of sample with 1.25% H 2 SO 4 (w/v) and 1.25% NaOH (w/v). 2.6. pH. e pH assays were carried out following the method described by Woyewoda et al.. e measurement of pH was carried out using a Hanna HI 90140 penetration pH meter (Hanna Instruments, Inc.). Equipment was calibrated daily with commercial standard solutions. ATP and Related Compounds. Quantification of ATP, ADP, AMP, IMP, HxR, and Hx was carried out by a reversephase high performance liquid chromatography procedure (HPLC) from a perchloric acid extract described by Ryder e identification of nucleotides, nucleosides, and bases was made by comparing their retention times with those of commercially obtained standards and by adding or spiking of standards. Twenty L of diluted extract was filtered through a 0.2 m filter and then injected in a Agilent Technologies (Modelo 260 Infinity Series) chromatograph, using a C-18, 4.6 150 mm (Agilent Technologies) reversephase column. Mobile phase consisted of a phosphate buffer consisting of 0.04 M KH 2 PO 4 and 0.06 M K 2 HPO 4. A 1 mL/ min flow was applied, carrying out the detection at 254 nm in a UV-Vis detector Varian Prostar 325 (Varian Inc., Lake Forest, CA). Results were expressed as mol/g of sample. 2.8. Shear Force. Measurement of shear force was used to evaluate texture in tilapia muscle using a Warner-Bratzler blade in a testing machine (Model EZ TEST EZ-S, Shimadzu Corp.) equipped with a 50 kg cell. e crosshead speed was set at 20 cm/min and shearing force was transversally applied to the direction of the muscle fibers. Standardized cuts of 10 mm wide 10 mm thick 20 mm long of the upper back zone were used, and necessary force (N) to shear the muscle was recorded. Before the texture measurements, the cuts were acclimatized to room temperature and covered with cling wrap. Rigor Index (RI%). Measurement of the rigor mortis was based on the tail curvature according to Bito et al.. e fish was placed on a horizontal table with half the body (tail part) spread out from the edge of the table. At selected time intervals (2,6,12,24,36,42, and 48 h), the rigor index was determined by the following equation: IR � 100, where L represents the vertical distance between the base of the caudal fin and the table surface measured immediately after death (L o ) and during storage (L t ). Statistical Analysis. Analyses were performed with the NCSS 2000 statistics software (NCSS, Kaysville, UT). Descriptive statistics (mean and standard deviation), one-way ANOVA, and multiple comparison by Tukey's test were applied. A significance level of 5% was used. For the chemical composition three samples (n � 3) were analyzed, while for the growth trial and rigor index ten organisms (n � 10) were used, and for the rest of the determinations six samples (n � 6) were used. Chemical Composition of Experimental Diets. e crude protein of experimental diets averaged was 37.6%, while the commercial diet had 38.0% (Table 1). Crude lipids averaged were 6.2% for D100, D50, and D0, compared to 4.6% in DC. Mean ash content of D0, 50, and 100 ranged from 5.6 to 5.7% compared to 8.8% in DC. Significant differences (p ≤ 0.05) between the commercial (DC) and experimental diets were found with respect to lipid and ash content. Despite variations found in the different diets, all components are within the optimum range for this species. It is important to mention that in the majority of the studies where FM replacement by mixtures of plant sources has been evaluated, supplementation of diets with essential amino acids has been used to achieve a good growth of organisms. However, in this study no supplementation was used and good growth of the organisms was obtained. Chemical Composition of Tilapia Muscle. e proximate composition of tilapia muscle is shown in Table 1. No significant differences (p > 0.05) were found in moisture, protein, and fiber content, while muscle lipids content of fish fed with D100 (5.3 ± 0.1%) was significantly higher (p ≤ 0.05) compared to the other treatments (4.3-4.6%). Ash showed a similar trend. ere are some discrepancies in studies where the effect of FM replacement by plant sources has been evaluated by changes in proximate composition. Some studies have not found any effects of MPP on the whole-body protein, lipid, and ash contents in turbot Psetta maxima, in rainbow trout Oncorhynchus mykiss, in carp, and in yellowtail. Contrary to this, Wang et al. described that muscle composition of grouper (Epinephelus akaara) was significantly affected by the dietary carbohydrate level and when the levels of carbohydrate were increased, this generated a linear increase in liver glycogen. In this regard, it has been described that Nile tilapia are capable of utilizing high levels of various carbohydrates in feed and are used efficiently as a source of energy, while excess is stored as body fat. Moreover, it has been reported that muscle lipid composition of farmed fish is strongly influenced by the composition, digestibility, amount of food, and unbalance of nutrients, as well as feeding management strategy. A possible explanation to the changes in composition of muscle of this study could be attributed to the variety, preprocessing, and good digestibility of plant protein sources used to replace FM. is reflected on the organisms fed with the highest percentages of replacement that presents a greater accumulation of lipids in the muscle compared with the control food; this is in accordance with the report by Kikuchi. However, this study did not carry out the determination of the digestibility of the diets, so it would be necessary to carry out further research to be able to elucidate if the changes in composition were due to that factor or to other factors. e main energy source to maintain the physiological level of ATP in the muscle tissue is the glycogen degradation. Figure 1 shows the results of the concentrations of glycogen in muscle of tilapia. Initial glycogen values between 5.2 ± 0.1 and 5.7 ± 0.2 mgg −1 muscle were found, with fish fed with the D50 and D100 diets where the highest glycogen concentrations were obtained. ese results are superior to those reported by Cappeln and Jessen who reported an initial value of 0.2 mgg −1 muscle of cod (Gadus morhua). e variation of these results may be due to the species, as well as the location of the muscle area where the sample was taken. In this study it was observed that after 48 h postmortem, glycogen concentration decreased significantly (p ≤ 0.05), being fish fed with D0 and DC treatment who presented the lowest values, probably because there was fewer initial glycogen available. Montoya-Meja et al. described that even though carbohydrates of plant sources used in fish feed are not the main source of energy, they are vital for the organism since the quality and quantity of these could interfere with digestion of other nutrients and optimal development of fish. It has also been observed that omnivorous fish such as tilapia are highly tolerant of carbohydrates and are used as a source of energy and the excess can be stored as glycogen and body lipids. According to this, the differences found in the glycogen content could be related to a greater digestibility and assimilation of the nutrients of D50 and D100 diets, and therefore a greater amount of energy was available for growth, while the excess was stored as glycogen and lipids. ATP and Related Compounds. In this study, it was found that the initial concentration from ATP of muscle in all treatments was low (0.12 ± 0.0 molg −1 ) (Figure 2(a)). ese results are similar to those reported by Castillo-Yez et al. and Tom et al. who found 0.08 and 0.2 molg −1 of ATP in the muscle of tilapia (O. niloticus) and pacu (Colossoma sp.), respectively. However, it is less than 3.59 molg −1 of ATP in the muscle of tilapia (O. niloticus) reported by Oliveira-Filho et al.. e differences observed between studies may be due to the species and size of the fish, muscle type, season, or time of year and the site of capture or harvest, in addition to the degree of stress. With respect to ADP and AMP concentration at the beginning of storage, an initial value of 0.19 ± 0.0 and 0.3 ± 0.0 molg −1 was found, respectively (Figures 2(b) and 2(c)). ese results are similar to those reported by Castillo-Yez et al. and Ocao-Higuera et al. who found <0.5 molg −1 of ADP and AMP in the muscle of tilapia (O. niloticus) and cazon fish, respectively. On the other hand, the predominant nucleotide in the tilapia fish muscle after the harvest was IMP with an initial value of 7.6 ± 0.5 mol g −1 (Figure 2(d)). e high concentration of IMP in this study indicated a rapid degradation of ATP into IMP. e initial IMP value obtained is lower than that reported byzogul et al. for catfish (12.6 molg −1 ). With respect to HxR and Hx concentration, an initial value of 0.19 ± 0.0 and 0.3 ± 0.0 molg −1 was found, respectively (Figures 2(e) and 2(f)). After 48 h postmortem, ATP, ADP, AMP, and IMP levels decreased (p ≤ 0.05) and the organisms fed with D0 and DC showed the lowest values, followed by D50 and D100. It has been reported that immediately after the fish dies, the muscles are relaxed, but as ATP content decreases, bond between actin and myosin is irreversible and the muscle goes into rigor mortis. In this study, this fact was reflected mainly in organisms of treatment D0, which showed a lower initial glycogen content, and subsequently a decrease of this component possibly due to stress generated before and during slaughter. An ATP-producing pathway in the initial postmortem stages is carried out by the enzyme adenylate kinase, which converts two molecules of ADP into one of ATP and another of AMP. is is related to the decrease in ADP concentration which was used as a supply of energy in the muscle during storage. On the other hand, the HxR and Hx concentration were significantly increased (p ≤ 0.05). e changes found in the ATP content and related compounds in the different treatments can be related to the content of energy reserves of the muscle, since the organisms fed D50 and D100 presented higher content of glycogen. is could probably be the result of higher digestibility and utilization of the nutrients of the diet and was reflected in the increase of the available energy reserves to the process of rigor mortis. 3.5. pH. Immediately after the death of the organism, the muscle has a near neutral pH, which can vary from 6.0 to 7.0 by different factors such as species, nutritional status of the fish, and stress suffered at the time of catching and the slaughter. Organisms initially presented a pH of 6.79 ± 0.02, as shown in Figure 3. is result is similar to that described by Tulli et al. who found a pH of 6.74 in the muscle of European bass (Dicentrarchus labrax). Huss described that usually postmortem initial pH varies by species and may be slight variations within the same species. In this study it was observed that after 48 h postmortem, muscle pH decreased significantly (p ≤ 0.05), being the fish fed with D0 and DC who showed the lower pH values. is indicates an increase in the rate of postmortem events, where these include excessive muscle activity. A possible explanation for this is that having a lower final pH indicates a higher degree of stress, decreased energy reserves (glycogen and ATP), and thus a rapid acceleration of rigor mortis. e postmortem pH decreases during rigor mortis due to the conversion of glycogen to lactic acid, which is the final product of anaerobic glycolysis in most fish products. Likewise, when the muscle pH decreases rapidly in the early hours postmortem, high intramuscular acidity reduces the net charge on the surface of muscle proteins causing them to partially denature and lose their ability to maintain a strong structure and water holding capacity. e decrease rate of pH was very similar for all treatments and can be related to the content of energy reserves. However, the organisms fed D0 and DC were the ones that presented lower pH values, which correlates with the lower content of glycogen, ATP, ADP, and AMP. ese reserves were exhausted faster and were reflected in a lower value of pH and a rapid onset of rigor mortis. 3.6. Shear Force. As shown in Figure 4, organisms initially presented a shear force mean of 10.43 ± 0.3 N. e shear force of organisms fed with D0 was significantly (p ≤ 0.05) lower than the DC, D50, and D100 treatments. ese differences may be due to the fact that fish fed with D0 had the lowest pH, which could affect the initial shear force. is result is similar to that reported by Surez et al. who found value of 11.82 N in the muscle of cultivated Denton (Dentex dentex). However, it is greater than 8.5 N reported by Duran et al. in the muscle of rainbow trout (Oncorhynchus mykiss). e differences could be due to the species, fish size, and part of the muscle where the shear force was measured as well as the method of slaughter. In the same Figure 4, it can be observed that at 12 h postmortem all treatments showed a marked decrease (p ≤ 0.05) of shear force; this behavior continued until 48 h, being fish fed with D0, the treatment that had the highest decrease in this parameter compared to the other treatments. is behavior was expected and was consistent with decreasing pH and energy reserves found in this treatment. Several studies have described that the changes in the texture of fish muscle are the result of the modification of the extracellular matrix and collagen degradation as a result of decreasing pH, as well as by the activity of endogenous enzymes (autolysis) on myofibrillar proteins. Figure 5 shows the results of rigor index behavior of all treatments stored during 48 h. e initial value of IR was 31 ± 4.5%. Afterward, at 24 h this value increased in all treatments to 66-77% (minimum and maximum values), being the fish fed with D0 who showed the fastest rigor, and it was significantly different (p ≤ 0.05) with respect to the other treatments. Subsequently, the RI increased significantly (p ≤ 0.05) until 48 h and the maximum values achieved were 76-88% (minimum and maximum values). A possible explanation for the observed differences in rigor mortis could be related to the change in the chemical composition and energy reserves of the muscle. It was observed that the organisms fed with the highest proportions of plant sources (D100) had a higher content of muscle lipids, higher energy sources such as glycogen, ATP, ADP, and AMP, which could delay the rigor mortis process. Rigor Index (RI%). is behavior is desired, since it has been observed that delaying the onset of rigor mortis generates products of better quality and longer shelf life. Contrary to this, it was observed that the fish fed with D0 and DC presented lower energy reserves, resulting in a lower pH value and a decrease in shear force of the muscle and this contributed to a pronounced rigor mortis. Conclusions e results of the present study indicated that the substitution of FM by MPP modifies the chemical composition of the tilapia muscle as well as its energy reserves, which contributes to delaying the onset of rigor mortis, which could allow increasing the quality and shelf life of the tilapia muscle. In addition, these sources of vegetable protein (MPP) are available locally and at a lower cost than fishmeal (FM), so their use would reduce production costs and improve the sustainability of tilapia culture. Data Availability e data used to support the findings of this study are available from the corresponding author upon request. Conflicts of Interest e authors declare that they have no conflicts of interest.
<filename>blerq/src/main/java/com/gloomyer/blerq/BleRqClient.java package com.gloomyer.blerq; import android.Manifest; import android.app.Activity; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothManager; import android.bluetooth.le.BluetoothLeScanner; import android.bluetooth.le.ScanCallback; import android.bluetooth.le.ScanFilter; import android.bluetooth.le.ScanResult; import android.bluetooth.le.ScanSettings; import android.content.Context; import android.content.pm.PackageManager; import android.os.Build; import android.os.Handler; import android.os.Looper; import androidx.annotation.NonNull; import androidx.core.content.ContextCompat; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentActivity; import androidx.fragment.app.FragmentManager; import androidx.lifecycle.Lifecycle; import androidx.lifecycle.LifecycleObserver; import androidx.lifecycle.LifecycleOwner; import androidx.lifecycle.OnLifecycleEvent; import com.gloomyer.blerq.callback.BleRqScanCallback; import com.gloomyer.blerq.code.BleRqError; import com.gloomyer.blerq.exception.BleRqException; import com.gloomyer.blerq.log.BleRqLogger; import com.gloomyer.blerq.utils.ContextUtils; import com.gloomyer.blerq.utils.PermissionUtils; import java.io.File; import java.util.List; import java.util.UUID; /** * Time: 1/13/21 * Author: Gloomy * Description: Ble rq client 必须通过builder 对象构建 */ public class BleRqClient implements LifecycleObserver { private final long scanTimeout; //扫描超时时间 private final ScanSettings scanSettings; private final List<ScanFilter> scanFilters; //扫描过滤 private final int writeFailedRepeatCount; //写失败的时候重试次数 private final Handler mHandler; private final BleRqLogger logger; private BleRqScanCallback scanCallback; private Context context; private BluetoothAdapter bmAdapter; private FragmentManager fm; //fragment manager 用于申请权限 private BluetoothLeScanner bluetoothLeScanner; private InnerScanCallback innerScanCallback; private UUID serviceUuid; private UUID writeChannelUuid; private UUID readChannelUuid; private UUID notifyChannelUuid; private ProxyDevice device; private String deviceAddress; private String deviceName; private BleRqClient(long scanTimeout, BleRqLogger logger, int writeFailedRepeatCount, UUID serviceUuid, UUID writeChannelUuid, UUID readChannelUuid, UUID notifyChannelUuid, ScanSettings scanSettings, List<ScanFilter> scanFilters, BleRqScanCallback scanCallback) { this.scanTimeout = scanTimeout; this.logger = logger; this.writeFailedRepeatCount = writeFailedRepeatCount; this.scanSettings = scanSettings; this.scanFilters = scanFilters; this.scanCallback = scanCallback; mHandler = new Handler(Looper.getMainLooper()); } private boolean isStart; //是否启动标示 /** * 开始连接 */ public void start() { synchronized (this) { if (isStart) { throw new BleRqException(R.string.blerq_just_call_once_start); } isStart = true; } //先检测系统ble环境 logger.info("start connection"); if (context == null) { throw new BleRqException(R.string.blerq_not_found_context); } //是否支持ble蓝牙 boolean standByBle = context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE); logger.info("standByBle: " + standByBle); if (!standByBle) { //不支持ble蓝牙 scanCallback.onError(BleRqError.DEVICE_NOT_SUPPORT); return; } //获取ble操作管理对象 BluetoothManager bm = (BluetoothManager) context.getSystemService(Context.BLUETOOTH_SERVICE); logger.info("found BluetoothManager:" + bm); if (bm == null) { scanCallback.onError(BleRqError.DEVICE_NOT_SUPPORT); return; } this.bmAdapter = bm.getAdapter(); logger.info("found Bluetooth Adapter:" + bmAdapter); if (bmAdapter == null) { scanCallback.onError(BleRqError.DEVICE_NOT_SUPPORT); return; } checkPermission(); } /** * 进行第2步 检测ble所需权限 */ private void checkPermission() { int p1 = ContextCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_ADMIN); int p2 = ContextCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH); int p3 = ContextCompat.checkSelfPermission(context, Manifest.permission.ACCESS_COARSE_LOCATION); int p4 = ContextCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION); boolean hasPermission = p1 == PackageManager.PERMISSION_GRANTED && p2 == PackageManager.PERMISSION_GRANTED && p3 == PackageManager.PERMISSION_GRANTED && p4 == PackageManager.PERMISSION_GRANTED; logger.info("checkPermission: " + "BLUETOOTH_ADMIN: {0}, BLUETOOTH: {1}, " + "ACCESS_COARSE_LOCATION: {2}, ACCESS_FINE_LOCATION: {3}, " + "hasPermission: {4}", p1, p2, p3, p4, hasPermission); if (fm == null && !hasPermission) { //没有权限 并且没有fm无法主动申请权限 报错给上层业务 scanCallback.onError(BleRqError.DEVICE_NO_PERMISSION); return; } if (hasPermission) { openBluetooth(); } else { PermissionUtils.requestPermission(fm, isGet -> { logger.info("request permission isGet: " + isGet); if (isGet) { openBluetooth(); } else { //权限申请失败了 scanCallback.onError(BleRqError.DEVICE_NO_PERMISSION); } }, Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH, Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION); } } /** * 第3步 打开蓝牙设备 */ private void openBluetooth() { logger.info("bmAdapter.isEnabled: {0}", bmAdapter.isEnabled()); if (!bmAdapter.isEnabled() && fm == null) { //蓝牙处于关闭状态 并且fm为空无法尝试打开,给上层业务报错 scanCallback.onError(BleRqError.DEVICE_BLUETOOTH_NOT_OPEN); return; } if (bmAdapter.isEnabled()) { scanDevice(); } else { PermissionUtils.requestOpenBluetooth(fm, isOpen -> { if (isOpen) { scanDevice(); } else { scanCallback.onError(BleRqError.DEVICE_BLUETOOTH_NOT_OPEN); } }); } } /** * 第4步 开始扫描设备 */ private void scanDevice() { logger.info("start scan device"); bluetoothLeScanner = bmAdapter.getBluetoothLeScanner(); if (bluetoothLeScanner == null) { scanCallback.onError(BleRqError.DEVICE_BLUETOOTH_NOT_OPEN); return; } innerScanCallback = new InnerScanCallback(); bluetoothLeScanner.startScan(scanFilters, scanSettings, innerScanCallback); mHandler.postDelayed(innerScanCallback.cancelCallback, scanTimeout); } /** * 第5步 开始连接设备 */ private void connectDevice() { logger.info("connect device.."); this.device.connect(context); } @SuppressWarnings({"unused", "RedundantSuppression"}) @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY) private void onDestroy(@NonNull LifecycleOwner owner) { onDestroy(); } public void onDestroy() { logger.info("开始释放资源"); logger.close(); if (bluetoothLeScanner != null && innerScanCallback != null) bluetoothLeScanner.stopScan(innerScanCallback); if (innerScanCallback != null && mHandler != null) mHandler.removeCallbacks(innerScanCallback.cancelCallback); innerScanCallback = null; bluetoothLeScanner = null; scanCallback = null; bmAdapter = null; if (device != null) device.close(); device = null; } private class InnerScanCallback extends ScanCallback { private final Runnable cancelCallback = new Runnable() { @Override public void run() { if (bluetoothLeScanner != null) bluetoothLeScanner.stopScan(InnerScanCallback.this); if (scanCallback != null) { logger.info("device scan timeout..."); scanCallback.onError(BleRqError.DEVICE_SCAN_TIMEOUT); } } }; private int found = 0; @Override public void onScanResult(int callbackType, ScanResult result) { super.onScanResult(callbackType, result); if (scanCallback != null) { boolean isSuccess; synchronized (this) { logger.info("onScanResult: address: {0}, name: {1}", result.getDevice().getAddress(), result.getDevice().getName()); isSuccess = scanCallback.isNeedConnDevice(callbackType, result); if (isSuccess) found++; } if (isSuccess && found == 1) { if (bluetoothLeScanner != null && innerScanCallback != null) bluetoothLeScanner.stopScan(innerScanCallback); if (innerScanCallback != null) mHandler.removeCallbacks(innerScanCallback.cancelCallback); innerScanCallback = null; bluetoothLeScanner = null; device = new ProxyDevice(result.getDevice(), logger); deviceAddress = device.getAddress(); deviceName = device.getName(); logger.info("成功扫描到设备: name: {0}, address: {1}", deviceName, deviceAddress); connectDevice(); } } } } /** * 获取ClientBuilder 对象 * * @param owner 宿主 如果设置了宿主 client会自动感知生命周期 来清理对象 和自动获取权限 和自动尝试打开蓝牙设备 * @return BleRqClientBuilder */ public static BleRqClientBuilder newBuilder(LifecycleOwner owner) { return new BleRqClientBuilder(owner); } /** * 获取ClientBuilder 对象 * 使用方法需要自行解决权限 和蓝牙开关问题 对象清理也需要自己实现 * * @return BleRqClientBuilder */ public static BleRqClientBuilder newBuilder() { return new BleRqClientBuilder(); } public static class BleRqClientBuilder { private final LifecycleOwner owner; private long scanTimeout = 15000; //扫描超时时间 private boolean enableLog = true; //是否启用log输出 private boolean enableLogFile = true; //是否启用输出到文件 private Integer logFileMaxExistDay; //日志文件最多存留天数 private File logFileDir; private int writeFailedRepeatCount = 3; //写失败之后的重试次数 private ScanSettings scanSettings; private List<ScanFilter> scanFilters; private BleRqScanCallback scanCallback; private UUID serviceUuid; private UUID writeChannelUuid; private UUID readChannelUuid; private UUID notifyChannelUuid; /** * 使用此构造方法 * 需要自行解决权限和蓝牙开关问题 对象清理也需要自己调用 */ public BleRqClientBuilder() { this(null); } /** * 获取ClientBuilder 对象 * * @param owner 宿主 如果设置了宿主 client会自动感知生命周期 来清理对象 和自动获取权限 和自动尝试打开蓝牙设备 */ public static BleRqClientBuilder newBuilder(LifecycleOwner owner) { return new BleRqClientBuilder(owner); } public BleRqClientBuilder(LifecycleOwner owner) { this.owner = owner; ScanSettings.Builder scanSettingsBuilder = new ScanSettings.Builder() .setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { scanSettingsBuilder.setCallbackType(ScanSettings.CALLBACK_TYPE_ALL_MATCHES); } scanSettings = scanSettingsBuilder.build(); } /** * 设置扫描超时时间 * * @param scanTimeout 超时时间 * @return this */ public BleRqClientBuilder setScanTimeout(long scanTimeout) { this.scanTimeout = scanTimeout; return this; } /** * 设置是否启用日志输出 * * @param enableLog 是否启用日志输出 * @return this */ public BleRqClientBuilder setEnableLog(boolean enableLog) { this.enableLog = enableLog; return this; } /** * 是否启用输出日志到文件 * * @param enableLogFile 是否启用输出日志到文件 * @return this */ public BleRqClientBuilder setEnableLogFile(boolean enableLogFile) { this.enableLogFile = enableLogFile; return this; } /** * 设置日志文件存储路径 * * @param logFileDir 日志文件存储路径 * @return this */ public BleRqClientBuilder setLogFileDir(File logFileDir) { this.logFileDir = logFileDir; return this; } /** * 设置扫描设置 * * @param scanSettings 扫描设置 * @return this */ public BleRqClientBuilder setScanSettings(ScanSettings scanSettings) { this.scanSettings = scanSettings; return this; } /** * 设置扫描过滤器 * * @param scanFilters 扫描过滤器 * @return this */ public BleRqClientBuilder setScanFilters(List<ScanFilter> scanFilters) { this.scanFilters = scanFilters; return this; } /** * 设置扫描回调 用于确定要连接哪个设备 * * @param scanCallback 设置扫描回调 * @return this */ public BleRqClientBuilder setScanCallback(BleRqScanCallback scanCallback) { this.scanCallback = scanCallback; return this; } /** * 设置写失败重试次数 * * @param writeFailedRepeatCount 写失败重试次数 * @return this */ public BleRqClientBuilder setWriteFailedRepeatCount(int writeFailedRepeatCount) { this.writeFailedRepeatCount = writeFailedRepeatCount; return this; } /** * 设置服务 uuid * * @param serviceUuid serviceUuid * @return this */ public BleRqClientBuilder setServiceUuid(UUID serviceUuid) { this.serviceUuid = serviceUuid; return this; } /** * 设置服务 uuid * * @param serviceUuid serviceUuid * @return this */ public BleRqClientBuilder setServiceUuid(String serviceUuid) { this.serviceUuid = UUID.fromString(serviceUuid); return this; } /** * 设置 写通道 uuid * * @param writeChannelUuid 写通道 uuid * @return this */ public BleRqClientBuilder setWriteChannelUuid(UUID writeChannelUuid) { this.writeChannelUuid = writeChannelUuid; return this; } /** * 设置 写通道 uuid * * @param writeChannelUuid 写通道 uuid * @return this */ public BleRqClientBuilder setWriteChannelUuid(String writeChannelUuid) { this.writeChannelUuid = UUID.fromString(writeChannelUuid); return this; } /** * 设置 读通道 uuid * * @param readChannelUuid 读通道 uuid * @return this */ public BleRqClientBuilder setReadChannelUuid(UUID readChannelUuid) { this.readChannelUuid = readChannelUuid; return this; } /** * 设置 读通道 uuid * * @param readChannelUuid 读通道 uuid * @return this */ public BleRqClientBuilder setReadChannelUuid(String readChannelUuid) { this.readChannelUuid = UUID.fromString(readChannelUuid); return this; } /** * 设置 通知通道 uuid * * @param notifyChannelUuid 通知通道 uuid * @return this */ public BleRqClientBuilder setNotifyChannelUuid(UUID notifyChannelUuid) { this.notifyChannelUuid = notifyChannelUuid; return this; } /** * 设置 通知通道 uuid * * @param notifyChannelUuid 通知通道 uuid * @return this */ public BleRqClientBuilder setNotifyChannelUuid(String notifyChannelUuid) { this.notifyChannelUuid = UUID.fromString(notifyChannelUuid); return this; } /** * 设置日志文件最多存留天数 * * @param logFileMaxExistDay 日志文件最多存留天数 * @return this */ public BleRqClientBuilder setLogFileMaxExistDay(Integer logFileMaxExistDay) { this.logFileMaxExistDay = logFileMaxExistDay; return this; } /** * 构建 ble rq client 对象 * * @return ble rq client */ public BleRqClient build() { if (scanCallback == null) { throw new BleRqException(R.string.blerq_must_set_scan_callback); } if (logFileDir == null) { logFileDir = ContextUtils.getAppContext().getExternalFilesDir("ble_rq_logs"); } //初始化日志组件 BleRqLogger logger = new BleRqLogger(enableLog, enableLogFile, logFileDir); if (logFileMaxExistDay != null) logger.setLogFileMaxExistDay(logFileMaxExistDay); if (serviceUuid == null || writeChannelUuid == null || readChannelUuid == null || notifyChannelUuid == null) { logger.info(R.string.blerq_must_set_all_channel); } BleRqClient manager = new BleRqClient(scanTimeout, logger, writeFailedRepeatCount, serviceUuid, writeChannelUuid, readChannelUuid, notifyChannelUuid, scanSettings, scanFilters, scanCallback); manager.context = ContextUtils.getAppContext(); if (owner != null) { owner.getLifecycle().addObserver(manager); if (owner instanceof Activity) { manager.context = (Context) owner; if (owner instanceof FragmentActivity) { manager.fm = ((FragmentActivity) owner).getSupportFragmentManager(); } } else if (owner instanceof Fragment) { manager.context = ((Fragment) owner).getContext(); manager.fm = ((Fragment) owner).getFragmentManager(); } } return manager; } } }
Comprehensive Cardiovascular Magnetic Resonance Assessment in Patients With Sarcoidosis and Preserved Left Ventricular Ejection Fraction BackgroundCardiac sarcoidosis (CS) may manifest as arrhythmia or even sudden cardiac death. Because patients with CS often present with nonspecific symptoms, normal electrocardiography, and preserved left ventricular ejection fraction, a reliable diagnostic tool for the work-up of CS is needed. Late gadolinium enhancementcardiovascular magnetic resonance has proven diagnostic value in CS but has some limitations that may be overcome by adding newer cardiovascular magnetic resonance mapping techniques. The aim of our study was to evaluate a comprehensive cardiovascular magnetic resonance protocol, including late gadolinium enhancement and mapping sequences in sarcoid patients with no symptoms or unspecific symptoms and preserved left ventricular ejection fraction. Methods and ResultsSixty-one sarcoid patients were prospectively enrolled and underwent comprehensive cardiovascular magnetic resonance imaging. Twenty-six healthy volunteers served as control group. Mean left ventricular ejection fraction was 65%; late gadolinium enhancement was only present in sarcoid patients (n=15). Sarcoid patients had a higher median native T1 (994 versus 960 ms; P<0.001), lower post contrast T1 (491 versus 526 ms; P=0.001), expanded extracellular volume (28 versus 25%; P=0.001), and higher T2 values (52 versus 49 ms; P<0.001) compared with controls. Among patients with values higher than the 95% percentile of healthy controls, most significant differences were observed for native T1 and T2 values. Most of these patients were late gadolinium enhancement negative. ConclusionsPatients with sarcoidosis demonstrate higher T1, extracellular volume, and T2 values compared with healthy controls, with most significant differences for native T1 and T2. While promising, the clinical significance of the newer mapping techniques with respect to early diagnosis and therapy of CS will have to be determined in future studies.
<gh_stars>1-10 import React from "react"; import classNames from "classnames"; // @material-ui/core components import { makeStyles } from "@material-ui/core/styles"; import MenuItem from "@material-ui/core/MenuItem"; import MenuList from "@material-ui/core/MenuList"; import Grow from "@material-ui/core/Grow"; import Paper from "@material-ui/core/Paper"; import ClickAwayListener from "@material-ui/core/ClickAwayListener"; import Hidden from "@material-ui/core/Hidden"; import Poppers from "@material-ui/core/Popper"; // @material-ui/icons import Person from "@material-ui/icons/Person"; import Notifications from "@material-ui/icons/Notifications"; import Dashboard from "@material-ui/icons/Dashboard"; import Search from "@material-ui/icons/Search"; // core components import CustomInput from "components/CustomInput/CustomInput"; import Button from "components/CustomButtons/Button"; import styles from "assets/jss/material-dashboard-react/components/rtlHeaderLinksStyle"; const useStyles = makeStyles(styles); export default function RTLNavbarLinks() { const classes = useStyles(); const [open, setOpen] = React.useState(null); const handleToggle = event => { if (open && open.contains(event.target)) { setOpen(null); } else { setOpen(event.currentTarget); } }; const handleClose = () => { setOpen(null); }; return ( <div> <div className={classes.searchWrapper}> <CustomInput formControlProps={{ className: classes.margin + " " + classes.search }} inputProps={{ placeholder: "جستجو...", inputProps: { "aria-label": "Search" } }} /> <Button color="white" aria-label="edit" justIcon round> <Search /> </Button> </div> <Button color={window.innerWidth > 959 ? "transparent" : "white"} justIcon={window.innerWidth > 959} simple={!(window.innerWidth > 959)} aria-label="Dashboard" className={classes.buttonLink} > <Dashboard className={classes.icons} /> <Hidden mdUp implementation="css"> <p className={classes.linkText}>آمارها</p> </Hidden> </Button> <div className={classes.manager}> <Button color={window.innerWidth > 959 ? "transparent" : "white"} justIcon={window.innerWidth > 959} simple={!(window.innerWidth > 959)} aria-owns={open ? "menu-list-grow" : null} aria-haspopup="true" onClick={handleToggle} className={classes.buttonLink} > <Notifications className={classes.icons} /> <span className={classes.notifications}>۵</span> <Hidden mdUp implementation="css"> <p onClick={handleToggle} className={classes.linkText}> اعلان‌ها </p> </Hidden> </Button> <Poppers open={Boolean(open)} anchorEl={open} transition disablePortal className={ classNames({ [classes.popperClose]: !open }) + " " + classes.popperNav } > {({ TransitionProps, placement }) => ( <Grow {...TransitionProps} id="menu-list-grow" style={{ transformOrigin: placement === "bottom" ? "center top" : "center bottom" }} > <Paper> <ClickAwayListener onClickAway={handleClose}> <MenuList role="menu"> <MenuItem onClick={handleClose} className={classes.dropdownItem} > محمدرضا به ایمیل شما پاسخ داد </MenuItem> <MenuItem onClick={handleClose} className={classes.dropdownItem} > شما ۵ وظیفه جدید دارید </MenuItem> <MenuItem onClick={handleClose} className={classes.dropdownItem} > از حالا شما با علیرضا دوست هستید </MenuItem> <MenuItem onClick={handleClose} className={classes.dropdownItem} > اعلان دیگر </MenuItem> <MenuItem onClick={handleClose} className={classes.dropdownItem} > اعلان دیگر </MenuItem> </MenuList> </ClickAwayListener> </Paper> </Grow> )} </Poppers> </div> <Button color={window.innerWidth > 959 ? "transparent" : "white"} justIcon={window.innerWidth > 959} simple={!(window.innerWidth > 959)} aria-label="Person" className={classes.buttonLink} > <Person className={classes.icons} /> <Hidden mdUp implementation="css"> <p className={classes.linkText}>حساب کاربری</p> </Hidden> </Button> </div> ); }
"""Main snoopy package.""" # Logging configuration import logging #logging.basicConfig(level=logging.DEBUG) #log = logging.getLogger(name='snoopy') import os import sys from collections import OrderedDict from ConfigParser import ConfigParser SRCDIR = os.path.dirname(__file__) class PluginRegistry(object): """Handles the loading and management of plug-ins. Plug-ins register in this registry by importing an instance of this class and decorating a callable with the `add()` method. Plug-ins are loaded from the directory specified in the `pluginsdir` variable. Once loaded, plug-ins are stored in the `self.plugins` dictionary. When loaded, the `self.plugins` dictionary has the following layout: self.plugins[groupname][plugin] = options where `groupname` is the group name specified as the first parameter to `add()`, `plugin` is the plug-in callable decorated with `add()` and `options` is a dictionary of the plug-in's name and title and any other keyword arguments to `add()`.""" pluginsdir = 'plugins' """The directory from where plug-ins are loaded, relative to this file.""" def __init__(self): self.plugins = {} def add(self, group, name, title, **options): """Decorator used by plug-ins to register with this registry. :param group: Name of the group that the decorated plug-in belongs to. This is the key under `self.plugins` that the plug-in is stored. :param name: The plug-in's internal (JSON-friendly) name. :param title: The plug-in's external (display-friendly) name. :param options: All keyword arguments (and name and title) are stored as plug-in options.""" options.update(dict(name=name, title=title)) if group not in self.plugins: self.plugins[group] = OrderedDict() def plugin_decorator(plugin): logging.debug('Registering plug-in: %r', plugin) self.plugins[group][plugin] = options return plugin return plugin_decorator def collect(self): """Collect plug-ins from the `plugins` directory.""" for fname in os.listdir(os.path.join(SRCDIR, self.pluginsdir)): parts = fname.split(os.extsep) if parts[-1] != 'py' or fname.startswith('__') or len(parts) != 2: continue # Not a valid Python file to import __import__('snoopy.%s.%s' % (self.pluginsdir, parts[0])) pluginregistry = PluginRegistry() class Config(object): def __init__(self): self._parser = ConfigParser() # Prevent the parser from changing the case of option names: self._parser.optionxform = str def __getitem__(self, secname): if secname not in self._parser.sections(): return {} section = self._parser._sections[secname].copy() if '__name__' in section: del section['__name__'] return section def from_file(self, fname): self._parser.read(fname) self._post_load() logging.debug('configuration loaded from %r', fname) return self._parser._sections def from_sysargv(self): if len(sys.argv) > 1: return self.from_file(sys.argv[1]) def _post_load(self): parser = self._parser for section in parser.sections(): for key in parser.options(section): val = parser.get(section, key) if val.lower() in ('true', 'false'): parser.set(section, key, val.lower() == 'true') config = Config()
<filename>scansite-server/src/main/java/edu/mit/scansite/server/updater/RunUpdater.java package edu.mit.scansite.server.updater; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Runs the database updater. This class can be used to instantiate a scansite * database. After the tables have been created with the appropriate SQL-Script, * simply run this program using the corresponding *.xml file. * * @author tobieh */ public class RunUpdater { private static final Logger logger = LoggerFactory.getLogger(RunUpdater.class); public static void main(String[] args) { try { Updater updater = new Updater(); updater.update(); } catch (ScansiteUpdaterException e) { logger.error(e.getMessage()); } } }
Inhaled Organophosphorus Poisoning Presenting as Superior Laryngeal Nerve Palsy: A Rare Case Poisoning by organophosphorus (OP) is a major clinical issue affecting many nations worldwide, especially developing nations. In this case report, we have highlighted organophosphate poisoning syndrome that resulted in paralysis of the vocal cords. A 28-year-old male patient with a history of accidental inhalation of the OP compound reported to our hospital with symptoms of vomiting and hoarseness of voice. He had nasal regurgitation and hoarseness having both 9th and 10th cranial nerve palsies on admission, which improved after administration of atropine. Introduction Due to the widespread availability of organophosphorus (OP) compounds and over-the-counter sales, agricultural areas account for most poisoning occurrences. Decreases in acetylcholine esterase activity are typically used to validate laboratory evidence of OP poisoning. Three unique toxicity signs of OP chemical poisoning vary depending on when they first manifest. There are three types of injuries: immediate, moderate, and delayed. A cholinergic crisis and perhaps death could result from consuming a lot of pesticides. Lesser dosages may expose people to the intermediate type or delayed type toxic syndrome. Some OP esters have an uncommon hazard known as organophosphate-induced delayed polyneuropathy (OPIDP). One to four weeks after a single or brief exposure, the distant degeneration of a few axons in the peripheral and central nervous systems serves as evidence. Sometimes the delayed-type condition has a side effect of muscle weakness that lasts for a few months. This case report highlights accidental inhalational OP compound exposure, which resulted in vocal cord palsy due to superior laryngeal nerve palsy. Probably this is the first case report of OP exposure. Case Presentation A 28-year-old man who claimed to have inhaled organophosphorus (Monocil 50%) while working on his farm in the Yavatmahal district of Nagpur arrived at the hospital. The patient and his family were unaware of the amount. On arrival, the general examination revealed the patient was conscious and oriented, had a pulse of 110 beats per minute, blood pressure was 100/70 mm of Hg, and saturation was 99% on room air. Cardiovascular and respiratory system examination revealed no abnormality in the central nervous system and he had a Glasgow Coma Scale score of 15/15. Laboratory parameters of the patient have been highlighted in Table 1 Following the atropinization dose, the patient was started on an 8 ml/hour injection of injectable atropine and received pralidoxime infusion at the rate of 20 ml/hour. The patient was given supportive treatments with antibiotics, proton pump inhibitors, nutritional supplements, and hydration. The infusion of atropine was gradually tapered based on clinical response. After a period of four days, atropine was started with bolus doses. After eight days, the patient started to get hoarseness of voice, had an absence of gag reflex, and had trouble deglutinating. Muscle tone was normal. Power was 4/5 in all four limbs. Reflexes in the deep tendons revealed hyporeflexia. A bilateral plantar flexor reaction was visible. For the purpose of evaluating voice hoarseness, we sought the advice of an ENT surgeon who performed indirect laryngoscopy or video laryngoscopy. The patient's left vocal cord was discovered to be immovable (Video 1). VIDEO 1: Video-directed laryngoscopy showing the phonatory gap View video here: https://youtu.be/bWEkswgwJoM Ryle's tube was placed for feeding, bolus doses of atropine were tapered off gradually, routine clinical examinations of muscle tone and power were examined regularly, and the patient began speech therapy. The quality of voice improved after seven days of speech therapy and physiotherapy was also done after which the patient regained full power of 5/5 in all four limbs and the reflex became normal. Hence, the patient was discharged with regular follow-up after a hospital stay of 15 days. Discussion Organophosphate poisoning is a common reason for admission to hospitals and intensive care units in developing countries. This is an illustration of an organophosphorus poisoning case with typical cholinergic symptoms on the first day and progressive involvement of the 9th and 10th cranial nerves beginning on day two. The superior laryngeal nerve supplies all laryngeal muscles except the cricothyroid muscle. This indicates that intermediate syndrome may include vocal cord palsy and that patients should receive atropine in rather high dosages. The term "intermediate syndrome" was first used in 1987 by Senanayake of Sri Lanka, but Wadia first used the term "type II paralysis" to describe the illness in 1974. It was given the moniker "intermediate" because its symptoms appear after the acute cholinergic phase but before the predicted onset of delayed neuropathy. The main symptoms of this condition, which typically manifest between 12 and 96 hours after consuming the toxin, include paralysis of the respiratory muscles, cranial nerve palsies, neck flexor weakness, and proximal muscular weakness. The patient develops a combination of muscarinic, nicotinic, and central nervous system signs, which are caused as a result of the inhibition of carboxylic esterase. Another form of neurotoxicity seen is delayed neurotoxicity, a predominant motor neuropathy, which is seen two to three weeks after exposure and is seen as a result of inhibition of a separate esterase, which is known as the neuropathy target esterase. The intermediate syndrome, which manifests two to five days after an acute crisis and is marked by acute respiratory distress and skeletal muscle weakness, is the third and last kind of neurotoxicity to be observed. The persistent suppression of cholinesterase, which is unresponsive to oximes and atropine therapy, can be linked to this occurrence. In individuals who have consumed organophosphorus pesticides, the intermediate syndrome occurs in 20% of cases and has no relationship to the type of organophosphorus pesticide. It often occurs two to four days after the initial presentation when the symptoms and signs of the acute cholinergic syndrome, such as muscle fasciculations and muscarinic signals, disappear. The intermediate syndrome is frequently characterized by weakness of the neck, proximal limb, and respiratory muscles, particularly the diaphragm, intercostal muscles, and accessory muscles. As a result, some patients may only exhibit neck muscle weakness, whereas others may experience weakness in both the neck and proximal limb muscles. Patients who already have intermediate syndrome but later develop it could need ventilator support. Sometimes organophosphorus poisoning can present as myocardial infarction as reported in some case reports. Wherever intermediate syndrome causes respiratory problems, immediate treatment should be given to avert mortality. Hence, in patients with organophosphorus poisoning, careful use of atropine is a must, which can work as a double-edged sword, as a high dose of atropine sometimes leads to vocal cord palsy due to superior laryngeal nerve palsy and a low dose of atropine leads to the intermediate syndrome. Conclusions The neurotoxic effects of organophosphate poisoning should be considered while providing first-line care to exposed patients. Before considering isolated bilateral or unilateral vocal cord paralysis, the intermediate syndrome should be excluded if the patient develops dysphonia and respiratory distress. Additional Information Disclosures Human subjects: Consent was obtained or waived by all participants in this study. Conflicts of interest: In compliance with the ICMJE uniform disclosure form, all authors declare the following: Payment/services info: All authors have declared that no financial support was received from any organization for the submitted work. Financial relationships: All authors have declared that they have no financial relationships at present or within the previous three years with any organizations that might have an interest in the submitted work. Other relationships: All authors have declared that there are no other relationships or activities that could appear to have influenced the submitted work.
/* * Find a wksid entry for the specified Windows name and domain, of the * specified type. * * Ignore entries intended only for U2W use. */ const wksids_table_t * find_wksid_by_name(const char *name, const char *domain, idmap_id_type type) { int i; RDLOCK_CONFIG(); int len = strlen(_idmapdstate.hostname); char my_host_name[len + 1]; (void) strcpy(my_host_name, _idmapdstate.hostname); UNLOCK_CONFIG(); for (i = 0; i < UU_NELEM(wksids); i++) { switch (type) { case IDMAP_UID: if (wksids[i].is_user == 0) continue; break; case IDMAP_GID: if (wksids[i].is_user == 1) continue; break; case IDMAP_POSIXID: break; default: assert(FALSE); } if (strcasecmp(wksids[i].winname, name) != 0) continue; if (!EMPTY_STRING(domain)) { const char *dom; if (wksids[i].domain != NULL) { dom = wksids[i].domain; } else { dom = my_host_name; } if (strcasecmp(dom, domain) != 0) continue; } if (wksids[i].direction == IDMAP_DIRECTION_U2W) continue; return (&wksids[i]); } return (NULL); }
#!/usr/bin/env python from __future__ import unicode_literals import warnings from django.core.management.base import BaseCommand, CommandError from djangoseo.base import registry, populate_metadata class Command(BaseCommand): help = "Populate the database with metadata instances for all models " \ "listed in seo_models." @staticmethod def populate_all_metadata(): """ Create metadata instances for all models in seo_models if empty. Once you have created a single metadata instance, this will not run. This is because it is a potentially slow operation that need only be done once. If you want to ensure that everything is populated, run the populate_metadata management command. """ for Metadata in registry.values(): InstanceMetadata = Metadata._meta.get_model('modelinstance') if InstanceMetadata is not None: for model in Metadata._meta.seo_models: populate_metadata(model, InstanceMetadata) def handle(self, *args, **options): warnings.warn("This is deprecated command. It's not necessary yet and " "potentially slow.", DeprecationWarning, stacklevel=2) if len(args) > 0: raise CommandError("This command currently takes no arguments") self.populate_all_metadata()
Christopher Furlong / Pool / Files / Reuters Queen Elizabeth II, at RAF Valley in northern Wales on April 1, 2011, is scheduled to arrive in Dublin on Tuesday In the coming weeks, Ireland will host two of the world's most recognizable VIPs: Queen Elizabeth II and President Barack Obama. And as the country gets ready, the taxi drivers of Dublin are seeing the careful — and sometimes inconvenient — preparations up close. "The police have been down every manhole in Dublin twice at this stage," says one, describing the increase in security that includes the inspection of the city's sewers for bombs. Ireland is taking no chances with its high-profile guests: reports say that around 10,000 police officers and military personnel will be deployed over the course of the two visits. But it is the Queen's arrival in Dublin on Tuesday that makes the Irish police force most nervous. Not everyone in Ireland is happy to see the Queen, whose four-day visit — the first ever by a British monarch to the Republic — has put into action the state's biggest-ever security operation. (See pictures of the world's most beautiful tiaras.) The reluctance of the Queen and her father King George VI before her to visit England's closest neighbor stems from centuries of British occupation of Ireland. While the Republic of Ireland fought its way to independence with the founding of the Free State in 1922 and establishment of the Republic in 1937, Northern Ireland stayed under British rule. Sectarian tensions between Catholic republicans and Protestant unionists in the region grew, until they erupted into three decades of violence, during which over 3,600 people were killed. The Troubles, as they are called, ended with the Good Friday Agreement of 1998. But until recently, the historical unrest made a visit by the Queen to the Republic seem an impossibility. So the announcement last month of her visit was viewed by some as a sign of political maturity. But the symbolism of the visit has also stirred up deep resentment among some Irish. On Easter Monday, a representative of the splinter sectarian group called the Real IRA appeared in a video statement wearing a balaclava and military clothing and referred to the visit as "the upcoming insult" and the government's invite as unrepresentative of the wishes of the Irish people. "The Queen of England is wanted for war crimes in Ireland and not wanted on Irish soil," he said. "We will do our best to ensure she and the gombeen [corrupt] class that act as her cheerleaders get that message." The statement also included a threat to kill more Northern Irish police officers just weeks after the murder of Catholic police officer Ronan Kerr in Omagh. (Read "Tragic but Not Troubled: The Murder of a Northern Irish Policeman.") Meanwhile, the republican group Eirigi (Rise Up) has placed a countdown timer on its website, calling for the Queen's visit to be met with "widespread opposition and protest." The group is asking those against the visit to occupy the Garden of Remembrance, a memorial park in Dublin dedicated to those who fought for Irish freedom, which is part of the Queen's official itinerary. She will also go to Croke Park Stadium, the headquarters of Ireland's two national sports, Gaelic football and hurling, and the site of one of the bloodiest days of the War of Independence, when 14 civilians were killed by British forces retaliating the killing of British undercover agents earlier in the day. For supporters, the Queen's visit is a chance to show how the U.K. and Ireland have "moved on" — a term that galls some Irish. But even Sinn Fein, Ireland's most staunchly republican political party, seems to have relaxed its earlier outright opposition. In a statement on the party's website on Saturday, leader Gerry Adams said, "I am for a new relationship between ... the people of Ireland and Britain based on equal and mutual respect. I hope this visit will hasten that day, but much will depend on what the British monarch says." (See more on Ireland's recent election.) But given that the Irish are living under tight austerity measures after getting a $96 billion bailout from the E.U. and the International Monetary Fund, can the country even afford its famous guests? Security costs for the visits by the Queen and Obama a week later will reach an estimated $42 million, according to unconfirmed reports. James Connolly Heron, the great grandson of James Connolly, an icon of the Irish struggle for independence, questions the appropriateness of spending taxpayers' money to play host when the country is broke. "It appears no consideration was given to paring down the visit as regards to where we are economically," he says, adding that he feels talk of Ireland "moving on" is nonsense given the level of security required during the Queen's time in the country. (See pictures of the British army leaving Northern Ireland.) But Irish Prime Minister Enda Kenny has called both visits "an investment for the future," citing the benefits they will bring in the way of tourism and business. Given all the bad news surrounding the country of late, Kenny added, they could also be good for Ireland's image. And many Irish hope he's right. "The eyes of the world are going to be on Ireland, so hopefully the Queen's visit will showcase the country," says taxi driver Stuart Batt. "It's an opportunity for the world to view us positively in these negative times." See TIME's complete coverage of the royal wedding.
package com.rnergachev.propertylisting.base.viewmodel; import com.rnergachev.propertylisting.base.BaseViewModel; import io.reactivex.disposables.CompositeDisposable; /** * Extension of the {@link BaseViewModel} to work with rx subscriptions */ public class RxViewModel implements BaseViewModel { protected CompositeDisposable subscriptions; public RxViewModel() { subscriptions = new CompositeDisposable(); } @Override public void clear() { subscriptions.clear(); } }
class ConfigValidator: """Check the layout and certain configuration options""" def __init__(self, config_file): self.config_file = config_file def validate(self): provider = { 'name': v.Required(str), 'driver': str, 'max-concurrency': int, } label = { 'name': str, 'min-ready': int, 'max-ready-age': int, } diskimage = { 'name': str, 'pause': bool, 'elements': [str], 'formats': [str], 'release': v.Any(str, int), 'rebuild-age': int, 'env-vars': {str: str}, 'username': str, } webapp = { 'port': int, 'listen_address': str, } top_level = { 'webapp': webapp, 'elements-dir': str, 'images-dir': str, 'build-log-dir': str, 'build-log-retention': int, 'zookeeper-servers': [{ 'host': str, 'port': int, 'chroot': str, }], 'providers': list, 'labels': [label], 'diskimages': [diskimage], 'max-hold-age': int, } log.info("validating %s" % self.config_file) config = yaml.load(open(self.config_file)) # validate the overall schema schema = v.Schema(top_level) schema(config) for provider_dict in config.get('providers', []): provider_schema = get_provider_config(provider_dict).getSchema() provider_schema.extend(provider)(provider_dict)
<reponame>IonTeLOS/wasf import re from typing import List, Optional from waffles.api.abstract.model import SoftwarePackage, CustomSoftwareAction from waffles.commons import resource from waffles.gems.appimage import ROOT_DIR, INSTALLATION_PATH from waffles.view.util.translation import I18n RE_MANY_SPACES = re.compile(r'\s+') CACHED_ATTRS = {'name', 'description', 'version', 'url_download', 'author', 'license', 'source', 'icon_path', 'github', 'categories', 'imported', 'install_dir', 'symlink'} class AppImage(SoftwarePackage): def __init__(self, name: str = None, description: str = None, github: str = None, source: str = None, version: str = None, url_download: str = None, url_icon: str = None, url_screenshot: str = None, license: str = None, author: str = None, categories=None, icon_path: str = None, installed: bool = False, url_download_latest_version: str = None, local_file_path: str = None, imported: bool = False, i18n: I18n = None, install_dir: str = None, custom_actions: List[CustomSoftwareAction] = None, updates_ignored: bool = False, symlink: str = None, **kwargs): super(AppImage, self).__init__(id=name, name=name, version=version, latest_version=version, icon_url=url_icon, license=license, description=description, installed=installed) self.source = source self.github = github self.categories = (categories.split(',') if isinstance(categories, str) else categories) if categories else None self.url_download = url_download self.icon_path = icon_path self.url_screenshot = url_screenshot self.author = author self.url_download_latest_version = url_download_latest_version self.local_file_path = local_file_path self.imported = imported self.i18n = i18n self.install_dir = install_dir self.custom_actions = custom_actions self.updates_ignored = updates_ignored self.symlink = symlink def __repr__(self): return "{} (name={}, github={})".format(self.__class__.__name__, self.name, self.github) def can_be_installed(self): return not self.installed and self.url_download def has_history(self): return self.installed and not self.imported def has_info(self): return True def can_be_downgraded(self): return self.installed and not self.imported def get_type(self): return 'AppImage' def get_default_icon_path(self): return self.get_type_icon_path() def get_type_icon_path(self): return resource.get_path('img/appimage.svg', ROOT_DIR) def is_application(self): return True def get_data_to_cache(self) -> dict: data = {} for a in CACHED_ATTRS: val = getattr(self, a) if val: data[a] = val return data def fill_cached_data(self, data: dict): for a in CACHED_ATTRS: val = data.get(a) if val: setattr(self, a, val) def can_be_run(self) -> bool: return self.installed def get_publisher(self) -> str: return self.author def get_disk_cache_path(self) -> str: if self.install_dir: return self.install_dir elif self.name: return INSTALLATION_PATH + self.name.lower() def get_disk_icon_path(self): return self.icon_path def has_screenshots(self): return not self.installed and self.url_screenshot def get_display_name(self) -> str: if self.name and self.imported: return '{} ({})'.format(self.name, self.i18n['imported']) return self.name def get_custom_supported_actions(self) -> List[CustomSoftwareAction]: if self.imported: return self.custom_actions def supports_backup(self) -> bool: return False def supports_ignored_updates(self) -> bool: return self.installed and not self.imported def is_update_ignored(self) -> bool: return self.updates_ignored def __eq__(self, other): if isinstance(other, AppImage): return self.name == other.name and self.local_file_path == other.local_file_path def get_clean_name(self) -> Optional[str]: if self.name: return RE_MANY_SPACES.sub('-', self.name.lower().strip())
package com.github.ltsopensource.startup.jobtracker; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Paths; import java.util.HashMap; import java.util.Map; import java.util.Properties; import org.apache.log4j.PropertyConfigurator; import org.springframework.util.StringUtils; /** * @author <NAME> (<EMAIL>) on 9/1/15. */ public class JobTrackerCfgLoader { public static JobTrackerCfg load(String confPath) throws CfgException { String cfgPath = confPath + "/jobtracker.cfg"; String log4jPath = confPath + "/log4j.properties"; Properties conf = new Properties(); File file = new File(cfgPath); InputStream is = null; try { is = new FileInputStream(file); } catch (FileNotFoundException e) { throw new CfgException("can not find " + cfgPath); } try { conf.load(is); } catch (IOException e) { throw new CfgException("Read " + cfgPath + " error.", e); } JobTrackerCfg cfg = new JobTrackerCfg(); String registryAddress = conf.getProperty("registryAddress"); if (StringUtils.isEmpty(registryAddress)) { throw new CfgException("registryAddress can not be null."); } cfg.setRegistryAddress(registryAddress); String clusterName = conf.getProperty("clusterName"); if (StringUtils.isEmpty(clusterName)) { throw new CfgException("clusterName can not be null."); } cfg.setClusterName(clusterName); String bindIp = conf.getProperty("bindIp"); if (!StringUtils.isEmpty(clusterName)) { cfg.setBindIp(bindIp); } String listenPort = conf.getProperty("listenPort"); if (StringUtils.isEmpty(listenPort)) { // FIXME and is numeric throw new CfgException("listenPort can not be null."); } cfg.setListenPort(Integer.parseInt(listenPort)); Map<String, String> configs = new HashMap<String, String>(); for (Map.Entry<Object, Object> entry : conf.entrySet()) { String key = entry.getKey().toString(); if (key.startsWith("configs.")) { String value = entry.getValue() == null ? null : entry.getValue().toString(); configs.put(key.replace("configs.", ""), value); } } cfg.setConfigs(configs); if (Files.exists(Paths.get(log4jPath))) { // log4j 配置文件路径 PropertyConfigurator.configure(log4jPath); } return cfg; } }
Julian Carroll Early life Julian Carroll was born in West Paducah in McCracken County, Kentucky. He was the third of eleven children born to Elvie B. "Buster" and Eva (Heady) Carroll. His father was a tenant farmer, but shortly after the Ohio River flood of 1937, the family moved to Heath in McCracken County, where Buster Carroll sold tractor implements and in 1940 opened an automobile repair shop. Through his early teenage years, Carroll lived with his grandparents to help care for an ailing grandfather. In 1949, Carroll was selected to represent Heath High School at Kentucky Boys State, a week-long a civic affairs summer camp for high school seniors-to-be. Participants in the camp create a miniature state government based on their state's actual government. At the camp, Carroll was elected governor of the miniature government. The following year, he graduated as salutatorian and student body president of Heath High School. Carroll began dating Charlann Harting near the end of 1950. In mid-1951, they parted ways to attend college – Harting, whose family was better off financially, at the University of Kentucky and Carroll at nearby Paducah Junior College. After their first year, Carroll and Harting decided to get married. The ceremony took place on July 22, 1951, and the couple eventually had four children – Kenneth, Patrice, Bradley, and Ellyn. Ellyn, born June 27, 1975, was the first child born to a Kentucky First Family while they were residing in the Governor's Mansion. Carroll earned an Associate in Arts degree from Paducah Junior College in 1952. That summer, the family moved to Lexington where Carroll matriculated to the University of Kentucky. He funded his further education working for the Fayette County Agriculture Stabilization and Conservation Office. In 1954, he earned a Bachelor of Arts degree in political science, and in 1956, he earned a Bachelor of Laws degree. While in college, Carroll had received training through the Air Force Reserve Officer Training Corps. By graduation, he had risen to the rank of Commandant of Cadets, the highest rank of any student at the university. After graduation, he enlisted in the Air Force and was stationed at Carswell Air Force Base in Fort Worth, Texas. For three years, he served as an Air Force attorney, then returned to Paducah and joined the law firm of Reed, Scent, Reed, and Walton. He was active in civic affairs, including membership in the Jaycees and serving as charter president of the Paducah Optimists Club in 1962. He was a frequent lay speaker in the Cumberland Presbyterian Church, and from 1966 to 1967, served as moderator for the Kentucky Synod. In January 1960, a group of local businessmen approached Carroll about leading a campaign to allow the Tennessee Valley Authority (TVA) to provide electricity to McCracken County. TVA could provide electricity at a much lower cost, but voters would first have to hold a public referendum on buying out Kentucky Utilities, the private power provider in the area. Carroll agreed to lead the campaign, and nine months later, voters approved the buyout by a three-to-one margin. Political career The TVA campaign had put Carroll squarely in the public eye in McCracken County, and in 1962, he was elected to the first of five consecutive terms representing the county in the Kentucky House of Representatives. He was chosen Speaker of the House from 1968 through 1970. In the 100-member House of Representatives, it was not uncommon for lobbyists to roam the floor freely, for members to bring their lunches to their desks, or for them to bring their friends and family members onto the floor during debate. Determined to bring a higher degree of decorum to the chamber's proceedings, Carroll opened the 1968 legislative session with a single, powerful whack of his gavel. The gavel shattered, stunning the legislators. Carroll subsequently barred outsiders from the floor during debate and forbade eating in the chamber. Carroll shattered three more gavels during the legislative session – he was finally given a sturdier one made of solid oak and formica – but he brought order to the chamber's proceedings. At the end of the session, a member of the opposing party declared from the floor "The decorum of this House has improved 100 percent... I must compliment the present Speaker of this House for ... eliminating the abominable practices. Today every member has a right to speak ... without fear of interruption and catcalls or being shouted down." The legislator's compliment was followed by a standing ovation for Carroll. Carroll had considered running for the U.S. Senate in 1968, but dropped out of the race after just two weeks when he discovered that it would take well over $100,000 to run a competitive primary campaign. In 1971, former governor Bert T. Combs sought a second term as governor and chose Carroll as his informal running mate. (The governor and lieutenant governor were elected separately at the time.) Combs, an Eastern Kentucky native, sought geographic balance for the ticket by selecting Carroll, from the far-west Jackson Purchase. Combs said he would provide the needed financing, and Carroll agreed to enter the race. Seven other Democratic candidates for lieutenant governor entered the race, the most formidable being sitting attorney general John B. Breckinridge. While Combs lost to sitting Lieutenant Governor Wendell Ford in the gubernatorial primary, Carroll won the separate primary for lieutenant governor, partly on the strength of the Eastern Kentucky votes he gained from his association with Combs. Carroll went on to defeat Republican Jim Host in the general election for lieutenant governor. As lieutenant governor, Carroll chaired the Legislative Research Commission and the National Conference of Lieutenant Governors. Governor of Kentucky Governor Ford's allies encouraged Carroll to run for the U.S. Senate in 1974, but Carroll had already set his sights on the governorship. Instead, Ford ran for and won the Senate seat, and Carroll succeeded him as governor. In 1975, he sought a full term in office and won the Democratic gubernatorial nomination in a four-way primary against Jefferson County Judge Todd Hollenbach, former state Auditor Mary Louise Foust, and Robert McCreary Johnson. In the general election, Carroll faced Republican Robert E. Gable, a coal company owner. The main issue of the campaign was the imposition of desegregation busing on the city of Louisville. Both candidates opposed the busing, but Gable did so more vehemently and criticized the sitting governor for not "doing something about it". In a televised debate with Carroll, Gable insisted on using what he called a "truth bell". Gable rang the bell every time that he perceived that Carroll was not telling the truth. Eventually, the moderator of the debate, newspaper publisher Al Smith, ordered Gable to put the bell away, and Gable's credibility suffered in the eyes of voters. Carroll won the general election by a vote of 470,159 to 277,998, representing a record margin of victory in the Kentucky governor's race. He carried every congressional district including Jefferson County, where a Democrat had not won a race in 20 years. His separately selected running mate, Thelma Stovall, became the first woman elected lieutenant governor of Kentucky. With considerable experience in the General Assembly – first as speaker of the House, and later presiding over the Senate as lieutenant governor – Carroll exercised a great deal of control over the proceedings of the legislature. One observer quipped "A cockroach couldn't crawl across the Senate floor without an OK from the governor stamped on his back." His reaction to criticism was often severe, prompting his political enemies to derisively refer to him as "Emperor Julian." During the final year of Carroll's term, Lt. Gov. Stovall, who was left as acting governor when Carroll had left the state on business, called a special session of the legislature to enact a tax cut that Carroll opposed but later endorsed. The General Assembly passed the tax cut and began asserting its independence, especially in the Senate, which especially resented Carroll's tight control of previous sessions. Carroll was charged with implementing an amendment to the state constitution approved by voters in 1975 to drastically reorganize the state's judicial system. The Kentucky Court of Appeals, the state's court of last resort, was renamed the Kentucky Supreme Court, and a new Court of Appeals was created and interposed between the Supreme Court and the state's circuit and district courts. The position of county judge was made a purely administrative position, and the office was renamed county judge/executive. Historian Lowell H. Harrison opined that the amendment made Kentucky's legal system "a model for the nation." Carroll also pushed through legislation eliminating the private bail-bond system. Improvements in public schools were the hallmark of Carroll's term. Using money from a coal severance tax enacted by Ford's administration and increased revenue from an improving economy, Carroll increased teacher salaries and eliminated fees for required classes. He strengthened the Minimum Foundation Program and provided free textbooks. A School Building Authority was also created to help poor school districts construct new buildings. Vocational and special education were expanded, and a program for gifted and talented students was piloted. Consequently, Kentucky improved in most national educational benchmarks, including moving from 46th to 38th nationally in teacher salaries. Higher education did not fare as well under Carroll. He cut the proposed budget for the state's Council on Higher Education by 40 percent. Because of the considerable political clout of the Golden Triangle (Lexington, Louisville and Covington), the University of Kentucky, University of Louisville, and Northern Kentucky University were spared the more severe budget cuts imposed on the state's regional universities. As governor of what was the leading coal-producing state in the nation, Carroll advocated the use of coal to alleviate the 1973 energy crisis. He was called to testify before several congressional committees and served as an energy adviser to President Jimmy Carter. At the state level, he created a department of energy and constructed "resource recovery roads" in the state's coalfield regions. Among Carroll's other accomplishments were the initiation of a grant program to support the arts and the expansion of the state park system. He was one of many who opposed the damming of the Red River, which would have flooded Red River Gorge. Carroll was a supporter of a lemon law (that sought to provide a remedy for purchasers of cars that failed to meet quality standards) that was defeated in the 1976 legislative session. Carroll served as chairman of the National Governors Association in 1978. He chaired the association's Natural Resources and Environmental Management Committee. He also served as the state's co-chairman of the Appalachian Regional Commission. He received honorary degrees from the University of Kentucky, Morehead State University, Murray State University, and Eastern Kentucky University in Kentucky, and from Lincoln Memorial University in Harrogate, Tennessee. He was named to the University of Kentucky Alumni Association's Hall of Distinguished Alumni in 1975. Carroll's tenure was plagued by disasters, both natural and man-made. Flooding struck in the eastern part of the state and in the state capitol of Frankfort. Extreme cold gripped the entire state in 1977 and 1978, including the Great Blizzard of 1978. Two mine explosions in Letcher County killed 26 people, and the Beverly Hills Supper Club fire claimed 165 lives. Many of these disasters led to stricter enforcement of safety laws. Carroll formed the Department of Housing, Buildings, and Construction and strengthened the state fire marshal's office. Carroll's credibility took a severe hit as a result of an investigation into an alleged insurance kickback scheme during the Ford administration and carrying on into his administration. When called before a grand jury in 1980, Carroll invoked the Fifth Amendment. He was not convicted of any wrongdoing, but his first state Democratic Party chairman, Howard P. "Sonny" Hunt, was after refusing to cooperate with the investigation. The probe also hurt commerce commissioner Terry McBrayer, Carroll's choice for governor in 1979. McBrayer finished third out of five candidates in the Democratic primary that year, won by late entry John Y. Brown Jr.. Later political career After concluding his service as governor, Carroll resumed his law practice in Frankfort, Kentucky. Brown made him chairman of a non-profit organization to fight drugs in 1983. In 1987, he unsuccessfully sought another term as governor, finishing fifth in the Democratic primary behind Brown, Lt. Gov. Steve Beshear, former Human Resources Secretary Grady Stumbo, and the winner, businessman Wallace G. Wilkinson. Carroll again returned to his Frankfort law practice. In 2001, Kentucky's Purchase Parkway was renamed the Julian M. Carroll Purchase Parkway. In 2003, Carroll actively lobbied the General Assembly to legalize casino-style gambling at the state's horse racetracks. State Senate In 2004, Carroll was elected to the Kentucky Senate from District 7, defeating Harold Fletcher – the older brother of then-governor Ernie Fletcher – by a wide margin. The district included all or portions of Anderson, Fayette, Franklin, and Woodford counties. He made headlines in 2007 when he called on Fletcher's lieutenant governor, Steve Pence, to resign for his disloyalty after Pence endorsed Anne Northup in the Republican gubernatorial primary rather than backing Fletcher's re-election bid. Pence refused to resign, citing an investigation of the administration's hiring practices as his reason for refusing to endorse Fletcher. Fletcher won the Republican primary, but lost in the general election to Democrat Steve Beshear. Carroll was re-elected without opposition in 2008. In advance of the 2011 legislative session, he unsuccessfully ran for the open position of Senate Democratic floor leader, losing to R. J. Palmer of Winchester. Carroll blamed his contentious relationship with Senate President David L. Williams as the reason his colleagues were hesitant to choose him for the post. On November 6, 2012, he defeated Republican Frank Haynes to retain his seat for another four years. He was re-elected without opposition in 2016 from a district now comprising Anderson, Woodford, Franklin, Owen and Gallatin counties. His term expires December 31, 2019. On July 22, 2017, Spectrum News reported allegations by a male photographer that Carroll had groped him and propositioned him for sex in 2005. The following day, the Senate Democratic caucus voted to remove Carroll from his position as caucus whip and called on him to resign his seat immediately after hearing an audio recording allegedly containing Carroll's proposition to the man.
Design and Optimization of Addendum Surfaces in Sheet Metal Forming Process In the sheet forming process, addendum surfaces have an important influence on the formability of the workpiece. If the design of addendum surfaces is done manually with a CAD software, many corrections should be made according to the experimental or/and numerical results. This study proposes an automatic procedure for the design and optimization of addendum surfaces by using our fast Inverse Approach and two optimization algorithms. The present optimization procedure is applied to the Renault Twingo dashpot. The results show that the optimization calculation converges rapidly towards an optimal solution. The future work is to automatically (or semi-automatically) create the addendum surfaces with G1 continuity for the industrial workpiece with complex geometry.
export interface MailTransportConfiguration { secret: string; } export interface Mail { from: string; to: string | Array<string>; cc?: string | Array<string>; subject: string; body: string; }
by Simon Delott at June 22, 2017 11:56 am . Updated at June 22, 2017 1:27 pm . Celebrities are sometimes going to see stories about them that just aren't true. It goes with the territory. But every now and then, they see a headline so outrageous or insulting that they can't keep quiet. Ariel Winter saw one recently about boyfriend Levi Meaden and she absolutely had to speak out. Levi is less well-known as an actor than his girlfriend, but he's not, like, a kept boy. And Ariel is making sure that everybody knows it. "I have a BOYFRIEND and a PERSONAL ASSISTANT who are NOT the same person." "I would NEVER pay my boyfriend ANY sort of allowance, nor would he EVER accept if I offered." The vehement statement that Ariel Winter doesn't pay Levi Meaden came on Instagram, in response to a Star Magazine headline. "He BUYS his own stuff whether it's for me for himself, and he more than pulls his weight for our life." Honestly, we wouldn't be judgy about things if she were the one who always paid for dinner or whatever. Everybody buys food for the ones they love when they can. "I HATE fake news, but I guess that's what our world has come to. Get your s--t straight," the Modern Family beauty continued. "I don't support anyone, and I don't need anyone to support me. He's got a full career (including something huge that's new) and works hard for it." Fake news is bad, but not as bad as the trend since November of certain people yelling "fake news" at news stories that they don't like instead of at total fabrications. But Ariel's using the term appropriately. She finishes it off with a he's-a-real-person-with-real-feelings line. "He's not just someone's boyfriend. So if you don't know us, don't comment. Xoxo." Honestly, we feel like those sorts of rumors come from two places. The first is just people trying to read more into a situation than there really is. And we can all fall into that trap. They look at Ariel Winter and Levi Meaden moving in together, they do some math, and they jump to the conclusion that Ariel is treating Levi to whatever he wants. The other place of origin is personal fantasy. Plenty of people would enjoy being young, beautiful, rich, and famous ... and having some hot young thing at their beck and call. It's a thing that really happens, but usually terms like "sugar daddy" or "sugar momma" get thrown around. So it might be easy for them to look at this couple and project their own fantasy dynamic onto the two of them. Hell, some people would prefer to be the kept boy in that scenario, you know? Especially with a benefactor as gorgeous as Ariel Winter. But people need to separate fantasy from reality, or they're going to have skewed perceptions of the world. Another factor behind this particular rumor about Ariel and Levi? Because, though they're not married, of the two of them, Ariel's definitely the one who reads as the "breadwinner." Some people can't imagine a healthy relationship where the woman's in the lead. All that they can imagine is some sort of woman-dominated household where Levi brings Ariel her slippers or whatever. What's that quote about how men fear women's equality because they fear that women in positions of power will do to them what they've done to women? The news that Levi is the one who does the cooking must have sent these people through the roof, you know? Most relationships are all about balance. Levi Meaden is 10 years older than Ariel Winter. But Ariel's an adult, so this isn't like when Kylie started dating Tyga by any stretch of the imagination. It looks like it all works out, because these two are clearly in love. Honestly, our biggest takeaway from this is surprise that this particular story got under Ariel's skin more than all of the others. But sometimes it's easier to brush off stories about yourself. Water off a duck's back and all that. It's another thing to listen to people insult someone you love. Not for nothing, but we're excited to hear that Levi Meaden's working on something big and new. Unlike The Expanse and The Magicians and Dark Matter, etc, Aftermath (on which Levi was a star) wasn't one of Syfy's success stories in their big de-rebranding. The issue wasn't the casting -- they had a great cast, actually, including an actress from Deadpool, Wayne Brady, and Levi himself -- but probably had more to do with storytelling choices and the general "feel" of the show. So we'll be eagerly looking forward to news of that. And hopefully Ariel will find a way to grin and bear it when misinformation about her boyfriend and their relationship circulates. Because that's the kind of thing that just happens, unfortunately.
Toward a Continuous Intravascular Glucose Monitoring System Proof-of-concept studies that display the potential of using a glucose-sensitive hydrogel as a continuous glucose sensor are presented. The swelling ratio, porosity, and diffusivity of the hydrogel increased with glucose concentration. In glucose solutions of 50, 100, 200, and 300 mg/dL, the hydrogel swelling ratios were 4.9, 12.3, 15.9, and 21.7, respectively, and the swelling was reversible. The impedance across the hydrogel depended solely on the thickness and had an average increase of 47 /mm. The hydrogels exposed to a hyperglycemic solution were more porous than the hydrogels exposed to a normal glycemic solution. The diffusivity of 390 Da MW fluorescein isothiocyanate in hydrogels exposed to normal and hyperglycemic solutions was examined using fluorescence recovery after photobleaching and was found to be 9.3 10−14 and 41.4 10−14 m2/s, respectively, compared to 6.2 10−10 m2/s in glucose solution. There was no significant difference between the permeability of hydrogels in normal and hyperglycemic glucose solutions with averages being 5.26 10−17 m2 and 5.80 10−17 m2, respectively, which resembles 24% agarose gels. A prototype design is presented for continuous intravascular glucose monitoring by attaching a glucose sensor to an FDA-approved stent. Introduction Diabetes is one of the leading causes of death by disease, killing approximately 3 million people around the world and 180,000 Americans each year. Approximately 171 million people worldwide are currently diagnosed with diabetes and the estimated global prevalence is predicted to be 366 million in 2030. The number of diagnosed cases has risen by 11% over the last 5 years and is expected to double within the next 25 years due to factors such as population growth, increased life expectancy, increased prevalence of obesity, and physical inactivity. In the United States diabetes costs the healthcare system upwards of $174 billion annually and this number is on the rise. Diabetes is a manageable disease; however management requires accurate and frequent measurements of a patient's glucose levels to ensure that they stay within the normal range of 80 to 110 mg/dL to avoid hypoglycemic and hyperglycemic episodes. Abnormal glucose levels can cause blood vessel damage, which in the long-term may result in adult blindness, serious kidney disease, the need for amputations as a result of neuropathy, and a 2-4 increase in the incidence of heart failure. The Diabetes Control and Complications Trial (DCCT) found that tight control of glucose levels decreases the occurrence and severity of long-term complications. In order to achieve the benefits of tight control, new technology to continuously monitor blood glucose levels is being developed with the aim to minimize the pain and effort on the part of the patient. There are a few limitations with current continuous glucose monitors: they measure blood glucose levels indirectly from the interstitial fluid which lag behind blood glucose levels they can only be implanted for short periods of time they are expensive and they are not as accurate as blood glucose sensors. To overcome a few of these limitations, we propose to monitor intravascular glucose levels continuously using a glucose-sensitive hydrogel embedded in an FDA-approved stent. A stent would provide the sensor with constant access to the bloodstream, the mechanical support, and a means to transmit data while the stent maintains vessel patency. Importantly, a link has been established between diabetes and heart failure, as the prevalence of diabetes in heart failure populations is close to 20% compared to 4-6% in control populations, thus justifying this combined technology. Further, cardiovascular disease has surpassed diabetic neuropathy as the leading cause of early death in juvenile type I diabetics. Recent research in the field of continuous glucose monitoring has focused on developing glucose-sensitive hydrogels. To transduce signal, the sensor designs exploit hydrogels swelling in response to chemical stimuli. In this work, we explore and characterize a poly(N-isopropylacrylamide) (PNIPAAm)-based glucose-sensitive hydrogel developed by Kataoka et al. that also contains a phenylboronic acid derivative, which is known to form complexes with polyol compounds, like glucose, instead of proteins or enzymes. We hypothesized that the hydrogel swelling would correlate to measureable impedance values that would correlate to physiological glucose concentrations. To validate this we investigated mass transport properties and pore size within the hydrogel as well as impedance values after hydrogel swelling. The data suggests that the hydrogel holds promise for use as a transducer for continuous glucose monitoring. Preparation of Glucose Solutions Normal physiological blood glucose levels range between 80 and 110 mg/dL and those at or below 70 mg/dL are hypoglycemic and those at or above 180 mg/dL are hyperglycemic. Glucose solutions were prepared to model normal, hyperglycemic, and hypoglycemic conditions. A 50 mM 2-(Cyclohexylamino)ethanesulfonic acid, 100 mM NaCl stock solution (pH = 9) was prepared and -D-Glucose was added to various amounts of the stock solution to make glucose solutions of 0, 50, 100, 200, 300, and 500 mg/dL. The concentrations of the solutions were verified with a Red Glucose/Glucose Oxidase Assay Kit. Swelling Ratio Studies Tests were performed to characterize and quantify the volume change, both shrinking and swelling, of the hydrogel as a function of glucose concentration and time. The swelling ratios were calculated using, where Weight time is the weight of the hydrogel at the time of measurement and Weight initial is the initial weight of the hydrogel (prior to immersion in a solution with a glucose concentration). Swelling Study: Swelling Ratio versus Time To initialize the hydrogel, a slab was placed in a 0 mg/dL glucose solution for 1 week at 25 °C. Following initialization, the hydrogel was sliced into 12 equal size rectangular pieces (42.5  7.05 mg). Each sample was blotted dry, weighed, and assigned to a vial containing 5 mL of a 50, 100, 200, or 300 mg/dL glucose solution. The samples were randomly assigned to each of the four concentrations. Each sample was monitored over one month and 25 times each sample was taken out of its respective vial, blotted dry, weighed, and returned to its respective vial. As the swelling ratios reached equilibrium, the time between measurements began to increase as less change was observed. On average prior to the samples reaching equilibrium the time between measurements was 16 h and after the sample reached equilibrium this time was increased on average to 59 h. Shrinking Study: Swelling Ratio versus Time To assess the reversibility of hydrogel swelling, an experiment was performed in which hydrogels that had reached their equilibrium swelling ratios at a certain glucose concentration were transferred to a 100 mg/dL glucose solution. Specifically, 12 hydrogels (396.63  187.90 mg) that had reached an equilibrium swelling ratio in a glucose solution of 50 (n = 3), 100 (n = 3), 200 (n = 3), or 300 (n = 3) mg/dL were blotted dry, weighed, and placed in 12 mL of a 100 mg/dL glucose solution. Over the course of one month, 11 times the hydrogels were removed from their vials, blotted dry, weighed, and returned to their respective vial. This process was performed daily for the first four days and performed less frequently as less change was apparent between measurements. Impedance Measurements To demonstrate the feasibility of this hydrogel as a glucose sensor, the impedance through the hydrogel was measured in samples exposed to 300 (n = 4) and 500 (n = 4) mg/dL glucose solutions. Two probes connected to a LCR meter were placed in the hydrogels repeatedly at increasing inter-probe distances. For each distance, the magnitude and phase of the impedance was measured. Scanning Electron Microscopy In order to examine the microstructure of the hydrogel, scanning electron microscopy (SEM) was performed on three samples exposed to glucose concentrations of 0, 100, and 300 mg/dL. A piece of the initialized hydrogel was sliced into 3 equal size pieces (52.6  2.3 mg). One piece was placed in a vial containing a solution with a 0 mg/dL glucose concentration, another in 100 mg/dL glucose concentration, and a third in 300 mg/dL glucose concentration. The samples were allowed to reach their equilibrium swelling ratio over the course of three weeks. Once no change in swelling ratio was observed, samples of each of the hydrogels were sliced from the specimen. Each sample was placed into a slit holder using cryo adhesive to anchor. The sample holder was plunged into liquid nitrogen slush. A vacuum was pulled and the sample was transferred to the Gata Alto 2,500 pre-chamber (cooled to approximately −170 C). After fracturing the sample with a cooled scalpel to produce a free-break surface, the sample was sublimated at −85 C for 30 min followed by sputter coating for 120 s with platinum. The sample was then transferred to the microscope cryo-stage (maintained at −130 C) for imaging. The porosity ratios of the hydrogels were calculated using, where Void Space (pixels) was defined as the porous area of the hydrogel and the Total Space (pixels) was defined as the total area of the analyzed specimen. Diffusivity Measurements The diffusivity of 390 Da MW fluorescein isothiocyanate (FITC) through glucose solution and hydrogels that had reached equilibrium swelling upon exposure to 100 and 300 mg/dL glucose solutions was investigated using FRAP. A vibratome was used to slice hydrogel samples with thicknesses of approximately 250 m. Non-conjugated FITC molecules were added to the 100 and 300 mg/dL glucose solutions in which the hydrogel samples were immersed 48 h prior to the start of the experiment. The fluorescent samples were viewed with a FluoView 1,000 confocal system connected to a TE2000 inverted microscope. The specimens were scanned at a low laser intensity of 5% to locate an area of approximate uniform fluorescence. A circular bleaching area (radius = 30 m) was selected and the experiment was conducted with a 488 nm laser and a bleaching intensity of 100% at a 60 magnification. Following bleaching, the fluorescent response in the field of view was monitored over time in 23 concentric circles with radii ranging from 4.14 to 62.3 m for the hydrogel samples and 12.28 to 186.9 m for the glucose solution. Following bleaching, the average pixel intensity of each region of interest (ROI) at various time points was normalized using, (defined in 1976 by Axelrod et al.) such that the average intensity within the bleached ROI ranged between 0 and 1. In this equation, I (t,r i ) Normalized is the normalized average intensity of the i th ROI at time t, I (t,r i ) is the average true intensity of the i th ROI at time t, is the intensity of the center of the bleached area of the sample at time 0, which is defined as the time of bleaching, and I (t, r  ) is the intensity of the infinite reservoir diffusing into the bleached area at time t. A COMSOL transient diffusion model was developed using initial intensity conditions from each ROI. For each time point, the initial concentrations observed in each ROI for the hydrogels exposed to 100 (n = 13) and 300 (n = 7) mg/dL were averaged for each of the samples and modeled in COMSOL. This was repeated for the initial data obtained from the glucose solution. Different diffusion coefficients were applied to the models and the intensity profiles over each ROI as a function of time were simulated. For each diffusion coefficient, the COMSOL model data was compared to the experimental data and the model that minimized the sum of squared differences between the experimental and model data was determined to be the best-fit model. Assumptions applied to the FRAP method include: Fickian diffusion is the only mode of mass transport, diffusion only occurs in the radial direction, the FITC does not interact with the hydrogel, the photobleaching is an irreversible process, and the bleaching process does not alter the structure of the hydrogel. In order to quantify the difference between the diffusivity of the 390 Da MW FITC in glucose solution and in hydrogels exposed to the 100 and 300 mg/dL glucose solution, the hindrance ratio was calculated using, where D FITC,GLUCOSE SOLUTION (m 2 /s) is the diffusion coefficient for the FITC in the glucose solution, and D FITC, HYDROGEL (m 2 /s) is the diffusion coefficient for the FITC in the hydrogel. Permeability Measurements A sample of the hydrogel was initialized in a 0 mg/dL glucose solution for one week and then sliced into nine pieces of equal size (26.53  4.4 mg). Each piece was blotted dry, weighed, measured, and placed into a 4-mm diameter cylindrical tube. Six of the tubes were filled with 300 mg/dL glucose solution, and the other three were filled with 100 mg/dL glucose solution to initiate hydrogel swelling. The ends of the tubes were covered with parafilm to eliminate evaporation and leaking, and the hydrogels were allowed to swell and form a tight seal. Permeability columns were constructed using 1/4"-inner-diameter Tygon tubing attached vertically to a support and each hydrogel sample was connected with a liquid tight seal to the bottom of a column. The columns were filled with glucose solutions that matched those that the hydrogels were initially exposed to and the initial height of the solution column and time were recorded. Over time, multiple measurements of the height of the column above the hydrogel were recorded. From these, the flow rate of the liquid Q (m 3 /s) was obtained and divided by the cross-sectional area of the specimen A m (m 2 ) to obtain the velocity v (m/s) of the liquid. Darcy's Law was used to calculate the permeability constant for each of the samples, where  is Darcy permeability (m 2 ), L m (m) is the length of the specimen, P (Pa) is pressure, and  (Pas) is the dynamic viscosity of the fluid. Swelling Ratio A plot of the average swelling ratio versus time for each glucose concentration group is shown in Figure 1(a). The hydrogels displayed a logarithmic swelling trend over time when transferred from a 0 mg/dL glucose solution to one containing 50, 100, 200, or 300 mg/dL glucose. As shown in Table 1, increased degree of hydrogel swelling correlated with increasing glucose concentration. Specifically, hydrogels that were transferred from a 0 mg/dL glucose solution to a 50 mg/dL glucose solution had the slowest rate of swelling, followed by the hydrogels exposed to 100 mg/dL glucose, then those exposed to 200 mg/dL glucose; and finally, the hydrogels exposed to the 300 mg/dL glucose solution showed the fastest swelling. The swelling ratios appeared to reach steady state values after approximately 300 h of exposure to the glucose solution. Once the hydrogels reached equilibrium, the percent polymer was calculated by dividing the initial weight of the polymer by the weight of the equilibrated sample; the percent polymer was inversely proportional to the final glucose concentration as shown in Table 1. ANOVA ( = 0.05) revealed that there was a statistically significant difference between the equilibrium swelling ratios of the hydrogels exposed to 50, 100, 200, and 300 mg/dL glucose concentrations (p-value < 0.001). Post hoc analysis using Tukey's Mean Comparison Test ( = 0.05) revealed that the equilibrium swelling ratio of the hydrogels exposed to a 50 mg/dL glucose solution was significantly different than the equilibrium swelling ratios of the hydrogels exposed to 100, 200, and 300 mg/dL glucose solutions. It was also determined that the equilibrium swelling ratios of the hydrogels exposed to 100 and 200 mg/dL glucose solutions were not statistically different from one another, however the equilibrium swelling ratio of the hydrogels exposed to 300 mg/dL glucose solution showed a statistically significant difference from all other groups. Figure 1(b) shows the average equilibrium swelling ratio versus glucose concentration. Linear regression was performed for average equilibrium swelling ratio on glucose concentration of exposure. For every mg/dL increase in glucose concentration, there was a resultant 6.0% increase in the equilibrium swelling ratio. The coefficient of determination was found to be 0.93. When forcing the regression to fit the swelling ratio to 1.0 at a glucose concentration of 0 mg/dL, the coefficient of determination was reduced to 0.88 and the equilibrium swelling ratio was found to increase by 7.4% for every mg/dL increase in glucose concentration. Overall, when the hydrogels were transferred from one glucose concentration to 100 mg/dL they behaved as expected. The group initially exposed to a solution of 100 mg/dL glucose served as a control. The swelling ratio for each sample and the average swelling ratio for each concentration group are plotted in Figure 1(c). The samples that had equilibrated in a 50 mg/dL glucose solution swelled significantly when placed in the 100 mg/dL glucose solution, whereas the samples that had equilibrated in a glucose solution of 200 and 300 mg/dL significantly shank when transferred to the 100 mg/dL glucose solution. As expected, the samples that had already equilibrated to a 100 mg/dL glucose solution did not fluctuate in mass substantially when transferred to the new 100 mg/dL glucose solution. Two hydrogel samples, one from the 50 mg/dL glucose solution group and one from the 300 mg/dL glucose solution group were excluded from the data analysis due to degradation caused by the extensive handling required by this study. ANOVA ( = 0.05) revealed there was a statistical difference between the equilibrium swelling ratios of the hydrogels that were transferred to 100 mg/dL glucose solution following equilibration in glucose solutions of 50, 100, 200, and 300 mg/dL (p-value = 0.0114). Impedance versus distance through hydrogels that were exposed to 300 and 500 mg/dL glucose solutions. Impedance For all values, the phase angle remained between −3 and −8°, indicating a largely resistive impedance. As shown in Figure 1(d), for the hydrogels exposed to 300 and 500 mg/dL glucose solutions, the magnitude of the impedance increased linearly with distance with an average slope of 47 /mm (R 2 = 0.95). The average slope of the best-fit lines for impedance versus distance for hydrogels exposed to 300 and 500 mg/dL glucose solutions were 44 /mm (R 2 = 0.96) and 49 /mm (R 2 = 0.97), respectively. Scanning Electron Microscopy SEM images were imported into Image-Pro Plus 5.1 to compare the porosity of the hydrogels that were exposed to 0, 100, and 300 mg/dL glucose solutions (Figure 2). The ratio of the void space to the total sample area was determined for the hydrogels exposed to 0 (n = 10), 100 (n = 10), and 300 (n = 18) mg/dL glucose solutions. As expected, as glucose concentration increased, pore size increased as shown in Table 2; the hydrogels that were exposed to a solution containing 0 mg/dL glucose did not have visible pores, therefore for these samples pore size was assumed to be approximately zero. An unpaired t-test ( = 0.05) analysis of the SEM images revealed that the ratio of the void space to total hydrogel sample area for the hydrogels exposed to 100 and 300 mg/dL glucose solutions were statistically significantly different from one another (p-value < 0.0001). The 95% confidence intervals for the porosity ratios for the hydrogels exposed to 100 and 300 mg/dL glucose solutions were (0.2604, 0.3085) and (0.3511, 0.3918), respectively. Diffusivity To demonstrate the FRAP procedure, images were taken of a sample of hydrogel before photobleaching, immediately after photobleaching, and 15 min and 30 min after photobleaching . The diffusion coefficients for the FITC in the hydrogels exposed to 100 and 300 mg/dL glucose solutions were determined and the results are summarized in Table 2 and Figure 3(B). An unpaired t-test ( = 0.05) analysis of the diffusion coefficients for FITC through the hydrogels exposed to 100 and 300 mg/dL glucose solution showed they were statistically significantly different (p-value = 0.0003). The 95% confidence intervals for the diffusion coefficients for the hydrogels exposed to 100 and 300 mg/dL glucose solutions are (6.19 10 −14 m 2 /s, 1.24 10 −13 m 2 /s ) and (1.79 10 −13 m 2 /s, 6.50 10 −13 m 2 /s), respectively. The effectiveness of the numerical model was also demonstrated in Figure 3(B). The average diffusivity of FITC in free solution was found to be 6.2 10 −10 m 2 /s (standard deviation=1.3 10 −10 m 2 /s), which is similar to published values for glucose in water (6.0 10 −10 m 2 /s), thus validating the method. The diffusivity of the FITC in the hydrogel exposed to 300 mg/dL glucose solution was approximately 4 orders of magnitude slower than the diffusivity of the FITC in glucose solution. The hindrance ratios for the hydrogels exposed to the 100 and 300 mg/dL glucose solutions were found to be 6.7 10 3 and 1.5 10 3, respectively. for experimental and model data of hydrogels exposed to 100 and 300 mg/dL glucose solution at time points of 0 and 30 minutes following photobleaching. The hydrogel exposed to the 300 mg/dL glucose solution exhibited faster recovery after 30 min following photobleaching than the hydrogel exposed to 100 mg/dL glucose solution. Permeability Using Equation 5 the average permeability of the samples exposed to 100 and 300 mg/dL glucose solution over ten days was determined ( Table 2). An unpaired t-test ( = 0.05) analysis revealed no statistical difference (p-value = 0.5235) between the permeability of the hydrogels exposed to 100 and 300 mg/dL glucose solutions. The 95% confidence interval for the permeability of the hydrogels exposed to the 100 and 300 mg/dL glucose solution are (1.68 10 −17 m 2, 8.83 10 −17 m 2 ) and (4.74 10 −17 m 2, 6.87 10 −17 m 2 ), respectively. The uncertainty in the calculation is 3.27 10 −18 m 2. The permeability was measured over a pressure range of 8,000 to 9,000 Pa. Discussion This preliminary characterization demonstrates the potential for using a glucose-sensitive hydrogel as the basis for an in vivo, continuous glucose sensor. The ability to relate glucose concentration to the volume and impedance change of the hydrogel was demonstrated. There is a direct relationship between the glucose concentration to which the hydrogel was exposed and the equilibrium swelling ratio and swelling rate of the hydrogel. It was found that higher glucose concentrations resulted in higher equilibrium swelling ratios and faster swelling rates. Statistical analysis using ANOVA ( = 0.05) and a post-hoc Tukey's Mean Comparison Test ( = 0.05) revealed that all equilibrium swelling ratio groups were statistically significantly different from one another except the hydrogels exposed to 100 and 200 mg/dL glucose solutions. The results suggest that with optimization of hydrogel dimensions and chemistry to increase the hydrogel's sensitivity and response time, it is feasible that this hydrogel could be used as a main component of a glucose-sensing device that uses Micro-Electro-Mechanical Systems (MEMS) technology. For this monitoring application, it is critical that the hydrogel swelling responds to changing glucose concentrations. This behavior was examined in the second study, and ANOVA ( = 0.05) revealed there was a statistical difference between the equilibrium swelling ratios of the hydrogels that were transferred to 100 mg/dL glucose solution following equilibration in glucose solutions of 50, 100, 200, and 300 mg/dL. Therefore, the swelling process is reversible and the binding and unbinding of glucose from the sensing moiety is effective and quantifiable. In addition to glucose concentration, the gel volume is dependent on temperature and ionic strength, and these factors can vary throughout the course of a day or from day to day. For example, core body temperature can vary by 1 C and normal sodium levels range from 135-147 mmol/L. To compensate for these cross-sensitivities, we propose collecting data points from two sets of electrodes. The gel between the first set of electrodes will be glucose-sensitive. The gel between the second set of electrodes will be identical in every way to the first, with the exception that it will lack sensitivity to glucose. Thus, the two measurements can be calibrated so as to extract the volume change due to glucose alone. Some notable limitations were present due to the nature of the swelling ratio studies. First, multiple weight measurements were required, which resulted in the frequent handling of the hydrogels. Despite using extreme caution, small bits of the hydrogel were likely lost over time, and second, inconsistent manual drying prior to each weighing may also have contributed to the deviations in swelling ratio. A practical limitation was observed in the time it takes the hydrogels to reach their equilibrium swelling ratio. The target response time for continuous glucose monitors is approximately 5 min to facilitate timely insulin administration. Upon exposure to a higher glucose concentration, the hydrogel took approximately 300 h to reach its equilibrium swelling ratio and upon exposure to a lower glucose concentration, the hydrogel took almost 600 h to reach its equilibrium swelling ratio. The fact that the shrinking of the hydrogel took longer than the swelling was also observed by Matsumoto et al.. However, it is important to note that samples with large dimensions, on the order of centimeters, were used in this study in order to increase the accuracy of the weight measurements. In a clinical application of the hydrogel as a glucose sensor, the size of the hydrogel would be on the order of micrometers. It is hypothesized that samples with smaller dimensions would reach their equilibrium swelling ratio quicker than the larger hydrogels in this study. In particular, diffusive length scales are governed by the Fourier Number for mass transport, F 0  Dt L 2, where D is the diffusivity, t is the characteristic timescale, and L is the largest diffusive length. Based on the experimental data described herein, dimensional analysis indicates that a sample of the hydrogel whose largest dimension was no more than 170 m would reach its equilibrium swelling ratio within the proscribed five minutes. The kinetics of the volume changes of hydrogels in general are governed by diffusion-limited transport of the glucose solution through the polymeric network, the completion time for which is inversely proportional to the square of the smallest dimension of the hydrogel. The presented results warrant future optimization of the hydrogel's dimensions to ensure a timely response for use in sensors. In order to acquire a quantifiable electrical signal that responds to the change in volume of the hydrogel, the impedances through the hydrogels exposed to 300 and 500 mg/dL glucose solutions were measured. An insignificant difference between the impedance versus distance plots was observed in the hydrogels exposed to 300 and 500 mg/dL glucose solutions. It was concluded that the impedance of the hydrogel does not depend on the glucose concentration of exposure; it depends solely on the thickness of the hydrogel sample. From the swelling ratio study, it was determined that the hydrogel is less than 10% polymer if it is exposed to a glucose concentration above 100 mg/dL and the impedance was also independent of the small changes in polymer density with swelling. Thus, the impedance is solely dependant on the ions in the solution that diffuse and permeate through the hydrogel. In an in vivo setting, the sensor will function similarly by measuring the impedance across a volume of ionic fluid, with the interprobe distance defined by a hydrogel that has swollen with respect to the surrounding glucose concentration. In future designs, the impedance of the blood will need to be taken into account when examining the impedance of the hydrogel due to swelling as a result of glucose. This is because the impedance of the blood may vary depending on the fluctuation in the ionic concentration. In order to compensate for this in a future design, an additional calibration component may be added that would solely measure the impedance of the surrounding medium. Determining the mass transfer properties of the hydrogel is essential in order to be able to model the hydrogel's performance as a sensor, thus we investigated the porous structure of the hydrogel, the diffusivity of a small molecule within the hydrogel as a function of glucose concentration, and the permeability of the hydrogel in a normal and pathological glucose solution. Only two glucose concentrations were examined due to the fact that a clear trend was apparent between the hydrogels exposed to the 100 and 300 mg/dL glucose solution, as shown in Table 2. For these experiments an unbalanced design was used, as data was not excluded from additional experiments performed with some concentration groups. This fact has been taken into account into the statistical analysis with the unpaired t-test ( = 0.05). Analysis of the SEM images revealed that there was a statistically significant difference between the ratio of the void space to total hydrogel sample area for the hydrogels exposed to 100 and 300 mg/dL glucose solutions. Upon examination of the images it is evident that the hydrogels exposed to the 300 mg/dL glucose solution had more void space when compared to the hydrogels exposed to the 100 mg/dL glucose solutions, as shown in Table 2. This significant difference was expected based on the swelling ratio study previously described, in which the hydrogels exposed to the 300 mg/dL glucose solutions had a lower polymer percentage than the hydrogels exposed to the 100 mg/dL glucose solutions. To estimate the diffusivity of glucose (molecular weight 180 g/mol) within the hydrogel after reaching an equilibrium swelling ratio in glucose solutions of 100 and 300 mg/dL the fluorophore non-conjugated FITC with a molecular weight of 390 g/mol was used. It was found that the diffusion coefficient of the FITC through the hydrogels exposed to 300 mg/dL glucose solution was larger than the diffusion coefficient of the FITC through the hydrogels exposed to 100 mg/dL glucose solution by a factor of 4.45. This result was hypothesized as the hydrogels exposed to 100 mg/dL glucose solutions have a smaller porosity ratio than the 300 mg/dL. An unpaired t-test analysis of the diffusion coefficients for FITC through the hydrogels exposed to 100 and 300 mg/dL glucose solution showed the difference was statistically significant. Furthermore, the diffusion coefficient of the FITC in 300 mg/dL glucose solution, 6.2 10 −10 m 2 /s, was remarkably similar to what has been found for glucose in water 6.0 10 −10 m 2 /s. This finding not only showed that the diffusivity of the FITC in the hydrogels exposed to 100 and 300 mg/dL glucose solutions was 3 to 4 orders of magnitude slower than the diffusivity of the FITC in glucose solution, it also added confidence to the validity of the experimental method. The hindrance ratios showed that the presence of the hydrogels slowed the diffusion of the FITC molecules by over three orders of magnitude compared to the diffusion in glucose solution. Other studies in the literature have used the permeability constant to infer information about the microstructure of gels and a sense of the order of magnitude of the permeability of the glucose-sensitive hydrogel can be gathered upon comparison to these findings ( Table 3). The hydrogels exposed to 100 and 300 mg/dL glucose solutions were found to have average permeabilities of 5.26 10 −17 m 2 and 5.8 10 −17 m 2, respectively, which were found to be similar to the published permeability values of 2, 4, and 7.5% agarose gels. Furthermore, an unpaired t-test ( = 0.05) analysis revealed no statistical difference between the permeabilities of the hydrogels exposed to 100 and 300 mg/dL glucose solutions. The pressures the hydrogels were exposed to in the permeability columns ranged from 8,000 to 9,000 Pa (60-67.5 mmHg). As a comparison, the mean arterial pressure of a normal individual is 83 mmHg and the blood pressure is highest (110 mmHg) in the aorta during systole and is the lowest (70 mmHg) during diastole. Furthermore, the mean pressures observed in the pulmonary artery and right atrium in normal individuals are 17  2 and 6  5 mmHg, respectively. The pressures that the hydrogel were exposed to were slightly lower than that of normal mean arterial pressures, but higher than those observed in the rest of the circulatory system. Future mathematical modeling will be performed using the diffusivity and permeability values found to test numerous designs of the hydrogel to determine which allows for the fastest diffusion of glucose throughout the entire hydrogel, and therefore the quickest response time. To take the modeling one step further, the sensor will be modeled in the bloodstream and attached to a stent. Table 3. Comparison of published permeability values with the permeability of hydrogels exposed to 100 and 300 mg/dL glucose solutions, which resulted in 4.6% and 8.2% glucose-sensitive hydrogels, respectively. Conclusions Incremental advances in diabetes research have made a long-term, continuous glucose monitoring system feasible within the near future. We aim to develop a long-term, continuous, intravascular glucose monitoring system that will minimize complications due to missed glucose measurements and aid in the management of the disease. The ideal intravascular continuous glucose sensor would last for the lifetime of the patient and have a response time and accuracy equal to the ex vivo glucose monitoring systems (<5 seconds and an accuracy in accordance to ISO 15197 which states blood glucose meters must provide results that are within 20% of a laboratory standard 95% of the time). Subcutaneous glucose sensors have a response time of 5-20 minutes due to the lag between the blood and interstitial glucose levels, their accuracy is of great debate, and the sensor lifetime has been found to be only a week due to encapsulation and sensor drift. Much work needs to be performed to bring our future glucose sensor to these performance standards. However, these preliminary results show this may be possible in the future, thus providing a superior technology to continuous subcutaneous glucose sensors. Preliminary characterization of the glucose-sensitive hydrogel has been performed and the results will be used to model an optimal glucose sensor design. It can be concluded that the swelling ratio and rate of the hydrogel are directly related to the glucose concentration of exposure. Furthermore, the swelling behavior was determined to be reversible. From this swelling behavior, the impedance of the hydrogel can be measured as a function of hydrogel thickness, however no dependence on glucose concentration of exposure was observed. It was found that the porosity and diffusivity of the hydrogel increase with an increase in the glucose concentration of exposure, however an insignificant difference in the permeability of the hydrogel between exposures to 100 and 300 mg/dL glucose solutions was observed. Based on these experiments, it seems feasible that a continuous, intravascular glucose sensor could be developed with the underlying concept that the binding of glucose with the hydrogel results in a volume change, which results in a measurable change in impedance that is correlated to glucose concentration. We have gathered preliminary data to move forward to optimize and build a prototype of a glucose sensor with this hydrogel and integrate it with our previous work of using FDA-approved stents as antennas for wireless data transfer from within the body [9,.
"""Test suite for the client module.""" from typing import Dict import pytest from pydantic import ValidationError from tabulate import tabulate # type: ignore from tia.client import Client def test_client_init(some_client: Dict[str, str]) -> None: """It creates an instance with the given values. Args: some_client (Dict[str, str]): Data for an example `Client`. """ client = Client(**some_client) assert client.dict() == some_client def test_client_init_no_invoicemail(some_client: Dict[str, str]) -> None: """It sets `invoicemail` to `email`, if no `invoicemail` is given. Args: some_client (Dict[str, str]): Data for an example client """ some_client.pop("invoicemail") client = Client(**some_client) assert client.invoicemail == client.email def test_client_init_no_remindermail(some_client: Dict[str, str]) -> None: """It sets `remindermail` to `email`, if no `remindermail` is given. Args: some_client (Dict[str, str]): Data for an example client """ some_client.pop("remindermail") client = Client(**some_client) assert client.remindermail == client.email def test_client_init_extra_forbid(some_client: Dict[str, str]) -> None: """It raises if extra fields are given. Args: some_client (Dict[str, str]): Some `Client` data. """ client_data = some_client.copy() client_data["extra_field"] = "not_allowed" with pytest.raises(ValidationError) as excinfo: Client(**client_data) info = str(excinfo) assert "extra fields not permitted" in info and "extra_field" in info def test_client_address(some_client: Dict[str, str]) -> None: """It properly returns the clients address.""" client = Client(**some_client) assert ( client.address == f"{client.street}\n{client.plz}, {client.city}\n{client.country}" ) def test_client_contact_information(some_client: Dict[str, str]) -> None: """It properly returns contact information for the client.""" client = Client(**some_client) assert ( client.contact_information == f"\n✉ (official): {client.email}\n✉ (invoice): {client.invoicemail}\n✉" f" (reminder): {client.remindermail}" ) def test_client_compact(some_client: Dict[str, str]) -> None: """It returns all data to the client in a compact list.""" client = Client(**some_client) assert client.compact == [ ["Client_ID: " + client.ref + "\n" + client.name], [client.address], [client.contact_information], ] def test_client__str__(some_client: Dict[str, str]) -> None: """It has a human readable string representation.""" client = Client(**some_client) assert client.__str__() == tabulate(client.compact)
The Forestry Unit of the Public Works-Street Division maintains all public parkway trees as well as all the trees on village-owned properties. There are approximately 12,000 public trees that the forestry unit is responsible. Routine maintenence includes trimming, fertilizing, and watering of new plantings. The forester also inspects and checks trees for diseases or insect infestation. If there are any issues involving the trees in the parkways, contact the Street Division at 630-981-6270. In October, 2010 the Village Forester along with the Illinois Department of Agriculture have positively identified the presence of the Emerald Ash Borer (EAB) in Westmont. The Illinois Department of Agriculture (IDA) has confirmed the Emerald Ash Borer (EAB) has been located in the Village of Westmont. One single adult EAB was discovered in a trap placed in a tree within the Oakwood Subdivision. Through further inspection, an infestation was discovered along nearby in a few declining ash trees. The Emerald Ash Borer is a small, metallic-green beetle native to Asia. It is a destructive pest that feasts on ash trees. The larvae burrow into the bark of ash trees, causing the trees to starve and eventually die. While the beetle does not pose any direct risk to public health, it does threaten the tree population. Since the EAB was first confirmed in the Midwest in the summer of 2002, more than 26 million ash trees have died. "Westmont staff will promptly respond to all suspected sightings of the Emerald Ash Borer," said Stephen May, Director of the Westmont Public Works Department. "We had previously received calls from residents to report suspected cases of the beetle, but there was no confirmed evidence until now." “We have been keeping up on this issue since its discovery in Michigan in 2002,” said Village Forster Jonathan Yeater, who is working with the Village to create an effective response. Originally, all ash trees within a half mile radius of a confirmed infestation were removed in an effort to eliminate the pest, but that method has not been effective. New strategies are currently being developed and will be implemented this winter. Residents are encouraged to visit the IDA EAB website at www.agr.state.il.us/eab or the Illinois Arborist Association website at www.emeraldashborer.info to view photographs of the insect and learn more about the EAB’s life cycle. The ‘Don’t Move Firewood’ website is also a good resource www.dontmovefirewood.org. Westmont currently has over 2000 ash trees on its parkways, which makes up more than 15 percent of its entire tree population. Additionally, there are thousands of ash trees on private property throughout the Village. Ash trees were widely planted in the Village and in much of northeast Illinois because they are fairly inexpensive and generally quite tolerant of soils and climate in this area. MONITOR AND REPORT EAB - Learn about EAB, check your ash trees for the pest and call us 630-981-6270 if you believe you have found either the insect or an infested ash tree. The Village of Westmont Street Division will respond promptly to all such calls. FOLLOW DIRECTIVES FROM IDA - Check for periodic updates at these websites: www.westmont.il.gov, www.agr.state.il.us/eab and www.emeraldashborer.info. DO NOT MOVE OR PURCHASE ASH WOOD - Use only local firewood (even when traveling) and burn the wood on site. Leave firewood behind when you move on. Most importantly, do not bring firewood or logs from other states, or any areas that may become quarantined in Illinois, to Westmont. Do not purchase any firewood containing ash wood until further notice. CARE FOR ASH TREES - Call the Village of Westmont Street Division if a public ash tree seems sick or needs maintenance. Care for private trees routinely using ISA-certified arborists when hiring tree care companies. PLANT FOR DIVERSITY - Do not plant ash trees. Plant underutilized tree species instead. The Village of Westmont appreciates your cooperation regarding this matter.
Variance of permutation entropy and the influence of ordinal pattern selection. Permutation entropy (PE) is a widely used measure for complexity, often used to distinguish between complex systems (or complex systems in different states). Here, the PE variance for a stationary time series is derived, and the influence of ordinal pattern selection, specifically whether the ordinal patterns are permitted to overlap or not, is examined. It was found that permitting ordinal patterns to overlap reduces the PE variance, improving the ability of this statistic to distinguish between complex system states for both numeric (fractional Gaussian noise) and experimental (semiconductor laser with optical feedback) systems. However, with overlapping ordinal patterns, the precision to which the PE variance can be estimated becomes diminished, which can manifest as increased incidences of false positive and false negative errors when applying PE to statistical inference problems.
<filename>VideoLocker/src/main/java/org/edx/mobile/view/CourseDiscussionCommentsFragment.java package org.edx.mobile.view; import android.content.Context; import android.graphics.Rect; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.google.inject.Inject; import org.edx.mobile.R; import org.edx.mobile.base.BaseFragment; import org.edx.mobile.base.BaseFragmentActivity; import org.edx.mobile.discussion.DiscussionComment; import org.edx.mobile.discussion.DiscussionCommentPostedEvent; import org.edx.mobile.discussion.DiscussionThread; import org.edx.mobile.discussion.DiscussionUtils; import org.edx.mobile.model.Page; import org.edx.mobile.module.analytics.ISegment; import org.edx.mobile.task.GetCommentsListTask; import org.edx.mobile.task.SetCommentFlaggedTask; import org.edx.mobile.view.adapters.DiscussionCommentsAdapter; import org.edx.mobile.view.adapters.InfiniteScrollUtils; import java.util.HashMap; import java.util.Map; import de.greenrobot.event.EventBus; import roboguice.inject.InjectExtra; import roboguice.inject.InjectView; public class CourseDiscussionCommentsFragment extends BaseFragment implements DiscussionCommentsAdapter.Listener { @InjectView(R.id.discussion_comments_listview) private RecyclerView discussionCommentsListView; @InjectView(R.id.create_new_item_text_view) private TextView createNewCommentTextView; @InjectView(R.id.create_new_item_layout) private ViewGroup createNewCommentLayout; @Inject private Router router; @Inject private Context context; @InjectExtra(Router.EXTRA_DISCUSSION_THREAD) private DiscussionThread discussionThread; @InjectExtra(Router.EXTRA_DISCUSSION_COMMENT) private DiscussionComment discussionResponse; @Inject ISegment segIO; private DiscussionCommentsAdapter discussionCommentsAdapter; @Nullable private GetCommentsListTask getCommentsListTask; private int nextPage = 1; private boolean hasMorePages = true; private InfiniteScrollUtils.InfiniteListController controller; @Nullable private SetCommentFlaggedTask setCommentFlaggedTask; @Nullable @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_discussion_comments, container, false); } @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); discussionCommentsAdapter = new DiscussionCommentsAdapter(getActivity(), this, discussionResponse); controller = InfiniteScrollUtils.configureRecyclerViewWithInfiniteList(discussionCommentsListView, discussionCommentsAdapter, new InfiniteScrollUtils.PageLoader<DiscussionComment>() { @Override public void loadNextPage(@NonNull InfiniteScrollUtils.PageLoadCallback<DiscussionComment> callback) { getCommentsList(callback); } }); final int overlap = getResources().getDimensionPixelSize(R.dimen.edx_hairline); discussionCommentsListView.addItemDecoration(new RecyclerView.ItemDecoration() { @Override public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) { outRect.set(0, -overlap, 0, 0); } }); discussionCommentsListView.setAdapter(discussionCommentsAdapter); DiscussionUtils.setStateOnTopicClosed(discussionThread.isClosed(), createNewCommentTextView, R.string.discussion_post_create_new_comment, R.string.discussion_add_comment_disabled_title, createNewCommentLayout, new View.OnClickListener() { @Override public void onClick(View v) { router.showCourseDiscussionAddComment(context, discussionResponse, discussionThread); } }); } protected void getCommentsList(@NonNull final InfiniteScrollUtils.PageLoadCallback<DiscussionComment> callback) { if (getCommentsListTask != null) { getCommentsListTask.cancel(true); } getCommentsListTask = new GetCommentsListTask(getActivity(), discussionResponse.getIdentifier(), nextPage) { @Override public void onSuccess(Page<DiscussionComment> threadCommentsPage) { ++nextPage; callback.onPageLoaded(threadCommentsPage); discussionCommentsAdapter.notifyDataSetChanged(); hasMorePages = threadCommentsPage.hasNext(); } @Override public void onException(Exception ex) { super.onException(ex); discussionCommentsAdapter.setProgressVisible(false); } }; getCommentsListTask.setProgressCallback(null); getCommentsListTask.execute(); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); EventBus.getDefault().register(this); Map<String, String> values = new HashMap<>(); values.put(ISegment.Keys.TOPIC_ID, discussionThread.getTopicId()); values.put(ISegment.Keys.THREAD_ID, discussionThread.getIdentifier()); values.put(ISegment.Keys.RESPONSE_ID, discussionResponse.getIdentifier()); segIO.trackScreenView(ISegment.Screens.FORUM_VIEW_RESPONSE_COMMENTS, discussionThread.getCourseId(), discussionThread.getTitle(), values); } @Override public void onDestroy() { super.onDestroy(); if (getCommentsListTask != null) { getCommentsListTask.cancel(true); } EventBus.getDefault().unregister(this); } @SuppressWarnings("unused") public void onEventMainThread(DiscussionCommentPostedEvent event) { if (null != event.getParent() && event.getParent().getIdentifier().equals(discussionResponse.getIdentifier())) { ((BaseFragmentActivity) getActivity()).showInfoMessage(getString(R.string.discussion_comment_posted)); if (!hasMorePages) { discussionCommentsAdapter.insertCommentAtEnd(event.getComment()); discussionCommentsListView.smoothScrollToPosition(discussionCommentsAdapter.getItemCount() - 1); } } } @Override public void reportComment(@NonNull DiscussionComment comment) { if (setCommentFlaggedTask != null) { setCommentFlaggedTask.cancel(true); } setCommentFlaggedTask = new SetCommentFlaggedTask(context, comment, !comment.isAbuseFlagged()) { @Override public void onSuccess(DiscussionComment comment) { discussionCommentsAdapter.updateComment(comment); } }; setCommentFlaggedTask.execute(); } @Override public void onClickAuthor(@NonNull String username) { router.showUserProfile(getActivity(), username); } }
Given the acerbic response to the disappointing news that almost half of graduates take non-graduate jobs, it appears many do have wildly overblown expectations of a degree. Such wrong-headed thinking misses the mark: the job market is bleak and unsparing for everyone and a degree does not somehow unburden its bearer of this. Who thought it would? Were sixth-formers sold the idea that degrees hang in recession-proof frames? Since 2008/09, it is also this group who have seen unemployment rates rise the most steeply and again, it is this bracket who have the highest inactivity rates (they are out of the workforce). Conversely, graduates are more likely to earn more, more likely to work in the most highly-skilled jobs and will see their wage rise more quickly than their non-graduate counterparts. Rather than make snide remarks about degrees, while wilfully ignoring these findings, it would be better to offer sixth formers a clear perspective of the jobs market. It is no exaggeration to say underemployment is a blight on our society – its consequence is an inefficient workforce. For any young person, jobs are scarce and competition is fierce. Collecting qualifications will not change this. A degree will not excuse stuttering through an interview, it will not correct spelling mistakes on a CV and it doesn’t individualise the generic ‘I have a 2:1 and worked the summer at my Dad’s place’ cover letter. A degree is proof you wanted to learn, can learn and will keep learning. It should show your mind has been stretched and twisted, contradicted and challenged, moulded and remoulded. Plainly though, having a degree isn’t enough. Kind-minded but wrong advice says ‘any degree will do’ but subject choice is pivotal. Too often courses are derided with over simplistic ridicule. It’s foolish and patronising to judge a degree by title alone, however amusing some may find it. For instance, agricultural science might sound like a glorified replacement for a few summers spent picking strawberries, but in truth 91 per cent of agricultural science graduates are employed and their average wage is £28,600. In fact, 93 per cent of graduates of the much-maligned media studies are employed, although their wage is lower at £21,008. Better course transparency is needed. Universities should clearly market the benefits of their courses: employment rates, how many follow through with the subject, the average salary of graduates and so forth. Our problem is encouraging too many students into university, without them realising the difficult market they face afterwards. They choose the wrong course and accordingly, make a decision about a career that is entirely separate to their subject, rather than a continuation of it. These subjects and their kind are taken for learning, intellect, knowledge and understanding. Only those incapable of doing so would resent those who are motivated this way. We seem to have a real problem with people judging a degree for its monetary value and earning power alone. Occasionally, I think I must be missing classes everyone else attends – and, incidentally, feel all the better for it. I must have been ill when the virtues of lager and football were discussed, and was probably skipping class when people were apparently being taught that a degree results in automatic employment. It doesn’t. Nothing does. Everything must be worked for, and as the figures show, those who graduate with a degree will find their work rewarded. But to slam university and claim cheap political points because just under half of graduates do not work in a graduate job is fatuous: we should be looking at expanding the job market for the young, rather than limiting their education.
A Vietnamese political prisoner released after 14 years in detention has called for better treatment for dissidents remaining in the country’s prison camps, saying he was barely able to survive his own sentence. Huynh Anh Tri, who along with his brother Huynh Anh Tu was released on Sunday, said he knew of countless fellow inmates who had died from harsh conditions since his detention in 1999. The two brothers, members of the U.S.-based Government of Free Vietnam—one of several opposition organizations set up by overseas Vietnamese—had both been convicted of “terrorism” with intent to overthrow Hanoi’s one-party, communist government. Tri said he had been subjected to harsh treatment because of his status as a political prisoner. “An animal in that situation surely would have died,” Tri told RFA’s Vietnamese Service. “But as a human, I was able to endure it because I have my mind and spirit,” he said. “Many people died, both young and old … I can’t recall all of them,” he said. Tri urged the government to pay greater attention to the health of Nguyen Huu Cau, one of Vietnam’s longest-serving political prisoners, who has lost most of his vision and hearing since his detention in 1982. “I think Vietnam needs to look into Nguyen Huu Cau’s case,” Tri said. “He went blind in prison, and that is different from someone who was blind when he was younger,” he said. Tri, who was transferred to the Xuyen Moc prison camp following a riot at the Xuan Loc prison camp in June by inmates demanding better conditions, said prison guards told detainees they had the right to make up their own rules for how to treat prisoners. Since their release, Tri and Tu do not know where they will live now that their family members have been scattered or died while they were in prison, Tri said. Their mother and eldest brother have died, and their other siblings are living in Thailand with their 70-year-old father, he said. “After 14 years in prison, now we don’t know where to live,” Tri said. Reported by An Nguyen for RFA’s Vietnamese Service. Translated by Viet Ha. Written in English by Rachel Vandenbrink. Chính phủ Việt Nam là nhóm ác.Việt Nam bị cho nhiều thập kỷ.Việt Nam có tự do không có trong cuộc sống của họ.Tất cả người Việt phải đứng cùng nhau để ngăn chặn chính phủ áp bức này. If you treat people as if they were what they ought to be and could be, they will become what they ought to be and could be.
Manter and Gatz's Essentials of Clinical Neuroanatomy and Neurophysiology 5th ed. Communications: The Department will be cosponsoring a seminar on Food and Nutrition with the Fernbank Science Center in Atlanta, 15-16 May. In conjunction with the seminar, an experimental membership registration project was conducted. Two-page questionnaires were mailed to the 864 AAAS members in the Atlanta area, inquiring about their interest in public understanding of science activities, both with the AAAS and the Fernbank Center. The response has been very good. Other regional seminars planned by the Department are "Energy: Alternatives for Ohio," to be held in Cleveland 9-10 May; and "Energy ConservationResource Recycling and Reclamation," in Montgomery, Alabama, 10-11 June. The Department is also assisting the Weekend College of Wayne State in Detroit with their plans for a food science seminar the last weekend in May.
#include "rz-ngml-whitespace-holder.h" #include "rzns.h" USING_RZNS(NGML) void NGML_Whitespace_Holder::attach_whitespace(QString whitespace) { ws_ = NGML_Whitespace(whitespace); }
// AddInterface is a helper function that populates a HostFabric. func (hf *HostFabric) AddInterface(hfi *HostFabricInterface) { hf.Interfaces = append(hf.Interfaces, hfi) hf.Providers = append(hf.Providers, hfi.Provider) hf.Providers = common.DedupeStringSlice(hf.Providers) }
package com.agilistanbul.darklord.commons.utils; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.io.IOException; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; /** * @author <NAME> * @since 10.12.2013 */ public class ResourceUtilsTest { private static final Logger logger = LoggerFactory.getLogger(ResourceUtilsTest.class); @Test public void getClasspathResource() throws Exception { assertEquals(new File(this.getClass().getResource("/log4j.properties").getPath()), ResourceUtils.getClasspathResource(this.getClass(), "/log4j.properties")); } @Test (expected = IOException.class) public void getClasspathResourceInvalidPath() throws IOException { ResourceUtils.getClasspathResource(this.getClass(), "/x/y/z"); } @Test public void getFileFromAbsolutePath() throws IOException { String absolutePath = new File(this.getClass().getResource("/log4j.properties").getPath()).getAbsolutePath(); logger.info("Detected the absolute path: {}", absolutePath); assertTrue(ResourceUtils.getFile(this.getClass(), absolutePath).exists()); } @Test public void getFileFromRelativePathForMissingInAbsolutePath() throws IOException { assertTrue(ResourceUtils.getFile(this.getClass(), "log4j.properties").exists()); } }
def every(self, every): self._every = every
def from_gdal(cls, rpcs): out = {} for key, val in rpcs.items(): vals = val.split() if len(vals) > 1: out[key] = [float(v) for v in vals] else: out[key] = float(vals[0]) return cls( err_bias=out.get("ERR_BIAS"), err_rand=out.get("ERR_RAND"), height_off=out["HEIGHT_OFF"], height_scale=out["HEIGHT_SCALE"], lat_off=out["LAT_OFF"], lat_scale=out["LAT_SCALE"], line_den_coeff=out["LINE_DEN_COEFF"], line_num_coeff=out["LINE_NUM_COEFF"], line_off=out["LINE_OFF"], line_scale=out["LINE_SCALE"], long_off=out["LONG_OFF"], long_scale=out["LONG_SCALE"], samp_den_coeff=out["SAMP_DEN_COEFF"], samp_num_coeff=out["SAMP_NUM_COEFF"], samp_off=out["SAMP_OFF"], samp_scale=out["SAMP_SCALE"], )
The United Way of the Lowcountry Board of Directors announced gifts and pledges totaling $2,006,493, which is 71.6 percent of the organization's 2012 goal of $2.8 million. With the holidays in full swing and the season of giving underway, United Way leaders encourage helping others. From 2-6 p.m. Friday, J Banks Retail Store in Hilton Head offers all shoppers 25 percent off purchases. The 10 percent of the store's total sales that day will be donated back to United Way of the Lowcountry. In October, volunteer reading tutors began working in eight Lowcountry schools. The goal is to ensure that students are reading at grade level when they enter fourth-grade. It ties to the long-term goal to reduce dropouts by 50 percent within 10 years in all Beaufort County and Jasper high schools. To learn more about United Way of the Lowcountry and its work to make the community a better place, call 982-3040 or go to www.uwlowcountry.org.
package com.mayreh.intellij.plugin.tlaplus.psi; import java.util.Arrays; import java.util.List; import org.jetbrains.annotations.Nullable; import org.junit.Assert; import com.intellij.codeInsight.completion.CompletionType; import com.intellij.psi.PsiReference; import com.intellij.testFramework.fixtures.BasePlatformTestCase; public class TLAplusReferenceTest extends BasePlatformTestCase { @Override protected String getTestDataPath() { return "src/test/resources"; } public void testBasic() { PsiReference reference = getReferenceAtCaret("Local.tla"); TLAplusNonfixLhsName name = assertInstanceOf(reference.resolve(), TLAplusNonfixLhsName.class); Assert.assertEquals("Foo", name.getName()); } public void testExtends() { PsiReference reference = getReferenceAtCaret("Extends_A.tla", "Extends_B.tla"); TLAplusNonfixLhsName name = assertInstanceOf(reference.resolve(), TLAplusNonfixLhsName.class); Assert.assertEquals("Foo", name.getName()); Assert.assertEquals("Extends_B", name.currentModule().getModuleHeader().getName()); } public void testExtendsLocal() { PsiReference reference = getReferenceAtCaret("Extends_Local_A.tla", "Extends_Local_B.tla"); // LOCAL definition should not be visible Assert.assertNull(reference.resolve()); } public void testInstancePrefix() { PsiReference reference = getReferenceAtCaret( "InstancePrefix_A.tla", "InstancePrefix_B.tla", "InstancePrefix_C.tla"); TLAplusNonfixLhsName name = assertInstanceOf(reference.resolve(), TLAplusNonfixLhsName.class); Assert.assertEquals("Foo", name.getName()); Assert.assertEquals("InstancePrefix_C", name.currentModule().getModuleHeader().getName()); } public void testCompletionStandardModules() { List<String> elements = getLookupElementStringsAtCaret("StandardModules.tla"); Assert.assertNotNull(elements); assertSameElements(elements, "Bags", "FiniteSets", "Integers", "Json", "Naturals", "Randomization", "Reals", "RealTime", "Sequences", "TLC", "TLCExt", "Toolbox"); } private PsiReference getReferenceAtCaret(String... fileNames) { return myFixture.getReferenceAtCaretPositionWithAssertion( Arrays.stream(fileNames) .map(name -> "tlaplus/psi/reference/fixtures/" + name) .toArray(String[]::new) ); } private @Nullable List<String> getLookupElementStringsAtCaret(String... fileNames) { myFixture.configureByFiles( Arrays.stream(fileNames) .map(name -> "tlaplus/psi/completion/fixtures/" + name) .toArray(String[]::new)); myFixture.complete(CompletionType.BASIC); return myFixture.getLookupElementStrings(); } }
Speaking up: few of Lukas Webb's Western Bulldogs teammates knew the circumstances of his friend's death. Credit:Eddie Jim They'd have been bonded regardless, this crew of young men from Gippsland who've always had each other's backs. Now their alliance will for ever have a mournful edge. "It's changed our lives." Before he was a 20-year-old Western Bulldogs footballer of poise and promise, Lukas Webb was a teenager with a tight band of mates living and loving the adventures of country kids. At primary school he was drawn to Brandon, the fastest boy in class who could do backflips in grade 2. The life of the playground, he was known to all as "Speedy". "We all loved him. He was so cheerful, everything he did was with a smile on his face. He was from a really nice family, had lots of brothers and sisters. One of the most exciting kids I've ever met." They played basketball together in junior representative teams, sharing car trips to Maffra, Traralgon, Moe, Morwell. Whatever Brandon had he was always willing to share. "He'd always be giving his lunch away at school, he was so generous." Webb (right) didn't know his friend, Jake (left), had been struggling Geography eventually pulled them apart, as Webb went to school in Sale and later Melbourne. On the way home from Gippsland Power football training one night the grim news arrived on Facebook. "He was the first close person to me who'd passed away. Everyone reacts differently. For me it was just really hard to get my head around the idea that he's not with us any more ..." Webb with his friend, Brandon, when they were kids. Jake was sporty in a different way, an "action man" who lived on a farm outside town where he and his brothers rode motorbikes and drove paddock bombs. He loved gadgets – a GoPro, headphones, all things music and video – and was always looking for the next innovation. "He was an inventor – he had such a creative mind, was always one step ahead of everyone else," Webb says. It touches people in so many communities, you don't realise how you can be connected. Jake had started school early so was a year level above, but it made no difference. They sat next to each other on the 90-minute bus ride to Gippsland Grammar, the same seats every day for years. "The bus always went quick because we were laughing the whole time." Webb went to Caulfield Grammar for his VCE years but in the holidays his mates would reconnect like they'd never been apart. He initially found the move hard, but Jake was there for him whenever he came home; they'd be off taking photos, or surfing, skating, jumping off piers and bridges. "He taught a lot of people lessons in how to handle yourself, he was always so respectful to your mum and dad. Mum loved Jake, so did dad. He was just such a bright personality, everything you'd want in a young kid." On Australia Day 2015, three months after he'd been drafted by the Bulldogs, Webb invited everyone to his mother's house just outside Lakes Entrance. A gathering that grew into the 30s as the day wore on had a few beers, listened to the annual Hottest 100 countdown on Triple J, just hung out. He still has photos on his phone of their crew down at the beach, everyone smiling and happy, Jake in the thick of it. They went back home and were counting down the top 10 when Jake told him he had to work early the next morning so was heading off. "I'll see ya soon, speak to you later," his friend said as they shared the handshake of soulmates, always with some silly flourish or ritual at the end. Webb watched him say goodbye to the others, just like any day, climb into a taxi and drive off. The stayers headed down the hill to the pub, but as soon as they arrived the publican told Webb his mother had phoned asking to bring him straight home. The police were there when they arrived. "My memory's pretty hazy from there," he says. "I remember breaking down as soon as they told me, just disbelief really." Jake had taken his own life. He speaks beautifully of his mate but admits he finds it hard – not least because his mind turns to Jake's family, how much more acute their pain is, how many more questions they must have. The hardest thing has been coming to terms with the fact that, even if he'd known, he might not have been able to help. "I've learnt that people get sick mentally, it's like physically getting sick. I still don't think people realise that. We were so close to him, and we didn't even know." It's made him think about what more can be done to prevent youth suicide, something he reckons people don't worry about unless it affects them directly. "It's such a big problem in today's society – people are scared to speak, people don't talk about their feelings. It's an old-fashioned thing – as country kids it was, 'Just get on with it'." He knows there are groups, such as Lifeline and beyondblue, doing valuable work He knows, too, there are young people hurting, and just hopes they can reach out somehow, even if only through the anonymity of the internet. "I think we should definitely open up the conversation a bit more. As hard as it is, just speak out. Don't bottle things up – it's pretty cliched, but just say how you're feeling." His own experience in the days after Jake's death highlights the malaise. Webb missed the first day of the Bulldogs' pre-season camp on the Sunshine Coast, but was there by the Thursday and trained through the weekend before returning home for the funeral. Most people at the club knew he'd lost a close friend, but not the circumstances. More than a year later, few still do. He says the club was "amazing, looked after me really well", but admits he struggled for a time at training. As a kid, football had always been an outlet, a release from the real world. Now that it's his job he finds himself reaching for something else to calm a ticking mind. Webb played 10 games in his debut season, showing enough across half-back to earn a contract extension. He knows his learning curve is steep in a team on the rise, that he'll have to work harder still to keep up. But given the miserable backdrop, he's proud of what he's done so far. "I just sort of got on with it." On Australia Day this year his crew gathered again, this time at another mate's house in Traralgon. He didn't feel like a beer so just relaxed, gravitated to those who'd been closest to Jake. Together they listened to the Hottest 100. "It was a pretty tough day to get through mentally, but with everyone else there, happy to be in each other's company, we had a pretty good day. As good as it probably could have been." He's proud of how they got around each other at the time, and makes an effort to stay in touch with a wider circle than he might have before. When he told Jake's family he'd spoken to Fairfax Media they were supportive and grateful; people are still nervous around them so rarely bring it up. The silence is excruciating. His friends don't shy away from talking about Jake, are committed to holding fast to what a great mate he was. "Obviously it frustrates me, but you just don't know what people are going through. If anything I just feel sorry for him, that no one could help him. "At the end of the day it was his choice, and it was obviously a really poor decision. But I don't think I've really been angry at him. It's just given me an understanding that someone can be struggling that much. And that we need to help." For help or information call Lifeline 131 114 or beyondblue 1300 224 636
<gh_stars>0 import { AppError, Either, left, Result, right, UseCase, } from "../../../../shared/core"; import { AuthorDetails } from "../../domain"; import { IAuthorRepo } from "../../repo/authorRepo"; import { GetAuthorByUserNameDTO } from "./getAuthorByUserNameDTO"; import { GetAuthorByUserNameErrors } from "./getAuthorByUserNameErrors"; type Response = Either< GetAuthorByUserNameErrors.AuthorNotFoundError | AppError.UnexpectedError, Result<AuthorDetails> >; export class GetAuthorByUserName implements UseCase<GetAuthorByUserNameDTO, Promise<Response>> { private authorRepo: IAuthorRepo; constructor(authorRepo: IAuthorRepo) { this.authorRepo = authorRepo; } public async execute(request: GetAuthorByUserNameDTO): Promise<Response> { let authorDetails: AuthorDetails; const { userName } = request; try { try { authorDetails = await this.authorRepo.getAuthorDetailsByUserName( userName ); } catch (err) { return left( new GetAuthorByUserNameErrors.AuthorNotFoundError(userName) ); } return right(Result.ok<AuthorDetails>(authorDetails)); } catch (err) { return left(new AppError.UnexpectedError(err as Error)); } } }
Harry Stokes (snooker player) Career In January 1936 Stokes reached the final of the English Boys' Billiards Championship, losing 618–750 to Donald Cruickshank at Burroughes Hall in London. Stokes turned professional soon afterwards and in January 1938 he lost 6321–7000 to Neil Canney in the final of the Scottish (Residential) Professional Billiards Championship In April Stokes lost 5336–7000 to Walter Donaldson in the Open event.. Stokes was Scottish Professional Snooker Champion in 1949, 1952 and 1953 and was the losing finalist in 1951. His first Championship win was in Edinburgh in December 1949. There were four entries. Stokes beat Eddie Brown 6–5 in the second semi-final on 8 December. In the 21-frame final, played on 9 and 10 December, Stokes led Willie Newman, the holder, 8–2 after the first day and won 11–4 on the second afternoon. The next Championship was held at the Nile Rooms in Glasgow in February 1951. There were three entries. Stokes beat Bob Martin 6–1 in the semi-final on 6 February. In the 21-frame final, played on 7 and 8 February, Eddie Brown led 7–3 after the first day and won 11–9 on the second evening. The 1952 Championship was held in Edinburgh in February that year. There were four entries. Stokes, beat J. Mitchell 6–1 in the second semi-final on 7 February. In the 21-frame final, played on 8 and 9 February, Stokes led Eddie Brown 6–4 after the first day and won 11–4 on the second afternoon, to regain the title. Stokes retained his title in 1953 when beat Eddie Brown 11–8 in the 21-frame event held at the Union Club in Glasgow on 20 and 21 March. They were the only two entries. This was to be the last Scottish Professional Championship until it restarted in 1980. Stokes rarely entered the major English snooker tournaments but played in the 1954 World Professional Match-play Championship where he lost at the quarter-final stage to Fred Davis. He entered again in 1955 but lost to Jackie Rea. He also entered the 1954/1955 News of the World Snooker Tournament, playing in the qualifying stage in May 1954. Stokes beat Sydney Lee but lost to Kingsley Kennerley and didn't qualify for the main event.
package tiposprimitivos; import java.util.Scanner; public class TiposPrimitivos { public static void main(String[] args) { Scanner teclado = new Scanner(System.in); System.out.print("Digite o nome do aluno: "); String nome = teclado.nextLine(); System.out.print("Digite a sua respectiva nota: "); float nota = teclado.nextFloat(); System.out.format("A nota do %s é %.2f\n",nome,nota); } }
Hemolysis and Heme Oxygenase-1 Induction Malaria Is Related to Plasmodium falciparum Prolonged Neutrophil Dysfunction after It is not known why people are more susceptible to bacterial infections such as nontyphoid Salmonella during and after a malaria infection, but in mice, malarial hemolysis impairs resistance to nontyphoid Salmonella by impairing the neutrophil oxidative burst. This acquired neutrophil dysfunction is a consequence of induction of the cytoprotective, heme-degrading enzyme heme oxygenase-1 (HO-1) in neutrophil progenitors in bone marrow. In this study, we assessed whether neutrophil dysfunction occurs in humans with malaria and how this relates to hemolysis. We evaluated neutrophil function in 58 Gambian children with Plasmodium falciparum malaria and examined associations with erythrocyte count, haptoglobin, hemopexin, plasma heme, expression of receptors for heme uptake, and HO-1 induction. Malaria caused the appearance of a dominant population of neutrophils with reduced oxidative burst activity, which gradually normalized over 8 wk of follow-up. The degree of neutrophil impairment correlated significantly with markers of hemolysis and HO-1 induction. HO-1 expression was increased in blood during acute malaria, but at a cellular level HO-1 expression was modulated by changes in surface expression of the haptoglobin receptor (CD163). These findings demonstrate that neutrophil dysfunction occurs in P. falciparum malaria and support the relevance of the mechanistic studies in mice. Furthermore, they suggest the presence of a regulatory pathway to limit HO-1 induction by hemolysis in the context of infection and indicate new targets for therapeutic intervention to abrogate the susceptibility to bacterial infection in the context of hemolysis in humans. The Journal of Immunology longitudinal data at different time points, and correlation was tested with Spearmans rho correlation. To normalize distribution for general linear model analysis, some variables were log 10 transformed or converted to binary variables, as described in the text. Haptoglobin showed a bimodal distribution and were thus converted to a binary vari- able (, 0.349 mg/ml, the lowest value observed in healthy control samples, or $ 0.349 mg/ml). Sample volumes did not allow for some assays to be performed at time points after day 0, in which case values from six healthy control children were presented for comparison, but not for formal analysis.
Developing a Framework for Life Cycle Assessment of Green Transportation Infrastructure (Railway and Super pavements). As well known, the transportation industry and its related infrastructure including railway and roads, require very high construction costs. In addition, the excessive use of natural resources and energy for related construction and maintenance has highlighted the need for adapting purposeful planning with regards to sustainability related impacts. In transportation infrastructure, the focus should be to minimize energy consumption, related Greenhouse Gas emissions and other environmental impacts over their entire life cycle. In this study, a new design of substructure with a layer of recycled Polypropylene (PP) is presented and compared with scenarios using virgin PP and conventional ballast. A model was developed that can adequately evaluate the resource use and environmental effects of various use scenarios of Geosynthetic (recycled Polypropylene) materials in rail construction layers in comparison to primary raw material. The model takes into consideration technical properties investigated through finite element simulations to decouple increase technical performance from environmental impacts. The outcome of Life Cycle Assessment (LCA) indicates that the recycled PP scenario causes the lowest environmental impact for a service life of 100 years. On the other hand, the Finite Element (FE) results showed that using reinforced geosynthetics between ballasted layer has better mechanical performance than the conventional ballast track railway. Introduction The development of Circular Economy (CE) requires industrial sectors to cooperate in the reuse and recycling of by-products to attain "zero waste" goal. Therefore, throughout the world, there are many innovative sustainable activities that have been undertaken to improve the performance of infrastructure products and decrease its environmental impacts. Meanwhile, 25-30% of all generated waste in the EU is Construction and Demolition (C&D) waste, which is among the most voluminous and heaviest waste streams generated. The billions of C&D wastes produced each year have intensified severe environmental concerns and reinforced the need for more efficient waste management in the construction sector. Specifically, large amounts of C&D waste across the EU and their extreme potential for valorization have led the EU to categorize them as a priority waste stream. Incorporating sustainable practices, including the use of alternative, environmentally friendly materials and reuse of C&D wastes can greatly lead to enhanced overall sustainable development. Approximately 40% of natural aggregates are utilized in unrestricted layers of transportation infrastructures of Europe, indicating the high dependency of natural aggregates in geotechnical applications and the incorporation of recycled aggregates can greatly contribute to preserving the environment. The last few years of the 21st century have seen significant advances in rail infrastructure and the result is that speed increases in both freight and passenger services up to 160 km/h and 350 km/h, respectively. The railway substructure transmits these speeds and must be sufficiently resistant and strong to support heavy loads throughout operation. Weak foundation soil can be one of the problems of railways construction; and geosynthetics as a structural reinforcement can lead to the durability of railway structure. Geotextiles and geogrids are mainly the prevalent geosynthetics used in a foundation. These smooth structures are commonly used for reinforcement of soils and mechanical stabilization of the subsoil. Accordingly, recognizing current concern about climate and environment, the railway system and substructure can be regarded as the key factors in decreasing noise and air pollutants. Therefore, the possible effect of construction and its maintenance process should be evaluated; and "Life Cycle Assessment (LCA)" of products, as an internationally recognized methodology, can be used for this purpose. This study introduces a new design of substructure with a layer of recycled PP and a comparative LCA is implemented using virgin PP and conventional ballast. The Finite Element Method (FEM) is an approved technique for solving various engineering problems. The simulation study based on the finite element method is carried out by the ABAQUES software for railway structure. This software analyzes physical and nonlinear issues of solids. Different elements of railway structure are regarded as the targets of simulation section and this research investigates the simulation analysis results. However, with regards to unit function analysis of the railway, modeling is initially carried out using FEM for layers not using geosynthetics and its analysis is carried out for displacement, stress and strain. Then, the previous section, displacement, stress and strain analyses are carried out for reinforced railway track and eventually the model is compared with the previous unit function. As well known, the transportation industry and its related infrastructures including the railway, roads, and bridges, require very high construction costs. The excessive use of natural resources and energy for related construction, maintenance and its environmental impact has enhanced the need for adapting purposeful planning. Secondary and recycled materials can be quite helpful in this regard from all perspectives of life cycle assessment. Previous research related to using recycled material was mostly for technical and mechanical evaluation, as has been done on the railway infrastructure industry. In this study, a new design of substructure with a layer of geogrid from recycled PP materials is employed between ballasted layers. As a first step, the mechanical behavior of this substructure is evaluated by finite element simulation. Next for environmental impacts, the LCA of the substructure is evaluated. Studies on this section are essential because of the high requirements to reduce substantial costs of building infrastructure. Also, the research with the diagnosis of infrastructure parts should be conducted to diminish performance costs and increase security. Substructure design In this research area conventional and reinforced layers of recycled, original PP as geosynthetic materials are used between ballasted layers inside the railway track substructure. It is well known that geosynthetics are typically made from petrochemical-based polymers (plastics), Polypropylene (PP) is the most frequently used material in connection with Geosynthetics. The necessity to enhance railway durability and driver comfort has resulted in research on the use of reinforcements for these types of railway substructures. When the subgrade is weak, a geosynthetic (geogrid and/or geotextile) layer can be situated over the subgrade to reinforce the track. In this study, firstly, the mechanical effect of the PP as a reinforced layer inside the substructure is investigated by Finite Element simulation. In this study, firstly, the mechanical effect of the PP as a reinforced layer inside the substructure is investigated by Finite Element simulation. FEM is implemented to analyze the dynamic axel load response of railway track components (conventional and new design). The support method utilized during the experiment is substituted by the numerical model using perfect boundary conditions. The rotational speed of the roller that simulates the vehicle speed, and the pressure of a dynamic or static roller on the rail are present. The system of equations is solved in each step, and the load is incrementally applied to determine the change in stresses, displacements and deformations. By eliminating appropriate degrees of freedom, support conditions are determined, thus inhibiting the model from deviating in certain directions. The grid in individual surface elements has a different size in the case of solid models. Contact points between individual elements of the railway surface are determined to adequately conduct the simulation computations. Figure 1 shows boundary condition and simulated model in this study. The rail and wheel contact in the model is specified as the interaction between surfaces created on the head of the rail and on the wheel. Life cycle assessment methodology An effective method is provided by the LCA methodology to find out the possible environmental impacts of every process or product through its life cycle . The application of the LCA is employed in this study to examine various railway track pavement solutions according to ISO 14040 series for the modern railway lines. The process includes the four steps of LCA: definition of the goal and scope, inventory analysis, impact assessment, and interpretation of the outcomes. Particularly in the present analysis, the CML method is selected for the life cycle impact assessment (LCIA). The main goal of the LCA method is comparing two types of railway track system for twin railway track substructure designs, with reinforced geogrid layer (Original and recycled PP) and conventional ballasted railway track. In addition to develop transparent LCA framework for railway track system components could be used for decision making support. Consequently, the outcomes of these different designs are compared with each other. The final results offer valuable insights into the environmental impacts during the operation, construction and maintenance of railway tracks that can be employed by managers and engineers. The LCA technique is performed following a "cradle-to-grave" perspective including raw material acquisition and production, construction (transportation of processed material to construction site, machinery, and operations), use including maintenance (minor and regular, e.g., ballast tamping and component renewal), and finally the dismantlement operations, landfilling, disposal, and recycling. The LCA Model and system boundaries of the case study are presented in Figure 2. The environmental impacts of the design are studied by the LCA methodology. LCA according to ISO 14040 & 14044 standards is carried out and the outcome of the LCA is used to develop the decision support model specific to the transportation infrastructure sector. Results The results of the simulation step by finite element method are presented in this section. Figures 3(a) and 3(b) indicate the diagrams for the original substructure and the substructure with the geogrid layer, respectively. The diagrams show the contours of deformations (deflections) of the model elements and Huber-Misess replacement deformation. It can be noticed that using the geogrid layer inside the substructure leads to more even deformations and distribution of stresses. Fig. 3. (a) and (b): Contours of S, Mises stress for classic and reinforced scenario For a better understanding of elements, Figures 4 (a) and 4 (b) provides the results of elements in the conventional track railway and reinforced ballast, respectively. Firstly, it is observed that employing the geogrid layer leads to lower displacement and deformation on the railway surface compared to the classic substructure. Consequently, this difference has enough potential for an increase in the fatigue life which is affected by cyclic stresses. Secondly, the geogrid layer inside the substructure causes lower deformation that shows the resistance to applied loads and displacements. Overall, using the geogrid material has noticeable benefits for both of the substructure and rail system when this layer provides a longer useful life and reduction in maintenance costs. The recycled PP reinforced scenario leads to lowest emissions for raw material acquisition and production and for the whole life cycle. The virgin PP reinforced scenario is the worst option considering CO2 emissions and energy consumption regardless of its service life, primarily because of its reinforced layer. The ballast beds of all scenarios contribute to high CO2 emissions because of the needed ballast for their construction, however, virgin reinforced PP and conventional ballast scenarios have higher shares compared to the recycled PP scenario (Fig 5(a) and 5(b)). Conclusion This study evaluated the potential of employing a layer of recycled PP as geogrid material in railway track substructure. The mechanical impacts of the layers were assessed by the finite element simulation and results showed significant advantages, such as longer useful life and reduction stress, deformation, displacement and in maintenance costs for both rail system and substructure. Regarding results gained by the LCA approach for a service life of 100 years, the substructure with the recycled PP layer was often the best solution in terms of environmental impacts. This scenario showed important potential for reduction in CO2 emissions and energy consumptions compared to others. Also, the global warming potential of the scenario indicated that most of the emissions are associated with the production and use phases including maintenance. The model developed aims decision making on material resource options to improve mechanical and technical performance while keeping environmental and economic impacts low.
. AIDS patients and HIV carriers who are aware of their condition are under multiple kinds of stress with adverse effects on their emotional state and personal and social activity. This paper reports the psychometric properties of the DAS (Death Anxiety Scale) using the Spanish version in the clinical setting. The sample is made up of 148 HIV/AIDS patients (109 men and 39 women). The internal consistency of the scale was.72 and its test-retest reliability was.70. Principal components analysis extracted five factors that jointly accounted for 56.5% of the total variance. As, on the whole, these results are very similar to those reported by other authors, it is concluded that the Spanish DAS is a valid instrument for the assessment of death anxiety in Spanish HIV/AIDS patients.
Q: Macbook Air Acting funny My friend gave me a macbook air to try to fix it. I'm pretty good with any Windows machine and the common troubleshooting steps. Like safe mode, malware scanners, startup applications and stuff. But I'm not really sure where to start on this macbook air. It doesn't have the dock on the bottom. Hitting shutdown took like a minute for the prompt to come up. So, it's behaving really slow. And I'm sure there's other things, but what should I do to start troubleshooting? Also, I've noticed the screen go black for a split second every like 5-10 minutes. A: First step would be to try a safe boot per Apple's support pages: If you're using Mac OS X 10.2 or later, you can start up your computer in Safe Mode, which includes an automatic disk check and repair. A Safe Boot, which starts up your computer into Safe Mode, may allow you to start up your computer successfully using a reduced version of the system software. To do this, follow these steps: Start up in Safe Mode. Instructions on how to do so are located here. After the system has fully started up, restart your computer normally. Additionally, you may reference this page of Apple's support pages for other trouble shooting measures to resolve common startup and performance problems.
<reponame>CBIIT/cadsr-util /*L * Copyright Oracle inc, SAIC-F * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/cadsr-util/LICENSE.txt for details. */ package gov.nih.nci.ncicb.cadsr.common.dto; import gov.nih.nci.ncicb.cadsr.common.dto.BaseTransferObject; import gov.nih.nci.ncicb.cadsr.common.resource.ContactCommunication; public class ContactCommunicationTransferObject extends BaseTransferObject implements ContactCommunication{ private String type; private String value; private String id; private int rankOrder; public ContactCommunicationTransferObject() { } public void setType(String type) { this.type = type; } public String getType() { return type; } public void setValue(String value) { this.value = value; } public String getValue() { return value; } public void setId(String id) { this.id = id; } public String getId() { return id; } public void setRankOrder(int rankOrder) { this.rankOrder = rankOrder; } public int getRankOrder() { return rankOrder; } }
A Formative Approach to Strategic Message Targeting Through Soap Operas: Using Selective Processing Theories In the past 2 decades, soap operas have been used extensively to attain prosocial change in other parts of the world. The role of the soap opera in achieving social change has become of special interest to strategic health message designers and planners in the United States. Before a strategic approach is implemented, however, researchers need to conduct formative research to interrogate the viability of soap operas and guide communication strategies. This article constructs a profile of the soap opera user who is younger, less educated, and earns less than the nonuser. Using selective processing theory, I argue that the health-oriented individual is most likely to remember health content from soap operas and incorporate the content in future behavior. Strategic media planning and message construction guidelines are provided for the use of soap operas as vehicles for reinforcing positive health behaviors and introducing new behaviors in the health oriented segment.
/** * Test class for the MenuResource REST controller. * * @see MenuResource */ @RunWith(SpringRunner.class) @SpringBootTest(classes = GastronomeeApp.class) public class MenuResourceIntTest { private static final String DEFAULT_NAME = "AAAAAAAAAA"; private static final String UPDATED_NAME = "BBBBBBBBBB"; private static final Boolean DEFAULT_ACTIVE = false; private static final Boolean UPDATED_ACTIVE = true; private static final Integer DEFAULT_PRIORITY = 1; private static final Integer UPDATED_PRIORITY = 2; @Autowired private MenuRepository menuRepository; @Autowired private RestaurantRepository restaurantRepository; @Autowired private MenuSearchRepository menuSearchRepository; @Autowired private MappingJackson2HttpMessageConverter jacksonMessageConverter; @Autowired private PageableHandlerMethodArgumentResolver pageableArgumentResolver; @Autowired private ExceptionTranslator exceptionTranslator; @Autowired private EntityManager em; private MockMvc restMenuMockMvc; private Menu menu; @Before public void setup() { MockitoAnnotations.initMocks(this); MenuResource menuResource = new MenuResource(menuRepository, menuSearchRepository, restaurantRepository); this.restMenuMockMvc = MockMvcBuilders.standaloneSetup(menuResource) .setCustomArgumentResolvers(pageableArgumentResolver) .setControllerAdvice(exceptionTranslator) .setMessageConverters(jacksonMessageConverter).build(); } /** * Create an entity for this test. * * This is a static method, as tests for other entities might also need it, * if they test an entity which requires the current entity. */ public static Menu createEntity(EntityManager em) { Menu menu = new Menu(); menu.setName(DEFAULT_NAME); menu.setActive(DEFAULT_ACTIVE); menu.setPriority(DEFAULT_PRIORITY); return menu; } @Before public void initTest() { menuSearchRepository.deleteAll(); menu = createEntity(em); } @Test @Transactional public void createMenu() throws Exception { int databaseSizeBeforeCreate = menuRepository.findAll().size(); // Create the Menu restMenuMockMvc.perform(post("/api/menus") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(menu))) .andExpect(status().isCreated()); // Validate the Menu in the database List<Menu> menuList = menuRepository.findAll(); assertThat(menuList).hasSize(databaseSizeBeforeCreate + 1); Menu testMenu = menuList.get(menuList.size() - 1); assertThat(testMenu.getName()).isEqualTo(DEFAULT_NAME); assertThat(testMenu.isActive()).isEqualTo(DEFAULT_ACTIVE); assertThat(testMenu.getPriority()).isEqualTo(DEFAULT_PRIORITY); // Validate the Menu in Elasticsearch Menu menuEs = menuSearchRepository.findOne(testMenu.getId()); assertThat(menuEs).isEqualToComparingFieldByField(testMenu); } @Test @Transactional public void createMenuWithExistingId() throws Exception { int databaseSizeBeforeCreate = menuRepository.findAll().size(); // Create the Menu with an existing ID menu.setId(1L); // An entity with an existing ID cannot be created, so this API call must fail restMenuMockMvc.perform(post("/api/menus") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(menu))) .andExpect(status().isBadRequest()); // Validate the Alice in the database List<Menu> menuList = menuRepository.findAll(); assertThat(menuList).hasSize(databaseSizeBeforeCreate); } @Test @Transactional public void checkNameIsRequired() throws Exception { int databaseSizeBeforeTest = menuRepository.findAll().size(); // set the field null menu.setName(null); // Create the Menu, which fails. restMenuMockMvc.perform(post("/api/menus") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(menu))) .andExpect(status().isBadRequest()); List<Menu> menuList = menuRepository.findAll(); assertThat(menuList).hasSize(databaseSizeBeforeTest); } @Test @Transactional public void getAllMenus() throws Exception { // Initialize the database menuRepository.saveAndFlush(menu); // Get all the menuList restMenuMockMvc.perform(get("/api/menus?sort=id,desc")) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(jsonPath("$.[*].id").value(hasItem(menu.getId().intValue()))) .andExpect(jsonPath("$.[*].name").value(hasItem(DEFAULT_NAME.toString()))) .andExpect(jsonPath("$.[*].active").value(hasItem(DEFAULT_ACTIVE.booleanValue()))) .andExpect(jsonPath("$.[*].priority").value(hasItem(DEFAULT_PRIORITY))); } @Test @Transactional public void getMenu() throws Exception { // Initialize the database menuRepository.saveAndFlush(menu); // Get the menu restMenuMockMvc.perform(get("/api/menus/{id}", menu.getId())) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(jsonPath("$.id").value(menu.getId().intValue())) .andExpect(jsonPath("$.name").value(DEFAULT_NAME.toString())) .andExpect(jsonPath("$.active").value(DEFAULT_ACTIVE.booleanValue())) .andExpect(jsonPath("$.priority").value(DEFAULT_PRIORITY)); } @Test @Transactional public void getNonExistingMenu() throws Exception { // Get the menu restMenuMockMvc.perform(get("/api/menus/{id}", Long.MAX_VALUE)) .andExpect(status().isNotFound()); } @Test @Transactional public void updateMenu() throws Exception { // Initialize the database menuRepository.saveAndFlush(menu); menuSearchRepository.save(menu); int databaseSizeBeforeUpdate = menuRepository.findAll().size(); // Update the menu Menu updatedMenu = menuRepository.findOne(menu.getId()); updatedMenu.setName(UPDATED_NAME); updatedMenu.setActive(UPDATED_ACTIVE); updatedMenu.setPriority(UPDATED_PRIORITY); restMenuMockMvc.perform(put("/api/menus") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(updatedMenu))) .andExpect(status().isOk()); // Validate the Menu in the database List<Menu> menuList = menuRepository.findAll(); assertThat(menuList).hasSize(databaseSizeBeforeUpdate); Menu testMenu = menuList.get(menuList.size() - 1); assertThat(testMenu.getName()).isEqualTo(UPDATED_NAME); assertThat(testMenu.isActive()).isEqualTo(UPDATED_ACTIVE); assertThat(testMenu.getPriority()).isEqualTo(UPDATED_PRIORITY); // Validate the Menu in Elasticsearch Menu menuEs = menuSearchRepository.findOne(testMenu.getId()); assertThat(menuEs).isEqualToComparingFieldByField(testMenu); } @Test @Transactional public void updateNonExistingMenu() throws Exception { int databaseSizeBeforeUpdate = menuRepository.findAll().size(); // Create the Menu // If the entity doesn't have an ID, it will be created instead of just being updated restMenuMockMvc.perform(put("/api/menus") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(menu))) .andExpect(status().isCreated()); // Validate the Menu in the database List<Menu> menuList = menuRepository.findAll(); assertThat(menuList).hasSize(databaseSizeBeforeUpdate + 1); } @Test @Transactional public void deleteMenu() throws Exception { // Initialize the database menuRepository.saveAndFlush(menu); menuSearchRepository.save(menu); int databaseSizeBeforeDelete = menuRepository.findAll().size(); // Get the menu restMenuMockMvc.perform(delete("/api/menus/{id}", menu.getId()) .accept(TestUtil.APPLICATION_JSON_UTF8)) .andExpect(status().isOk()); // Validate Elasticsearch is empty boolean menuExistsInEs = menuSearchRepository.exists(menu.getId()); assertThat(menuExistsInEs).isFalse(); // Validate the database is empty List<Menu> menuList = menuRepository.findAll(); assertThat(menuList).hasSize(databaseSizeBeforeDelete - 1); } @Test @Transactional public void searchMenu() throws Exception { // Initialize the database menuRepository.saveAndFlush(menu); menuSearchRepository.save(menu); // Search the menu restMenuMockMvc.perform(get("/api/_search/menus?query=id:" + menu.getId())) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(jsonPath("$.[*].id").value(hasItem(menu.getId().intValue()))) .andExpect(jsonPath("$.[*].name").value(hasItem(DEFAULT_NAME.toString()))) .andExpect(jsonPath("$.[*].active").value(hasItem(DEFAULT_ACTIVE.booleanValue()))) .andExpect(jsonPath("$.[*].priority").value(hasItem(DEFAULT_PRIORITY))); } @Test @Transactional public void equalsVerifier() throws Exception { TestUtil.equalsVerifier(Menu.class); } }
The total cost, which includes clean up and remediation, was topped off with an additional $3,699,200 fine levied by the Pipeline and Hazardous Materials Safety Administration (PHMSA). According to the docket, Enbridge violated several laws involving pipeline management, procedural manuals for operations and maintenance, public awareness, accident reporting and qualifications, among others. The spill, which went unaddressed for over 17 hours, was exacerbated by Enbridge's failed response according to the U.S. National Transportation Safety Board (NTSB). At a hearing last year, the NTSB's chair Deborah Hersman likened the company to a band of Keystone Kops for their bungled response, which included twice pumping additional crude into the line — accounting for 81 percent of the total release — before initiating emergency shut down. The disaster revealed numerous internal problems within Enbridge that were further described by the NTSB as "pervasive organizational failures." Communities along Talmadge Creek and the Kalamazoo River near Marshall, Michigan, experienced sickness from the fumes associated with the spilled dilbit, or diluted bitumen, that blanketed miles of intersecting wetlands and waterways. Dilbit is a mixture of heavy oil from the Alberta tar sands and corrosive liquid chemicals, including benzene known to cause cancer in humans, that allow the viscous crude to flow. The particular composition of dilbit is in part responsible for the spill's high costs — nearly 10 times more than any other onshore spill — because of dilbit from the tar sands which sinks in water, rather than floating like conventional oil. Enbridge, despite several attempts to clear the riverbed of remaining oil, spent nearly three years working on the clean up of submerged oil. As recently as March 2013, the U.S. Environmental Protection Agency (EPA) ordered Enbridge to perform additional dredging in the Kalamazoo to clean up unrecovered oil along the river's bottom. At the time of the spill, Mark Durno — a deputy incident commander with the EPA — told InsideClimate News that "submerged oil is what makes this thing more unique than even the Gulf of Mexico situation." Because Enbridge did not disclose to federal and local officials the contents of the pipeline, it wasn't until a week later that responders knew what they were dealing with. PHMSA records show that the defect that led to the six-and-a-half foot gash in the side of Line 6B was detected at least three times before the incident, although neither Enbridge nor the federal regulator felt the damage required repair. In a recently-released report addressing Enbridge's Line 9, pipeline safety expert Richard Kuprewicz claimed Enbridge "has a culture where safety management seems to not be a critical part of their operation." Currently, Enbridge has several proposed pipeline plans, including the Northern Gateway Pipeline that would carry tar sands crude to the British Columbia coast and Line 9 that would transport tar sands crude to the eastern seaboard. Both lines would open the coasts to export opportunities. Local communities point to Kalamazoo and sinking dilbit as reasons coastal ports should not consider carrying tar sands crude on oil tankers bound for Asian or other shores. Enbridge's most current application, a "Certificate of Need for a Crude Oil Pipeline," was presented to the Minnesota Public Utilities Commission this month as a part of Enbridge's "ongoing efforts to meet North America's needs for reliable and secure transportation of petroleum energy supplies" via the Alberta Clipper. The Alberta Clipper, or Line 67, will increase its capacity from 570,000 barrels per day (bpd) to 800,000 bpd should the application be approved. The application is the second phase of Enbridge's proposed capacity increase for the Alberta Clipper. The first application, filed October 8, 2012, initially proposed the line be increased to 570,000 from 450,000 bpd. Currently the line carries crude oil from Hardisty, Alberta to terminal facilities in Superior, Wisonsin where the line meets up with Enbridge's Mainline System for distribution across the U.S. Image Credit: EPA
XELOX or mFOLFOX6 chemotherapy combined with resection of primary lesion versus chemotherapy alone for colon cancer with unresectable metastases: A randomized clinical trial. 3590 Background: It is still controversial for colon cancer patients with unresectable metastases whether to resect the primary tumor when there are no symptoms of primary lesion. Methods: This is an open-label, single-center, prospective, randomized, controlled phase II trial. Colon cancer patients aged 18-80 years with unresectable metastases at enrollment will be randomly allocated to either resection group (group A) or chemotherapy group (group B), and stratified by tumor response and number of organ metastases, after receiving induction chemotherapy with 4 cycles of XELOX or 6 cycles of mFOLFOX6, excluding those with disease progression, lesions radically resectable, or primary lesion unresectable. Patients in group A received resection of primary lesion and then continued chemotherapy, and patients in group B just continued chemotherapy, both up to 4 cycles of XELOX or 6 cycles of mFOLFOX6, and capecitabine maintenance afterwards. If progression occurs 3 months after discontinuation of oxaliplatin and toxicity has recovered to grade I, the original regimen can be applied again. The primary endpoint was TFS (time to failure of strategy, defined as the time from randomization to secondary progression in patients received re-introduce of the induction chemotherapy regimen, or to first progression in patients without re-introduce of the original regimen). The secondary endpoints included progression-free survival (PFS, the time from randomization to first progression), overall survival (OS, the time from enrollment to death), and adverse events (AEs). Efficacy data were analyzed on an intention-to-treat (ITT) basis. This study is registered with ClinicalTrials.gov, number NCT02291744. Results: Between April, 2015, and July, 2020, 140 patients were enrolled, and 54 patients withdrew due to colon obstruction, perforation, disease progression, death, radical resection, or other reasons. Finally, 86 patients were randomized into group A (n = 42) or group B (n = 44). The median TFS was 143 days (95%CI: 104.9-181.1) in group A, and 196 days (95%CI: 96.5-295.5) in group B (HR:0.930 95%CI:0.589-1.468, p = 0.755). The median PFS was 147 days (95%CI: 105.7-188.3) in group A, and 206 days(95%CI:180.9-231.1) in group B (HR:0.831, 95%CI:0.522-1.323, p = 0.436). The median OS was 530 days (95%CI: 308.9-751.1) in group A, and 779 days (95%CI:626.3-931.7) in group B (HR:0.948 95%CI:0.554-1.622, p = 0.845). The incidence of treatment-related AEs was similar between two groups. Conclusions: Resection of primary tumor after induction chemotherapy could not bring survival benefits. Its not recommended for patients without symptoms of primary lesion to receive primary tumor resection, but it also requires individualized treatment as colon obstruction or perforation occurred in some patients. Clinical trial information: NCT02291744.
#include "HelloWorldScene.h" #include "cocostudio/CocoStudio.h" #include "ui/CocosGUI.h" #include "hero.h" USING_NS_CC; using namespace cocostudio::timeline; Scene* HelloWorld::createScene() { // 'scene' is an autorelease object auto scene = Scene::create(); // 'layer' is an autorelease object auto layer = HelloWorld::create(); // add layer as a child to scene scene->addChild(layer); // return the scene return scene; } // on "init" you need to initialize your instance bool HelloWorld::init() { ////////////////////////////// // 1. super init first if ( !Layer::init() ) { return false; } auto* background = LayerColor::create(ccc4(255, 255, 255, 255)); addChild(background); hero = new Hero(); hero->initHeroSprite(1, Vec2(480, 320)); addChild(hero); auto dispatcher = Director::getInstance()->getEventDispatcher(); auto listener = EventListenerTouchOneByOne::create(); listener->onTouchBegan = CC_CALLBACK_2(HelloWorld::onTouchBegan, this); dispatcher->addEventListenerWithSceneGraphPriority(listener, this); return true; } bool HelloWorld::onTouchBegan(Touch *touch, Event *unused_event) { hero->heroMoveTo(touch->getLocation()); return false; }
/* eslint-disable */ // This file is automatically generated import React from 'react' import createIcon from './base/createIcon' const svgElement = ( <svg viewBox='0 0 512 512'> <path d='M467 45.2A44.45 44.45 0 00435.29 32H312.36a30.63 30.63 0 00-21.52 8.89L45.09 286.59a44.82 44.82 0 000 63.32l117 117a44.83 44.83 0 0063.34 0l245.65-245.6A30.6 30.6 0 00480 199.8v-123a44.24 44.24 0 00-13-31.6zM384 160a32 32 0 1132-32 32 32 0 01-32 32z'/> </svg> ) const Pricetag = createIcon(svgElement) Pricetag.displayName = 'Pricetag' export { IconProps } from './base/createIcon' export default Pricetag
Analysis of the surfaces and gravitational fields of planets using robust modeling methods The work focuses on the development of methods and algorithms for the simulation of celestial bodies dynamic and static states. There are 2 types of models: global and local ones. The creation of local simulation models (LSM) is complicated as the emergent properties of the system are getting lost. Nevertheless, LSM are of great importance when analyzing planetology processes. When areas are covered with reference points unevenly and the distance between them increases, the method used in the work provides the higher accuracy of model forecasting compared to the use of interpolation formulas. LSM allow investigating both the whole planetary system and its local parts and are aimed at the predictive determination of topographic, gravimetric, and magnetic parameters. Introduction Analyzing structure and evolution of celestial bodies involves various statistical and multiparametric methods. Currently, some of the promising directions of studying the structure, materials, and properties of various natural objects are robust methods. It should be noted that analysis of complex physical systems using the robust method allows for an estimation of their parameters. Thus, the use of robust analysis in studying physical celestial objects and processes is an important direction. In these studies, the invariant properties of robust analysis are very important too. The inhomogeneity of nonlinear processes and complex topographic systems may be investigated by obtaining robust estimates of the required parameters. Physical processes, including those related to the Earth, can be successfully studied using the robust analysis. In the future, the use of robust analysis for space measurements reducing will surely bring some interesting results which will allow for a solution of a number of space geodesy problems. Method of the multiparametric garmonic analysis Using harmonic analysis of topographic data, obtained during space missions, expansion in a series of spherical functions, the topographic models of celestial bodies (Mars, Venus, Earth, Moon) were constructed : where h(,) is function of altitude;, are latitude and longitude (known parameters); This equation was also used for the analysis of positional observations taken at Engelhardt Astronomical Observatory. On the basis of gravimetric measurements, harmonic models of celestial bodies' gravitational potentials were constructed : where G is the gravitational constant; GM is gravitational field of Mars (42 828.314 km 3 /sec 2 );,, r are spherical coordinates of a reference point; R0 is equatorial radius of planet. To assess these models, the advanced forecasting algorithm is used. Forecast module allows tracking lowering and elevation on the initial data, if 10 or more measurement points are involved. Analysis of a local surface area model implies using a subroutine dividing harmonic of higher and lower orders. Much attention in the development of the existing version of the Automatic System of Scientific Research (ASSR-2018) was given to the capabilities related to building graphic maps on the basis of the output data for visual forecasting during these simulations. ASSR-2018 includes the developed software for contour mapping with the scalability, the tone coloring of the isolines, and image export. The program shell of ASSR-2018 allow analysis the constructed model use user-friendly interface. Identification and evaluation of contour mapping accuracy are provided. There is also a 3D visualization mode. Using the latest version of the software, a global relief model of the planetary surface, anomalies of the Earth's gravitational field, a number of regional models of the gravitational anomalies of the planets, anomalies of the geomagnetic field, and distribution of the induced polarization of the regional sections are built. To increase the data processing accuracy of this method from 2 to 10 times and to expand the capabilities of processing a large number of data, new production engineering is going to be used. The cluster based on Gentoo Linux operating system together are used. For programming languages C/C ++ and Fortran compiling programs GNU Compiler Collection and Sun Studio are used. Pascal compiling programs are Free Pascal Compiler and GNU Pascal. The software is free, i.e. installation, launch, use, study, extending, and improving of the programs are allowed. The dilated program cluster can have of three and more (to 13) the computing laboratories. In turn, each laboratory can have 13 analogous computers for parallel computing. Using robust analysis for estimations planetary parameters Within the regression modeling approach, the overdetermined system was solved for various sources of hypsometric information. Along with the usual stages (postulating the models and the amplitudes nm nm S C, assessing), the approach involves using a number of quality statistics including external measures: -the diagnostics of the basic LSM conditions observance. As LSM computational schemes, Gauss-Jordan and Householder ones were used; -adaptation in case of their violation. The main violation of LSM application conditions to processing is the presence of: -harmonic amplitudes correlating with each other, when is applied to describe the relief on a part of the sphere or when the objects are distributed unevenly; in this case the digital model (a set of LSM-estimates amplitudes) should be considered incorrect. The adaptation to these 2 violations was made possible by the application of step by step regression which is well-known procedure of regression analysis. It appeared to be efficient enough for the model parameters if: a. The objects are distributed over the entire sphere even though unevenly. b. The order of expansion determined by the amount of points should be relatively small (n<15); otherwise, the calculation time increases rapidly. In case when the objects are distributed evenly over the entire sphere, it is only necessary to eliminate statistically insignificant harmonics and recalculate. To obtain the expansion in spherical harmonics in order to form a digital terrestrial model, an automated research system "SFERA" was used. "SFERA" is designed to distribute various properties (relief, gravitational, magnetic and other kinds of potential fields) description over the sphere and its parts by their values measured in the points with known coordinates. Using this software, the models of type can be formed, predictions in the form of cross-sections, isolines, tones, and threedimensional representation of property values distributions may be implemented. The models formation is accompanied by their quality control and observance of LSM conditions. In case of their violation, the corresponding adaptation methods were applied. "SFERA" software in "split" mode may be used for models of higher orders during parallel processing. Owing to the fact of using the expansion in harmonic functions and other properties described above, the application of "SFERA" allows for 40% increase in description and prediction accuracy compared to the popular software package "SURFER". The corresponding internal criteria characterizing the estimation accuracy and statistical significance of both single coefficients and the whole model in general were determined simultaneously with the harmonic coefficients. The step by step regression procedure (inclusionexclusion principle) at significance level =0.05 (statistically significant dependence is used for observance of regression analysis and LSM estimation for the postulated and optimal model) was used to form an optimal structure of a model according to t-criterion (Student's criterion). It was noted that coefficients values at N=40 almost coincided with the values at N=70. That confirms the correctness of basic calculations. The regression analysis assumptions (LSM) compliance led to the conclusions as follows: the model contained about 30% of statistically insignificant terms; paired correlation coefficients rij<0.3, which indicates the practical orthogonality of the expansion; on the basis of residue analysis it was concluded that there had been some violation of normality conditions; Durbin-Watson criterion was 0.58 which meant there had been some autocorrelation of the first order. As a result, the digital model of the Earth was created. In Automated System for Robust Modeling the innovative informational and mathematical production engineering were applied: -SNOR (System of navigation of optimum regressions); it is intended to obtain an optimum model of the data handling used for the forecasting. SNOR has a rather rational structure including: 1) the control module; 2) the inquiry creation unit; 3) library of the functional procedures; 4) the scenario unit; 5) the system tuner; 6) the unit data editor; 7) the tables forming unit; 8) the quick reference. -ASSE "Orb" (the Automated system of scientific examinations); the developed automated system is a specialized software for implementing the strategy of statistical (regression) modeling to solve a number of problems related to mathematical exposition of a landform, gravitational, and other potential fields of planets. The system's main role is obtaining regression models of processes or appearances with their subsequent use to forecast the output characteristics (responses) and implement some control functions in interactive (display) and package operational modes. The need for an availability of the similar automated system is caused by a number of difficulties with the similar
<reponame>horvay/lumberyardtutor /* * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or * its licensors. * * For complete copyright and license terms please see the LICENSE at the root of this * distribution (the "License"). All use of this software is governed by the License, * or, if provided, by the license below or the license accompanying this file. Do not * remove or modify any license notices. This file is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * */ // include the required headers #include "LookAtController.h" #include "Node.h" #include "ActorInstance.h" #include "NodeLimitAttribute.h" #include "GlobalPose.h" #include "TransformData.h" //#include <MCore/Source/SwingAndTwist.h> namespace EMotionFX { // constructor LookAtController::LookAtController(ActorInstance* actorInstance, uint32 nodeIndex) : GlobalSpaceController(actorInstance) { MCORE_ASSERT(nodeIndex < actorInstance->GetNumNodes()); mNodeIndex = nodeIndex; mGoal.Set(0.0f, 0.0f, 0.0f); mInterpolationSpeed = 1.0f; // we need to keep a copy of the rotation MCore::Matrix globalTM = actorInstance->GetTransformData()->GetGlobalInclusiveMatrices()[ nodeIndex ]; mRotationQuat.FromMatrix(globalTM.Normalized()); mRotationQuat.Normalize(); mPostRotation.Identity(); mPreRotation.Identity(); // set the limits accoring to the model's current limits if it has them set, otherwise just use default values NodeLimitAttribute* limit = (NodeLimitAttribute*)actorInstance->GetActor()->GetSkeleton()->GetNode(nodeIndex)->GetAttributeByType(NodeLimitAttribute::TYPE_ID); // set the limits if (limit) { SetEulerConstraints(limit->GetRotationMin(), limit->GetRotationMax()); } else { mEllipseOrientation.Identity(); mEllipseRadii.Set(1.0f, 1.0f); mMinMaxTwist.Set(0.0f, 0.0f); } // disable the constraints mConstraintType = CONSTRAINT_NONE; // disable EMotion FX 2 compatibility mode mEMFX2CompatibleMode = false; // specify that this controller will modify all nodes that come after the start node inside the hierarchy RecursiveSetNodeMask(mNodeIndex, true); } // destructor LookAtController::~LookAtController() { } // creation LookAtController* LookAtController::Create(ActorInstance* actorInstance, uint32 nodeIndex) { return new LookAtController(actorInstance, nodeIndex); } // reset the controller void LookAtController::Reset() { // get the current global space transform MCore::Matrix globalTM = mActorInstance->GetTransformData()->GetGlobalInclusiveMatrix(mNodeIndex); globalTM.Normalize(); // remove scaling // convert it into a quaternion and normalize it mRotationQuat.FromMatrix(globalTM); mRotationQuat.Normalize(); } // the main update method void LookAtController::Update(GlobalPose* outPose, float timePassedInSeconds) { /*// get the global space matrices and scale values MCore::Matrix* globalMatrices = outPose->GetGlobalMatrices(); MCore::Vector3* globalScales = mActorInstance->GetGlobalPose()->GetScales(); // calculate the new forward vector MCore::Vector3 forward = (mGoal - globalMatrices[mNodeIndex].GetTranslation()).SafeNormalized(); MCore::Vector3 up; const uint32 parentIndex = mActorInstance->GetActor()->GetSkeleton()->GetNode(mNodeIndex)->GetParentIndex(); MCore::Matrix parentGlobalTM; parentGlobalTM.Identity(); // if we have a parent node if (parentIndex != MCORE_INVALIDINDEX32) { parentGlobalTM = globalMatrices[parentIndex].Normalized(); // get the up vector from the parent if it exsists up = (mPreRotation * parentGlobalTM).GetUp().SafeNormalized(); } else // a root node, use the up vector of the node itself { up = (mPreRotation * globalMatrices[mNodeIndex].Normalized()).GetUp().SafeNormalized(); } // caclculate the right and up vector we wish to use MCore::Vector3 right = up.Cross(forward).SafeNormalized(); up = forward.Cross(right).SafeNormalized(); // build the destination rotation matrix MCore::Matrix destRotation; destRotation.Identity(); destRotation.SetRight(right); destRotation.SetUp(up); destRotation.SetForward(forward); // at this point, destRotation contains the global space orientation that we would like our node do be using // if we want to apply constraints if (mConstraintType != CONSTRAINT_NONE) { // find the destination relative to the node's parent if the node has one if (parentIndex != MCORE_INVALIDINDEX32) { destRotation = destRotation * parentGlobalTM.Inversed(); } // now destRotation contains the exact orientation we wish to apply constraints to (relative to the identity matrix) // multiply by the inverse of the ellipse's orientation, and rotate our coordinate system into 'ellipse space' if (mEMFX2CompatibleMode) { destRotation = mEllipseOrientation.Inversed() * destRotation; // OLD EMotion FX 2 / EMotion FX v3.0 mul order } else { destRotation = destRotation * mEllipseOrientation.Inversed(); } // calculate the swing and twist MCore::SwingAndTwist sAndt(destRotation); // apply swing constraints if (mConstraintType == CONSTRAINT_ELLIPSE) // constraint using an ellipse { sAndt.ConstrainSwingWithEllipse(mEllipseRadii); } else if (mConstraintType == CONSTRAINT_RECTANGLE) // constraint using a rectangle { // the rectangle method will be a lot faster than the ellipse, but doesn't look anywhere near as good // this should probably only be used for distant models using a lower LOD // treat the ellipse's radii as bounds for a rectangle sAndt.ConstrainSwingWithRectangle(mEllipseRadii); } // apply twist constraints sAndt.ConstrainTwist(mMinMaxTwist); // convert the swing and twist back to a matrix destRotation = sAndt.ToMatrix(); // rotate back out of ellipse space if (mEMFX2CompatibleMode) { destRotation = mEllipseOrientation * destRotation; // OLD EMotion FX 2 / EMotion FX v3.0 mul order } else { destRotation = destRotation * mEllipseOrientation; } // if we converted our coord system into the space relative to the parent, then convert it back to global space if (parentIndex != MCORE_INVALIDINDEX32) { destRotation = destRotation * parentGlobalTM; } } // apply the post rotation matrix destRotation = mPostRotation * destRotation; // interpolate between the current rotation and the destination rotation float speed = mInterpolationSpeed * timePassedInSeconds * 6.0f; speed = MCore::Clamp<float>(speed, 0.0f, 1.0f); mRotationQuat = mRotationQuat.Slerp(MCore::Quaternion(destRotation), speed); mRotationQuat.Normalize(); // TODO: this normally shouldn't be needed as Slerp already normalizes, still it is needed to prevent some suddenly introduced scaling // create the rotation matrix from the rotation quat destRotation = mRotationQuat.ToMatrix(); // scale the matrix and put it back in the right position destRotation.Scale3x3(globalScales[mNodeIndex]); destRotation.SetTranslation(globalMatrices[mNodeIndex].GetTranslation()); // update the matrix with forward kinematics mActorInstance->RecursiveUpdateGlobalTM(mNodeIndex, &destRotation, globalMatrices);*/ } // Calculate the Ellipse radii and the twist value from the min and max euler angles void LookAtController::SetEulerConstraints(const MCore::Vector3& minVals, const MCore::Vector3& maxVals) { // twist is z mMinMaxTwist.SetX(minVals.z); mMinMaxTwist.SetY(maxVals.z); // Offset is the average const float xOffset = (minVals.x + maxVals.x) * 0.5f; const float yOffset = (minVals.y + maxVals.y) * 0.5f; // these lines are the same as above mEllipseRadii.SetX(maxVals.x - xOffset); mEllipseRadii.SetY(maxVals.y - yOffset); // build the apropriate matrices MCore::Matrix xOffsetMat, yOffsetMat, zRot; xOffsetMat.SetRotationMatrixX(xOffset); yOffsetMat.SetRotationMatrixY(yOffset); mEllipseOrientation = xOffsetMat * yOffsetMat; // TODO: check if this is required // basically just swaps the x and y axii if (mEMFX2CompatibleMode) { zRot.SetRotationMatrixZ(-MCore::Math::halfPi); mEllipseOrientation = zRot * mEllipseOrientation; } } // clone the controller GlobalSpaceController* LookAtController::Clone(ActorInstance* targetActorInstance) { // create the new constraint and copy its members LookAtController* newController = new LookAtController(targetActorInstance, mNodeIndex); // copy the settings newController->mPreRotation = mPreRotation; newController->mPostRotation = mPostRotation; newController->mEllipseOrientation = mEllipseOrientation; newController->mRotationQuat = mRotationQuat; newController->mGoal = mGoal; newController->mEllipseRadii = mEllipseRadii; newController->mMinMaxTwist = mMinMaxTwist; newController->mInterpolationSpeed = mInterpolationSpeed; newController->mConstraintType = mConstraintType; // copy the base class weight settings // this makes sure the controller is in the same activated/deactivated and blending state // as the source controller that we are cloning newController->CopyBaseClassWeightSettings(this); // return the new controller return newController; } // get the type ID uint32 LookAtController::GetType() const { return LookAtController::TYPE_ID; } // get the type string const char* LookAtController::GetTypeString() const { return "LookAtController"; } // get the goal const MCore::Vector3& LookAtController::GetGoal() const { return mGoal; } // set the goal position void LookAtController::SetGoal(const MCore::Vector3& goalGlobalSpacePos) { mGoal = goalGlobalSpacePos; } // set the interpolation speed void LookAtController::SetInterpolationSpeed(float factor) { mInterpolationSpeed = factor; } // get the interplation speed float LookAtController::GetInterpolationSpeed() const { return mInterpolationSpeed; } // set the pre-rotation matrix void LookAtController::SetPreRotation(const MCore::Matrix& mat) { mPreRotation = mat; } // get the pre-rotation matrix const MCore::Matrix& LookAtController::GetPreRotation() const { return mPreRotation; } // set the post rotation matrix void LookAtController::SetPostRotation(const MCore::Matrix& mat) { mPostRotation = mat; } // get the post rotation matrix const MCore::Matrix& LookAtController::GetPostRotation() const { return mPostRotation; } // set the ellipse orientation void LookAtController::SetEllipseOrientation(const MCore::Matrix& mat) { mEllipseOrientation = mat; } // get the ellipse orientation const MCore::Matrix& LookAtController::GetEllipseOrientation() const { return mEllipseOrientation; } // set the ellipse radii void LookAtController::SetEllipseRadii(const AZ::Vector2& radii) { mEllipseRadii = radii; } // set the ellipse radii using two floats void LookAtController::SetEllipseRadii(float rx, float ry) { mEllipseRadii.Set(rx, ry); } // set the twist rotation limits void LookAtController::SetTwist(float minValue, float maxValue) { mMinMaxTwist.Set(minValue, maxValue); } // set the twist rotation limits using a Vector2 void LookAtController::SetTwist(const AZ::Vector2& minMaxTwist) { mMinMaxTwist = minMaxTwist; } // set the constraint type void LookAtController::SetConstraintType(EConstraintType constraintType) { mConstraintType = constraintType; } // get the constraint type LookAtController::EConstraintType LookAtController::GetConstraintType() const { return mConstraintType; } // enable/disable EMotion FX 2 compatibility mode void LookAtController::SetEMFX2CompatbilityModeEnabled(bool enabled) { mEMFX2CompatibleMode = enabled; } // check EMotion FX 2 compatibility mode bool LookAtController::GetIsEMFX2CompatbilityModeEnabled() const { return mEMFX2CompatibleMode; } } // namespace EMotionFX