content
stringlengths 7
2.61M
|
---|
import Component from '@glimmer/component';
import { inject } from '@ember/service';
import ModalService from 'cardhost/services/modal';
import type RouterService from '@ember/routing/router-service';
import { CardModel } from '@cardstack/core/src/interfaces';
import { LOCAL_REALM, DEMO_REALM } from 'cardhost/lib/builder';
import './index.css';
interface CardContainerArgs {
card?: CardModel;
editable?: boolean;
}
export default class CardContainer extends Component<CardContainerArgs> {
@inject declare modal: ModalService;
@inject declare router: RouterService;
// This is hardcoded for now. We need to decide how this should work.
REALM = DEMO_REALM;
LOCAL_REALM = LOCAL_REALM;
}
|
The facts: Lexington Attorney Andy Barr is trying for the second time to unseat Democratic U.S. Rep. Ben Chandler of Versailles in Central Kentucky's 6th Congressional District.
The future of Medicare, a federal government health program primarily for people age 65 and older, has become a major issue in the race. Each candidate claims the other is endangering the future of the entitlement program, the cost of which is projected to increase from $560 billion in 2010 to just over $1 trillion by 2022.
In July, the non-partisan Congressional Budget Office said President Barack Obama's Affordable Care Act would reduce future growth in Medicare spending by $716 billion over the next decade. It previously had estimated the reductions to be about $500 billion, the figure Barr's campaign uses in the TV ad.
The law, dubbed Obamacare by Republicans, is projected to save $716 billion by reducing the growth of Medicare's payment rates to insurance companies and health care providers. It does not reduce benefits to participants. Instead, it provides additional benefits, such as free preventive care, and provides coverage to many uninsured.
However, Barr and other Republicans argue that slower-growing payments to health care providers will impact Medicare beneficiaries by endangering the potential availability of needed medical services.
Foster estimated that Medicare could become unprofitable for about 15 percent of hospitals within the 10-year projection period.
Supporters of the Affordable Care Act counter that hospitals will benefit from the millions of people expected to gain health insurance under the law.
Campaign Watchdog finds Barr’s claim to be mostly false. The statement leaves the false impression that Obamacare hurts the Medicare Trust Fund, causing it to run out of money sooner than it otherwise would have. The opposite is true. By reducing the growth of future Medicare spending, the Affordable Care Act extends the Medicare Trust Fund’s exhaustion date from 2016 to 2024.
The statement also leaves the misleading impression that the law cuts existing spending on Medicare, rather than slow the growth of future spending over a decade.
In addition, it's worth noting that Chandler voted against the Affordable Care Act in 2010. Since then, he has repeatedly opposed Republican attempts to repeal the law. |
Principles of anaesthesia in urological surgery Anaesthesia for urological surgery poses particular challenges for the anaesthetist related to the patient population and procedure type. The aim of this article is to cover the general principles of anaesthesia, with dedicated sections relevant to practising urological surgeons. This represents vast amounts of knowledge that cannot be covered in one article. We will focus upon preoperative preparation for surgery and anaesthesia, perioperative management including monitoring and analgesia, and postoperative management including fluid balance, critical care and recovery. Significant proportions of urological surgical patients have some degree of renal failure and this may be related to the surgery required. Anaesthetic care of patients with chronic renal impairment and transplant surgery will be covered in a future review. |
<gh_stars>0
/*
* Copyright 2019 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.sagebase.crf;
import android.content.Context;
import android.content.Intent;
import org.researchstack.backbone.factory.IntentFactory;
import org.sagebase.crf.researchstack.CrfResourceManager;
/**
* Creates Intents for launching Cardiorespiratory Fitness Module tasks.
*/
public class CrfTaskIntentFactory {
private static final org.sagebase.crf.researchstack.CrfTaskFactory taskFactory =
new org.sagebase.crf.researchstack.CrfTaskFactory();
private static final IntentFactory intentFactory = IntentFactory.INSTANCE;
/**
* @param context application context
* @return Intent for launching Heart Rate Training activity
*/
public static Intent getHeartRateTrainingTaskIntent(Context context) {
return intentFactory.newTaskIntent(
context,
CrfActiveTaskActivity.class,
taskFactory.createTask(
context,
CrfResourceManager.HEART_RATE_TRAINING_TEST_RESOURCE));
}
/**
* @param context application context
* @return Intent for launching Heart Rate Measurement activity
*/
public static Intent getHeartRateMeasurementTaskIntent(Context context) {
return intentFactory.newTaskIntent(
context,
CrfActiveTaskActivity.class,
taskFactory.createTask(
context,
CrfResourceManager.HEART_RATE_MEASUREMENT_TEST_RESOURCE));
}
/**
* @param context application context
* @return Intent for launching Stair Step activity
*/
public static Intent getStairStepTaskIntent(Context context) {
return intentFactory.newTaskIntent(
context,
CrfActiveTaskActivity.class,
taskFactory.createTask(
context,
CrfResourceManager.STAIR_STEP_RESOURCE));
}
private CrfTaskIntentFactory() {
}
}
|
/**
* Performs breadth first traversal of the tree.
*
* @param root the root node of the tree
* @return the list representing the breadth first traversal of tree nodes
*/
public static <T extends Comparable<T>> List<BasicNode<T>> breadth(BasicNode<T> root) {
if (null == root) {
throw new IllegalArgumentException("Input is empty or null");
}
List<BasicNode<T>> inOrderView = new ArrayList<BasicNode<T>>();
Queue<BasicNode<T>> queue = new LinkedList<>();
queue.add(root);
while (!queue.isEmpty()) {
BasicNode<T> tmpNode = queue.poll();
inOrderView.add(tmpNode);
if (tmpNode.hasLeft()) {
queue.add(tmpNode.getLeft());
}
if (tmpNode.hasRight()) {
queue.add(tmpNode.getRight());
}
}
return inOrderView;
} |
Identifying Stress Concentrations on Buried Steel Pipelines Using Large Standoff Magnetometry Technology Buried steel pipelines are subjected to mechanical stress, by internal or external forces, resulting from geo-hazards, shear or external loading, and hoop stress. These conditions are key factors that can be detrimental to the integrity of the pipeline and lead to possible failures such as: coating damage, dents, buckles, cracks, and leaks. Identifying stress concentration regions, in difficult to pig pipelines, is challenging, especially when compared to piggable pipelines. Using the Large Standoff Magnetometry (LSM) technology, an innovative screening tool, we can identify stress concentration by performing an indirect inspection. LSM technology detects inverse magnetostriction (also known as the Villari effect) which is the change of the magnetic susceptibility of a material when subjected to mechanical stress. Using this technology we can detect changes in the magnetic field of the pipeline which can indicate the presence of stress on the pipe wall. LSM technology has shown significant results when correlated with additional data. For instance, LSM technology correlated with Inline Inspection (ILI) or As-Built drawings have aided in the accurate selection of digs to mitigate failures due to stress concentration. Successfully identifying digs to mitigate stress concentration is vital as it substantially reduces cost due to potential failures and avoiding unnecessary digs. This paper will show the benefits of an integrated approach and how the correlation of inline and aboveground pipeline integrity data ensures that threats due to stress concentrations are confidently identified and mitigated. Several case studies will be presented to show how recent advancements have helped to identify and prioritize regions with Stress Corrosion Cracking (SCC), Cracks, Unknown Buried Feature, Dents, and Buckles. |
Does a band structure affect sphaleron processes? Inspired by a recent work of Tye and Wong, we examine an effect of a band structure on baryon number preservation criteria requisite for successful electroweak baryogenesis. Action of a reduced model is fully constructed including a time component of the gauge field that is missing in the original work. The band structure is estimated more precisely in wider energy range based on WKB framework with three connection formulas to find that the band structure has little effect on the criteria at around 100 GeV temperature. We also address an issue of suppression factors peculiar to the $(B+L)$-changing process in high-energy collisions at zero temperature. Introduction.-It is known that conservation of baryon (B) and lepton number (L) is nonperturbatively violated by the chiral anomaly in electroweak theories. Experimental verification of such a violation is important not only for understanding the nonperturbative nature of the quantum field theory but also for phenomenology in particle physics and cosmology. In particular, existence of such an anomalous process has expanded the possibilities of baryogenesis in the early Universe: electroweak baryogenesis (EWBG), leptogenesis, and baryogenesis via neutrino oscillations, etc. It is shown by 't Hooft that the (B + L)-changing vacuum transition is suppressed by e −Sinstanton ≃ 10 −162, where S instanton is the instanton action. Later, the analysis was generalized to the process in high-energy collisions and found that the above exponential suppression can get alleviated with increasing energy. However, the perturbative calculation using an instanton-like configuration is no longer valid as the energy approaches to a sphaleron energy (E sph ) which corresponds to the height of the barrier separating topologically different vacua. A nonperturbative analysis in a simplified model indicates that the exponential suppression still persists even at very high energy. Recently, Tye and Wong revisited the possibility of the (B + L)-changing process at high energies in the framework of a reduced model. In their analysis, the reduced model is quantized so that the energy spectrum has a band structure owing to the periodic potential, and the wave functions are given by Bloch waves. It is demonstrated that the band width gets wider with increasing energy, and the energy spectrum becomes almost continuous above E sph, and therefore the transition amplitude is free from the exponential suppression when the energy is larger than E sph. Such a description is missing in the past work. After their claim, discussions on the detectability of the (B + L)-changing process at colliders or in high-energy cosmic rays have been revived. While the (B + L)-changing process is unsuppressed at higher temperature than the electroweak phase tran-sition, its probability below that temperature should be so small to satisfy the baryon-number preservation criteria (BNPC) for a successful EWBG scenario. It is a natural question to what extent the above band structure description can change the BNPC. Such an analysis is enormously important for a test of EWBG at the Large Hadron Collider (LHC) since the BNPC determines the minimal value of strength of the first-order electroweak phase transition, so the collider signatures in the Higgs sector. In this Letter, we investigate the effect of the band structure on the BNPC. As is done in Refs. [8,, the reduced model is constructed by regarding the noncontractible loop parameter as a dynamical variable. Unlike the work of, we adopt a fully gaugeinvariant approach in which the time component of the gauge field A 0 is also taken into account for the construction. Furthermore, we evaluate the band structure in a more precise manner utilizing the WKB method with three connection formulas depending on energy. With those improvements, we compare our results with those in Ref. and quantify the impact of the band structure on EWBG. We also point out a problem of an exponential suppression factor besides the tunneling factor in the (B + L)changing process in high-energy collisions at zero temperature, which is not properly argued in Ref.. The reduced model.-We consider the standard model (SM) for an illustrative purpose. The generalization to models beyond the SM is straightforward. Since the effect of a U Y contribution on the sphaleron energy is a few %, we neglect it. The starting point is the following SU L gauge-Higgs system: where D = ∂ +ig 2 A with g 2 being the gauge coupling. F a is the field strength tensor and the SU L doublet Higgs field. The vacuum expectation value of the Higgs field is denoted as v(≃ 246 GeV). With the Manton's ansatz, the gauge and Higgs fields are cast into the form with with a noncontractible loop parameter which runs from 0 to. Note that Eqs. and are reduced to the vacuum configurations for = 0 and while the sphaleron for = /2. Our aim is to study the transition from one vacuum to another along the least energy path such that the sphaleron configuration is realized at the maximal point. For this purpose, is promoted to the dynamical value (t) as proposed in Ref.. In contrast to the previous studies, we construct the reduced model in Note that the Manton's ansatz with the A 0 = 0 gauge causes an unwanted divergence arising from the D term in asymptotic region r → ∞ due to lack of the full gauge invariance, and therefore some prescriptions are needed. After deriving the profile functions f (r) and h(r) by solving the equations of motion for the sphaleron, one obtains the classical action as where The coefficients of 's and 's are found to be The sphaleron mass and potential in units of mass are, respectively, given by E sph = g 2 vV 2 ≃ 9.08 TeV. Note that M sph depends on the normalization of the kinetic term in Eq. which is different from that in Ref. by a factor of 4. With the same normalization, M sph = 23.0 TeV in our case and M sph = 17.1 TeV in Ref., which implies that the A 0 contribution to M sph is not negligible. As will be discussed below, number of the bands can change according to the size of M sph. When a classical Hamiltonian is quantized, an ambiguity arises from an operator ordering. In our analysis, we adopt wherep is the momentum conjugate operator that satisfies = i. With this Hamiltonian, we solve the Schrdinger equation Since the potential is a periodic function of, the eigenfunction () is given by Bloch wave and energy spectrum has the band structure. The band edges are determined, in the WKB approximation, as solutions to where T (E) is a transmission coefficient at E and (E) is defined by where a(E) and b(E) are the turning points determined by E = V () for E < V (/2), while a(E) = /2 and b(E) = −/2 for E ≥ V (/2). We denote the lower and upper edges of the n-th band as E −,n and E +,n, respectively, so its band width is given by ∆E n = E +,n −E −,n. Depending on the energy, three kinds of connection formulas are properly used: linear potential, parabolic potential and over-barrier approximations (for a review, see, e.g., Ref. ). Detailed calculations will be given in Ref.. To verify the validity of this method, we also applied it to an eigenvalue problem with a sine-type potential, where the band edges are known to be the characteristic values of the Mathieu function, and then confirmed that the above method sufficiently works well. Table I shows the band structure in the reduced model. The number of the bands below E sph is 158 in our case while 148 in Ref., which is attributed to the different values of M sph. While the band center energies are more or less the same as those in Ref., significant differences exist in the band widths at E ≃ O GeV. However, such a difference does not give any impact on the results we are concern with. One can see that the band widths become wider as the energy grows, while the band structure persists above E sph even though the band gaps gets smaller. Thermal transition rate.-Now we scrutinize how much the band structure affects EWBG. The typical energy scale of EWBG is a critical temperature T C at which the Higgs potential has degenerate minima if the electroweak phase transition is of first order, which is about O GeV in most cases. The decay rate of a false vacuum at finite temperatures is defined by where Z 0 (T ) = −1 is a partition function of a harmonic oscillator with an angular frequency 0 = g 2 v V /M and J(E) is a probability current, which is cast into the form J(E) = T (E)/2. The WKB approximation in high temperature regime of the field theoretic expression of is used to estimate the (B + L)-changing rate in electroweak theories. We numerically calculate A (T ) for a single energy barrier in the region of 0 ≤ ≤. In the current framework of the periodic potential, we newly define the transition rate as where (E) is the density of states that embodies the band effect: (E) = 1 for the conducting band and (E) = 0 for the band gap. It should be noted that although what is really needed is the thermal average of the transition probability from = 0 to =, the definition corresponds to setting the probability to unity for a state in one of the energy bands. Therefore, the above naive definition of the rate provides an overestimated result. We defer the more precise estimate to future work. The numerical values of (T ) and A (T ) are plotted in Fig. 1. Now we study the effect of the band structure on the BNPC, (T ) < H(T ), as needed for successful EWBG, where H(T ) ∝ T 2 /m Pl with m Pl being the Planck mass is the Hubble parameter at T. Although the enhancement due to the band structure is sizable at temperatures below 30 GeV, (T ) is still too small to affect the BNPC quantitatively, since H(T ) decreases more slowly than (T ) for lower temperatures. On the other hand, the enhancement appears very small near the electroweak phase transition temperature. To quantify the effect, we denote R(T ) = (T )/ A (T ), where A (T ) corresponds to the (B + L)-changing rate so far used. The modified BNPC is expressed as v(T ) where N denotes the translational and rotational zeromode factors of the fluctuations about the sphaleron, which may amount to about 10% correction to the leading constant term (see, e.g., Ref. ). With R(T ) obtained above, one finds that log R(T = 100 GeV) ≃ 0.05, so the band structure has little effect on the criteria. (B+L)-changing process in high-energy collisions.-It is an interesting question whether (B + L)-changing process is visible at colliders such as LHC and Future Circular Collider-hh etc. Tye and Wong claim that it might be possible thanks to the unsuppressed transition probability between the topologically inequivalent vacua. However, it is known that the creation of the classical configurations from the high-energy collision of the two particles suffers from another type of exponential suppression other than the tunneling suppression discussed above. In Refs., the (B + L)-changing scattering amplitude is formulated by use of the complete set of the coherent state, which is dominated by the bounce configuration describing a transition from one vacuum to another. It is shown that, in the leading order of the WKB approximation, the overlap between the coherent state and the n-particle state produces a multiplicative factor k 2 1 e −|k1|/mW k 2 2 e −|k2|/mW k 2 n e −|kn|/mW with k i being a spatial momentum of the particle i. Therefore, the overlap between the coherent state and the in-state composed of two particles whose total momentum is E sph yields a suppression factor ∼ e −E sph /mW ≃ 10 −155, rendering (B + L)-changing process unobservably small. We note in passing that existence of the suppression can also be shown using the complete set of the field eigenstates instead of that of the coherent states. Since each factor k 2 e −|k|/mW has a sharp peak at |k| ∼ m W, the above overlap suppression might be circumvented if the incoming two particles get scattered into multiple W bosons where each has a momentum close to the W boson mass, and then couple to the sphaleron all together. For this process to occur, about 80 W bosons must be produced by the initial state scatterings, which would have a phase space suppression factor ∼ (1/(4) 2 ) 80 ≃ 10 −176, again preventing the (B + L)changing process from being visible in high-energy collisions. Those types of the suppressions still remain regardless of the band structure, which is not properly discussed in Ref. (see also Ref. ). It should be emphasized that the above types of the suppressions do not exist at temperatures higher than the weak scale, since so many particles whose momenta are of order m W are populated to have sizable overlap with the classical configuration. Conclusions.-We have constructed the reduced model along the noncontractible loop connecting the classical vacua with different B +L in a gauge-invariant manner, and investigated the energy eigenstates of the mode in detail. Based on the results, we have scrutinized to what extent the band structure can affect the EWBG scenario. Our findings show that the BNPC is not virtually altered for T ≤ T C. Before closing, a few comments are in order. First of all, we make a remark on the formulation of the (B + L)changing process. The energy eigenstates obtained here are not those of B + L or. If an in-state of a highenergy collision is an eigenstate of or a state localized at some, it should be expressed as a superposition of the energy eigenstates. Such a state should be peaked at some energy in the asymptotic region where B + L is almost conserved. The correct (B + L)-changing rate must be formulated by taking into account this situation. Secondly, we have not taken thermal corrections into account in our analysis. In order to improve our results quantitatively, the reduced model should be constructed starting from the field theoretic model with thermal corrections, as done in to improve the precision of the BNPC. These issues will be dealt with elsewhere. K |
<gh_stars>10-100
package org.apache.directmemory.serialization;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import static java.lang.String.format;
import java.util.Iterator;
import static java.util.ServiceLoader.load;
public final class SerializerFactory
{
public static Serializer createNewSerializer()
{
return createNewSerializer( SerializerFactory.class.getClassLoader() );
}
public static Serializer createNewSerializer( ClassLoader classLoader )
{
// iterate over all found services
for (Serializer serializer : load(Serializer.class, classLoader)) {
// try getting the current service and return
try {
return serializer;
} catch (Throwable t) {
// just ignore, skip and try getting the next
}
}
return new StandardSerializer();
}
public static <S extends Serializer> S createNewSerializer( Class<S> serializer )
throws SerializerNotFoundException
{
// iterate over all found services
for (Serializer serializer1 : load(Serializer.class, serializer.getClassLoader())) {
// try getting the current service and return
try {
Serializer next = serializer1;
if (serializer.isInstance(next)) {
return serializer.cast(next);
}
} catch (Throwable t) {
// just ignore, skip and try getting the next
}
}
throw new SerializerNotFoundException( serializer );
}
public static Serializer createNewSerializer( String serializerClassName )
throws SerializerNotFoundException
{
return createNewSerializer( serializerClassName, SerializerFactory.class.getClassLoader() );
}
public static Serializer createNewSerializer( String serializerClassName, ClassLoader classLoader )
throws SerializerNotFoundException
{
Class<?> anonSerializerClass;
try
{
anonSerializerClass = classLoader.loadClass( serializerClassName );
}
catch ( ClassNotFoundException e )
{
throw new SerializerNotFoundException( serializerClassName );
}
if ( Serializer.class.isAssignableFrom( anonSerializerClass ) )
{
@SuppressWarnings( "unchecked" ) // the assignment is guarded by the previous check
Class<? extends Serializer> serializerClass = (Class<? extends Serializer>) anonSerializerClass;
return createNewSerializer( serializerClass );
}
throw new IllegalArgumentException( format( "Class %s is not a valid Serializer type",
anonSerializerClass.getName() ) );
}
/**
* Hidden constructor, this class cannot be instantiated
*/
private SerializerFactory()
{
// do nothing
}
}
|
Computing Approximate Pure Nash Equilibria in Digraph k-Coloring Games We investigate approximate pure Nash equilibria in digraph k-coloring games, where we are given an unweighted directed graph together with a set of k colors. Vertices represent agents and arcs capture their mutual unidirectional interests. The strategy set of each agent v consists of the k colors and the payoff of v in a given state or coloring is given by the number of outgoing neighbors with a color different from the one of v. Such games form some of the basic payoff structures in game theory, model lots of real-world scenarios with selfish agents and extend or are related to several fundamental class of games. It is known that the problem of understanding whether the game admits a pure Nash equilibrium is NP-complete. Therefore we focus on designing polynomial time algorithms that return approximate Nash equilibria. Informally, we say that a coloring is a -Nash equilibrium (for some ≥ 1) if no agent can strictly improve her payoff by a multiplicative factor of by changing color. We first propose a deterministic polynomial time algorithm that, for any k ≥ 3, returns a k-coloring that is a o(G)-Nash equilibrium, where o(G) is the maximum outdegree of the digraph. We then provide our two main results: i) By exploiting the constructive version of the well known Lovaasz Local Lemma, we show a randomized algorithm with polynomial expected running time that, given any constant k ≥ 2, computes a constant-Nash equilibrium for a broad class of digraphs, i.e., for digraphs where, for any v ∈ V, o/v(G) = (ln o(G) + ln i(G)) where o(G) (resp. i(G)) is the maximum outgoing (resp. maximum ingoing) degree of G, and o/v(G) is the outgoing degree of agent v. ii) For generic digraphs, we show a deterministic polynomial time algorithm that computes a (1+e)-Nash equilibrium, for any e > 0, by using O(log n/e) colors. |
#include <cassert>
#include "vec.h"
#define ASSERT_TRUE(x) assert(x)
void
VectorAddition()
{
math::Vec2i a(3, 4);
math::Vec2i b(9, 2);
ASSERT_TRUE(a.x == 3);
ASSERT_TRUE(a.y == 4);
ASSERT_TRUE(b.x == 9);
ASSERT_TRUE(b.y == 2);
auto c = a + b;
ASSERT_TRUE(c.x == 12);
ASSERT_TRUE(c.y == 6);
a += b;
ASSERT_TRUE(a.x == 12);
ASSERT_TRUE(a.y == 6);
math::Vec3i aa(3, 4, 9);
math::Vec3i bb(9, 2, 5);
ASSERT_TRUE(aa.x == 3);
ASSERT_TRUE(aa.y == 4);
ASSERT_TRUE(aa.z == 9);
ASSERT_TRUE(bb.x == 9);
ASSERT_TRUE(bb.y == 2);
ASSERT_TRUE(bb.z == 5);
auto cc = aa + bb;
ASSERT_TRUE(cc.x == 12);
ASSERT_TRUE(cc.y == 6);
ASSERT_TRUE(cc.z == 14);
aa += bb;
ASSERT_TRUE(aa.x == 12);
ASSERT_TRUE(aa.y == 6);
ASSERT_TRUE(aa.z == 14);
}
void
VectorSubtraction()
{
math::Vec2i a(3, 4);
math::Vec2i b(9, 2);
auto c = a - b;
ASSERT_TRUE(c.x == -6);
ASSERT_TRUE(c.y == 2);
a -= b;
ASSERT_TRUE(a.x == -6);
ASSERT_TRUE(a.y == 2);
}
void
VectorScalarMultiplication()
{
math::Vec2i a(3, 4);
int b = 3;
auto c = a * b;
ASSERT_TRUE(c.x == 9);
ASSERT_TRUE(c.y == 12);
a *= b;
ASSERT_TRUE(a.x == 9);
ASSERT_TRUE(a.y == 12);
}
void
VectorScalarDivision()
{
math::Vec2i a(9, 6);
int b = 3;
auto c = a / b;
ASSERT_TRUE(c.x == 3);
ASSERT_TRUE(c.y == 2);
a /= b;
ASSERT_TRUE(a.x == 3);
ASSERT_TRUE(a.y == 2);
}
void
VectorDotProduct()
{
math::Vec2i a(3, 4);
math::Vec2i b(9, 2);
ASSERT_TRUE(math::Dot(a, b) == 35);
}
void
VectorNormalization()
{
math::Vec2f a(3.0f, 4.0f);
math::Vec2f b = math::Normalize(a);
ASSERT_TRUE(b.x == 0.6f);
ASSERT_TRUE(b.y == 0.8f);
ASSERT_TRUE(math::Length(b) == 1.0f);
}
void
VectorSquaredLength()
{
math::Vec2i a(3, 4);
ASSERT_TRUE(math::LengthSquared(a) == 25.0f);
}
void
VectorZeroInitialization()
{
math::Vec2i a;
math::Vec2f b;
math::Vec2d c;
ASSERT_TRUE(a.x == 0);
ASSERT_TRUE(a.y == 0);
ASSERT_TRUE(b.x == 0.0f);
ASSERT_TRUE(b.y == 0.0f);
ASSERT_TRUE(c.x == 0.0);
ASSERT_TRUE(c.y == 0.0);
}
int
main(int argc, char** argv)
{
VectorAddition();
VectorSubtraction();
VectorScalarMultiplication();
VectorScalarDivision();
VectorDotProduct();
VectorNormalization();
VectorSquaredLength();
VectorZeroInitialization();
return 0;
}
|
Malignant mesenchymal tumor of male breast: primary chondrosarcoma. Breast Sarcomas have relatively been rare and accounted for 1% of all primary malignant tumors of the breast. Pure and primary chondrosarcoma of the male breast would be an extremely rare tumor. It might arise either from the breast stroma itself, or from underlying bone or cartilage. A 65-year-old man has presented with a rapidly growing breast mass since 5 months. Physical examination has established a large firm to hard mass with regular margins in the region of right breast. There was no axillary lymphadenopathy. Contrast enhanced MRI of breasts has shown a mixed-signal intensity multi lobulated cystic-solid mass (10.4 cm 10.3 cm 9.9 cm) appearing predominantly hyper intense on T2W and hypo intense on T1W. The tumor has diagnosed as a low-grade chondrosarcoma of the breast by histopathological and immunohistochemistry analysis. Right sided radical mastectomy with grafting has done. It has seemed to be very important to identify the mammary primary sarcomas as entity separated from the carcinomas of the breast. Introduction Malignant tumors which originated from mesenchymal tissue, has occurred very rarely in the breast. The metaplastic carcinomas which have characterized by a combination of mesenchymal and epithelial components would be uncommon malignancies of the breast. Pure primary sarcomas have been the rarest malignancies in mammary tissue. The chondrosarcoma has been a typical example of these rarest tumors of the mesenchymal tissue. Less than 10 cases have published in the literature. Case Report A 65 years old man has presented in our department with a complaint of a right sided breast mass which has rapidly grown for 5 months. Breast palpation has revealed a painless, less mobile, and firm to hard mass of 1010cm with regular margins in area of right breast. The axilla was clinically negative. Contrast enhanced MRI ( Figures 1A and B) of breasts has revealed huge mixed signal intensity multi lobulated cystic-solid extra-pulmonary mass lesion involving the right anterior chest wall extending from infra clavicular region to the level of xiphisternum measuring 10.4 cm (SI) 10.3 cm (AP) 9.9 cm (Trans) appearing predominantly hyper intense on T2W and hypo intense on T1W. Heterogeneous predominantly peripheral solid tumoral enhancement has observed with multiple large loculated central areas of necrosis and intensely enhancing septae. Pre contrast T1W hyper intensity has indicated internal hemorrhage. There was no axillary lymphadenopathy. Histopathology has revealed the overall appearances of low-grade chondrosarcoma with a tumor composed of lobules of cartilage of varying size separated by fibrous tissue. The tumor has seen to focally infiltrate into surrounding skeletal muscle. Immunohistochemical studies have performed by standard revealed that chondrosarcomatous elements were positive for S-100 and vimentin, but negative for cytokeratin and also for estrogen and progesterone receptors. After routine investigations, right sided radical mastectomy with grafting has done. Patient has discharged in well condition postoperatively. But he has lost follow-up after three months. Discussion This paper has discussed one of the rarest mesenchymal malignancies of the breast, primary chondrosarcoma. As a primary breast tumor, chondrosarcoma might occur in three different forms: as a pure neoplasm (pure chondrosarcoma), as the stromal component of a histologically malignant phyllodes tumor, or as chondrosarcomatous differentiation in a metaplastic carcinoma. In this report we have reported a case of histologically pure chondrosarcoma. The primary chondrosarcoma of the breast has been an extremely rare entity. It has contained chondrosarcomatoid sectors which resulted from some mammary tissue. Prognosis of chondrosarcomatous breast tumors has not fully known, because many of the reported cases were difficult to analyze (owing to lack of detailed clinical or morphologic information). These tumors were usually large-sized that have occurred in more than 40 year old woman. Axillary lymph nodes have found in 14-29% of the cases, most of which were reactive hyperplasia. The present case substantiates the clinical findings of previously reported cases. To diagnose a primary chondrosarcoma of the breast, a non-mammary site has been excluded clinically and histologically. Other types of pure sarcoma, such as spindle cell sarcoma, neuroectodermal tumor, angiosarcoma etc, have also been reported. The history of the patient had an important feature as the mass had grown rapidly without systemic and deleterious effect on the patient's health status. These tumors have tended to grow rapidly and present themselves as a mass for a short duration. A large multilobular mass with regular margins and without a sign of regional invasion has detected by palpation. These findings have appeared as important features of this large tumor. Previous reports have also pointed out that these large tumors have not generally invaded skin and regional lymph nodes despite their locally advanced nature 7]. A relatively circumscribed, well demarcated mass, as in our patient, was an imaging characteristic of a pure mesenchymal or a metaplastic carcinoma with sarcomatoid differentiation. It has been redported that imaging studies seldom led to the diagnosis of sarcoma in a suspected benign lesion. The mass was complex echoic on ultrasound and has shown round hyperdense opacity on mammography. The very limited number of such cases has not permitted us to establish an appropriate therapeutic approach. Chondrosarcoma in common locations has generally known as refractory to all types of conventional chemotherapy and radiotherapy. Surgery has remained the only effective treatment. Pure chondrosarcoma and metaplastic cancer of the breast has rarely invaded axillary lymph nodes and would be generally hormone receptor-negative. This extremely rare tumor has tended to grow rapidly, and it was usually large at first physical examination. A large, hyper dense and complex echoic mass with regular margins has given the impression of a benign tumor on mammography and ultrasound. Despite its large size, it has not invaded local and regional structures. Regarding systemic management, there was no standard treatment protocol, and a large variety of chemotherapy protocols have been employed in treating this disease. Systemic therapy principles have been derived from small retrospective case reviews of primary breast chondrosarcomas and extrapolated from studies of non-breast chondrosarcomas, since the clinical behavior and histology were similar. The tumor was negative for any of the hormonal receptors. This fact has been supported the theory that adjuvant therapy with estrogen antagonists and other hormone manipulations had no role in treatment of mammary sarcomas. The adjuvant treatment could decrease the rates of local and systematic recurrences, but the results were not significant because of the rarity of this pathological entity and the small numbers of cases have reported, which made the evaluation of the role of the chemotherapy and the radiotherapy in the primary breast chondrosarcoma more difficult. Conclusion It has seemed to be very important to identify the mammary primary sarcomas as entity separated from the carcinomas of the breast. The primitive chondrosarcoma has remained a rare pathology, among which the therapeutic modalities and the forecast were credibly identical to those of the sarcomas of the same type arising in the other localizations. |
package test
import (
"flag"
"os"
"os/user"
"path"
"testing"
)
// Flags holds the initialized test flags
var Flags = initializeFlags()
// FlagsStruct is struct that defines testing options
type FlagsStruct struct {
Kubeconfig string // Path to .kube/config
}
func initializeFlags() *FlagsStruct {
var f FlagsStruct
var defaultKubeconfig string
if usr, err := user.Current(); err == nil {
defaultKubeconfig = path.Join(usr.HomeDir, ".kube/config")
}
flag.StringVar(&f.Kubeconfig, "kubeconfig", defaultKubeconfig,
"Provide the path to the `kubeconfig` file you'd like to use for these tests. The `current-context` will be used.")
return &f
}
// Main is a main test runner
func Main(m *testing.M) {
// go1.13+ testing flags regression fix: https://github.com/golang/go/issues/31859
flag.Parse()
os.Exit(m.Run())
}
|
Rep. Donna Edwards represents Maryland's 4th Congressional District comprising portions of Prince George's and Montgomery Counties. She was sworn in as a member of the U.S. House of Representatives in the 110th Congress in June 2008, and began her first full-term in the 111th Congress in 2009. Rep. Edwards serves on the following Congressional committees: Transportation and Infrastructure; Science and Technology; and Standards of Official Conduct.
Rep. Edwards has enjoyed a diverse career as a nonprofit public interest and in the private sector on NASA's Spacelab project. Just prior to serving in Congress, she was the executive director of the Arca Foundation in Washington, DC. She was the co-founder and executive director of the National Network to End Domestic Violence where she led the effort to pass The Violence Against Women Act of 1994 that was signed into law by President Bill Clinton.
Rep. Edwards completed undergraduate studies at Wake Forest University and received her Juris Doctor from the University of New Hampshire School of Law. She is the proud mother of a son, who recently graduated from college. |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef msr_airlib_vehicles_RosFlightQuadX_hpp
#define msr_airlib_vehicles_RosFlightQuadX_hpp
#include "controllers/ros_flight/RosFlightDroneController.hpp"
#include "vehicles/MultiRotorParams.hpp"
#include "controllers/Settings.hpp"
namespace msr { namespace airlib {
class RosFlightQuadX : public MultiRotorParams {
public:
RosFlightQuadX(Settings& settings)
{
}
virtual void initializePhysics(const Environment* environment, const Kinematics::State* kinematics) override
{
//supply this to controller so it can use physics ground truth instead of state estimation (because ROSFlight doesn't have state estimation)
static_cast<RosFlightDroneController*>(getController())->initializePhysics(environment_, kinematics_);
}
protected:
virtual void setup(Params& params, SensorCollection& sensors, unique_ptr<DroneControllerBase>& controller) override
{
//set up arm lengths
//dimensions are for F450 frame: http://artofcircuits.com/product/quadcopter-frame-hj450-with-power-distribution
params.rotor_count = 4;
std::vector<real_T> arm_lengths(params.rotor_count, 0.2275f);
//set up mass
params.mass = 2.856f;
real_T motor_assembly_weight = 0.0800f; //weight for MT2212 motor for F450 frame
real_T box_mass = params.mass - params.rotor_count * motor_assembly_weight;
//set up dimensions of core body box
params.body_box.x() = 0.35f; params.body_box.y() = 0.20f; params.body_box.z() = 0.22f;
//TODO: support ground effects https://github.com/byu-magicc/fcu_sim/blob/RC1.0/fcu_sim/agents/mikey/mikey.yaml
//setup rotor params
//TODO: support arbitrary force vector generation: https://github.com/byu-magicc/fcu_sim/blob/RC1.0/fcu_sim/agents/mikey/mikey.yaml
params.rotor_params.max_thrust = 14; // 9.00225f;
params.rotor_params.max_torque = 0.12531f;
params.rotor_params.control_signal_filter_tc = 0.2164f;
//setup rotor poses
params.rotor_poses.clear();
params.rotor_poses.emplace_back(Vector3r(0.230f, 0.1926f, -0.0762f), Vector3r(0.0223925f, -0.02674078f, -0.99939157f), RotorTurningDirection::RotorTurningDirectionCCW);
params.rotor_poses.emplace_back(Vector3r(-0.205f, -0.1907f, -0.0762f), Vector3r(-0.02375588f, 0.02553726f, -0.99939157f), RotorTurningDirection::RotorTurningDirectionCCW);
params.rotor_poses.emplace_back(Vector3r(0.205f, -0.1907f, -0.0762f), Vector3r(0.02375588f, 0.02553726f, -0.99939157f), RotorTurningDirection::RotorTurningDirectionCW);
params.rotor_poses.emplace_back(Vector3r(-0.230f, 0.1926f, -0.0762f), Vector3r(-0.0223925f, -0.02674078f, -0.99939157f), RotorTurningDirection::RotorTurningDirectionCW);
params.inertia = Matrix3x3r::Zero();
params.inertia(0, 0) = 0.07f;
params.inertia(1, 1) = 0.08f;
params.inertia(2, 2) = 0.12f;
createStandardSensors(sensor_storage_, sensors, params.enabled_sensors);
createController(controller, sensors);
//leave everything else to defaults
}
private:
void createController(unique_ptr<DroneControllerBase>& controller, SensorCollection& sensors)
{
controller.reset(new RosFlightDroneController(&sensors, this));
}
private:
vector<unique_ptr<SensorBase>> sensor_storage_;
const Kinematics::State* kinematics_;
const Environment* environment_;
};
}} //namespace
#endif
|
import clsx from 'clsx';
import { NavLink } from 'react-router-dom';
import { parse } from 'query-string';
import { Typography, ListItem, makeStyles } from '@material-ui/core';
const useStyles = makeStyles((theme) => ({
item: {
display: 'flex',
textTransform: 'none',
width: '100%',
color: theme.palette.text.primary,
'&:hover': {
background: 'transparent',
color: theme.palette.primary.main,
},
},
itemActive: {
color: theme.palette.primary.main,
'& span': {
fontWeight: 700,
},
},
}));
const getComponentId = () =>
parse(window.location.search).component || 'introduction';
interface Props {
className?: string;
href: string;
title: string;
id: string;
}
const NavItem = ({
className,
href,
title,
id,
...rest
}: Props): JSX.Element => {
const classes = useStyles();
return (
<NavLink to={href}>
<ListItem
className={clsx(
classes.item,
getComponentId() === id ? classes.itemActive : '',
className,
)}
{...rest}
>
<Typography variant="body2" component="span">
{title}
</Typography>
</ListItem>
</NavLink>
);
};
export default NavItem;
|
Using a Smartphone Application to Promote Physical Activity Behavior Change Among Researchers From Human Movement Sciences: Qualitative Focus Group Study (Preprint) BACKGROUND Physical inactivity is the fourth leading risk factor for mortality worldwide. Currently, we count on technologies vertiginous advances, mostly in smartphone applications (apps), which showed to be useful in the introduction or expansion of physical activity. However, little attention has been paid to understanding the viewpoint of researchers from human movement sciences. OBJECTIVE To understand the perception of researchers from human movement sciences about using a smartphone app to promote physical activity behavior change. METHODS Ten physically active researchers (8 men and 2 women, mean age 32.4 years), users of the Pacer smartphone app participated in a focus group. The focus group lasted two hours and was mediated by the first author using guiding questions grouped into three categories: app features, barriers and facilitators to physical activity and challenges to behavior change. We performed a qualitative analysis, using the content analysis approach based on the audio records, using participants' verbal reports as a unit of analysis. RESULTS The focus group revealed that physical activity has always been present in the participants' lives. Participants identified changes in their patterns of physical activity over time, incorporating technologies during their exercise sessions. They realized that throughout life the goal in physical activity changed from improving performance to improving health. Participants' life history of physical activity was associated with their preference for the app that stimulated competitiveness. The possibility of competing and being rewarded by their achievements are essential motivational tools. In this way, participants appreciated the possibility of creating groups and ranking among them. As facilitators for physical activity, the group pointed to the adequate city infrastructure and the possibilities of exercising with someone and being challenged by colleagues. As barriers, participants listed a lack of safety and the need to take the smartphone for the app using. CONCLUSIONS Our study reporting challenges and possibilities to drive changes in physical activity behavior by using smartphone apps. The focus group provided important resources and characteristics that had a positive impact on the behavior change and should be considered, such as: the participants challenge of overcoming themselves, the opportunity to compete with their peers to achieve personal goals, and the possibility to measure the amount of physical activity. These finds can contribute to improving app development and user acceptability, especially regarding features based on behavior change techniques. Additionally, although this is a descriptive qualitative study with a limited sample, using a smartphone app seems to contribute to physical activity behavior change, even among participants with adequate levels of physical activity. |
Pope Francis canonized a pair of Portuguese siblings on Saturday — marking the centennial of their visions of the Virgin Mary.
The children's apparitions transformed rural town of Fatima into one of the world's most iconic Catholic shrines.
Some 500,000 faithful gathered in the town, north of Lisbon, for the ceremony, the Vatican said in a statement.
Francis named Francisco and Jacinta Marto as saints during a Mass to a loud round of applause from the pilgrim who converged on Fatima from around the world.
Francisco, 9, and 7-year-old Jacinta, along with their 10-year-old cousin, Lucia, reported that the Virgin Mary appeared to them six times beginning on March 13, 1917, while they grazed their sheep.
The chapel was built on the very spot where the apparitions occurred.
The three children said she confided in them three secrets — foretelling apocalyptic visions of hell, war, communism and the death of a pope — and urged them to pray for peace and a conversion from sin.
The church recognized the visions as authentic in 1930.
The Martos became the youngest-ever saints who didn't die as martyrs.
The siblings died two years after the visions during Europe's Spanish flu pandemic.
Lucia is on track for possible beatification, but her process couldn't start until after her 2005 death.
"It is amazing. It's like an answer to prayer, because I felt that always they would be canonized," said Agnes Walsh from Killarney, Ireland.
She said she prayed to Francisco Marto for 20 years, hoping her four daughters would meet "nice boys like Francisco."
"The four of them have met boys that are just beautiful. I couldn't ask for better, so he has answered all my prayers," she said.
The pontiff left Fatima on Saturday afternoon after riding through the town in his popemobile. Francis waved to the thousands lining the streets who cheered and shouted "Viva o Papa!" |
<filename>data/battle_animation_scripts.py
# List of addresses within the Battle Animation Scripts for the following commands which cause screen flashes:
# B0 - Set background palette color addition (absolute)
# B5 - Add color to background palette (relative)
# AF - Set background palette color subtraction (absolute)
# B6 - Subtract color from background palette (relative)
# By changing address + 1 to E0 (for absolute) or F0 (for relative), it causes no change to the background color (that is, no flash)
BATTLE_ANIMATION_FLASHES = {
"Goner": [
0x100088, # AF E0 - set background color subtraction to 0 (black)
0x10008C, # B6 61 - increase background color subtraction by 1 (red)
0x100092, # B6 31 - decrease background color subtraction by 1 (yellow)
0x100098, # B6 81 - increase background color subtraction by 1 (cyan)
0x1000A1, # B6 91 - decrease background color subtraction by 1 (cyan)
0x1000A3, # B6 21 - increase background color subtraction by 1 (yellow)
0x1000D3, # B6 8F - increase background color subtraction by 15 (cyan)
0x1000DF, # B0 FF - set background color addition to 31 (white)
0x100172, # B5 F2 - decrease background color addition by 2 (white)
],
"Final KEFKA Death": [
0x10023A, # B0 FF - set background color addition to 31 (white)
0x100240, # B5 F4 - decrease background color addition by 4 (white)
0x100248, # B0 FF - set background color addition to 31 (white)
0x10024E, # B5 F4 - decrease background color addition by 4 (white)
],
"Atom Edge": [ # Also True Edge
0x1003D0, # AF E0 - set background color subtraction to 0 (black)
0x1003DD, # B6 E1 - increase background color subtraction by 1 (black)
0x1003E6, # B6 E1 - increase background color subtraction by 1 (black)
0x10044B, # B6 F1 - decrease background color subtraction by 1 (black)
0x100457, # B6 F1 - decrease background color subtraction by 1 (black)
],
"Boss Death": [
0x100476, # B0 FF - set background color addition to 31 (white)
0x10047C, # B5 F4 - decrease background color addition by 4 (white)
0x100484, # B0 FF - set background color addition to 31 (white)
0x100497, # B5 F4 - decrease background color addition by 4 (white)
],
"Transform into Magicite": [
0x100F30, # B0 FF - set background color addition to 31 (white)
0x100F3F, # B5 F2 - decrease background color addition by 2 (white)
0x100F4E, # B5 F2 - decrease background color addition by 2 (white)
],
"Purifier": [
0x101340, # AF E0 - set background color subtraction to 0 (black)
0x101348, # B6 62 - increase background color subtraction by 2 (red)
0x101380, # B6 81 - increase background color subtraction by 1 (cyan)
0x10138A, # B6 F1 - decrease background color subtraction by 1 (black)
],
"Wall": [
0x10177B, # AF E0 - set background color subtraction to 0 (black)
0x10177F, # B6 61 - increase background color subtraction by 1 (red)
0x101788, # B6 51 - decrease background color subtraction by 1 (magenta)
0x101791, # B6 81 - increase background color subtraction by 1 (cyan)
0x10179A, # B6 31 - decrease background color subtraction by 1 (yellow)
0x1017A3, # B6 41 - increase background color subtraction by 1 (magenta)
0x1017AC, # B6 91 - decrease background color subtraction by 1 (cyan)
0x1017B5, # B6 51 - decrease background color subtraction by 1 (magenta)
],
"Pearl": [
0x10190E, # B0 E0 - set background color addition to 0 (white)
0x101913, # B5 E2 - increase background color addition by 2 (white)
0x10191E, # B5 F1 - decrease background color addition by 1 (white)
0x10193E, # B6 C2 - increase background color subtraction by 2 (blue)
],
"Ice 3": [
0x101978, # B0 FF - set background color addition to 31 (white)
0x10197B, # B5 F4 - decrease background color addition by 4 (white)
0x10197E, # B5 F4 - decrease background color addition by 4 (white)
0x101981, # B5 F4 - decrease background color addition by 4 (white)
0x101984, # B5 F4 - decrease background color addition by 4 (white)
0x101987, # B5 F4 - decrease background color addition by 4 (white)
0x10198A, # B5 F4 - decrease background color addition by 4 (white)
0x10198D, # B5 F4 - decrease background color addition by 4 (white)
0x101990, # B5 F4 - decrease background color addition by 4 (white)
],
"Fire 3": [
0x1019FA, # B0 9F - set background color addition to 31 (red)
0x101A1C, # B5 94 - decrease background color addition by 4 (red)
],
"Sleep": [
0x101A23, # AF E0 - set background color subtraction to 0 (black)
0x101A29, # B6 E1 - increase background color subtraction by 1 (black)
0x101A33, # B6 F1 - decrease background color subtraction by 1 (black)
],
"7-Flush": [
0x101B43, # AF E0 - set background color subtraction to 0 (black)
0x101B47, # B6 61 - increase background color subtraction by 1 (red)
0x101B4D, # B6 51 - decrease background color subtraction by 1 (magenta)
0x101B53, # B6 81 - increase background color subtraction by 1 (cyan)
0x101B59, # B6 31 - decrease background color subtraction by 1 (yellow)
0x101B5F, # B6 41 - increase background color subtraction by 1 (magenta)
0x101B65, # B6 91 - decrease background color subtraction by 1 (cyan)
0x101B6B, # B6 51 - decrease background color subtraction by 1 (magenta)
],
"H-Bomb": [
0x101BC5, # B0 E0 - set background color addition to 0 (white)
0x101BC9, # B5 E1 - increase background color addition by 1 (white)
0x101C13, # B5 F1 - decrease background color addition by 1 (white)
],
"Revenger": [
0x101C62, # AF E0 - set background color subtraction to 0 (black)
0x101C66, # B6 81 - increase background color subtraction by 1 (cyan)
0x101C6C, # B6 41 - increase background color subtraction by 1 (magenta)
0x101C72, # B6 91 - decrease background color subtraction by 1 (cyan)
0x101C78, # B6 21 - increase background color subtraction by 1 (yellow)
0x101C7E, # B6 51 - decrease background color subtraction by 1 (magenta)
0x101C84, # B6 81 - increase background color subtraction by 1 (cyan)
0x101C86, # B6 31 - decrease background color subtraction by 1 (yellow)
0x101C8C, # B6 91 - decrease background color subtraction by 1 (cyan)
],
"Phantasm": [
0x101DFD, # AF E0 - set background color subtraction to 0 (black)
0x101E03, # B6 E1 - increase background color subtraction by 1 (black)
0x101E07, # B0 FF - set background color addition to 31 (white)
0x101E0D, # B5 F4 - decrease background color addition by 4 (white)
0x101E15, # B6 E2 - increase background color subtraction by 2 (black)
0x101E1F, # B0 FF - set background color addition to 31 (white)
0x101E27, # B5 F4 - decrease background color addition by 4 (white)
0x101E2F, # B6 E2 - increase background color subtraction by 2 (black)
0x101E3B, # B6 F1 - decrease background color subtraction by 1 (black)
],
"TigerBreak": [
0x10240D, # B0 FF - set background color addition to 31 (white)
0x102411, # B5 F2 - decrease background color addition by 2 (white)
0x102416, # B5 F2 - decrease background color addition by 2 (white)
],
"Metamorph": [
0x102595, # AF E0 - set background color subtraction to 0 (black)
0x102599, # B6 61 - increase background color subtraction by 1 (red)
0x1025AF, # B6 71 - decrease background color subtraction by 1 (red)
],
"Cat Rain": [
0x102677, # B0 FF - set background color addition to 31 (white)
0x10267B, # B5 F1 - decrease background color addition by 1 (white)
],
"Charm": [
0x1026EE, # B0 FF - set background color addition to 31 (white)
0x1026FB, # B5 F1 - decrease background color addition by 1 (white)
],
"Mirager": [
0x102791, # B0 FF - set background color addition to 31 (white)
0x102795, # B5 F2 - decrease background color addition by 2 (white)
],
"SabreSoul": [
0x1027D3, # B0 FF - set background color addition to 31 (white)
0x1027DA, # B5 F2 - decrease background color addition by 2 (white)
],
"Back Blade": [
0x1028D3, # AF FF - set background color subtraction to 31 (black)
0x1028DF, # B6 F4 - decrease background color subtraction by 4 (black)
],
"RoyalShock": [
0x102967, # B0 FF - set background color addition to 31 (white)
0x10296B, # B5 F2 - decrease background color addition by 2 (white)
0x102973, # B5 F2 - decrease background color addition by 2 (white)
],
"Overcast": [
0x102C3A, # AF E0 - set background color subtraction to 0 (black)
0x102C55, # B6 E1 - increase background color subtraction by 1 (black)
0x102C8D, # B6 F1 - decrease background color subtraction by 1 (black)
0x102C91, # B6 F1 - decrease background color subtraction by 1 (black)
],
"Disaster": [
0x102CEE, # AF E0 - set background color subtraction to 0 (black)
0x102CF2, # B6 E1 - increase background color subtraction by 1 (black)
0x102D19, # B6 F1 - decrease background color subtraction by 1 (black)
],
"ForceField": [
0x102D3A, # B0 E0 - set background color addition to 0 (white)
0x102D48, # B5 E1 - increase background color addition by 1 (white)
0x102D64, # B5 F1 - decrease background color addition by 1 (white)
],
"Terra/Tritoch Lightning": [
0x102E05, # B0 E0 - set background color addition to 0 (white)
0x102E09, # B5 81 - increase background color addition by 1 (red)
0x102E24, # B5 61 - increase background color addition by 1 (cyan)
],
"S. Cross": [
0x102EDA, # AF E0 - set background color subtraction to 0 (black)
0x102EDE, # B6 E2 - increase background color subtraction by 2 (black)
0x102FA8, # B6 F2 - decrease background color subtraction by 2 (black)
0x102FB1, # B0 E0 - set background color addition to 0 (white)
0x102FBE, # B5 E2 - increase background color addition by 2 (white)
0x102FD9, # B5 F2 - decrease background color addition by 2 (white)
],
"Mind Blast": [
0x102FED, # B0 E0 - set background color addition to 0 (white)
0x102FF1, # B5 81 - increase background color addition by 1 (red)
0x102FF7, # B5 91 - decrease background color addition by 1 (red)
0x102FF9, # B5 21 - increase background color addition by 1 (blue)
0x102FFF, # B5 31 - decrease background color addition by 1 (blue)
0x103001, # B5 C1 - increase background color addition by 1 (yellow)
0x103007, # B5 91 - decrease background color addition by 1 (red)
0x10300D, # B5 51 - decrease background color addition by 1 (green)
0x103015, # B5 E2 - increase background color addition by 2 (white)
0x10301F, # B5 F1 - decrease background color addition by 1 (white)
],
"Flare Star": [
0x1030F5, # B0 E0 - set background color addition to 0 (white)
0x103106, # B5 81 - increase background color addition by 1 (red)
0x10310D, # B5 E2 - increase background color addition by 2 (white)
0x103123, # B5 71 - decrease background color addition by 1 (cyan)
0x10312E, # B5 91 - decrease background color addition by 1 (red)
],
"Quasar": [
0x1031D2, # AF E0 - set background color subtraction to 0 (black)
0x1031D6, # B6 E1 - increase background color subtraction by 1 (black)
0x1031FA, # B6 F1 - decrease background color subtraction by 1 (black)
],
"R.Polarity": [
0x10328B, # B0 FF - set background color addition to 31 (white)
0x103292, # B5 F1 - decrease background color addition by 1 (white)
],
"Rippler": [
0x1033C6, # B0 FF - set background color addition to 31 (white)
0x1033CA, # B5 F1 - decrease background color addition by 1 (white)
],
"Step Mine": [
0x1034D9, # B0 FF - set background color addition to 31 (white)
0x1034E0, # B5 F4 - decrease background color addition by 4 (white)
],
"L.5 Doom": [
0x1035E6, # B0 FF - set background color addition to 31 (white)
0x1035F6, # B5 F4 - decrease background color addition by 4 (white)
],
"Megazerk": [
0x103757, # B0 80 - set background color addition to 0 (red)
0x103761, # B5 82 - increase background color addition by 2 (red)
0x10378F, # B5 92 - decrease background color addition by 2 (red)
0x103795, # B5 92 - decrease background color addition by 2 (red)
0x10379B, # B5 92 - decrease background color addition by 2 (red)
0x1037A1, # B5 92 - decrease background color addition by 2 (red)
0x1037A7, # B5 92 - decrease background color addition by 2 (red)
0x1037AD, # B5 92 - decrease background color addition by 2 (red)
0x1037B3, # B5 92 - decrease background color addition by 2 (red)
0x1037B9, # B5 92 - decrease background color addition by 2 (red)
0x1037C0, # B5 92 - decrease background color addition by 2 (red)
],
"Schiller": [
0x103819, # B0 FF - set background color addition to 31 (white)
0x10381D, # B5 F4 - decrease background color addition by 4 (white)
],
"WallChange": [
0x10399E, # B0 FF - set background color addition to 31 (white)
0x1039A3, # B5 F2 - decrease background color addition by 2 (white)
0x1039A9, # B5 F2 - decrease background color addition by 2 (white)
0x1039AF, # B5 F2 - decrease background color addition by 2 (white)
0x1039B5, # B5 F2 - decrease background color addition by 2 (white)
0x1039BB, # B5 F2 - decrease background color addition by 2 (white)
0x1039C1, # B5 F2 - decrease background color addition by 2 (white)
0x1039C7, # B5 F2 - decrease background color addition by 2 (white)
0x1039CD, # B5 F2 - decrease background color addition by 2 (white)
0x1039D4, # B5 F2 - decrease background color addition by 2 (white)
],
"Ultima": [
0x1056CB, # AF 60 - set background color subtraction to 0 (red)
0x1056CF, # B6 C2 - increase background color subtraction by 2 (blue)
0x1056ED, # B0 FF - set background color addition to 31 (white)
0x1056F5, # B5 F1 - decrease background color addition by 1 (white)
],
"Bolt 3": [ # Also Giga Volt
0x10588E, # B0 FF - set background color addition to 31 (white)
0x105893, # B5 F4 - decrease background color addition by 4 (white)
0x105896, # B5 F4 - decrease background color addition by 4 (white)
0x105899, # B5 F4 - decrease background color addition by 4 (white)
0x10589C, # B5 F4 - decrease background color addition by 4 (white)
0x1058A1, # B5 F4 - decrease background color addition by 4 (white)
0x1058A6, # B5 F4 - decrease background color addition by 4 (white)
0x1058AB, # B5 F4 - decrease background color addition by 4 (white)
0x1058B0, # B5 F4 - decrease background color addition by 4 (white)
],
"X-Zone": [
0x105A5D, # B0 FF - set background color addition to 31 (white)
0x105A6A, # B5 F2 - decrease background color addition by 2 (white)
0x105A79, # B5 F2 - decrease background color addition by 2 (white)
],
"Dispel": [
0x105DC2, # B0 FF - set background color addition to 31 (white)
0x105DC9, # B5 F1 - decrease background color addition by 1 (white)
0x105DD2, # B5 F1 - decrease background color addition by 1 (white)
0x105DDB, # B5 F1 - decrease background color addition by 1 (white)
0x105DE4, # B5 F1 - decrease background color addition by 1 (white)
0x105DED, # B5 F1 - decrease background color addition by 1 (white)
],
"Muddle": [ # Also L.3 Muddle, Confusion
0x1060EA, # B0 FF - set background color addition to 31 (white)
0x1060EE, # B5 F1 - decrease background color addition by 1 (white)
],
"Shock": [
0x1068BE, # B0 FF - set background color addition to 31 (white)
0x1068D0, # B5 F1 - decrease background color addition by 1 (white)
],
"Bum Rush": [
0x106C3E, # B0 E0 - set background color addition to 0 (white)
0x106C47, # B0 E0 - set background color addition to 0 (white)
0x106C53, # B0 E0 - set background color addition to 0 (white)
0x106C7E, # B0 FF - set background color addition to 31 (white)
0x106C87, # B0 E0 - set background color addition to 0 (white)
0x106C95, # B0 FF - set background color addition to 31 (white)
0x106C9E, # B0 E0 - set background color addition to 0 (white)
],
"Stunner": [
0x1071BA, # B0 20 - set background color addition to 0 (blue)
0x1071C1, # B5 24 - increase background color addition by 4 (blue)
0x1071CA, # B5 24 - increase background color addition by 4 (blue)
0x1071D5, # B5 24 - increase background color addition by 4 (blue)
0x1071DE, # B5 24 - increase background color addition by 4 (blue)
0x1071E9, # B5 24 - increase background color addition by 4 (blue)
0x1071F2, # B5 24 - increase background color addition by 4 (blue)
0x1071FD, # B5 24 - increase background color addition by 4 (blue)
0x107206, # B5 24 - increase background color addition by 4 (blue)
0x107211, # B5 24 - increase background color addition by 4 (blue)
0x10721A, # B5 24 - increase background color addition by 4 (blue)
0x10725A, # B5 32 - decrease background color addition by 2 (blue)
],
"Quadra Slam": [ # Also Quadra Slice
0x1073DC, # B0 FF - set background color addition to 31 (white)
0x1073EE, # B5 F2 - decrease background color addition by 2 (white)
0x1073F3, # B5 F2 - decrease background color addition by 2 (white)
0x107402, # B0 5F - set background color addition to 31 (green)
0x107424, # B5 54 - decrease background color addition by 4 (green)
0x107429, # B5 54 - decrease background color addition by 4 (green)
0x107436, # B0 3F - set background color addition to 31 (blue)
0x107458, # B5 34 - decrease background color addition by 4 (blue)
0x10745D, # B5 34 - decrease background color addition by 4 (blue)
0x107490, # B0 9F - set background color addition to 31 (red)
0x1074B2, # B5 94 - decrease background color addition by 4 (red)
0x1074B7, # B5 94 - decrease background color addition by 4 (red)
],
"Slash": [
0x1074F4, # B0 FF - set background color addition to 31 (white)
0x1074FD, # B5 F2 - decrease background color addition by 2 (white)
0x107507, # B5 F2 - decrease background color addition by 2 (white)
],
"Flash": [
0x107850, # B0 FF - set background color addition to 31 (white)
0x10785C, # B5 F1 - decrease background color addition by 1 (white)
]
}
|
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
* Copyright @ 2015 Atlassian Pty Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.java.sip.communicator.service.notification;
import java.util.*;
/**
* Object to cache fired notifications before all handler implementations are
* ready registered.
*
* @author <NAME>
*/
public class NotificationData
{
/**
* The name/key of the <tt>NotificationData</tt> extra which is provided to
* {@link CommandNotificationHandler#execute(CommandNotificationAction,
* Map)} i.e. a <tt>Map<String,String></tt> which is known by the
* (argument) name <tt>cmdargs</tt>.
*/
public static final String COMMAND_NOTIFICATION_HANDLER_CMDARGS_EXTRA
= "CommandNotificationHandler.cmdargs";
/**
* The name/key of the <tt>NotificationData</tt> extra which is provided to
* {@link PopupMessageNotificationHandler#popupMessage(
* PopupMessageNotificationAction, String, String, byte[], Object)} i.e. an
* <tt>Object</tt> which is known by the (argument) name <tt>tag</tt>.
*/
public static final String POPUP_MESSAGE_HANDLER_TAG_EXTRA
= "PopupMessageNotificationHandler.tag";
/**
* The name/key of the <tt>NotificationData</tt> extra which is provided to
* {@link SoundNotificationHandler} i.e. a <tt>Callable<Boolean></tt>
* which is known as the condition which determines whether looping sounds
* are to continue playing.
*/
public static final String SOUND_NOTIFICATION_HANDLER_LOOP_CONDITION_EXTRA
= "SoundNotificationHandler.loopCondition";
private final String eventType;
/**
* The {@link NotificationHandler}-specific extras provided to this
* instance. The keys are among the <tt>XXX_EXTRA</tt> constants defined by
* the <tt>NotificationData</tt> class.
*/
private final Map<String, Object> extras;
private final byte[] icon;
private final String message;
private final String title;
/**
* Creates a new instance of this class.
*
* @param eventType the type of the event that we'd like to fire a
* notification for.
* @param title the title of the given message
* @param message the message to use if and where appropriate (e.g. with
* systray or log notification.)
* @param icon the icon to show in the notification if and where appropriate
* @param extras additional/extra {@link NotificationHandler}-specific data
* to be provided by the new instance to the various
* <tt>NotificationHandler</tt>s
*/
NotificationData(
String eventType,
String title,
String message,
byte[] icon,
Map<String, Object> extras)
{
this.eventType = eventType;
this.title = title;
this.message = message;
this.icon = icon;
this.extras = extras;
}
/**
* Gets the type of the event that we'd like to fire a notification for
*
* @return the eventType
*/
public String getEventType()
{
return eventType;
}
/**
* Gets the {@link NotificationHandler}-specific extras provided to this
* instance.
*
* @return the <tt>NotificationHandler</tt>-specific extras provided to this
* instance. The keys are among the <tt>XXX_EXTRA</tt> constants defined by
* the <tt>NotificationData</tt> class
*/
Map<String, Object> getExtras()
{
return Collections.unmodifiableMap(extras);
}
/**
* Gets the {@link NotificationHandler}-specific extra provided to this
* instance associated with a specific key.
*
* @param key the key whose associated <tt>NotificationHandler</tt>-specific
* extra is to be returned. Well known keys are defined by the
* <tt>NotificationData</tt> class as the <tt>XXX_EXTRA</tt> constants.
* @return the <tt>NotificationHandler</tt>-specific extra provided to this
* instance associated with the specified <tt>key</tt>
*/
public Object getExtra(String key)
{
return (extras == null) ? null : extras.get(key);
}
/**
* Gets the icon to show in the notification if and where appropriate.
*
* @return the icon
*/
byte[] getIcon()
{
return icon;
}
/**
* Gets the message to use if and where appropriate (e.g. with systray or
* log notification).
*
* @return the message
*/
String getMessage()
{
return message;
}
/**
* Gets the title of the given message.
*
* @return the title
*/
String getTitle()
{
return title;
}
}
|
Csárdás (Liszt)
The three csárdás that Franz Liszt wrote in 1881-2 and 1884 are solo piano pieces based on the Hungarian dance form of the same name. Liszt treats the dance form itself much less freely than he did much earlier with the verbunkos in the Hungarian Rhapsodies, and the material itself remains more specifically Hungarian than gypsy in thematic material. Their spare lines, angular rhythms and advanced harmonies show these pieces to be direct ancestors of the compositions of Béla Bartók. Because of these attributes, the csárdás are considered by Liszt scholars among the more interesting of the composer's late output.
One potential pitfall in discussing these works is labeling them as atonal on the basis of hearing strange sonorities at the surface of the music. The Csárdás macabre, for instance, is solidly based on compositional procedures consistent with Liszt's earlier style. The music focuses on variant forms of the mediant with concomitant contrast of sharp and flat key areas—in this case F major, F-sharp minor and G-flat major.
Csárdás macabre, S.224 (1881-82)
This is perhaps the best-known of the three csárdás. The piece is written in a miniature sonata form, with the bare fifths at the opening without precedent in Liszt's output. Still more intriguing is the second-subject stage of the structure; this is either a parody of the Dies irae or a quotation from the Hungarian folk song, "Ég a kunyhó, ropog a nád." Both theories have their advocates. The composer did not indicate what he meant, though he did write on the manuscript after he had finished it, "May one write or listen to such a thing?" A favorite question of some critics is whether the fifth of the opening bar is a flattened supertonic appoggiatura or as an actual tonic. Such tonal ambiguities become common in Liszt's late works.
1. Csárdás
Less known than either of the other dances, this csárdás is a short Allegro beginning as though it would be in A minor. It passes to A major, then ends quietly but unsettled on F-sharp minor after much sequential modulation.
2. Csárdás obstinée
This csárdás begins with a repeated F-sharp, essentially taking up where the first dance left off, before an ostinato accompaniment begins. An F-sharp major triad in the left hand is contrasted with a falling phrase beginning with an A natural in the right hand. The piece on the whole is written in B minor-major, with major and minor chords being struck simultaneously, a device Liszt came to use with increasing frequency. Before the coda, the theme is transformed in B major in repeated octaves. Some critics consider this work more interesting musically than its more famous cousin, the Csárdás macabre. The piece is, for lack of a better term, obsessed with a four-note motif presented at the beginning of the piece, and the work's tonal excursions into the mediant and submediant place the music procedurally somewhere between Schumann and Mahler.
The first recordings of these two Csárdás was by France Clidat in her traversal of Liszt's works for Decca. |
<filename>src/helpers/__init__.py
import os
from helpers import configurations
|
/*
* CLinePtr::RpAdvanceCpSL(cch)
*
* @mfunc
* move this line pointer forward or backward on the line
*
* @rdesc
* TRUE iff could advance cch chars within current line
*/
BOOL CLinePtr::RpAdvanceCpSL(
LONG cch)
{
TRACEBEGIN(TRCSUBSYSDISP, TRCSCOPEINTERN, "CLinePtr::RpAdvanceCpSL");
Assert(!_pRuns);
if(!_pLine)
return FALSE;
_ich += cch;
if(_ich < 0)
{
_ich = 0;
return FALSE;
}
if(_ich > _pLine->_cch)
{
_ich = _pLine->_cch;
return FALSE;
}
return TRUE;
} |
Even the resolve of some vegetarians can crumble when faced with a juicy cheeseburger after a long night of drinking, according to a new survey.
The survey of 1,789 Brits who claimed to be vegetarians found that 37% of the respondents admitted to eating meat after having too much to drink. The survey by the discount website VoucherCodesPro found that while some break the rules, the majority of vegetarians stick to their dietary restrictions, Fox News reported.
Sixty-three percent of vegetarians reported that they did not eat meat regardless of how much they drank.
When asked how often the rule breakers ate meat, the responses varied --- 34% said every time they drink, 26% said fairly often, 22% said rarely, and 18% said occasionally. |
I. Field of the Invention
This invention relates generally to treatments for cancers and, more specifically, to small molecules that induce cell death and/or suppress cell growth of cancer cells, particularly Ras-mutant and tumorigenic cancer cells.
II. Background
Mutations that lead to activation of three oncogenic ras genes, R-ras, K-ras, and N-ras, were frequently found in a variety of tumor types, including 90% pancreatic, 50% colorectal and 50% lung adenocarcinomas, 50% of thyroid tumors, and 30% myeloid leukemia, but these mutations are not present in normal cells. Of the three ras genes, K-ras mutations are the most frequently found in tumors, including adenocarcinomas of pancreas (70-90%), colon (50%) and lung (50%). Mouse strains carrying alleles of K-ras that can be activated by spontaneous recombination are highly predisposed to a range of tumor types, predominantly early onset lung cancer. Addition of HRAS(V12) or KRAS(V12) mutant gene can be sufficient to render human ovarian surface epithelial cells immortalized with the catalytic subunit of human telomerase reverse transcriptase (hTERT) and the SV40 early genomic region to form tumors in nude mice. Moreover, withdrawal of doxycycline-inducible oncogenic 1H-ras or K-ras can cause apoptosis in tumor cells and regression of tumors of transgenic mice. Therefore, mutations of ras genes play important roles in tumorigenesis and maintenance of malignant phenotypes, and these mutations of ras genes serve as important targets of anticancer therapy. Moreover, because active ras functions are required for replication of some viruses, such as reovirus, hepatitis B virus, herpes virus, and coxsaclievirus and some adenovirus, agents that suppress ras function may also be used as antiviral therapeutics.
Because ras proteins have to be translocated to the inner leaflet of the plasma membrane in order for them to interact with a diversity of membrane receptors and modulate signal transduction of a variety signaling pathways that govern cell growth, proliferation, differentiation and death, agents that interrupt posttranslational modifications required for ras trafficking to the plasma membrane have been intensively investigated for suppression of ras function. For example, farnesyltransferase inhibitors (FTIs) have been intensively investigated in preclinical and clinical cancer therapy. This approach, however, may be effective in preventing the trafficking of H-ras to the plasma membrane, but not K-ras and N-ras, because in the presence of FTIs, N- and K-Ras proteins are geranylgeranylated and transferred to the membrane. Clinical trials from several phase II and phase III studies also showed that FTIs fail to show significant single-agent activity in lung cancer, pancreatic cancer, colorectal cancer, bladder cancer and prostate cancer. Thus, novel compounds that specifically induce cell death or suppress cell proliferation of Ras mutant cells are desirable for anticancer therapy.
A major challenge in cancer therapy is to identify therapeutic agents that are highly specific for malignant cells or malignant tissues. Because malignant cells have the same metabolic pathways as normal cells, and because they are adopted as “self” cells despite the numerous mutations they contain, all anticancer drugs used today affect cellular targets that are shared by normal and cancerous cells. As a result, the use of conventional chemotherapy and radiation therapy is usually limited by a low therapeutic index. In fact, most anticancer drugs used today were discovered because of their ability to kill rapidly dividing cancer cells in vitro and thus are also toxic to rapidly dividing normal cells, such as bone-marrow hematopoietic precursors and gastrointestinal mucosal epithelial cells (Kaelin, 2005). Nevertheless, because of genetic and epigenetic changes in cancer cells, it is possible to identify tumor-selective cytotoxic agents by synthetic lethality screening for compounds that kill cancer cells but not normal cells. |
Parametric study of alternative EV1 powertrains The General Motors (GM) EV1 is an electric vehicle originally powered by either a PbA or NiMh battery pack. This paper examines the possibility of alternative powertrain configurations. These alternatives include an ultracapacitor (UC) storage system, fuel cell system with UC storage, and a fuel cell system with a NiMh battery pack. The configurations were simulated using ADVISOR. Parametric tests were performed by varying the size of the energy storage systems. The study of these combinations is followed by an examination of the current art of the hybrid energy storage topologies used to combine battery and ultracapacitor storage. These topologies include passive parallel, active parallel, cascade parallel, and multi-input bidirectional converter. |
from typing import Optional
import torch
from torch import nn
from nnunet.network_architecture.initialization import InitWeights_He
from nnunet.network_architecture.segnet import SegNet, SmallSegNet, SegNetNPool
from nnunet.training.network_training.competitions_with_custom_Trainers.BraTS2020.nnUNetTrainerV2BraTSRegions import (
nnUNetTrainerV2BraTSRegions,
)
from nnunet.training.network_training.nnUNet_variants.loss_function.nnUNetTrainerV2_focalLoss import (
FocalLossMultiClass,
)
from nnunet.training.loss_functions.dice_loss import Tversky_and_CE_loss
from batchgenerators.utilities.file_and_folder_operations import maybe_mkdir_p, join
from nnunet.training.dataloading.dataset_loading import unpack_dataset
import numpy as np
from nnunet.training.data_augmentation.data_augmentation_moreDA import (
get_moreDA_augmentation,
)
from nnunet.training.loss_functions.deep_supervision import MultipleOutputLoss2
from nnunet.network_architecture.neural_network import SegmentationNetwork
#####
# Basic Segnet Classes
#####
class nnUNetTrainerV2BraTSSegnet(nnUNetTrainerV2BraTSRegions):
"""
SegNet trainer class. Implements training procedure using SegNet instead of generic UNet.
Train model with:
nnUNet_train 3d_fullres nnUNetTrainerV2BraTSSegnet Task500_Brats21 4 --npz
"""
def __init__(
self,
plans_file,
fold,
output_folder,
dataset_directory,
batch_dice,
stage,
unpack_data,
deterministic,
fp16,
grid_num_conv_per_stage: Optional[int] = None, # Grid: Number of convolutions
grid_num_pool: Optional[int] = None, # Grid: Number of poolings
):
super().__init__(
plans_file,
fold,
output_folder=output_folder,
dataset_directory=dataset_directory,
batch_dice=batch_dice,
stage=stage,
unpack_data=unpack_data,
deterministic=deterministic,
fp16=fp16,
)
self.grid_num_conv_per_stage = grid_num_conv_per_stage
self.grid_num_pool = grid_num_pool
def initialize_network(self):
"""
- momentum 0.99
- SGD instead of Adam
- self.lr_scheduler = None because we do poly_lr
- deep supervision = True
- i am sure I forgot something here
Known issue: forgot to set neg_slope=0 in InitWeights_He; should not make a difference though
:return:
"""
if self.threeD:
conv_op = nn.Conv3d
dropout_op = nn.Dropout3d
norm_op = nn.InstanceNorm3d
else:
conv_op = nn.Conv2d
dropout_op = nn.Dropout2d
norm_op = nn.InstanceNorm2d
norm_op_kwargs = {"eps": 1e-5, "affine": True}
dropout_op_kwargs = {"p": 0, "inplace": True}
net_nonlin = nn.LeakyReLU
net_nonlin_kwargs = {"negative_slope": 1e-2, "inplace": True}
# NJ all args as for GenericUNet. But convolutional_pooling and convolutional_upsampling set to False!!
self.network = SegNet(
self.num_input_channels,
self.base_num_features,
self.num_classes,
len(self.net_num_pool_op_kernel_sizes)
if self.grid_num_pool is None
else self.grid_num_pool,
num_conv_per_stage=self.conv_per_stage
if self.grid_num_conv_per_stage is None
else self.grid_num_conv_per_stage,
feat_map_mul_on_downscale=2,
conv_op=conv_op,
norm_op=norm_op,
norm_op_kwargs=norm_op_kwargs,
dropout_op=dropout_op,
dropout_op_kwargs=dropout_op_kwargs,
nonlin=net_nonlin,
nonlin_kwargs=net_nonlin_kwargs,
deep_supervision=True,
dropout_in_localization=False,
final_nonlin=lambda x: x,
weightInitializer=InitWeights_He(1e-2),
upscale_logits=False,
convolutional_pooling=False,
convolutional_upsampling=False,
)
if torch.cuda.is_available():
self.network.cuda()
# NJ Set inference_apply_nonlin as in nnUNetTrainerV2BraTSRegions
self.network.inference_apply_nonlin = nn.Sigmoid()
class nnUNetTrainerV2BraTSSmallSegnet(nnUNetTrainerV2BraTSRegions):
"""
SegNet trainer class. Implements training procedure using SegNet instead of generic UNet.
Train model with:
nnUNet_train 3d_fullres nnUNetTrainerV2BraTSSegnet Task500_Brats21 4 --npz
"""
def __init__(
self,
plans_file,
fold,
output_folder,
dataset_directory,
batch_dice,
stage,
unpack_data,
deterministic,
fp16,
):
super().__init__(
plans_file,
fold,
output_folder=output_folder,
dataset_directory=dataset_directory,
batch_dice=batch_dice,
stage=stage,
unpack_data=unpack_data,
deterministic=deterministic,
fp16=fp16,
)
def initialize_network(self):
"""
- momentum 0.99
- SGD instead of Adam
- self.lr_scheduler = None because we do poly_lr
- deep supervision = True
- i am sure I forgot something here
Known issue: forgot to set neg_slope=0 in InitWeights_He; should not make a difference though
:return:
"""
if self.threeD:
conv_op = nn.Conv3d
dropout_op = nn.Dropout3d
norm_op = nn.InstanceNorm3d
else:
conv_op = nn.Conv2d
dropout_op = nn.Dropout2d
norm_op = nn.InstanceNorm2d
norm_op_kwargs = {"eps": 1e-5, "affine": True}
dropout_op_kwargs = {"p": 0, "inplace": True}
net_nonlin = nn.LeakyReLU
net_nonlin_kwargs = {"negative_slope": 1e-2, "inplace": True}
# NJ all args as for GenericUNet. But convolutional_pooling and convolutional_upsampling set to False!!
self.network = SmallSegNet(
self.num_input_channels,
self.base_num_features,
self.num_classes,
len(self.net_num_pool_op_kernel_sizes),
num_conv_per_stage=self.conv_per_stage,
feat_map_mul_on_downscale=2,
conv_op=conv_op,
norm_op=norm_op,
norm_op_kwargs=norm_op_kwargs,
dropout_op=dropout_op,
dropout_op_kwargs=dropout_op_kwargs,
nonlin=net_nonlin,
nonlin_kwargs=net_nonlin_kwargs,
deep_supervision=True,
dropout_in_localization=False,
final_nonlin=lambda x: x,
weightInitializer=InitWeights_He(1e-2),
pool_op_kernel_sizes=self.net_num_pool_op_kernel_sizes,
conv_kernel_sizes=self.net_conv_kernel_sizes,
upscale_logits=False,
convolutional_pooling=False,
convolutional_upsampling=False,
)
if torch.cuda.is_available():
self.network.cuda()
# NJ Set inference_apply_nonlin as in nnUNetTrainerV2BraTSRegions
self.network.inference_apply_nonlin = nn.Sigmoid()
#####
# Classes with different loss
#####
class nnUNetTrainerV2SegnetFocal(nnUNetTrainerV2BraTSSegnet):
def __init__(
self,
plans_file,
fold,
output_folder=None,
dataset_directory=None,
batch_dice=True,
stage=None,
unpack_data=True,
deterministic=True,
fp16=False,
):
super().__init__(
plans_file,
fold,
output_folder,
dataset_directory,
batch_dice,
stage,
unpack_data,
deterministic,
fp16,
)
self.loss = FocalLossMultiClass()
class nnUNetTrainerV2SegNetTversky(nnUNetTrainerV2BraTSSegnet):
def __init__(
self,
plans_file,
fold,
output_folder,
dataset_directory,
batch_dice,
stage,
unpack_data,
deterministic,
fp16,
):
super(nnUNetTrainerV2SegNetTversky, self).__init__(
plans_file,
fold,
output_folder=output_folder,
dataset_directory=dataset_directory,
batch_dice=batch_dice,
stage=stage,
unpack_data=unpack_data,
deterministic=deterministic,
fp16=fp16,
)
self.loss = Tversky_and_CE_loss(
{"batch": self.batch_dice, "smooth": 1e-5, "do_bg": False}, {}
)
#####
# Classes for grid search of segnet size.
# Parameters incluce number of pooling operations (5, 6) and number of convolutions (2, 3, 4).
#####
class nnUNetTrainerSegNetCustomSize(nnUNetTrainerV2BraTSSegnet):
"""
Base class for grid search with pooling operations and number of convolutions.
This class is necesarry to override the initialize function.
Changes made compared to nnUNetTrainerV2BraTSRegions.initialize (See change 0.0.1):
- Set 'net_pool_per_axis' to list of 3 * number of poolings. E.g. number poolings = 5 results in [5, 5, 5]
- Set 'net_conv_kernel_sizes' to list of ([3] * dimenstionality) * number poolings + 1.
E.g. number poolings = 3 in 3D results in [[3, 3, 3], [3, 3, 3], [3, 3, 3]]
- Set 'net_num_pool_op_kernel_sizes' like 'net_conv_kernel_sizes'
except with kernel size = 2 instead of 3 and only number of poolings (instead number of poolings +1 )
"""
def __init__(
self,
plans_file,
fold,
output_folder,
dataset_directory,
batch_dice,
stage,
unpack_data,
deterministic,
fp16,
grid_num_conv_per_stage,
grid_num_pool,
):
super().__init__(
plans_file,
fold,
output_folder,
dataset_directory,
batch_dice,
stage,
unpack_data,
deterministic,
fp16,
grid_num_conv_per_stage=grid_num_conv_per_stage,
grid_num_pool=grid_num_pool,
)
def initialize(self, training=True, force_load_plans=False):
"""
this is a copy of nnUNetTrainerV2's initialize. We only add the regions to the data augmentation
:param training:
:param force_load_plans:
:return:
"""
if not self.was_initialized:
maybe_mkdir_p(self.output_folder)
if force_load_plans or (self.plans is None):
self.load_plans_file()
self.process_plans(self.plans)
# ################################## #
# Change 0.0.1. #
# Change poolings and kernel sizes #
# ################################## #
self.net_pool_per_axis = [self.grid_num_pool for _ in range(3)]
self.net_conv_kernel_sizes = [[3] * len(self.net_pool_per_axis)] * (
max(self.net_pool_per_axis) + 1
)
self.net_num_pool_op_kernel_sizes = [[2] * len(self.net_pool_per_axis)] * (
max(self.net_pool_per_axis)
)
# ################################### #
# END CHANGE #
# ################################### #
self.setup_DA_params()
################# Here we wrap the loss for deep supervision ############
# we need to know the number of outputs of the network
net_numpool = len(self.net_num_pool_op_kernel_sizes)
# we give each output a weight which decreases exponentially (division by 2) as the resolution decreases
# this gives higher resolution outputs more weight in the loss
weights = np.array([1 / (2 ** i) for i in range(net_numpool)])
# we don't use the lowest 2 outputs. Normalize weights so that they sum to 1
mask = np.array(
[True if i < net_numpool - 1 else False for i in range(net_numpool)]
)
weights[~mask] = 0
weights = weights / weights.sum()
self.ds_loss_weights = weights
# now wrap the loss
self.loss = MultipleOutputLoss2(self.loss, self.ds_loss_weights)
################# END ###################
self.folder_with_preprocessed_data = join(
self.dataset_directory,
self.plans["data_identifier"] + "_stage%d" % self.stage,
)
if training:
self.dl_tr, self.dl_val = self.get_basic_generators()
if self.unpack_data:
print("unpacking dataset")
unpack_dataset(self.folder_with_preprocessed_data)
print("done")
else:
print(
"INFO: Not unpacking data! Training may be slow due to that. Pray you are not using 2d or you "
"will wait all winter for your model to finish!"
)
self.tr_gen, self.val_gen = get_moreDA_augmentation(
self.dl_tr,
self.dl_val,
self.data_aug_params["patch_size_for_spatialtransform"],
self.data_aug_params,
deep_supervision_scales=self.deep_supervision_scales,
regions=self.regions,
)
self.print_to_log_file(
"TRAINING KEYS:\n %s" % (str(self.dataset_tr.keys())),
also_print_to_console=False,
)
self.print_to_log_file(
"VALIDATION KEYS:\n %s" % (str(self.dataset_val.keys())),
also_print_to_console=False,
)
else:
pass
self.initialize_network()
self.initialize_optimizer_and_scheduler()
assert isinstance(self.network, (SegmentationNetwork, nn.DataParallel))
else:
self.print_to_log_file(
"self.was_initialized is True, not running self.initialize again"
)
self.was_initialized = True
class nnUNetTrainerSegNetPool5Conv3(nnUNetTrainerSegNetCustomSize):
def __init__(
self,
plans_file,
fold,
output_folder,
dataset_directory,
batch_dice,
stage,
unpack_data,
deterministic,
fp16,
grid_num_conv_per_stage=3,
grid_num_pool=5,
):
super().__init__(
plans_file,
fold,
output_folder,
dataset_directory,
batch_dice,
stage,
unpack_data,
deterministic,
fp16,
grid_num_conv_per_stage=grid_num_conv_per_stage,
grid_num_pool=grid_num_pool,
)
class nnUNetTrainerSegNetPool5Conv4(nnUNetTrainerSegNetCustomSize):
def __init__(
self,
plans_file,
fold,
output_folder,
dataset_directory,
batch_dice,
stage,
unpack_data,
deterministic,
fp16,
grid_num_conv_per_stage=4,
grid_num_pool=5,
):
super().__init__(
plans_file,
fold,
output_folder,
dataset_directory,
batch_dice,
stage,
unpack_data,
deterministic,
fp16,
grid_num_conv_per_stage=grid_num_conv_per_stage,
grid_num_pool=grid_num_pool,
)
class nnUNetTrainerSegNetPool6Conv2(nnUNetTrainerSegNetCustomSize):
def __init__(
self,
plans_file,
fold,
output_folder,
dataset_directory,
batch_dice,
stage,
unpack_data,
deterministic,
fp16,
grid_num_conv_per_stage=2,
grid_num_pool=6,
):
super().__init__(
plans_file,
fold,
output_folder,
dataset_directory,
batch_dice,
stage,
unpack_data,
deterministic,
fp16,
grid_num_conv_per_stage=grid_num_conv_per_stage,
grid_num_pool=grid_num_pool,
)
class nnUNetTrainerSegNetPool6Conv3(nnUNetTrainerSegNetCustomSize):
def __init__(
self,
plans_file,
fold,
output_folder,
dataset_directory,
batch_dice,
stage,
unpack_data,
deterministic,
fp16,
grid_num_conv_per_stage=3,
grid_num_pool=6,
):
super().__init__(
plans_file,
fold,
output_folder,
dataset_directory,
batch_dice,
stage,
unpack_data,
deterministic,
fp16,
grid_num_conv_per_stage=grid_num_conv_per_stage,
grid_num_pool=grid_num_pool,
)
class nnUNetTrainerSegNetPool6Conv4(nnUNetTrainerSegNetCustomSize):
def __init__(
self,
plans_file,
fold,
output_folder,
dataset_directory,
batch_dice,
stage,
unpack_data,
deterministic,
fp16,
grid_num_conv_per_stage=4,
grid_num_pool=6,
):
super().__init__(
plans_file,
fold,
output_folder,
dataset_directory,
batch_dice,
stage,
unpack_data,
deterministic,
fp16,
grid_num_conv_per_stage=grid_num_conv_per_stage,
grid_num_pool=grid_num_pool,
)
#####
# Classes with limited number of unpooling.
# Unpooling only in high resolution layers for better performance on small classes.
# Idea: Small classes benifit more from latent space. Therefore transposed convolutions are useful.
# On large classes unpooling enables more precise segmentation.
#####
class nnUNetTrainerSegNetPool4(nnUNetTrainerV2BraTSRegions):
"""
SegNet trainer class. Implements training procedure using SegNet instead of generic UNet.
Train model with:
nnUNet_train 3d_fullres nnUNetTrainerV2BraTSSegnet Task500_Brats21 4 --npz
"""
def __init__(
self,
plans_file,
fold,
output_folder,
dataset_directory,
batch_dice,
stage,
unpack_data,
deterministic,
fp16,
grid_num_conv_per_stage: Optional[int] = None, # Grid: Number of convolutions
grid_num_pool: Optional[int] = None, # Grid: Number of poolings
):
super().__init__(
plans_file,
fold,
output_folder=output_folder,
dataset_directory=dataset_directory,
batch_dice=batch_dice,
stage=stage,
unpack_data=unpack_data,
deterministic=deterministic,
fp16=fp16,
)
self.grid_num_conv_per_stage = grid_num_conv_per_stage
self.grid_num_pool = grid_num_pool
def initialize_network(self):
"""
- momentum 0.99
- SGD instead of Adam
- self.lr_scheduler = None because we do poly_lr
- deep supervision = True
- i am sure I forgot something here
Known issue: forgot to set neg_slope=0 in InitWeights_He; should not make a difference though
:return:
"""
if self.threeD:
conv_op = nn.Conv3d
dropout_op = nn.Dropout3d
norm_op = nn.InstanceNorm3d
else:
conv_op = nn.Conv2d
dropout_op = nn.Dropout2d
norm_op = nn.InstanceNorm2d
norm_op_kwargs = {"eps": 1e-5, "affine": True}
dropout_op_kwargs = {"p": 0, "inplace": True}
net_nonlin = nn.LeakyReLU
net_nonlin_kwargs = {"negative_slope": 1e-2, "inplace": True}
# NJ all args as for GenericUNet. But convolutional_pooling and convolutional_upsampling set to False!!
self.network = SegNetNPool(
self.num_input_channels,
self.base_num_features,
self.num_classes,
len(self.net_num_pool_op_kernel_sizes)
if self.grid_num_pool is None
else self.grid_num_pool,
num_conv_per_stage=self.conv_per_stage
if self.grid_num_conv_per_stage is None
else self.grid_num_conv_per_stage,
feat_map_mul_on_downscale=2,
conv_op=conv_op,
norm_op=norm_op,
norm_op_kwargs=norm_op_kwargs,
dropout_op=dropout_op,
dropout_op_kwargs=dropout_op_kwargs,
nonlin=net_nonlin,
nonlin_kwargs=net_nonlin_kwargs,
deep_supervision=True,
dropout_in_localization=False,
final_nonlin=lambda x: x,
weightInitializer=InitWeights_He(1e-2),
upscale_logits=False,
convolutional_pooling=False,
convolutional_upsampling=False,
unpool_on_layers=[4], # NEW PARAMETER!!!
)
if torch.cuda.is_available():
self.network.cuda()
# NJ Set inference_apply_nonlin as in nnUNetTrainerV2BraTSRegions
self.network.inference_apply_nonlin = nn.Sigmoid()
class nnUNetTrainerSegNetPool43(nnUNetTrainerV2BraTSRegions):
"""
SegNet trainer class. Implements training procedure using SegNet instead of generic UNet.
Train model with:
nnUNet_train 3d_fullres nnUNetTrainerV2BraTSSegnet Task500_Brats21 4 --npz
"""
def __init__(
self,
plans_file,
fold,
output_folder,
dataset_directory,
batch_dice,
stage,
unpack_data,
deterministic,
fp16,
grid_num_conv_per_stage: Optional[int] = None, # Grid: Number of convolutions
grid_num_pool: Optional[int] = None, # Grid: Number of poolings
):
super().__init__(
plans_file,
fold,
output_folder=output_folder,
dataset_directory=dataset_directory,
batch_dice=batch_dice,
stage=stage,
unpack_data=unpack_data,
deterministic=deterministic,
fp16=fp16,
)
self.grid_num_conv_per_stage = grid_num_conv_per_stage
self.grid_num_pool = grid_num_pool
def initialize_network(self):
"""
- momentum 0.99
- SGD instead of Adam
- self.lr_scheduler = None because we do poly_lr
- deep supervision = True
- i am sure I forgot something here
Known issue: forgot to set neg_slope=0 in InitWeights_He; should not make a difference though
:return:
"""
if self.threeD:
conv_op = nn.Conv3d
dropout_op = nn.Dropout3d
norm_op = nn.InstanceNorm3d
else:
conv_op = nn.Conv2d
dropout_op = nn.Dropout2d
norm_op = nn.InstanceNorm2d
norm_op_kwargs = {"eps": 1e-5, "affine": True}
dropout_op_kwargs = {"p": 0, "inplace": True}
net_nonlin = nn.LeakyReLU
net_nonlin_kwargs = {"negative_slope": 1e-2, "inplace": True}
# NJ all args as for GenericUNet. But convolutional_pooling and convolutional_upsampling set to False!!
self.network = SegNetNPool(
self.num_input_channels,
self.base_num_features,
self.num_classes,
len(self.net_num_pool_op_kernel_sizes)
if self.grid_num_pool is None
else self.grid_num_pool,
num_conv_per_stage=self.conv_per_stage
if self.grid_num_conv_per_stage is None
else self.grid_num_conv_per_stage,
feat_map_mul_on_downscale=2,
conv_op=conv_op,
norm_op=norm_op,
norm_op_kwargs=norm_op_kwargs,
dropout_op=dropout_op,
dropout_op_kwargs=dropout_op_kwargs,
nonlin=net_nonlin,
nonlin_kwargs=net_nonlin_kwargs,
deep_supervision=True,
dropout_in_localization=False,
final_nonlin=lambda x: x,
weightInitializer=InitWeights_He(1e-2),
upscale_logits=False,
convolutional_pooling=False,
convolutional_upsampling=False,
unpool_on_layers=[4, 3], # NEW PARAMETER!!!
)
if torch.cuda.is_available():
self.network.cuda()
# NJ Set inference_apply_nonlin as in nnUNetTrainerV2BraTSRegions
self.network.inference_apply_nonlin = nn.Sigmoid()
class nnUNetTrainerSegNetPool432(nnUNetTrainerV2BraTSRegions):
"""
SegNet trainer class. Implements training procedure using SegNet instead of generic UNet.
Train model with:
nnUNet_train 3d_fullres nnUNetTrainerV2BraTSSegnet Task500_Brats21 4 --npz
"""
def __init__(
self,
plans_file,
fold,
output_folder,
dataset_directory,
batch_dice,
stage,
unpack_data,
deterministic,
fp16,
grid_num_conv_per_stage: Optional[int] = None, # Grid: Number of convolutions
grid_num_pool: Optional[int] = None, # Grid: Number of poolings
):
super().__init__(
plans_file,
fold,
output_folder=output_folder,
dataset_directory=dataset_directory,
batch_dice=batch_dice,
stage=stage,
unpack_data=unpack_data,
deterministic=deterministic,
fp16=fp16,
)
self.grid_num_conv_per_stage = grid_num_conv_per_stage
self.grid_num_pool = grid_num_pool
def initialize_network(self):
"""
- momentum 0.99
- SGD instead of Adam
- self.lr_scheduler = None because we do poly_lr
- deep supervision = True
- i am sure I forgot something here
Known issue: forgot to set neg_slope=0 in InitWeights_He; should not make a difference though
:return:
"""
if self.threeD:
conv_op = nn.Conv3d
dropout_op = nn.Dropout3d
norm_op = nn.InstanceNorm3d
else:
conv_op = nn.Conv2d
dropout_op = nn.Dropout2d
norm_op = nn.InstanceNorm2d
norm_op_kwargs = {"eps": 1e-5, "affine": True}
dropout_op_kwargs = {"p": 0, "inplace": True}
net_nonlin = nn.LeakyReLU
net_nonlin_kwargs = {"negative_slope": 1e-2, "inplace": True}
# NJ all args as for GenericUNet. But convolutional_pooling and convolutional_upsampling set to False!!
self.network = SegNetNPool(
self.num_input_channels,
self.base_num_features,
self.num_classes,
len(self.net_num_pool_op_kernel_sizes)
if self.grid_num_pool is None
else self.grid_num_pool,
num_conv_per_stage=self.conv_per_stage
if self.grid_num_conv_per_stage is None
else self.grid_num_conv_per_stage,
feat_map_mul_on_downscale=2,
conv_op=conv_op,
norm_op=norm_op,
norm_op_kwargs=norm_op_kwargs,
dropout_op=dropout_op,
dropout_op_kwargs=dropout_op_kwargs,
nonlin=net_nonlin,
nonlin_kwargs=net_nonlin_kwargs,
deep_supervision=True,
dropout_in_localization=False,
final_nonlin=lambda x: x,
weightInitializer=InitWeights_He(1e-2),
upscale_logits=False,
convolutional_pooling=False,
convolutional_upsampling=False,
unpool_on_layers=[4, 3, 2], # NEW PARAMETER!!!
)
if torch.cuda.is_available():
self.network.cuda()
# NJ Set inference_apply_nonlin as in nnUNetTrainerV2BraTSRegions
self.network.inference_apply_nonlin = nn.Sigmoid()
|
package ic2.api.energy.tile;
/**
* Implement with an {@link IEnergySink} tile entity to change the force of the explosion when overpowered.
*/
public interface IExplosionPowerOverride {
/**
* Checks if the electric tile should explode. If you return false here,
* the explosion will just not happen at all and the block will stay.
* This is NOT recommended.
* @return Whether the block should explode.
*
* @note It should not be dependent on the tier of the power injected, consider {@link IOverloadHandler} if necessary.
*/
boolean shouldExplode();
/**
* The explosion force when too much power is received.
* @param tier The tier of power, that was injected into the energy sink, that caused it to explode.
* @param defaultPower The default explosion power.
* @return The explosion power
*/
float getExplosionPower(int tier, float defaultPower);
} |
<filename>build.h/core/stringid.h
#pragma once
#include <atomic>
#include <string>
#include <unordered_set>
// Launders strings into directly comparable pointers
struct StringId
{
StringId() : _cstr("") {}
StringId(const StringId& id) = default;
StringId(const char* id) : StringId(get(id)) {}
StringId(const std::string& id) : StringId(get(id)) {}
StringId(std::string&& id) : StringId(get(std::move(id))) {}
StringId(const std::string_view& id) : StringId(get(id)) {}
bool empty() const
{
return _cstr == nullptr || _cstr[0] == 0;
}
const char* cstr() const
{
return _cstr;
}
operator const char*() const
{
return _cstr;
}
static size_t getStorageSize()
{
return getStorage().size();
}
private:
const char* _cstr;
// Transparent lookup in unordered_set is a C++20 feature
// so we'll have to make do with this... thing.
struct StringStorage
{
StringStorage(std::string s)
: str(std::move(s))
{
view = str;
}
StringStorage(std::string_view v)
: view(v)
{
}
StringStorage(StringStorage&& other)
{
str = std::move(other.str);
view = str;
}
StringStorage& operator=(StringStorage&& other)
{
str = std::move(other.str);
view = str;
return *this;
}
StringStorage& operator=(const StringStorage& other) = delete;
StringStorage(const StringStorage& other) = delete;
bool operator==(const StringStorage& other) const
{
// File paths are the bulk of long strings we're dealing with,
// and having a long common prefix is not uncommon.
// Therefore we check a piece of the tail first and hope
// to exit earlier.
if(view.size() != other.view.size()) return false;
if(view.size() > 32)
{
auto l = view.size() - 32;
if(view.substr(l) != other.view.substr(l)) return false;
return view.substr(0, l) == other.view.substr(0, l);
}
else
{
return view == other.view;
}
}
const char* c_str() const
{
return str.c_str();
}
std::string str;
std::string_view view;
};
struct StringStorageHash
{
size_t operator()(const StringStorage& storage) const
{
// File paths are the bulk of long strings we're dealing with,
// so let's just hash the tail.
if(storage.view.size() > 32)
{
return std::hash<std::string_view>{}(storage.view.substr(storage.view.size() - 32));
}
else
{
return std::hash<std::string_view>{}(storage.view);
}
}
};
static std::unordered_set<StringStorage, StringStorageHash>& getStorage()
{
static std::unordered_set<StringStorage, StringStorageHash> storage;
return storage;
}
static StringId get(std::string_view str)
{
if(str.empty())
{
return StringId();
}
auto& storage = getStorage();
auto it = storage.find(str);
if(it == storage.end())
{
it = storage.insert(std::string(str)).first;
}
StringId result;
result._cstr = it->c_str();
return result;
}
static StringId get(std::string&& str)
{
if(str.empty())
{
return StringId();
}
auto& storage = getStorage();
auto it = storage.find(str);
if(it == storage.end())
{
it = storage.insert(std::move(str)).first;
}
StringId result;
result._cstr = it->c_str();
return result;
}
static StringId get(const std::string& str)
{
return get(std::string_view(str));
}
static StringId get(const char* str)
{
return get(std::string_view(str));
}
};
template<>
struct std::hash<StringId>
{
size_t operator()(const StringId& id) const
{
return std::hash<const void*>{}(id.cstr());
}
};
|
Albedo-Induced Radiative Forcing from Mountain Pine Beetle Outbreaks in Forests, South-Central Rocky Mountains: Magnitude, Persistence, and Relation to Outbreak Severity Mountain pine beetle (MPB) outbreaks in North America are widespread and have potentially persistent im- pacts on forest albedo and associated radiative forcing. This study utilized multiple data sets, both current and histori- cal, within lodgepole pine stands in the south-central Rocky Mountains to quantify the full radiative forcing impact of outbreak events for decades after outbreak (0-60 yr) and the role of outbreak severity in determining that impact. Change in annual albedo and radiative forcing peaked at 14- 20 yr post-outbreak (0.06± 0.006 and 0.8± 0.1 W m 2, re- spectively) and recovered to pre-outbreak levels by 30-40 yr post-outbreak. Change in albedo was significant in all four seasons, but strongest in winter with the increased vis- ibility of snow (radiative cooling of 1.6± 0.2 W m 2, 3.0± 0.4 W m 2, and 1.6± 0.2 W m 2 for 2-13, 14-20 and 20-30 yr post-outbreak, respectively). Change in win- ter albedo and radiative forcing also increased with outbreak severity (percent tree mortality). Persistence of albedo ef- fects are seen as a function of the growth rate and species composition of surviving trees, and the establishment and growth of both understory herbaceous vegetation and tree species, all of which may vary with outbreak severity. The establishment and persistence of deciduous trees was found to increase the temporal persistence of albedo effects. MPB- induced changes to radiative forcing may have feedbacks for regional temperature and the hydrological cycle, which could impact future MPB outbreaks dynamics. |
b = int(raw_input())
def round_int(x):
return 10 * ((x + 5) // 10)
print round_int(b) |
def diffangles(inp1, inp2, mask=None):
return wrap_to_pi(inp1 - inp2, mask=mask) |
#include <iostream>
using namespace std;
int main() {
int x = 7;
cout << "Brojot " << x << " na kvadrat e " << x * x << endl;
return 0;
}
|
<filename>include/boost/connector/sha256_digest.hpp
//
// Created by hodge on 24/11/2021.
//
#ifndef BOOST_CONNECTOR_SHA256_DIGEST_HPP
#define BOOST_CONNECTOR_SHA256_DIGEST_HPP
#include <boost/functional/hash.hpp>
#include <functional>
#include <iosfwd>
#include <span>
namespace boost::connector
{
struct sha256_digest
{
static constexpr std::size_t digest_length = 32;
using mutable_span = std::span< unsigned char, digest_length >;
using const_span = std::span< unsigned char const, digest_length >;
const_span
data() const
{
return const_span(data_, data_ + digest_length);
}
mutable_span
data()
{
return mutable_span(data_, data_ + digest_length);
}
bool
operator==(sha256_digest const &r) const
{
return std::memcmp(data_, r.data_, sizeof(data_)) == 0;
}
private:
friend std::size_t
hash_value(sha256_digest const &self);
friend std::ostream &
operator<<(std::ostream &os, sha256_digest const &digest);
private:
unsigned char data_[digest_length];
};
} // namespace boost::connector
namespace std
{
template <>
struct hash< boost::connector::sha256_digest >
: boost::hash< boost::connector::sha256_digest >
{
};
} // namespace std
#endif // BOOST_CONNECTOR_SHA256_DIGEST_HPP
|
Organic amendments effect on the soil chemical properties of marginal land and soybean yield Land use change is increasing, causing a lack of optimal land for agriculture. Marginal land improvement can be made with the application of organic amendments that can improve soil fertility to be optimal for crop cultivation. Land-use change is increasing, causing a lack of optimal land for agriculture. Marginal land improvement can be made with the application of organic amendments that can improve soil fertility to be optimal for crop cultivation. This study was carried out on acid soil of Karanganyar Regency. The treatments tested were P0 (control), P1 (2.5 t rock phosphate/ha + 5 t cow manure/ha), P2 (5 t rock phosphate/ha + 5 t cow manure /ha), P3 (2.5 t dolomite/ha + 5 t cow manure /ha), P4 (5 t dolomite/ha + 5 t cow manure/ha), P5 (5 t rock phosphate/ha + 5 t dolomite/ha + 5 t cow manure/ha). The result showed that the application of P5 gave the highest yield of soybean of 1.41 t/ha. The application of manure significantly affected soil chemical properties of available P, available Ca, organic matter, and cation exchange capacity, but it did not significantly affect total N. Introduction Marginal land is a nutrient-poor terrestrial ecosystem so that the use of this land is not optimal because the soil organic matter content is minimal. Optimization of marginal land use is relatively unknown to many people because of unfavourable soil conditions, namely dry and poor nutrients so that the land is less fertile and unfavourable for agriculture. Naturally, marginal soil fertility is relatively low. This is indicated by the reaction of acidic soil, low nutrient reserves, alkaline exchange capacity and low base saturation, while high to very high aluminium saturation. Increasing the productivity can be done by fulfilling nutrient requirements that are in the status of the deficiency by adding fertilizer inputs, reducing the negative effects of physical and chemical soil properties by adding ameliorant or biological agents (Wijanarko and Taufiq, 2004). The application of organic matter can improve soil structure, increase water holding capacity (), C-organic content on soil, and increase the cation exchange capacity. Manure also improves the physical properties of cation and acts as a counterweight to pH (buffer). The saturation of soil cation exchange capacity (CEC) with exchangeable base cations, simplified to as base saturation (BS), has been considered a complex physicochemical parameter that approximates the relationships between exchangeable basic and acidic cations with other soil properties (Kabala and Beata, 2018). Marginal soil conditions vary from acid to very acid, and generally acid. Such soil reaction conditions making marginal lands are often classified as acid soils. The low reaction of this soil will have an impact on the increasing content of Al that is toxic for plants. Amelioration materials such as lime and manure are needed to increase soil pH, organic matter, and nutrient of Ca and Mg. The increase of soil pH is, in turn, followed by the decrease in the solubility of Al, Fe, and Mn so that they are less toxic. The increase of soil pH increases the soil CEC so that the soil can bind nutrients against leaching. The increase in soil pH also increases the availability of N, P, and Mo nutrients. In an acid dry land, the problem of availability of phosphorus becomes a major obstacle in increasing yield. The low level of available phosphorus in acid soils is due to fixation of dissolved phosphorus by aluminium and iron so that it is no longer available for plants. This condition can be minimized by organic amendments (), such as rock phosphate. Soybeans can grow optimally at a pH between 6-7 (neutral pH) (). Organic fertilizer, in combination with lime on acidic soils, has a very beneficial effect in increasing the availability of nutrients for plant growth and in maintaining soil fertility (). This study aimed to assess the effects of the use of organic amendments (cow manure, dolomite, and rock phosphate) on the soil chemical properties and soybean production in marginal land. Materials and Methods This study was conducted in a field located in the village of Sukosari, Jumantono District, Karanganyar Regency, Central Java. Soil of the research area is an Alfisol with the following characteristics: pH H2O = 4.9, C-organic = 1.75 g/kg, soil organic matter = 1.83 g/kg, CEC = 24.13 cmol/kg, base saturation = 26.57 g/kg, C/N ratio = 4.42, total-N = 0.26 g/kg, available P = 4.45 mg/kg, available K = 0.24 cmol/kg, Ca = 1.74 cmol/kg, Mg = 0.44 cmol/kg, clay fraction = 71.67%, sand fraction = 15.05%, and silt fraction = 13.28%. Materials used for this study were rock phosphate, dolomite, and cow manure. The rock phosphate has a pH value of 8.1 and total P content of 1.197%. The dolomite has a pH value of 7.1, Ca content of 21 cmol/kg, and Mg content of 10.8 cmol/kg. The cow manure has the following characteristics: organic-C = 14.34 g/kg, total N = 1.7 g/kg, available P = 0.31 mg/kg, available K = 0.49 cmol/kg, Ca = 0.56 cmol/kg, Mg = 0.87 cmol/kg, total P total = 0.48%. Treatments tested were P0 (control), P1 (2.5 t rock phosphate/ha + 5 t cow manure/ha), P2 (5 t/ha + cow manure 5 t rock phosphate/ha), P3 (2.5 t dolomite/ha + 5 t cow manure/ha), P4 (5 t dolomite/ha + 5 t cow manure/ha), P5 (5 t/ha + dolomite 5 t rock phosphate/ha + 5 t cow manure/ha). The six treatments were arranged in a completely randomized block design with four replications. The land was made of 4 blocks, with a distance between blocks of 50 cm. Each block was made into six plots with a plot size of 2 m x 1 m. At one week of planting, a soybean seed was planted with a planting space of 20 cm x 25 cm. Soil samples were collected from each plot at soybean harvest at 90 days. The soil samples were dried at room temperature and were subjected to laboratory analyses for determination of pH, total N content, available P and Ca contents, soil organic matter contents, and cation exchange capacity. The methods used for determining the soil chemical properties were those developed by soil laboratory of the Faculty of Agriculture, Sebelas Maret University, Surakarta. Yield components of soybean measured at harvest included weight of seed yield and weight of 100seeds weight. The data obtained were subjected to analysis of variance followed by Duncan Multi Range Test at 5% level. Soil pH The application of ameliorant did not significantly increase soil pH (Table 1). The highest pH reached 6.7 in the treatment of P5 while the control gave the lowest pH of 5.7. Dolomite containing Ca and Mg can increase soil pH (). Manure and dolomite have the same role in neutralizing Al toxins and increasing pH in the soil and increasing physical and biological properties of the soil (). Soil pH is a key factor controlling soil nutrient availability, soil microbial activities, and crop growth and development (). The use of the amendment was able to increase the pH even though it does not show significant results. The increase in dosage and combination of amendments is directly proportional to the increase in pH. The P5 treatment showed a pH of 6.7, while the control treatment was only 6.29. Manure increases soil pH and decreases exchangeable acidity. Fertilizer applied releases cations which can be exchanged with soil solution, which replaces Al 3+ and H + ions at the soil absorption site, thereby increasing soil pH (). Dolomite application can increase soil pH (). An increase in pH will encourage the process of soil activity to be optimal. Soil pH is also controlled by biological processes in the soil. Soil total N The experimental results showed that the addition of organic amendments gave no significant effect on total N (p>0.05) ( Table 1). This condition that was caused by the use of manure itself had a slow effect but was able to release nutrients because of the microbial activity. The use of soil amendments can improve soil conditions to be optimal for the process of microbial mineralization and increase the availability of N in the soil, high N uptake by plants will have a positive effect on improving yields. The highest nitrogen content in P5 application was 0.70% (Table 1). The increase in total N due to the increase in organic amendment dose was caused by the addition of N derived from the decomposition of the organic matter. The higher the organic amendment dose added, the higher the N released. Syukur and Harsono reported that the provision of cow manure dose significantly increased the total N-level from 376.67 ppm to 474.00 ppm, and soil available N from 10.65 ppm to 11.14 ppm. Phosphate rocks also play a role in increasing soil microbial activity and increasing N. Soil available P and Ca The addition of organic amendments gave significant effect on available P and available Ca (p<0.05). The use of rock phosphate increased the availability of P nutrients in the soil (Table 1). The application of the amendments increased total P and available P in the soil. Sanchez pointed out that the role of lime to reduce P fixation in the soil is very slow and requires a long time so that the available P released from fixation is still low. The highest level of total P of 2.63 ppm was obtained with the application of P5. Phosphorus deficiency can limit the formation of nodules, N2 fixation and yield from legume grains (). Calcification of acid soils increases the pH of the soil, which in turn releases phosphate ions which are precipitated with Al and Fe ions to make P available for plant absorption (). Remarks: the numbers followed by the same letters in the same row and column are not significantly different according to the Duncan test at 5% level. P0 = control, P1 = 2.5 t rock phosphate/ha + 5 t cow manure/ha, P2 = 5 t rock phosphate/ha + 5 t cow manure/ha, P3 = 2.5 t dolomite/ha + 5 t cow manure/ha, P4 = 5 t dolomite/ha + 5 t cow manure/ha, and P5 = 5 t rock phosphate/ha + 5 t dolomite/ha + 5 t cow manure/ha. The total content of phosphate and calcium in phosphate rock varies between 8.79 -31.88% P2O5, and 0.60 -57.50% Ca (Kasno and Sutriadi, 2012). The effects of lime and manure require time to release P soil and for the mineralization process to take place. According to Maerere et al., P mineralization increases over time after the initial application of organic amendments. The application of 5 t rock phosphate/ha + 5 t dolomite/ha + 5 t cow manure/ha (P5 amendment) resulted in the highest available Ca content of 9.63 mg/100 g of soil which was significantly higher than the control treatment. The increase in Ca value was due to the addition of dolomite in the P5 combination. Suntoro et al. reported that application of dolomite increased available Ca in the soil compared to controls. When lime is introduced into the soil, Ca 2+ and Mg 2+ ions will shift H +, Fe 2+, Al 3+, Mn 4+ and Cu 2+ ions from the soil adsorption site so that soil pH can increase (). In addition to increasing soil pH, lime also supplies significant amounts of Ca and Mg. Another amendment for soils that can be used is cow dung. (). The addition of organic matter into the soil will increase the organic matter in the soil, soil pH, Ntotal in the soil, and macronutrients such as P, K, Ca, and Mg (). Soil CEC and organic matter The experimental results showed that the addition of amendments significantly increased CEC and organic matter (p<0.05) compared to controls (Table 1). Adeniyan et al. revealed that the application of 5 t manure fertilizer/ha increased available P, pH, CEC, and organic C significantly. Kheyrodin and Antoun also reported that the application of manure increased Ca and Mg at a depth of 15-30 cm of soil. The application of soil amendments improves the chemical characteristics of the soil, thereby creating a favourable environment for plant nutrition, plant growth and crop yields (Dida and Etisa, 2019). The application of a combination of P5 (5 t rock phosphate/ha + 5 t dolomite/ha + 5 t cow manure/ha) increased CEC values of 44.97 cmol/kg, while the CEC value of the control only reached 17.71 cmol/kg. The increase in soil CEC was probably due to the displacement of cations due to the addition of dolomite. Israel et al. reported that manure fertilizer could increase soil CEC by 23.96 cmol/kg. Tolanur reported the application of fertilizer with available minerals significantly increased CEC. The use of organic amendments is effective for improving soil, structure and soil fertility through microbial activity, thereby increasing soil CEC. Fertilizer applications change soil biological, chemical, and physical properties. Application of 20 t of cow dung per year maintains organic matter and CEC and reaches the requested pH (Sustainable Agriculture Research and Education, 2012). Application of high levels of fertilizer increase phosphorus and potassium. Analysis of variance showed that the combination had a significant influence on soil organic matter. Application of P5 resulted in organic matter content of 6.28%, while that in control was only 1.3%. Ewulo found that in Nigeria, the use of 6 t manure/ha increased P, K, Ca, Mg, and CEC. When added to the soil, manure will increase the content of soil organic matter and improve the physical properties of the soil (). Improved soil conditions are integrated from amendments that increase soil pH and release of nutrients from decomposition of organic matter and improvement of soil structure. Seed yield and 100-seeds weight Soybean seed yield gave significantly interaction between cow manure, lime, and rock phosphate application (Table 2). However, in P5 the highest production was 1.41 t/ha compared to the control treatment. This means that the amount ameliorant required to produce optimum seed yield depends on the method of ameliorant application. Larger sizes of legumes and peanuts can contribute to higher yields (). These conditions indicate that the use of ameliorant for marginal land can increase soybean production. The average soybean production of Wilis varieties on fertile land reaches 1.6 t/ha. The use of ameliorant for the first planting period affected the yield. Organic ameliorant is slow-release, so it takes time to release nutrients. The dolomite-rock phosphate fertilizers have been used as P slowrelease fertilizers in Alfisol (). The results showed that available P and available Ca had a significant effect on soybean production. Phosphorus is actively absorbed by the roots of the soil solution and stored in plant bodies in high concentrations. According to Sumarni et al., the availability of P element that is quickly absorbed by soybean plants will be able to optimize the role of P in the formation and filling of pods to increase productivity. Increased supply of phosphorus in the body of the plant will increase metabolism, so the process of optimal seed filling and seed weight increased. The high production of dry seed weight per plant occurs due to the fulfilment of Ca elements needed by plants, especially in the formation of pods. Ca is one of the most important elements in determining the pod survival. Nurjayanti et al. pointed out that Ca is the nutrient that most determines the level of pod beauty. Toyip reported that fertilizing 1 t Ca/ha gave the highest yield of tiles. Yield reduction due to Ca deficiency can occur by up to 60% (). The greater dosage of dolomite given will encourage the availability of Ca and Mg in the soil. Ca and Mg will be used by plants in the generative phase (seed formation). Muthaura et al. reported that dolomite plays a role in triggering enzyme activity and plays a role in seed formation. The higher dose of manure given indicates the higher the dry weight of 100 seeds. Kriswantoro et al. revealed that the difference in the dose of organic fertilizer given resulted in differences in the level of fertility produced, both physically, chemically and biologically. Thus it will have a different effect on plant growth and production. Conclusion The application of organic amendments could improve marginal land through the characteristics of soil chemical characteristics. The application of organic amendments increased soil pH, available P, available Ca, organic matter, CEC, and total N. Optimal soil conditions also increase soybean production to reach 1.41 t/ha. |
A Double-Layer Multi-Resolution Classification Model for Decoding Spatiotemporal Patterns of Spikes With Small Sample Size Abstract We build a double-layer, multiple temporal-resolution classification model for decoding single-trial spatiotemporal patterns of spikes. The model takes spiking activities as input signals and binary behavioral or cognitive variables as output signals and represents the input-output mapping with a double-layer ensemble classifier. In the first layer, to solve the underdetermined problem caused by the small sample size and the very high dimensionality of input signals, B-spline functional expansion and L1-regularized logistic classifiers are used to reduce dimensionality and yield sparse model estimations. A wide range of temporal resolutions of neural features is included by using a large number of classifiers with different numbers of B-spline knots. Each classifier serves as a base learner to classify spatiotemporal patterns into the probability of the output label with a single temporal resolution. A bootstrap aggregating strategy is used to reduce the estimation variances of these classifiers. In the second layer, another L1-regularized logistic classifier takes outputs of first-layer classifiers as inputs to generate the final output predictions. This classifier serves as a meta-learner that fuses multiple temporal resolutions to classify spatiotemporal patterns of spikes into binary output labels. We test this decoding model with both synthetic and experimental data recorded from rats and human subjects performing memory-dependent behavioral tasks. Results show that this method can effectively avoid overfitting and yield accurate prediction of output labels with small sample size. The double-layer, multi-resolution classifier consistently outperforms the best single-layer, single-resolution classifier by extracting and utilizing multi-resolution spatiotemporal features of spike patterns in the classification. |
After plenty of speculation about where he would play hockey in 2017-18, Ilya Kovalchuk put the rumours to rest by signing a one-year deal to remain with SKA St. Petersburg of the KHL earlier this month.
Returning to the NHL would have meant foregoing the chance to participate in the 2018 Winter Olympic Games—something Kovalchuk was not willing to do, according to an interview on his team’s website.
“One of the main factors was the upcoming Olympic Games,” he said in translation, via SKA.rus. “In 2018, only players who play in European championships and the KHL can compete there.”
The NHL released a statement earlier this year stating that its players would not be heading to PyeongChang next February.
Kovalchuk has represented Russia on the Olympic stage four times, registering nine goals and five assists in 23 games and medaling once (bronze, 2002).
“It’s an Olympic year, so everyone who wants to represent their country has to play at their best,” said the 34-year-old Russian winger. “I am not an exception, and it’s a challenge which I accept.”
This will be Kovalchuk’s fifth full season with SKA (not including 2012-13, when he played in Russia during the NHL lockout), the only KHL team for which he’s skated. He has tallied 89 goals and 222 points in 209 games since leaving the NHL, including an impressive 32 goals and 78 points in 60 games in 2016-17, and has won the Gagarin Cup twice (2014-15, 2016-17).
“It was important to stay with SKA, because I have only played here in the KHL,” he said. “I have a lot of warmth for the club and our fans.”
A potential return to the NHL wasn’t as easy as picking a team and signing. Because the New Jersey Devils still hold his rights, he would have had to either sign with the Devils or agree to a sign-and-trade.
Kovalchuk could have another big decision on his hands a year from now, as he’ll officially be an unrestricted free agent per the NHL CBA’s 35-plus rule. |
Steroid profile in an adrenocortical carcinoma producing aldosterone. We report a rare case of primary aldosteronism due to an adrenocortical carcinoma. A 61-year-old woman with a history of hypertension and hypokalemia was referred for evaluation of a 4.2 cm measuring adrenal mass without secondary signs of malignancy. Endocrinological testing was consistent with primary aldosteronism. The patient underwent surgical resection of the adrenal mass; histology revealed an adrenocortical carcinoma. Postoperatively blood pressure, serum potassium, and aldosterone returned to normal. Four months after adrenalectomy, the patient presented again with hypokalemic hypertension and was found to have metastatic disease. Endocrinological investigation revealed primary aldosteronism and subclinical autonomous glucocorticoid hypersecretion. Careful hormonal investigation should be obtained in patients with adrenal masses causing excessive aldosterone secretion. In uncertain cases of primary aldosteronism, we would suggest to measure 18-hydroxycortisol levels, as excessive amounts may indicate adrenocortical carcinoma. |
DEVELOPMENT OF A METHODOLOGY FOR CONSTRUCTING TAXATION SYSTEMS IN DEVELOPED COUNTRIES (USING THE EXAMPLE OF WESTERN EUROPE AND THE USA) The article presents a theoretical study on the methodology evolution in constructing tax systems in Western Europe and the United States. Also, in a number of cases, the methodology and experience of other European countries (Eastern Europe) and Asian states is examined in the framework of a comparative analysis. Basing on the results of the study and analysis of the methodology genesis of constructing tax systems in Western countries, it is stated: 1) at the moment, in most developed countries, direct taxes dominate in the methodology for constructing the taxation system (more than 100 types of taxes and fees are distinguished); 2) if developing countries at the stage of economic recovery, the key task is to increase the degree of tax collection in order to ensure the completeness of financing public spending, then for developed countries the main task is to curb the excessive growth of the public sector of the economy in conditions when the economy is already approaching such a threshold beyond which it is unreasonable to increase the level of the fiscal burden. However, as the practice of recent years shows, it is extremely difficult to achieve this result. Due to the fact that the methodology for constructing the tax system in the Soviet period was subjected to radical destruction, and the level of tax collection is more than 2 times lower than the average European indicators, not even reaching the optimal level (60%), the results of a study on the use of methodological tools by Western countries to solve these problems are acquiring practical significance and special interest for Russia. |
<reponame>chris-chambers/magazine<gh_stars>0
# Originally adapted from IPython's autoreload.py, written by <NAME>,
# <NAME>, and the IPython Development Team; and distributed under the
# BSD License.
from collections import defaultdict
import gc
from inspect import isfunction, isclass, ismethod
from types import FunctionType, MethodType, ModuleType
from typing import Any, Callable, Iterable, Text
import weakref
UpgradeFn = Callable[[Any, Any, Iterable['UpgradeFn']], bool]
def reload(
module: ModuleType,
upgraders: Iterable[UpgradeFn] = ...,
) -> ModuleType:
# Import importlib.reload here so that this module can reload itself.
# If the import is outside this function, it is cleared during reload and
# can't be resolved.
from importlib import reload as _reload
if upgraders is ...:
upgraders = UPGRADERS
saved_dict = module.__dict__.copy()
name = module.__name__
loader = module.__loader__
spec = module.__spec__
magazine_refs = module.__dict__.get(
'__magazine__', defaultdict(weakref.WeakSet))
module.__dict__.clear()
module.__dict__.update(
__name__=name,
__loader__=loader,
__spec__=spec,
__magazine__=magazine_refs,
)
try:
# Try to reload the module.
module = _reload(module)
except:
# Restore the previous dict on failure.
module.__dict__.update(saved_dict)
raise
for name, obj in saved_dict.items():
if getattr(obj, '__module__', None) == module.__name__:
magazine_refs[name].add(obj)
# Delete the saved module dict so members can potentially be
# garbage-collected and avoid needless upgrading.
del saved_dict
# Upgrade existing upgradeable objects.
for name, refset in magazine_refs.items():
for old in refset:
new = module.__dict__.get(name)
if old is not None and new is not None:
# print(f'upgrading {module.__name__}.{name}')
upgrade(old, new, upgraders)
return module
def upgrade(old, new, upgraders: Iterable[UpgradeFn]) -> bool:
return any(upgrade(old, new, upgraders) for upgrade in upgraders)
def upgrade_function(
old: FunctionType,
new: FunctionType,
_: Iterable[UpgradeFn],
) -> bool:
if not isfunction(old) or not isfunction(new):
return False
_copyattr(old, new, '__closure__')
_copyattr(old, new, '__code__')
_copyattr(old, new, '__defaults__')
_copyattr(old, new, '__dict__')
_copyattr(old, new, '__doc__')
_copyattr(old, new, '__globals__')
return True
def upgrade_method(
old: MethodType,
new: MethodType,
upgraders: Iterable[UpgradeFn],
) -> bool:
if not ismethod(old) or not ismethod(new):
return False
return upgrade_function(old.__func__, new.__func__, upgraders)
def upgrade_class(old: type, new: type, upgraders: Iterable[UpgradeFn]) -> bool:
if not isclass(old) or not isclass(new):
return False
remove = []
for key in old.__dict__:
try:
# In unusual cases, key may not be a string, which will cause
# `getattr` to throw `TypeError`. If so, just skip it.
oldattr = getattr(old, key)
except TypeError:
continue
try:
newattr = getattr(new, key)
except AttributeError:
remove.append(key)
continue
if oldattr is newattr:
continue
# Try to upgrade the old attr with the new definition. If upgrading is
# not possible, just copy the new attr across.
if not upgrade(oldattr, newattr, upgraders):
_copyattr(old, new, key)
for key in remove:
_delattr(old, key)
for key in set(new.__dict__) - old.__dict__.keys():
_copyattr(old, new, key)
# Update the __class__ of existing instances.
for ref in gc.get_referrers(old):
if type(ref) is old:
ref.__class__ = new
return True
def upgrade_property(
old: property,
new: property,
upgraders: Iterable[UpgradeFn],
) -> bool:
if not isinstance(old, property) or not isinstance(new, property):
return False
upgrade_property_part(old, new, 'fget', 'getter', upgraders)
upgrade_property_part(old, new, 'fset', 'setter', upgraders)
upgrade_property_part(old, new, 'fdel', 'deleter', upgraders)
return True
def upgrade_property_part(
old: property,
new: property,
name: Text,
mutator: Text,
upgraders: Iterable[UpgradeFn],
):
# If the old and new parts are both functions, upgrade the old function,
# otherwise replace the old function with the new function. This handles
# the cases where both old and new have functions, where old has no function
# or where new has no function.
oldpart = getattr(old, name)
newpart = getattr(new, name)
if isfunction(oldpart) and isfunction(newpart):
upgrade_function(oldpart, newpart, upgraders)
else:
getattr(old, mutator)(newpart)
UPGRADERS = [
upgrade_class,
upgrade_function,
upgrade_property,
upgrade_method,
]
def _copyattr(dst: Any, src: Any, name: Text):
try:
setattr(dst, name, getattr(src, name))
except (AttributeError, TypeError):
pass
def _delattr(obj: Any, name: Text):
try:
delattr(obj, name)
except (AttributeError, TypeError):
pass
|
// FetchSubnets fetches a single page of subnets from the data store
func (f *PostgresPhysicalAssetFetcher) FetchSubnets(ctx context.Context, limit, offset int) ([]domain.AssetSubnet, error) {
rows, err := f.DB.Conn().QueryContext(ctx, fetchSubnetsQuery, limit, offset)
if err != nil {
return nil, err
}
subnets := make([]domain.AssetSubnet, 0, limit)
for rows.Next() {
var network string
var location sql.NullString
var resourceOwner sql.NullString
var businessUnit sql.NullString
if err := rows.Scan(&network, &location, &resourceOwner, &businessUnit); err != nil {
_ = rows.Close()
return nil, err
}
subnet := domain.AssetSubnet{
Network: network,
}
if location.Valid {
subnet.Location = location.String
}
if resourceOwner.Valid {
subnet.ResourceOwner = resourceOwner.String
}
if businessUnit.Valid {
subnet.BusinessUnit = businessUnit.String
}
subnets = append(subnets, subnet)
}
if err := rows.Close(); err != nil {
return nil, err
}
return subnets, nil
} |
Broadband characterization of planar whispering-gallery-mode dielectric resonators using a simple experimental setup A simple and cost-effective experimental setup for measuring the transmission coefficient of whispering-gallery (WG) mode dielectric resonators up to the mm-wave band is presented. The proposed setup consists of a sweep generator, a spectrum analyzer and a PC with a General Purpose Interface Bus (GPIB). The major advantage of such arrangement lies in the ease of measurement without standard calibration procedures as well as its cost-effectiveness. Using this setup, two WG resonators have been experimentally characterized over the K- and Ka-bands. The obtained results are in a good agreement with those obtained from a calibrated vector network analyzer. |
Recently, substantial attention has been directed toward the development of lightweight tubular shafts, such as shafts for golf clubs, fishing poles, and/or pool cues manufactured from various composite materials, particularly from "pre-preg" material. Pre-preg composite sheets are formed by pre-impregnating fabric or strands of fiber, for example carbon or glass, within a binding matrix, such as epoxy resin. The binding matrix or resin is partially cured such that it holds the fibers together and forms a malleable sheet.
Shafts may be manufactured by wrapping in a predetermined way a set of plies of pre-preg composite sheet around a molding mandrel having an inflatable bladder thereon, placing the mandrel and plies in a mold having inner wall(s) of a desired shape and size, and heating the ply-wrapped mandrel to a predetermined temperature for a time sufficient to allow the resin comprising the plies of pre-preg composite sheet to completely cure. Generally, the molding mandrel used in such a process is a long rod having a hollow end and a plurality of holes communicating between the outer surface of the mandrel and the hollow end.
The inflatable bladder, typically of a latex material, is stretched over the mandrel prior to wrapping the mandrel with pre-preg material. The bladder covers the holes communicating the outer surface of the mandrel with its hollow end. The bladder covered mandrel is then wrapped with pre-preg material. While the ply-wrapped mandrel is cured in the mold (e.g. typically by heating), pressurized gas is introduced into the hollow end, the gas communicates through the holes and inflates the bladder to a predetermined pressure to force the plies of pre-preg against the inner wall(s) of the mold. After the shaft is cured, the mandrel and bladder are removed. The bladder is discarded, and the mandrel is cleaned and prepared to receive a new bladder for manufacturing another shaft. In some instances a bladder may be reused after its removal.
Alternatively, a mandrel without a hollow end and holes may be covered with a bladder and wrapped with pre-preg material. Before the ply-wrapped mandrel is inserted into the mold, the mandrel is removed and an air fitting is attached. The bladder and plies are then inserted into the mold and pressurized gas is then introduced directly into the bladder through the fitting, inflating the bladder and forcing the composite material against the inner wall(s) of the mold. The material is then cured and cooled, and the bladder removed.
The inflatable bladder is typically a prefabricated sleeve made using a dipping process. A dipping mandrel, typically a shaft of similar configuration to the molding mandrel but without a hollow end or holes, is dipped into material, such as latex. This coats the outer surface of the dipping mandrel with material, which is cured, forming a bladder. The bladder is stripped off of the dipping mandrel and is then ready to be stretched over a molding mandrel.
There are many drawbacks, however, associated with such conventional bladders. For example, the bladder is typically handled multiple times, adding unnecessary steps to the manufacturing process, reducing efficiency and increasing cost. In addition, excessive handling of the bladder increases risk that the bladder may be damaged, e.g., when it is removed from the dipping mandrel, and/or when it is placed on the molding mandrel.
Furthermore, the quality of the shafts produced may be compromised because conventional bladders increase the risk that the resulting shaft will have irregular composite densities or similar structural imperfections. This is due to the bladders, typically made from latex or similar material, having an elastic memory. When the bladder is placed onto the molding mandrel, the latex may be stretched unevenly, creating irregular localized stresses in the bladder. This may include uneven axial stretching along the length of the mandrel, uneven radial stretching along the surface of the mandrel, twisting and/or bunching of the bladder as it is placed on the mandrel or as it is handled after such placement. In addition, a single bladder configuration is frequently used on various molding mandrels which may have a smaller cross-section than the dipping mandrel used to make the bladder, resulting in an ill-fitting bladder. Thus, when the composite material is wrapped onto the mandrel, the bladder may consequently bunch or wrinkle.
Thereafter during the curing process when the bladder is inflated, the latex material will tend to return to a more uniformly stressed shape, such as by untwisting, moving axially or radially, or unfolding wrinkles. The fibers of the composite material will follow the movement of the bladder, changing the density of the fibers unpredictably, and creating a structurally inferior shaft.
Therefore, there is a need for a molding mandrel having a snug, uniformly fitted bladder which provides an improved quality shaft, by minimizing undesirable surface distortions or stresses in the bladder that may shift the fibers of the composite material.
In addition, there is a need for an apparatus and a process for manufacturing composite shafts which involve less handling and therefore provide a more efficient manufacturing process and less expensive finished products. |
#!usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Flyweight rectangle module.
"""
__author__ = '<NAME>'
from abc import abstractmethod
from flyweight import FlyweightShape
class FlyweightRectangle(FlyweightShape):
"""
Abstract FlyweightRectangle class that works as "Flyweight".
This abstract class enables sharing but does not enforce it; it defines
"operation(extrinsic_state)" to assign extrinsic states to or customize
"ConcreteFlyweight", to let it change to "UnsharedConcreteFlyweight".
"""
__slots__ = []
@abstractmethod
def set_width(self, width: float) -> None:
"""
Sets the width of this rectangle.
:param width: float
:return: None
"""
pass
@abstractmethod
def set_height(self, height: float) -> None:
"""
Sets the height of this rectangle.
:param height: float
:return: None
"""
pass
class SharedRectangle(FlyweightRectangle):
"""
Concrete SharedRectangle class that works as "ConcreteFlyweight".
This class pre-defines all the intrinsic states (which are constant and
context-independent).
This class is implemented as a singleton class.
"""
@classmethod
def get_instance(cls):
"""
Gets the singleton instance.
:return: SharedCircle
"""
return cls.__new__(cls)
def __new__(cls, *args, **kwargs):
if not hasattr(cls, '_instance'):
cls._instance = super().__new__(cls)
cls._instance.__init__()
return cls._instance
def __init__(self):
"""
Default constructor.
"""
# Intrinsic states
self._bottom_left_x = 0.0
self._bottom_left_y = 0.0
print(f'Creating a Shared Rectangle without color: {self}')
@property
def bottom_left_x(self) -> float:
"""
Accessor of bottom_left_x.
:return: float
"""
return self._bottom_left_x
@property
def bottom_left_y(self) -> float:
"""
Accessor of bottom_left_y.
:return: float
"""
return self._bottom_left_y
def set_width(self, width):
# Do nothing
pass
def set_height(self, height):
# Do nothing
pass
def draw(self, color):
# Do nothing
pass
def __repr__(self):
return f'SharedRectangle [bottom_left_x={self._bottom_left_x}, ' \
f'bottom_left_y={self._bottom_left_y}]'
class UnsharedRectangle(FlyweightRectangle):
"""
Concrete UnsharedRectangle class that works as "UnsharedConcreteFlyweight".
This class contains a reference to the shared "ConcreteFlyweight", which
contains all the intrinsic states. And after customized with the given
extrinsic states (which are NOT constant, context-dependent and needs to be
calculated on the fly), this class works as "UnsharedConcreteFlyweight".
"""
__slots__ = ['_flyweight_rect', '_width', '_height', '_color']
def __init__(self, flyweight_rect: SharedRectangle):
"""
Constructor with parameter.
:param flyweight_rect: SharedRectangle
"""
# Reference to the shared flyweight rectangle (Intrinsic states)
self._flyweight_rect = flyweight_rect
# Extrinsic states
self._width = 4.0
self._height = 3.0
self._color = None
def set_width(self, width):
self._width = width
def set_height(self, height):
self._height = height
def draw(self, color):
self._color = color
print(f'Rectangle has been drawn with {color}: {self}')
def __repr__(self):
s = 'UnsharedRectangle' + ' ['
s += f'bottom_left_x={self._flyweight_rect.bottom_left_x}' + ', '
s += f'bottom_left_y={self._flyweight_rect.bottom_left_y}' + ', '
s += f'width={self._width}' + ', '
s += f'height={self._height}' + ', '
s += f'color={self._color}' + ']'
return s
|
<reponame>HannnaK/wiating_backend<gh_stars>1-10
# -*- coding: utf-8 -*-
"""Unit test package for wiating_backend."""
|
<gh_stars>10-100
#ifndef IKNOW_SHELL_KBLABEL_H_
#define IKNOW_SHELL_KBLABEL_H_
#include "IkTypes.h"
#include "IkLabel.h"
#include "RawBlock.h"
#include "IkStringEncoding.h"
#include "IkStringAlg.h"
#include "utlExceptionFrom.h"
#include "OffsetPtr.h"
#include "KbAttribute.h"
#include <string>
#include <vector>
namespace iknow {
namespace shell {
class KbLabel;
typedef std::basic_string<iknow::core::FastLabelSet::Index> IndexPattern;
typedef CountedString<iknow::core::FastLabelSet::Index> CountedIndexString;
typedef iknow::core::Phase Phase;
//MapT maps labels names ("base" 2-byte encoding) to indexes
template<typename MapT>
struct AddIndexForLabelNameToString {
AddIndexForLabelNameToString(const MapT& label_map, IndexPattern& string) : label_map_(label_map), string_(string) {}
void operator()(const std::string& utf8_label_name) {
if (utf8_label_name.empty()) return; //ignore empty labels
if (utf8_label_name == "-") {
string_ += iknow::core::IkLabel::BreakIndex(); // "-" is a special break
//TODO: Confirm that number of tokens matches number of label segments.
} else {
typename MapT::const_iterator i = label_map_.find(iknow::base::IkStringEncoding::UTF8ToBase(utf8_label_name));
if (i == label_map_.end())
throw ExceptionFrom<AddIndexForLabelNameToString>(std::string("Unknown label: \"") + utf8_label_name + std::string("\" while loading lexreps."));
string_ += i->second;
}
}
const MapT& label_map_;
IndexPattern& string_;
private:
void operator=(const AddIndexForLabelNameToString&);
};
struct FullAttributeInserter {
FullAttributeInserter(RawAllocator& allocator, std::vector<KbAttribute>& attributes, AttributeMapBuilder& attribute_map) :
allocator_(allocator), attributes_(attributes), attribute_map_(attribute_map) {}
void operator()(const std::string& attribute) {
attributes_.push_back(KbAttribute(allocator_, attribute, attribute_map_));
}
RawAllocator& allocator_;
std::vector<KbAttribute>& attributes_;
AttributeMapBuilder& attribute_map_;
private:
void operator=(const FullAttributeInserter&);
};
struct PhaseInserter {
PhaseInserter(std::vector<Phase>& phases) : phases_(phases) {}
void operator()(const std::string& phase) {
Phase phase_value = iknow::core::PhaseFromString(phase);
if (phase_value > iknow::core::kMaxPhase)
throw ExceptionFrom<KbLabel>("Illegal phase number encountered in label.");
phases_.push_back(phase_value);
}
std::vector<Phase>& phases_;
private:
void operator=(const PhaseInserter&);
};
class KbLabel {
public:
KbLabel(RawAllocator& allocator,
const std::string& name,
const std::string& type_string,
const std::string& attributes,
const std::string& phases,
AttributeMapBuilder& attribute_map) :
name_(allocator.InsertString(iknow::base::IkStringEncoding::UTF8ToBase(name))),
type_(iknow::core::IkLabel::TypeStringToType(type_string)) {
std::vector<KbAttribute> attribute_vector;
FullAttributeInserter attribute_inserter(allocator, attribute_vector, attribute_map);
iknow::base::IkStringAlg::Tokenize(attributes, '|', attribute_inserter);
attributes_begin_ = allocator.InsertRange(attribute_vector.begin(), attribute_vector.end());
attributes_end_ = attributes_begin_ + attribute_vector.size();
std::vector<Phase> phase_vector;
PhaseInserter phase_inserter(phase_vector);
iknow::base::IkStringAlg::Tokenize(phases != "" ? phases : iknow::core::kDefaultPhases,
',', phase_inserter);
phases_begin_ = allocator.InsertRange(phase_vector.begin(), phase_vector.end());
phases_end_ = phases_begin_ + phase_vector.size();
}
KbLabel(const KbLabel& other) { // explicit copy constructor to avoid random bytes (due to type alignment).
this->name_ = other.name_;
this->type_ = other.type_;
this->attributes_begin_ = other.attributes_begin_;
this->attributes_end_ = other.attributes_end_;
this->phases_begin_ = other.phases_begin_;
this->phases_end_ = other.phases_end_;
}
iknow::base::String Name() const { return *name_; }
const CountedBaseString* PointerToName() const { return name_; }
iknow::core::IkLabel::Type Type() const { return type_; }
size_t AttributeCount() const { return attributes_end_ - attributes_begin_; }
const KbAttribute* GetAttribute(size_t position) const {
if (position > AttributeCount()) throw ExceptionFrom<KbLabel>("Illegal attribute position.");
return attributes_begin_ + position;
}
size_t PhaseCount() const { return phases_end_ - phases_begin_; }
const Phase* GetPhasesBegin() const { return phases_begin_; }
const Phase* GetPhasesEnd() const { return phases_end_; }
private:
OffsetPtr<const CountedBaseString> name_;
iknow::core::IkLabel::Type type_;
OffsetPtr<const KbAttribute> attributes_begin_;
OffsetPtr<const KbAttribute> attributes_end_;
OffsetPtr<const Phase> phases_begin_;
OffsetPtr<const Phase> phases_end_;
};
}
}
#endif //IKNOW_SHELL_KBLABEL_H_
|
Potent and orally active small-molecule inhibitors of the MDM2-p53 interaction. We report herein the design of potent and orally active small-molecule inhibitors of the MDM2-p53 interaction. Compound 5 binds to MDM2 with a K(i) of 0.6 nM, activates p53 at concentrations as low as 40 nM, and potently and selectively inhibits cell growth in tumor cells with wild-type p53 over tumor cells with mutated/deleted p53. Compound 5 has a good oral bioavailability and effectively inhibits tumor growth in the SJSA-1 xenograft model. |
<filename>src/com/amanjaiswal/gfgdsacourse/sorting/HoarePartitionFunction.java
package com.amanjaiswal.gfgdsacourse.sorting;
import java.util.Arrays;
public class HoarePartitionFunction {
static int arr[] = { 5, 3, 8, 4, 2, 7, 1, 10 };
// Note :- In Hoare partition we assume that the piviot is the 1st element.
int hoarePartitionFunction(int arr[], int start, int end) {
int pivot = arr[start];
int i = start - 1;
int j = end + 1;
// Check for the elements smaller than the pivot for i, and greater than the pivot for j. Swap the values.
// Return j
while (true) {
do {
i++;
} while (arr[i] < pivot);
do {
j--;
} while (arr[j] > pivot);
if (i >= j) {
return j;
}
int temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
System.out.println(Arrays.toString(arr));
}
}
public static void main(String[] args) {
HoarePartitionFunction hp = new HoarePartitionFunction();
int v = hp.hoarePartitionFunction(arr, 0, 7);
System.out.println(v);
}
}
|
<filename>Modules/_decimal/libmpdec/context.c
/*
* Copyright (c) 2008-2020 <NAME>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include "mpdecimal.h"
#include <signal.h>
#include <stdio.h>
#include <string.h>
void
mpd_dflt_traphandler(mpd_context_t *ctx)
{
(void)ctx;
raise(SIGFPE);
}
void (* mpd_traphandler)(mpd_context_t *) = mpd_dflt_traphandler;
/* Set guaranteed minimum number of coefficient words. The function may
be used once at program start. Setting MPD_MINALLOC to out-of-bounds
values is a catastrophic error, so in that case the function exits rather
than relying on the user to check a return value. */
void
mpd_setminalloc(mpd_ssize_t n)
{
static int minalloc_is_set = 0;
if (minalloc_is_set) {
mpd_err_warn("mpd_setminalloc: ignoring request to set "
"MPD_MINALLOC a second time\n");
return;
}
if (n < MPD_MINALLOC_MIN || n > MPD_MINALLOC_MAX) {
mpd_err_fatal("illegal value for MPD_MINALLOC"); /* GCOV_NOT_REACHED */
}
MPD_MINALLOC = n;
minalloc_is_set = 1;
}
void
mpd_init(mpd_context_t *ctx, mpd_ssize_t prec)
{
mpd_ssize_t ideal_minalloc;
mpd_defaultcontext(ctx);
if (!mpd_qsetprec(ctx, prec)) {
mpd_addstatus_raise(ctx, MPD_Invalid_context);
return;
}
ideal_minalloc = 2 * ((prec+MPD_RDIGITS-1) / MPD_RDIGITS);
if (ideal_minalloc < MPD_MINALLOC_MIN) ideal_minalloc = MPD_MINALLOC_MIN;
if (ideal_minalloc > MPD_MINALLOC_MAX) ideal_minalloc = MPD_MINALLOC_MAX;
mpd_setminalloc(ideal_minalloc);
}
void
mpd_maxcontext(mpd_context_t *ctx)
{
ctx->prec=MPD_MAX_PREC;
ctx->emax=MPD_MAX_EMAX;
ctx->emin=MPD_MIN_EMIN;
ctx->round=MPD_ROUND_HALF_EVEN;
ctx->traps=MPD_Traps;
ctx->status=0;
ctx->newtrap=0;
ctx->clamp=0;
ctx->allcr=1;
}
void
mpd_defaultcontext(mpd_context_t *ctx)
{
ctx->prec=2*MPD_RDIGITS;
ctx->emax=MPD_MAX_EMAX;
ctx->emin=MPD_MIN_EMIN;
ctx->round=MPD_ROUND_HALF_UP;
ctx->traps=MPD_Traps;
ctx->status=0;
ctx->newtrap=0;
ctx->clamp=0;
ctx->allcr=1;
}
void
mpd_basiccontext(mpd_context_t *ctx)
{
ctx->prec=9;
ctx->emax=MPD_MAX_EMAX;
ctx->emin=MPD_MIN_EMIN;
ctx->round=MPD_ROUND_HALF_UP;
ctx->traps=MPD_Traps|MPD_Clamped;
ctx->status=0;
ctx->newtrap=0;
ctx->clamp=0;
ctx->allcr=1;
}
int
mpd_ieee_context(mpd_context_t *ctx, int bits)
{
if (bits <= 0 || bits > MPD_IEEE_CONTEXT_MAX_BITS || bits % 32) {
return -1;
}
ctx->prec = 9 * (bits/32) - 2;
ctx->emax = 3 * ((mpd_ssize_t)1<<(bits/16+3));
ctx->emin = 1 - ctx->emax;
ctx->round=MPD_ROUND_HALF_EVEN;
ctx->traps=0;
ctx->status=0;
ctx->newtrap=0;
ctx->clamp=1;
ctx->allcr=1;
return 0;
}
mpd_ssize_t
mpd_getprec(const mpd_context_t *ctx)
{
return ctx->prec;
}
mpd_ssize_t
mpd_getemax(const mpd_context_t *ctx)
{
return ctx->emax;
}
mpd_ssize_t
mpd_getemin(const mpd_context_t *ctx)
{
return ctx->emin;
}
int
mpd_getround(const mpd_context_t *ctx)
{
return ctx->round;
}
uint32_t
mpd_gettraps(const mpd_context_t *ctx)
{
return ctx->traps;
}
uint32_t
mpd_getstatus(const mpd_context_t *ctx)
{
return ctx->status;
}
int
mpd_getclamp(const mpd_context_t *ctx)
{
return ctx->clamp;
}
int
mpd_getcr(const mpd_context_t *ctx)
{
return ctx->allcr;
}
int
mpd_qsetprec(mpd_context_t *ctx, mpd_ssize_t prec)
{
if (prec <= 0 || prec > MPD_MAX_PREC) {
return 0;
}
ctx->prec = prec;
return 1;
}
int
mpd_qsetemax(mpd_context_t *ctx, mpd_ssize_t emax)
{
if (emax < 0 || emax > MPD_MAX_EMAX) {
return 0;
}
ctx->emax = emax;
return 1;
}
int
mpd_qsetemin(mpd_context_t *ctx, mpd_ssize_t emin)
{
if (emin > 0 || emin < MPD_MIN_EMIN) {
return 0;
}
ctx->emin = emin;
return 1;
}
int
mpd_qsetround(mpd_context_t *ctx, int round)
{
if (!(0 <= round && round < MPD_ROUND_GUARD)) {
return 0;
}
ctx->round = round;
return 1;
}
int
mpd_qsettraps(mpd_context_t *ctx, uint32_t traps)
{
if (traps > MPD_Max_status) {
return 0;
}
ctx->traps = traps;
return 1;
}
int
mpd_qsetstatus(mpd_context_t *ctx, uint32_t flags)
{
if (flags > MPD_Max_status) {
return 0;
}
ctx->status = flags;
return 1;
}
int
mpd_qsetclamp(mpd_context_t *ctx, int c)
{
if (c != 0 && c != 1) {
return 0;
}
ctx->clamp = c;
return 1;
}
int
mpd_qsetcr(mpd_context_t *ctx, int c)
{
if (c != 0 && c != 1) {
return 0;
}
ctx->allcr = c;
return 1;
}
void
mpd_addstatus_raise(mpd_context_t *ctx, uint32_t flags)
{
ctx->status |= flags;
if (flags&ctx->traps) {
ctx->newtrap = (flags&ctx->traps);
mpd_traphandler(ctx);
}
}
|
“It is competitive when everybody is looking for jobs. And everybody is like, ‘Oh, I wouldn’t work for them, and I wouldn’t work for them.’ I tried not to pay attention to that. Like I said, I asked people who actually worked at the company. They know. I really tried to not listen to other students too much and just make a decision that I thought was best for me. Everybody picked lots of different jobs. In the end, hopefully, everybody ended up with what they wanted.
Do you see your first job as a career in itself or a stepping stone? |
<reponame>ShadehaterCS/TALESS-Cocktails---Android
package com.auth.TALESS.Main.Adapters;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.auth.TALESS.DataClasses.CocktailRecipe;
import com.auth.TALESS.Main.Activities.LauncherActivity;
import com.auth.TALESS.R;
import com.auth.TALESS.Util.Utilities;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
import com.bumptech.glide.load.resource.bitmap.GranularRoundedCorners;
import java.util.ArrayList;
/**
* Adapts the dataset of an ArrayList of CocktailRecipe objects
* Uses recyclerview_favorites_and_search_item.xml for its elements layout
* @link RecipeActivity when an element is clicked on.
*/
public class GeneralAdapter extends RecyclerView.Adapter<GeneralAdapter.ViewHolder> {
private final ArrayList<CocktailRecipe> dataset;
private final Context context;
public GeneralAdapter(Context context, ArrayList<CocktailRecipe> dataset) {
this.dataset = dataset;
this.context = context;
}
@NonNull
@Override
public GeneralAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.recyclerview_favorites_and_search_item, parent, false);
return new GeneralAdapter.ViewHolder(view);
}
//Fill the view
@Override
public void onBindViewHolder(@NonNull GeneralAdapter.ViewHolder holder, int position) {
CocktailRecipe recipe = dataset.get(position);
holder.getTitleTV().setText(recipe.get_title());
holder.getDescTV().setText(recipe.get_description());
if (LauncherActivity.pref_paintTitles)
Utilities.setTitleColorForTextView(context,holder.titleTV, recipe);
int rid = holder.view.getContext().getResources()
.getIdentifier(recipe.get_imageid(), "drawable",
context.getPackageName());
Glide.with(holder.view).load(rid).transform(new CenterCrop(),
new GranularRoundedCorners(15,0,0,15))
.into(holder.getImgView());
Utilities.setOnClickListenerOnViewForIntentToRecipeActivity(
context, holder.view, holder.getImgView(), recipe);
}
@Override
public int getItemCount() {
return dataset.size();
}
protected class ViewHolder extends RecyclerView.ViewHolder {
private final TextView titleTV;
private final TextView descTV;
private final ImageView imgView;
private final View view;
public ViewHolder(View view) {
super(view);
this.view = view;
titleTV = view.findViewById(R.id.favoritesRVTitle);
descTV = view.findViewById(R.id.favoritesRVDescription);
imgView = view.findViewById(R.id.favoritesRecipeImage);
}
public TextView getTitleTV() {
return titleTV;
}
public TextView getDescTV() {
return descTV;
}
public ImageView getImgView() {
return imgView;
}
}
} |
Acoustic/prosodic and lexical correlates of charismatic speech Charisma, the ability to command authority on the basis of personal qualities, is more difficult to define than to identify. How do charismatic leaders such as Fidel Castro or Pope John Paul II attract and retain their followers? We present results of an analysis of subjective ratings of charisma from a corpus of American political speech. We identify the associations between charisma ratings and ratings of other personal attributes. We also examine acoustic/prosodic and lexical features of this speech and correlate these with charisma ratings. |
Peter German, former deputy commissioner of the RCMP, speaks during a news conference in Vancouver, on June 27, 2018.
In July of 2015, an RCMP officer investigating the flow of money into a B.C. casino told the province’s lottery corporation that officers looking for a “minnow” had instead found a “whale.” More than $13.5-million would be deemed to have passed through the River Rock’s cash cages in a single month, mostly in $20 bills.
Although a report on money laundering at B.C. casinos this week highlighted some of the RCMP’s investigative success, it also provided a glimpse inside a force with shifting priorities, dwindling interest in financial crime and loss in expertise.
The report, written by former RCMP deputy commissioner Peter German, said that around 2012 the force “realigned its priorities to deal with present and emerging threats, most notably terrorism.” The report said there was then a dramatic decrease in commercial crime and proceeds-of-crime cases.
“At present, the RCMP is redeveloping its capacity to deal with commercial fraud and money laundering, however what took only the stroke of a pen to abolish will take many years to redevelop,” it said.
The report noted that while the RCMP is Canada’s federal police force, in B.C. it is also the provincial force and provides contract policing in cities such as Surrey, Burnaby and Richmond.
It said the lack of federal policing between 2012 and 2017 when it came to financial crime displaced responsibility to provincial and municipal police departments, which generally did not have the resources or expertise to take on the complex files.
He said he believed it had been a mistake to move away from the dedicated sections for financial crime.
The RCMP did not provide a response to a request for comment.
In a response to Mr. German that is included in his report, the RCMP said evidence from two significant investigations identified several criminal offences. The report said the RCMP made it abundantly clear that large quantities of cash that entered Lower Mainland casinos were the proceeds of crime.
The report said B.C.’s dysfunctional regulatory regime for casinos enabled large-scale money laundering by organized crime. It said the money laundering represented a collective system failure and that the Crown-owned B.C. Lottery Corp. and the province’s gambling enforcement branch had been in conflict for a number of years.
Rob Gordon, a professor of criminology at Simon Fraser University, said in an interview that the blame for the situation lies with the province, not police.
But he said the RCMP’s broad mandate is also a hindrance.
When asked if the report pointed to a need for a single Lower Mainland police force, Mr. Gordon said he believed the issue of transnational crime was best left to a federal unit.
The report recommended that a specialized police force be established to focus on criminal and regulatory investigations arising from the gambling industry, with an emphasis on Lower Mainland casinos. The unit would be funded out of gambling revenue and similar forces in Ontario and Nevada could serve as a model.
The report at one point told of a B.C. Lottery Corp. official who had difficulty getting the RCMP to investigate the influence of organized crime at casinos. The report said the BCLC official reached out to various police agencies around late 2014, including the Richmond RCMP detachment, the RCMP’s federal and serious organized crime unit, and B.C.’s Combined Forces Special Enforcement Unit.
The report quoted the BCLC as saying its members “had to sell ourselves to [RCMP] units.” It said the BCLC “got lucky” because of a personal connection between one of its employees and a senior RCMP officer. |
def simple_graph(client):
test_dataset = create_test_dataset(client)
model_1 = test_dataset.create_model(
"Model_A",
description="model a",
schema=[
ModelProperty(
"prop1", data_type=ModelPropertyType(data_type=str), title=True
)
],
)
model_2 = test_dataset.create_model(
"Model_B",
description="model b",
schema=[
ModelProperty(
"prop1", data_type=ModelPropertyType(data_type=str), title=True
)
],
)
relationship = test_dataset.create_relationship_type(
"New_Relationship_{}".format(current_ts()), "a new relationship"
)
model_instance_1 = model_1.create_record({"prop1": "val1"})
model_instance_2 = model_2.create_record({"prop1": "val1"})
model_instance_1.relate_to(model_instance_2, relationship)
graph = Graph(
test_dataset,
models=[model_1, model_2],
model_records=[model_instance_1, model_instance_2],
relationships=[relationship],
relationship_records=None,
)
yield graph
ds_id = test_dataset.id
client._api.datasets.delete(test_dataset)
all_dataset_ids = [x.id for x in client.datasets()]
assert ds_id not in all_dataset_ids
assert not test_dataset.exists |
Frogs And Puffins! 1730s Menus Reveal Royals Were Extreme Foodies
Enlarge this image toggle caption Hulton Archive/Getty Images Hulton Archive/Getty Images
You think 21st century foodies will go to great lengths for a culinary thrill? (Lion meat, anyone?) Turns out, they've got nothing on 18th century English royals.
Frogs, puffins, boar's head and larks and other songbirds were all fair game for the dinner table of England's King George II, judging by a chronicle of daily meals served to his majesty and his wife, Queen Caroline.
The 160-page, grease-stained collection of royal menus, which details the meals served at Kensington Palace between 1736 and 1737, is up for auction Wednesday. And it contains plenty that might offend our modern, squeamish sensibilities — starting with the royal obsession with eating baby animals, especially songbirds.
Enlarge this image toggle caption Courtesy of Dominic Winter Auctioneers Courtesy of Dominic Winter Auctioneers
They "loved to eat young birds and animals," says Ivan Day, a British food scholar who has examined the rare manuscript. "And by young, I literally mean 1- or 2-day-old babies."
Why? "Because the meat was very tender."
Sounds bad, but as Day notes, it's not that different, really, from eating lamb.
And while it may make bird-watchers blanch, the royal household wasn't alone in its love of the ortolan, a thumb-sized songbird that was a frequent — if silent — guest at George II's table. Indeed, the bird's modern-day endangered status didn't stop former French President Francois Mitterrand from ordering up a dish of ortolans — drowned in Armagnac, no less! — as his last, very illegal meal.
Some of the exotica on the menu was just a case of showing off among the nobility. Then as now, food was status: The rarer the dish, the richer the host serving it. Indeed, one reason why Master Cook William Daniel kept such detailed records, says Day, was simply "a matter of pride."
But in some cases, strange-sounding dishes, like boar's head, were really just a case of the era's nose-to-tail ethos, says Day, who frequently consults with British museums to re-create historic foods.
Diners back then "didn't waste anything," Day says. "They ate everything."
And the menu book isn't just a royal-groupie's window into the extreme eating habits of the monarchy. It's also a reflection of broader cultural, political and technological changes afoot at the time, historians say.
"It's an important little book," says Day.
Take all the tarts and puddings that get mentioned — a sure sign that England's love of sugar was on the rise. The British had waged bloody battles with the Dutch in the previous century for control of the West Indies sugar trade, so the sweet stuff was becoming more available and affordable, says food historian Annie Gray, who works as a consultant with the U.K.'s Historic Royal Palaces.
Pineapples also turn up. The tropical fruit were a rare luxury, but thanks to greenhouse technology, which was just taking off in London at the time, it was possible, albeit painstaking, to grow fresh ones locally for those rich enough to afford the treats, Gray says.
Interestingly, tea — that drink that has become synonymous with the English — makes just a single appearance, says Chris Albury of Dominic Winter Auctioneers, which is handling the auction.
But perhaps the biggest revolution was brewing in the kitchen itself. Though it might not be obvious to a modern reader of these royal menus, British cuisine was actually in the process of becoming simpler — and tastier, Gray and Day say. The sweet-and-savory mixes of the previous era, says Gray, gave way to a more butter- and cream-based cuisine.
The result? Late Georgian cooking, says Gray, was "some of the best food we've ever produced in this country."
Auctioneer Chris Albury says his firm hopes the manuscript will fetch between $8,000 and $13,000. That may sound like a lot of dough for a bunch of old menus, but, of course, says Albury, "it's not just about food — it has wider cultural meanings."
UPDATE 12:57 ET: Albury tells us the book of menus sold for 5,000 pounds sterling — or nearly U.S. $8,300. The buyer? The Historic Royal Palaces, which plans to put the manuscript on display at various sites. |
Oscillations of Cpeptide in the euglycemic clamp and their effect on the pharmacodynamic assessment of insulin preparations Cpeptide should be continuously suppressed. However, increased postdosing Cpeptide is not an uncommon phenomenon in euglycemic clamp studies involving healthy participants. This study aimed to determine the extent to which the postdosing Cpeptide increases from the baseline that could affect the accuracy of glucodynamics in euglycemic clamp studies involving healthy subjects. First, 10 healthy males underwent a 10h euglycemic clamp without exogenous insulin administration to obtain a reference interval (RI) for the ratio of Cpeptide after 0 min (CPt) to baseline Cpeptide (CP0). Then, the data from a pharmacokinetic and pharmacodynamic study of insulin aspart (IAsp) were analyzed, and 70 eligible clamps were grouped by CPt/CP0: group A (max > upper limit of RI), group B (1<max ≤ upper limit of RI), and group C (max ≤ 1). The differences in basal and clamped blood glucose, CPt/CP0, and the pharmacokinetics and pharmacodynamics of IAsp were compared, and the relationship between elevated CPt and the accuracy of pharmacodynamics was analyzed. The RI of CPt/CP0 was 22.7%152.1%; 1.5 baseline might be a ceiling for the increase in CPt under stable conditions. The maximum glucose infusion rate (GIR) in group A tended to be higher than that in group B or C (Pfor trend = 0.033). The AUCGIR,010h in groups A, B, and C was 1983 ± 650,1682 ± 454, and 1479 ± 440 mg/kg (P = 0.047), respectively, under comparable IAsp exposure. No intergroup difference was detected in clamped glucose, IAsp dose, or body mass index. In conclusion, postdosing Cpeptide over 1.5 baseline indicates insufficient inhibition of endogenous insulin secretion, which could compromise the pharmacodynamics of insulin preparations. |
package com.jpn.chesstest.exceptions;
import com.jpn.chesstest.domain.Move;
import com.jpn.chesstest.domain.Player;
/**
* Exception thrown when player tries an invalid movement for that piece. For example, trying to move trough other pieces,
* move diagonally a Rook piece, etc.
* @author jnicotra
* @version 1.0
* @see ChessTestException
*/
public class InvalidMovementException extends ChessTestException {
private static final long serialVersionUID = 1810154746793344445L;
public InvalidMovementException (Player player, Move move) {
super (player, move);
}
@Override
public String getMessage() {
return getPlayer().getSide()+" - You can't move from " + getMove().getPositionFrom() + " to " + getMove().getPositionTo()
+ ", that is an invalid move!";
}
}
|
package com.fichajespi.dto.entity;
import java.time.LocalDate;
import java.time.LocalTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class DiaDto {
// private Date dia;
// @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm:ss", timezone = "Europe/Madrid")
// private Date horaInicio;
// @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm:ss",timezone="Europe/Madrid" )
// private Date horaFin;
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDate dia;
@JsonFormat(pattern = "HH:mm")
private LocalTime horaInicio;
@JsonFormat(pattern = "HH:mm")
private LocalTime horaFin;
private String calendarioNombre;
}
|
package com.design.patterns.behavioral.chainofresponsability;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
* SlideShowHandler.java
*
* @author <NAME>
* @email <EMAIL>
* @date Feb. 24, 2021
*
*/
public class SlideShowHandler extends DocumentHandler {
private static Logger logger = LoggerFactory.getLogger(SlideShowHandler.class);
public SlideShowHandler(DocumentHandler next) {
super(next);
}
@Override
public void openDocument(FileExtension fileExtension) {
if (fileExtension == FileExtension.PPT) {
logger.info("Opening Slides Document ...");
} else {
super.openDocument(fileExtension);
}
}
}
|
El alfabeto de la memoria. Puentes, tiempos y tipos: John Hejduk, Andrea Palladio y Louis Kahn en Venecia The obsession with creating a universal method of classification has been a constant in the history of art, literature and architecture. Medieval alchemists, Renaissance patrons and avant-garde nihilists were involved in the chimerical task of codifying the world through disparate taxonomies; in the 20th century, architects such as John Hedjuk or Louis Kahn based their compositional theory on the construction of their own alphabet for each new project. A suggestive catalogue of primary architectures capable of revealing historical permanences as if it were the letters of a primitive alphabet: the "house", the "temple", the "market" or the "tower" build a collection of archaic lexemes referring to Aby Warburg and his Atlas Mnemosyne that show how the world can be explained through a brief architectural alphabet. This article delves into one of those axioms, "the bridge," an icon that traces the foundational connections of three unbuilt projects: John Hejduk's masquerades, Andrea Palladio's Rialto Bridge, and Louis Kahn's Congress Palace. With Venice as a physical and dreamlike support, these three projects prove how their creators reduce the idea of a project to a constructed aphorism. |
STI Knowledge in Berlin Adolescents Sexually transmitted infections (STIs) pose a significant threat to individual and public health. They disproportionately affect adolescents and young adults. In a cross-sectional study, we assessed self-rated and factual STI knowledge in a sample of 9th graders in 13 secondary schools in Berlin, Germany. Differences by age, gender, migrant background, and school type were quantified using bivariate and multivariable analyses. A total of 1177 students in 61 classes participated. The mean age was 14.6 (SD = 0.7), 47.5% were female, and 52.9% had at least one immigrant parent. Knowledge of human immunodeficiency virus (HIV) was widespread, but other STIs were less known. For example, 46.2% had never heard of chlamydia, 10.8% knew of the HPV vaccination, and only 2.2% were aware that no cure exists for HPV infection. While boys were more likely to describe their knowledge as good, there was no general gender superiority in factual knowledge. Children of immigrants and students in the least academic schools had lower knowledge overall. Our results show that despite their particular risk to contract an STI, adolescents suffer from suboptimal levels of knowledge on STIs beyond HIV. Urgent efforts needed to improve adolescent STI knowledge in order to improve the uptake of primary and secondary prevention. Introduction Sexually transmitted infections (STIs) are a serious public health problem worldwide, with an estimated one million new infections each day. They have a wide range of negative consequences on individual health, ranging from physical discomfort to infertility, malignancy, severe maternal and foetal pregnancy complications, and loss of life. Beyond the detrimental effect on individual health, STIs also represent a significant economic burden. It is estimated that more than ten billion dollars per year are spent on STIs other than human immunodeficiency virus (HIV) in the United States alone. The most frequent viral STI pathogens are human papillomavirus (HPV), herpes simplex virus 2 (HSV-2), HIV, and Hepatitis B. The most widespread bacterial STIs are chlamydia trachomatis, gonorrhoea, and syphilis. Although HIV prevalence in Germany is still low compared to most other European countries, there has been a marked rise in the number of newly diagnosed cases of HIV resulting from both homosexual and heterosexual intercourse, as well as intravenous drug use over the last five years. for STIs was tested. Results could help schools, parents, and other sexual health educators to address particular "areas of need", in order to raise awareness and knowledge amongst a population disproportionately at risk of acquiring STIs. Study Design Data on STI awareness was collected within the framework of a larger survey on the knowledge of sexual health issues amongst Berlin adolescents. Details of the study and its population and methodology have been partially described elsewhere. It was demonstrated that adolescents were ill-informed on the important issue of emergency contraception. Furthermore, adolescents' preferences regarding online sexual health resources were assessed. The survey was conducted throughout the year 2012 in grade nine of secondary schools in Berlin. The study was conducted with the approval of the Ethics Committee of the Charit-Universittsmedizin Berlin and the Berlin Senate's Department for Education, Youth and Science. In accordance with Berlin state law, written parental consent was mandatory for all students who had not yet reached 14 years of age, and a favourable vote of the parent-teacher-conference was a prerequisite for a school's participation. Sampling and Data Collection All public secondary schools in Berlin were contacted by telephone and email with in-depth information on the study and a request to include the school in the sample. Schools allocated regular lessons in which the study was conducted using paper questionnaires. Students were informed of the aim of the study and the range of topics addressed. It was pointed out that participation was voluntary and anonymous, and that the survey did not represent a formal school assignment or otherwise affected school grades. Following the collection of questionnaires, students were provided with the correct answers to all knowledge questions. Questionnaire The questionnaire was designed by the authors to assess self-evaluated and actual knowledge on different STIs, amongst other sexual health questions. A pre-test in one school class was conducted and the comments led to minor modifications in the wording of questions. In the general part of the questionnaire, students were requested to state their age and gender. Furthermore, students were asked to provide their parents' place of birth to assess migratory background. To safeguard parental informational self-determination in accordance with Berlin Senate policy, options were limited to "Germany" and "abroad", and no information on the time of migration was collected. Furthermore, the variable of school type was coded for each participant to assess the differences between the three types of Berlin secondary schools: the most academically selective type of University-Preparatory Schools (Gymnasium), Comprehensive Secondary Schools (Integrierte Gesamtschule) with the option to qualify for university access, and the least academic school type-Comprehensive Secondary Schools without this option. For clarity, these three school types were reported below as "highest academic tier", "intermediate academic tier", and "lowest academic tier". In the part on STIs, students were first asked to self-evaluate their knowledge of the seven most frequent bacterial and viral STIs: HIV/AIDS, syphilis, genital herpes, hepatitis B, gonorrhoea, chlamydia, and HPV. A Likert-Scale was employed, with the options to rate knowledge as "good", "rather good", "mediocre", "rather bad", and "bad", and a further option to select "I have never heard of this STI". Furthermore, factual knowledge was tested by asking students to state whether a reliable cure and/or a vaccination exists for the following STIs (correct responses in brackets, according to the current Centers for Disease Control and Prevention (CDC) Guidelines ): HIV (no cure, no vaccination), hepatitis B (no cure, vaccination exists), chlamydia (curable, no vaccination), HPV (no cure, vaccination exists), and genital herpes (no cure, no vaccination). Statistical Analysis IBM SPSS Statistics Version 25 (SPSS Inc., Chicago, IL, USA) was employed for data analysis. Frequencies were computed for all items. We used chi-square statistics to test for bivariate relationships between the independent variables gender, migratory background, and school type, and the outcomes of self-reported awareness and knowledge in the factual questions on STIs. Using multiple regression models, we quantified the effect of demographic variables on outcomes. Since age, gender, migratory background, and academic standing had all been shown to be predictors of sexual health knowledge in different previous studies, they were maintained as factors in all of the analyses. To account for the possible effect of clustering by school or class, a mixed multilevel regression model (SPSS GENLINMIXED) was employed and school and class included as random effects. Odds ratios and confidence intervals were calculated from regression. For clarity of results, outcome categories were dichotomized for regression. The regression outcome variables were thus "high knowledge" (response either "good" or "rather good" knowledge) on individual STIs, "never heard" for individual STIs, and "correct response" for each of the knowledge questions. Robust estimation was used to take into account possible violations of model assumptions. Missing cases were excluded from statistical analyses. The Strengthening the Reporting of Observational Studies in Epidemiology (STROBE) statement was followed in the presentation of the methods and results of this study. The statistical methodology used was approved by the Competence Center for Clinical Trials of the University of Bremen. The original dataset of the study cannot be made available to the general public due to the constraints placed on data availability by the Berlin Senate's Department for Education, Youth and Science. The dataset can be obtained upon reasonable request from the corresponding author. Study Participants We successfully contacted the heads of the biology departments in 142 out of 287 schools. Subsequently, 13 schools with a total of 61 ninth grade classes agreed to participate. The limited time to teach the demanding state curriculum was most frequently given as the reason for non-participation. Participating schools hailed from seven of the twelve Berlin City Districts (Mitte, Pankow, Charlottenburg-Wilmersdorf, Spandau, Steglitz-Zehlendorf, Treptow-Kpenick, and Marzahn-Hellersdorf) and included very diverse settings. Schools in former East and West Berlin were included, as were schools from inner-city to suburban, and from the most wealthy to relatively impoverished city areas. During the lessons that were allocated by participating schools, 1190 students were in attendance. Ten students aged 13 failed to provide parental consent and could thus not participate. Two students elected not to take part, and one very recently arrived immigrant was unable to read German. Thus, a total of 1177 students participated. Of participants providing gender information, 547 were female (46.5%) and 605 (51.4%) were male. Age ranged from 13 to 16 years, with a mean age of participants of 14.6 (SD 0.8). For migratory background, 544 (46.2%) had two German-born parents, 260 (22.5%) participants reported one, and 352 (30.4%) two parents of foreign birth. Participants were virtually equally spread across the three school types, with 390 (33.1%) participants attending a school of the lowest, 395 (33.6%) of the intermediate, and 392 (33.3%) of the highest academic tier. Self-Reported STI Knowledge Self-evaluated knowledge regarding the most widespread bacterial and viral STIs, sorted in order of decreasing awareness is shown in Table 1. This order will be followed in subsequent tables. HIV was known to virtually all participants, with many stating good or rather good knowledge. Knowledge and awareness were visibly lower for other STIs, of which the most frequently known infection was hepatitis B. Despite being the bacterial STI with the highest prevalence, chlamydia was the infection with the lowest proportion of participants claiming good knowledge and the lowest rate of awareness. Table 1. Self-rated knowledge of sexually transmitted infections (STIs) in order of decreasing awareness. Distribution of self-evaluated knowledge by gender is shown in Table 2. Association between gender and reported knowledge was statistically significant for all STIs, except for hepatitis B and chlamydia. Female respondents reported lower knowledge and were more likely to state complete lack of awareness for each of the STIs apart from chlamydia. While chlamydia was the STI with the lowest awareness overall and amongst male participants, gonorrhoea was the infection least known to girls in the sample. A table of differences by gender, migrant status and school type of participants who selected the "never heard of" option for the presented STIs can be found in Supplementary File 1. Students from the intermediate tier of schools were generally least likely to have never heard of the different STIs. Students of two foreign-born parents were most likely to be fully unaware of the existence of all STIs, bar hepatitis B. Table 3 depicts the results of the regression model for high self-evaluated knowledge. For all STIs bar hepatitis B and chlamydia, female respondents were significantly less likely to evaluate their knowledge as "good" or "rather good". The results of the regression model for the outcome of "unawareness" of the different STIs are presented in Table 4. While there were no significant differences for HIV, hepatitis B, and chlamydia, female students were significantly more likely to have never heard of HPV, syphilis, and gonorrhoea. Students with an immigrant background were more likely to have never heard of genital herpes and syphilis. Bivariate Analyses Correct response rates to the knowledge questions on the curability and existence of vaccines for STIs are presented in Table 5. While it was widely known that no reliable cure has been found for HIV to date, knowledge was much lower regarding the curability of other STIs. For vaccination, again a majority knew that no vaccination protects from HIV, and slightly less than half knew that a vaccination exists for hepatitis B. Knowledge was low for the other STIs, and only 10.8% of participants were aware of the existence of an HPV vaccine. Results by gender varied depending on the STI and there was no trend suggesting general knowledge superiority of either gender. While awareness of the HPV vaccine was low overall, it was significantly higher among boys than girls. Students with migratory background overall tended to have lower rates of correct responses. For example, of students with two German-born parents, 370 out of 528 (70.1%) were aware that no vaccination was available for HIV and 463 out of 529 (87.5%) knew that HIV could not reliably be cured. Corresponding numbers with both parents born abroad were 177/343 (51.6%) for vaccination and 252/339 (74.3%) for curability (p (from 2 ) <0.001 and <0.001). While association was not significant for most STIs, lower proportions of children of immigrants selected the correct response on all of the questions but on curative options for HPV and genital herpes. A table with STI knowledge by migratory background can be found in Supplementary File 2. For all questions bar on the curability of infection with HPV, it was students from the intermediate academic tier of schools who had the highest rate of correct responses. There was no clear knowledge difference between students from the lowest or the highest tier of schools. The full results for knowledge differences by school type can be found in Supplementary File 3. Multivariable Analyses Multivariate analysis was performed for the questions on curability and vaccination options for HIV, Hepatitis B, HPV, genital herpes, and chlamydia. The dichotomous outcome categories were "correct response" vs. "other response". Results are presented in Table 6. Table 7 shows the results from the multivariable regression model for the outcome variable of correct responses on cure and vaccination questions. As in bivariate analyses, autochthonous German students were more likely to know the lack of curative and vaccination options for HIV, as were students from the intermediate tier of schools. Male students were again significantly more likely to know that a vaccination exists for HPV. Discussion We measured self-rated and factual knowledge regarding different STIs in the framework of a cross-sectional study assessing the sexual health knowledge of Berlin adolescents. We encountered a high participation rate (1177/1179) despite the explicit emphasis on the voluntary nature of participation. It was assessed whether students had heard of different STIs, how they would describe their own knowledge, and whether they were able to state which STIs were curable and for which a vaccination exists. With a mean participant age of 14.6 years, population-level data suggests that a majority of adolescents in our study had already experienced some form of sexual contact or intimacy, although most have not engaged in penetrative sexual intercourse. Across Germany, the mean age of sexual debut is 14.9 years for female and 15.1 years for male adolescents. As expected, nearly all of the students had heard of HIV, and a majority rated their knowledge as (rather) good and knew that HIV could neither be cured nor vaccinated against. However, overall knowledge for other STIs was much less satisfactory, with low self-reported knowledge and high levels of ignorance regarding individual STIs. For example, more than 46% of participants had never heard of chlamydia and merely 18% knew that chlamydia can be cured. This widespread lack of knowledge is in line with previous studies in Germany on both adolescents and the population at large. Results from adolescents in South-East England point towards a similar level of ignorance, whereas Swedish studies show between 86% and 96% of adolescents to be aware of chlamydia. This lack of awareness that is shown by our study is particularly noteworthy given the fact that chlamydia is the most frequent bacterial STI, has a particularly high incidence among adolescents and young adults, and is a frequent reason for infertility later in life. Despite the ready and cost-free availability of chlamydia screening and treatment to German adolescents, our results show the target population is hardly aware of the disease's existence. Another STI for which there was a widespread lack of knowledge was HPV. Despite being the STI with the highest prevalence, more than a third of students responded to have never heard of it, and fewer than 13% described high knowledge. Results for the factual questions were dire, with less than 2.2% of respondents knowing that there is currently no treatment to cure HPV infection, and that the HPV vaccine is only known to 10.8% of respondents. This is visibly lower than the rates that are found amongst adolescents in a previous study in Germany and in other European countries. In contrast to these previous studies, the male participants in our sample were significantly more likely to be aware of the HPV vaccine, shown both in bivariate and regression analysis. This is especially surprising given that the HPV vaccine is primarily marketed to a female audience in Germany: in all German states except for Saxony, HPV vaccination is exclusively recommended for female adolescents, and only few statutory health insurance providers cover male HPV vaccination. Condoms can prevent infection with STIs. However, their use requires motivation. Research shows that adolescents regard condoms primarily as a method to prevent pregnancy. If STI prevention is considered at all, it is mainly the risk of HIV that is taken into account. However, most sexually active adolescents in Germany rely on hormonal methods of contraception to prevent pregnancy, with only a minority employing condoms instead or concurrently. HIV, due to its low prevalence in Germany, is unlikely to be an effective motivator for condom use, at least in heterosexual intercourse. Our results show, that other STIs-most of which are much more prevalent than HIV-are relatively little known to adolescents. This lack of knowledge is likely to diminish motivation to use condoms and/or access other methods of STI prevention, both primary (such as HPV or hepatitis B vaccination) and secondary (such as Pap tests or chlamydia screening). If adolescents and young adults are to make a truly informed choice on the uptake of preventive options, the level of STI awareness and knowledge needs to be improved. In our results, for most STIs, even groups that are usually shown to have superior sexual health proficiency (such as female adolescents, the academically-advantaged, and non-ethnic minority students ) have only non-satisfactory knowledge. We regard this as indicative that schools, parents, primary care physicians, public health authorities, and other providers of sexual health information fail to communicate the most basic facts about STIs beyond HIV, even to the most accessible population groups. The recent launch of the first (non-HIV) STI awareness campaign by the BZgA is a much needed initiative towards improving STI knowledge. However, in a country with compulsory school education, we regard schools as the most promising vector to multiply relevant health information and reach virtually all adolescents. For this, it is imperative that STIs and STI prevention are explicitly included in the school curriculum. The current state curriculum in Berlin, unfortunately, falls short in this respect Condoms are the only prevention method, and "HIV/AIDS" the sole STI specifically included in the curriculum. Comprehensive teacher-delivered school tuition on STIs and preventive instruments could address the widespread information gap that is highlighted by our study, as could the co-optation of external providers of STI prevention education into schools. Beyond schools, STI information can-and should-also be spread through other means, for example through healthcare professionals, social media channels, mass media campaigns, and through peer education programmes. A multidimensional approach combining different channels of access to adolescents bears the promise to improve STI knowledge, and thus potentially curtail the increasing rates of new infections and lower the rate of long-term sequelae of infection. Strengths and Limitations The relatively large number of participants from a sample of schools of all three types of Berlin public schools represents a strength of the study, as does the virtually complete rate of participation. Only 13 out of a total of 287 eligible schools, however, took part in the study. Despite schools hailing from very diverse social and geographical settings, there might be a systemic difference between participating and non-participating schools, for example in terms of the teaching bodies' interest and openness regarding sexual health education. Furthermore, students were asked to evaluate their knowledge regarding STIs on a multiple choice questionnaire, which might have led to the over-reporting of knowledge as compared to a questionnaire in which participants were to list STIs in an open question. Conclusions Sexually transmitted infections pose a serious threat to individual as well as public health. Despite different effective instruments of primary and secondary prevention being readily available, their uptake is impeded by widespread lack of knowledge. This is especially true for adolescents and young adults, an age group that is particularly at risk of contracting an STI. Our study shows that across demographic divides, adolescents in Berlin, Germany suffer from a low level of knowledge on all of the most frequent STIs apart from HIV, despite their growing incidence. It is crucial that this lack of knowledge is addressed and that adolescents are educated on the threats that are posed by different infections, and on the existing and readily available methods to prevent, detect, and cure STIs. Knowledge is a necessary prerequisite to making an informed choice regarding STI prevention, screening, and treatment and schools as well as health information providers need to address current knowledge deficits. Supplementary Materials: The following are available online at www.mdpi.com/1660-4601/15/1/110/s1, Supplementary File 1: lack of awareness of STIs by gender, migrant background, and school type, Supplementary File 2: Correct answers on STI cures and vaccinations by migrant background, Supplementary File 3: Correct answers on STI cures and vaccinations by school type. |
Buddhist organizations are urging the government to implement five proposals to arrest the decline of Buddhist values and culture in Sri Lanka. The Venerable Medagama Dhammananda of the Asgiriya Chapter, Kandy read out these proposals at a meeting held at Ananda College, Colombo on October 3. The event was in connection with the republication of the Report of the Buddhist Committee of Inquiry that helped the SLFP victory of 1956. The report was reprinted to mark the 2550th Buddha Jayanthi and 50 years since the document was first published. All Buddhist organizations in the country were represented at the ceremony. The Ven. Dhammananda, who is also Project Director, `Jayagrahanaya Sri Lanka,' called upon the government to stop television programs that corrupt young minds and lower the level of language standards.
S.B.DThe United National Party’s National Organizer S. B. Dissanayaka vehemently attacked President Mahinda Rajapaksa and said the leader was suffering from a war mentality for the military campaigns he wages against the Liberation Tigers of Tamil Eelam(LTTE).He ridiculed the President and said the head of state was masquerading as Dutugemunu and Parakramabahu , two kings during the periods of Anuradhapura and Polonnaruwa kingdoms, who brought the country under one rule defeating foreign invasions and divisions. Dissanayaka was pardoned, only months ago, by President Mahinda Rajapaksa while he was languishing in a prison spending a jail term of two years RI for contempt of court.
While strongly refuting the figures provided by Burmese junta’s on the religious beliefs of the Burmese population, The National Democratic Party for Human Rights (NDPHR - exile) USA, pointed out that Muslim population in Burma is approximately 20 percent of the county’s total population, which amounts to 7 to 10 million people of the country. Meanwhile the State Peace & Development Council (SPDC), Burma in its population statistics report recorded that almost 90 percent of Burma’s population are Buddhist, 6 percent are Christians and 4 percent Muslims. NDPHR in its statement contradicted the Burma Government’s figures and said, "Unfortunately, this statistics is flawed and has grossly under estimated the non-Buddhist proportion of the population."
Nivard Cabraal The Governor of the Central Bank, Nivard Cabraal, has forecast that the Sri Lankan economy will grow at 7 - 8 % with a low unemployment record of 6.3 %. He cited these statistics in response to questions posed to him by the Asian Tribune. Sounding a positive note Cabral states:1. the Sri Lankan economy moved on to a high growth path as evident in economic indicators; 2. the monetary policy is aimed at curbing inflation and inflation expectations; and 3. external trade continues to expand.
The Jathika Hela Urumaya (JHU), advising the government to strengthen its security measures, warned of a massive attack by the Liberation Tigers of Tamil Eelam (LTTE) LTTE, which faces a serious set back after the Mavil Aru and Sampur victories. Puravidya Chakkrawarthi Ven. Ellawala Medananda Thera, Leader of the JHU and MP told the Asian Tribune that the JHU has enough evidences to show that the LTTE is preparing for a major attack. Ven Medananda thera, who returned after a tour in the East, said that LTTE was in the process of acquiring traditional homelands belong to Sinhala villagers.
Garment Industry in Sri Lanka at Cross Roads: Manufacturers concerned of high cost while the workers demand a "Living wage"
Initially the Free Trade Zone or better known then as the Investment Promotional Zones were basically set up to solve two major problems in Sri Lanka viz to solve unemployment and to earn more and more foreign exchange to boost the economy. As in all other investments, the first priority of the investor has been to ensure their share of return on the investment. Though every government enjoyed the benefits of FTZ and some even went on to criticize the whole programme, no one tried the shortcomings of it rectified such as lack of boarding facilities for these girls, the utter disgusting living conditions in their present boarding houses, their safety and sexual harassment and the worst among them all the utterly inadequate remuneration they receive.
Will it or will it not?
So finally the Center has come out with a clarification about the proposed ‘Joint Mechanism’ with Pakistan to deal with terrorism. It says, "The Group is mandated to deal with all forms of terrorism." And "there is no doubt in our minds as to what constitutes terrorism." If that is the case, it should clear the air in Pakistan as well, which has been coming out with official statements that the mechanism does not cover the lists of terrorists India has provided to it. Though the Prime Minister Dr. Manmohan Singh had said earlier also that the deal is off if Pakistan does not curb terror, an explicit official statement by India should clear all doubts, and thus, pave the way for the ‘Mechanism’ to come into being. And become an effective tool in fighting terrorism.
Tamils of Sri lanka will not accept any other solutions other than a federal solution based on Indian model said V. Anandasangaree, D. Sithardhan and T. Sritharan on their visit to New Delhi, when they met Indian Leaders to appraised them. They emphasized, despite the fact that some political leaders in the South are opposed to the term "Federal," the Tamils support an ‘Indian Model’ which is welcomed by many people. They categorically stated that "the Tamils will not accept any other solution. The main topic for discussion at all levels was the ethnic issue. Disputing the claim of some others, who had mis-represented facts, we pointed out that in the fifty year history of the ethnic problem, for the first time two major political parties that take turns to rule the country, had committed to a Federal Solution.," a statement released by V. Anandasangaree, Leader of the Tamil United Liberation front revealed. |
# https://stackoverflow.com/questions/15853469/putting-current-class-as-return-type-annotation
# can't use this while supporting python 3.6 (PyPy 7.3), have to use strings for now
# from __future__ import annotations
from typing import Any, Dict, Iterable, Optional, List, TYPE_CHECKING, cast
from typing_extensions import TypedDict
import sympy as sp
import numpy as np
import pyomo.environ as pyo
from sympy import Matrix as Mat
from . import utils, symdef, visual
from .node import Node
from .variable_list import VariableList
PlotConfig = TypedDict('PlotConfig', shape=str, linewidth=float, color=str)
class Link3D:
def __init__(self, name: str, aligned_along: str, *,
start_I: Optional[Mat] = None,
base: bool = False,
meta: Iterable[str] = tuple(),
mass: Optional[float] = None,
length: Optional[float] = None,
radius: Optional[float] = None
):
"""
Define a 3D link. Assumes the link is vertical, ie aligned with the z-axis
name:
name of the link
start_I:
the location of the start of the link in inertial coordinates
base:
whether this link is the/a base link
meta:
information which qualitatively describes a link, like 'spine', 'leg', etc
"""
# assert sum([top_I is not None, bottom_I is not None, base is True]) == 1,\
# 'Only one of top_I, bottom_I or base can be specified'
assert (start_I is not None) ^ (base is True), \
'A link must either be given an offset, or be a base link'
acceptable_args = ('+x', '+y', '+z', '-x', '-y', '-z')
assert aligned_along in acceptable_args,\
f'Align the link along the x, y or z axes. Got {aligned_along}, must be one of {acceptable_args}'
self.mass_sym = sp.Symbol('m_{%s}' % name)
self.length_sym = sp.Symbol('L_{%s}' % name)
self.radius_sym = sp.Symbol('r_{%s}' % name)
self.mass, self.length, self.radius = mass, length, radius
self.name = name
self.is_base = base
self.q, self.dq, self.ddq = symdef.make_ang_syms(name)
angles = self.q # used for defining rotation matrix
if base is True:
xyz, dxyz, ddxyz = symdef.make_xyz_syms(name)
self.q = Mat([*xyz, *self.q])
self.dq = Mat([*dxyz, *self.dq])
self.ddq = Mat([*ddxyz, *self.ddq])
else:
xyz = None
# rotation matrix from body to inertial
self.Rb_I = utils.euler_321(*angles).T
I_len = (self.mass_sym * self.radius_sym**2)/2
I_wid = (self.mass_sym * self.length_sym**2)/12
if aligned_along.endswith('x'):
self.inertia = sp.diag(I_len, I_wid, I_wid)
offset_b = Mat([-self.length_sym/2, 0, 0])
elif aligned_along.endswith('y'):
self.inertia = sp.diag(I_wid, I_len, I_wid)
offset_b = Mat([0, -self.length_sym/2, 0])
else:
self.inertia = sp.diag(I_wid, I_wid, I_len)
offset_b = Mat([0, 0, -self.length_sym/2])
if aligned_along.startswith('-'):
offset_b = -offset_b
# positions in body and inertial axes
if self.is_base:
assert xyz is not None # a type hint for mypy
self.Pb_I = xyz
self.top_I = self.Pb_I + self.Rb_I @ offset_b
else:
assert start_I is not None # a type hint for mypy
self.top_I = start_I
self.Pb_I = self.top_I - self.Rb_I @ offset_b
self.bottom_I = self.Pb_I - self.Rb_I @ offset_b
# defining other things for later use
self.constraint_forces: List[sp.Symbol] = []
self.angle_constraints: List['sp.Expression'] = []
self._plot_config: PlotConfig = {
'shape': 'line',
'linewidth': 2.,
'color': 'tab:orange',
}
self.aligned_along = aligned_along
from typing import Set as _Set
from . import meta as _meta
self.meta: _Set[str] = set(meta)
assert _meta.is_valid(self.meta)
self.nodes: Dict[str, Node] = {}
def calc_eom(self, q: Mat, dq: Mat, ddq: Mat) -> Mat:
if len(self.angle_constraints) > 0:
J_c = Mat(self.angle_constraints).jacobian(q)
Fr = Mat(self.constraint_forces)
Q = J_c.T @ Fr
else:
Q = sp.zeros(len(q), 1) # type: ignore
for node in self.nodes.values():
Q += node.calc_eom(q, dq, ddq)
return Q
def add_hookes_joint(self, otherlink: 'Link3D', about: str) -> 'Link3D':
"""Add a hooke's joint about axis `about` of `self`
>>> link_body.add_hookes_joint(link_UFL, about='xy')
"""
assert all(ax in ('x', 'y', 'z') for ax in about) and len(about) == 2
axes = Mat([1, 0, 0]), Mat([0, 1, 0]), Mat([0, 0, 1])
vec1 = axes['xyz'.index(about[0])]
vec2 = axes['xyz'.index(about[1])]
ang_constr = (
(self.Rb_I @ vec1).dot(otherlink.Rb_I @ vec2)
)
self.angle_constraints.append(ang_constr)
self.constraint_forces.append(
sp.Symbol('F_{r/%s/%s}' % (self.name, otherlink.name))
)
return self
def add_revolute_joint(self, otherlink: 'Link3D', about: str) -> 'Link3D':
"""Adds a revolute connection about axis `about` of `self`
>>> link_UFL.add_revolute_joint(link_LFL, about='y')
"""
assert about in ('x', 'y', 'z')
axes = Mat([1, 0, 0]), Mat([0, 1, 0]), Mat([0, 0, 1])
constraint_axis = axes['xyz'.index(about)]
other_axes = [mat for idx, mat in enumerate(axes)
if idx != 'xyz'.index(about)]
self.angle_constraints.extend([
(self.Rb_I @ constraint_axis).dot(otherlink.Rb_I @ other_axes[0]),
(self.Rb_I @ constraint_axis).dot(otherlink.Rb_I @ other_axes[1]),
])
self.constraint_forces.extend(
sp.symbols('F_{r/%s/%s/:2}' % (self.name, otherlink.name))
)
return self
def add_vars_to_pyomo_model(self, m: pyo.ConcreteModel) -> None:
for attr in ('mass', 'length', 'radius'):
assert isinstance(getattr(self, attr), float),\
f'The {attr} for {self.name} must be set to a float'
if self.is_base:
q_set = pyo.Set(initialize=('x', 'y', 'z', 'phi', 'theta', 'psi'),
name='q_set', ordered=True)
else:
q_set = pyo.Set(initialize=('phi', 'theta', 'psi'),
name='q_set', ordered=True)
Fr_set = pyo.Set(initialize=range(len(self.constraint_forces)),
name='Fr_set', ordered=True)
q = pyo.Var(m.fe, m.cp, q_set, name='q', bounds=(-100, 100))
dq = pyo.Var(m.fe, m.cp, q_set, name='dq', bounds=(-1000, 1000))
# the bounds are more or less arbitrary!
ddq = pyo.Var(m.fe, m.cp, q_set, name='ddq', bounds=(-10_000, 10_000))
# constraint (reaction) forces (multiples of BW)
Fr = pyo.Var(m.fe, m.cp, Fr_set, name='Fr', bounds=(-2, 2))
mass = pyo.Param(initialize=self.mass, name='mass')
length = pyo.Param(initialize=self.length, name='length')
radius = pyo.Param(initialize=self.radius, name='radius')
self.pyomo_params: Dict[str, pyo.Param] = {
'mass': mass, 'length': length, 'radius': radius,
}
self.pyomo_sets: Dict[str, pyo.Set] = {
'q_set': q_set, 'Fr_set': Fr_set,
}
self.pyomo_vars: Dict[str, pyo.Var] = {
'q': q, 'dq': dq, 'ddq': ddq, 'Fr': Fr,
}
utils.add_to_pyomo_model(m, self.name, [
self.pyomo_params.values(),
self.pyomo_sets.values(),
self.pyomo_vars.values(),
])
if self.is_base:
for fe in m.fe:
for cp in m.cp:
q[fe, cp, 'z'].setlb(0)
for node in self.nodes.values():
node.add_vars_to_pyomo_model(m)
def add_equations_to_pyomo_model(self,
sp_variables: List[sp.Symbol],
pyo_variables: VariableList,
collocation: str):
q = self.pyomo_vars['q']
dq = self.pyomo_vars['dq']
ddq = self.pyomo_vars['ddq']
q_set = self.pyomo_sets['q_set']
m = q.model()
# add collocation
from .collocation import get_collocation_func
collocation_func = get_collocation_func(collocation)
setattr(m, self.name + '_collocation_q',
pyo.Constraint(m.fe, m.cp, q_set, rule=collocation_func(q, dq)))
setattr(m, self.name + '_collocation_dq',
pyo.Constraint(m.fe, m.cp, q_set, rule=collocation_func(dq, ddq)))
# # while we're here, also make equations for the top and bottom of the link:
# self.lineanimation = visual.LineAnimation(
# self.top_I, self.bottom_I, sp_variables)
self._sp_variables = sp_variables
for node in self.nodes.values():
node.add_equations_to_pyomo_model(
sp_variables, pyo_variables, collocation
)
def get_pyomo_vars(self, fe: int, cp: int) -> List:
"""fe, cp are one-based!"""
# NB: keep in sync with get_sympy_vars()!!
node_vars = []
for node in self.nodes.values():
node_vars.extend(node.get_pyomo_vars(fe, cp))
v = self.pyomo_vars
p = self.pyomo_params
frset = self.pyomo_sets['Fr_set']
return [
*v['q'][fe, cp, :],
*v['dq'][fe, cp, :],
*v['ddq'][fe, cp, :],
# using *v['Fr'][fe, cp, :] caused a bug in a newer pyomo version
# maybe switch back at some point?
*[v['Fr'][fe, cp, f] for f in frset],
p['mass'], p['length'], p['radius'],
*node_vars,
]
def get_sympy_vars(self) -> List[sp.Symbol]:
# NB: keep in sync with get_pyomo_vars()!!
node_vars = []
for node in self.nodes.values():
node_vars.extend(node.get_sympy_vars())
return [
*self.q,
*self.dq,
*self.ddq,
*self.constraint_forces,
self.mass_sym, self.length_sym, self.radius_sym,
*node_vars,
]
def __getitem__(self, varname: str) -> pyo.Var:
return self.pyomo_vars[varname]
def save_data_to_dict(self) -> Dict[str, Any]:
q_set = self.pyomo_sets['q_set']
Fr_set = self.pyomo_sets['Fr_set']
return {
'name': self.name,
'is_base': self.is_base,
'meta': self.meta,
'mass': self.mass,
'length': self.length,
'radius': self.radius,
'q': utils.get_vals(self.pyomo_vars['q'], (q_set,)),
'dq': utils.get_vals(self.pyomo_vars['dq'], (q_set,)),
'ddq': utils.get_vals(self.pyomo_vars['ddq'], (q_set,)),
'Fr': utils.get_vals(self.pyomo_vars['Fr'], (Fr_set,)) if len(Fr_set) > 0 else [],
'nodes': [node.save_data_to_dict() for node in self.nodes.values()],
}
def init_from_dict_one_point(self, data: Dict[str, Any],
fed: int, cpd: int,
fes: Optional[int] = None, cps: Optional[int] = None,
**kwargs
) -> None:
if fes is None:
fes = fed - 1
if cps is None:
cps = cpd - 1
assert self.name == data['name'] and self.is_base == data['is_base']
for attr in ('meta', 'mass', 'length', 'radius'):
if getattr(self, attr) != data[attr]:
visual.warn(
f'Attribute "{attr}" of link "{self.name}" is not the same as the data: {getattr(self, attr)} != {data[attr]}')
for qstr in ('q', 'dq', 'ddq'):
for idx, state in enumerate(self.pyomo_sets['q_set']):
utils.maybe_set_var(
self.pyomo_vars[qstr][fed, cpd, state], data[qstr][fes, cps, idx], **kwargs)
if len(data['Fr']) > 0:
for idx, F in enumerate(self.pyomo_sets['Fr_set']):
utils.maybe_set_var(
self.pyomo_vars['Fr'][fed, cpd, F], data['Fr'][fes, cps, idx], **kwargs)
for node, nodedata in zip(self.nodes.values(), data['nodes']):
node.init_from_dict_one_point(
nodedata, fed, cpd, fes, cps, **kwargs)
# Optional[Union[Literal['line'],Literal['box']]]
def plot_config(self, *, color: Optional[str] = None,
shape: Optional[str] = None,
linewidth: Optional[float] = None) -> 'Link3D':
"""Configuration for how this link should be plotted"""
# TODO: Still thinking about what's actually useful here. Not sure if this is a
# wise move - we are essentially just overwriting defaults, to some extent?
if color is not None:
self._plot_config['color'] = color
if shape is not None:
assert shape in ('line', 'cylinder')
self._plot_config['shape'] = shape
if linewidth is not None:
self._plot_config['linewidth'] = linewidth
return self
def animation_setup(self, fig, ax, data: List[List[float]]):
if self._plot_config['shape'] == 'line':
self.lineanimation = visual.LineAnimation(
self.top_I, self.bottom_I, self._sp_variables)
else:
assert self.radius is not None
self.lineanimation = visual.CylinderAnimation(
self.top_I, self.bottom_I, self._sp_variables, radius=self.radius, nsides=20)
self.lineanimation.animation_setup(fig, ax, data)
# line = self.lineanimation.line
# line.set_linewidth(self._plot_config['linewidth'])
# line.set_color(self._plot_config['color'])
for node in self.nodes.values():
node.animation_setup(fig, ax, data)
def animation_update(self, fig, ax, fe: Optional[int] = None,
t: Optional[float] = None, t_arr: Optional[np.ndarray] = None,
track: bool = False):
self.lineanimation.animation_update(fig, ax, fe, t, t_arr, track)
line = self.lineanimation.line
try:
line.set_linewidth(self._plot_config['linewidth'])
except:
pass
line.set_color(self._plot_config['color'])
for node in self.nodes.values():
node.animation_update(fig, ax, fe=fe, t=t, t_arr=t_arr)
def cleanup_animation(self, fig, ax):
self.lineanimation.cleanup_animation(fig, ax)
for node in self.nodes.values():
node.cleanup_animation(fig, ax)
def plot(self, save_to: Optional[str] = None) -> None:
m = self.pyomo_vars['q'].model()
q_set = self.pyomo_sets['q_set']
q = utils.get_vals(self.pyomo_vars['q'], (q_set,))
dq = utils.get_vals(self.pyomo_vars['dq'], (q_set,))
ddq = utils.get_vals(self.pyomo_vars['ddq'], (q_set,))
import matplotlib.pyplot as plt
def _plt(var, title: str):
# plot using multiple axes, as in this SO link:
# https://stackoverflow.com/a/45925049
# or this: https://matplotlib.org/gallery/api/two_scales.html
if self.is_base: # plot x,y,z separately to angles
# typing this as 'Any' because the method accesses following give
# false warnings otherwise...
fig = plt.figure()
ax1 = plt.subplot()
ax1.plot(var[:, :3])
ax1.legend(list(q_set)[:3])
ax1.set_ylabel('positions [m]')
ax1.set_xlabel('Finite element')
ax2 = ax1.twinx()
colors = [next(ax1._get_lines.prop_cycler)['color']
for _ in range(3)]
for i, color in enumerate(colors):
ax2.plot(var[:, 3+i], color=color)
ax2.legend(list(q_set)[3:])
ax2.set_ylabel('angles [rad]')
else:
fig = plt.figure()
ax = plt.subplot()
ax.plot(var)
ax.legend(q_set)
plt.xlabel('Finite element')
plt.ylabel('angles [rad]')
plt.grid(True)
plt.title(title)
plt.tight_layout()
if save_to is not None:
plt.gcf().savefig(
f'{save_to}{title.split()[1]}-{self.name}.pdf')
else:
plt.show()
ncp = len(m.cp)
_plt(q[:, ncp-1, :], f'State positions in {self.name}')
_plt(dq[:, ncp-1, :], f'State velocities in {self.name}')
_plt(ddq[:, ncp-1, :], f'State accelerations in {self.name}')
try:
Fr_set = self.pyomo_sets['Fr_set']
Fr = utils.get_vals(self.pyomo_vars['Fr'], (Fr_set,))
plt.plot(Fr[:, ncp-1, :])
plt.legend(Fr_set)
plt.grid(True)
plt.title('Constraint forces in link ' + self.name)
plt.xlabel('Finite element')
plt.ylabel('$F_c$ [N/body_weight]')
plt.show()
except StopIteration:
pass
for node in self.nodes.values():
node.plot(save_to=save_to)
def __repr__(self) -> str:
nodes = ',\n '.join(str(node) for node in self.nodes.values())
nodes = f', nodes=[\n {nodes}]' if len(nodes) > 0 else ''
return f'Link3D(name="{self.name}", isbase={self.is_base}, mass={self.mass}kg, length={self.length}m, radius={self.radius}m{nodes})'
if TYPE_CHECKING:
from pyomo.core.base.indexed_component_slice import _IndexedComponent_slice
def constrain_rel_angle(m: pyo.ConcreteModel, constr_name: str,
lowerbound: float, angle1: '_IndexedComponent_slice',
angle2: '_IndexedComponent_slice', upperbound: float):
"""
>>> constrain_rel_angle(robot.m, 'knee',
... 0, thigh[:, :, 'theta'], calf[:, :, 'theta'], π/2)
"""
# TODO: maybe switch to something like:
# >>> diffs = [ang1-ang2 for ang1,ang2 in zip(angle1, angle2)]
# or use this:
# https://pyomo.readthedocs.io/en/stable/library_reference/kernel/constraint.html
# what follows is some _horribly_ hacky code...
# one iterable each for upper and lower bounds
ang_1_up = iter(angle1)
ang_1_lo = iter(angle1)
ang_2_up = iter(angle2)
ang_2_lo = iter(angle2)
# _fe and _cp are unused
# pyomo.environ.inequality is unused, but seems like it would be
# for this. I recall due to some bug with it.
# Could be worth sorting that out?
def func(m: pyo.ConcreteModel, _fe, _cp, bound: str):
if bound == '+':
ang1 = next(ang_1_up)
ang2 = next(ang_2_up)
# make sure fe/cp match up for both links
assert ang1.index()[:2] == ang2.index()[:2]
return ang1 - ang2 <= upperbound
elif bound == '-':
ang1 = next(ang_1_lo)
ang2 = next(ang_2_lo)
# make sure fe/cp match up for both links
assert ang1.index()[:2] == ang2.index()[:2]
return lowerbound <= ang1 - ang2
name = f'rel_angle_{constr_name}'
setattr(m, name, pyo.Constraint(m.fe, m.cp, ('+', '-'), rule=func))
# def func(m: pyo.ConcreteModel, ang1, ang2, bound: str):
# # make sure fe/cp match up for both links
# assert ang1.index()[:2] == ang2.index()[:2]
# if bound == '+':
# return ang1 - ang2 <= upperbound
# elif bound == '-':
# return lowerbound <= ang1 - ang2
# name = f'rel_angle_{constr_name}'
# setattr(m, name, pyo.Constraint(angle1, angle2, ('+', '-'), rule=func))
|
Lexus IS (XE20)
Development
After commencement of U.S. sales of the XE10 in 2000, development begun on its successor, the XE20 under chief engineer Suguya Fukusato in 2001. Design work was done under Kengo Matsumoto for a period of 2 years from 2002 into late 2003 when the final conceptual design by Hiroyuki Tada, utilizing the new corporate styling theme of L-finesse was chosen. From 2003 into the first half of 2004, the conceptual design was further refined into the production design specifications, being then approved by the executive board. Design patents were filed in September 2004 in Japan, on 18 February 2005 in Europe, and 25 February 2005 at the United States Patent Office upon conclusion of development in early 2005.
Exterior and interior
The second generation Lexus IS was the second debut of Lexus' new L-finesse design philosophy on a production vehicle, following the premiere of the 2006 Lexus GS performance sedan. The new IS design featured sleeker, coupe-like contours, a fastback profile, and a repeated arrowhead motif in the front fascia and side windows based on the Japanese concept of kirikaeshi, referring to angular movements. The forward design was reminiscent of the earlier Lexus LF-C coupe concept. Compared to its predecessor, the second generation IS was 3.5 inches (89 mm) longer and nearly 3 inches (76 mm) wider, largely due to a 2.3 inches (58 mm) wheelbase stretch. The grille was set at a lower level than the headlights. The new IS body resulted in a 0.28 Cd figure.
The second generation IS interior features leather seats, lightsaber-like electroluminescent instrument display lighting and LED interior lighting accents, 10-way (including lumbar) driver and front passenger power seats, and the choice of faux-metallic or optional Bird's Eye Maple wood grain trim made by Yamaha piano craftsmen from sustainable plantations. The interior design also derived elements from Japanese concepts, including hazushi, where an object retains individuality while being part of a large whole, as typified in side air vents. Other available interior features include perforated leather seats, heated and ventilated front seats, power tilt/telescoping steering wheel, moonroof, electrochromic side view mirrors, power rear sunshade, and aluminum scuff plates.
Safety systems
The Lexus IS features standard dual front airbags, front row knee airbags, front and rear side curtain airbags, and front side torso airbags. The new IS also debuted its manufacturer's latest twin-chamber, V-shaped front passenger airbag. Initially, the IS 250 came with the Vehicle Stability Control (VSC) system while the IS 350 used a more advanced VDIM system which reacts sooner with less intrusive operation. A Pre-Collision System (PCS) is the first offered in the entry-luxury performance sedan market segment.
National Highway Traffic Safety Administration (NHTSA) crash test results in 2008 rated the IS the maximum five stars in the Side Driver and Rollover categories, and four stars in the Frontal Driver, Frontal Passenger, and Side Rear Passenger categories. Euro NCAP scores were the maximum five stars in Adult Occupant, four stars in Child Occupant, and two of four stars in Pedestrian test categories. The Insurance Institute for Highway Safety gives the Lexus IS sedan a "Good" overall score for both front and side impact tests, and also ranks the IS "Good" in all fourteen measured categories in the front and side impact crash tests.
Technical features
For the IS 250, IS 350, and IS F, engines feature the manufacturer's D-4S direct injection system; these models are ULEV-II emission certified in the United States by the California Air Resources Board. The IS line also features an Electric Power Steering (EPS) system which replaces the previous hydraulic steering pump.
Technical features on the second generation Lexus IS further include rain-sensing wipers, Intuitive Park Assist (IPA), bi-xenon headlamps, Adaptive Front-lighting System (AFS), and Dynamic Radar Cruise Control. Lexus' SmartAccess keyless entry with push-button start is a standard feature along with a memory system that can recall driver's seat, side mirror, and steering positions. A high-resolution 7" touchscreen DVD-based Gen V navigation system with voice recognition, Bluetooth, a backup camera, and a 14-speaker Mark Levinson premium sound system are available as options.
Updates
In response to criticism regarding the lack of a stability/traction control disable switch on 2006 IS models, Lexus added a VDIM/VSC off switch for the 2007 model year. For 2006 IS models, the stability control system/traction control system can be disabled through non-conventional methods by using a code during engine start.
In the 2007 IS models, in addition to the on/off switch for the traction-control system, Lexus added a roof-mounted shark-fin antenna in some markets. (The Australian delivered IS models did not receive the fin-style antenna until its first appearance on the IS F in 2008). For 2008 models, the steering system was tweaked for improved steering feel and the rear seats were modified to improve rear room.
The 2008 mid-cycle refresh for the 2009 model year (designed by Takahiro Kanno in 2007) included revised interior and exterior styling, the suspension and steering was retuned for improved stability and control, and the IS 250 also gained VDIM as standard for the 2009 model year. In 2009, Masanari Sakae designed revisions to the IS Line, which were patent registered in November 2009 in Japan and 27 April 2010 in Europe. In the second quarter of 2010 (2011 MY), these new revisions were introduced, featuring a refreshed exterior with new wheels, LED daytime running lights, additional interior features, and dedicated IS F-Sport production models.
GSE20 / GSE21 (2005)
The IS 250 (GSE20) went on sale in 2005 in Japan and North America in RWD (GSE20) and IS 250 AWD (GSE25) configuration, along with the more powerful rear-wheel drive IS 350 (GSE21) sedan. The IS 250 RWD comes standard with a 6-speed manual transmission, and a 6-speed automatic transmission is available as an option. All other gasoline-powered IS sedans are only available with the automatic.
The IS 350 shares larger braking discs and calipers borrowed from the GS 430; the IS 350's larger calipers are four-piston rather than the two-piston front calipers of the IS 250.
Citing independent testing by auto research firm AMCI, Lexus highlighted the IS 350's acceleration as the "fastest in its class" at its launch (see also: Lexus IS performance specifications). Some reviewers noted the second generation models as Lexus' first foray into the sport compact market that compared fairly well with its German competitors. However, some criticisms were that its steering was not as communicative as that of some rivals, the rear seat legroom (while improved over the first generation) was still tight, and that the six-speed manual was only available on the IS 250. However, the IS' performance has also been praised, for example in a February 2007 Road & Track Japanese luxury sports sedan comparison, in which the IS 350 took first place.
ALE20 / GSE22 (2006)
Introduced for sale in European markets in 2006, the IS 220d (ALE20) was the first diesel-powered Lexus ever produced. The IS 220d featured a 2.2 L 2AD-FHV Inline-4 diesel engine, capable of 175 hp (130 kW), and rear wheel drive. The IS 220d was only offered with a manual transmission. Introduced to Chinese and Middle Eastern markets in 2006, the IS 300 (GSE22) was tailored to the fuel requirements of those regions, with a 3.0 L 3GR-FE V6 engine (without direct injection), 228 hp (170 kW), and rear wheel drive. The IS 300 was also introduced to the Brunei, Indonesia, and Philippines markets.
GSE20 / GSE21 (2008)
After three years with only one body style, the IS returned with a second body style, this time in hardtop convertible form, debuting as the IS 250 C on 2 October 2008 at the Paris Motor Show. A more powerful IS 350 C also became available, with engine specifications analogous to those on the sedan models.
The IS convertible features a three-piece aluminum hardtop that can retract in 21 seconds, a roof-brake mechanism slows panels as they close and near the windshield. The IS 250 C and IS 350 C are offered with a six-speed automatic, while the IS 250 C was offered a manual transmission and all-wheel-drive version. However, as of 2015, the IS C is only available as rear-wheel-drive. The IS convertible's body has a drag coefficient of Cd=0.29.
Sportier models of both trims are available in the form of the IS250 C F-Sport and IS350 F-Sport. As of 2015 these models are the only F-Sport Lexus's to be offered with a wide variety of performance options such as a "F-Sport Air Intake" and "F-Sport Sway Bars" but just like the other Lexus F-Sport models it is offered with a wide variety of wheel choices.
The IS 250 C went on sale in Europe in 2009, with IS convertible sales for North America targeted for May 2009 as a 2010 model. An IS 300 C is also being produced for certain regions.
ALE20 (2010)
In 2010, coinciding with the second IS line refresh, the IS 220d was replaced with the more efficient IS 200d, whose improved consumption figures were due to engine retuning. All-wheel drive options were also expanded besides the IS 250 AWD with the addition of the IS 350 AWD model in major markets.
F marque models
During 2005 and 2006, several automotive publications reported on rumors of a higher performance variant of the IS being tested at various stages of development. Spy photos of such a vehicle being tested in Germany and California were published in several magazines and websites. Among these spy reports, several photos were shown of a heavily modified and camouflaged IS sedan at the Nürburgring test track in Germany along with other disguised Lexus test vehicles. The previous generation IS 430 prototype vehicle was indicative of future possibilities for the IS series, including the likelihood that a second generation high-performance IS model could come equipped with a V8 engine. It was rumored that there would be a coupe and a convertible version for a 2009 model, as well as a convertible version of the V8-powered IS.
IS F Racing Concept (2008)
At the 2008 Tokyo Auto Salon, the IS F Racing Concept was shown. Few details were released at the show, other than that the concept was the work of chief engineer Yukihiko Yaguchi who built the concept "just for fun", to show "true driving pleasure", and exhibit a potential IS F race car. The IS F Racing Concept had larger fenders, wheels, and spoilers, in a similar manner as DTM racing cars. Reports at the event suggested that the vehicle was not planned for actual racing; rather instead different IS F models were being prepared for racing. The IS F later made its racing debut in VLN competition (see Lexus IS (XE20) in motorsport).
IS F police car (2009–)
It is a version of Lexus IS F supplied by Steve Kelly, Centre Principal at Lexus Hull who has been working closely with the Humberside police regarding the sale, as a replacement for Subaru police vehicles. Changes include computer platform to access all police records, 4 video cameras recording road in all directions, 2 hi-tech radio communication systems. The vehicle was used as the 'command car' for the Humberside police force's Vehicle Crime Unit.
IS F Circuit Club Sports (2010)
The CCS is a version of IS F sedan with a carbon fiber reinforced polymer hood, trunk and rear spoilers, along with a rear titanium muffler, 19-inch magnesium wheels, and modified suspension and brakes. The carbon fiber components were produced using technology developed for the Lexus LFA supercar. The vehicle also featured additional aero parts, and a separate bright orange color scheme, increased engine power to 428 horsepower (319 kW).
The vehicle was unveiled in 2010 Tokyo Auto Salon.
IS F Evolution
It was reported to be a version of IS F sedan with weight reduction (by 300 lbs), handling mods and brake upgrades. Front and rear bumpers, along with the front fenders, are replaced by carbon fiber parts. It uses 245/35R19 front and 275/30R19 tires, carbon ceramic brakes. Interior also incorporates carbon fiber parts and Recaro racing seats.
IS F-Sport
At the 2007 SEMA show, Lexus had a formal presence at the aftermarket convention for the first time, and launched a line of "F-Sport" parts and accessories for the IS 250/350. The F-Sport line, including performance and accessory upgrades such as big brake kits, shocks, lowering springs, sway bars, chassis brace, light weight wheels, air intake, exhaust, engine cover, floor mats, shift knobs and also clutch for manual drive, was later expanded to the full IS lineup.
At the 2009 SEMA Show, the F-Sport line also released upgrades for IS 250 AWD and IS Convertible models.
Elegant White edition (2007–)
It is a limited (700 units) edition of the IS 250 and IS 350 for Japan market. It included a custom two-tone interior.
IS 250 X (2007–)
Lexus introduced a new badge into its lineup in 2007 – a new "X-Package" which was introduced into a number of countries. In the Australian market, it was introduced to celebrate the sale of the 5000th IS 250 in Australia. The IS 250 X came standard with: sport tuned suspension, exclusive 18-inch alloy five-spoke wheels, premium Mark Levinson 14 speaker stereo, moonroof, satellite navigation, illuminated scuff plates, rear camera and sports pedals, and a front lip spoiler. The "X" also came in 3 colors: Onyx Black, Vermillion Red and Metallic Silver. In order to retain the "exclusive" image, only 260 were released in the 2007 calendar year. The pricing started at A$64,390 for the 6-speed manual and rose to A$66,990 for the 6-speed semi-automatic.
There were a number of changes made to the 2008 IS 250 X model. These included: changes to the steering system resulting in an improved steering feel, modified rear seats to improve rear room and the added choice of a new exterior colour – Arctic Blue. Lexus Australia also announced that 450 units would be released, compared to the 260 released the previous year. Production of the IS 250 X ceased in 2008.
Neiman Marcus 2008 Lexus IS F Special Build Sedan
It is a limited (50 units) version of IS F sedan sold by Neiman Marcus. Priced at US$68,000, the Neiman Marcus edition had a custom black with white accented interior with exterior black color. Each vehicle was individually numbered, and the owner also received a training session at the Skip Barber Racing School.
IS 250 SR (2008)
It is a limited (1000 units) version of IS 250 for the UK market. It included a full body kit, 17-inch 10-spoke alloy wheels, optional 18-inch Tsuki rims, Worcester Black interior fabric, with optional sports pedals and heated front seats.
Red-Edge Black edition (2009–)
It is a limited (500 units) edition of the IS 250 and IS 350 for Japan market. It included largely black leather interior with red trim.
2010 IS 350 C F-Sport (2010)
It is a limited (100 units) version of IS 350 C with 19-inch alloy wheels, special edition badging, a new front grille, lowered and upgraded sport suspension, larger brakes, and special blue interior stitching on black leather seats.
The vehicle went on sale in late March 2010 for US$57,500.
IS SUNRISE (2010)
It is a concept vehicle based on IS 250 sedan designed in conjunction with Spanish design duo Stone Designs, commemorating the fifth anniversary of the launch of Lexus Japan. The IS "Sunrise" model included a multi-tone interior with contrast seat leather hues of white, blue, and gray.
Motorsport
In 2008, the second generation IS 350 was entered in the Super GT race series in the GT300 class (cars with approximately 300 horsepower). Extensively modified from the factory car, with upgrades including a V8 engine, the No. 19 Team Racing Project Bandoh IS 350 driven by Manabu Orido and Tsubasa Abe achieved its first victory in its fifth race at the Motegi GT300 race. Other IS 350 GT300 competitors included those of the WedsSport and Green Tec/Kumho teams. In 2009, two manufacturer sanctioned Racing Project/Bandoh and Team Reckless/Shift IS 350s were also announced for competition, both equipped with 3.0L V8 engines. The Project Bandoh WedsSport IS 350, driven by Manabu Orido and Tatsuya Kataoka, won both driver and team title in the GT300 class that season.
In 2009, Gazoo Racing produced a Lexus IS F VLN racing vehicle, which was entered in the SP8 class of the ADAC-Westfalenfahrt VLN 4h endurance race. The vehicle finished second to the team's Lexus LF-A in the race. The IS F VLN racer was also entered in the 2009 24 Hours Nürburgring race and finished third in the SP8 class. The IS F was also later entered in the DMV Grenzlandrennen VLN 4h endurance race in August 2009 where it won the SP8 class. In Gazoo's win at the DMV Grenzlandrennen VLN race on 29 August 2009, Kazunori Yamauchi, the developer of Gran Turismo series who had little experience in actual motorsport, was also one of their drivers, along with Peter Lyon and Hideshi Matsuda. An IS F driven by Peter Lyon, Hideshi Matsuda, Kazunori Yamauchi, and Owen Mildenhall participated in the 2010 24 Hours Nürburgring and finished in 4th place in the SP8 class, behind the 1st place ranked Lexus LFA.
In 2012, Japanese drift racer Daigo Saito entered an IS 250 C in the Formula Drift Asia series. The car, which was a victim of the 2011 Japan earthquake and tsunami and due to be scrapped, was purchased by Saito and heavily customized for drift racing use. The most notable modification was the swapping of the stock engine to a 2JZ-GTE from a Mark IV Toyota Supra. With 1200 horsepower under the hood, Daigo obliterated the competition in that season, winning all the rounds and earning the championship in convincing fashion.
Awards
Several awards won by the second generation Lexus IS include J.D. Power best vehicle in the entry luxury class, 2006 Initial Quality Survey, Ward's 10 Best Engines awards in 2006 and 2007 for the IS 350, 2007 IF product design award from the International Forum Design group in Hannover, Germany, and the Canadian Car of the Year Awards' Best New Technology award in 2006. The IS was also the 2007 winner of the Intellichoice/AutoPacific Motorist Choice Award for Aspirational Luxury Cars, referring to the vehicle owners most desired in the luxury segment, and a finalist for Wheels magazine's Car of the Year (COTY) awards and the World Car of the Year (WCOTY) award in 2006.
In November 2009, the Lexus IS F was named Best New Sports / Performance Car over CDN$50,000 for the year by the Automobile Journalists Association of Canada (AJAC). In October 2008, the IS F received a Good Design Award from the Japanese Industrial Design organization. In April 2008, Evo magazine's test of the IS F awarded the vehicle the publication's highest rating of five stars. That same month, AutoWeek's comparison test of the IS F with the GT-R found the former to be the "more satisfying to drive" winner. Also in 2008, Car magazine named the IS F as a finalist for its Performance Car of the Year award.
Gaming
In March 2008, Atari released the freeware computer game, Lexus IS F Track Time. The program was created in partnership with Lexus and based on the IS F production model specifications. Designed by Image Space Incorporated (ISI) using their rFactor computer racing simulator software, the program allows users to configure and race the IS F. Three race courses are offered, namely Orchard Lake (an oval and road course), Toban Raceway (a road course), and Essington Park, Lienz (a mountain road and rally course). The software incorporates artificial intelligence modeling of competing vehicles, and its physics engine simulates actual driving conditions.
The race-prepped Lexus IS F which competed at the 24 Hours Nürburgring race in October 2009 carried a prototype of a "GPS-track day" unit co-developed by the Gran Turismo game designers and Lexus supplier Denso corporation. The unit allows a GPS recording of an actual track drive, which is then stored on a memory card. The recording can then be plugged into a PlayStation 3 where one can view a virtual recreation of the race, or compete against one's own race record.
Production
The second generation Lexus IS is produced in Tahara, Aichi, and Miyawaka, Fukuoka, Japan. In most markets sold, the IS has served as the compact member of the Lexus lineup, and it was the smallest Lexus model until the CT 200h.
Only 486 units of the Lexus IS F were sold in 2012. |
In most medical specialties, quantitative diagnostic imaging devices are utilized to assist physicians in diagnosis, operative plan development and postoperative analysis, offering accurate measurement and identification of possible complications. In breast augmentation and reconstructive surgery the main diagnostic tools utilized are the tape measure, calipers and camera in tandem with the physicians' “aesthetic artistry”. Although successful, reoperative rates for breast augmentation have remained high.
With breast surgery being one of the most common surgical procedures and with the introduction of varied types of breast implants, some of which are in an anatomical form, there is a high likelihood of continued if not increased reoperative rates. There would be a benefit to having a diagnostic system that can precisely measure the critical dimensional parameters to identify possible regions of complications, identification of patient asymmetries, appropriate sizing and selection of breast implants and operative plan development, and postoperative analysis and documentation. The present invention addresses this need and advances the art by providing new techniques for automatic recognition of anatomical landmarks and features. It is directed to provide consistent and precise measurements between these locations, determination of the breast volumes and identification of asymmetries, such that they are incorporated in a device to assist breast surgery. |
Moral Judgement Development in Higher Education: Insights from the Defining Issues Test This article reviews 172 studies that used the Defining Issues Test to investigate the moral development of undergraduate college students and provides an organisational framework for analysing educational contexts in higher education. These studies addressed collegiate outcomes related to character or civic outcomes, selected aspects of students' collegiate experiences related to moral judgement development and changes in moral reasoning during the college years as they related to changes in other domains of development. Findings suggest that dramatic gains in moral judgement are associated with collegiate participation, even after controlling for age and entering level of moral judgement. Although many studies used gross indicators of collegiate context (e.g. institutional type or academic discipline), studies that examine specific collegiate characteristics and educational experiences are better suited to identifying factors that contribute directly or indirectly to changes in moral judgement during the college years. Implications for student development practice and future research are discussed. |
Estimating adolescent cigarette consumption in Japan. We estimated the cigarette consumption among Japanese adolescents based on the data which was obtained from a 1990 nationwide school-based questionnaire survey of smoking prevalence among high school students. Cigarette consumption for adolescents was estimated using the data on current smokers' rate and cigarette consumption per day. Participants were 57,189 high school students (aged 13-18 years) including 4666 current smokers. The estimated adolescents' consumption was calculated at 3.5 to 4.3 billion units in 1990. The proportion of adolescents' consumption to the total sales was 1.1% to 1.3%. The corresponding tax amounted to between 21 and 25 billion yen in 1990. The difference between the total sales and the crude cigarette consumption for adults has increased gradually over 20 years. Logically, some part of this increase should be attributed to cigarettes consumed by adolescents. The increase in this difference seemed to keep pace with the increasing number of cigarette vending machines. These results indicate that a considerable amount of cigarettes were consumed by adolescents in 1990. |
Logic of modern educational paradigm: I. Kant versus J. Locke The paper contrasts the enlightenment and reflective educational paradigms on the basis of studying their underlying logic. The author argues that the enlightenment paradigm, developed by J.A. Comenius, is designed in accordance with inductive logic, which can be understood through actualization of J. Locke`s sensual epistemology and theory of a person as a reflective self-identity over time. In this paradigm, the emphasis is done on the teacher's activity in transferring knowledge to the pupil and shaping his personality. The author claims that the enlightenment paradigm of education is out of date and is not relevant to requirements of contemporary information society. Belief about cognition as passive reception of information by the senses and processing of this information by the mind disagrees with the conclusions made on the basis of research in cognitive science. And belief about a person as a thinking intelligent being, who is able to realize his or her identity over time and expand his or her experience, does not characterize it as an autonomous being capable of self-improvement. The paper proves that the transformation of educational paradigms is possible by changing views concerning the essence of cognitive process and the content of the concept of person. The deductive logic of reflective educational paradigms reveals through the actualization of I. Kant`s transcendental theory of knowledge and the normative theory of personhood. The author concludes that Kant's idea of the autonomy of reason in its theoretical and practical application should become the fundamental principle of the new education paradigm, within the scope of which the primary subject of the educational process is the pupil as representative of the humankind, endowed by nature with certain makings that need to be cultivated, that is to output to a higher level. The main difference between the reflective and the enlightenment paradigms, in the author's opinion, lies in the fact that within the first one the pupil is viewed as an active subject, having autonomy and capable of self-activity. In accordance with this, the entire educational process must be built on the horizontal-democratic principle. |
HONG KONG — On a holiday meant to celebrate the birth of China’s communist republic, Hong Kong residents instead swarmed the streets Wednesday to protest Beijing’s iron grip over their government and demand democratic reforms.
The massive crowds appeared to be one of the biggest amid a week of demonstrations that have brought large parts of the city to a standstill.
Throughout Hong Kong, it was a day of jarring images and symbolism as authorities tried to carry on with National Day celebrations only to have protesters respond with acts of emotional though peaceful defiance.
Hong Kong’s top official, Leung Chun-ying, began the morning sharing a champagne toast with other Chinese officials while demonstrators nearby booed and jeered. Then, as China’s national anthem played, a group of student protesters turned their backs on a Chinese flag being raised and silently crossed their arms above their heads in a gesture of objection to the Chinese government.
A ceremony planned later to honor Hong Kong war heroes was canceled. And an afternoon event at Victoria Park drew sparse attendance, even as massive crowds began converging near government headquarters, the heart of demonstrations in recent days.
Protest leaders also warned that pressures could intensify if authorities ignore their demands, which include Leung’s resignation and forcing Beijing to back down on plans to vet candidates in Hong Kong elections. The next step, protesters said, could be attempts to occupy key government buildings.
Such as move would be a major test for authorities, who have generally held back security forces since clashes on Sunday. Already, there are hints that Beijing’s patience is running out.
An editorial read on China’s state broadcaster CCTV said Hong Kong residents should not interfere with efforts to “deploy police enforcement decisively” and “restore the social order in Hong Kong as soon as possible,” according to the Associated Press.
The message also aimed at a wider audience — putting the entire nation on notice that protests inspired by Hong Kong would be tolerated. It may have caused some to think twice. In Macau — a former colony like Hong Kong with some degree of autonomy — just a few hundred protesters gathered late Wednesday for a demonstration of their own.
For many who have remained ambivalent about the Hong Kong demonstrations, the day was in many ways the culmination of months — and even years — of debate about their government, Chinese rule and the future of Hong Kong, a former British colony turned over to China in 1997. It all boiled down to this simple choice: to join in protest or not.
It was a decision that weighed heavily on some.
One medical student on the streets said he had spent every night since the protests began Sunday arguing with his father, who called the student-led protests not just illegal but pointless.
Another student, Timothy Huk, 23, said his parents also urged him to stay away.
Other parents not only supported the protests but brought their school-age children with them.
“I wanted my son to see for himself, this is what democracy looks like,” said Carman Mok, 46, his sixth-grade son in tow.
With Wednesday beginning a two-day holiday, many Hong Kong residents were freed by their jobs and family schedules to join the demonstrations. But others throughout the city remain opposed to the protests, including some who agree with its aims.
All week long, Shan Cheung, 37, said she has watched the demonstrations unfold from her job in a nearby building. “It’s made me so sad. The goal is good, but this is not the way to achieve it,” she said.
“The protesters keep demanding that [Hong Kong Chief Executive] C.Y. Leung step down. Who is China going to send to replace him? Just another puppet of Beijing,” she said.
As the demonstrations drag on, Shan said she fears all sides are facing a lose-lose scenario. Hong Kong’s government is losing credibility. Beijing is facing increasing pressure to crack down on the demonstrations. And in the end, she believes, protesters will not get the reform they want.
With a foot in both camps of Hong Kong’s political divide, former chief secretary Anson Chan is part of Hong Kong’s older generation, but he has joined activists in lobbying for electoral reform.
For months, she has tried to push both sides toward compromise.
“I don’t have the answers. But to break this impasse the government needs to make the first move,” she said in a phone interview.
Many — including her — feel betrayed by Hong Kong’s leaders and increasingly angry at Beijing.
Ishaan Tharoor in Hong Kong and Xu Jing in Beijing contributed to this report. |
// Computes the signature = hash(privKey, commitment, pathIndices)
pub fn signature(
&self,
commitment: &H::Output,
index: &B,
h_w4: &H::Parameters,
) -> Result<H::Output, Error> {
let bytes = to_bytes![self.private_key.clone(), commitment, index]?;
H::evaluate(h_w4, &bytes)
} |
// \file fon9/fmkt/SymbTwfBase.hpp
// \author <EMAIL>
#ifndef __fon9_fmkt_SymbTwfBase_hpp__
#define __fon9_fmkt_SymbTwfBase_hpp__
#include "fon9/seed/Tab.hpp"
#include "fon9/Decimal.hpp"
namespace fon9 { namespace fmkt {
using SymbFlowGroup_t = uint8_t;
using SymbSeqNo_t = uint16_t;
/// \ingroup fmkt
/// 台灣期交所預設的商品基本資料.
struct fon9_API SymbTwfBase {
/// 下市日期(最後可交易日).
uint32_t EndYYYYMMDD_{0};
/// 交易所的價格欄位, 若沒有定義小數位, 則使用 PriceOrigDiv_ 來處理;
/// - 例如: 期交所Tmp格式的下單、回報, 都需要用 PriceOrigDiv_ 來決定小數位:
/// - 若 TaiFexPri = Decimal<int64_t,9>;
/// - 期交所 P08 的 decimal_locator = 2;
/// - 則 PriceOrigDiv_ = 10^7;
uint32_t PriceOrigDiv_{0};
/// 選擇權商品代碼, 履約價格部份之小數調整.
/// - 例如: "TEO03200L9" 電子 320.0 買權;
/// 此時商品Id的履約價:小數1位; 則 StrikePriceDiv_ = 10;
uint32_t StrikePriceDiv_{0};
/// 期交所定義的商品序號.
SymbSeqNo_t ExgSymbSeq_{0};
/// 台灣期交所的流程群組代碼.
SymbFlowGroup_t FlowGroup_{0};
/// 買賣權別 'C':call, 'P':put; '\0':期貨.
char CallPut_;
/// 交割年月.
uint32_t SettleYYYYMM_;
/// 履約價.
Decimal<uint32_t,4> StrikePrice_;
/// 市價單最大委託量, 市價下單數量必須 <= MaxQtyMarket_.
/// 來自 P08.market_order_ceiling_;
uint16_t MaxQtyMarket_{0};
/// 限價單最大委託量, 限價下單數量必須 <= MaxQtyLimit_.
/// 期交所規範: https://www.taifex.com.tw/cht/4/oamOrderlimit
/// 匯入 P08 時, 根據 [P08.prod_kind_ 及 期交所規範] 填入此值.
uint16_t MaxQtyLimit_{0};
char Padding____[4];
void SymbTwfBaseClear() {
this->FlowGroup_ = 0;
this->ExgSymbSeq_ = 0;
}
void SymbTwfBaseDailyClear() {
this->SymbTwfBaseClear();
}
void SymbTwfBaseSessionClear() {
this->SymbTwfBaseClear();
}
template <class Derived>
static void AddFields(seed::Fields& flds) {
AddFields(fon9_OffsetOfBase(Derived, SymbTwfBase), flds);
}
static void AddFields(int ofsadj, seed::Fields& flds);
};
} } // namespaces
#endif//__fon9_fmkt_SymbTwfBase_hpp__
|
13C-photosynthate accumulation in Japanese pear fruit during the period of rapid fruit growth is limited by the sink strength of fruit rather than by the transport capacity of the pedicel. In Japanese pear, the application of GA3+4 during the period of rapid fruit growth resulted in a marked increase in pedicel diameter and bigger fruit at harvest. To elucidate the relationship between pedicel capacity and fruit growth and to determine the main factor responsible for larger fruit size at harvest, fruit growth and pedicel vascularization after GA application were examined and the carbohydrate fluxes were monitored in a spur unit by non-invasive techniques using 13C tracer. Histological studies of fruit revealed that GA increased the cell size of the mesocarp but not the cell number and core size. The investigation of carbon partitioning showed that an increase in the specific rate of carbohydrate accumulation in fruit or the strength of fruit should be responsible for an increase of fruit weight in GA-treated trees. Observation of pedicel vascularization showed that an increase in pedicel cross-sectional area (CSA) by GA application mainly resulted from phloem and xylem CSA, but it is unlikely that an increase in the transport system is the direct factor for larger fruit size. Therefore, it can be concluded that larger fruit size resulting from GA application during the period of rapid fruit growth caused an increase in the cell size of the mesocarp and increased carbon partitioning to the fruit. Although GA is closely involved with pedicel vascularization, it seems that photosynthate accumulation in fruit is limited by the sink strength of fruit rather than by the transport capacity of the pedicel. |
package com.shop.controllers.usersAccount;
import com.shop.data.services.UsersService;
import com.shop.data.tables.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller
@RequestMapping("/account")
public class userAccountBookmarkers {
@Autowired
private UsersService usersService;
@RequestMapping(value = "", method = RequestMethod.GET)
public String start(Model model) {
String roleName = SecurityContextHolder.getContext().getAuthentication().getName();
if (roleName.equals("admin"))
model.addAttribute("isAdmin", true);
else
model.addAttribute("isAdmin", false);
return "userAccount/userAccount";
}
@RequestMapping(value = "orders", method = RequestMethod.GET)
public String ordesBookmarker(Model model) {
User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
model.addAttribute("orders", user.getOrders());
return "userAccount/options/orders";
}
@RequestMapping(value = "changeData", method = RequestMethod.GET)
public String changeDataBookmarker(Model model) {
User user1 = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
User user = usersService.findByLogin(user1.getLogin());
model.addAttribute("user", user);
return "userAccount/options/changeData";
}
@RequestMapping(value = "changeEmail", method = RequestMethod.GET)
public String changeEmailBookmarker(Model model) {
User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
model.addAttribute("user", user);
return "userAccount/options/changeEmail";
}
@RequestMapping(value = "changePasswd", method = RequestMethod.GET)
public String changePasswordBookmarker(Model model) {
User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
model.addAttribute("user", user);
return "userAccount/options/changePassword";
}
@RequestMapping(value = "delete", method = RequestMethod.GET)
public String deleteAccountSite() {
return "userAccount/options/deletAccount";
}
}
|
/**
* Update an entry in this test's region with the given name, assuming that the update
* is actually causing creation of the entry
*
* ACCESSED VIA REFLECTION
*/
protected static void updateNewEntry(String name, SubscriptionAttributes subAttrs, GenericListener l)
throws CacheException {
Region sub = _createRegion(name, 0, ExpirationAction.INVALIDATE, subAttrs, l);
sub.put(name, new Integer(0), sub.getCache().getDistributedSystem().getDistributedMember());
} |
// Copyright 2014 beego Author. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package beego
import "github.com/astaxie/beego/context"
// FilterFunc defines a filter function which is invoked before the controller handler is executed.
type FilterFunc func(*context.Context)
// FilterRouter defines a filter operation which is invoked before the controller handler is executed.
// It can match the URL against a pattern, and execute a filter function
// when a request with a matching URL arrives.
type FilterRouter struct {
filterFunc FilterFunc
tree *Tree
pattern string
returnOnOutput bool
resetParams bool
}
// ValidRouter checks if the current request is matched by this filter.
// If the request is matched, the values of the URL parameters defined
// by the filter pattern are also returned.
func (f *FilterRouter) ValidRouter(url string, ctx *context.Context) bool {
isOk := f.tree.Match(url, ctx)
if isOk != nil {
if b, ok := isOk.(bool); ok {
return b
}
}
return false
}
|
package collect
var lsnStartQuery string = "select pg_current_wal_insert_lsn() pg_current_wal_insert_lsn"
var getEngineMajorVersion string = "select split_part(split_part(version(), ' ', 2),'.',1)::int engine_major_version"
var snapshotTime string = "extract(epoch from now())::bigint snapshot_time"
var hammer = map[string]string{
"hammer_orders": "select %s, count(*) count from orders",
"hammer_new_orders": "select %s, count(*) count from new_order",
}
var activity = map[string]string{
"pg_stat_activity": `
select
%s,
a.*,
(pg_wal_lsn_diff(pg_current_wal_insert_lsn(),'%s'))::bigint wal_generated,
txid_current() current_txid,
cardinality(pg_blocking_pids(pid)) blocking_pids
from pg_stat_activity a
`,
"pg_stat_replication": "select %s, application_name, extract(epoch from replay_lag)::float replay_lag from pg_stat_replication",
}
var statsInfo = map[string]string{
"pg_version": "select %s, '%s' host, '%s' dbname, version() engine_version",
}
var stats13 = map[string]string{
"pg_stat_database": "select %s, a.* from pg_stat_database a",
"pg_stat_all_indexes": "select %s, a.* from pg_stat_all_indexes a",
"pg_stat_all_tables": "select %s, a.* from pg_stat_all_tables a",
"pg_statio_all_indexes": "select %s, a.* from pg_statio_all_indexes a",
"pg_statio_all_tables": "select %s, a.* from pg_statio_all_tables a",
"pg_stat_bgwriter": "select %s, a.* from pg_stat_bgwriter a",
"pg_stat_statements": `
select %s,
substr(query,1,25) as query,
queryid,
dbid,
userid,
total_exec_time,
rows,
calls,
shared_blks_hit,
shared_blks_read,
shared_blks_dirtied,
shared_blks_written,
temp_blks_read,
temp_blks_written,
local_blks_read,
local_blks_written,
wal_fpi
from pg_stat_statements`,
}
var stats12 = map[string]string{
"pg_stat_database": "select %s, a.* from pg_stat_database a",
"pg_version": "select %s, '%s' host, '%s' dbname, version() engine_version",
"pg_stat_all_indexes": "select %s, a.* from pg_stat_all_indexes a",
"pg_stat_all_tables": "select %s, a.* from pg_stat_all_tables a",
"pg_statio_all_indexes": "select %s, a.* from pg_statio_all_indexes a",
"pg_statio_all_tables": "select %s, a.* from pg_statio_all_tables a",
"pg_stat_bgwriter": "select %s, a.* from pg_stat_bgwriter a",
"pg_stat_statements": `
select %s,
substr(query,1,25) as query,
queryid,
dbid,
userid,
total_exec_time,
rows,
calls,
shared_blks_hit,
shared_blks_read,
shared_blks_dirtied,
shared_blks_written,
temp_blks_read,
temp_blks_written,
local_blks_read,
local_blks_written
from pg_stat_statements`,
}
|
1. Field of the Invention:
This invention relates generally to an adaptive control system for improving the performance of power producing machines such as internal combustion engines or the like, and more specifically to a closed-loop control system which remains stable over wide variations in engine speed settings.
2. Discussion of the Prior Art:
In the Schweizer et al. U.S. Pat. No. 4,026,251, there is described a closed-loop digital electronic control system for an engine in which a machine controlling parameter is perturbated (dithered) about a given setting and the performance of the machine is monitored to determine whether movement of the machine controlling parameter about the given setting improved or degraded the system's performance. Where a given movement of the setting resulted in improved performance, the resulting control signal developed by the electronic circuits is used to create a further movement of the control setting in the same direction. However, if the small change introduced results in degraded performance, then the machine setting is moved in the opposite direction.
In the device of the aforereferenced Schweitzer et al patent, engine performance is monitored by accumulating "celsig" pulses during predetermined segments of the dithering cycle. "Celsig" pulses are produced by the rotating engine shaft, flywheel or alternator and their rate of occurrence is proportional to engine speed. The control system logic utilizes a counting cycle which is divided into four quarters. Counting means are employed to count the number of "celsig" pulses in each quarter of the dither cycle. The counter is used to count up for the first quarter, down for the next two quarters and up again during the fourth quarter. The net number of counts remaining in the up/down counter at the end of each counting cycle is then used to determine whether to adjust the machine control parameter setting in one direction or the opposite direction. These corrections continue until no significant change in engine speed is produced by the dithering of the machine control parameter, indicating that the appropriate setting for maximum brake torque (MBT) has been located.
It has been found that the system works well provided that the number of "celsig" pulses is sufficiently large and that the dither period contains a large number of engine cycles, i.e., the engine rotational frequency is much larger than the dither frequency. However, if the engine frequency is not sufficiently larger than the dither frequency, loss of control may result.
It has been theorized that this loss of control is due to the fact that in the prior system, the dither pulses are asynchronous with respect to the engine cycle of the machine being controlled. That is to say, in the device of the aforereferenced Schweitzer et al. patent, the dither frequency is a fixed parameter and determined strictly by the electronic oscillator used to generate it. As such, the change-over from "advance" to "retard" or vice versa at the initiation of or midway through the dither period is independent of the rotation of the engine shaft and of the firing pulses acting upon the pistons. As a result, and as will be set forth in greater detail hereinbelow, the normal variations in engine speed between cylinder-to-cylinder firings may at some times be reinforced by the speed changes occasioned by the dithering of the machine's control parameter setting and, at other times, be in phase opposition with the speed changes produced by the dithering. |
Robert Feke
Robert Feke (c. 1705 or 1707 – c. 1752) was an American portrait painter born in Oyster Bay, Long Island, New York. According to art historian Richard Saunders, "Feke’s impact on the development of Colonial painting was substantial, and his pictures set a new standard by which the work of the next generation of aspiring Colonial artists was judged." In total, about 60 paintings by Feke survive, twelve of which are signed and dated.
Life and career
One of Robert Feke's grandmothers was Elizabeth Fones.
Little is known for certain about his life, particularly his early years. Only one work by Feke, a portrait of a child, is datable before 1741. In that year he moved to Boston, where he painted Isaac Royall and Family (1741), a group portrait which borrows its composition from John Smybert’s The Bermuda Group (1729). Feke's works also show the influence of John Wollaston.
From 1741 until 1750, Feke worked in Boston, Newport, Rhode Island, and Philadelphia, painting wealthy merchants and landowners. The latest record of his activities is August 26, 1751; suggestions by Feke's early biographers that he died in Barbados or Bermuda have not been substantiated.
Feke's paintings are known for their sobriety and uniformity, but also for their rich colours and painterly boldness. |
Q:
Не удается записать данные в mysql
Я создала простую форму регистрации.
Использую struts2 и хочу чтобы когда пользователь кликает на submit -> данные отобразились в mysql database.
Таким образом я пытаюсь записать данные в датабейс:
public void registerUser(){
user.add(username);
user.add(password);
user.add(email);
user.add(picture);
//connect to database
try {
try {
connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/myFacebook?" + "user=root&password=root");
}
}
//Insert Data into database
try(PreparedStatement createUser = connection.prepareStatement("Insert into user(username, password, email, picture)" + "VALUES (?, ?, ?, ?)")){
for(int i = 0; i < 1000; i++)
{
createUser.setInt(0, i+1);
}
createUser.setString(1, user.get(0));
createUser.setString(2, user.get(1));
createUser.setString(3, user.get(2));
createUser.setString(4, user.get(3));
int rowsUpdated = createUser.executeUpdate();
createUser.close();
}catch (SQLException e) {
}
try {
}
}
Я решила создать ArrayList в классе User, потому что мне кажется так легче записать данные.
ArrayList<String> user = new ArrayList<String>();
Запускаю все свою систему через apache tomcat. Все запускается и не выдает никаких ошибок. Все методы и файлы между собой правильно соединены.
Но когда проверяю датабейс в консоле, то данные не отображаются и мой столик user - пустой.
Никак не могу понять в чем ошибка. То ли данные с формы как-то неправильно вызываются, то ли я неправильно записываю их в датабейс.
UPD:
//Insert Data into database
try(PreparedStatement createUser = connection.prepareStatement("Insert into user(user_id, username, password, email, picture)" + "VALUES (?, ?, ?, ?, ?)")){
createUser.setInt(0, userid);
createUser.setString(1, user.get(0));
createUser.setString(2, user.get(1));
createUser.setString(3, user.get(2));
createUser.setString(4, user.get(3));
int rowsUpdated = createUser.executeUpdate();
createUser.close();
A:
Судя по всему проблема в этом участке кода.
for(int i = 0; i < 1000; i++)
{
createUser.setInt(1, i+1);
createUser.setString(2, user.get(0));
createUser.setString(3, user.get(1));
createUser.setString(4, user.get(2));
createUser.setString(5, user.get(3));
}
int rowsUpdated = createUser.executeUpdate();
Здесь вы в теле цикла устанавливаете параметры запроса, но исполнение запускаете после выхода из цикла.
Вам нужно либо перенести в тело цикла строку
int rowsUpdated = createUser.executeUpdate();
Либо добавить в цикл строку
createUser.addBatch();
А после цикла вызвать
preparedStatement.executeBatch();
А executeUpdate убрать вовсе.
UPD:
Похоже дело не только в этом.
Вот ваша строка sql:
"Insert into user(username, password, email, picture)" + "VALUES (?, ?, ?, ?)"
Четыре судя по всему строковых параметров. Вы же пытаетесь установить ей пять параметров, к тому же не соответствуя по типу!
createUser.setInt(1, i+1);
createUser.setString(2, user.get(0));
createUser.setString(3, user.get(1));
createUser.setString(4, user.get(2));
createUser.setString(5, user.get(3));
Выпадет SQLException на пятой строке.
Скорее всего ваше строка sql должна теперь выглядеть как то так:
"Insert into user(id, username, password, email, picture)" + "VALUES (?,?, ?, ?, ?)" |
. BACKGROUND After a modified Fontan procedure with atriopulmonary or atrioventricular conduit, some patients present stress intolerance, supraventricular arrhythmia, recurrent pleuropericardial or ascitic effusions, and protein-losing enteropathy, all of which are signs that the previous procedure has failed. The aim of this study was to evaluate the midterm outcome after surgical therapy for this condition. MATERIAL AND METHODS Between August 1994 and December 1997, nine patients (6 males and 3 females), age 10 to 39 (mean 21.5) years, underwent conversion of previous modified Fontan procedure to total extracardiac cavo-pulmonary connection. Time from the previous procedure was 6 to 18 years (mean 10). Diagnosis was tricuspid atresia with pulmonary stenosis (n = 2), double-inlet left ventricle and concordant ventriculoarterial connection (n = 3), double-inlet left ventricle and discordant ventriculoarterial connection (n = 3), Holmes heart (n = 1). Nine patients presented decreased stress tolerance, seven had arrhythmia, five had pleuropericardial effusions and two had protein-losing enteropathy. In all but one patient, right atrial pressure was higher than 15 mmHg, while in six patients the cardiac index was less than 2 l/min/m2. A polytetrafluoroethylene non-valved conduit was interposed between the inferior vena cava and the right pulmonary artery for conversion in all patients. A bidirectional cavo-pulmonary anastomosis (modified Glenn) was associated in all patients. Evaluation was done by NYHA Class and by an arbitrary score assigned to patients based on 7 parameters. RESULTS There was no perioperative mortality. All patients were clinically improved at a mean follow-up of 24 months (range: 3 to 46). No patient had effusions, and the arrhythmias disappeared in 4 patients and were controlled by medical therapy in one. The two patients with protein-losing enteropathy improved markedly within 30 days and the score dropped below 10 points. CONCLUSIONS The conversion of the modified Fontan procedure to total extracardiac cavo-pulmonary connection improves clinical condition by decreasing the right atrium-pulmonary gradient and right atrial preload, and by providing a laminar cavo-pulmonary flow without any need for intracardiac anastomoses. This procedure should be undertaken early in this subset of patients, before ventricular failure ensues. |
Devendra Banhart‘s art is being exhibited at the San Francisco Museum of Modern Art until February 24, 2008.
The singer-songwriter created several drawings in conjunction with his recent album ‘Smokey Rolls Down Thunder Canyon’, which will be on display alongside works from renowned Swiss painter Paul Klee in ‘Abstract Rhythms: Paul Klee and Devendra Banhart’.
Banhart‘s drawings are featured in the 64-page book included in the deluxe limited edition of the album.
The exhibit also includes 10 additional drawings and photos of Banhart with his friends and family who contributed to the album.
Banhart said that the drawings and the album spring from a personal narrative developed around a fictional protagonist named Smokey, who is made up of character traits from several mythological figures. |
Rehospitalization and spinal cord injury: cross-sectional survey of adults living independently. A cross-sectional survey of 96 people living independently with spinal cord injuries (SCI) in Eastern Massachusetts shows that 57% had been hospitalized at least once in the year before the survey. Sample means were 1.0 admissions and 16.0 days/person/year. Eight percent of the sample (eight persons) accounted for 22% of admissions and 59% of total hospital days. For those hospitalized, the mean was 1.7 admissions and 45.1 days/person/year. Mean length-of-stay was 34.7 days/admission. Multiple regression analysis shows that three variables appear to be independently related to increased numbers of admissions: self-assessment of health; place of residence; and age (younger respondents at higher risk). One variable is independently associated with total days of hospitalization: leaving home at least once daily (as opposed to less frequently) is associated with lower risk. There were no statistically significant relationships between either numbers of hospitalizations or total days hospitalized and ADL or IADL status, education, employment, medical insurance, household composition, gender, age at onset of disability, time since onset of disability, substance use (alcohol, cannabis, or tobacco), level of SCI lesion, or social supports. |
"""
Source: https://leetcode.com/problems/two-sum/#/description
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9,
return [0, 1].
"""
import unittest
def twosum(nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[int]
"""
reversed_data = {}
for i, v in enumerate(nums):
if v in reversed_data:
return [reversed_data[v], i]
else:
reversed_data[target - v] = i
class TestStringMethods(unittest.TestCase):
def test_sorted_twosum(self):
self.assertEqual(
twosum([2, 7, 11, 15], 9),
[0, 1]
)
self.assertEqual(
twosum([2, 7, 11, 15], 18),
[1, 2]
)
def test_unsorted_twosum(self):
self.assertEqual(
twosum([3, 2, 9, 11, 7, 4], 5),
[0, 1]
)
self.assertEqual(
twosum([3, 2, 9, 11, 7, 4], 20),
[2, 3]
)
self.assertEqual(
twosum([3, 22, 9, 11, 7, 4], 15),
[3, 5]
)
def test_duplicated_twosum(self):
self.assertEqual(
twosum([3, 3, 5, 7, 9], 6),
[0, 1]
)
def test_zero_twosum(self):
self.assertEqual(
twosum([0, 4, 3, 0], 0),
[0, 3]
)
def test_negative_twosum(self):
self.assertEqual(
twosum([0, 4, 3, -2], 2),
[1, 3]
)
if __name__ == '__main__':
unittest.main()
|
Il Faut Savoir Compter I am honored and happy to open this celebration of Daniel Roche lhomme et loeuvre, if I may use an antiquated formula from literary history. As to the man, I have known him for thirty-three years and am delighted to pay tribute to a dear friend. The work now fills shelves in libraries throughout the world. It has left an indelible mark on our understanding of history. Compliments of this kind, however, can sound dangerously like an obituary. Daniel is very much alive, in top form, full of energy, still churning out books, and stirring things up with an inexhaustible stock of ideas and knowledge. I propose, therefore, to concentrate on the oeuvre, especially the early part of it, leaving the later work to the speakers who will follow me. When I first got to know Daniel in 1970, he quoted the advice he had received from his mentor, Ernest Labrousse: Pour tre historien, il faut savoir compter. At that time, Daniel was preparing his doctoral thesis on the provincial academies. Labrousse had hoped to inspire a Labroussean approach to cultural historyone that would consist of locating a homogeneous run of material in the archives and evaluating it in a way that would reveal the fundamental structures underlying human activity. From histoire srielle to structures et conjonctures and ultimately histoire totale, the program bore the marks of the Annales school then dominant in France; and I admit I found it horrifying. The quantification of culture! Was not culture a matter of finding meaning in the human condition? Collectively constructedmeaning, to be sure, but something that could not be counted like the price of grain? Even when |
package net.lawaxi.serverbase.commands;
import com.mojang.brigadier.CommandDispatcher;
import net.lawaxi.serverbase.utils.config.messages;
import net.lawaxi.serverbase.utils.tparequest;
import net.minecraft.server.command.CommandManager;
import net.minecraft.server.command.ServerCommandSource;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.text.LiteralText;
public class tpadeny {
public static void register(CommandDispatcher<ServerCommandSource> dispatcher)
{
dispatcher.register(CommandManager.literal("tpadeny")
.executes(ctx -> {
ServerPlayerEntity who = ctx.getSource().getPlayer();
tparequest request = tparequest.search(who);
if(request==null)
{
who.sendMessage(new LiteralText(messages.get(36,who.getGameProfile().getName())),false);
}
else
{
ServerPlayerEntity me = request.me;
ServerPlayerEntity to = who;
me.sendMessage(new LiteralText(messages.get(37,me.getGameProfile().getName())),false);
to.sendMessage(new LiteralText(messages.get(38,to.getGameProfile().getName())),false);
}
return 1;
})
);
}
}
|
package edu.ncssm.iwp.math;
/**
* Factory patttern so I can easily swap out the variables implementation underneath.
* @author brockman
*
*/
public class MVariablesFactory
{
public static boolean usePrecise = false;
public static void setPrecise ( boolean precise )
{
usePrecise = precise;
}
public static MVariables newInstance()
{
if ( ! usePrecise ) {
return new MVariablesHashImpl();
} else {
// Method that tries to prevent most doubles from doing the .00000000000000004 thing
// This one really doesn't work any better
return new MVariablesPreciseImpl();
}
}
}
|
ES News Email Enter your email address Please enter an email address Email address is invalid Fill out this field Email address is invalid You already have an account. Please log in or register with your social account
Owen Smith declared himself to be “normal” as he sought to gain the upper hand in the Labour leadership race.
The former shadow work and pensions secretary is little known outside Westminster.
When interviewed on Sky News, the Pontypridd MP said: “I’m glad you think I’m normal. I am normal. I grew up in a normal household. I’ve got a wife and three children. My wife is a primary school teacher.
“I’ve been in Parliament for six years, before that I had two or three other jobs, in business, in politics and advising the peace process in Northern Ireland.” Former BBC journalist Mr Smith did not appear to be seeking to compare himself to leadership rivals Angela Eagle and Jeremy Corbyn.
An aide added: “He was just trying to say that he is an ordinary person, proud to live and represent his own community in Parliament.” Mr Smith also said that he wanted the leadership contest to be fought in a “comradely” way, a position echoed by Ms Eagle and Mr Corbyn.
However, he risked controversy with his remarks as they come just days after Andrea Leadsom suffered a severe backlash after highlighting how she had children while her then Tory leadership rival Theresa May did not.
Mr Smith and Ms Eagle, one of the first openly gay woman MPs, were laying out to MPs today their visions for the Labour Party as they were both under pressure to agree to a “unity” candidate to challenge Mr Corbyn for the leadership.
The Welsh MP has agreed to stand aside if Merseyside MP Ms Eagle gets more backing, fuelling speculation that he is likely to gain more support which would put the onus on her to pull out of the race.
Owen Smith: ‘problems facing Londoners are at the front of my mind’
I may have launched my leadership campaign in Wales yesterday, but when announcing plans for a £200 billion British New Deal many of the challenges facing Londoners were at the front of my mind. Not least because the housing crisis in our capital is one of the clearest examples of government failing to take action and ordinary people paying the price for it.
A chronic lack of homes to rent or buy is holding millions of Londoners back. So a key part of my British New Deal would be major investment to get the country building.
In Sadiq Khan, Londoners have the strongest and most hard-working mayor possible to stand up for them. Yet Londoners also need a united Labour party that can take on the Tories at a national level.
We also know that despite this being such a wonderful city, with no end of opportunities, many people feel locked out due to poverty, as the Standard’s Dispossessed campaign showed.
I’m proud to have led the Labour campaign that forced the Tories into U-turns over plans to cut tax credits and support for the disabled.
If members put their trust in me, I promise to not only lead the most powerful opposition possible, but return Labour to power.
Angela Eagle: I’m right to challenge Corbyn
Sometimes in politics you just have to put your head above the parapet.
I knew that standing against Jeremy Corbyn for the Labour leadership would prompt a backlash. But it is the right thing to do.
He has re-positioned Labour as an anti-austerity party, and I welcome this. But look at what else is happening.
Some of his supporters are using the same tactics of bullying and intimidation that Militant deployed in the Eighties.
Labour is failing to provide effective opposition to a Conservative govern- ment that has waged war on our public services, and the doctors, nurses and teachers that make them function.
Britain is deeply and dangerously divided. Brexit has presented particular challenges to London, threatening the powerhouse of the British economy.
But today both London and the regions are starved of resources by the government. The health of our democracy requires a second party offering a coherent alternative programme and capable of securing power. Under Jeremy, we offer neither. |
// (C) Copyright 2004, David M. Blei (blei [at] cs [dot] cmu [dot] edu)
// This file is part of LDA-C.
// LDA-C is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 of the License, or (at your
// option) any later version.
// LDA-C is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
// for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
#ifndef LDA_H
#define LDA_H
typedef struct
{
int* words;
int* counts;
int length;
int total;
} document;
typedef struct
{
document* docs;
int num_terms;
int num_docs;
} corpus;
typedef struct
{
double alpha;
double** log_prob_w;
int num_topics;
int num_terms;
} lda_model;
typedef struct
{
double** class_word;
double* class_total;
double alpha_suffstats;
int num_docs;
} lda_suffstats;
#endif
|
Breakfast Eating and Weight Change in a 5-Year Prospective Analysis of Adolescents: Project EAT (Eating Among Teens) OBJECTIVE. Breakfast-eating frequency declines through adolescence and has been inversely associated with body weight in cross-sectional studies, with few prospective studies on this topic. This study was conducted to examine the association between breakfast frequency and 5-year body weight change in 2216 adolescents. PATIENTS AND METHODS. Project EAT (Eating Among Teens) was a 5-year longitudinal study of eating patterns and weight concerns among adolescents. Surveys were completed in 19981999 (time 1) and 20032004 (time 2). Multivariable linear regression was used to examine the association between breakfast frequency and change in BMI, with adjustment for age, socioeconomic status, race, physical activity, time 1 BMI and breakfast category, and time 1 dietary and weight-related variables. RESULTS. At time 1, frequency of breakfast was directly associated with intake of carbohydrate and fiber, socioeconomic status, white race, and physical activity and inversely associated with smoking and alcohol consumption and dieting and weight-control behaviors. In cross-sectional analyses at times 1 and 2, inverse associations between breakfast frequency and BMI remained largely independent of all of the confounding and dietary factors. Weight-related factors (concerns, behaviors, and pressures) explained little of the breakfast-BMI association. In prospective analyses, frequency of breakfast was inversely associated with BMI in a dose-response manner. Further adjustment for confounding and dietary factors did not seem to explain the association, but adjustment for weight-related variables seemed to partly explain this finding. CONCLUSIONS. Although experimental studies are needed to verify whether the association between breakfast and body weight is of a causal nature, our findings support the importance of promoting regular breakfast consumption among adolescents. Future studies should further examine the role of breakfast habits among youth who are particularly concerned about their weight. |
Usain Bolt eases into the 200 metre final at the World Championships in Daegu as Veronica Campbell-Brown takes gold.
Jamaican athletes took centre stage at the World Athletics Championships in Daegu on Friday.
Veronica Campbell-Brown snatched Allyson Felix's 200 metres crown while fellow Jamaican and crowd favourite Usain Bolt powered his way through two heats of 200 metres to qualify for the final, making up for his disappointing 100 metres disqualification because of a false start.
"Back to my normal self,'' Bolt said.
"It's my favourite event. If I get a good start and execute, nobody beats me."
"Expect always the best from me. I am focused on getting everything done."
While Bolt was whipping a capacity 45,000 crowd into a frenzy, another figurehead at these championships was forced to say his goodbyes early.
Oscar Pistorius' history-making participation at the world championships ended with a silver medal after his teammates guided South Africa to second in the men's 4x400m relay.
The controversial 'Blade Runner', who runs with carbon fibre prosthetic running blades and was the first amputee to compete at the worlds, finished last in his semi-final heat in the individual 400m.
He was omitted from the relay team for the final, having run the first leg in qualifiers on Thursday, when South Africa finished third quickest.
Having lost his 100 metres crown on Sunday to Jamaican understudy Yohan Blake, it was clear Bolt felt he had to make amends.
"I know I am still the best," he said of the 100.
"Of course I'm disappointed because I didn't give myself the chance to go out there and execute my best."
He did well to mask that disappointment, however, and he was back to the good-natured showboating of old.
The crowd treated him like a rock star, screaming and shrieking in response to his every theatrical salute.
And while running for the finish line, the tall Jamaican had plenty of time to look up at the giant screen and see he was all alone. That was enough for him to slow down and coast into the final with a time of 20.31 seconds.
"It's Bolt. You can do nothing,'' said Reto Schenkel of Switzerland, who finished last in Bolt's heat.
After winning a sprint double at the 2008 Beijing Olympics in record-setting time, he broke his 100 and 200 world records at the 2009 worlds in Berlin.
Daegu looked like it would be another stop along the way to a third straight 100-200 double, but then came the false start.
Not many had picked Campbell-Brown for the women's 200 metres title here, with Carmelita Jeter in sensational form having won the 100 metres and Felix more determined than ever having missed out on the 400 metres gold earlier in the week.
But an eager 'VCB' was first out of the blocks and found an extra gear in the race to cross the line first, ahead of Jeter with Felix third.
"I want to thank God for giving me the strength," Campbell-Brown said.
"I have a world silver, so finally I got the gold medal. I knew I had to run a strong curve."
Kenya's Vivian Cheruiyot took the women's 5,000, adding it to the 10,000 she won earlier in the championships.
In the field, German David Storl took shot put gold with his final throw, hurling it 21.78 metres, a personal best, while in the women's javelin Russia's Maria Abakumova struck gold with a throw of 71.99 metres.
American Dwight Phillips successfully defended his world long jump title, claiming a fourth world title to add to his 2009, 2005 and 2003 gold medals. |
Don't Miss Your Chance to Own a Home in the heart of the WATERLOO ARTS DISTRICT! This light filled 3 bed home has been completed renovated so you can move right in & enjoy all the neighborhood has to offer. The updates added to this home include vinyl siding, front porch, vinyl windows & new flooring throughout. BONUS: This home's electric has been updated top to bottom! The renovated kitchen features new cabinetry (including pantry), countertops, island with dishwasher & bar seating (gas line available for oven/range). The enormous dining room has plenty of room for entertaining guests, a new modern light fixture, and built in shelving. The living room has plenty of room for multiple seating options & room for a mounted tv. The spacious full bath features all new fixtures, large vanity, linen closet, walk-in shower with glass block window & jetted bath tub to unwind after a long day. Upstairs are 2 bright bedrooms & the Master bedroom with en suite half bath. All bedrooms feature ceiling fans. Enjoy coffee on your front porch while you watch the world go by. The backyard is fully fenced except at the driveway, making it easily closed off for pets. The cinder block & brick one car garage has extra space for storage or a workshop with electricity & built-in shelving. Paved patio is perfect for dining al fresco. This home is steps from dining, nightlife, art galleries, & the famous Beachland Ballroom! Lake Erie is less than a mile away at Wildwood Park. Call Today!!! |
<filename>src/bin/09.rs
use std::io::prelude::*;
use std::{fs::File, io::BufReader};
fn has_sum(data: &[i64], sum_to: i64) -> bool {
let mut l = 0;
let mut r = data.len() - 1;
while l < r {
let sum = data[l] + data[r];
if sum == sum_to {
return true;
} else if sum < sum_to {
l += 1;
} else {
r -= 1;
}
}
false
}
fn crawl_find_sum(data: &[i64], sum_to: i64) -> (usize, usize) {
let mut l = 0;
let mut r = 0;
let mut sum = 0;
while l < data.len() {
println!("{} - {} - {}", l, r, sum);
if sum == sum_to {
return (l, r);
} else if sum < sum_to {
sum += data[r];
r += 1;
} else if sum > sum_to {
sum -= data[l];
l += 1;
}
}
(0, 0)
}
fn main() {
let file = File::open("input/9.txt").expect("Input file not found.");
let reader = BufReader::new(file);
let data: Vec<i64> = reader
.lines()
.map(|line| line.unwrap().parse::<i64>().unwrap())
.collect();
let mut broken_number = 0;
let mut window = Vec::new();
const WINDOW_SIZE: usize = 25;
for j in 0..data.len() {
let x = data[j];
if window.len() == WINDOW_SIZE {
if !has_sum(&window, x) {
broken_number = x;
break;
}
}
window.push(x);
for i in (1..window.len()).rev() {
if window[i] < window[i - 1] {
window.swap(i, i - 1);
} else {
break;
}
}
if window.len() > WINDOW_SIZE {
window.remove(
window
.iter()
.position(|&x| x == data[j - WINDOW_SIZE])
.unwrap(),
);
}
}
println!("answer 0: {}", broken_number);
let r = crawl_find_sum(&data, broken_number);
println!(
"answer 1: {:?}",
data[r.0..r.1].iter().min().unwrap() + data[r.0..r.1].iter().max().unwrap()
);
}
|
<reponame>lechium/tvOS124Headers<filename>System/Library/PrivateFrameworks/InstallCoordination.framework/IXAppInstallCoordinatorSeed.h<gh_stars>1-10
/*
* This header is generated by classdump-dyld 1.0
* on Saturday, August 24, 2019 at 9:46:57 PM Mountain Standard Time
* Operating System: Version 12.4 (Build 16M568)
* Image Source: /System/Library/PrivateFrameworks/InstallCoordination.framework/InstallCoordination
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by <NAME>.
*/
#import <InstallCoordination/InstallCoordination-Structs.h>
#import <libobjc.A.dylib/NSSecureCoding.h>
#import <libobjc.A.dylib/NSCopying.h>
@class NSString, NSUUID;
@interface IXAppInstallCoordinatorSeed : NSObject <NSSecureCoding, NSCopying> {
NSString* _bundleID;
NSUUID* _uniqueIdentifier;
unsigned long long _creator;
unsigned long long _intent;
}
@property (nonatomic,copy) NSString * bundleID; //@synthesize bundleID=_bundleID - In the implementation block
@property (nonatomic,retain) NSUUID * uniqueIdentifier; //@synthesize uniqueIdentifier=_uniqueIdentifier - In the implementation block
@property (assign,nonatomic) unsigned long long creator; //@synthesize creator=_creator - In the implementation block
@property (assign,nonatomic) unsigned long long intent; //@synthesize intent=_intent - In the implementation block
+(BOOL)supportsSecureCoding;
-(void)setBundleID:(NSString *)arg1 ;
-(void)setUniqueIdentifier:(NSUUID *)arg1 ;
-(void)setIntent:(unsigned long long)arg1 ;
-(void)setCreator:(unsigned long long)arg1 ;
-(unsigned long long)creator;
-(void)encodeWithCoder:(id)arg1 ;
-(id)initWithCoder:(id)arg1 ;
-(id)copyWithZone:(NSZone*)arg1 ;
-(unsigned long long)intent;
-(NSString *)bundleID;
-(NSUUID *)uniqueIdentifier;
@end
|
Assessment of knowledge of acute kidney injury among non-nephrology healthcare workers in North-Kivu Province, Democratic Republic of the Congo Background: Assessment of knowledge of acute kidney injury (AKI) among healthcare workers (HCWs) is necessary to identify areas of defi ciency and key topics to focus on while organizing educational programs to improve AKI care. The objective of this study was to assess AKI knowledge and practice among health care providers in North Kivu province, the eastern Democratic Republic of the Congo. Material and methods: This was a cross-sectional study conducted in six public hospitals in North Kivu province using a self-administered questionnaire. Results: A total of 158 HCWs completed the survey, among them 66 (41.78%) were physicians. The mean age of respondents was 36.07 ± 10.16 years and the male gender was 56.33%. Only 12 (7.59%) of the respondents had a good knowledge of the defi nition and classifi cation of AKI. The respondents mean scores were 6.76 out of a total of 18 about risk factors for AKI and 6.29 out of a total of 11 with regard to nephrotoxic drugs. Regarding practices, 28.48% of the respondents assess the risk of AKI in their patients in their daily practices; 31.65% report AKI in the patients medical history, and 33.54% call on a nephrologist specialist to get specialized advice. Conclusion: This study found considerable gaps in knowledge and practice regarding AKI among most of HCWs in North Kivu province. Introduction Acute kidney injury (AKI) is a syndrome of abrupt loss of renal excretory function, often accompanied by rapid failure of renal function. This syndrome, due to a sudden dropin glomerular iltration rate, results in an inability of the kidney to eliminate products of nitrogenous metabolism (urea, creatinine, uric acid, etc.) associated with acid-base loss of control, hydro-electrolytic, hormonal, and even osmotic balances. AKI leads to a complex clinical disorder that is associated with high morbidity and mortality despite an independent risk factor for in-hospital mortality, but is also associated with progression to chronic kidney disease (CKD) and increased long-term mortality and cardiovascular events. Evidence of the increasing incidence of AKI has led to an emphasis on prevention or early management. Early diagnosis of AKI is fundamental to ensure prompt and appropriate management, and to avoid progression to more fatal stages of the disease. Most AKI can be prevented or managed by relatively simple measures, such as luid replenishment, identi ication, and treatment of the underlying condition (e.g. sepsis and antibiotics), discontinuation of nephrotoxic drugs, and exclusion of obstructive causes. Knowledge of these relatively basic measures can correct impaired renal function in a large proportion of AKI cases. As Lewington, et al. have previously pointed out in our daily practice, we ind that the majority of patients with AKI are initially managed by non-specialists due to the scarcity of nephrologists relative to the prevalence of AKI. Previously, Khan, et al. reported that less than one-third of patients with AKI were seen by nephrologists. Adequate knowledge about AKI is needed among health workers, especially physicians and nurses, to ensure prompt diagnosis and effective management of patients with AKI. A study in Blantyre, Malawi, reported that the majority of health workers were not con ident in the management of AKI due to their clinical inexperience and lack of knowledge about AKI management. Improving awareness of AKI in health facilities (facilities) through case-based learning, workshops or periodic visits by a nephrologist will have a positive effect on the knowledge of healthcare workers (HCWs). Thus, there is a need to assess knowledge of AKI among health care workers in order to identify areas of missing knowledge that should be emphasized in the organization of educational programs to improve the management of AKI. The objective of this study was to assess the knowledge and practice of AKI management among non-nephrology HCWs in various health facilities in North Kivu Province, in the Democratic Republic of the Congo (DRC). Setting and studying population This was a cross-sectional study conducted over a twelve-week period from August to October 2021 in public and private hospitals in the North Kivu Province in eastern DRC. A simple random technique was adopted to select the participants, who were physicians and nurses working in the selected health facilities (chosen by reasoned choice in view of their referral nature and the number of the population they serve) and visited in the cities of Goma and Butembo in North Kivu province. Six health facilities, including Virunga General Referral Hospital, Kitatumba General Referral Hospital, Katwa General Referral Hospital, Kyeshero Hospital Center, Saint Vincent de Paul Neuropsychiatric Center, and North Kivu Provincial Hospital, were selected for the study. Each selected health facility was visited by a pair of trained interviewers to collect data according to the ad hoc survey. We conducted a survey among HCWs using a pre-designed questionnaire that was transferred to the KOBocollect software on tablets in various selected private and public health facilities. Finally, a total of 10 investigators were recruited. HCWs working in administrative departments were excluded from the survey. The investigators explained the purpose and the procedure of the study and obtained the informed written consent of each respondent before asking them to complete the questionnaire. On a mean, the investigation lasted 10 to 15 minutes. The entire returned questionnaire was examined by the investigators, the missing elements (if any) being modi ied through additional on-site interviews. After the explanation, all HCWs (physicians and nurses) who are not working in the nephrology department and who agreed to answer our questionnaire were selected. The total number of HCWs who are not working in the nephrology department in the selected health facilities was 224. All were selected for the study; of these, 40 refused to participate in the study, and 26 were absent during the data collection period. The inal sample was 158. The response rate was 79.8%. Data collection Knowledge and management practices concerning AKI were assessed using a validated structured closed-ended questionnaire with 16 items in three sections (A, B, and C). Section A included questions on demographic information (age and gender), number of years of professional experience, and medical title (physician or nurse). Section B consisted of questions assessing knowledge of AKI (AKI's de inition and classi ication, AKI's risk factors, and potentially nephrotoxic drugs). Section C consisted of questions related to practice in the management of AKI. The items were reviewed by a nephrologist who made revisions that were relevant to their applicability. These revisions focused on the clarity of the questions and the relevance of the content. The questionnaire was completed by the participants under the supervision of investigators who ensured that the relevant data were correctly reported. The assessment of knowledge level about AKI was based on the answers ("true", "false", or "I don't know") regarding topics of risk factors and nephrotoxic drugs. One point was awarded for each correct answer and zero points for a wrong answer. The total score varies by topic as follows: Knowledge of risk factors for AKI (18 points) Knowledge of nephrotoxic drugs (11 points) signi icant difference (p < 0.0001). The mean scores were 8.80 ± 3.45 and 7.05 ± 1.96 for physicians and 5.30 ± 4.83 and 5.75 ± 1.79 for nurses respectively for risk factors for AKI and potentially nephrotoxic drugs ( Figure 2). The percentages of correct answers to questions on knowledge of risk factors for AKI were calculated ( Table 2). We noted statistically higher proportions of physicians than nurses in the majority of risk factors (p < 0.05). Overall, we noted that few respondents knew trauma (17.09%), surgery (14.56%), advanced age (22.15%), HIV infection (22.15%), and poisons (24.68%) as risk factors for AKI. The percentages of correct answers to the questions on knowledge of risk factors for AKI were calculated (Table 3). We noted statistically higher proportions of physicians than nurses in the majority of drugs (p < 0.05). Overall, we noted that few respondents knew methotrexate (21.52%), antiretrovirals (ARVs) (26.58%), and Non-steroidal antiin lammatory drugs (NSAIDs) (35.44%), and furosemide (46.20%) as potentially nephrotoxic drugs. As for practices in the management of AKI, Table 4 shows Statistical analysis The data collected were analyzed using STATA version 16 statistical software to assess the knowledge and practices of health care workers in relation to AKI. Statistical analysis included percentage, mean, and standard deviation. Pearson's Chi-square test was used to test the association of medical title (physician or nurse) with variables in sections B (knowledge of risk factors for AKI and potentially nephrotoxic drugs) and C (AKI management practices). Statistical signi icance was reported with a p -value of less than 0.05. Ethical considerations Ethical clearance was obtained from the Medical Ethics Committee of the University of Goma (Approval No. UNICOM/CEM/002/20021). Informed consent was obtained from each participant. All copies of the questionnaire were coded (without names), and con identiality of responses was maintained throughout the study. Results A total of 158 HCWs completed the survey, of which 66 (41.78%) were physicians. The mean age of the respondents was 36.07 ± 10.16 years and the male gender was 56.33% (a sex ratio of 1.29). On mean, the respondents had 7.34 years of clinical experience (Table 1). Of all respondents, only 12 (7.59%) were aware of the de inition and classi ication of AKI (Figure 1). In terms of risk factors knowledge for AKI and potentially nephrotoxic drugs, the mean ratings per topic obtained by the respondents are shown in Figure 2. With regard to risk factors for AKI, the mean score of respondents was 6.76 ± 3.30 out of a total of 18. For the topic of nephrotoxic drugs, the mean score of respondents was 6.29 ± 1.96 out of a total of 11. Comparing the mean scores for these two topics for physicians and nurses, the Student's t-test shows a highly suffered from AKI in the past. One-third (33.54%) of the respondents reported that they seek advice or review risk factors for AKI from a nephrologist specialist for patients who are about to undergo a high-risk procedure or take highly nephrotoxic drugs. that 28.39% of the respondents had always/often seen patients with AKI in their practices in the year prior to the survey; 28.48% of the respondents had reported doing a risk assessment of AKI in their patients in their daily practices; 31.65% reported AKI in the medical history of patients who Discussion The International Society of Nephrology launched the "0 by 25" campaign, which aims to have no patient death from preventable or untreated AKI in low-resource settings by 2025 through screening, diagnosis, and management of patients with AKI. Therefore, it is important to think about the best way to achieve this goal by focusing on particular challenges of resource-limited countries. This study is a useful tool so that it may provide a lead to how to implement "0 by 25" by irst identifying de icits among health providers and thereby enabling the implementation of appropriate changes to improve mortality rates related to AKI. The present study shows that there are signi icant gaps in knowledge of AKI among health care providers. Only 12 (7.59%) of the respondents had a good knowledge of the de inition and classi ication of AKI. The mean rating of respondents regarding risk factors for AKI was 6.76 out of a total of 18. As for the knowledge of nephrotoxic drugs, the respondents had a mean score of 6.29 out of a total of 11. The present study also shows that there are very signi icant differences between physicians and nurses. This could be explained by different academic training programs in the two groups (physicians and nurses), which explains the insuf icient knowledge and the minimal importance given to AKI in nursing schools. This is compounded by the absence of teaching materials on AKI management in the intensive care unit in almost all public hospitals in North Kivu province. Yet nurses play a key role in the early detection and identi ication of patients with risk factors for AKI. The nurse is also the focal point for monitoring and detecting any abnormalities in patients' laboratory tests, such as serum creatinine, hemoglobin, or diuresis; these parameters are representative of actual renal function. Abnormal results are immediately reported to the physician so that prompt and appropriate action can be taken. As the results of the present study show, Abdou, et al. also found that the level of knowledge was generally low in the nursing population. A survey of junior physicians in the United Kingdom showed that 30% of the respondents could not name more than two risk factors for AKI and 37% could not name the correct attitudes for referral to a nephrologist. The study by Ali, et al. reported that 23.7% of the respondents did not know whether major surgery was a risk factor for AKI. Overall, the present study revealed that few respondents were aware of trauma (17.09%), surgery (14.56%), advanced age (22.15%), HIV infection (22.15%), and poisons (24.68%) as risk factors for AKI. This indicates that a signi icant proportion (over 70%) of the respondents are unable to suspect AKI in these circumstances. Yet trauma induces AKI either through the role of hemolysis or anatomical destruction and surgical stress induces a set of hormonal and hemodynamic modi ications linked to anesthesia and mechanical ventilation, thus leading to a deregulation of the renal system, evolving towards AKI. Elderly subjects have reduced functional renal reserve, impaired renal selfregulation, reduced luid homeostasis, and increased risk of drug nephrotoxicity, making them highly susceptible to AKI. AKI is more common in HIV-infected patients than in HIV-negative patients. It is favored by the viral infection itself, dehydration, undernutrition, opportunistic infections, the role of certain drugs (notably NSAIDs and ARVs), and the immune restoration syndrome. All this information is supposed to be given to respondents during their academic training. This highlights the importance of organizing adequate training sessions on AKI among health care providers, especially physicians and nurses, to ensure rapid and correct diagnosis and effective management of AKI patients. Overall, we noted that few respondents were aware that methotrexate (21.52%), ARVs (26.58%), NSAIDs (35.44%), and furosemide (46.20%) are known to be nephrotoxic drugs. In contrast, Ali, et al. found that NSAIDs and methotrexate were cited by 76% and 68.6% of health care providers respectively as drugs that cause AKI. Adejumo, et al. found that only 29.6% of respondents recognized furosemide as a risk factor for AKI. Most of these drugs are commonly administered to hospitalized patients and insuf icient knowledge about these drugs may prevent physicians from reducing their doses or withdrawing them in people at AKI risk. This may worsen pre-existing AKI or cause iatrogenic AKI. The latter is also associated with a signi icant burden in terms of healthcare costs, hospital stay, morbidity, and mortality. Our results show that 28.48% of the respondents assess the risk of AKI in their patients in their daily practice; 31.65% report AKI in the patients' medical history, and 33.54% seek specialist advice from a nephrologist. These igures are lower than those found by Ali, et al. who reported 72% of respondents assessed the AKI risk in their patients, 57% documented AKI in their medical history and 80.8% called a nephrologist before a high-risk procedure or administration of a nephrotoxic drug. This difference could be explained by the fact that our study population was made up of physicians and nurses unlike the study by Ali, et al. who enrolled only physicians. Conclusion To improve the diagnosis of AKI, it is necessary to promote a better understanding of the epidemiological association of AKI with widespread diseases, including endemic diseases, and also to promote education about AKI at all levels and among all members of the health care system. This study highlights the need and importance of better understanding barriers and challenges to implementing an effective AKI management program in resource-poor countries. It is |
// ObjectFromObjectMeta returns the schema object for the given object metadata
func ObjectFromObjectMeta(m *metav1.ObjectMeta) (*v1alpha1.Object, error) {
if m == nil {
return nil, nil
}
ann := m.Annotations
if ann == nil {
return nil, nil
}
text := ann[extsecrets.SchemaObjectAnnotation]
if text == "" {
return nil, nil
}
return ObjectFromAnnotationString(text)
} |
The value of China-Africa health development initiatives in strengthening One Health strategy Implementing national to community-based One Health strategy for human, animal and environmental challenges and migrating-led consequences offer great opportunities, and its value of sustained development and wellbeing is an imperative. One Health strategy in policy commitment, partnership and financial investment are much needed in advocacy, contextual health human-animal and environmental development. Therefore, appropriate and evidence-based handling and management strategies in moving forward universal health coverage and sustainable development goals (SDGs) are essential components to the China-Africa health development initiatives. It is necessary to understand how to strengthen robust and sustainable One Health approach implementation in national and regional public health and disaster risk reduction programs. Understanding the foundation of One Health strategy in China-Africa public health cooperation is crucial in fostering health systems preparedness and smart response against emerging and re-emerging threats and epidemics. Building the value of China-Africa One Health strategy partnerships, frameworks and capacity development and implementation through leveraging on current and innovative China-Africa health initiatives, but also, mobilizing efforts on climatic changes and disasters mitigation and lifestyle adaptations strategies against emerging and current infectious diseases threats are essential to establish epidemic surveillance-response system under the concept of global collaborative coordination and lasting financing mechanisms. Further strengthen local infrastructure and workforce capacity, participatory accountability and transparency on One Health approach will benefit to set up infectious diseases of poverty projects, and effective monitoring and evaluation systems in achieving African Union 2063 Agenda and SDGs targets both in Africa and China. Introduction The China-Africa partnership is one of the most important geopolitical and economic relationships of the 21st century that has ushered a new era of investment in mutual health development. China has become the world's second-largest economy and offered Africa various based on win-win cooperation. Traditionally, China is willing to work together with Africa to achieve mutual benefits by taking advantage of its status as assistanceprovider in tackling infectious diseases of poverty. Furthermore, since Africa is home to seven of world's ten fastest growing economies, Chinese investments in the health sector in the continent can produce substantial financial gains and generate invaluable public health commodities and other goods that are much needed. The need for an African Centre for Disease Control and Prevention (CDC) was recognized at the African Union Special Summit on HIV and AIDS, TB and malaria held in Abuja, Nigeria, in July 2013. The Africa CDC has launched year with the establishment of an African Surveillance and Response Unit, which will include an Emergency Operations Center and exchanges on China's national disease surveillance and reporting system. Currently, Africa continent is experiencing a rapid economic growth, with a gross domestic product (GDP) of $ 2.4 trillion USD in 2013 and is estimated to increase to $ 3.3 trillion USD by 2020. Health-care spending rose from $ 28.4 billion USD in 2000 to $ 117 billion USD in 2012 across African countries. The fact that Sub-Saharan Africa accounts for 14% of the world's population and 24% of the global burden of infectious diseases caused by poverty, millions of people could be lifted out of poverty through bilateral trade and cooperation between China and Africa. Increasing and robust new commitments of outbreak and accounts for about 85% of all deaths recorded (a total of 585 suspected cases, 56 confirmed cases and 73 deaths recorded since disease onset in August 2015. In 2014, US CDC estimated the yearly number of LF cases to be between 300,000 to 500,000 resulting in about 5,000 deaths across West Africa. LF is endemic in most parts of West Africa with sporadic cases occurring in other African countries every year. Studies have predicted approximately 80% of Liberia and Sierra Leone, 40% of Nigeria, and 30% of Benin to be at risk of LF through spatial analysis. In Nigeria, approximately 4883 cases and 277 deaths have been reported from 2012 to date. Due to a paucity of data, the actual number of cases in other West African countries to date is still unknown. However, seroprevalence studies in the past have shown a prevalence of Lassa IgG antibodies in 8% to 52% of the general population in Sierra Leone and in Guinea, and as high as 25% to 55% among inhabitants of tropical rain forest and 29% to 40% in hospital staff of Gueckedou and Lola Prefectures in Guinea. Direct transmission from rodent to humans mainly occurs through inhalation of primary aerosols from infected rodent urine, ingestion of food contaminated with rodent excreta or by direct contact with broken skin. Regional and nosocomial outbreaks of LF are commonplace in LF endemic countries and played a major role in recent outbreak. In Nigeria, the 2016 LF outbreak has been estimated to have an overall case fatality rate of 48% and 60% in confirmed cases; the impact on healthcare workers due to inadequately equipped, weak preventive measure for hospital associated infections (HAI) and well trained staff and facilities with poor laboratory and clinical management practices were the main reasons for a dearth of data. While there is no known vaccine for LF, early supportive care and treatment with ribavirin. Prevention efforts include isolation of cases, implementing infection control measures such as barrier nursing supplies, rodent control and practicing adequate food hygiene (storing grain and other foodstuffs in rodent-proof containers) and personal hygiene. Although treatment for LF is available, early diagnosis, prevention and prompt management of infection are necessary (Table 1). These growing public health emergencies and challenges prompted a memorandum on building the Africa CDC that was signed by the African Union with two parties are including Chinese and US govemrnents. This cooperation exploring ways of further cooperation and lessons learning from China's national disease surveillance and reporting system model. Based on a unified and integrated plan, China and US government are willing to leverage their respective strengths to support the African Union in building this system, which will be the first regional disease surveillance system on the African continent from the Ebola crisis. It is important to strengthen disease surveillance and monitoring efforts at the regional level in providing technical expertise and response coordination in future health emergencies, address complex health challenges, and build needed capacity responses, responsible for disease surveillance, investigations, analysis, and reporting trends and anomalies. This is a landmark event in African ownership of improving health across the continent. The US CDC looks forward to engaging in this partnership for many years to come to advance public health across Africa and global health security Results from the First and Second China-Africa Ministerial Health Development Forum held in Beijing, China and Cape Town, South Africa in 2013 and 2015, respectively, showed that China-Africa health development partnership had entered a new collaborative paradigm with great global health opportunities. Chinese and African health ministers have adopted a declaration to increase access to facilities, medication, health workers and training, linking Chinese scholars with those in Africa into shared responsibility and global solidarity. Importantly, China-Africa collaboration in health development will use "One Health" approach to set the collaborative priorities, such as developing innovative information and communication technology for health, building regional surveillance systems, improving the core capacities of international health regulations and enhancing the using regulation of traditional medicines, etc. The significance of Africa-China cooperation health development initiative milestone was the broad consensus MoU aimed to support the establishment of Africa CDC signed on April 2015, as part of the agreement and of the pledge made at the summit that was held under FOCAC in Johannesburg, South Africa December 2015. This laudable mutual commitment was realized through the full operationalisation of the Africa CDC in early 2016 supported by the Chinese government, including providing infrastructure construction, equipment, information system, expertise, and professional training, etc. As well fostering continuous strengthening African states public health prevention and control system under the Chinese supports are also provided through comprehensively capacity building (e.g., staff, postdocs and students) and providing technical assistance and technology transfering to Africa CDC sub-regional centres. The benefits of the translation of the immense mutual public health priority aligns "Africa Union health vision 2063" in the fields of infectious diseases of poverty surveillance and elimination, emergency preparedness timely response to early alert and risk communication capabilities against public health emergencies and disaster crises events. Previously, China has already provided two million US dollars cash aid for the Africa CDC in terms of capacity building and the on-site Chinese experts visit for the regional collaboration with other partners' support. Africa CDC has now developed a five year strategic plan to improve surveillance, emergency response, prevention and resilience against infectious diseases threats and outbreaks, man-made and natural disasters, antimicrobial resistance and chronic diseases public health events of regional and international concerns. Africa CDC focus on strategic priority areas and innovative programs aiming at improving evidence-based decision making and practice in event-based capacity development for surveillance, disease prediction, and improved functional clinical and public health laboratory networks and actions in minimizing health inequalities, and promoting quality care delivery, public health emergency preparedness and response best practices in achieving regional. Africa CDC collaborating sub-regional centres in five countries provides an opportunity for effective collaboration, integration and coordination in harnessing existing public health assets, epidemiological surveillance, strengthening existing networks of quality laboratories for early detection and response. Infectious public health preparedness and emegergency response cannot deliver effectively if we do not implement "One Health and biosecurity" approach bringing human, animal and environmental health. Building evidence-based and adequate capacity building need to support integrated "One Health" surveillance, laboratory systems and networks, emergency preparedness and response, and public health research for evidence-based heath programing and ample resource allocation. Greater commitment to strengthen local and regional operationalization of integrated disease surveillance and response, public health systems and core capacities have been documented to critically address public health emergencies, biosecurity and disaster risk across the continent. National and regional public health emergencies, biosecurity surveillance, preparedness, rapid response, and recovery policy and strategies are robust and sustainable assets for socioeconomic transformation in line with Africa Health Strategy, the Africa Union 2063 agenda and in attaining SDGs. Firstly, developing innovative information and communication technology for health will provide opportunities to avert thousands of deaths and disability by improving access to good-quality essential drugs, by increasing coverage of vaccines immunization and use of other pharmaceutical and medical commodities nationwide. In addition, leveraging on the unique "One Health" approach to transform health care and health policy and to prioritize collaborative programs can be extended from infectious diseases to maternal and child health and health disparity in the poorest populations in Africa [1,. Secondly, building regional surveillance systems is another way to enhance the local health system. The importance of implementing a local and national "One Health" policy and programs holds tremendous prospects, such as co-tackling the epidemiological and environmental challenges, and accelerating in the transition from control to elimination of infectious diseases under China-Africa collaboration. Furthermore, it has potential to revolutionize national health systems, policies and strategic priorities and the patterns in health financing and resources allocation of African countries that require careful understanding of the local context of diverse stressors and drivers. These will continue to dominate the performance and effectiveness of "One Health" in threats and epidemics prevention strategies and policies on healthcare and health outcomes. Thus, assessing health impact especially how greenhouse gas and ozone emissions, rising temperature and environmental pollution resulted in climate change impacts to health ecosystem, such as population movement, animal trading and ecology of vectorborne disease and ill health, aging, chronic disease, drug use and domestic violence, inequity and poverty. Thirdly, improving the core capacities of international health regulations is the sustained efforts to improve the human welfare. For example, China's response impacting the global health fund (e.g., malaria, HIV/AIDS, schistosomiasis, Ebola, influenza, TB, hepatitis, etc.) has shown robust global health leadership engagement. The leadership reflected in the strategic mobilization and investment of resources fostering more easily accessible, availability and cost effectiveness of prevention and treatment interventions to resources limited countries including African countries. The growing mutual China-Africa win-win collaboration spans to technical expertise, technology transfer and capacity development using scientific and advanced methods to tackle the disease, and have enhanced their commitment to respect the dignity of the people such as Chinese Ebola outbreak emergency response in West Africa. Fourthly, enhancing the use and management of traditional medicines could improve the community involvement in health care and extend the trade among countries. So far, trade between China and Africa is projected to reach $ 385 million USD a year by 2015. Increasingly, embracing "One Health" strategy to increase universal coverage of healthcare is significant as sharing China's rich expertise and lessons learnt in strengthening health systems and tackling public health burden both in China and Africa communities. Thus, Africa has the opportunity to improve capacity of community health workers to reach remotes rural communities living beyond the margins of traditional health care systems. Therefore, China's advancements in research and development, technical and scientific capacity transferring can support African next generation of proactive scientists to develop more sensitive simplified diagnostic tools and reduce the costs of laboratory diagnosis and medical equipment. Furthermore, Research and Development (R&D) is needed in examining the biological mechanisms of stressors or risk factors exposure and health effects, assessing evidence-based mitigation or adaptation interventions and benefits. Innovative solutions and breakthroughs in human-animal-environment fields would not only enable Africa to meet its own growing needs, but also support integrating health systems, including strengthening the capacities of laboratory diagnostics and medical care, as well as establishing the China-Africa platforms that could generate evidence-based low-cost, available and easy-to-use health packages and solutions for the reduction of public health burden. The present paper has analyzed the values of implementing national to regional "One Health" strategy for dealing with human, animal and environment related public health threats, diseases outbreaks emergencies and disaster risk challenges, and promote healthy mitigation measures and resilient management approaches in advancing targeted local, national and global health agenda. Also, understanding how to develop, package and implement evidence-based and sustainable "One Health" approach needs partnerships and investment for strategic priorities and resource mobilization. In addition, it also needs better financing mechanisms and participatory coordination in building capacity and technical assistance, monitoring, performance and effectiveness metrics evaluation for One Health indicators. Understanding the foundation of "One Health" strategy in China-Africa public health needs and challenges Although significant progress has been made in improving health and safety of vulnerable population in low and middle-income countries (LMICs), there is growing unprecedented public health emergencies crises due to natural disasters (such as disease outbreaks, floods, climate change, droughts and mud-/land-sliding) and man-made disasters including armed conflict and resulting forced refugees and displaced populations in LMICs and mainly in Africa as well as China. These have been resulting in significant direct and indirect health impacts including limited access to food, clean water, medicines, pre-existing mental health and other health services. Conflict-affected countries have not achieved a single Millennium Development Goal and have significantly higher maternal and infant mortality rates compared to stable and peaceful countries. Natural disasters affect nearly 160 million people each year, with a disproportionate effect on populations and environment. There is also limited quantity of highquality and integrated research to build evidence "One Health" approach response. For example, recent emerging Zika virus is known to be circulating in Latin America, America, Africa, Asia-Pacific and Middle East regions due to climate change and rapid urbanization, intense regional and global travel and trade impact on Zika virus risk transmission and documented congenital complications on fetal and maternal health. Efforts to strengthen regional and global public health emergencies surveillance and preparedness should be maintained in order to better characterize the intensity of Aedes and Culex vectorial capacity, asymptomatic or syndromic viral circulation and geographical infection spread, epidemiology and laboratory monitoring of Zika virus related complications in vulnerable settings. We found that most existing and emerging infectious diseases of poverty and chronic diseases public health programs are based more on top-down and anecdotal experiences rather than accurate research in fostering an integrated humananimal and environment or "One Health" community practice in most vulnerable settings in Africa and China (Table 1). "One Health" approach was officially adopted by international organizations and scholarly bodies in 1984 in response to the growing global human-animal and environment inter-dependence challenges and issues including climate change which needed new approaches. In such, "One Health" broader interconnections understanding offers tremendous advantages and manifold benefits in tackling emerging zoonotic diseases and chronic diseases to disaster risk consequences, but also in improving safety health of people and animals, and safeguarding environment against pollutants and pollution. It aims to enhance across disciplinary and interagencies assessment complex including human-animal health systems vis-a-vis environmental and climatic determinants of health, development of contextual health or disease detection and surveillance-response systems, data sharing and communication; partnerships and mutual learning for positive transformation and behavioral changes outcomes. Hence, strengthening firmer foundation in building evidence-based integrated healthy approach decision making, health programming and actions plans implementation, training and research practice to community-based programs ownership, shared values and experiences in integrated cost effective and beneficial China-Africa "One Health" strategy initiatives for mutual wellbeing and economic prosperity. Prioritizing "One Health" approach in emerging and current infectious diseases public health emergencies and disaster risk reduction is essential in attaining the regional Africa Union and global health agenda promises and benefits. It requires promoting and implementing evidence-based, effective and sustainable national "One Health" strategy advocacy and mitigation strategies in most Africa countries and worldwide. Strengthening evidence-based, consistent and reliable community, national and regional 'One Health' and biosecurity PEOPLE'S MEDICAL PUBLISHING HOUSE Co., LTD. partnerships, leadership, road maps commitment, approaches and strategies is a crucial for zoonotic diseases threats and outbreaks public health emergencies and other disasters risks humanitarian crises. Integration "One Health" principles and frameworks in health and relating multisectorial units or agencies planning and actions plans in generating comprehensive, consistent and real time knowledge and information in guiding evidence-based decision-making policy and participatory commitment and investment. Articulated interest and reliance of all stakeholders will cover communities and public articulated actions in preparedness and response to climate changes, infectious and zoonotic threat and epidemics public health burden has provided. The extent and nature of "One Health" approach through political engagement and funding is critical in advancing community social mobilization and awareness on "One Health" strategy integration in public health systems and primary health care. The needs and value is prerequisite in sustainable public emergencies and disaster risk reduction priorities, preparedness, preventive and control programs and activities. While, providing the enabling health-animal and environment interface biosecurity and protection of legislative and technical assistance support to policy makers, planners and implementers including the local vulnerable communities in transforming contextual positive knowledge, behavioural and attitudes changes. Understanding the climate change, global migration and country-specific complexities of emerging and current infectious diseases of poverty is needed in tackle operational programs challenges and bottlenecks, improved sustained control into elimination. For example national immunization programs hesitancy and resistance issues, such as misconceptions and mistrust or fear, weak coverage and non-adherence, persistent resurgence of zoonotic threats and emerging epidemics, continue to place a huge toll of maternal and child health morbidity and mortality on burden and coupled with the rising trend of chronic diseases related inequities and poverty vicious cycle. Building China-Africa "One Health" strategy partnerships, frameworks and capacity development China's global health approach is an unique and distinctive path. This approach based on contextual policies and realities-based on their history, driveninter sectoral and multidisciplinary government related ministries strengthen health systems in different African countries. There is a steadily growth in depth and strength of China's global engagement and collective participation in fostering global health agenda through China-Africa health development strategies. Event-based preparedness and transparent support management and technical assistance on transferable Chinese lessons in infectious diseases elimination and eradication including measles, filariasis, schistosomiasis, malaria, SARS and Ebola, etc. For example, the China-Tanzania pilot project of community-based and integrated malaria control strategy and applications funded by China-UK partnership aimed at assessing the feasibility and transferability of Chinese malaria skills in strengthening malaria health education, awareness knowledge and access to vector control interventions (e.g., RDT, LLIN, ACTs) to reduce the risk of malaria infection in Tanzania. Moreover, in the absence of specific Ebola infection treatment, the partners or organizations, including African governments, WHO, The GAVI Alliance and "Ebola a Suffit Ring Vaccination Trial Consortium" should accelerate on joint consensus for the adoption and "expanded access" to proven efficacious and safe rVSV-ZEBOV vaccine ring Ebola immunization strategy implementation to boost immune response and protect vulnerable populations and global travelers from potential Ebola outbreaks. China-Africa mutual and comprehensive partnership in health and pharmaceutical has been encouraging and promoting the use of community-based health services; and increasing government investment in public health interventions. China has been very supportive on African countries' efforts in building medical facilities and health service. For example, in 2013, the Chinese government constructed 38 medical facilities and provided 50 batches of medical equipments and supplies to African countries. Chinese enterprises and nongovernmental organizations have helped African people get quality medical services by means of building and running hospitals, investing in pharmaceutical factories and localizing medicine production in improving health management and well-being, including maternal and child health, and emerging pandemic threat programs, etc. Moreover, Chinese medical assistance to Africa has been sustained and operative win-win mutual support tailored to local settings, which could enhance research priorities in dynamic mapping of vectors and infectious diseases transmission with interaction of human-animal-environment, and provide evidence-based strategies in national or regional diseases control programmes and effective response packages [7,8,. Good progress remains in developing and implementing these policies and strategies coupled with shared lessons learnt and experiences against unprecedented infectious diseases public health emergencies and rising non-communicable diseases (NCDs) challenges, such as obesity, cardiac arrest and stroke, hypertension, diabetes, cancer, kidney disorders and mental health, etc. There is a shortage of qualified health professionals at grassroots health facilities. It is also shortage in accessing to basic health control and elimination packages and service delivery including vaccine preventable diseases immunization programs coverage inadequacies in most rural and remote settings across Africa compared to China, insufficient public and private sector funding to R&D on safety and effective vaccines or drugs against most emerging coupled with unattended public health diseases threats and epidemics impact preparedness, and strategies mutually gains and economic benefits. Leveraging on current and innovative China-Africa health development initiatives Remarkable results and outcomes have been documented from Chinese medical assistance in 51 of 57 African countries, ranging from health workers, implementers and policy-makers. Capacity development and skills acquisition were achieved in over 115 health-related training courses to 2,200 health implementers and health workers since 1963. Chinese medical teams friendship and health cooperation, including construction of ophthalmic center where more than 2,000 free cataract surgeries were completed in four African countries and construction of more than six other Chinese medical hospitals in the last 2 decades. It is also worth noting the robust and efficient participation and contribution of twenty-seven Chinese provinces, autonomous regions and municipalities with accumulated more than 24,000 Chinese medical workers in 120 medical centers since 1963, and currently over 1,200 medical workers are working in 51 African countries. Continuous support in building medical facilities, Africa CDC reference laboratories per excellence and health service capacity has been appraised in embarking on assessing public health emergencies needs, risk factors and determinants in understanding the perception, knowledge, attitude and practice in evidence-based promotion of integrated "One Health" approach and biosecurity decision-making approach. This also provide priority and targets, methodologies and programs through effective indicators surveillance and monitoring. For examples, Chinese government dispatched over 38 medical facilities and over 50 batches of comprehensive medical equipment for early diagnostics and prompt treatment or response, and supplies across Africa since 2013. Chinese partnerships with local firms and communities have helped medical services delivery to remote and rural vulnerable populations through joint activities in building and running hospitals, investing in improving and scaling up localized production in pharmaceutical and biotechnologies industries in Africa. In addition, we also recorded the establishment of more than 10 clinics of standard traditional Chinese medicine (TCM) integrated to Africa traditional medicine (ATM). In achieving universal coverage and healthcare for all, upgrading China-Africa mutual health development cooperation and collaboration through independent and joint institutional research project and capacity development in health services delivery and in promoting science and technology capabilities, joint projects and activities have been increasingly developed and implemented. These projects and activities aim at tackling the persistent and growing burden of infectious diseases of poverty, maternal and child morbidity and mortality, and responding timely to the global health concerns and emergency response called on emerging threats and epidemics in the continent. Some examples of the landmark achievements include the China-Zanzibar and China-Tanzania projects on sharing Chinese lessons and experiences in infectious diseases to support schistosomiasis and malaria prevention and control in African countries respectively, as well as Chinese maternal-child heath safety and children nutrition, dissemination and transfer experiences in Ghana. Furthermore, China-Comoros support to national malaria elimination that led to interruption of transmission and reducing in malaria mortality to zero in the last eight years in Comoros. Likewise, understanding strategic public health financing and human resources systems capacity is necessary in promoting uptake and efficiency of Chinese global health initiatives and innovations in strengthening healthcare delivery system and quality outcomes in LMICs including Africa, Asia-Pacific, Middle East and Latin American countries. Strikingly again, during the West Africa Ebola outbreaks in 2014-2015, the Chinese assistance in response valued at $ 120 million USD and more than 1,200 experienced medical professionals were deployed in the frontline affected and neighboring communities to combat and contain the rapid spread of the Ebola virus epidemics. In addition to the mobile biosafety laboratory, China also built permanent and well-equipped public biosafety laboratory in Seirra Leone and DR Congo to improve the national capacity to detect, prevent and respond to future threats and epidemics. Over 30 batches of public health, clinical medicine and laboratory experts were dispatched in 11 African countries in scaling up public healthcare delivery capacity and training of health workers and communities in risk assessment, communication, and response measures in effective Ebola, malaria, schistosomiasis prevention and containment, amongst other shared responsibility and mutual commitment [1,4,8,9,. Future expansion of China-Africa health development initiatives offers immense opportunities in increasing mutual benefits and growth to both continents' several domains not only limited to health, technology and trade. The scale and sustainability of existing and forthcoming programs and plan of actions will require aligning of national priorities and defining contextual performance and effectiveness indicators, but also mutual respect and trust, accountability and transparency with good governance and proactive stewardship. It is imperative that efforts should also be made in strengthening evidence-based translation to the benefits of vulnerable populations and global community through sharing of lessons learnt and care knowledge experiences and information for all generations in combating infectious diseases and rising burden of noncommunicable diseases. Fostering health systems preparedness and smart response against emerging and re-emerging threats and epidemics Chinese and African rapid economic growth and the importance of strengthening the local and national public health laboratory systems in both continents have been recognized in tackling the rising healthcare needs, challenges and issues. Globalization of travel and trade is ever increasing local, national and global emerging and re-emerging infectious diseases threats and their impacts on human and animal health. Resolving the persistent and unprecedented rising of emerging and reemerging epidemics, and new priorities of Ebola, Zika, HIV/AIDS, tuberculosis, malaria and neglected tropical diseases (NTDs) requires collaborative and mutual cooperation with governments, bilateral and multilateral initiatives, including boosting private-public partnerships, regional and international organizations in achieving the global health security threat and agenda 2030. For example, China has dispatched more than 1,000 medical experts to resist West Africa Ebola epidemics through contributions to coordinated international emergency response efforts that helped to contain Ebola virus transmission dynamics and spread that retrieved lives of over 12,200 people. Similarly, Zika virus belongs to the family Flaviviridae, genus Flavivirus, and includes Africa subtype and Asia subtype. It is a mosquitoborne virus primarily transmitted by Aedes aegypti mosquitoes, sexual transmission; blood transmission and mother-to-fetus transmission have been also reported. Zika virus can go through blood-brain barrier and infect central nervous system. Symptoms are generally mild and self-limited, but recent evidence suggests a possible association between maternal Zika virus infection and adverse fetal outcomes, such as congenital microcephaly, as well as a possible association with Guillain-Barr syndrome. In absence of safe vaccine or effective antiviral Zika medication for prevention and control Zika virus infection, early laboratorial diagnosis includes nucleic acid detection, serological test, and isolation of virus and epidemiology and clinical risk assessment and syndromic surveillance is crucial. Nevertheless, there remains a need to build a platform with function of effective surveillance, recovery, preparedness, consultation and communication, and to share surveillance based on the principle of sincerity, real time problem-solving and results-giving, and good faith towards collaborative global health solutions [4,. Fostering surveillance capacity in laboratory, clinical, veterinary and allied health sciences in the Africa continent are critical to overcoming the growing burden of diseases and ensuring a healthy future of its citizens. Meeting the urgent growing healthcare needs in Africa requires strategic and technical approaches in the development and integration of sound and harmonized regulatory systems for diagnostic products, new drugs and vaccine R&D. While reinforcing the national and international public health laboratories networks are able to improve collaborative and participative early disease detection, early warning and surveillance research in guiding proactive vigilance and smart response activities. Effective good governance and leadership coordination of sustainable strategies on emerging outbreak preparedness and response capacity is necessary towards the transformation from traditional to modernized digital laboratory systems in timely and effective quality service delivery. However, the need for laboratories quality improvements and accreditation of methods, tools and programs are critical in upholding the gains preparedness, and emergency response in various infectious diseases programs and strategies should be supported through both national and international initiatives. Bilateral and multilateral cooperation with the World Bank, UN and WHO, Global Fund to fight AIDS, tuberculosis and malaria, worthy philanthropic individuals and organizations efforts can enable country to be ready and capable of early detection, prognosis, prevention, and smart response or management in any detrimental natural or man-made epidemics eventuality, while facing operational challenges and setting new research priorities, for contextual "One Health and biosecurity" programs, are also need to be supported with appropriate regulations and guidelines. Mobilizing on mitigation of climatic changes and disasters and lifestyle adaptations strategies There is an urgent need to invest in basic and operational research on climatic, ecological and evolutionary changes for understanding and forecasting persistent and future emerging threats dynamics and epidemics. Timely evidence-based translation into policy programs and interventions is imperative to defeat the budding threat and burden through coordinate robust actions and better stakeholders leadership in response advocacy and mitigation in line with The Paris Climate Change Declaration in December, 2015. Fostering integrated approaches with cuttingedge inter-sectoral and trans-disciplinary partnership is also needed evidence-based nationwide scaling up contextual surveillance and response capacity. Moreover, with improvement of targeted strategies to deal with emerging outbreaks and infectious diseases of poverty elimination, understanding human-animal interface with increasing urbanization, globalization of trade and travel are necessary. Hence, China-Africa "One Health" strategy sustainable implementation and alignment with local and national priorities hold great promises. Integrating collaborative human-animal-environmental projects and programs have substantial prospects in increasing local and national food production and global food security. This is critical in averting or reducing the persistent malnutrition, under-nutrition and related health complications and diseases (e.g. malnutrition linked Kwashiorkor or rickets, obesity, typhoid, diarrhea, dysentery) resulted in children and youth developmental retardation, poor educational performance, poor quality of life and living including high DALY and low QALY short life expectancy, worsening the vicious cycle of poverty and premature death documented in Africa countries. Similar high public health challenges and burden in Africa were recorded in China before 1980s, mainly in Chinese rural communities circumventing with the implementation of the Chinese rural cooperative medical insurance schemes. However, more investment is still needed in achieving food autosufficient and balanced food and nutrition/diet for all in both continents. Developing and integrating climate changes resilience, mitigation and adaptation measures in allied health programs is vital in protection, conservation and management of the adverse socio-demographic, ecological, health and economic effects of greenhouse gas emissions and changes consequences, and in securing the future benefits of green and eco-friendly environment. The value of China-Africa "One Health" strategy implementation Financial support from governments and various levels, advocacy and social mobilization to develop supportive community environment for infectious and emerging zoonoses threats and epidemics in population-based public health control and elimination interventions is imperative through implementation of evidence based and cost-effective "One Health" surveillance and response strategy, in order to integrate human, animal, and environmental landscape, continue health education promotion, improve awareness and quality public health service delivery performance and effectiveness metrics across Africa. Enhanced disease surveillance response, community capacity development and strain capacity can provide significant opportunities in health education and promotion, shared responsibility, positive behavior changes and best practices by different health facilities, training health practitioners of diagnosis, treatment and rehabilitation services. Identification of local and national health needs and evidence-based effectiveness of "One Health" solutions are urgently needed to improve appropriate and sustainable resource development policies and strategic programs across Africa. Such new partnership initiatives linked to China Belt and Silk Initiative action plan should attract more indigenous and international partners and stakeholders, more qualified multidisciplinary professionals to work, communicate and share experiences and lessons collectively. Building local and national trans-disciplinary and trans-sectoral research teams towards improved understanding the genetic and molecular mechanisms of invasive pest and drug resistance, and control of complex disease systems and in strengthening continuous improvements of human, animal, ecosystem health and well-being. Robust evidence in comprehensive control for multiple risk factors including health guidance on diet, fitness activity and promoting individual and community self-management model is important to services by general practitioners and mainly in translational research directed toward sustainable development activities and global environmental health. To support integrated veterinary, medical and ecosystem education, and to provide more professional career development opportunities, the governments need to continuously increase its investment in public health intervention programs and financial support to health insurance schemes. Increased funding from both central and local governments needs to be directed to the underdeveloped regions and poorer rural areas to support global and national programes on infectious diseases of poverty and sustain control and elimination agenda for emerging epidemics tackle maternal and child health challenges, improve NCDs mitigation interventions, and set up better health insurance schemes. In addition, it is equally important to strengthen monitoring of the use for public health interventions. "One Health and biosafety" systems research projects development and implementation are also urgently needed in improving training programs and educational empowerment in guiding human-animal health and environment programming and technical assistance. Addressing the existing and unprecedented public health emergencies or disaster risks requires optimizing the "One Health and biosecurity" targets and interventions which will benefit indicators metrics monitoring in routine public health programs and humanitarian emergencies crises response. There is need to promoting "One Health and biosecurity" youths voices in healthy and ecofriendly "One Health" community advocacy, engagement and participation. Strengthening and sustaining "One Health and biosecurity" strategy will improve the cost-effectiveness surveillance and communication interventions through continuous awareness, and knowledge improvements for the overall China-Africa and global health security benefits. Conclusion Robust and sustainable leadership commitment and investment is needed in integration of "One Health" and global health security. Advocacy and mitigation programs is needed in China-Africa health development initiatives. To establish public emergencies indicators and metrics for early and timely community engagement and effective risk communication, following actions need to be handled to achieve SDGs and global health agenda: community-based partnerships and programs ownership, assessment for evidence based "One Health", identification of the various stressors or risk factors, programmatic and proactive development and implementation of appropriate and sustainable "One Health", resource mobilization mechanisms and solutions based on animal-humanenvironment interface challenges and impacts surveillance, preparedness, and timely collective response to public health threats and humanitarian emergency crises. |
It is Flag Day as well as a rare day for the voters of the District of Columbia who get to vote in the last primary of this season. Sadly, they will not have that chance in November. Hillary Clinton began her day in Pittsburgh at a Democratic Party rally and will return to D.C. later in the day.
Yesterday, in the aftermath of yet another gun massacre in this country, this one with the highest number of casualties ever, both Hillary and Donald (as she prefers to refer to him) delivered speeches on how to prevent such attacks, although they were not really speaking on the same topic.
Donald’s speech was limited to one variety of attack – the kind that are inspired by or dedicated to jihadist organizations. For Donald, the attacks on a prayer group in Charleston and first graders and their teachers in Sandy Hook were not part of the equation. The shooters came from good American, gun-toting homes after all.
It was hard to discern a proposed solution to the jihad-inspired attacks that were Donald’s chosen topic, however. He echoed Hillary’s name over and over as if it had magical powers. Apparently keeping certain outsiders out will solve the problem despite the fact that the perpetrators of the Orlando, San Bernardino, and Fort Hood attacks were Americans.
Hillary, in her speech, never mentioned his name and did specifically speak of radical jihadist terrorism. She removed an arrow from Donald’s quiver by calling it “radical Islam” – a term he repeatedly has attacked her for avoiding. She proposed a multifaceted approach to combating the threat, but for her, what looms large is the availability of assault weapons. She attacked the gun laws and the dysfunction within government that prevents dots from being connected. She did not directly attack Donald.
Today, on the other hand, she took him on with a right hook and a left upper cut. She called him unqualified and called upon the GOP to get him under control. She assailed his casual relationship with fact and his obsession with words. She wondered, “Is he suggesting that there are magic words that once uttered will stop terrorists from coming after us.”
“It matters what we do, not just what we say. It didn’t matter what we called bin Laden—it mattered that we got bin Laden.” —Hillary
Trump’s statements are lies—but he tells them because he has to distract from the fact that he has nothing substantive to say for himself.
In a similar speech the hour before, President Obama also commented on Donald’s insistence that something is wrong with the lexical selections of Democrats and changing the verbiage would turn the war. In Pittsburgh, Hillary took issue with notion that there are magic words that will dispel threats. Could not agree more!
Hillary has a pretty name. Repeating it over and over will not put the genie back in the lamp, though. She did not cause the terrorism, has worked hard to fight it with sanctions and terrorist designations as secretary of state, and, like President Obama, is on the same anti-terror team, although Donald seems to imply differently. Today, Hillary did not refrain from calling out Donald – in very specific and substantive ways – not as a magic word.
Today in Pittsburgh, Hillary Clinton delivered remarks criticizing Donald Trump for his response to Sunday’s tragic terrorist attack in Orlando and urging national unity to protect our security and uphold our guiding values. Clinton specifically called out Trump’s suggestion that President Obama is siding with terrorists and asked Republicans to rebuke this dangerous rhetoric, saying, “History will remember what we do in this moment… Americans don’t need conspiracy theories and pathological self-congratulations. We need leadership, common sense and concrete plans.”
Clinton again affirmed her plans to defeat ISIS, to combat homegrown terrorism, to keep weapons of war off our streets and enact commonsense gun safety measures, and to keep our country safe while advancing the values of tolerance and unity.
A full transcript of Clinton’s remarks in Pittsburgh is below:
“Hello! Thank you. Thank you so much. Thank you all.
It is so great to be back in Pittsburgh. And it is especially great to be here with the men and women of the IBEW.
I want to thank Mike Dunleavy and IBEW Local 5 for welcoming us to your house. We are happy to be here. And, I want to thank my longtime friend, colleague, advocate, Leo Gerard, who has been a champion, not just for steelworkers, but for working people – fairness, the kind of economy that lifts everybody up, for as long as I’ve known him. I am so grateful to have the support of the steelworkers and IBEW. It means a lot to me because we want to put you all to work. We’re going to have a lot of work to do in our country and nobody can do it better.
I want to recognize your County Executive, Rich Fitzgerald, and thank him for being such a great supporter, but, more than that, leading this county along with Mayor Bill Peduto, who has done such a great job to continue the renaissance of Pittsburgh. I want to join Leo in acknowledging your great Congressman Mike Doyle and your great Senator Bob Casey. There’s another mayor here, Mayor John Fetterman. John is here. John is hard to miss, so he’s here somewhere! I saw him somewhere earlier. I want to thank also City Councilwoman Natalia Rudiak, and I want to thank Josh Shapiro, your candidate for Attorney General, and a Montgomery County Commissioner, Reverend James Edward Brown, and, all of you for being with us today.
I always love coming to Pittsburgh and western Pennsylvania, and it’s especially great to be here after the Penguins clinched the Stanley Cup again! It’s great, quite a record now. They’ve got some ways to go before they match the Steelers in terms of winning it all but they’re on their way. The County Executive and I were talking, and he said something that really struck me. The Penguins did this the old fashion way: teamwork, hard work, and resilience. And that’s what we’re going to do in this election. That’s what we’re going to do in our country.
When I planned this trip, I intended to give a different talk today. About how we make our economy work for everyone, not just those at the top, how do we reduce the economic inequality that’s threatening not just our economy, but our democracy. How we rebuild our infrastructure, stand with our steelworkers against illegal dumping by China. And I wanted to talk too about how unions like yours, IBEW, and the steelworkers, and so many others, helped build the greatest middle class in the world. If anybody has a chair you can use it because don’t worry, the folks behind you have sat down and everybody is seated. That’s great.
You see, I draw from our history that labor is central to whatever we want to achieve. I’m going to be a strong partner and advocate for the American labor movement, for working people, for your rights and your opportunities to make the very best possible living in the greatest country on earth. These are the issues that are in my heart. I will be talking about them in the weeks ahead. They’re really at the center of my campaign.
But today, there are different things on my mind – and probably on yours, too, as Leo said.
We are all still reeling from what happened on Sunday in Orlando. Another terrorist attack – not overseas, but here at home. So many Americans killed and wounded. A hate crime at an LGBT nightclub, right in the middle of Pride Month. The deadliest mass shooting in the history of the United States.
The losses stretch all the way to Pennsylvania. Two of the victims were from this state. Akyra Murray, a high school basketball star from Philadelphia, was killed; she was just 18 years old. And her friend Patience Carter, also from Philadelphia, was shot. It’s a poignant reminder that even in a country as big as ours, we are all connected. And our hearts are with Patience and Akyra’s families, and all the families who are grieving now.
Since Sunday, we’ve been trying to make sense of what happened, and what we can do together to prevent future attacks.
Yesterday in Cleveland, I once again laid out my plan for defeating ISIS and the broader radical jihadist movement, around the world and online and for combating radicalization here at home, including a special focus on detecting and preventing so-called ‘lone wolf’ attacks like we saw in Orlando and San Bernardino. These attacks are carried out by individuals who may or may not have any direct contact with an organization like ISIS, but are inspired, primarily over the internet, by its twisted ideology.
I reemphasized the importance of working with Muslim communities here at home, who are often the most likely to recognize radicalization before it’s too late. After the attacks in Paris, Brussels and San Bernardino, I met with homeland security officials and Muslim community leaders in Minneapolis and Los Angeles, to hear their ideas for building stronger partnerships. We need to lift up voices of moderation and tolerance.
I also said something I’ve been saying from the very beginning of this campaign: I believe we Americans are capable of both protecting our Second Amendment rights while making sure guns don’t fall into the wrong hands. The terrorist in Orlando was the definition of ‘the wrong hands.’ And weapons of war have no place in our streets.
So the questions being debated this week about how we deal with the threat of terrorism are some of the most charged and important issues we face. And there are bound to be differences of opinion. In a country as diverse and complex as ours, I think that’s a given.
But I believe that despite those differences, on a deeper level, we are all on the same team. We may not see eye to eye on everything, but we are all Americans. And there is so much more that unites us than divides us. I have said many times, I think it’s appropriate for us, not to consider ourselves on the Republican team or the Democratic team, on the red team or the blue team, but to be on the American team. And after a terrible event, like Orlando, that’s clearer than ever.
That’s what we’re seeing in Orlando and across America – people of different faiths, backgrounds, sexual orientations, and gender identities coming together to say with one voice, we won’t let hate defeat us.
If we can count on that kind of unity and solidarity from each other – if even the families of the Orlando victims are speaking out right now against hate and division – we should certainly expect that from our leaders.
And I am sorry to say that is not what we are hearing from Donald Trump.
Donald Trump wants to be our next Commander in Chief. I think we all know that is a job that demands a calm, collected, and dignified response to these kinds of events. Instead, yesterday morning, just one day after the massacre, he went on TV and suggested that President Obama is on the side of the terrorists.
Just think about that for a second.
Even in a time of divided politics, this is beyond anything that should be said by someone running for President of the United States. And I have to ask – will responsible Republican leaders stand up to their presumptive nominee? Or will they stand by his accusation about our President?
I am sure they would rather avoid that question altogether. But history will remember what we do in this moment.
What Donald Trump is saying is shameful. It is disrespectful to the people who were killed and wounded, and their families. And it is yet more evidence that he is temperamentally unfit and totally unqualified to be Commander in Chief.
Of course, he is a leader of the birther movement, which spread the lie that President Obama wasn’t born in the United States. I guess he had to be reminded Hawaii is part of the United States. This is the man who claimed a distinguished federal judge born and raised in Indiana can’t do his job because of his – quote –‘Mexican heritage.’ I guess he has to be reminded Indiana is in the United States.
So maybe we shouldn’t be surprised. But it was one thing when he was a reality TV personality. You know, raising his arms and yelling, you’re fired. It is another thing altogether when he’s the Republican Party’s presumptive nominee for president.
Americans don’t need conspiracy theories and pathological self-congratulations. We need leadership, common sense and concrete plans.
Because we are facing a brutal enemy. In the Middle East, ISIS is attempting a genocide of religious and ethnic minorities. They’re slaughtering Muslims who refuse to accept their medieval ways. They are beheading civilians, including executing LGBT people; murdering Americans and Europeans; enslaving, torturing, and raping women and girls.
The barbarity we face from radical jihadists is profound. So I would like to have a worthy debate on the best way to keep our country safe. That’s what Americans deserve.
I read every word of Donald Trump’s speech yesterday. And I sifted through all the bizarre rants and the outright lies.
What I found, once you cut through the nonsense, is that his plan comes down to two things.
First, he is fixated on the words ‘radical Islam.’ I must say, I find this strange. Is Donald Trump suggesting that there are magic words that, once uttered, will stop terrorists from coming after us? Trump, as usual, is obsessed with name-calling. From my perspective, it matters what we do, not just what we say. In the end, it didn’t matter what we called bin Laden – it mattered that we got bin Laden.
I have clearly said that we face terrorist enemies who use a perverted version of Islam to justify slaughtering innocent people. We have to stop them, and we will. So if Donald suggests I won’t call this threat what it is, he hasn’t been listening.
But I will not demonize and declare war on an entire religion.
Now that we’re past the semantic debate, Donald is going to have to come up with something better.
He’s got one other idea. He wants to ban all Muslims from entering our country. And now he wants to go even further, and suspend all immigration from large parts of the world.
I’ve talked before about how this approach is un-American. It goes against everything we stand for as a country founded on religious freedom. But it is also dangerous. First, we rely on partners in Muslim countries to fight terrorists; this would make it harder. Second, we need to build trust in Muslim communities here at home to counter radicalization; and this would make it harder. Third, Trump’s words will be, in fact they already are, a recruiting tool for ISIS to help increase its ranks of people willing to do what we saw in Orlando. And fourth, he’s turning Americans against Americans, which is exactly what ISIS wants.
Leaders who’ve actually fought terrorists know this. General Petraeus said recently that ‘demonizing a religious faith and its adherents’ will come at a great cost, not just to our values but to our men and women in uniform and our national security.
Commissioner Bill Bratton of the New York Police Department said this kind of talk makes his job harder. He has Muslims in his police force, he has Muslims in the community, he needs everybody working together against any potential threat.
But Donald won’t listen to any of this. Not experts like General Petraeus or Commissioner Bratton, because he says he knows more about ISIS than the generals do. It’s almost hard to think of what to say about that claim.
But in this instance, Donald’s words are especially nonsensical. Because the terrorist who carried out this attack wasn’t born in Afghanistan, as Donald Trump said yesterday. He was born in Queens – just like Donald was himself. So Muslim bans and immigration reforms would not have stopped him. They would not have saved a single life in Orlando.
Those are the only two ideas Donald Trump put forward yesterday for how to fight ISIS.
Beyond that, he said a lot of false things, including about me. He said I’ll abolish the Second Amendment. Well, that’s wrong. He said I’ll let a flood of refugees into our country without any screening. That’s also wrong.
These are demonstrably lies. But he feels compelled to tell them – because he has to distract us from the fact that he has nothing substantive to say for himself.
Much of the rest of his speech was spent denigrating not just the President, but the efforts of all the brave American service members, law enforcement agents, intelligence officers, diplomats and others who have worked so hard to keep our country safe. Donald says our military is a disaster and the world is laughing at us. Wrong again.
Since 9/11, America has done a great deal at home and abroad to stop terrorists. Thousands of Americans have fought and died. We have worked intensively with our allies, engaged in fierce and vital debates here at home about how far our government should go in monitoring threats. We have vastly increased security measures at airports, train stations, power plants and many other places. And the American people, we have all become more vigilant, even while we have carried on living our lives as normally as possible.
It has been a long and difficult effort. We’ve had successes, and we’ve also had failures. But one thing’s for sure: the fight against terrorism has never been simple.
We need a Commander-in-Chief who is up to these challenges – who can grapple with them in all their complexity – someone with real plans and real solutions that actually address the problems we face. And we need someone with the temperament and experience to make those hard choices in the Situation Room – not a loose cannon who could easily lead us into war.
One more thing. Donald Trump has been very clear about what he won’t do. He won’t stand up to the gun lobby.
The terrorist who killed 49 people and wounded 53 others in Orlando did it with two guns: a handgun and a Sig Sauer MCX rifle. If you don’t know what that is, I urge you to Google it. See it for yourself.
This man had been investigated by the FBI for months. But we couldn’t stop him from buying a powerful weapon that he used to slaughter Americans in large numbers.
Let’s get this straight. We have reached the point where people can’t board planes with full bottles of shampoo – but people being watched by the FBI for suspected terrorist links can buy a gun with no questions asked. That is absurd.
It just seems like western Pennsylvania common sense, if you’re too dangerous to get on a plane, you’re too dangerous to buy a gun.
Enough is enough. Now is time for seriousness and resolve.
We need to go after ISIS overseas, we need to protect Americans here at home, counter their poisonous ideologies, support our first responders, take a hard look at our gun laws and we need to stand with the LGBT community and peaceful Muslim Americans, today and always.
In the days and weeks ahead, I will have more to say about how we will work together to keep our country and our citizens safe and take the fight to the terrorists. None of this will be easy. And none of it will be helped by anything that Donald Trump has to offer.
This is a time to set aside fear and division, and reach for unity. America is strongest when we all feel like we have a stake in our country. When we all have real chance to live up to our God-given potential, and we want others here to have that chance, too.
We’ve always been a country of ‘we,’ not ‘me.’ And we’ve always been stronger together.
We are stronger when people can participate in our democracy, share in the rewards of our economy, and contribute to our communities.
When we bridge our divides and lift each other up, instead of tearing each other down.
Here in Pennsylvania, and across America, I have listened to so many people tell me about the problems that keep you and your families up at night. Despite all the progress we’ve made, there’s not yet enough growth, which creates good jobs and raises incomes. There’s not yet enough economic fairness, so that everyone who works hard can share in the rewards. We need both – a ‘growth and fairness’ economy. Where profits and paychecks rise together.
So many people have talked to me about how the bonds that hold us together as one national community are strained – by too much inequality, too little upward mobility, social and political divisions that have diminished our trust in each other and our confidence in our shared future.
As your president, I will work every day to break down all the barriers holding you back and keeping us apart. And I will be on your side.
I’ll have the back of every steelworker getting knocked around by unfair competition. Of every working mom trying to raise her kids on minimum wage or unequal pay. Of every union member struggling to keep going in the face of concerted attacks on workers’ rights – because ‘right to work’ is wrong for workers, and we need to stand strong with unions.
Together, I want us to forge a new sense of connection and a shared responsibility to each other and our nation.
I know that’s possible, because I have seen it throughout our history – including just this week.
Some of you may have noticed a letter that went viral on the internet over the past few days. The letter is from George H.W. Bush’s presidential library. I hadn’t read it in a long time – until yesterday. And it moved me to tears, just like it did all those years ago.
It’s the letter that President Bush left in the Oval Office for my husband, back in January of 1993. They had just fought a fierce campaign. Bill won, President Bush lost. In a democracy, that’s how it goes.
But when Bill walked into that office for the very first time as President, that note was waiting for him. It had some good advice about staying focused on what mattered, despite the critics. It wished him happiness. And it concluded with these words:
‘You will be our President when you read this note. I wish you well. I wish your family well. Your success is now our country’s success. And I am rooting hard for you. George.’
That’s the America we love. That is what we cherish and expect.
So let us come together, we can disagree without being disagreeable, we can root for each other’s success. Where our President is everyone’s President, and our future belongs to us all.
Let’s make this once again the big-hearted, fair-minded country we all know and love. Thank you all very much.” |
def add_texts(self, texts, batch_size=1000):
for doc in self.spacy_lang.pipe(texts, as_tuples=False, batch_size=batch_size):
self._add_valid_doc(doc) |
Bilateral ileal ureter substitution for patients with ureteral strictures secondary to gynecological tumors radiotherapy: a multi-center retrospective study Background The selection of treatment for bilateral ureteral strictures caused by radiotherapy in patients with gynecological tumors often brings great challenges to urologists. This study was designed to analyze the characteristics of radiation-induced ureteral strictures and summarize the surgical experience of bilateral ileal ureter substitution. Methods We retrospectively collected the medical records of 18 patients between June 2010 and June 2019 who had a radiation-induced bilateral ureteral strictures. Time interval from radiotherapy to the discovery of ureteral stricture was categorized into short-term (less than 12 months) and long-term (over 12 months) groups. All patients received reverse 7 bilateral ileal ureteral substitution. Surgical success was defined as no restenosis, relief of symptoms, and improved/stabilized hydronephrosis. Results The patients had been suffered from ureteral stricture for a median of 12 months. The mean length of the left and right ureteral stricture was 9.6±2.6 and 8.8±3.2 cm, respectively. The mean length of the ileal graft was 29.1±7.4 cm. The mean operative time was 308.4±70.2 min, and the mean estimated blood loss was 254.7±166.2 mL. The postoperative hospital stays in the short-term group was significantly shorter than that in the long-term group (14.0 vs. 20.6 days, P=0.049). During a median follow-up time of 24.1 (4.571.9) months, the success rate was 94.4%. Eight minor complications and two major complications occurred in 7 patients. Conclusions Bilateral ileal ureter substitution can be an effective strategy for radiation-induced ureteral stricture in patients with gynecological tumors. Introduction Radiotherapy represents an important therapeutic component in the management of many gynecologic malignancies, which can be employed as primary treatment, or neoadjuvant, or adjuvant therapy. Radiotherapy is indicated in up to 60% of cervical cancer patients, 45% of endometrial cancer patients, 35% of vulvar cancer patients, 100% of vaginal cancer patients, and 5% of patients with ovarian cancer. However, the surrounding normal tissues usually receive some of the doses. The incidence of ureteral stricture was reported to be 1.0%, 1.2%, 2.2%, 2.5%, and 3.3% at 5, 10, 15, 20, and 25 years after radiation, respectively. Patients with ureteral strictures may suffer from flank pain, dilation of the upper urinary tract, and deterioration of renal function. Due to the influence of gynecological tumors and the fragility of tissues after radiotherapy, ureteral injury is difficult to manage. A percutaneous nephrostomy or indwelling ureteral stents was usually used to relieve hydronephrosis. However, percutaneous nephrostomy or the insertion of ureteral stents could not only impair the quality of life but also lead to infection, stones, and even deterioration of renal function. Bilateral ureteral stricture caused by pelvic radiotherapy is more complicated and more difficult to deal with. Although ureter reconstruction is a definitive option, it is limited by the surgical complexity and adhesions or tissue degeneration caused by radiation. Radiationinduced bilateral ureteral stricture often occurs at 4-6 cm proximal to the ureteric orifice. Ureteroureterostomy or ureteroneocystostomy is not suitable for reconstruction because of excessive tension of the anastomosis. The use of psoas hitch or Boari flap is also limited because the capacity of the bladder is insufficient for a Boari flap, especially in combination with radiation cystitis or contracted bladder. Using bowel segments for ureteral reconstruction is a promising option. However, possibly due to the presence of bowel adhesion and the risk of tumor recurrence, there is limited literature on bilateral ileal ureter substitution secondary to radiotherapy (7,. The present study aims to analyze the characteristics of radiation-induced ureteral strictures and summarize our experience with bilateral ileal ureter substitution. We present the following article in accordance with the STROBE reporting checklist (available at http://dx.doi.org/10.21037/tau-21-255). Patients From June 2010 to June 2019, 18 patients treated by bilateral ileal ureter substitution were enrolled. The demographics, gynecological cancer histories, laboratory data, imaging studies, perioperative data, and followups were recorded. All patients were consecutively and preoperatively diagnosed with bilateral ureteral strictures. The diagnosis was made based on subjective criteria, such as flank pain, pyelonephritis, and the radiological criteria including retrograde urography or antegrade + retrograde urography, computed tomography urography (CTU), and diuretic renography. Time of ureteral strictures was defined as the interval from the last radiotherapy to the discovery of symptoms or abnormal imaging examination and was categorized as short-term (less than 12 months) and longterm (over 12 months). The main surgical indication for bilateral ileal ureter substitution was patients with bilateral long or multiple ureteral strictures, which cannot be treated simply by ureteroureterostomy, ureteroneocystostomy, or Boari flap, and the patients had one of the following conditions: (I) intolerance to ureteral stents (9 cases); (II) deterioration of the renal function after indwelling ureteral stent (3 cases); (III) recurrent urinary tract infection with ureteral stents or nephrostomy tubes (1 case); (IV) patients' willingness (5 cases). The surgical indications for augmentation ileocystoplasty included (I) irritation symptoms of bladder; (II) a bladder volume less than 100 mL in the urodynamic study. Exclusion criteria included (I) elevated serum creatinine above 1.5 mg/dL; (II) bowel disease; (III) tumor recurrence; (IV) intolerance to surgery. Complications were evaluated by the Clavien-Dindo classification system. This study was approved by the ethics committee of our hospital (No.: 2020-SR-283). Informed consent was obtained from all participants. All research procedures were conducted in accordance with the Declaration of Helsinki (as revised in 2013). Surgical technique Polyethylene glycol electrolytes were taken to clean the intestines, and enteral nutrition emulsions were consumed to ensure a scum-free diet the day before surgery. The patient was placed in a supine position after general anesthesia. A midline incision and splitting of the bilateral line of Told were performed to expose both ureters. The level of the healthy ureter was judged by observing whether the urine can flow out of the ureteral stump smoothly. Intraoperative indocyanine green fluorescent imaging could help determine the level of the healthy ureter in difficult cases. The ureter proximal to the injury site or the renal pelvis was spatulated for subsequent anastomosis. A 20-30 cm ileal segment was removed at least 15 cm away from the ileocecal valve after measuring the ureter defect length. Small intestine continuity was restored with side-to-side anastomosis using a linear stapler. There was a reverse "7" configuration in all patients (Figure 1), in which the internal ureteral stents were placed. Usually, the bowel goes above the inferior mesenteric artery through the left colonic mesentery (Figure 2A). The left ureter/renal pelvis and ileal graft were anastomosed end-to-end by continuous suture with 4-0 barbed suture, while the right ureter was anastomosed end-to-side on the same ileal graft. The terminal ileal graft was turned up about 2 cm to form an anti-reflux nipple by full-thickness-seromuscular suture ( Figure 2B). We performed the ileocystostomy in a twolayer fashion, with successive mucosa-to-mucosa sutures and intermittent seromuscular-detrusor muscle sutures. Normal saline was used to fill the bladder for further confirmation of the bladder capacity during the operation in suspicious patients, and augmentation ileocystoplasty was performed simultaneously in proper patients. After the fibrotic bladder wall around the bladder dome was opened, the distal ileal segment was incised on the antimesenteric border and oversewed in a "U" shape. The distal segment was then subsequently sutured into a hemi-pouch for augmentation cystoplasty. Afterwards, the mucosa of the hemi-pouch was sutured to the dissected bladder wall ( Figure 2C). In addition, we only tried to loosen the tissues around the bladder during the operation, namely "autologous augmentation", for patients with a bladder volume greater than 100 mL but less than 200 mL. The ERAS protocol includes (I) analgesia: constant speed epidural analgetic pump and NSAIDs; (II) symptomatic treatment of nausea and vomiting; (III) liquid diet after flatus, and gradually resume full diet. Follow-up The follow-ups of patients were performed at 1, 3, and 6 months after surgery and at least twice a year afterwards. The patients regularly received symptoms evaluation, physical examinations, bimanual examination, urine routine test, blood tests (including serum creatinine, tumor markers, electrolyte test, and blood gas analysis), and transvaginal ultrasound at each visit. Cystoscopy is performed 1 month after the surgery when removing the ureteral stent. Radiographic examinations including CTU/ functional cine magnetic resonance urography (MRU) were performed every 6 months. Surgical success was defined as no restenosis, relief of symptoms, no deterioration of hydronephrosis. Statistical analysis All analyses were performed with SPSS ® Statistics, version 20.0. The Kolmogorov-Smirnov test was used to check whether the data were normally distributed. The independent sample t-test was used for continuous variables. The chi-square test or the Fisher's exact test was used for categorical variables. The rank-sum test was used for non-normal distributions. A two-sided value of P<0.05 was considered to indicate statistical significance. A line chart of creatinine and eGFR for each patient was used to trend the renal function before and after the surgery. The hydronephrosis-free survival and renal-impairment-free survival outcomes were analyzed by Kaplan-Meier analysis. Baseline characteristics A total of 18 female patients with bilateral ureteral strictures caused by radiotherapy underwent ileal ureter substitution. The mean age of the patients was 46.6±8.4 years. All the patients had a history of gynecological tumor, including cervical cancer (15, 83.3%) or endometrial cancer (3, 16.7%). The stages of cervical cancer ranged from IA to IIA, and endometrial cancers were from I to II. The tumors were treated by radical hysterectomy ± bilateral salpingooophorectomy, and adjuvant radiotherapy was applied after surgeries. There was no sign of recurrence. The patients had been suffered from bilateral ureteral strictures for a median of 12 months. The strictures were located on the lower or mid-lower ureter. The mean length of the left ureteral stricture was 9.6±2.6 cm, and the mean length of the right ureteral stricture was 8.8±3.2 cm. Symptoms included flank pain (9, 50.0%), fever (1, 5.6%), anasarca (1, 5.6%), and 7 patients (38.9%) were found hydronephrosis during periodic review without any complaints. In addition, no patients had bowelrelated symptoms. All patients had a history of indwelling double-J ureteral stents, and uni-or bilateral percutaneous nephrostomy had been indwelled for 9 months before surgery. The detailed characteristics and history of radiotherapy were shown in Table 1. Peri-operative information All the patients underwent bilateral ileal ureter substitution successfully, with 4 patients simultaneously receiving augmentation ileocystoplasty due to a small bladder capacity. The mean length of the ileal graft was 29.1±7.4 cm. The mean operative time was 308.4±70.2 min, and the mean estimated blood loss was 254.7±166.2 mL, without blood transfusion during operation. The median postoperative length of stay was 15 d (range, 9-93 d). The comparative outcomes of the short-term group and the long-term group were shown in Table 2. The postoperative hospital stays in the short-term group were significantly shorter than those in the long-term group (14.0 vs. 20.6 days, P=0.049). There were no significant differences in the stricture length, the indwelling time of preoperativeureteric stents or nephrostomy tubes, the operation time, the estimated blood loss, or the postoperative renal function ( Table 2). Intraoperative complications occurred in 1 patient. In this case, the sigmoid colon was damaged when separating the adherent intestine tube, and the general surgeon performed a one-stage suture repair. Follow-up During a median follow-up time of 24.1 (4.5-71.9) months, the surgical success rate was 94.4%. Postoperative radiological upper tract images demonstrated that there was no evidence of obstruction in any patient ( Figure 3A,B). Both left and right sides of hydronephrosis were relieved than before. Functional cine MRU showed resolution of preoperative hydronephrosis and good peristalsis in the ileal graft (Video 1). No stenosis of the anti-reflux nipple was observed under the cystoscope (Video 2). The mean preand post-operative creatinine were 107.7±26.7 and 97.8± 30.7 mol/L, respectively. The mean pre-and post-operative eGFR were 59.1±18.6 and 66.9±24.3 mL/min/1.73 m 2, respectively. The line chart of creatinine and eGFR for each patient was shown in Figure 4. All the patients had stable renal function. The long-term hydronephrosis-free survival and renal-impairment-free survival outcomes were shown in Figure 5. Regarding the postoperative complications, 8 minor complications (grade ≤2) were developed in 5 patients. Urinary tract infections (4/18, 22.2%) were the most common complications, followed by ileus (3/18, 16.7%). One patient was found to have a urine leak and recovered by conservative treatment. Major complications (grade ≥3) Major 0 2 *There is a significant difference between the two groups. BMI, body mass index; DJ, double "J"; Egfr, estimated glomerular filtration rate. A B accounted for 2 out of all patients. One patient suffered from a fistula 10 days after surgery, though intraoperative repair for sigmoid injury was performed. However, the patient had abdominal pain caused by a colonic fistula. Thus, the patient was treated with colostomy and was cured with a hospital stay of 93 days. The other patient suffered from a pulmonary embolism and recovered after hemodynamics and respiratory support and anticoagulation therapy. Discussion Radiotherapy is a widely used treatment in gynecological tumors. For cervical cancer, primary radiotherapy for early-stage cervical cancer has an oncology outcome that is indistinguishable from surgery. In addition, adjuvant radiotherapy for mid-risk to high-risk cervical cancer can reduce the risk of disease progression. For mid-risk to high-risk endometrial cancer, adjuvant radiotherapy can reduce the risk of local recurrence. However, even though great efforts have been taken to adjust the target area of radiotherapy, it will inevitably affect normal tissues. Radiation induces apoptosis of ureteral cells with inflammation, which will eventually cause ureteral scars and lumen stenosis. The treatment of radiation-induced ureteral stricture is complicated, and bilateral ureteral stricture is more difficult to deal with. Since radiogenic injury to ureters is irreversible and progressive, drainage with nephrostomy tubes or longterm ureteral stents should be permanent. In this longterm conservative treatment process, many complications may be inevitable, such as infection, inadequate relief of obstruction, irritative bladder symptoms, and suprapubic and loin pain. Surgical reconstruction can provide an alternative, permanent treatment to improve patients' quality of life. Traditional reconstructive strategies, such as ureteroureterostomy, ureteroneocystostomy, psoas hitch, and Boari flap, require sufficient length of the ureter or sufficient bladder capacity. The inflammatory exudation and fibrosis caused by radiotherapy increase the complexity of surgery, and it is difficult to meet the principle of tensionfree anastomosis. The use of ileal segments for ureter reconstruction was first reported by Shoemakers in a patient with urinary tuberculosis in 1906, and it became an accepted procedure in the late 1950s. For bilateral ureteral stricture, several configurations of ileal graft were designed to bridge the ureteral stump and bladder, such as "7", "11", "Y", and "U". "U" shaped ileum remained a problem that one side of the intestine was antiperistaltic. "11" and "Y" configurations required two segments of ileum, thus, blood supply and mesangial tension caused difficulty on surgery. The "7" configuration and reverse "7" configuration could achieve bilateral peristaltic anastomosis. Accordingly, the reverse "7" configuration was applied for most cases of bilateral ileal ureter substitution. Compared with the results of previous studies ( Table 3), we reported a considerable success rate of bilateral ileal ureter for long ureteral strictures secondary to radiotherapy, with a low complication rate. Hydronephrosis was significantly relieved in all cases. No patients needed further management or suffered renal insufficiency. Our promising results were established in proper preoperative evaluation and selection. Ruling out the possibility of recurrence and metastasis in gynecological tumors before reconstruction was essential at first. In our patients, no gynecological tumors infiltrated outward in terms of tumor staging. Regular reexamination indicated no recurrence or distant metastasis occurred in all patients after tumor resection. In addition, it is noteworthy that patients should have a good and stable preoperative renal function. Previous studies discussed that the creatinine threshold before ileal ureter replacement ranged from 1.7-2.0 mg/dL. The ileal graft selected for the bilateral ureteral substitution was longer, which may cause an easier postoperative metabolic problem. We set the criteria as the creatinine should not be higher than 1.5 mg/dL. Patients who did not meet the requirements of creatinine were recommended to indwell ureteral stents or nephrostomy tubes to relieve renal function. Furthermore, comparing to ureteral stents, we recommended nephrostomy for 3 months, ensuring enough ureteric rest before reconstruction. Radiation-induced ureteral injuries have different characteristics in different periods. In the short term, pathological changes manifest mainly as inflammatory exudation, and in long-term it is mainly fibrosis. We found that short-term ureteral strictures were mostly detected by re-examination, and long-term ureteral strictures were mostly found by the complaints caused by long-lasting hydronephrosis. For this reason, patients in the short-term group firstly tended to adopt conservative drainage methods to observe the effect, while those in the long-term group underwent surgical treatment as soon as the condition improved after urine drainage. Thus, the long-term group had a shorter time on nephrostomy and DJ stents on the contrary. No difference in operation time or blood loss was observed. We think the possible reason was that the experienced surgeon had rich experience in reconstructive surgery, which covered up the impact of acute exudation and chronic fibrosis on surgery. However, the longer strictures and difficulty in the determination of the healthy ureters in the short-term group would result in a little longer operation time, without significant difference. A small number of cases may also produce bias. The short-term group allowed for a quicker recovery from surgery. The reason may be that the three complications in the long-term group lengthened the hospital stay. Therefore, although there was no significant difference in the surgical success rate, complications, and postoperative renal function, we proposed to review patients with pelvic radiotherapy regularly to detect and treat hydronephrosis as early as possible. The reverse "7" configuration for bilateral ileal ureter substitution was recommended because it corresponds to the natural anatomy and reduces the risk of mesenteric torsion. At the same time, a reverse "7" configuration allowed the ileal ureter to mimic the natural ureteral isoperistaltic movement, not only playing a role in antireflux activities but also shortening the duration of urine in the intestine. What needs to be emphasized is that the ileum used must be a non-radiated segment. The length of the ileal graft was not limited, and it can be adjusted according to the complicated intraoperative situation. We recommended that the appropriate ileum should be selected from far and near for patients who may have an intestinal injury due to radiotherapy. The colon should be considered as a substitute if needed. Urinary diversion is not recommended because of low quality of life and stomarelated complications. In addition, radiotherapy can result in severe pelvic adhesions, fragile tissues, and easy bleeding. A continuous ileal segment helped minimize the number of anastomoses, reduce blood loss and lower the risk of anastomotic stenosis and urinary fistulas. It is more complicated when radiation-induced ureteral strictures combined with bladder contracture. Radiation damage is degradation and subsequent remodeling of the connective tissue matrix, which leads to radiation-induced fibrosis. The decrease in bladder capacity brings about symptom distress and deterioration of hydronephrosis, and even worsening of renal function. In patients who suffered from bladder irritation symptoms caused by a contracted bladder, augmentation ileocystoplasty could be performed with a continuous ileal segment at the same time. Nipple nesting sutures are necessary for anti-reflux of the distal anastomosis, while bilateral ureteral proximal anastomosis may not be suitable for an anti-reflux design. To date, it remains undetermined whether an anti-reflux technique is necessary. Some authors considered that antireflux implantation was necessary for preventing ileal graft dilation, recurrent urinary tract infection, or metabolic acidosis by stopping the transmission of pressure to the kidney and reducing the duration of contact of urine with the intestinal mucosa. However, others reported that there was no difference in outcome because the natural isoperistaltic waves of ileal grafts kept reflux from reaching the kidney, and an ileal segment longer than 15 cm had been regarded as a defender against the harmful effects on reflux. Morozov et al. had even claimed that anti-reflux anastomoses might suggest a high rate of strictures. In this series, we implemented a distal nipple valve for the anti-reflux procedure in all patients. The anti-reflux nipple was planted into the bladder, which increases the difficulty of urine reflux along the ileal cystostomy. The contraction of the bladder detrusor muscle and the double contractility of the intestine were more conducive to closing the end lumen. Additionally, the ends of the ureters were trimmed into a fish-mouth shape with a diameter comparable to that of the intestine. The proximal anastomosis was made as wide as possible so that urine can flow without resistance. Strict management during the perioperative period and regular postoperative follow-up of bilateral ileal ureter play an equally irreplaceable role. Only 2 patients suffered from major complications. The sigmoid colon was damaged due to severe intra-abdominal adhesions during the operation in one patient. Although the segment was repaired during the procedure, an intestinal fistula still appeared after the operation, and repair of the fistula was ultimately performed. At present, abdominal imaging shows that the intestinal fistula was cured. This case suggests that it is better to perform bowel preparation when the adhesions caused by radiotherapy are expected to be severe. Once unexpected bowel injury occurs, a primary suture can proceed safely. A simultaneous temporal ileostomy is one secure choice of option for treatment. The other patient suffered from pulmonary embolism. It may be attributed to the hypercoagulable state of cancer patients and the long time in bed. Therefore, ERAS and postoperative prophylactic anticoagulation are also essential. Minor complications were common with urinary tract infection and intestinal obstruction, which were cured by conservative treatment. In addition, blood gas analysis was regularly reviewed and oral sodium bicarbonate tablets were used to prevent postoperative metabolic acidosis. Postoperative cine MRU is recommended to help identify the function of the wide bowel used for ileal ureteral substitution. In the previous study, cine MR was reported as a reliable tool for assessing gastric motility and monitoring small bowel peristalsis. Dilation of the upper urinary tract or the ileal graft does not mean that the operation has failed because the upper urinary tract with long-term hydronephrosis needs a long time to recover. For bilateral ileal ureter, dynamics image can visualize the movement of the ileal segment and urine excretion, showing advantages in providing high temporal and spatial morphology and monitoring the function of the reconstructed urinary tract to current still imaging examination. At the same time, cine MRU is a nonradioactive examination. In our series, there were no obvious abnormalities in the urine drainage and the peristaltic waves of the replaced ureter-ileal graft. No fixed stenosis was detected. In addition, dynamic MRU was superior for recognizing ureteral jets, which indicated the process of urine being transmitted from the ureter into the bladder. To our knowledge, this is the largest study in China to date to report surgical experience and promising clinical results of bilateral ileal ureter substitution for extremely complicated ureteral strictures induced by radiotherapy. However, there are still some limitations in our study. First, a fundamental limitation was that all patient data were collected retrospectively. Second, information about initial radiotherapy was incomplete because these complicated cases were all referred by other hospitals, and some relevant information could not be traced back. Third, the number of patients was small because of the low incidence of bilateral ureteral strictures. At last, the follow-up time was short, and long-term follow-up results are needed. In the future, prospective cohorts with a large sample size are urgently needed. In conclusion, for patients receiving pelvic radiotherapy, a regular reexamination is recommended to detect ureteral stricture as early as possible. Bilateral ileal ureter substitution is a feasible option for patients with bilateral ureteral strictures induced by radiotherapy. Rigorous patient selection, reconstructive principal, surgical technique, and strict postoperative management were the precondition of satisfying outcomes and low complication rates. |
def parser(date: str):
return datetime.strptime(date, '%d/%m/%Y') |
package com.kael.ldap.model;
import leap.core.security.UserPrincipal;
import java.util.HashMap;
import java.util.Map;
/**
* @author kael.
*/
public class BindOpUserPrincipal implements UserPrincipal {
protected String name;
protected String loginName;
protected String id;
protected String dn;
protected Map<String, Object> ext = new HashMap<>();
public BindOpUserPrincipal(String id, String loginName, String name, String dn) {
this.name = name;
this.loginName = loginName;
this.id = id;
this.dn = dn;
}
@Override
public String getName() {
return name;
}
@Override
public String getLoginName() {
return loginName;
}
@Override
public Object getId() {
return id;
}
public String getDn() {
return dn;
}
public void setDn(String dn) {
this.dn = dn;
}
public void setName(String name) {
this.name = name;
}
public void setLoginName(String loginName) {
this.loginName = loginName;
}
public void setId(String id) {
this.id = id;
}
public void addAll(Map<String, Object> map){
this.ext.putAll(map);
}
public Object getProperty(String key){
return ext.get(key);
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.