content
stringlengths 7
2.61M
|
---|
Sometimes, it’s easy to miss the basic concepts, and relational databases are no different. Check out this article about how does a relational database work.
Check out how you can build Multi-Release JARs with Maven and Java 9. This is an awesome tip!
We released dedicated Dialects for MariaDB, so you don’t have to use the MySQL-specific Dialects when working with MariaDB.
Integration testing is of paramount importance when building an enterprise application. However, many projects rely on in-memory databases (e.g. H2, HSQLDB) for testing, while in production they use Oracle, SQL Server, PostgreSQL or MySQL. In this article, you’ll find how you can run integration tests faster using tmpfs and Docker.
Check out this very ingenious solution to discriminator-based Multitenancy suing Hibernate Filters.
If you’re using JCache through Spring, Hibernate, and Ehcache, this article explains how you can prevent spontaneous cache creation.
Concurrency Control is a very tricky subject. Check out this article about how explicit pessimistic locking interacts with INSERT, UPDATE, and DELETE statements.
Emmanouil Gkatziouras wrote two articles about Hibernate and Hazelcast as a 2nd-level caching provider:
Russ Thomas wrote https://sqljudo.wordpress.com/2014/12/29/what-every-dba-and-swe-should-know-about-ef/[a comprehensive list of ORM Anti-Patterns. Although the article was written for Entity Framework, the tups apply to JPA or Hibernate.
For our Portuguese readers, Rhuan Henrique Rocha da Silva wrote an article about the meaning of mappedBy in JPA and Hibernate.
Thorben Janssen wrote an article about adding Full-Test Search capabilities to a Hibernate application.
Paul Klingelhuber wrote an article about how the Dirty Checking mechanism interacts with JPA AttributeConverters. |
// GetRequestURI returns the URL to be used when sending a request
func (c *HAProxyConfig) GetRequestURI(csv bool) string {
c.setupClient()
if csv {
return fmt.Sprintf("%vhaproxy;csv", c.URL.String())
}
return fmt.Sprintf("%vhaproxy", c.URL.String())
} |
package de.uni_hamburg.informatik.swt.se2.mediathek.werkzeuge.rueckgabe;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import de.uni_hamburg.informatik.swt.se2.mediathek.fachwerte.Datum;
import de.uni_hamburg.informatik.swt.se2.mediathek.fachwerte.Kundennummer;
import de.uni_hamburg.informatik.swt.se2.mediathek.materialien.Kunde;
import de.uni_hamburg.informatik.swt.se2.mediathek.materialien.Verleihkarte;
import de.uni_hamburg.informatik.swt.se2.mediathek.materialien.medien.CD;
import de.uni_hamburg.informatik.swt.se2.mediathek.materialien.medien.DVD;
/**
* Testklasse für den VerleihkartenComparator
*
* @author SE2-Team
*/
public class VerleihkartenComparatorTest
{
private VerleihkartenComparator _comparator;
private Verleihkarte _verleihkarte1;
private Verleihkarte _verleihkarte2;
private Verleihkarte _verleihkarte3;
public VerleihkartenComparatorTest() throws Exception
{
Kunde kunde1 = new Kunde(new Kundennummer(222322), "Renate", "Becker");
Kunde kunde2 = new Kunde(new Kundennummer(334354), "Lena", "Schmidt");
CD cd = new CD("Titel", "Kommentar", "Interpret", 200);
DVD dvd = new DVD("Titel", "Kommentar", "Regisseur", 199);
_verleihkarte1 = new Verleihkarte(kunde1, cd, Datum.heute());
_verleihkarte2 = new Verleihkarte(kunde1, dvd, Datum.heute());
_verleihkarte3 = new Verleihkarte(kunde2, cd, Datum.heute());
_comparator = new VerleihkartenComparator();
}
/**
* Testet folgendes: Wenn die Kunden gleich sind, soll nach dem Medium
* sortiert werden.
*/
@Test
public void testCompareGleicherKunde()
{
// Gleicher Kunde, unterschiedliche Medien:
assertTrue(_comparator.compare(_verleihkarte1, _verleihkarte2) < 0);
// Gleicher Kunde, unterschiedliche Medien:
assertTrue(_comparator.compare(_verleihkarte2, _verleihkarte1) > 0);
// Gleicher Kunde, gleiche Medien:
assertEquals(0, _comparator.compare(_verleihkarte1, _verleihkarte1));
}
/**
* Testet folgendes: Wenn die Kunden unterschiedlich sind, soll nach den
* Kunden sortiert werden.
*/
@Test
public void testVerschiedeneKunden()
{
// Unterschiedliche Kunden, gleiches Medium:
assertTrue(_comparator.compare(_verleihkarte1, _verleihkarte3) < 0);
// Unterschiedliche Kunden, gleiches Medium, andere Reihenfolge:
assertTrue(_comparator.compare(_verleihkarte3, _verleihkarte1) > 0);
// Unterschiedliche Kunden, unterschiedliche Medien. Würde nach den
// Medien sortiert, so würde sich genau die andere Reihenfolge ergeben.
assertTrue(_comparator.compare(_verleihkarte2, _verleihkarte3) < 0);
}
}
|
The latest explosions continued a wave of violence in the capital since a devastating truck bomb on Wednesday.
A series of blasts in Kabul on Saturday killed at least 19 people at a funeral for one of the victims of clashes between police and protesters a day before.
Saturday's blasts shattered an uneasy calm which had descended after authorities blocked the streets of Kabul in a bid to prevent a repeat of the bloody confrontation between protesters and police on Friday.
The violence, fueled by public anger over the inability of President Ashraf Ghani's divided government to ensure security in Kabul, has exacerbated political tensions between rival factions, and Ghani issued a call for unity.
"The country is under attack," Ghani said in a message on Twitter. "We must be strong and united."
Kabul's Italian-run Emergency Hospital, which has treated a stream of wounded over the past few days, said 19 people had been reported killed and 16 wounded had been brought to the hospital. The interior ministry said there were six dead and 87 wounded.
Government Chief Executive Abdullah Abdullah was at the funeral but was unharmed, while survivors said a series of explosions had ripped through the crowd, most of whom appeared to be linked to Abdullah's mainly Tajik Jamiat-e-Islami party.
"There were sounds of explosions everywhere and I saw my hands and face were on fire," said Mohammad Azim, who was being treated for burns at the Emergency Hospital. "There were parts of human bodies everywhere."
One of the most bloody weeks in Kabul for months began with the devastating truck bomb attack in the city's diplomatic zone on Wednesday morning which killed more than 80 people and wounded more than 460.
That was followed by five more deaths on Friday during clashes which broke out between protesters and police at a rally demanding the resignations of Ghani and Abdullah over repeated security failures.
As the violence has continued, it has become increasingly politicized, exacerbating tensions between rival ethnically based political groups.
The Taliban, which has often carried out bomb attacks in the past, issued a swift denial that it had any role and instead blamed factional rivalries in the government's own camp, the group's spokesman Zabihullah Mujahid said.
Saturday's blasts occurred at the funeral of the son of the deputy Senate speaker, Mohammad Alam Izadyar, an ethnic Tajik ally of Abdullah. He died after being seriously injured in clashes during Friday's protest.
Rahmatullah Begana, who was at the funeral, said the first explosion occurred as the mullah made the first call to prayer and as people scattered, it was followed by another.
"I saw a lot of people lying on the ground," he said.
The violence further complicates the situation confronting U.S. and coalition officials as they work on plans expected to see an increase of between 3,000 and 5,000 in the number of foreign troops in Afghanistan.
"While peaceful demonstrations are welcome in a democracy, some narrow political elements used this opportunity to spark violence, resulting in more death and suffering," the embassy said. The statement was released after Friday's clashes but before the latest attacks on Saturday.
With much of the capital locked down by security forces, a group of around 200 protesters remained near the blast site in the center of town, sheltering from the sun in open tents.
Otherwise, security authorities in Kabul told people not to attend protests and demonstrations, citing the risk of attacks on large gatherings of people.
While unusually large, Wednesday's truck bomb scarcely differed from a long series of previous high-profile militant attacks that have killed hundreds of civilians in Afghanistan since most international forces left the country in 2014.
In the first three months of the year at least 715 civilians were killed across the country, after almost 3,500 in 2016, the deadliest year on record for Afghan civilians. |
Do G proteincoupled receptors expressed in human lingual epithelium interact with HPV11? Human papillomaviruses infect epithelia but little is known about the nature of cell surface receptors interacting with the viral particles. It has been proposed that glycosaminoglycans and integrins may be involved in the attachment process. In the present study, the putative interactions of viruslike particles of human papillomavirus type 11 (HPV11), which present a tropism for nasopharyngeal epithelia, with olfactory and taste receptors expressed in the human lingual epithelium were studied. The L1 protein of HPV11 was produced in insect cells. The presence of L1 viruslike particles was analyzed by ELISA using monoclonal antibodies specific for fullsize particles and by electron microscopy. Using immunofluorescence, it was observed that viruslike particles interacted with taste buds from murine tongue, with the tagged human olfactory receptor hJCG5 expressed in HEK293 but not with the tagged taste receptor hT2R4. This therefore suggests that hJCG5 may be involved in the adsorption process of HPV11 to lingual epithelium serving as a socalled adsorptionadhesive molecule. J. Med. Virol. 79:15451554, 2007. © WileyLiss, Inc. |
// CreateRelation creates many to many relationship between User and ShortLink.
func (u *UserShortLinkFake) CreateRelation(user entity.User, shortLinkInput entity.ShortLinkInput) error {
if shortLinkInput.CustomAlias == nil {
return errors.New("empty alias")
}
customAlias := shortLinkInput.GetCustomAlias("")
isExist, err := u.HasMapping(user, customAlias)
if err != nil {
return err
}
if isExist {
return errors.New("relationship exists")
}
u.users = append(u.users, user)
u.shortLinks = append(u.shortLinks, entity.ShortLink{
Alias: customAlias,
LongLink: shortLinkInput.GetLongLink(""),
ExpireAt: shortLinkInput.ExpireAt,
CreatedAt: shortLinkInput.CreatedAt,
})
return nil
} |
package sg.ncl.service.mail;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import static sg.ncl.service.mail.MailProperties.PREFIX;
/**
* Created by Chris on 8/26/2016.
*/
@ConfigurationProperties(prefix = PREFIX)
@Getter
@Setter
public class MailProperties {
static final String PREFIX = "ncl.mail";
/**
* The initial delay.
*/
private String delay;
/**
* The interval between retries.
*/
private String interval;
/**
* The number of times to retry.
*/
private String retry;
}
|
The crux of the Shirley Sherrod controversy is what she said outside of the two-minute video clip posted by Big Government — whether she was, as she claims, telling a story about how she overcame racial prejudice while helping poor farmers in Georgia, or whether the clip is a good encapsulation of her views. So we asked Andrew Breitbart, the founder of Big Government, why he hasn’t posted the full video.
“I don’t have it,” Breitbart told TPMmuckraker in an interview. Breitbart said his source sent him just the edited clips at first, but is in the process of sending the full video.Breitbart said he’ll post the full video, if he can get permission from the video production company who filmed it for a local NAACP chapter. He also maintained that he didn’t edit the clip and that it was sent to him already edited.
Sherrod was the Georgia director of rural development for the USDA until yesterday, when Breitbart posted the video (below) in which she says that, in 1986, she didn’t help a farmer as much as she could have because he was white. Sherrod told CNN this morning she was forced to resign immediately by her superiors in Washington. She contends that, in the March speech to a Georgia chapter of the NAACP, she was telling a story of how she got past her own prejudices.
But even if the full video shows what Sherrod says it does, Breitbart said he’s seen enough.
“I think the video speaks for itself,” he said. “The way she’s talking about white people … is conveying a present tense racism in my opinion. But racism is in the eye of the beholder.”
He also takes issue with how the audience, many of them members of the NAACP, respond positively to her comments — proof, he says, of prevalent racism.
For Breitbart, it’s all a case of the pot calling the kettle black (no pun intended). Last week, the NAACP passed a resolution asking the Tea Party movement to repudiate racism in its ranks. According to Breitbart and other conservatives, that’s the same as labeling the tea party racist — an accusation he’s railed against for months. He claims that reports of racism at a tea party protest in the final days of the health care debate, for example, are completely fabricated.
The Sherrod video is, he said, “way more evidence of racism than anything that the mainstream media and TPM and all of the rest of you Spencer Ackerman friends provided to prove that the tea party was racist.”
The clip:
The NAACP says it’s reviewing the entire video. The owner of the production company who filmed it has told TPMmuckraker he won’t release it to the public until he gets permission from the NAACP.
[Ed. note: By way of transparency, Spencer Ackerman, currently a writer on national security issues at Wired‘s Danger Room blog, wrote for Talking Points Memo in 2007 and generally covered national security issues. In referring to Ackerman, Breitbart was apparently referring to the Journolist controversy from today.] |
package org.kie.services.client.api;
import java.util.HashMap;
import java.util.Map;
import javax.jms.ConnectionFactory;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory;
import org.hornetq.core.remoting.impl.netty.TransportConstants;
import org.hornetq.jms.client.HornetQJMSConnectionFactory;
import org.kie.api.runtime.manager.RuntimeEngine;
import org.kie.remote.client.api.RemoteClientBuilder;
import org.kie.remote.client.api.RemoteJmsRuntimeEngineBuilder;
import org.kie.remote.client.api.RemoteRestRuntimeEngineBuilder;
import org.kie.remote.client.api.RemoteWebserviceClientBuilder;
import org.kie.remote.client.api.exception.InsufficientInfoToBuildException;
import org.kie.remote.services.ws.command.generated.CommandWebService;
import org.kie.services.client.api.command.RemoteConfiguration;
/**
* This factory class is the start point for building and configuring {@link RuntimeEngine} instances
* that can interact with the remote API.
* </p>
* The main use for this class will be to create builder instances (see
* {@link #newJmsBuilder()} and * {@link #newRestBuilder()}). These builder instances
* can then be used to either directly create a {@link RuntimeEngine} instance that will
* act as a client to the remote (REST or JMS) API, or to create an instance of this factory.
* </p>
* An instance of this factory can be used to create client {@link RuntimeEngine} instances
* using the {@link newRuntimeEngine()} method.
*/
public abstract class RemoteRuntimeEngineFactory extends org.kie.remote.client.api.RemoteRuntimeEngineFactory {
// The name of this class may not be changed until 7.x for backwards compatibility reasons!
protected RemoteConfiguration config;
/**
* Create a new {@link RemoteJmsRuntimeEngineBuilder} instance
* to configure and buid a remote API client {@link RuntimeEngine} instance.
* @return A {@link RemoteJmsRuntimeEngineBuilder} instance
*/
public static RemoteJmsRuntimeEngineBuilder newJmsBuilder() {
return new org.kie.services.client.api.RemoteJmsRuntimeEngineBuilderImpl();
}
/**
* Create a new {@link RemoteRestRuntimeEngineBuilder} instance
* to configure and buid a remote API client {@link RuntimeEngine} instance.
* @return A {@link RemoteRestRuntimeEngineBuilder} instance
*/
public static RemoteRestRuntimeEngineBuilder newRestBuilder() {
return new org.kie.services.client.api.RemoteRestRuntimeEngineBuilderImpl();
}
/**
* Create a new {@link RemoteRestRuntimeEngineBuilder} instance
* to configure and buid a remote API client {@link RuntimeEngine} instance.
* @return A {@link RemoteRestRuntimeEngineBuilder} instance
*/
public static RemoteWebserviceClientBuilder<RemoteWebserviceClientBuilder, CommandWebService> newCommandWebServiceClientBuilder() {
return new RemoteCommandWebserviceClientBuilderImpl();
}
static void checkAndFinalizeConfig(RemoteConfiguration config, RemoteClientBuilder builder ) {
if( builder instanceof org.kie.services.client.api.RemoteJmsRuntimeEngineBuilderImpl ) {
org.kie.services.client.api.RemoteJmsRuntimeEngineBuilderImpl jmsBuilder = (org.kie.services.client.api.RemoteJmsRuntimeEngineBuilderImpl) builder;
// check
if( config.getUserName() == null ) {
throw new InsufficientInfoToBuildException("A user name is required to access the JMS queues!");
}
if( config.getPassword() == null ) {
throw new InsufficientInfoToBuildException("A password is required to access the JMS queues!");
}
// Connection Factory
if( jmsBuilder.createOwnFactory ) {
ConnectionFactory createdConnectionFactory = null;
if( jmsBuilder.hostName == null ) {
throw new InsufficientInfoToBuildException("A host name or IP address is required to create a JMS ConnectionFactory!");
}
if( jmsBuilder.jmsConnectorPort == null ) {
throw new InsufficientInfoToBuildException("A connector port is required to create a JMS ConnectionFactory!");
}
Map<String, Object> connParams;
if( config.getUseUssl() ) {
connParams = new HashMap<String, Object>(7);
connParams.put(TransportConstants.PORT_PROP_NAME, jmsBuilder.jmsConnectorPort);
connParams.put(TransportConstants.HOST_PROP_NAME, jmsBuilder.hostName);
jmsBuilder.checkKeyAndTruststoreInfo();
// SSL
connParams.put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
connParams.put(TransportConstants.KEYSTORE_PASSWORD_PROP_NAME, jmsBuilder.keystorePassword);
connParams.put(TransportConstants.KEYSTORE_PATH_PROP_NAME, jmsBuilder.keystoreLocation);
connParams.put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, jmsBuilder.truststorePassword);
connParams.put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, jmsBuilder.truststoreLocation);
} else {
// setup
connParams = new HashMap<String, Object>(3);
connParams.put(TransportConstants.PORT_PROP_NAME, jmsBuilder.jmsConnectorPort);
connParams.put(TransportConstants.HOST_PROP_NAME, jmsBuilder.hostName);
connParams.put(TransportConstants.SSL_ENABLED_PROP_NAME, false);
}
// create connection factory
createdConnectionFactory = new HornetQJMSConnectionFactory(false,
new TransportConfiguration(NettyConnectorFactory.class.getName(), connParams));
config.setConnectionFactory(createdConnectionFactory);
}
if( jmsBuilder.jbossServerHostName != null && jmsBuilder.remoteInitialContext == null ) {
jmsBuilder.remoteInitialContext = getRemoteJbossInitialContext(jmsBuilder.jbossServerHostName, config.getUserName(), config.getPassword());
}
if( jmsBuilder.remoteInitialContext != null ) {
// sets connection factory, if null
config.setRemoteInitialContext(jmsBuilder.remoteInitialContext);
} else {
config.checkValidJmsValues();
}
} else if( builder instanceof RemoteRestRuntimeEngineBuilder ) {
if( config.getServerBaseUrl() == null ) {
throw new InsufficientInfoToBuildException("A URL is required to access the REST services.");
}
if( config.getUserName() == null ) {
throw new InsufficientInfoToBuildException("A user name is required to access the REST services.");
}
if( config.getPassword() == null ) {
throw new InsufficientInfoToBuildException("A password is required to access the REST services.");
}
} else if(builder instanceof RemoteWebserviceClientBuilder ) {
if( config.getServerBaseUrl() == null ) {
throw new InsufficientInfoToBuildException("A URL is required to access the web services.");
}
if( config.getUserName() == null ) {
throw new InsufficientInfoToBuildException("A user name is required to access the web services.");
}
if( config.getPassword() == null ) {
throw new InsufficientInfoToBuildException("A password is required to access the web services.");
}
}
if( config.getExtraJaxbClasses() != null && ! config.getExtraJaxbClasses().isEmpty() ) {
if( config.getDeploymentId() == null ) {
throw new InsufficientInfoToBuildException("A deployment id is required if user-defined class instances are being sent.");
}
}
}
} |
Cross-cultural measurement invariance of the Quality of Life Enjoyment and Satisfaction Questionnaire-Short form across ten countries: the application of Bayesian approximate measurement invariance Background The Quality of Life Enjoyment and Satisfaction Questionnaire-Short Form (Q-LES-Q-SF) is the most frequently used generic quality of life (QOL) measure in many countries and cultures worldwide. However, no single study has been carried out to investigate whether this questionnaire performs similarly across diverse cultures/countries. Accordingly, this study aimed to assess the cross-cultural measurement invariance of the Q-LES-Q-SF across ten different countries. Methods The Q-LES-Q-SF was administrated to a sample of 2822 university students from ten countries: Bangladesh, Brazil, Croatia, India, Nepal, Poland, Serbia, Turkey, the United Arab Emirates, and Vietnam. The Bayesian approximate measurement invariance approach was used to assess the measurement invariance of the Q-LES-Q-SF. Results Approximate measurement invariance did not hold across the countries for the Q-LES-Q-SF, with only two out of 14 items being non-invariant; namely items related to doing household and leisure time activities. Conclusions Our findings did not support the cross-cultural measurement invariance of the Q-LES-Q-SF; thus, considerable caution is warranted when comparing QOL scores across different countries with this measure. Item rewording and adaptation along with calibrating non-invariant items may narrow these differences and help researchers to create an invariant questionnaire for reliable and valid QOL comparisons across different countries. Background In recent years, quality of life (QOL) has received considerable attention in both clinical and research settings. However, there is little consensus on the definition of QOL due to the complexity of its concept, with more than 100 questionnaires developed over the past decades. Nevertheless, the World Health Organization Open Access *Correspondence: [email protected] (WHO) provided a broad definition of QOL which is centered on individual's subjective perception of the quality of his or her life: "an individual's perception of their position in life in the context of the culture and value systems in which they live and in relation to their goals, expectations, standards and concerns". According to this definition, QOL is a multidimensional concept in which physical and emotional well-being in addition to social relations, activity of daily living, and overall life satisfaction are conceptualized. Previous studies showed that different values, traditions, and beliefs in different cultures along with environmental conditions and availability of opportunities strongly affect the QOL construct. Accordingly, QOL questionnaires may be sensitive to the language, dialect, customs, beliefs and traditions of local cultures where they are constructed. Translation and more importantly cultural adaptation are indispensable prerequisites for administering a given questionnaire developed in one cultural group to individuals in another culture. One of the key aspects of cultural adaptation of a questionnaire when aiming to conduct cross-cultural research is assessing the assumption of measurement invariance which is known as crosscultural measurement invariance. Measurement invariance means that individuals from different groups perceived the meaning of items in a QOL questionnaire in the same way, given the same level of underlying QOL. When measurement invariance does not hold, differences in means and other estimates observed across different cultures cannot be relied upon. Because it is not clear whether the observed difference is a true difference in the underlying construct of interest or it is an artificial effect of different implicit or explicit interpretation of items by individuals in different cultures and countries. Moreover, a lack of measurement invariance of a questionnaire can question its validity due to the fact that a fundamental assumption in measurement is that individuals' response to the items of the questionnaire should not be affected by their characteristics such as country, language or culture which are unrelated to the construct being measured. The Quality of Life Enjoyment and Satisfaction Questionnaire-Short Form (Q-LES-Q-SF) is one of the most frequently used generic QOL questionnaires in psychiatric and mental health research and clinical settings, which was developed from the original long form representing the QOL concept widely. A key feature of this questionnaire is that it emphasizes the subjective perceptions of individuals physical, psychological, and social domains of daily life. Furthermore, this questionnaire has been translated in several languages and validated in diverse groups of individuals with different socio-economic backgrounds and lifestyles, as well as with other health conditions besides the psychiatric ones [2,. The results of the previous studies revealed that the Q-LES-Q-SF questionnaire exhibited sound psychometric properties and it has been used as a QOL questionnaire in more than 100 peer-reviewed publications. In addition, the measurement invariance of this questionnaire was confirmed across different age, sex, educational level and type of substance dependence in a French sample. However, to the best of our knowledge, no single study has investigated the cross-cultural measurement invariance of this questionnaire. Due to the increasing interest in international QOL research, there is, therefore, a need to investigate the measurement invariance of this questionnaire across various cultures. This study aimed to assess the cross-cultural measurement invariance of the Q-LES-Q-SF questionnaire across ten countries including, Bangladesh, Brazil, Croatia, India, Nepal, Poland, Serbia, Turkey, the United Arab Emirates, and Vietnam, using Bayesian approximate measurement invariance approach. Participants Data for the present study were used from an international project which evaluated psychological well-being and Internet use aspects among university students, including QOL collected with the Q-LES-Q-SF. In that project, data was collected via an online survey. It was considered a convenient sampling of students pursuing various graduation courses in colleges/universities across the available countries from rural and urban communities based on the location of the researchers of the project. The same recruitment procedure was followed across all locations. After obtaining the approval from the respective institution from where the students were contacted, the researchers or project's staff were responsible to advertise and to send a link of the survey to the students. Students were solicited to participate in the survey directly during classes or via students' organizations. The completion of the survey was voluntary and anonymous. In total, 2822 college/ university students completed the Q-LES-Q-SF questionnaire in the following countries: Bangladesh, Brazil, Croatia, India, Nepal, Poland, Serbia, Turkey, the United Arab Emirates, and Vietnam. There is no certain rule for sample size calculation in Bayesian approximate measurement invariance approach; however, previous research showed that this method was also appropriate for studies with small sample size (e.g., n = 150). Accordingly, except for the Brazil the sample size in the other countries seems to be sufficient. The survey was available in Croatian, English Polish, Portuguese, Spanish, Serbian, Turkish, and Vietnamese. Students participating form Bangladesh, India, Nepal, and the UAE completed the English version of the survey, since the English language is used completely or in part during their educational courses in the respective colleges/university and there was no need for additional language versions. The only exclusion criterion for the study was not providing informed consent. The study was approved by an institutional board/ethical committee relevant to the authors' institutions. A signed informed consent form was obtained from all participants prior to starting the data collection. For all details on the sampling see and. Q-LES-Q-SF The Q-LES-Q-SF is a 16-item, self-report questionnaire that evaluates QOL and satisfaction in several domains. The first 14 items assess satisfaction with physical health, mood, work, household activities, social relationships, family relationships, leisure activities, daily functioning, sexual life, economic status, living/housing situation, ability to get around physically, vision, and overall wellbeing. The last two items measure medications, and overall satisfaction and contentment. The items are scored on a 5-point Likert scale from 1 (not at all or never) to 5 (frequently or all the time), with higher scores indicating better enjoyment and satisfaction with life. The total score of the questionnaire is the sum of these 14 items ranging from 14 to 70 and expressed as a percentage based on the maximum total score of the items completed. The last two items, which are not included in the total score, are about medications and overall life satisfaction and were added to the short form for clinical reasons. Accordingly, we assessed the measurement invariance of the first 14 items in our study. Statistical analysis One-way ANOVA and Chi-square statistics were applied to investigate whether participants from different countries differed significantly in terms of their age and gender, respectively. p-value < 0.05 was considered as a significance level. In the present study, the Bayesian approximate measurement invariance approach was applied to investigate the measurement invariance of the Q-LES-Q-SF across the ten countries. This newly introduced method, which is based on Bayesian structure equation modelling, is particularly useful when there are many groups to compare such as cross-cultural studies. In traditional exact methods (e.g., multiple-group confirmatory factor analysis), researchers presume that the loadings (or intercept) are exactly equal across the groups, this means that the differences of the loadings (or intercepts) across the groups are exactly zero. Previous research showed that the exact zero constraints are very restrictive especially in many group comparisons and may leads to frequent rejection of the exact invariance model, even when the differences are ignorable across the groups. However, a promising new application of Bayesian analytic properties for assessing measurement invariance enables researchers to relax exact equality constraints. In this technique, the differences in loadings (or intercepts) of like items across the groups are allowed to be approximately zero with a mean of zero and some small variance which works through employing very narrow prior distribution to cross-group parameter differences. Because this small amount of variability is reasonably normal, a normal distribution with mean of zero and small variance is assumed for parameter differences of loadings (or intercepts). Previous simulation studies pointed out that small variances like 0.01 or 0.05 keep differences at a minimum level; accordingly, the construct of interest remains approximately comparable across the groups. In this study, according to the outline of, we began running a model with a very small variance (0.001); if the model was not acceptable, we then gradually increased it to 0.01, 0.05, and 0.1 to determine the level of variation for the parameters differences of loading and intercept which would lead to acceptable model fit. The fit of the Bayesian model can detect whether actual deviations are larger than those that the researcher allows in the prior distribution which is based on the posterior predictive probability (PPP) values and the confidence interval (CI) between the observed and replicated chi-square values. When zero lied in the CI and the PPP was not significant (around 0.5), the model fit well. While, when the model fit was unacceptable, the non-invariant items can be detected by identifying those loadings and intercepts which were different across the groups. It should be noted in contrast to traditional exact and approximate procedures in which all studied countries are compared with each other, in Bayesian approximate measurement invariance approach each country is compared with a previously set values estimated based on the mean of the posterior distribution. In other words, non-invariant items were determined as the difference of a particular parameter (loadings and/or intercept) at a specific country from the average of estimates, based on posterior distribution, for that particular parameter across the ten countries. If a difference of zero was outside of the 95% confidence interval of the posterior distribution of differences, the difference was assumed to be significant and the item can be considered to be non-invariant. It should be mentioned that in the present study, the proportion of female students was significantly smaller in Indian, Nepal, and particularly Bangladesh in contrast to the other countries which should be taken into account in the assessment of measurement invariance. The importance of this issue is due to the fact that lack of invariance may be due to inherent differences in the distribution of confounding variables across the groups not due to the inherent measurement non-invariance. However, despite the appealing properties of Bayesian approximate measurement invariance approach, the effect of confounding variables cannot be controlled in the model. Therefore, we investigated the cross-cultural measurement invariance of the questionnaire in the subsample of male and female students separately in addition to the whole sample. The Mplus 7 software was used to perform Bayesian approximate measurement invariance. Table 1 represents the mean (± SD) age of individuals as well as percentage of males/females in each country. As shown the mean age of participant significantly differed among the countries; Brazil had the greatest mean age (25.18 ± 5.26) among all the studied countries and India had the smallest mean age (20.57 ± 2.97). In addition, the percentage of male and female were significantly different among the countries; in almost all countries the percentage of female were higher than male except for India, Nepal, and particularly for Bangladesh. Table 2 presents the value of fit indices including PPP and 95%CI for assessing Bayesian approximate measurement invariance for various magnitudes of the prior variance in the whole sample and the subsamples of male and female students. For all values of the variance of prior distribution from the smallest prior variance (0.001) to the largest value (0.1), the PPP values were zero and the confidence interval did not include zero. This suggested that approximate scalar measurement invariance did not hold for all values of variance. Table 3 shows all deviation of intercepts and factor loadings from the defined priors (mean = 0 variance = 0.1) in Bayesian approximate measurement invariance approach for the whole sample. Non-invariant items across the ten countries were shown with asterisk. In addition, significant deviation of the factor loadings and/or intercepts from the average were shown by in Table 1 Distribution of participants by gender and age across ten countries various countries. As shown only items 4 and 7 were invariant across all countries; while, the other items were non-invariant at least in one country. This means that at least in one country the estimated posterior parameters of interest (factor loading and/or intercept) were deviated substantially from the average posterior estimates across all the countries and these items were non-invariant. For instance, the intercept of item 6 (family relationship) deviated from the defined prior only in Bangladesh which means that this item was interpreted differently by the university students in this country as opposed to the other nine countries. On the other side, the parameters of item 12 (ability to get around physically without feeling dizzy or unsteady or falling) deviated from the defined prior in almost all countries, except for Nepal and Vietnam. This suggested that this item was perceived in a different way in almost all countries. Item 1 in India and Turkey, item 3 (work) in Vietnam and Poland, and item 5 (social relationships) in Indian and Poland were not invariant. In addition, items 9 (sexual drive, interest and/or performance) and 11 (living/housing situation) were non-invariant in Bangladesh, Vietnam, and Poland. The parameters of item 2 (mood) in India, Bangladesh, Vietnam, and Poland along with item 14 (overall sense of well-being) in India, Bangladesh, and Poland deviated from the defined prior. Furthermore, item 10 (economic status) was perceived differently in Croatia, Serbia, India, UAE, and Vietnam. Item 13 (your vision in terms of ability to do work or hobbies) were also perceived in a different way in Serbia, India, Turkey, and Vietnam. Poland was the country in which the greatest number of non-invariant items were detected following by India and Bangladesh. It should be noted that almost the same non-invariant items were detected for the other values of prior variance including, 0.001, 0.01, and 0.05 which were not shown here. Tables 4 and 5 present the results of Bayesian approximate measurement invariance technique for the subsample of male and female students, respectively (mean = 0 variance = 0.1). Non-invariant items across the ten countries were shown with asterisk. In addition, significant deviation of the factor loadings and/or intercepts from the average were shown by in various countries. An interesting finding is that fewer non-invariant items were detected in both subsamples (particularly in the subsample of male students) as compared with the results of whole sample. As shown in Table 4 items 4, 5, 10, 13, and 14 were invariant across all countries and the other items were non-invariant at least in one country. In contrast, only items 4, 7, and 14 were invariant among subsample of female students (Table 5); while the other items were detected as non-invariant across the countries. Discussion This study is the first to investigate the measurement invariance of the Q-LES-Q-SF across several countries with diverse socioeconomic, cultural, and religious backgrounds. Our findings revealed that 12 out of 14 items (85%) were non-invariant across the studied countries, what implies that individuals from different countries likely have different perceptions of the items. Thus, the Q-LES-Q-SF is likely not an invariant measure for crosscultural QOL comparisons. Table 3 Deviation of factor loadings and intercepts from prior defined parameters (mean = 0, variance = 0.1) in the whole sample lo: factor loading, int: intercept, : deviation of a given parameter in a given country from the defined priors (mean = 0, variance = 0.1) Croatia Serbia India UAE Nepal Brazil Bangladesh Turkey Vietnam Poland lo int lo int lo int lo int lo int lo int lo int lo int lo int lo Only item 4 (household activities) and item 7 (leisure time activities) were invariant across the countries. Although there are no clear data regarding the reason for this finding, one possible explanation could be that irrespective of culture or socioeconomic status of countries, individuals from different countries had the same feeling about levels of satisfaction with doing household and leisure time activities. On the other hand, item 12 (ability to get around physically without feeling dizzy or unsteady or falling) was non-invariant across almost all the countries, except Nepal and Vietnam. Different interpretations of this items in different countries may be attributed to variation in factors such as the perception of health, description of symptoms, or cultural schemata which is apparent in folk illnesses. The remaining items were also non-invariant at least in one country. This discrepancy in the performance of the items across different countries could be attributed to a wide variety of factors. Previous research showed that diverse contextual characteristics of different countries such as cultural, historical, religious, and socio-economic variables along with different values placed on QOL may lead to different Table 4 Deviation of factor loadings and intercepts from prior defined parameters (mean = 0, variance = 0.1) in the male subsample lo: factor loading, int: intercept, : deviation of a given parameter in a given country from the defined priors (mean = 0, variance = 0.1) Croatia Serbia India UAE Nepal Brazil Bangladesh Turkey Vietnam Poland lo int lo int lo int lo int lo int lo int lo int lo int lo int lo Table 5 Deviation of factor loadings and intercepts from prior defined parameters (mean = 0, variance = 0.1) in the female subsample lo: factor loading, int: intercept, : deviation of a given parameter in a given country from the defined priors (mean = 0, variance = 0. individual perceptions of the items in QOL measures [5,7,. Translation inequivalence including both wording of an item or the response category labels might be another reason for item bias across countries with different languages. Although previous studies showed that even the best possible translation may not be accurately equivalent to the original version of the questionnaire, the more similar the language of respondents was to the original language in which the questionnaire was developed, the less non-invariant items were observed. For instance, Scott et al. reported that the most non-invariant items in the European Organization for Research and Treatment of Cancer Core Quality of Life questionnaire (EORTC QLQ-C30) were detected between Eastern European and Asian countries. Furthermore, different response styles in terms of social desirability responding, acquiesces response set (the tendency to agree with questions) and extreme response bias in different culture can be potential sources of measurement non-invariance of a given questionnaire. Generally, it has been shown that Asian respondents are more likely to agree with the question and less likely to select extreme values in rating scale. This could be a possible explanation for the findings of this study showing that in Nepal, the factor loadings and intercepts of all the items did not deviate from the defined priors (mean = 0 and variance = 0.1). Another important finding is that fewer non-invariant items were detected when cross-cultural measurement invariance testing was performed on the subsample of male and female students separately (especially among subsample of male students). Although this result may be due to the fact that lack of invariance across the studied countries can be attributed to the differences in the interpretation of the items between male and female students, small and unbalanced sample size may also negatively influence the power of the test for detecting non-invariant items. It should be mentioned that there was no similar study on the cross-cultural invariance of the Q-LES-Q-SF questionnaire for comparison. However, several studies have examined the measurement invariance of the other QOL questionnaires such as the World Health Organization Quality-of-Life Scale (WHOQOL), KINDL, KIDSCREEN, EORTC QLQ-C30, Pediatric Quality of Life Inventory (PedsQL), and EUROHIS-QOL across various cultural, language, and ethnic groups [5,. Yet, inconsistent and contradictory findings have been offered by these studies. An example is a study conducted by Gibbons et al. in which the measurement invariance of the WHOQOL was assessed across four diverse countries including UK, Zimbabwe, Russia, and India. They concluded that the majority of the items (75%) were non-invariant in the studied countries. Moreover, Bentez-Borrego et al. reported that the WHOQOL-BREF was not invariant across nine Spanish-speaking countries in spite of their common language. Scott et al. also conducted two different studies for investigating the measurement invariance of the EORTC QLQ-C30, which is one of the most widely used QOL questionnaires cancer patients, across more than 20 countries all over the world. Their findings revealed that the results of the United Kingdome (UK), North America, and Australia were fairly similar which may be due to their common language and culture. While, more non-invariant items were detected for Eastern European countries as opposed to Western European ones. In addition, the most number of non-invariant items were found across Eastern European and Asian countries. Furthermore, in research which examined the measurement invariance of the EUROHIS-QOL 8-item questionnaire across ten European countries moderate non-invariance was detected. It has been shown that when the culture was closer to the western draft language culture, less non-invariant items were identified. Stevanovic et al. also reported that the PedsQL, as one of the most frequently used pediatric QOL questionnaire, was not invariant across seven countries. Similar results were found for the measurement invariance of the KINDL questionnaire across Serbian and Iranian children and adolescents. In contrast, there are a number of studies supporting the cross-cultural invariance of some QOL measure. For example, it has been shown that WHOQOL-AGE used for measuring QOL in aging population was partially invariant across three countries, namely, Finland, Poland, and Spain. The KIDSCREEN questionnaire introduced for evaluating children and adolescent QOL is another example of cross-cultural invariant measure. Two independent studies have indicated that this questionnaire was invariant across Serbian and Iranian children and adolescents as well as thirteen European countries. These contradictory results could be attributed to various possible explanations such as various QOL questionnaires applied in the mentioned studies, differences in health conditions and age of respondents along with different statistical methods used to assess measurement invariance of the questionnaires. It should be noted that the key strength of the current study is utilizing a large sample size which included socioeconomically, culturally, and religiously diverse nations. These components enhance the generalizability of our findings to a multicultural context. Furthermore, the main advantage of the Bayesian approximate measurement invariance used in this study is that researchers are allowed to relax exact equality constraint by presuming that factor loadings and intercept are only approximately equal; yet, differences are still maintained at a minimum to make sure that the underlying construct remains approximately comparable across the groups. Several limitations to this study need to be acknowledged. First, the studied countries differed significantly in terms of age and gender of the participants. The importance of this issue is due to the fact that without controlling the effects of covariates, the results of measurement invariance can be distorted. Second, the socioeconomic status of the participants was not collected which may be a possible explanation for lack of invariance; therefore, it is highly recommended that in future studies socioeconomic status of participants be evaluated while testing measurement invariance. Third, the measurement invariance of the Q-LES-Q-SF was not evaluated across different countries with the same language or across different languages in the same region. Hence, it is onerous to realize that different interpretations of the items were due to a lack of translation equivalence or cultural diversity. Accordingly, conducting structured interviews with bilingual people in future studies could be fruitful to answer this question. Moreover, since the results of measurement invariance testing could vary substantially from one questionnaire to another; therefore, further investigations should be conducted to assess the cross-cultural measurement invariance of the other QOL questionnaires. Finally, sample size in different countries was unbalanced, especially in the subsample of male and female students, which may adversely affect the power of the measurement invariance testing for detecting lack of invariance. Although previous simulation research showed that unbalanced sample size led to substantial reduction in the power of measurement invariance testing across two groups, no study has been carried out to investigate this issue when the number of groups being tested is large. Hence, it would be interesting to investigate the effects of unbalanced sample size on the power of Bayesian approximate measurement invariance approach in future studies. Conclusion Our findings did not support the cross-cultural measurement invariance of the Q-LES-Q-SF, thus considerable caution is warranted when comparing QOL across different countries with this measure. It is suggested that before any comparisons, the cross-cultural measurement invariance is tested first and the questionnaire is calibrated for non-invariant items. The results of this study may help in future research with Q-LES-Q-SF in item rewording and adaptation as well as calibrating noninvariant items to narrow the differences and help create an invariant measure for valid QOL comparisons across different countries since using culture-specific measures is not practical for cross-cultural studies. |
But the war, which Russia initially saw as a chance to unite within its empire all of its Slavic brethren in “Little Russia,” as it called Ukraine, also planted suspicions that poison Russia’s dealings with Ukraine to this day.
It left many Russians convinced that Ukrainian national sentiment and even the Ukrainian language, dismissed by czarist officials as a “Little Russian dialect,” were fictions invented by its enemies to undermine Russian rule. In Russia, the wartime exploits of Ukrainian troops at Makivka and other battles in the Carpathian Mountains are remembered, when they are mentioned at all, not as an example of Ukraine’s fighting spirit, but as evidence of the perils of division among Slavic peoples.
“Now is the right moment,” the czar’s foreign minister said in 1916 after a series of military setbacks, “to rid ourselves of the Ukrainian movement once and for all.”
Austria and Germany constantly stoked nationalism among Ukrainians, Poles, Finns and other peoples then ruled by the Russian Empire. The United States, a late entrant to the war, did not fight on the eastern front. But it added to Russia’s alarm when President Woodrow Wilson in 1918 enunciated his famous Fourteen Points, proclaiming the right of “self-determination,” a principle that encouraged Ukrainians and others to demand their own countries.
Russia had long played the same game, fanning nationalist resentments against the Hapsburgs in Serbia and other territories governed or coveted by the Austro-Hungarian Empire.
Reinforced during World War II by the collaboration of some Ukrainian nationalists with the Nazis, Russian suspicions of a Western hand behind Ukraine’s national movement helped shape Moscow’s response to protests in Ukraine this year, which toppled President Viktor F. Yanukovych and led to the establishment of what Russia condemned as a fascist government engineered by the West.
In western Ukraine, which declared itself an independent West Ukrainian People’s Republic in 1918, nearly every town now has a street named after the Sich Sharpshooters, who shot mostly at the Russian Army. At Makivka, the battleground has become a pilgrimage site, dominated by a memorial for the 49 Ukrainians who died fighting here for Austria against Russia. |
Paraganglioma: an unusual tumour of the parathyroid gland Abstract A case of paraganglioma arising within a parathyroid gland is reported. The lesion was an incidental finding in a block dissection of neck performed for squamous carcinoma of the pharynx. A well-circumscribed lesion, exhibiting the characteristic pathological features of a paraganglioma, was embedded within the right inferior parathyroid gland. Due to its location, the chief histological differential diagnosis was an unusual variant of parathyroid adenoma. Immunohistochemistry and electron microscopy assisted in reaching a diagnosis. This, as far as we are aware, is the first reported case of a paraganglioma of the parathyroid gland. |
SAN JUAN DEL SUR – As confidence is slowly restored in Nicaragua following the uncertainty of President Daniel Ortega’s return to power, tourism investment continues flowing into this epicenter for Pacific beach development, despite ripple effects from the U.S. real estate slump.
When the former Marxist leader took office in 2007, the tourism industry crossed its fingers in hopes that investors wouldn’t get cold feet. Many did, anyway, and the industry reported a dramatic slowdown in business and appreciation rates.
The Iguana Surf & Golf Resort north of San Juan, for instance, saw a 50% decline in sales, according to sales manager Ferdie Prado. Others reported similar difficulties.
A year later, however, savvy investors are beginning to realize that Ortega’s occasional fiery rhetoric hasn’t materialized into actions against property investors. And even moments of uncertainty involving property rights at ArenasBay ended satisfactorily for investors when the Ortega administration stepped in to sort out the problem last year.
Now developers are hoping the slow rebound continues.
Wilson has also done his homework and says that the conditions are favorable for him to move forward on investing in the luxurious Marea Alta development south of San Juan del Sur – a project that will include Nicaragua’s first tramway to bring residents from the oceanfront boardwalk up to the heights of an exclusive clubhouse overlooking the bay.
The plush development is one example of how San Juan del Sur’s real estate and tourism has continued to mature, even with Ortega back in power.
“It’s been a year, (Ortega) hasn’t confiscated any land here,” said Javier Hugentobler, broker and manager of Nicaragua Travel and Living (nicatl.com).
The quality of beachfront restaurants – now an array of seafood and international cuisine, including the new San Juan favorite, El Pozo restaurant – have taken off in the last couple years, an indication of how tourism is growing up and improving in quality.
“We’ve eaten at a dozen great places,” said Ben Korenberg, a smiling and suntanned Vancouver native visiting San Juan del Sur.
Those who have witnessed the transformation of San Juan del Sur note that the real estate market here has entered a new phase.
“Tourism came here by accident in the ’90s – with backpackers and surfers. And we decided we gotta sell this country for its exoticness, its newness,” said Hugentobler, a Swiss national.
Since 2000, developers have bought large swaths of land that are now being developed with villas and condos dotting the bay’s rocky cliffs. Hugentobler is a partner in Bahia delSol, which sells upscale villas with sweeping bay views starting at $289,000. It’s one of several condo projects breaking ground in this once-sleepy fishing village that has since become an international tourism destination.
Farther north, phase one will soon begin on 25 townhouses and 12 Spanish-style condos at the lavish “village resort” development Cala Azul. Future phases will bring 100 more homes. On the development’s Web site, co-founder Josh Taylor has a photo posted of himself posing with his arm around Ortega.
“We are planning on breaking ground during the first half of 2008. Phase one is 50% sold out, and new inquiries come in nearly daily,” Taylor told The Nica Times in an e-mail.
The Pacific coast doesn’t just mean the area around San Juan del Sur. As the country’s pristine coastline becomes more famous, it has also grown to fill in the dots between the Costa Rican border in the south to León and Chinandega to the north.
Closer to Managua, in the central Pacific, the landmark Gran Pacifica development reports that it’s moving forward with construction, while nearby the luxurious Seaside Mariana project, which will boast Central America’s first Jack Nicklaus-designed golf course, is also reporting an increase in investor interest.
“From our vantage point, every indication is that the investment climate in the country is outstanding and continuing to trend upward,” said Kevin Fleming, the chairman of Nicaragua Developments, the group behind Seaside Mariana, which is reporting “excellent” sales and increased investor interest as word gets out about the project.
Even the public sector has been investing in the tourism industry here. Plans for the coastal highway are underway (see story on Page 3); workers are toiling under the sun to improve the infamously potholed road from La Virgen to San Juan; roads and sidewalks are being built in town; and the finishing touches are being put on shower facilities at a new public beach boardwalk expected to be complete by April.
The government projects are part of the Ortega government’s commitment to tourism,which plays a key role in the administration’s poverty relief efforts.
Tourism Minister Mario Salinas, during a recent event with Ortega, said that the government thinks tourism could nearly double in the coming years, up to 1.2 or 1.4 million tourists a year.
Real estate agents, too, think Nicaragua is in a position to compete in a global market. Hugentobler said the slumping U.S. market could even benefit Nicaragua.
“It’s a warring world out there and Central America is North America’s backyard garden. This is an undervalued market,” he said. |
def user_owns_provisional(self, user):
if self.provisionaledits is None:
return False
else:
return str(user.id) in self.provisionaledits |
import { parseVariables, stringifyVariables } from '../lib/stringifyVariables'
// tslint:disable:object-literal-sort-keys
const jobObject = {
key: '37274',
jobHeaders: {
bpmnProcessId: 'parallel-subtasks',
elementId: 'ServiceTask_0i7cog1',
elementInstanceKey: '37270',
workflowDefinitionVersion: 1,
workflowInstanceKey: '34027',
workflowKey: '1',
},
customHeaders: {},
worker: '26fe8907-f518-4f8d-bd75-06acaec3c154',
retries: 3,
deadline: '1547595187455',
variables: {
jobId: '7ead71d8-30c9-4eda-81e7-f2ada6d7d0da',
subtaskCount: 200,
tasksCompleted: null,
},
type: 'sub-task',
}
const expectedStringifiedVariables =
'{"jobId":"7ead71d8-30c9-4eda-81e7-f2ada6d7d0da","subtaskCount":200,"tasksCompleted":null}'
const jobDictionary = {
key: '37274',
customHeaders: {},
worker: '26fe8907-f518-4f8d-bd75-06acaec3c154',
retries: 3,
deadline: '1547595187455',
variables:
'{"jobId":"7ead71d8-30c9-4eda-81e7-f2ada6d7d0da","subtaskCount":200,"tasksCompleted":null}',
type: 'sub-task',
}
test('stringifyVariables returns a new object', () => {
expect(stringifyVariables(jobObject)).not.toEqual(jobObject)
})
test('stringifyVariables stringifies the variables key of a job object', () => {
const stringified = stringifyVariables(jobObject)
expect(typeof stringified.variables).toBe('string')
expect(stringified.variables).toBe(expectedStringifiedVariables)
})
test('parseVariables returns a new object', () => {
expect(parseVariables(jobDictionary)).not.toEqual(jobDictionary)
})
test('parseVariables parses the payload key of a job object to JSON', () => {
expect(typeof parseVariables(jobDictionary).variables).toBe('object')
})
test('parseVariables correctly parses the payload string', () => {
const parsed = parseVariables(jobDictionary)
expect(parsed.variables.jobId).toEqual(
'7ead71d8-30c9-4eda-81e7-f2ada6d7d0da'
)
expect(parsed.variables.subtaskCount).toEqual(200)
expect(parsed.variables.tasksCompleted).toBeNull()
expect(Object.keys(parsed.variables).length).toBe(3)
})
test('parseVariables returns an object with all the keys of the original', () => {
const parsed = parseVariables(jobDictionary)
expect(Object.keys(parsed).length).toBe(7)
expect(parsed.key).toBe('37274')
expect(parsed.worker).toBe('26fe8907-f518-4f8d-bd75-06acaec3c154')
})
|
A DiabetesRelated Epitope of GAD65 Abstract: The 65kDa isoform of glutamic acid decarboxylase (GAD65) is a major autoantigen in type 1 diabetes, and most patients have serum antibodies reactive with conformational epitopes on the GAD65 molecule. The aims of this study were to prepare mutants of GAD65 to further localize the type 1 diabetes epitope in the region of the PEVKEK loop of GAD65 and to identify the particular amino acids within the epitope that are recognized by autoimmune diabetes sera. |
I. Field of the Invention
This invention relates to a portable microcomputer system and in particular to a battery operated microcomputer system having a hard disk.
II. Description of the Related Art
The development of low power consumption CMOS LSIs has led to the development of powerful battery operated microcomputer systems. In the past, non-volatile data storage for such computers has been provided by microcassette data storage devices. As data storage technology has advanced, some battery operated computer systems have incorporated floppy disk devices (FDD) and hard disk devices (HDD). These peripheral data storage devices consist of a rotating magnetic storage medium driven by an electric motor. Since floppy disks spin at a low speed, the disk is rotated only when necessary to read or write data; however, the high rotating speeds of hard disks and the low required access times require that the HDD be kept rotating continuously. This results in high power consumption and low battery life in a battery powered computer system, and the battery life is determined mostly by the power consumption of the HDD.
In conventional battery powered computer systems, the charge, or energy, state of the battery is monitored during computer system operation. When the battery energy state has dropped to a predetermined level, normally measured by battery voltage, a visual or audible alarm is triggered giving the operator an opportunity to either store data currently in RAM and shut down the system or plug in an external power adapter to support continued computer system operation.
Battery powered computer systems employing HDDs experience a sharp drop in battery charge in a relatively short time, which is particularly acute in systems employing Ni-Cd battery power sources. Ni-Cd batteries maintain a fairly constant voltage during a discharge cycle until a low energy state is reached, then the voltage drops rapidly leaving only a very short time for the operator to take action to prevent a data loss, especially when a high power consumption peripheral device such as an HDD is in use. If the operator does not act quickly enough, valuable data will be lost as the battery rapidly expends its energy by continuing to operate the HDD.
It is an object of the present invention to minimize the risk of data loss in a battery powered computer system having a high power consumption peripheral device such as an HDD when the battery system reaches the end of a discharge cycle.
It is a further object of the present invention to shut down a high power consumption peripheral device such a HDD in a battery powered computer system only when the HDD is in a standby mode and not actively reading or writing data.
Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out in the appended claims. |
CHICO — Early-season games for the Chico State baseball team usually mean cold temperatures, early darkness and a high chance of rain outs.
For Wildcats head coach Dave Taylor, it’s the time to see how his team is coming together before the schedule hits California Collegiate Athletic Association play.
Thursday afternoon in the Wildcats’ home opener, the hosts split a doubleheader with Simpson University, the NAIA program out of Redding, winning the first game 10-8 but dropping the nightcap 9-0 at Nettleton Stadium.
Alex DeVito finished 2-for-3, Jorge Perez was 2-for-5 with three RBIs, Turner Olson was 3-for-5 with a triple and three RBIs and Myles Moran collected a pair of RBIs.
Grant Larson, the junior left-hander, started the opener and allowed just two runs (one earned) on five hits, two walks while striking out seven in six innings of work. In the offseason, Larson added a cut fastball to his repertoire and relied on his new pitch to get a few strikeouts on Thursday.
Chico State’s offense helped out Larson by jumping out to a 3-1 lead in the first inning. An error coupled with a hit batsman set up Jorge Perez’s run-scoring single to right center to tie it at 1-1. Turner Olson followed with an RBI base hit then Aaron Lizarraga tallied an RBI single and Myles Moran drew a bases-loaded walk to push the lead to 3-1.
The Wildcats added a pair of runs in the third behind a sacrifice fly from Moran and a double to left field from Griffin Hennessey.
Larson then retired the next five batters he faced until Simpson center fielder and Chico High alumnus Creed Smith poked a single to right center field in the fifth. Smith, who graduated from Chico High in 2016, combined for six hits, four doubles and two RBIs on the day. He also hauled in a running catch at the wall in the bottom of the third in the second game.
Chico State (3-1) added a run in the seventh and four more runs in the eighth thanks to a 2-RBI triple off the bat of Olson. The Wildcats carried a 10-2 lead into the ninth until the Red Hawks began to rally.
Simpson’s offense woke up scoring six runs in the ninth after a base hit, two walks, a 2-RBI double and a fielding error. Connor Sealey took the mound for Chico State with two outs in the ninth and was able to get Andrew Shaw to ground out ending the the first game.
That momentum carried over into the second game as the Red Hawks took an early 3-0 lead heading into the third.
Simpson (4-3) opened the flood gates and took an 8-0 advantage in the third frame when Christopher Brue blasted a grand slam over the left-field fence.
The three-game series concludes with a single game beginning at noon on Friday.
Up next: Simpson at Chico State, noon, Friday. |
Safety of Moxibustion: A Systematic Review of Case Reports Moxibustion is a traditional medical treatment originating in China. It involves using the heat of burning moxa to stimulate acupoints. It is considered safe and effective and is widely used throughout the world. The increasing use of moxibustion has drawn attention to the procedure's adverse events (AEs). This review covers a total of 64 cases of AEs associated with moxibustion in 24 articles, reported in six countries. Some evidence of the risks of moxibustion has been found in these cases. AEs include allergies, burns, infection, coughing, nausea, vomiting, fetal distress, premature birth, basal cell carcinoma (BCC), ectropion, hyperpigmentation, and even death. The position, duration, distance between moxa and skin, proficiency of the practitioners, conditions of the patients, presence of smoke, and even the environment of treatment can affect the safety of moxibustion. Improving practitioner skill and regulating operations may reduce the incidence of adverse reactions and improve the security of moxibustion. Introduction Moxibustion is an ancient method of external therapy. It is based on the theories underlying traditional Chinese medicine (TCM). It usually involves stimulating acupoints with burning moxa wool. Moxibustion treatments can be classified as traditional moxibustion, drug moxibustion, and modern moxibustion. Traditional moxibustion is characterized by the use of moxa as a burning material and can be divided into direct moxibustion and indirect moxibustion depending on whether the moxa is in direct contact with the skin during the operation. In direct moxibustion, a moxa cone is placed directly on the skin and ignited. In indirect moxibustion, the moxa cone or stick is kept at a distance from the skin. The insulating materials used in indirect moxibustion can be air, garlic, ginger, aconite, salt, or other substances. In drug moxibustion, also called natural moxibustion, irritant drugs, such as cantharis, garlic, or semen sinapis (mustard seed), are coated on the surface of acupoints. This causes local skin to flush and blister, which is believed to alleviate disease. Modern moxibustion, such as microwave moxibustion, laser moxibustion, and electrothermal moxibustion, involves the simulation of traditional moxibustion stimulation factors through physical and chemical methods, which produces the therapeutic effects of moxibustion. The present review is mainly concerned with traditional moxibustion. According to TCM theory, moxibustion has a dual effect, tonification and purgation. This involves the actions of the meridian system and the roles of moxa and fire. Studies have shown that the mechanism underlying moxibustion mainly involves the thermal effects, radiation effects, and pharmacological activity of moxa and the products of its combustion. The effectiveness of moxibustion has been tested in the traditional and contemporary moxibustion clinic for more than 2500 years. A bibliometric analysis reported that up to 364 kinds of diseases can be treated with moxibustion. The most common indications of moxibustion therapy are malposition, diarrhea, and colitis. The next common indications are urinary incontinence and dysmenorrhea. The third common indications are knee osteoarthritis, temporomandibular joint disturbance syndrome, soft tissue injury, heel pain, asthma, urinary retention, and herpes zoster. Moxibustion can also be used to treat weakness, fatigue, and problems related to aging. The increasing use of moxibustion has drawn attention to its adverse events (AEs). Some case reports have described 2 Evidence-Based Complementary and Alternative Medicine these adverse reactions, side effects, and complications of moxibustion. This review summarizes the published evidence regarding the safety of this medicinal approach. Data Sources and Search Strategy. Four Chinese databases (SinoMed, CMCC, CNKI, and VIP) and three English databases (Medline, EMBASE, and Web of Science) were searched for case reports of AEs of moxibustion without any time or language restrictions. Search terms were "moxibustion, moxa, smoke, " combined with "safe, safety, adverse event, adverse reaction, side effect, complication, risk, and burn. " The literature searches were completed on November 20, 2013. Review articles on safety of moxibustion were also searched. Two systematic reviews were retrieved, and the case reports cited in these reviews were examined too. Study Selection. Only firsthand case reports of complications or AEs of moxibustion are included in this review. Comments, letters, and investigations carried out on nonhuman were excluded. Some clinical trials of moxibustion that reported adverse events were excluded for reasons originally given by Lao et al., specifically that they were too small to provide convincing evidence of rare complications. Two authors, Xu and Deng, carried out the screening and selection of articles independently. Disagreements were resolved through discussion. Data Extraction. After screening, articles were read in full and extracted by two independent reviewers, Xu and Deng. Information extracted from each case included the author, year of publication, country of occurrence, number of patients affected, disease originally treated, preexisting conditions that might have contributed to the AEs, type of moxibustion, AEs reported and their outcomes, the practitioners' training, and the patients' status at follow-up. We also assessed the likelihood of causality between the events and moxibustion for each case. The causality assessment was based on the following five criteria : time sequence of treatment and AEs, positional relationship between them, single risk factors, dechallenge (symptoms after cessation of moxibustion), and rechallenge (situations emerging during subsequent moxibustion). Each "yes" of the items was noted as 1 point. "No" and "not clear" were 0 points. The likelihood of each given AE was classified as certain, likely, possible, and unlikely based on total scores. Disagreements in this procedure were resolved by discussion or by consultation with the third author, Shen. Results In this review, a total of 24 articles reported 64 cases of AEs associated with moxibustion (Table 1). They were from six countries, China, USA, South Korea, Spain, Japan, and Israel (Table 2). The AEs of moxibustion reported in these articles include allergies, burns, infection, coughing, nausea and vomiting, fetal distress and premature birth, basal cell carcinoma (BCC), ectropion, hyperpigmentation, and other conditions ( Table 3). 3.1. Allergy. There were seven cases of allergies associated with moxibustion. Six patients developed local skin flushing, swelling, and itching, and the last one reported a scattered red skin rash covering her whole body. Three patients recovered after 3-7 days of antiallergy treatments, and four recovered immediately after cessation of moxibustion treatment. All allergic reactions occurred in female patients and were reported in China (published in Chinese). Zhang and Yang reported that a 36-year-old woman experienced mild allergies after moxibustion treatment. This patient also had dysmenorrhea and was treated with acupuncture and indirect moxibustion on the lower abdomen. She underwent more than eight rounds of treatment and experienced redness and itching of the navel skin three times. The skin allergies disappeared the next day and never recurred in subsequent moxibustion treatments. Feng and An reported a 66-year-old woman who received acupuncture and moxibustion treatments for her shoulder pain. On the third day of moxibustion, she experienced rashes and itching on her neck and shoulders. The symptoms disappeared within 1 day of cessation of moxibustion, but they recurred when her roommates underwent moxibustion therapy in their shared apartment. Hou reported a patient with a painful puerpera on her right wrist. This was treated with acupuncture combined Although the scores for these burn cases were less than 4, they were classified as "certain" because they had been directly observed to have been caused by moxibustion. Evidence-Based Complementary and Alternative Medicine 5 with moxibustion. On the second day of therapy, she experienced redness, itching, and rashes on her face, neck, and chest. The reactions disappeared if only the moxibustion was ceased. It recurred upon subsequent moxibustion. Li and Liu reported that a 28-year-old woman received moxibustion after cupping and acupuncture for her facial paralysis. Indirect moxibustion was performed with lighted moxa stick on the right Yifeng (SJ17) and the lower front of the earlobe. Two days after the treatment, the patient's right auricle became swollen and red without pain or itching. When the practitioner ceased moxibustion, the patient continued to undergo cupping and acupuncture, and the symptoms disappeared. When the moxibustion was applied nine days later, the patient's right cheek was swelling again. Li and Liu reported two allergic reaction cases of moxibustion. One patient's mother, 32 years old, accompanied her son to his moxibustion and waited with him in the room during his treatment. Three days later, she was admitted to a hospital for obvious swelling of her head and face. She was discharged after three days of antiallergy treatments. Another 22-year-old girl was cauterized at Shenque (RN8) with a moxa stick to reduce menstrual pain and experienced redness, itching, and papules of the navel. Her allergic symptoms and signs disappeared one week later. Wang reported an allergic reaction caused by excessive inhalation of moxa smoke. A 28-year-old woman underwent two rounds of moxibustion in an open treatment room without any adverse reactions. However, during the third round, she underwent moxibustion in a closed room in which she later slept. When she woke up, she experienced chest tightness, suffocation, difficulty breathing, throat discomfort, irritability, itching, and scattered papules. The allergies disappeared after three days of antiallergy treatments. Seven days later, similar adverse reactions recurred and again resolved. They never reappeared after the moxibustion had ceased. 3.2. Burns. There were 43 cases involving burns. These were reported in 6 articles. Most of the burns were in newborns, children, and individuals with sensory disabilities. The symptoms of burns caused by moxibustion included pain, local skin blisters, ulcers, and secondary infections. They were usually curable with symptomatic treatments. Another large problem with the more severe burns was permanent and disfiguring scarring. These were associated with direct moxibustion. Li reported an 18-year-old girl diagnosed with right lower limb paralysis. Treated with indirect moxibustion after acupuncture, the patient's right Yanglingquan (GB34) suffered minor burns and then blistering and ulceration. After 40 days of symptomatic treatment, the wound finally healed. In this case, the patient had sensory disturbance of the right lower limb and could not tell the practitioner administering the moxibustion that she was feeling any pain, which increased the risk of burns. Li reported 37 cases of newborn burns and infections associated with improper moxibustion from 1990 to 1997. These newborns had been treated with spark moxibustion, a folk form of moxibustion used to treat neonatal jaundice, most commonly by means of a burning object such as a rush tapped quickly on the skin. All patients showed varying degrees of burns, 34 mild and 3 moderate. Eight patients were diagnosed with secondary systemic infections, including one case of staphylococcal scalded skin syndrome (SSSS), six cases of septicemia, and one case of pyemia. The author inferred that improper and excess moxibustion were the main causes of these burns and infections. Cond-Salazar et al. reported a 40-year-old male with numerous burns on the wrist and ankle. The patient, who lived in Spain, received acupuncture and moxibustion therapy for his tennis elbow and experienced these burns as a result. However, the moxibustion therapy did cure his complaints effectively. Reinhart and Ruhs reported an Asian boy, two and a half years old, who had numerous punched-out, circular burns distributed on his face, trunk, and extremities. They were remarkably symmetrical in most areas. The boy had sustained the skin lesions when his father performed folk moxibustion after a visit to an American physician had failed to cure his child's illness. In this case, the patient's father was not an actual practitioner; he was attempting to repeat the practice as recalled from his childhood. Carron et al. reported two cases of third-degree burns associated with moxibustion. A 58-year-old white man suffered a long history of cervical pain and spasm aggravated by a postural deformity resulting from painful plantar calcaneal spurs. When conventional therapy failed to relieve his symptoms, the patient went to a local acupuncture clinic for acupuncture, scraping, and moxibustion treatments. Examination after more than three rounds of therapy showed two painful, third-degree burns, 3 mm in diameter, 3 mm deep, covered with black eschar and surrounded by a 3 4 cm area of erythema on the left heel. Another 62-year-old man had undergone three lumbar laminectomies and a dorsal rhizotomy for relief of pain of sciatic distribution. He sought acupuncture therapy at a clinic and was instructed to return home to continue his moxibustion therapy. Six months later, when the patient again sought medical attention, permanent scars were present at all moxibustion sites. Fisman reported a 38-year-old Cambodian man presenting symmetrical hyperpigmented maculae on the abdomen. These unusual skin findings had been caused by burns from the application of small pieces of smoldering cloth. Infection. There were six cases of infection involving moxibustion. They were reported in Korea, the U.S., and Israel. Of these cases, three were surface tissues infections, two were deep organ infections, and one was hepatitis C virus (HCV) infection. Chau reported a 53-year-old Korean woman who was admitted to a hospital with a diagnosis of cellulitis. Before that, the patient, though untrained in Chinese medicine, had attempted to self-administer direct moxibustion for intermittent headaches and experienced cellulitis on her instep as a complication. She was treated with intravenous antibiotics for 24 hours and discharged in a good condition.. A 48-year-old woman from South Korea had a history of prednisolone treatment combined with acupuncture and moxibustion for her degenerative arthritis. P. multocida infection is rare in humans, but this organism was isolated and identified from fluid aspirated from this woman's calf. It was probable that the organism entered through the burn wound ulcers. Choi et al. reported a 69-year-old man with pyogenic liver abscess (PLA) following acupuncture and moxibustion treatment. This patient had received acupuncture on his arms and moxibustion on his abdomen three times per week for insomnia. About one month later, he felt nauseous and feverish and lost about 9 kg of body weight. An abdominal computed tomography (CT) scan with contrast revealed multiseptated cystic lesions in the right and left lobes of liver, the largest, which was in the left lobe, measuring about 10.0 cm. Pyogenic abscess was confirmed by ultrasoundguided percutaneous needle aspiration with Gram stain and culture of the aspirate. In this case, authors assumed that the patient had Streptococcus intermedius bacteremia after being treated with contaminated acupuncture needles and Streptococcus intermedius may have been seeded in the liver. The time sequence of the symptoms and the treatments suggested a possible causal relationship, but there was no direct evidence of that. Lee et al. reported a spinal epidural abscess originating from cellulitis after moxibustion. A 78-year-old woman was suffering from diabetes mellitus, hypertension, lower back pain, and knee osteoarthritis. She had cauterized her right third finger with moxa repeatedly over 4 years and had experienced recurrent infections with intermittent pus discharge. The authors believed that the patient's spinal epidural abscess originated from osteomyelitis and cellulitis of the finger secondary to burn injuries caused by repeated moxibustion. Bardia et al. reported a 66-year-old Somalian man diagnosed with hepatocellular carcinoma secondary to cirrhosis due to hepatitis C. The patient did not have the usual risk factors for hepatitis C but had undergone moxibustion and cutting of the wrists and abdomen using sharp objects or needles to release the bad blood. It is possible that he acquired hepatitis C through the sharing of infected knives or the burn wound associated with his moxibustion therapy. Sternfeld et al. reported one case of Serratia marcescens infected silk suture rejected by combined acupuncture, moxibustion, and low-power laser therapy from the abdominal fascia. An 82-year-old Israeli woman was complaining of right hypochondrial pains caused by a forgotten foreign body that had been implanted in her body during a cholecystectomy surgery twelve years earlier. Both acupuncture and moxibustion supplemented by low-power laser beam were performed on the site of infection. Acupuncture and lowpower laser beam treatment were carried out by doctors at the clinic; patient was self-treated by moxibustion. After 20 sessions, a silk surgical suture was expelled. From then on recovery was spontaneous and fast. Fetal Harm. There were two cases of fetal harm caused by moxibustion reported in China. Cai reported one case of fetal death following moxibustion. A 26-year-old woman was diagnosed with breech presentation during the eighth month of pregnancy and was told to treat herself using moxibustion at Zhiyin (BL67) to correct it. About ten minutes into her third treatment, the pregnant woman felt chest tightness, palpitations, dizziness, vomiting, and increased fetal movement. She was admitted to hospital with a diagnosis of umbilical cord around the neck of the fetus and fetal distress. There was no improvement after oxygen and drug therapy, and the fetus died three hours after her admission. Su reported a case of premature delivery caused by moxibustion. A pregnant woman suffered breech presentation at 29-week gestation and was treated with moxibustion combined with chest-knee position therapy. Seven hours after the treatment, the patient felt lower abdominal pain continuously. This pain grew progressively more intense. Three hours later, a large amount of clear liquid was discharged from her vagina, followed by an object which became lodged in the vagina. Emergency examination showed that the fetus had been delivered incompletely in breech presentation and had already died due to suffocation. Other Adverse Events. Some rare adverse events related to moxibustion, such as coughing, nausea and vomiting, basal cell carcinoma, ectropion, xerosis, and death, were also recorded. Wen et al. reported three cases of AEs associated with moxibustion in China. A 47-year-old woman was admitted for chemotherapy after colorectal cancer surgery and sought moxibustion to reduce the discomfort induced by drugs. She was treated with moxa stick at the points of Zhongwan (RN12), Danzhong (RN17), Qihai (RN6), and Guanyuan (RN4). At 15 minutes into the first therapy, the patient felt nausea and vomiting, which recurred during the next day's moxibustion. A 51-year-old man presented similar symptoms. The third patient, a 68-year-old woman, was admitted to the hospital for her lung cancer complicated by pulmonary infection. She complained of the smell of moxa smoke and coughing when her roommates carried out moxibustion. Yun et al. reported a large superficial basal cell carcinoma (BCC) arising from a burn scar secondary to repeated moxibustion. A 58-year-old Korean man had applied moxa cautery to the same site repeatedly for relief of abdominal pain over ten years. He presented with a 3-year history of a dark reddish plaque on the lower part of the abdomen. Physical examination revealed a well-demarcated, round, 7.2 5.7 cm dark reddish plaque with some brown and black crusts and pigmentation on the lower part of the abdomen. Histopathological examination showed nests of basaloid cells arising from basal layers of the epidermis and extending into the dermis. There was peripheral palisading of the nuclei of the tumor cell nests and peritumoral lacunae between the tumor cells and stroma. Diagnosed as BCC, Evidence-Based Complementary and Alternative Medicine 7 the lesion responded well to radiation therapy and there was no evidence of recurrence 5 years later. Chen reported a case of a loose lower eyelid and ectropion after moxibustion on the craniofacial points. A 41-yearold Chinese woman suffered from the left facial paralysis. She was treated with direct moxibustion at Dicang (ST4), Jiache (ST6), Yangbai (GB14), and Sibai (ST2). After therapy lasting a few days, the patient was better but developed an eversion and sagging of the left lower eyelid. The author believed it to be a consequence of improper moxibustion at Sibai (ST2), where the infraorbital nerve, zygomatic branch of the facial nerve, and infraorbital artery are distributed. Ogata et al. reported a 29-year-old Japanese man with bronchial asthma who died while undergoing acupuncture and moxibustion treatment. The patient had suffered from periodic asthma attacks for nine years, and the asthmatic attacks became more frequent and persisted over longer periods during the last year before his death. After being treated with three rounds of moxa followed by two needles inserted for acupuncture, he suddenly collapsed and died. The autopsy findings of the lungs in this case were compatible with a diagnosis of severe asthma. The tissue injuries to the patient from the needles and the burns from the moxa treatment were found to be mild. The apparent cause of this death was respiratory dysfunction due to a severe asthmatic attack. It can be speculated that his death from asthma might have been associated with emotional stress and apprehension that he experienced while undergoing acupuncture and moxibustion for the first time. Traditional Understanding of Moxibustion Safety. Ancient literature on Chinese medicine rarely reported AEs of moxibustion, but they did indicate two issues regarding moxibustion safety. First, there are the contraindications of moxibustion, which are based on the TCM theory. For example, Treatise on Febrile Diseases advises the reader, "Be cautious and do not apply moxibustion when the patient's pulse is weak and fast. " It is also suggested that some points that are located close to important organs, nerves, and blood vessels or where local subcutaneous tissue is thin be avoided during moxibustion to prevent injuries. In the Zhen Jiu Jia Yi Jing, moxibustion is forbidden on 28 acupoints. The ancients believed that acupoints on the head, face, and the distal ends of the limbs should not be used or used sparingly to reduce the intensity of moxibustion. Experimental Studies on the Temperature and the Products of Moxibustion. Concerns about safety of moxibustion have only been raised in recent decades. There are two approaches to evaluate the safety of moxibustion: experimentation and observation in clinical settings. The therapeutic effects of moxibustion are generally believed to come mainly from thermal effects, radiation effects, and the pharmacological actions of the products of moxa combustion. Studies of the safety of the radiation used in moxibustion are rare, and the focus has been placed mostly on the other two factors, thermal effects and products of combustion. Burning moxa without flame can produce temperatures of about 548-890 ∘ C. Some people think that this treatment is essentially a physical thermal effect. Other experiments have confirmed that a single Zhuang (unit of dosage of moxibustion) of moxa cone (2 mg) moxibustion administered to the mouse abdomen can raise the temperature of the mouse's skin to 130 ∘ C and that of the area beneath the skin to 56 ∘ C. Some have observed the impact of moxibustion at different distances on local skin temperature. The safe distance for indirect moxibustion seems to be 3-4 cm. The temperature of burning moxa can play a therapeutic role, but it offers a risk of burns if administered improperly. Many of the components of the moxa and the products of their combustion have been identified. They include a variety of biological activities and play important roles in the comprehensive effects of moxibustion. Some products of moxa combustion are brown and tar-like. They take effect after entering the human body through burn-damaged skin. Another product of moxa combustion is smoke. Moxa smoke contains many complex components, and its volatile ingredients include ammonia, alcohols (ethylene glycol, pentyl-butanol), aliphatic hydrocarbons, aromatic hydrocarbons, terpene compounds, and their oxides. They may come from products of incomplete combustion, volatile oil, and the products of the oxidation of that oil. There is debate regarding the security of moxa smoke. The mugwort leaf contains terpenes. It may produce polycyclic aromatic carcinogens during combustion. During moxibustion, the concentration of air pollutants, such as nitrogen oxides, carbon monoxide, and particulates, is ten times higher than standard class II as issued by the State Environmental Protection Act. These substances can damage the health of patients and staff. Acute toxicological testing of moxa smoke on SPF degree SD rats showed the median lethal concentration (LC 50 ) to be 11,117 mg/m 3. It was therefore classified as minimally toxic according to WHO standards. An AMES test showed moxa smoke condensation (MSC) with metabolic activation using a liver fraction (S-9) to enhance the mutagenic activity of Salmonella strain TA98. This means that MSC may be mutagenic. However, one study gave consideration to short-term and long-term exposure. It showed that the volatile matter and carbon monoxide generated by moxa smoke under normal operating conditions did not exceed safety levels. Analysis of the AEs in Moxibustion Included in This Review. Many large-sample surveys of the safety of acupuncture have been carried out around the world. More than 762 cases (in 219 articles) of AEs related to acupuncture were reported before 2011. There are far fewer clinical safety survey data for moxibustion and far fewer case reports of AEs. Two previous reviews have been conducted on the safety of moxibustion treatment. Parka reviewed 13 case reports (7 clinical trials and 1 prospective survey) of AEs related to moxibustion. Xu et al. reviewed 4 (294 acupuncture and 10 cupping). The present review analyzed 64 cases in 24 articles, covering all cases cited in the two articles above. These cases were mainly found in China (51 cases/12 articles), the U.S. (5/6), and Korea (4/4). This is consistent with the fact that there is far more use of moxibustion in these areas than elsewhere in the world. Adverse reactions do not seem to be related to patient age (from newborn to 82 years old). The most common risk of moxibustion was found to be burns (43 cases/6 articles), which are caused by the high combustion temperature of moxa. Burns can be caused by direct contact with the products of combustion (direct moxibustion) or by radiant heat (indirect moxibustion). However, the issue of whether moxibustion-induced burns are really an adverse event must be addressed. In traditional moxibustion, also known as scarring moxibustion or suppurative moxibustion, local minor burns, purulence, and scarring during treatment were always considered normal. Most ancient Chinese doctors were in favor of using scarring moxibustion. They believed "where there is moxibustion scar, there is cure. " Scarring moxibustion is still used in modern clinical practice. Although accidental burns may happen during moxibustion, it was here noted that some patients in reports of burns accepted these skin lesions as the natural results of the therapy. For this reason, to determine whether a burn is a side effect of moxibustion or not, the doctors' expectations and patients' acceptances should be taken into account. The final therapeutic effects may have a nonignorable influence on this assessment. Allergies (7 cases/6 articles) and infections (6 cases/6 articles) were reported at frequencies similar to those of other adverse reactions to moxibustion. However, the causality between allergies and moxibustion was stronger (average likelihood score: 3.29) than that between the infections and the moxibustion (average likelihood score: 1.83). Most allergic reactions occurred at the local level and may have been caused by physical (e.g., heat) and chemical (e.g., tars, ammonia, and alcohols) stimulations associated with moxa combustion. Only one case of full-body allergy was reported. It was due to excessive inhalation of smoke in a closed room. A survey of moxibustion practitioners in five Chinese medicine hospitals in Guangdong province showed that moxibustion smoke raised the incidence of chronic laryngitis from 3.70% (nonacupuncturists) to 26.67% (acupuncturists) ( < 0.05). Local skin infections were usually secondary to burns. Deep organs infections (e.g., liver abscess, spinal epidural abscess) and viral infection (e.g., hepatitis C) could be secondary to local infections. Very weak causality was found between nonlocal infections and moxibustion. Moxibustion at Zhiyin (BL67) is often used to correct abnormal presentation in TCM. Recently, a multicenter randomized controlled trial showed moxibustion at acupoint BL67 to be an effective and safe means of correcting nonvertex presentation when used between 33 and 35 weeks of gestation. However, the two cases of fetal distress and premature delivery presented here indicate the potential risks of fetal harm related to moxibustion. Nausea and vomiting after moxibustion were observed solely in cancer patients who were undergoing chemotherapy and were sensitive to the smell, which can easily cause gastrointestinal reactions. The case of loose lower eyelids and ectropion after moxibustion indicated the potential risk of damage to superficial nerves and vessels. In the case of BCC secondary to long-term moxibustion, it is possible that the burn scar secondary to moxa can be repeatedly cauterized. This caused the development of BCC in an area protected from sun exposure. It is rare for reports of death after moxibustion. In the only death evaluated here, the causality between the consequence and moxibustion was assessed as unlikely, but the effects of stress and other consequences of moxibustion should not be ignored, especially considering that this patient was entirely new to moxibustion. Conclusion Moxibustion is considered a safe and effective traditional therapy, and large numbers of clinical reports have indicated that it is effective and associated with few adverse events. There is no absolutely safe treatment in the world, and moxibustion may be also related with some security risks in certain circumstances. Although the studies examined here included some mistakes, such as nonaccidental injuries as side effects, and some adverse events have little causal relationships with moxibustion, the evidence collected here was consistent with that of previous reports indicating the risks of moxibustion. The position, duration, distance between moxa and skin, proficiency of doctors, patient conditions, stimulations from smoke, and even the environment of treatment can affect the safety of moxibustion. The exact causes of most of these AEs cannot be determined. This issue should be addressed in further experimental studies, clinical trials, and case reports on the safety of moxibustion. Improving practitioner skills, regulating the operations, and controlling for time, distance, dose, and protection can reduce the incidence of adverse reactions and improve the safety of moxibustion. |
import { createGlobalStyle } from "styled-components"
import { token } from "../../utils/tokens"
const GlobalStyle = createGlobalStyle`
/**
* WHAT IS THIS?
*
* We inherit box-sizing: border-box; from our <html> selector
* Apparently this is a bit better than applying box-sizing: border-box; directly to the * selector
*/
*,
*::before,
*::after {
box-sizing: inherit;
}
html,
body {
cursor: none;
}
html *,
body * {
cursor: none;
}
html {
font-family: ${token.font.family.PRIMARY};
font-weight: 400;
font-size: 16px;
color: ${token.color.neutral.TINT_10};
box-sizing: border-box;
}
body {
padding: 0;
margin: 0;
}
`
export default GlobalStyle
|
Generalized State Estimation of Flexible AC Power Systems Considering Wind Generators and Primary Frequency Control Abstract This paper proposes a practical approach to incorporate the mathematical models of both fixed-speed and variable-speed wind turbine generators, automatic load frequency controls as well as voltage magnitude and frequency dependent loads into a weighted least squares-based state estimation algorithm suitable for the analysis of flexible alternating current (AC) transmission systems. As opposed to conventional static state estimators, where the inclusion of these electric components has been neglected so far, the proposed approach permits the determination of the steady state operation of a power system in the event of a supply-demand unbalance by estimating the magnitude of the frequency deviation from its nominal value. The state estimation is based on measurements related to those that should be obtained by a supervisory control and data acquisition (SCADA) system and phasor measurement units. For the purpose of this paper, the set of values associated with SCADA measurements (nodal power injections, power flows, and voltage magnitudes) and phasor measurement unit (PMU) measurements (voltage and current phasors) are generated from a power flow analysis of the network under study. Lastly, numerical simulations are reported to demonstrate the effectiveness of the proposed approach. |
Assimilation of active microwave measurements for soil moisture profile retrieval under laboratory conditions The authors discuss the potential of retrieving information on the soil moisture profile from measurements of the surface soil moisture content through active microwave observations. They use active microwave observations of the surface soil moisture content in a data assimilation framework to show that this allows the retrieval of the entire soil moisture profile. The data assimilation procedure demonstrated is based on the Kalman filter technique. Kalman filtering allows reconstruction of the state vector when at least part of the state variables are observed regularly. The dynamic model of the system used is based on the 1D Richards equation. The observation equation is based on the integral equation model of A. K. Fung et al. and is used to link the radar observations to surface soil moisture content. Recently, M. Mancini et al. reported about laboratory experiments investigating the use of active microwave observations to estimate surface soil moisture content. The present authors apply the data assimilation scheme to the radar measurements of these experiments to retrieve the entire soil moisture profile in the soil sample used, and compare these results with the soil moisture profile measurements (using TDR). It is shown that with a limited number of radar measurements accurate retrieval of the entire soil moisture profile is possible. |
EO Sensor Planning for UAV Engineering Reconnaissance Based on NIIRS and GIQE When unmanned aerial vehicles (UAVs) support the Corps of Engineers in reconnaissance operations, in order to gather visible image information that should meet the missions need, we grouped the engineering reconnaissance information interpretation tasks into 10 levels by using the National Imagery Interpretability Rating Scale (NIIRS). The quantitative relationship between the engineering targets, sensor performance, and flight altitude was established through the general image quality equation (GIQE) and the geometrical property of the ground sampled distance (GSD). Through some simulations, the influence of variable factors of the EO sensor imaging quality was analyzed, and the imaging height of the sensor for an engineering reconnaissance scenario was calculated. The results showed that this study could solve the problem of poor image quality caused by the flight altitude not meeting the mission requirements. |
AQUEOUS HUMOR DYNAMICS AND THE PATHOGENESIS OF GLAUCOMA IN ANIMALS 1. Very low protein concentration (0.5% of plasma). Proteins found in normal eyes include Albumin, IgG (but not IgA, IgM and IgD as these are larger molecules) and trace quantities of complement, and the fibrinolytic and coagulation system. Plasminogen and plasminogen proactivators are in more substantive concentrations. There is very low concentrations of inhibitors of plasminogen activators) to ensure that the trabecular meshwork remains free of fibrin. |
#include "ptz_client.h"
ptz_client::ptz_client(QWidget *parent)
: QWidget(parent)
{
ui.setupUi(this);
open_state = 0;
track_mode = 0;
mtrack = new ptz_track(track_ptz_pos_fresh, this);
mtrack->load_config("config.ini");
init_ui();
connect_signals();
}
ptz_client::~ptz_client()
{
mtrack->save_config("config.ini");
delete mtrack;
}
void ptz_client::init_ui()
{
on_comboBox_pid_id_currentIndexChanged(0);
ui.spinBox_pan_offset->setValue(mtrack->get_pos_offset(PTZ_PID_PAN));
ui.spinBox_tilt_offset->setValue(mtrack->get_pos_offset(PTZ_PID_TILT));
ui.spinBox_zoom_offset->setValue(mtrack->get_pos_offset(PTZ_PID_ZOOM));
ui.doubleSpinBox_pan_scale->setValue(mtrack->get_pos_scale(PTZ_PID_PAN));
ui.doubleSpinBox_tilt_scale->setValue(mtrack->get_pos_scale(PTZ_PID_TILT));
vector<pair<int, float> > zoom_map;
mtrack->get_zoom_map(zoom_map);
int zoom_map_num = zoom_map.size();
if (zoom_map_num > 1)
{
on_comboBox_zoom_map_num_currentIndexChanged(zoom_map_num - 2);
ui.spinBox_item0_zoom_pos->setValue(zoom_map[0].first);
ui.doubleSpinBox_item0_zoom_dist->setValue(zoom_map[0].second);
ui.spinBox_item1_zoom_pos->setValue(zoom_map[1].first);
ui.doubleSpinBox_item1_zoom_dist->setValue(zoom_map[1].second);
}
if (zoom_map_num > 2) {
ui.spinBox_item2_zoom_pos->setValue(zoom_map[2].first);
ui.doubleSpinBox_item2_zoom_dist->setValue(zoom_map[2].second);
}
if (zoom_map_num > 3)
{
ui.spinBox_item3_zoom_pos->setValue(zoom_map[3].first);
ui.doubleSpinBox_item3_zoom_dist->setValue(zoom_map[3].second);
}
if (zoom_map_num > 4)
{
ui.spinBox_item4_zoom_pos->setValue(zoom_map[4].first);
ui.doubleSpinBox_item4_zoom_dist->setValue(zoom_map[4].second);
}
if (zoom_map_num > 5)
{
ui.spinBox_item5_zoom_pos->setValue(zoom_map[5].first);
ui.doubleSpinBox_item5_zoom_dist->setValue(zoom_map[5].second);
}
if (zoom_map_num > 6)
{
ui.spinBox_item6_zoom_pos->setValue(zoom_map[6].first);
ui.doubleSpinBox_item6_zoom_dist->setValue(zoom_map[6].second);
}
if (zoom_map_num > 7)
{
ui.spinBox_item7_zoom_pos->setValue(zoom_map[7].first);
ui.doubleSpinBox_item7_zoom_dist->setValue(zoom_map[7].second);
}
}
void ptz_client::track_ptz_pos_fresh(void *arg, void *data)
{
ptz_client *client = (ptz_client *)arg;
struct ptz_positon *pos = (struct ptz_positon *)data;
emit client->fresh_ptz_pos(pos->pan, pos->tilt, pos->zoom);
}
void ptz_client::connect_signals()
{
connect(ui.toolButton_UL, SIGNAL(released()), this, SLOT(toolButton_pantilt_stop()));
connect(ui.toolButton_U, SIGNAL(released()), this, SLOT(toolButton_pantilt_stop()));
connect(ui.toolButton_UR, SIGNAL(released()), this, SLOT(toolButton_pantilt_stop()));
connect(ui.toolButton_L, SIGNAL(released()), this, SLOT(toolButton_pantilt_stop()));
connect(ui.toolButton_R, SIGNAL(released()), this, SLOT(toolButton_pantilt_stop()));
connect(ui.toolButton_DL, SIGNAL(released()), this, SLOT(toolButton_pantilt_stop()));
connect(ui.toolButton_D, SIGNAL(released()), this, SLOT(toolButton_pantilt_stop()));
connect(ui.toolButton_DR, SIGNAL(released()), this, SLOT(toolButton_pantilt_stop()));
connect(ui.toolButton_tele, SIGNAL(released()), this, SLOT(toolButton_zoom_stop()));
connect(ui.toolButton_wide, SIGNAL(released()), this, SLOT(toolButton_zoom_stop()));
connect(ui.toolButton_near, SIGNAL(released()), this, SLOT(toolButton_focus_stop()));
connect(ui.toolButton_far, SIGNAL(released()), this, SLOT(toolButton_focus_stop()));
connect(this, SIGNAL(fresh_ptz_pos(int, int, int)), this, SLOT(do_fresh_ptz_pos(int, int, int)));
}
void ptz_client::do_fresh_ptz_pos(int pan, int tilt, int zoom)
{
ui.horizontalSlider_pan_now_pos->setValue(pan);
ui.spinBox_pan_now_pos->setValue(pan);
ui.horizontalSlider_tilt_now_pos->setValue(tilt);
ui.spinBox_tilt_now_pos->setValue(tilt);
ui.horizontalSlider_zoom_now_pos->setValue(zoom);
ui.spinBox_zoom_now_pos->setValue(zoom);
}
void ptz_client::on_pushButton_open_clicked()
{
string dev_name = ui.comboBox_dev->currentText().toStdString();
if (!open_state)
{
int ret = mtrack->open_ptz(dev_name.c_str());
if (ret < 0)
return;
ui.pushButton_open->setText(QString::fromLocal8Bit("关闭"));
open_state = 1;
}
else
{
mtrack->close_ptz();
ui.pushButton_open->setText(QString::fromLocal8Bit("连接"));
open_state = 0;
}
}
void ptz_client::on_checkBox_datascreen_stateChanged(int arg1)
{
switch (arg1)
{
case Qt::Unchecked:
mtrack->set_datascreen_off();
break;
case Qt::Checked:
mtrack->set_datascreen_on();
break;
}
}
void ptz_client::on_toolButton_UL_pressed()
{
int pan_speed = ui.horizontalSlider_pan_speed->value();
int tilt_speed = ui.horizontalSlider_tilt_speed->value();
mtrack->set_pantilt_upleft(pan_speed, tilt_speed);
}
void ptz_client::on_toolButton_U_pressed()
{
int pan_speed = ui.horizontalSlider_pan_speed->value();
int tilt_speed = ui.horizontalSlider_tilt_speed->value();
mtrack->set_pantilt_up(pan_speed, tilt_speed);
}
void ptz_client::on_toolButton_UR_pressed()
{
int pan_speed = ui.horizontalSlider_pan_speed->value();
int tilt_speed = ui.horizontalSlider_tilt_speed->value();
mtrack->set_pantilt_upright(pan_speed, tilt_speed);
}
void ptz_client::on_toolButton_L_pressed()
{
int pan_speed = ui.horizontalSlider_pan_speed->value();
int tilt_speed = ui.horizontalSlider_tilt_speed->value();
mtrack->set_pantilt_left(pan_speed, tilt_speed);
}
void ptz_client::on_toolButton_R_pressed()
{
int pan_speed = ui.horizontalSlider_pan_speed->value();
int tilt_speed = ui.horizontalSlider_tilt_speed->value();
mtrack->set_pantilt_right(pan_speed, tilt_speed);
}
void ptz_client::on_toolButton_DL_pressed()
{
int pan_speed = ui.horizontalSlider_pan_speed->value();
int tilt_speed = ui.horizontalSlider_tilt_speed->value();
mtrack->set_pantilt_downleft(pan_speed, tilt_speed);
}
void ptz_client::on_toolButton_D_pressed()
{
int pan_speed = ui.horizontalSlider_pan_speed->value();
int tilt_speed = ui.horizontalSlider_tilt_speed->value();
mtrack->set_pantilt_down(pan_speed, tilt_speed);
}
void ptz_client::on_toolButton_DR_pressed()
{
int pan_speed = ui.horizontalSlider_pan_speed->value();
int tilt_speed = ui.horizontalSlider_tilt_speed->value();
mtrack->set_pantilt_downright(pan_speed, tilt_speed);
}
void ptz_client::toolButton_pantilt_stop()
{
int pan_speed = ui.horizontalSlider_pan_speed->value();
int tilt_speed = ui.horizontalSlider_tilt_speed->value();
mtrack->set_pantilt_stop(pan_speed, tilt_speed);
}
void ptz_client::on_toolButton_home_pressed()
{
mtrack->set_pantilt_home();
}
void ptz_client::on_horizontalSlider_pan_speed_valueChanged(int value)
{
ui.spinBox_pan_speed->setValue(value);
}
void ptz_client::on_horizontalSlider_tilt_speed_valueChanged(int value)
{
ui.spinBox_tilt_speed->setValue(value);
}
void ptz_client::on_horizontalSlider_pan_abs_valueChanged(int value)
{
int pan_speed = ui.horizontalSlider_pan_speed->value();
int tilt_speed = ui.horizontalSlider_tilt_speed->value();
int pan_abs = ui.horizontalSlider_pan_abs->value();
int tilt_abs = ui.horizontalSlider_tilt_abs->value();
mtrack->set_pantilt_absolute_position(pan_speed, tilt_speed, pan_abs, tilt_abs);
ui.spinBox_pan_abs->setValue(pan_abs);
}
void ptz_client::on_horizontalSlider_tilt_abs_valueChanged(int value)
{
int pan_speed = ui.horizontalSlider_pan_speed->value();
int tilt_speed = ui.horizontalSlider_tilt_speed->value();
int pan_abs = ui.horizontalSlider_pan_abs->value();
int tilt_abs = ui.horizontalSlider_tilt_abs->value();
mtrack->set_pantilt_absolute_position(pan_speed, tilt_speed, pan_abs, tilt_abs);
ui.spinBox_tilt_abs->setValue(tilt_abs);
}
void ptz_client::on_toolButton_tele_pressed()
{
int speed = ui.horizontalSlider_zoom_speed->value();
mtrack->set_zoom_tele_speed(speed);
}
void ptz_client::on_toolButton_wide_pressed()
{
int speed = ui.horizontalSlider_zoom_speed->value();
mtrack->set_zoom_wide_speed(speed);
}
void ptz_client::toolButton_zoom_stop()
{
mtrack->set_zoom_stop();
}
void ptz_client::on_horizontalSlider_zoom_speed_valueChanged(int value)
{
ui.spinBox_zoom_speed->setValue(value);
}
void ptz_client::on_horizontalSlider_zoom_abs_valueChanged(int value)
{
mtrack->set_zoom_value(value);
ui.spinBox_zoom_abs->setValue(value);
}
void ptz_client::on_toolButton_near_pressed()
{
int speed = ui.horizontalSlider_focus_speed->value();
mtrack->set_focus_near_speed(speed);
}
void ptz_client::on_toolButton_far_pressed()
{
int speed = ui.horizontalSlider_focus_speed->value();
mtrack->set_focus_far_speed(speed);
}
void ptz_client::toolButton_focus_stop()
{
mtrack->set_focus_stop();
}
void ptz_client::on_horizontalSlider_focus_speed_valueChanged(int value)
{
ui.spinBox_focus_speed->setValue(value);
}
void ptz_client::on_horizontalSlider_focus_abs_valueChanged(int value)
{
mtrack->set_focus_value(value);
ui.spinBox_focus_abs->setValue(value);
}
void ptz_client::on_pushButton_all_pos_clicked()
{
int ret = 0;
int pan_pos = 0, tilt_pos = 0, zoom_pos = 0, focus_pos = 0;
ret = mtrack->get_pantilt_position(&pan_pos, &tilt_pos);
if (ret < 0)
return;
ui.spinBox_pan_pos->setValue(pan_pos);
ui.spinBox_tilt_pos->setValue(tilt_pos);
ret = mtrack->get_zoom_value(&zoom_pos);
if (ret < 0)
return;
ui.spinBox_zoom_pos->setValue(zoom_pos);
ret = mtrack->get_focus_value(&focus_pos);
if (ret < 0)
return;
ui.spinBox_focus_pos->setValue(focus_pos);
// ostringstream all_pos;
// all_pos << "pan: " << pan_pos << ", ";
// all_pos << "tilt: " << tilt_pos << ", ";
// all_pos << "zoom: " << zoom_pos << ", ";
// all_pos << "focus: " << focus_pos << " ";
// ui.lineEdit_all_pos->setText(QString::fromStdString(all_pos.str()));
}
void ptz_client::on_comboBox_track_mode_currentIndexChanged(int index)
{
mtrack->set_track_mode(index);
}
void ptz_client::on_comboBox_pid_id_currentIndexChanged(int index)
{
double kp = mtrack->get_kp(index);
double ki = mtrack->get_ki(index);
double kd = mtrack->get_kd(index);
int dead_zone = mtrack->get_dead_zone(index);
int min_limit = mtrack->get_min_limit(index);
int max_limit = mtrack->get_max_limit(index);
ui.doubleSpinBox_pan_kp->setValue(kp);
ui.doubleSpinBox_pan_ki->setValue(ki);
ui.doubleSpinBox_pan_kd->setValue(kd);
ui.spinBox_pan_dead_zone->setValue(dead_zone);
ui.spinBox_pan_min_limit->setValue(min_limit);
ui.spinBox_pan_max_limit->setValue(max_limit);
}
void ptz_client::on_pushButton_set_pid_para_clicked()
{
int pid_id = ui.comboBox_pid_id->currentIndex();
double kp = ui.doubleSpinBox_pan_kp->value();
double ki = ui.doubleSpinBox_pan_ki->value();
double kd = ui.doubleSpinBox_pan_kd->value();
int dead_zone = ui.spinBox_pan_dead_zone->value();
int min_limit = ui.spinBox_pan_min_limit->value();
int max_limit = ui.spinBox_pan_max_limit->value();
mtrack->set_kp(pid_id, kp);
mtrack->set_ki(pid_id, ki);
mtrack->set_kd(pid_id, kd);
mtrack->set_dead_zone(pid_id, (float)dead_zone);
mtrack->set_min_limit(pid_id, (float)min_limit);
mtrack->set_max_limit(pid_id, (float)max_limit);
}
void ptz_client::on_horizontalSlider_pan_dst_valueChanged(int value)
{
mtrack->set_target(PTZ_PID_PAN, (float)value);
ui.spinBox_pan_dst->setValue(value);
}
void ptz_client::on_horizontalSlider_tilt_dst_valueChanged(int value)
{
mtrack->set_target(PTZ_PID_TILT, (float)value);
ui.spinBox_tilt_dst->setValue(value);
}
void ptz_client::on_horizontalSlider_zoom_dst_valueChanged(int value)
{
mtrack->set_target(PTZ_PID_ZOOM, (float)value);
ui.spinBox_zoom_dst->setValue(value);
}
void ptz_client::on_pushButton_get_ptz_offset_clicked()
{
int ret;
int pan_pos = 0, tilt_pos = 0, zoom_pos = 0, focus_pos = 0;
ret = mtrack->get_pantilt_position(&pan_pos, &tilt_pos);
if (ret < 0)
return;
ui.spinBox_pan_offset->setValue(pan_pos);
ui.spinBox_tilt_offset->setValue(tilt_pos);
ret = mtrack->get_zoom_value(&zoom_pos);
if (ret < 0)
return;
ui.spinBox_zoom_offset->setValue(zoom_pos);
}
void ptz_client::on_pushButton_set_ptz_offset_clicked()
{
int pan_pos = ui.spinBox_pan_offset->value();
int tilt_pos = ui.spinBox_tilt_offset->value();
int zoom_pos = ui.spinBox_zoom_offset->value();
mtrack->set_pos_offset(PTZ_PID_PAN, pan_pos);
mtrack->set_pos_offset(PTZ_PID_TILT, tilt_pos);
mtrack->set_pos_offset(PTZ_PID_ZOOM, zoom_pos);
}
void ptz_client::on_pushButton_do_ptz_offset_clicked()
{
mtrack->move_ptz_origin(20, 20);
}
void ptz_client::on_pushButton_set_ptz_scale_clicked()
{
float pan_scale = ui.doubleSpinBox_pan_scale->value();
float tilt_scale = ui.doubleSpinBox_tilt_scale->value();
mtrack->set_pos_scale(PTZ_PID_PAN, pan_scale);
mtrack->set_pos_scale(PTZ_PID_TILT, tilt_scale);
}
void ptz_client::on_comboBox_zoom_map_num_currentIndexChanged(int index)
{
int map_num = index + 2;//ui.comboBox_zoom_map_num->count();
if (map_num > 2) {
ui.spinBox_item2_zoom_pos->setEnabled(true);
ui.doubleSpinBox_item2_zoom_dist->setEnabled(true);
} else {
ui.spinBox_item2_zoom_pos->setEnabled(false);
ui.doubleSpinBox_item2_zoom_dist->setEnabled(false);
}
if (map_num > 3) {
ui.spinBox_item3_zoom_pos->setEnabled(true);
ui.doubleSpinBox_item3_zoom_dist->setEnabled(true);
} else {
ui.spinBox_item3_zoom_pos->setEnabled(false);
ui.doubleSpinBox_item3_zoom_dist->setEnabled(false);
}
if (map_num > 4) {
ui.spinBox_item4_zoom_pos->setEnabled(true);
ui.doubleSpinBox_item4_zoom_dist->setEnabled(true);
} else {
ui.spinBox_item4_zoom_pos->setEnabled(false);
ui.doubleSpinBox_item4_zoom_dist->setEnabled(false);
}
if (map_num > 5) {
ui.spinBox_item5_zoom_pos->setEnabled(true);
ui.doubleSpinBox_item5_zoom_dist->setEnabled(true);
} else {
ui.spinBox_item5_zoom_pos->setEnabled(false);
ui.doubleSpinBox_item5_zoom_dist->setEnabled(false);
}
if (map_num > 6) {
ui.spinBox_item6_zoom_pos->setEnabled(true);
ui.doubleSpinBox_item6_zoom_dist->setEnabled(true);
} else {
ui.spinBox_item6_zoom_pos->setEnabled(false);
ui.doubleSpinBox_item6_zoom_dist->setEnabled(false);
}
if (map_num > 7) {
ui.spinBox_item7_zoom_pos->setEnabled(true);
ui.doubleSpinBox_item7_zoom_dist->setEnabled(true);
} else {
ui.spinBox_item7_zoom_pos->setEnabled(false);
ui.doubleSpinBox_item7_zoom_dist->setEnabled(false);
}
}
void ptz_client::on_pushButton_set_zoom_map_clicked()
{
int map_num = ui.comboBox_zoom_map_num->currentIndex() + 2;
pair<int, float> item[8];
item[0].first = ui.spinBox_item0_zoom_pos->value();
item[0].second = ui.doubleSpinBox_item0_zoom_dist->value();
item[1].first = ui.spinBox_item1_zoom_pos->value();
item[1].second = ui.doubleSpinBox_item1_zoom_dist->value();
item[2].first = ui.spinBox_item2_zoom_pos->value();
item[2].second = ui.doubleSpinBox_item2_zoom_dist->value();
item[3].first = ui.spinBox_item3_zoom_pos->value();
item[3].second = ui.doubleSpinBox_item3_zoom_dist->value();
item[4].first = ui.spinBox_item4_zoom_pos->value();
item[4].second = ui.doubleSpinBox_item4_zoom_dist->value();
item[5].first = ui.spinBox_item5_zoom_pos->value();
item[5].second = ui.doubleSpinBox_item5_zoom_dist->value();
item[6].first = ui.spinBox_item6_zoom_pos->value();
item[6].second = ui.doubleSpinBox_item6_zoom_dist->value();
item[7].first = ui.spinBox_item7_zoom_pos->value();
item[7].second = ui.doubleSpinBox_item7_zoom_dist->value();
vector<pair<int, float> > zoom_map;
for (int i = 0; i < map_num; i++)
{
zoom_map.push_back(item[i]);
}
mtrack->set_zoom_map(zoom_map);
}
void ptz_client::on_pushButton_calc_ball_cord_clicked()
{
int pan_pos = 0, tilt_pos = 0, zoom_pos = 0;
mtrack->get_pantilt_position(&pan_pos, &tilt_pos);
mtrack->get_zoom_value(&zoom_pos);
float azimuth_angle = 0, zenith_angle = 0, radius = 0;
mtrack->pan_pos_to_azimuth_angle(pan_pos, azimuth_angle);
mtrack->tilt_pos_to_zenith_angle(tilt_pos, zenith_angle);
mtrack->zoom_pos_to_radius(zoom_pos, radius);
ui.doubleSpinBox_azimuth_angle->setValue(azimuth_angle);
ui.doubleSpinBo_zenith_angle->setValue(zenith_angle);
ui.doubleSpinBox_radius->setValue(radius);
}
|
package com.qcloud.chdfs.fs;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import org.apache.commons.codec.binary.Hex;
import org.apache.hadoop.io.IOUtils;
import org.apache.hadoop.io.MD5Hash;
import org.apache.hadoop.util.VersionInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.net.URLConnection;
import java.net.URLEncoder;
import java.nio.channels.FileLock;
import java.nio.channels.OverlappingFileLockException;
class CHDFSHadoopFileSystemJarLoader {
private static final Logger log = LoggerFactory.getLogger(CHDFSHadoopFileSystemJarLoader.class);
private static AlreadyLoadedFileSystemInfo alreadyLoadedFileSystemInfo;
private String versionId;
private String jarPath;
private String jarMd5;
private FileSystemWithLockCleaner actualFileSystem;
CHDFSHadoopFileSystemJarLoader() {
}
synchronized void init(String mountPointAddr, long appid, int jarPluginServerPort, String tmpDirPath,
boolean jarPluginServerHttps, String cosEndPointSuffix) throws IOException {
if (this.actualFileSystem == null) {
long queryStartMs = System.currentTimeMillis();
queryJarPluginInfo(mountPointAddr, appid, jarPluginServerPort, jarPluginServerHttps, cosEndPointSuffix);
log.debug("query jar plugin info usedMs: {}", System.currentTimeMillis() - queryStartMs);
this.actualFileSystem = getAlreadyLoadedClassInfo(this.getClass().getClassLoader(), this.jarPath,
this.versionId, this.jarMd5, tmpDirPath);
if (this.actualFileSystem == null) {
String errMsg = "CHDFSHadoopFileSystemJarLoader getAlreadyLoadedClassInfo return null";
throw new IOException(errMsg);
}
}
}
private void parseJarPluginInfoResp(String respStr, String cosEndPointSuffix) throws IOException {
JsonObject respJson = new JsonParser().parse(respStr).getAsJsonObject();
if (!respJson.has("Response")) {
String errMsg = String.format("resp json miss element Response, resp: %s", respStr);
log.error(errMsg);
throw new IOException(errMsg);
}
if (!respJson.get("Response").getAsJsonObject().has("HadoopPluginJar")) {
String errMsg = String.format("resp json miss element Response.HadoopPluginJar, resp: %s", respStr);
log.error(errMsg);
throw new IOException(errMsg);
}
JsonObject jarInfoJson = respJson.get("Response").getAsJsonObject().get("HadoopPluginJar").getAsJsonObject();
if (!jarInfoJson.has("VersionId")) {
String errMsg = String.format("resp miss config Response.HadoopPluginJar.VersionId, resp: %s", respStr);
log.error(errMsg);
throw new IOException(errMsg);
} else {
this.versionId = jarInfoJson.get("VersionId").getAsString();
}
if (!jarInfoJson.has("JarPath")) {
String errMsg = String.format("resp miss config Response.HadoopPluginJar.JarPath, resp: %s", respStr);
log.error(errMsg);
throw new IOException(errMsg);
} else {
if (cosEndPointSuffix != null) {
String jarPath = jarInfoJson.get("JarPath").getAsString();
int dotIndex = jarPath.indexOf('.');
if (dotIndex == -1) {
String errMsg = String.format("invalid jar path : %s", jarPath);
log.error(errMsg);
throw new IOException(errMsg);
}
int slashIndex = jarPath.indexOf('/', dotIndex);
if (slashIndex == -1) {
String errMsg = String.format("invalid jar path : %s", jarPath);
log.error(errMsg);
throw new IOException(errMsg);
}
this.jarPath = jarPath.substring(0, dotIndex+1) + cosEndPointSuffix + jarPath.substring(slashIndex);
} else {
this.jarPath = jarInfoJson.get("JarPath").getAsString();
}
}
if (!jarInfoJson.has("JarMd5")) {
String errMsg = String.format("resp miss config Response.HadoopPluginJar.JarMd5, resp: %s", respStr);
log.error(errMsg);
throw new IOException(errMsg);
} else {
this.jarMd5 = jarInfoJson.get("JarMd5").getAsString();
}
}
private void queryJarPluginInfo(String mountPointAddr, long appid, int jarPluginServerPort,
boolean jarPluginServerHttpsFlag, String cosEndPointSuffix) throws IOException {
String hadoopVersion = VersionInfo.getVersion();
if (hadoopVersion == null) {
hadoopVersion = "unknown";
}
URL queryJarUrl = null;
String queryJarUrlStr = "";
try {
queryJarUrlStr = String.format("%s://%s:%d/chdfs-hadoop-plugin?appid=%d&hadoop_version=%s",
jarPluginServerHttpsFlag ? "https" : "http", mountPointAddr, jarPluginServerPort, appid,
URLEncoder.encode(hadoopVersion.trim(), "UTF-8"));
queryJarUrl = new URL(queryJarUrlStr);
} catch (MalformedURLException | UnsupportedEncodingException e) {
String errMsg = String.format("invalid url %s", queryJarUrlStr);
log.error(errMsg, e);
throw new IOException(errMsg, e);
}
long startTimeNs = System.nanoTime();
HttpURLConnection conn = null;
BufferedInputStream bis = null;
ByteArrayOutputStream bos = null;
try {
conn = (HttpURLConnection) queryJarUrl.openConnection();
conn.setRequestProperty("Connection", "Keep-Alive");
conn.setReadTimeout(120000);
conn.connect();
bis = new BufferedInputStream(conn.getInputStream());
bos = new ByteArrayOutputStream();
byte[] buf = new byte[4096];
int readLen = 0;
while ((readLen = bis.read(buf)) != -1) {
bos.write(buf, 0, readLen);
}
String respStr = bos.toString();
parseJarPluginInfoResp(respStr, cosEndPointSuffix);
} catch (IOException e) {
String errMsg = "queryJarPluginInfo occur an io exception";
log.error(errMsg, e);
throw new IOException(errMsg, e);
} finally {
if (bis != null) {
IOUtils.closeStream(bis);
}
if (bos != null) {
IOUtils.closeStream(bos);
}
if (conn != null) {
conn.disconnect();
}
}
log.debug("query jarPluginInfo, usedTimeMs: {}", (System.nanoTime() - startTimeNs) * 1.0 / 1000000);
}
private static synchronized FileSystemWithLockCleaner getAlreadyLoadedClassInfo(ClassLoader currentClassLoader,
String jarPath, String versionId, String jarMd5, String tmpDirPath) throws IOException {
if (alreadyLoadedFileSystemInfo != null && alreadyLoadedFileSystemInfo.jarPath.equals(jarPath)
&& alreadyLoadedFileSystemInfo.versionId.equals(versionId) && alreadyLoadedFileSystemInfo.jarMd5.equals(
jarMd5)) {
try {
return (FileSystemWithLockCleaner) alreadyLoadedFileSystemInfo.chdfsFSClass.newInstance();
} catch (InstantiationException | IllegalAccessException e) {
String errMsg = String.format("load chdfs class failed, className: %s",
alreadyLoadedFileSystemInfo.chdfsFSClass.getName());
log.error(errMsg, e);
throw new IOException(errMsg, e);
}
}
File jarFile = downloadJarPath(jarPath, versionId, jarMd5, tmpDirPath);
URL jarUrl = null;
try {
jarUrl = jarFile.toURI().toURL();
} catch (MalformedURLException e) {
String errMsg = String.format("get jar file url failed, jarPath: %s", jarFile.getAbsolutePath());
log.error(errMsg, e);
throw new IOException(errMsg, e);
}
URLClassLoader chdfsJarClassLoader = new URLClassLoader(new URL[]{jarUrl}, currentClassLoader);
final String className = String.format("chdfs.%s.com.qcloud.chdfs.fs.CHDFSHadoopFileSystem", versionId);
try {
Class chdfsFSClass = chdfsJarClassLoader.loadClass(className);
FileSystemWithLockCleaner actualFileSystem = (FileSystemWithLockCleaner) chdfsFSClass.newInstance();
alreadyLoadedFileSystemInfo = new AlreadyLoadedFileSystemInfo(versionId, jarPath, jarMd5, chdfsFSClass);
return actualFileSystem;
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
String errMsg = String.format("load class failed, className: %s", className);
log.error(errMsg, e);
throw new IOException(errMsg, e);
}
}
private static File downloadJarPath(String jarPath, String versionId, String jarMd5, String tmpDirPath)
throws IOException {
File localCacheJarFile = new File(String.format("%s/chdfs_hadoop_plugin-%s-shaded.jar", tmpDirPath, versionId));
File localCacheJarLockFile = new File(
String.format("%s/chdfs_hadoop_plugin-%s-shaded.jar.LOCK", tmpDirPath, versionId));
if (localCacheJarFile.exists()) {
String md5Hex = getFileHexMd5(localCacheJarFile);
if (md5Hex.equalsIgnoreCase(jarMd5)) {
return localCacheJarFile;
}
}
FileOutputStream fileLockOutPut = null;
FileLock fileLock = null;
try {
fileLockOutPut = new FileOutputStream(localCacheJarLockFile);
} catch (IOException e) {
String errMsg = String.format("download jar failed, open lock file failed, lockPath: %s",
localCacheJarLockFile.getAbsolutePath());
log.error(errMsg, e);
throw new IOException(errMsg, e);
}
while (true) {
try {
fileLock = fileLockOutPut.getChannel().lock();
break;
} catch (OverlappingFileLockException ofle) {
try {
Thread.sleep(10L);
} catch (InterruptedException e) {
try {
fileLockOutPut.close();
} catch (IOException ignore) {
}
String errMsg = String.format("download jar failed, lock file failed, lockPath: %s",
localCacheJarLockFile.getAbsolutePath());
log.error(errMsg, e);
throw new IOException(errMsg, e);
}
} catch (IOException e) {
try {
fileLockOutPut.close();
} catch (IOException ignore) {
}
String errMsg = String.format("download jar failed, lock file failed, lockPath: %s",
localCacheJarLockFile.getAbsolutePath());
log.error(errMsg, e);
throw new IOException(errMsg, e);
}
}
BufferedInputStream bis = null;
BufferedOutputStream fos = null;
try {
// judge again may be other process has download the jar
if (localCacheJarFile.exists()) {
String md5Hex = getFileHexMd5(localCacheJarFile);
if (md5Hex.equalsIgnoreCase(jarMd5)) {
return localCacheJarFile;
}
}
URL downloadJarUrl = null;
try {
downloadJarUrl = new URL(jarPath);
} catch (MalformedURLException e) {
String errMsg = String.format("invalid download jar url %s", jarPath);
log.error(errMsg, e);
throw new IOException(errMsg, e);
}
try {
URLConnection conn = downloadJarUrl.openConnection();
conn.connect();
bis = new BufferedInputStream(conn.getInputStream());
fos = new BufferedOutputStream(new FileOutputStream(localCacheJarFile));
IOUtils.copyBytes(bis, fos, 4096, true);
// set jar and lock file permission 777
localCacheJarFile.setReadable(true, false);
localCacheJarFile.setWritable(true, false);
localCacheJarFile.setExecutable(true, false);
localCacheJarLockFile.setReadable(true, false);
localCacheJarLockFile.setWritable(true, false);
localCacheJarLockFile.setExecutable(true, false);
bis = null;
fos = null;
fileLock.release();
fileLock = null;
fileLockOutPut.close();
fileLockOutPut = null;
} catch (IOException e) {
String errMsg = String.format("download jar failed, localJarPath: %s",
localCacheJarFile.getAbsolutePath());
log.error(errMsg, e);
throw new IOException(errMsg);
}
String md5Hex = getFileHexMd5(localCacheJarFile);
if (!md5Hex.equalsIgnoreCase(jarMd5)) {
String errMsg = String.format("download jar md5 check failed, local jar md5: %s, query jar md5: %s",
md5Hex, jarMd5);
log.error(errMsg);
throw new IOException(errMsg);
}
return localCacheJarFile;
} finally {
if (fileLock != null) {
try {
fileLock.release();
} catch (IOException ignored) {
}
}
if (fileLockOutPut != null) {
try {
fileLockOutPut.close();
} catch (IOException ignored) {
}
}
if (bis != null) {
try {
bis.close();
} catch (IOException ignored) {
}
}
if (fos != null) {
try {
fos.close();
} catch (IOException ignored) {
}
}
}
}
private static String getFileHexMd5(File inFile) throws IOException {
FileInputStream in = null;
try {
in = new FileInputStream(inFile);
byte[] md5Byte = MD5Hash.digest(in).getDigest();
return Hex.encodeHexString(md5Byte);
} catch (IOException e) {
String errMsg = String.format("getFileHexMd5 failed, inFile path: %s", inFile.getAbsolutePath());
log.error(errMsg, e);
throw new IOException(errMsg, e);
} finally {
IOUtils.closeStream(in);
}
}
FileSystemWithLockCleaner getActualFileSystem() {
return actualFileSystem;
}
}
|
Synthesis and structure-activity relationships of truncated bisubstrate inhibitors of aminoglycoside 6'-N-acetyltransferases. Truncated aminoglycoside-coenzyme A bisubstrate analogues were efficiently prepared using a convergent approach where the amine and the thiol are coupled in one pot with the addition of a linker, without the need for protecting groups. These derivatives were tested for their effect on the activity of the resistance-causing enzyme aminoglycoside 6'-N-acetyltransferase Ii, and key structure-activity relationships are reported. Moreover, one of the inhibitors is able to block aminoglycoside resistance in cells expressing this enzyme. |
A distributed reconfiguration strategy for target enveloping with hexagonal metamorphic modules The paper studies the problem of a group of hexagonal-shaped metamorphic modules enveloping a static one-cell target. A distributed reconfiguration strategy is proposed for each module to achieve the objective. The strategy guarantees that the system successfully evolves without collisions despite of the absence of centralized planning and global information exchange. The correctness of the algorithm is verified theoretically. An upper-bound of converging time based on the proposed algorithm is provided as well. Simulations well validate the results we obtain. |
def update_coords(self, renderer):
dashx, dashy = self.get_position()
dashlength = self.get_dashlength()
if dashlength == 0.0:
self._x, self._y = dashx, dashy
return
dashrotation = self.get_dashrotation()
dashdirection = self.get_dashdirection()
dashpad = self.get_dashpad()
dashpush = self.get_dashpush()
angle = get_rotation(dashrotation)
theta = np.pi*(angle/180.0+dashdirection-1)
cos_theta, sin_theta = np.cos(theta), np.sin(theta)
transform = self.get_transform()
cxy = transform.transform_point((dashx, dashy))
cd = np.array([cos_theta, sin_theta])
c1 = cxy+dashpush*cd
c2 = cxy+(dashpush+dashlength)*cd
inverse = transform.inverted()
(x1, y1) = inverse.transform_point(tuple(c1))
(x2, y2) = inverse.transform_point(tuple(c2))
self.dashline.set_data((x1, x2), (y1, y2))
we = Text.get_window_extent(self, renderer=renderer)
w, h = we.width, we.height
if sin_theta == 0.0:
dx = w
dy = 0.0
elif cos_theta == 0.0:
dx = 0.0
dy = h
else:
tan_theta = sin_theta/cos_theta
dx = w
dy = w*tan_theta
if dy > h or dy < -h:
dy = h
dx = h/tan_theta
cwd = np.array([dx, dy])/2
cwd *= 1+dashpad/np.sqrt(np.dot(cwd,cwd))
cw = c2+(dashdirection*2-1)*cwd
newx, newy = inverse.transform_point(tuple(cw))
self._x, self._y = newx, newy
we = Text.get_window_extent(self, renderer=renderer)
self._twd_window_extent = we.frozen()
self._twd_window_extent.update_from_data_xy(np.array([c1]), False)
Text.set_horizontalalignment(self, 'center')
Text.set_verticalalignment(self, 'center') |
<filename>hw2/regularization-cross-validation/ridge.py
import numpy as np
def ridge(X, y, lmbda):
'''
RIDGE Ridge Regression.
INPUT: X: training sample features, P-by-N matrix.
y: training sample labels, 1-by-N row vector.
lmbda: regularization parameter.
OUTPUT: w: learned parameters, (P+1)-by-1 column vector.
NOTE: You can use pinv() if the matrix is singular.
'''
P, N = X.shape
w = np.zeros((P + 1, 1))
# YOUR CODE HERE
# begin answer
D = np.vstack((np.ones((1, N)), X))
in_matrix = np.zeros((P, N))
for i in range(N):
if y[0, i] > 0:
pos = 1
else:
pos = 0
in_matrix[pos, i] = 1
w = np.matmul(np.matmul(np.linalg.pinv(np.matmul(D, D.T) + lmbda * np.eye(P+1, P+1)), D), in_matrix.T)
w = w[:, 1] - w[:, 0]
# end answer
return w
|
Millions of people across Europe have joined a two-minute silence in memory of those killed in last week's serial bombings in London.
On Thursday, the British capital led the tributes for the 52 victims with workers leaving their offices to stand in the street.
Taxis and buses pulled over and financial markets paused to remember the dead.
Queen Elizabeth stood in silence at Buckingham Palace. In London's Trafalgar Square, a giant banner declared "one city, one world".
In Italy, government offices, railway stations and airports paused while television stations cut into normal broadcasting to honour the London dead.
Pope Benedict prayed for an end to terrorism during his holiday in the Italian Alps.
Berlin's transport authority ordered buses, trams and underground trains to halt for two minutes.
And in Paris, President Jacques Chirac's annual Bastille Day television address was delayed so the French could mark the moment. Chirac stood in silence on the steps of the Elysee Palace. |
<reponame>pimentelra/codewars
package katas.kyu8;
public class RegexpBasicsIsItADigit {
public static boolean isDigit(String s) {
return s.toCharArray().length == 1 && Character.isDigit(s.toCharArray()[0]);
}
}
|
Label-Free Photonic Crystal Biosensor Integrated Microfluidic Chip for Determination of Kinetic Reaction Rate Constants We demonstrate a photonic crystal integrated microfluidic chip that is compatible with a 384-well microplate format for measuring kinetic reaction rate constants in high-throughput biomolecular interaction screening applications. The device enables low volume kinetic analysis of protein-protein interactions with low flow latency, and control of five analyte flow channels with a single control point. The structure is fabricated with a replica molding process that produces the submicron photonic crystal structure simultaneously with the micrometer-scale fluid channel structure. The device significantly reduces the kinetic assay time required compared with a conventional biosensor microplate in which reagents reach the active detection surface by diffusion. Using the photonic crystal sensor fluid network system, we demonstrate determination of the kinetic association/dissociation rate constants between immobilized ligands and analytes in the flow stream, using the heparin/lactoferrin system as an example. |
// initialize the jpeg pointer struct with pointers to functions
static void jpeg_init_funcs(jpeg_source* src, Core::Stream* filehandle)
{
src->file_handle = filehandle;
src->init_source = init_source;
src->fill_input_buffer = fill_input_buffer;
src->skip_input_data = skip_input_data;
src->resync_to_restart = jpeg_resync_to_restart;
src->term_source = term_source;
src->bytes_in_buffer = 0;
src->next_input_byte = NULL;
} |
def on_call_begin(self, context: CallContext) -> Optional[CallBypass]:
assert not isinterposed(context.call)
name = getattr(context.call, "__qualname__", getattr(context.call, "__name__"))
self.calls.append(
{
"name": name,
"args": context.args,
"kwargs": context.kwargs,
"type": type(context.call),
}
)
self.ordinal += 1
assert len(self.calls) == self.ordinal + 1
return None |
David Cameron's new deal "goes to the heart" of the many frustrations the British people feel over the EU, his spokeswoman claimed today.
He has won key concessions to protect the pound, reduce red tape and ban "sham marriages".
But on welfare and immigration, the draft deal has some shortcomings.
He's failed to get a reform to stop EU migrants sending child benefit back home, although they might get it at a reduced rate.
His "emergency brake" on migrants claiming in-work benefits has been accepted - and can be triggered immediately.
But it'll be a graduated scheme rather than a blanket ban.
On the issue of the future direction of the EU, the prime minister has won the right for the UK to be excluded completely from any notion of ever-closer Union".
There is recognition for the first time that the EU has more than one currency, and protection for non-Euro countries in decision-making.
Crucially, free movement will also be restricted so that individuals deemed a threat to national security can be banned from coming to Britain.
Mr Cameron's so-called Red Card system strengthening the role of national parliaments in vetoing laws is also included, but it will require 55% of the potential votes to be considered, reducing its likely effectiveness.
The prime minister's spokeswoman said the draft deal represented "real progress" but added there was "work to be done to nail down the details".
David Cameron is expected to warn that voting for a "Brexit" would result in refugee camps springing up across the south-east of England.
If voters chose to stay - whenever the referendum comes - the deal upon which that decision was reached may not be the final word. |
<filename>vendor/github.com/QuentinPerez/go-encodeUrl/examples/main.go
package main
import (
"fmt"
"reflect"
"github.com/QuentinPerez/go-encodeUrl"
"github.com/Sirupsen/logrus"
)
type ID struct {
Name string `url:"name,ifStringIsNotEmpty"`
DisplayName string `url:"display-name,ifStringIsNotEmpty"`
}
func nameEqualBadCode(interface{}) (string, bool, error) {
return "0xBadC0de", true, nil
}
func overloadFieldNameAndTag(fieldName string, fieldTag reflect.StructTag) (fieldTagOverloaded reflect.StructTag) {
fieldTagOverloaded = fieldTag
if fieldName == "Name" {
fieldTagOverloaded = `url:"overloaded,nameEqualBadCode"`
}
return
}
// changTag overloads the tag field
func changeNameAndTag() {
encurl.AddEncodeFunc(nameEqualBadCode)
values, errs := encurl.Translate(&ID{"qperez", "<NAME>"}, overloadFieldNameAndTag)
if errs != nil {
logrus.Fatal(errs)
}
fmt.Printf("https://example.com/?%v\n", values.Encode())
}
func main() {
values, errs := encurl.Translate(&ID{"qperez", "<NAME>"})
if errs != nil {
logrus.Fatal(errs)
}
fmt.Printf("https://example.com/?%v\n", values.Encode())
changeNameAndTag()
}
|
<reponame>zshnb/qiangdongserver
package com.qiangdong.reader.request.withdraw_record;
import com.qiangdong.reader.request.BaseRequest;
public class ListWithdrawRecordRequest extends BaseRequest {
private Long targetUserId = 0L;
public Long getTargetUserId() {
return targetUserId;
}
public void setTargetUserId(Long targetUserId) {
this.targetUserId = targetUserId;
}
}
|
Archives from July 02, 2014 - HELLO!
Robin Williams has been admitted into a rehab centre to help him maintain his sobriety, his spokesperson has said. The comedian, who has been candid about his battle with alcohol and substance abuse in the past, has checked into a treatment facility to "focus on his commitment" to overcome his addictions. CLICK ON PHOTOS TO ENLARGE Robin Williams has checked into rehab to 'focus on his continued commitment' to sobriety "After working back-to-back projects, Robin is simply taking the opportunity to fine-tune and focus on his continued commitment, of which he remains extremely proud," his rep said. "This was totally planned and scheduled,"
Robin Thicke has revealed that he has not seen his wife Paula Patton in four months, despite naming his new album after her. Since the couple split in February, Robin has made numerous public his pleas for his actress wife to take him back. Speaking on live radio in New York City on Thursday, he told Hot 97 Radio Station: "I try to keep most of that private, but, I haven't seen her for four months." Robin Thicke is spotted in NYC He added: "If you’ve been together that long, you kinda became adults together instead of being adults and then meeting. |
>>> 13 years ago the nation was shocked and saddened by the beating death of matthew shepherd . it was husband murder that spurred the passage of hate crime lawses. sadly for many in this country, that hate has not died off as evidenced by the pictures you're about to see. we want to warn you, they are disturbing. these are pictures of burke burnett . burnett is from reno, texas , savage li burned, beaten nearly to death by three men over halloween weekend. he says they did it because he's gay. but despite the attack he is now speaking out about it. burke burnett joins me now to talk about this. appreciate you talking time to join us today. i want to start off though with -- you were at this halloween party. it's in reno, texas . you're there with friends. three men at this party find out that you're gay. explain how they found out and what hey did with that information.
>> well, i'm openly gay . so i'm assuming -- i'm assume that they just knew i was gay from having lived in that small town themselves. their reaction to that was that that you just described. violent and hateful and horrible.
>> what happened when this attack began? what happened with the other people at the party? how were you saved, as we say you were stabbed, as i understand it, with a broken beer bottle . obviously the men were beating and kicking you. they then threw you into a fire. explain how you were saved and also explain the attack itself, the violence and what they were yelling at you.
>> yes, sir. they were yelling stuff that i wouldn't repeat on camera. the only reason that i did get saved is because there was a small group of females that actually jumped in and helped me out, helped save my life. they had the attackers stop and i was able to get away.
>> burke , explain the injuries that you suffered.
>> burns, two stab wounds. as you can see over my eye, sow sewed up. just really pretty bad stuff.
>> as i understand it, you received over 30 stitches from the attack with the broken beer bottle .
>> the burns to your body, where are they?
>> on my arms, on both arms. i'm kind of wrapped up so you can't see them. but on both my arms. on my rib cage right here, and then a few on my head, on my forehead.
>> burke , beyond the fact that the three men are now charge with aggravated assault, arrested in this case. the police, the da haven't said too much about this. they're saying that it's going to be up to a grand jury to decide whether they prosecute this as hate crime . as i understand it, under texas law, hate crime enhancement could result in the charges being bumped up from the second degree felonies to first degree felonies, punishable by 5 to 99 years in prison. do you personally want to see them push for this to be considered a hate crime ?
>> it's -- it's not my job to decide whether or not what justice is exactly for these guys. i want to see justice served. i have every faith in the county district attorney's office that they will handle it properly.
>> burke , how has suffering this attack, what you've gone through and the recovery, how do you think it's changed you?
>> it's made me more aware that this kind of -- this kind of stuff still goes on. i guess i sort of forgot that there was still that much hatred, that much animosity towards the gay and lesbian population. i didn't -- i didn't realize that. so it's certainly heightened my awareness that this type of stuff still goes on.
>> burke burnett , we wish you the very best and a speedy recovery. and we appreciate you taking the time and the courage that you have to speak out about this and hopefully it's going to raise the dialogue and maybe shed some light on intolerance around this country. burke , thanks so much. appreciate it. |
def vacancies_and_studentships(context, heading=3, format=0, max_items=20, entity=None):
instance = VacanciesPlugin()
if not entity:
entity = work_out_entity(context, entity)
instance.entity = entity
instance.heading_level = heading
instance.display = 0
instance.limit_to = max_items
instance.format = format
nep = CMSVacanciesPlugin()
nep.render(context, instance, None)
return context |
Modeling positive and negative selection and differentiation processes in the thymus. T cells begin their development as precursor cells in the bone marrow. These cells migrate to the thymus, where they further divide, differentiate, and mature into functional T cells. Most thymocytes (95-99%) die in the course of this process, and only relatively few exit the thymus as mature cells. Here we develop a differential equation model of cell proliferation, differentiation and death in the thymus that can account for both the total number of thymus cells and the fractions of various types of immature and mature thymocytes. Our model suggests that positive and negative selection may have more complex effects than simply deleting some cells and allowing others to survive. |
<gh_stars>1-10
package Model.Interactors;
import Model.Database.Entity.UserImage;
import Presenters.Callbacks.MainCallback;
import Utils.annotations.Getter;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.Date;
public interface MainInteractor {
@Getter
String getCurrentUserName();
void changeUserPassword(CharSequence oldPassword, CharSequence newPassword);
void logout(boolean local);
@Getter
ArrayList<UserImage> getCurrentUserImagesList();
void initMainCallback(MainCallback callback);
UserImage insertUserImage(int imageID, String name, Date date, boolean isWaiting);
void saveUserImage(int imageID, int userID,BufferedImage image);
void deleteUserImage(int imageID);
void deleteLocalImage(int imageID);
@Getter
void getImageFromServer(int imageID);
void cleanCache();
}
|
Burkina Faso police seek arrest of former leader Compaore over infamous murder of Africa's 'Che Guevara' in 1987.
Burkina Faso has issued an international arrest warrant for ousted leader Blaise Compaore in connection with the murder of former President Thomas Sankara, news reports said on Monday.
Sankara, a revolutionary figure who is still a hero to many in West Africa, was killed on October 15, 1987, during the coup that brought his friend and former comrade-in-arms Compaore to power.
"I confirm that an international arrest warrant was issued against [ex-]President Blaise Compaore by the investigating judge," Prosper Farama, a lawyer for Sankara's family, told Reuters news agency.
Compaore himself was driven from power last October by crowds opposing his bid to change the West African country's constitution and extend his 27-year rule. He fled to neighbouring Ivory Coast, where he is now thought to be based.
At least five other people, mostly former soldiers, have been charged in connection with Sankara's killing - including General Gilbert Diendere, Compaore's former chief-of-staff, who led a failed coup in September.
Sankara took power in a coup in 1983 and pursued a philosophy of Marxism and pan-Africanism that led him to be called "Africa's Che Guevara".
Sankara's murder is one of the most high-profile killings in Africa's post-independence history and criminal charges could represent a breakthrough in a case that has haunted the West African country for decades.
Meanwhile on Monday, a police lab helping to investigate Sankara's killing said it could not find any "detectable DNA" in remains presumed to be his, another family lawyer said.
Nearly three decades after his death, remains believed to be those of Sankara and 12 former aides were exhumed from a cemetery in the capital, Ouagadougou, in May.
"There is no detectable DNA in accordance with the current state of science," said Benewende Stanislas Sankara, one of the lawyers representing Sankara's family and who is no relation.
"We can simply say that in view of these results, the state of the remains did not permit the laboratory to certify the existence of DNA," the lawyer said.
A police lab in the southern French city of Marseilles performed the testing.
Sankara's death certificate stated that the 37-year-old former army captain died of "natural causes".
According to autopsy results released in October, the leader's supposed remains were "riddled with bullets".
Several reports have since suggested that he was executed by a hit squad at government headquarters. |
Knightsbridge Shipping (NASDAQ: VLCCF) shares currently have a dividend yield of 11.80%.
Knightsbridge Shipping Limited, a shipping company, engages in the seaborne transportation of dry bulk cargoes worldwide. As of October 7, 2014, it owned and operated a fleet of 27 Capesize dry bulk carriers. The company has a P/E ratio of 48.43.
The average volume for Knightsbridge Shipping has been 877,100 shares per day over the past 30 days. Knightsbridge Shipping has a market cap of $543.2 million and is part of the transportation industry. Shares are down 20% year-to-date as of the close of trading on Friday.
TheStreet Ratings rates Knightsbridge Shipping as a hold. The company's strengths can be seen in multiple areas, such as its robust revenue growth, largely solid financial position with reasonable debt levels by most measures and expanding profit margins. However, as a counter to these strengths, we also find weaknesses including a generally disappointing performance in the stock itself and feeble growth in the company's earnings per share.
VLCCF's very impressive revenue growth greatly exceeded the industry average of 23.6%. Since the same quarter one year prior, revenues leaped by 168.8%. Growth in the company's revenue appears to have helped boost the earnings per share.
KNIGHTSBRIDGE SHIPPING LTD reported significant earnings per share improvement in the most recent quarter compared to the same quarter a year ago. This company has reported somewhat volatile earnings recently. We feel it is likely to report a decline in earnings in the coming year. During the past fiscal year, KNIGHTSBRIDGE SHIPPING LTD reported lower earnings of $0.11 versus $0.25 in the prior year. For the next year, the market is expecting a contraction of 109.1% in earnings (-$0.01 versus $0.11).
VLCCF has underperformed the S&P 500 Index, declining 19.10% from its price level of one year ago. Turning toward the future, the fact that the stock has come down in price over the past year should not necessarily be interpreted as a negative; it could be one of the factors that may help make the stock attractive down the road. Right now, however, we believe that it is too soon to buy.
Select Income REIT (NYSE: SIR) shares currently have a dividend yield of 7.90%.
Select Income REIT is a real estate investment trust managed by Reit Management & Research LLC. The firm invests in the real estate markets of United States with a focus on Hawaii. The fund seeks to invest in office and industrial properties. Select Income REIT is domiciled in United States. The company has a P/E ratio of 12.61.
The average volume for Select Income REIT has been 326,200 shares per day over the past 30 days. Select Income REIT has a market cap of $1.5 billion and is part of the real estate industry. Shares are down 9.5% year-to-date as of the close of trading on Friday.
TheStreet Ratings rates Select Income REIT as a hold. The company's strengths can be seen in multiple areas, such as its robust revenue growth, attractive valuation levels and good cash flow from operations. However, as a counter to these strengths, we also find weaknesses including disappointing return on equity, a generally disappointing performance in the stock itself and feeble growth in the company's earnings per share.
SIR's revenue growth has slightly outpaced the industry average of 13.8%. Since the same quarter one year prior, revenues rose by 16.6%. This growth in revenue does not appear to have trickled down to the company's bottom line, displayed by a decline in earnings per share.
The gross profit margin for SELECT INCOME REIT is rather high; currently it is at 52.85%. Regardless of SIR's high profit margin, it has managed to decrease from the same period last year. Despite the mixed results of the gross profit margin, SIR's net profit margin of 41.84% significantly outperformed against the industry.
SELECT INCOME REIT's earnings per share declined by 14.9% in the most recent quarter compared to the same quarter a year ago. Stable earnings per share over the past year indicate the company has managed its earnings and share float. We anticipate this stability to falter in the coming year and, in turn, the company to deliver lower earnings per share than prior full year. During the past fiscal year, SELECT INCOME REIT increased its bottom line by earning $2.11 versus $2.10 in the prior year. For the next year, the market is expecting a contraction of 3.8% in earnings ($2.03 versus $2.11).
The company's current return on equity has slightly decreased from the same quarter one year prior. This implies a minor weakness in the organization. When compared to other companies in the Real Estate Investment Trusts (REITs) industry and the overall market, SELECT INCOME REIT's return on equity is below that of both the industry average and the S&P 500.
TICC Capital (NASDAQ: TICC) shares currently have a dividend yield of 13.30%.
TICC Capital Corp., a business development company, operates as a closed-end, non-diversified management investment company. The firm invests in both public and private companies. The company has a P/E ratio of 13.00.
The average volume for TICC Capital has been 433,300 shares per day over the past 30 days. TICC Capital has a market cap of $525.7 million and is part of the financial services industry. Shares are down 16.5% year-to-date as of the close of trading on Friday.
TheStreet Ratings rates TICC Capital as a hold. The company's strengths can be seen in multiple areas, such as its revenue growth and expanding profit margins. However, as a counter to these strengths, we also find weaknesses including deteriorating net income, disappointing return on equity and a generally disappointing performance in the stock itself.
TICC's revenue growth has slightly outpaced the industry average of 1.2%. Since the same quarter one year prior, revenues slightly increased by 9.9%. This growth in revenue does not appear to have trickled down to the company's bottom line, displayed by a decline in earnings per share.
The gross profit margin for TICC CAPITAL CORP is currently very high, coming in at 74.51%. It has increased significantly from the same period last year. Regardless of the strong results of the gross profit margin, the net profit margin of -4.18% is in-line with the industry average.
TICC CAPITAL CORP has experienced a steep decline in earnings per share in the most recent quarter in comparison to its performance from the same quarter a year ago. The company has reported a trend of declining earnings per share over the past year. However, the consensus estimate suggests that this trend should reverse in the coming year. During the past fiscal year, TICC CAPITAL CORP reported lower earnings of $1.11 versus $1.77 in the prior year. This year, the market expects an improvement in earnings ($1.12 versus $1.11).
The company, on the basis of change in net income from the same quarter one year ago, has significantly underperformed when compared to that of the S&P 500 and the Capital Markets industry. The net income has significantly decreased by 105.3% when compared to the same quarter one year ago, falling from $23.59 million to -$1.26 million.
The company's current return on equity has slightly decreased from the same quarter one year prior. This implies a minor weakness in the organization. When compared to other companies in the Capital Markets industry and the overall market, TICC CAPITAL CORP's return on equity is below that of both the industry average and the S&P 500.
You can view the full TICC Capital Ratings Report. |
Do Anastomotic Leaks Impair Postoperative Health-related Quality of Life After Rectal Cancer Surgery? A Case-matched Study BACKGROUND: Anastomotic leaks after colorectal resections for cancer are a leading cause of postoperative morbidity, mortality, and long hospital stay. Few data exist on the potentially deleterious effect of the anastomotic leaks after proctectomy for cancer on patient health-related quality of life. OBJECTIVE: The aim of this study was to explore the effect of clinically evident anastomotic leaks on health-related quality of life after rectal cancer excision. DESIGN: This is a case-matched study. SETTINGS: This study was conducted in a Greek academic surgical department. PATIENTS: Included were 25 patients undergoing low anterior resection complicated by an anastomotic leak (Clavien classification II, n = 14, and III, n = 11) and 50 patients undergoing low anterior resection with an uncomplicated course. MAIN OUTCOME MEASURES: Health-related quality-of-life data were prospectively collected at fixed assessment time points (baseline, 3, 6, and 12 months postoperatively) by the use of validated questionnaires (Medical Outcomes Study Short Form 36, Gastrointestinal Quality of Life Index, European Organization of Research and Treatment of Cancer Quality of Life Questionnaire-C30, and European Organization of Research and Treatment of Cancer Quality of Life Questionnaire-CR29). RESULTS: Leak patients required a longer hospitalization. Although the numbers of initially constructed defunctioning loop ileostomies were not significantly different between cases and controls, leak patients were required to remain with a stoma significantly more often at all postoperative assessment time points. No differences were observed in the baseline scores between the 2 groups. Physical function of leak patients was significantly worse at all postoperative assessment time points. At 6 and 12 months, their emotional and social function and overall quality-of-life scores were significantly decreased in comparison with the patients with an uncomplicated course. Leak patients experienced significantly more stoma-related problems and sore skin around the stoma site. LIMITATIONS: Limited number of patients, restriction of follow-up to the end of the first year, and heterogeneity in terms of the presentation, severity, and management of anastomotic leaks were the limitations of this study. CONCLUSIONS: Anastomotic leaks have an adverse effect on postoperative health-related quality of life. |
/**
* Gateway option
* <p>
* Created by shniu on 2019/1/18 0018.
*/
public class GatewayOptions {
private DiscoveryOptions discovery;
private Wallet wallet;
private String identity;
private EventHandlerOptions eventHandlerOptions;
public DiscoveryOptions getDiscovery() {
return discovery;
}
public void setDiscovery(DiscoveryOptions discovery) {
this.discovery = discovery;
}
public Wallet getWallet() {
return wallet;
}
public void setWallet(Wallet wallet) {
this.wallet = wallet;
}
public String getIdentity() {
return identity;
}
public void setIdentity(String identity) {
this.identity = identity;
}
public EventHandlerOptions getEventHandlerOptions() {
return eventHandlerOptions;
}
public void setEventHandlerOptions(EventHandlerOptions eventHandlerOptions) {
this.eventHandlerOptions = eventHandlerOptions;
}
public static class DiscoveryOptions {
private boolean enabled;
private boolean asLocalhost;
}
public static class EventHandlerOptions {
private int commitTimeout;
private String strategy; // Todo
}
} |
Q:
What would happen in a world without hypothetical situations?
I've got to admit: I'm asking this mostly because the question amuses me.
Imagine a world (herein known as Whatworld) which is identical to Earth before the rise of humanity. It is populated by the same spread of creatures, with one important difference: The 'homo-sapiens' analogue (homo-whatvia) has no cognitive ability to think in hypotheticals. Questions like 'what if' and 'could we' don't occur to them. They're still very logical, and can infer, extrapolate and learn from example, but they can't answer or ask questions that require a hypothetical component/assumption..
For example: When a lightning strike lit a nearby tree on fire a nearby tribe of Homo-Whatvia learnt that making things hot could set them on fire, and fire was hot, so fire could make fire, which was useful in some ways and not in others. What they didn't do was engage in speculation about whether they could make things hot any other way, and the only answer they could give when one of them asked 'Does anyone know what caused the lightning?' was 'Nope'.
Can Homo-Whatvia progress along a similar track to homo-sapiens, or is the lack of hypothetical situations going to prevent them from progressing at all?
A:
It really depends on where the line is drawn exactly. If I work with what I consider to be hypothetical thought-processes, humans never survive.
Anytime you think about doing something before doing it, you could be engaging in a hypothetical. Your mind considers, "How does the situation change if I take this action." This could be rephrased as, "What if I [took this action]", and your mind responds, "[something like this] should happen", which is either better or worse than your current situation. If it's better, you'd likely take the action.
Seeing the bolt of lightning start a fire, and the fire spreading, we might learn, "Fire spreads." At that first moment we will continue doing what we were doing before, (presumably, just sitting there.) The fire starts burning Kevin as he sits there. Kevin cannot think, "What if I move away from the fire". He can't even comprehend what would happen if he were to move at all. All he has learned is, "Fire causes heat, then pain". Kevin dies as everyone sits there watching.
Everyone now learns that fire kills. But nobody can tie "running" to "not dying", because nobody can ever tie how any potential action affects their real-life situation.
Humans then die out almost immediately. Unlike single-celled organisms, we do not have enough hard-wired action/reaction responses to actually sustain ourselves. If we did, babies would not need us to care for them while they learn the skills they need to survive. (Skills they would not learn, in this case)
A:
I think the final result is that they must live in harmony with nature.
Defining this world is going to take a tremendous leap of faith to define what "no ability to think hypothetically" means at a biological level. Once we have that, we can extrapolate out to what that would mean for the species as a whole.
Of course, the real challenge is that basic thought requires some level of thinking which might be seen as hypothetical. If you eat food, your body observes inputs though taste and smell and does its best to predict what sorts of work the digestive tract needs to do. This system is so advanced that you can even get "more energy" through a placebo effect. If you think you just got more glucose, the body/mind will often permit more action on the presumption that more glucose will hit the small intestine shortly. Its really hard to live without this (in fact, by some definitions of "life," the inability to do this would prevent single celled organisms from forming). Accordingly, we're going to have to carefully sidestep this definition and find another definition of "hypothetical thinking."
The definition I find most promising is one which breaks hypothetical thinking into two parts. The first part is where we think of the hypothetical situation, such as "I wonder what it would be like to have soup for lunch today." However, at a biological level, its really hard to separate that phrase from "Soup is happening, the digestive tract moves." Instead, we're going to draw the line differently. The second part of this hypothetical thinking is the ability to discard the thoughts. If you finish thinking through what it would be like to have soup, decide "Nah, I'm having salad instead," you discard the entire mental universe you constructed to explore having soup. But what if you couldn't discard it? What if those thoughts had to continue existing as long as they "wanted" to? Anyone who has unbridled hypothetical thoughts would quickly go insane with the myriad of worlds in their head.
I don't define this line by sheer happenstance. This is also one of the accepted lines of reasoning for exploring reversible computing. In the theory of reversible computing, it's not the computation that has entropic costs, but rather the act of erasing those computations. Thus, I can argue that Homo-whavia can indeed think, as well as any reversible computer can think.
The biggest challenge with this is that reversible computing is very bad at handling irreversible changes (no surprise there). Accordingly they would develop a culture which avoids considering irreversable changes. Everything would have to flow smoothly from one state to another, permitting them to stop thinking about a "hypothetical" simply by letting it flow outside of them (to be forgotten elsewhere, most likely).
This is I think the defining characteristic of such a species. We often say "every action has its consequences." Their version would be much more extreme, for even their most secretive thought must eventually have a consequence as it is permitted to flow out of their minds into the world. This concept of everything having consequences may be so prevalent that the only phrase they can construct regarding the topic is "Consequences are." (manipulating a phrase from Stranger in a Strange Land to suit my fancy)
Such a species may survive. In fact, I'd be tempted to argue that there exist religions which actually describe such a world. Daoism believes "everything is of the Dao." The Dao flows through us, and while we perceive a separation between us and the Dao, it is believed to be just an illusion. The Daoist cultures sought long term stability. If a ruler was poor, they would not attack him head on, but allow the flow of time to erode his support until it brought him down to his proper place.
The wisest of homo-whatvia would be those which were most aware of their balance within their "Dao." That individual would be so in tune with the consequences of those balances that they might not even more perceptibly. The tiniest flickers of their hands may be enough to keep their world in tune. Any homo-whatvia would recognize that they are doing this, and accept it. However, another species, such as the impetuous H. sapiens might not. They may see the leaders of homo-whatvia as not acting at all. Homo-whatvia would do its best to communicate with us, but that language gap would be significant. They might even have to resort to strange aphorms in their language, which even then might not translate. Perhaps the best communication they could achieve would be...
"Waiting is."
A:
Well, I will take my hypothetical guess. Luckily, in this universe I am able to do it, so lets do it:
You end up on hunters and gatherers level
I think it can be expected, that these hoomans (alternate humans) will figure out by trial and error how to hunt and how to gather stuff to survive.
edit: I think that it is plausible to build on scenarios like: "Animal hunts me, I stumble on rock, rock hits animal, animal is dead." Someone else from the tribe can see it and learns that from example (as I understood the question)
They might grasp on primitive knives and spears. Also, they might conquer a fire. Maybe they will be able to start a fire by trial and error.
I think that you will end before "agricultural revolution" because I think that domesticating of cattle needs some of the "what if" or "what would" in order to even try it |
Science Literacy Needs of Public Involvement Programs A rapidly growing number of federal and state agencies that deal with &dquo;science, technology, and society&dquo; (STS) problems maintain or are developing far-reaching public involvement programs (PIPs).2 At many stages of the relevant regulatory or decision process, these programs place citizens on advisory panels or in continuing workshops and seek to encourage public participation in hearings, community issues forums, and other &dquo;outreach&dquo; or &dquo;consultation and cooperation&dquo; activities. The idea is to provide &dquo;meaningful input&dquo; (a phrase that, in practice, can mean almost anything) to the major policy decisions of the agencies. Motives for establishing PIPs vary: a need to comply with laws requiring PIPs; a recognition that the public is more likely to endorse, or at least accept, controversial policies if they are arrived at fairly and openly; a desire to prevent lawsuits and regulatory deadlock by addressing the concerns of interest groups sooner rather than later; and a genuine conviction that valuable scientific and nonscientific contributions from citizens make for better policy decisions. |
<reponame>dyutimoy/kraken_3.0
/**
* @file /include/App/qnode.hpp
*
* @brief Communications central!
*
* @date February 2011
**/
/*****************************************************************************
** Ifdefs
*****************************************************************************/
#ifndef App_QNODE_HPP_
#define App_QNODE_HPP_
/*****************************************************************************
** Includes
*****************************************************************************/
#include <ros/ros.h>
#include <string>
#include <QThread>
#include <QStringListModel>
#include <kraken_msgs/krakenPose.h>
#include <image_transport/image_transport.h>
#include <sensor_msgs/Image.h>
#include <kraken_msgs/thrusterData4Thruster.h>
#include <kraken_msgs/thrusterData6Thruster.h>
#include <cv_bridge/cv_bridge.h>
#include <pose_server/KrakenPose.h>
#include <cv.h>
#include "resources/topicHeader.h"
/*****************************************************************************
** Namespaces
*****************************************************************************/
namespace Telemetry
{
const double pi = 3.14159;
/*****************************************************************************
** Class
*****************************************************************************/
const std::string _ros_topic_front_image=topics::CAMERA_FRONT_RAW_IMAGE;
const std::string _ros_topic_bottom_image=topics::CAMERA_BOTTOM_RAW_IMAGE;
const std::string _ros_topic_thruster_6_data=topics::CONTROL_PID_THRUSTER6;
const std::string _ros_topic_thruster_4_data=topics::CONTROL_PID_THRUSTER4;
const std::string _ros_topic_kraken_current_pose=topics::NAV_POSE_ESTIMATED;
const std::string _ros_topic_kraken_set_pose=topics::RESET_POSITION_SERVICE;
class QNode : public QThread
{
Q_OBJECT
public:
QNode(int argc, char** argv );
virtual ~QNode();
bool init();
void run();
void callBackFrontImage(const sensor_msgs::ImageConstPtr &msg);
void callBackBottomImage(const sensor_msgs::ImageConstPtr &msg);
void callBackThruster6Data(const kraken_msgs::thrusterData6ThrusterConstPtr &msg);
void callBackThruster4Data(const kraken_msgs::thrusterData4ThrusterConstPtr &msg);
void callBackKrakenCurrentPose(const kraken_msgs::krakenPoseConstPtr &msg);
void callBackKrakenSetPose(const kraken_msgs::krakenPoseConstPtr &msg);
Q_SIGNALS:
void rosShutdown();
void updateCurrentPose(kraken_msgs::krakenPoseConstPtr msg);
void updateSetPose(kraken_msgs::krakenPoseConstPtr msg);
void updateFrontImage(sensor_msgs::ImageConstPtr _msg);
void updateBottomImage(sensor_msgs::ImageConstPtr _msg);
private:
int init_argc;
char** init_argv;
ros::Subscriber _ros_subscriber_front_image;
ros::Subscriber _ros_subscriber_bottom_image;
ros::Subscriber _ros_subscriber_thruster_4_data;
ros::Subscriber _ros_subscriber_thruster_6_data;
ros::Subscriber _ros_subscriber_kraken_current_pose;
ros::Subscriber _ros_subscriber_set_pose;
};
} // namespace App
#endif /* App_QNODE_HPP_ */
|
/*
* Copyright (C) 2012 United States Government as represented by the Administrator of the
* National Aeronautics and Space Administration.
* All Rights Reserved.
*/
package gov.nasa.worldwind.animation;
import gov.nasa.worldwind.geom.Angle;
import gov.nasa.worldwind.util.*;
/**
* @author jym
* @version $Id: AngleAnimator.java 1171 2013-02-11 21:45:02Z dcollins $
*/
/**
* Animates angles, via an interpolator. {@link #begin} and {@link #end} values can be reset
* once the animation is already in motion.
*/
public class AngleAnimator extends BasicAnimator
{
/**
* The angle the animation begins at.
*/
protected Angle begin;
/**
* The angle the animation ends at.
*/
protected Angle end;
/**
* The @link gov.nasa.worldwind.util.PropertyAccessor used to modify
* the data value being animated.
*/
protected final PropertyAccessor.AngleAccessor propertyAccessor;
/**
* Construct an AngleAnimator
*
* @param interpolator the {@link gov.nasa.worldwind.animation.Interpolator}
* @param begin angle the animation begins at
* @param end The angle the animation ends at.
* @param propertyAccessor The {@link gov.nasa.worldwind.util.PropertyAccessor} used to modify
* the data value being animated.
*/
public AngleAnimator(Interpolator interpolator,
Angle begin, Angle end,
PropertyAccessor.AngleAccessor propertyAccessor)
{
super(interpolator);
if (interpolator == null)
{
this.interpolator = new ScheduledInterpolator(10000);
}
if (begin == null || end == null)
{
String message = Logging.getMessage("nullValue.AngleIsNull");
Logging.logger().severe(message);
throw new IllegalArgumentException(message);
}
if (propertyAccessor == null)
{
String message = Logging.getMessage("nullValue.ViewPropertyAccessorIsNull");
Logging.logger().severe(message);
throw new IllegalArgumentException(message);
}
this.begin = begin;
this.end = end;
this.propertyAccessor = propertyAccessor;
}
/**
* Set the {@link #begin} value.
*
* @param begin the new {@link #begin} value.
*/
public void setBegin(Angle begin)
{
this.begin = begin;
}
/**
* Set the {@link #end} value.
*
* @param end the new {@link #end} value.
*/
public void setEnd(Angle end)
{
this.end = end;
}
/**
* Get the current {@link #begin} value.
*
* @return the current {@link #begin} value.
*/
public Angle getBegin()
{
return this.begin;
}
/**
* Get the current {@link #end} value.
*
* @return the current {@link #end} value.
*/
public Angle getEnd()
{
return this.end;
}
/**
* Get the {@link gov.nasa.worldwind.util.PropertyAccessor} in use by this animation
*
* @return the {@link gov.nasa.worldwind.util.PropertyAccessor} in use by this animation
*/
public PropertyAccessor.AngleAccessor getPropertyAccessor()
{
return this.propertyAccessor;
}
/**
* Set the value being animated via the {@link gov.nasa.worldwind.util.PropertyAccessor}
* using the passed interpolant. This implementation just does a straight liner interpolation
* between the {@link #begin} and {@link #end} values.
*
* @param interpolant the interpolant used to generate the next value that will be set by the
* {@link gov.nasa.worldwind.util.PropertyAccessor}
*/
protected void setImpl(double interpolant)
{
Angle newValue = this.nextAngle(interpolant);
if (newValue == null)
return;
boolean success = this.propertyAccessor.setAngle(newValue);
if (!success)
{
flagLastStateInvalid();
}
if (interpolant >= 1)
this.stop();
}
@SuppressWarnings({"UnusedDeclaration"})
private Angle nextAngle(double interpolant)
{
return Angle.mix(
interpolant,
this.begin,
this.end);
}
}
|
<filename>ImplementingARAP09/Mesh.h<gh_stars>10-100
#pragma once
#include <vector>
#include <array>
#include <Eigen/Dense>
#include <GTEngine.h>
namespace sen
{
struct ControlPoint
{
Eigen::Vector3f coord;
std::array<float, 3> bary;
int triangle_id;
};
struct EdgeBoundary
{
std::array<int, 3> neighbours;
Eigen::Vector3f edge_vector;
Eigen::MatrixXf Gk;
EdgeBoundary()
{
}
EdgeBoundary(const std::array<int, 3> &neighbours_, const Eigen::Vector3f &edge_vector_)
{
neighbours = neighbours_;
edge_vector = edge_vector_;
}
void computeGk(const std::vector<Eigen::Vector3f> vertices)
{
int vi = neighbours[0]; float vix = vertices[vi](0); float viy = vertices[vi](1);
int vj = neighbours[1]; float vjx = vertices[vj](0); float vjy = vertices[vj](1);
int vl = neighbours[2]; float vlx = vertices[vl](0); float vly = vertices[vl](1);
Gk = (
Eigen::MatrixXf(6, 2) <<
vix, viy,
viy, -vix,
vjx, vjy,
vjy, -vjx,
vlx, vly,
vly, -vlx).finished();
}
};
struct EdgeInner
{
std::array<int, 4> neighbours;
Eigen::Vector3f edge_vector;
Eigen::MatrixXf Gk;
EdgeInner()
{
}
EdgeInner(const std::array<int, 4> &neighbours_, const Eigen::Vector3f &edge_vector_)
{
neighbours = neighbours_;
edge_vector = edge_vector_;
}
void computeGk(const std::vector<Eigen::Vector3f> &vertices)
{
int vi = neighbours[0]; float vix = vertices[vi](0); float viy = vertices[vi](1);
int vj = neighbours[1]; float vjx = vertices[vj](0); float vjy = vertices[vj](1);
int vl = neighbours[2]; float vlx = vertices[vl](0); float vly = vertices[vl](1);
int vr = neighbours[3]; float vrx = vertices[vr](0); float vry = vertices[vr](1);
Gk = (
Eigen::MatrixXf(8, 2) <<
vix, viy,
viy, -vix,
vjx, vjy,
vjy, -vjx,
vlx, vly,
vly, -vlx,
vrx, vry,
vry, -vrx).finished();
}
};
class Mesh
{
public:
Mesh()
{
}
~Mesh()
{
}
std::vector<Eigen::Vector3f> vertices;
std::vector<std::array<int, 3>> triangles;
std::vector<EdgeBoundary> edges_boundary;
std::vector<EdgeInner> edges_inner;
std::vector<ControlPoint> control_points;
bool Read(const std::string &file_path);
void SimilarityTransformation();
void ScaleAdjustment();
bool computeBarycentric();
void buildA1Bottom();
void buildA2Bottom();
void buildB1();
void buildB2();
private:
Eigen::MatrixXf L1;
void buildA1Top();
Eigen::MatrixXf L2;
void buildA2Top();
Eigen::MatrixXf C1;
Eigen::MatrixXf C2;
Eigen::VectorXf b1;
Eigen::VectorXf b2x;
Eigen::VectorXf b2y;
typedef gte::BSNumber<gte::UIntegerAP32> Numeric;
typedef gte::BSRational<gte::UIntegerAP32> Rational;
typedef gte::PlanarMesh<float, Rational, Rational> PlanarMesher;
std::unique_ptr<PlanarMesher> mPMesher;
void preComputeBarycentric();
};
} |
Has Abercrombie & Fitch (NYSE: ANF) passed its heyday among high school students? The retail chain used to be crowded with adolescents shopping for the newest cut of jeans while parents tested their patience in the cologne soaked stores. However, A&F released its third quarter earnings report on December 3rd, revealing abysmal results.
A&F reported an adjusted non-GAAP net income of $30.4 million, compared to $40.5 million of the same quarter last year. The reported adjusted non-GAAP net income per diluted share was $0.42, compared to $0.52 from the same quarter of last year. Abercrombie & Fitch lowered its guidance for the fiscal year of $2.15 – $2.35 down to $1.50 – $1.65. All in all, quarterly sales dropped 12%.
CEO Mike Jeffries attributed the “disappointing” report to “a very challenging environment for young apparel.” He expects “conditions to remain difficult through the balance of the fourth quarter.” However, Jeffries noted changes being made to take the company in the right direction, such as a “shift to a branded structure, changes in [the] assortment and how [A&F] engage[s] with [the] customer, investing in direct-to-consumer and omni-channel, expanding… international reach, closing underperforming stores, and continuing to reduce expense.” Jeffries seemed confident that the “aggregate impact of these changes represents a significant transformation” for A&F and he is “hopeful that the benefits will start to become evident” through 2015.
Many consumers still have a sour taste in their mouth from Mike Jeffries, who came under fire last year for comments about who can and cannot shop at A&F. Jeffries wanted the shop to be for “cool kids,” and did not stock women’s clothing in extra-large sizes. Earlier in 2006, Jeffries said in an interview that A&F hires good looking people in the stores because “good-looking people attract other good-looking people, and we want to market to cool, good-looking people. We don’t market to anyone other than that… Candidly, we go after the cool kids… Are we exclusionary? Absolutely.” In 2013, Jeffries made a statement about the 2006 comments, saying “I sincerely regret that my choice of words was interpreted in a manner that has caused offense.”
On December 3rd, blogger John Divine of Motley Fool wrote on InvestorPlace that he is “bearish” on ANF. Divine explained that teens, A&F’s key demographic, are “notoriously fickle consumers.” He is not impressed that Abercrombie’s “EPS of 42 cents beat consensus expectations by a penny” because “Wall Street has learned to expect less and less of Abercrombie.” Divine continued, “There is literally no long-term bullish catalyst on the horizon for Abercrombie… The area is too competitive and it’s close to impossible to squeeze long-term pricing power out of a teenage apparel brand forever.”
Divine has a 69% overall success rate recommending stocks with an average return of +4.9% per recommendation.
Separately on December 3rd, analyst Adrienne Tennant of Janney Capital reiterated a Neutral rating on A&F and raised her price target to $26. Tennant highlighted the drop in sales and earnings per share. She attributed her neutral rating to “decelerating total comparable sales… FX headwinds and weak European sales trends that are likely to weigh more negatively on performance in the next few quarters;” and “uncertainty regarding shift in merchandise assortment that we believe abandons legacy/logo product shoppers, while not yet connecting with new, fashion forward shoppers.”
Tennant has a 47% overall success rate recommending stocks with an average return of +4.6% per recommendation.
Abercrombie & Fitch has bold plans to get back on track, but will it pay off?
On average, the top analyst consensus for ANF is Hold. |
MEXICO CITY—She was a crusading Twitter journalist in a bastion of organized crime who chose a photograph of Catwoman as her online avatar and christened herself Felina. Like a comic-book avenger, her alter ego defied the forces of evil in her real-life Gotham of Reynosa, a border city in the Mexican state of Tamaulipas located a short drive from McAllen, Texas. Tamaulipas is notorious as a state caught in the iron grip of organized crime. Extortion, kidnappings, shootouts, arson, bodies excavated from arid pits, all of this happens in Tamaulipas, practically on a daily basis, but hardly any of it gets reported because of a media blackout the cartels decreed four years ago that is as strictly enforced as martial law after a coup.
Two rival drug cartels in Tamaulipas, the Gulf Cartel and the Zetas, have final say over what gets printed or broadcast in the local media. By necessity the people of the state increasingly have turned to social media to share information about organized crime and its infiltration of the government. They are referred to as citizen journalists and have received international attention for their innovative use of sites like Facebook and Twitter to defy the imposition of the blackout.
Felina was an administrator for Valor por Tamaulipas (which means Courage for Tamaulipas), the most popular citizen news hub in the state, with more than 100,000 followers on Twitter and over half a million on Facebook. A sampling of the site’s content varies from the sensational to the specific. There are photos of young teenagers holding military-grade firepower with captions or comments that identify them as members of organized crime. There are posters of missing persons and news alerts about violence that are timely and specific: “At 10am there were isolated gunshots heard coming from Unidad Obrera”; “Since 12:25a.m. Explosions and machine gun fire at Cañada/Fuentes, and pickup trucks passed at high speed on 20th Street”; “In Balcones sector 2 white Ford pickup with 3 armed Men on Everest Street and Seventh.” Soldiers at the Mexican army base in Reynosa also post news alerts to the site about violent confrontations between the army and the narcos.
Felina posted under the handle @Miut3 and was best known for her posts of danger alerts that pinpointed the location of violent incidents in real time. People sent her bits of information as a way for them to resist the hegemony of the cartels. She also wrote posts pleading with victims of crime not to remain silent, to file a police report even if it meant having to brave reprisals. She would post emergency telephone numbers as a way to try to help.
Understandably the narcos wanted to know the real identities of Felina and her compañeros at Valor por Tamaulipas. A year and a half ago, a cartel had hundreds of leaflets distributed throughout Tamaulipas offering a reward of 600,000 pesos (about $48,000 at the time) for anyone who would divulge the names of the site’s administrators. At around the same time there were videos posted online of executions of individuals alleged to be contributors to the site. The founder shut it down and left the state, hoping that time away would diminish the danger. But when Valor por Tamaulipas went back online the situation only intensified: The number of followers to the site quadrupled and the threats resumed.
On Oct. 8, Valor por Tamaulipas received the following tweet: “We’re coming very close to many of you watch out felina.” The sender’s account was a shell but the message had the feel of authenticity. It was one in a series of posts that arrived on the same day. Each had an exasperated tone, demanding to know why the supposed generosity of the narcos toward people of low income went unreported, and why the focus on the Gulf Cartel but nothing on the crimes of soldiers and police? The concluding message defamed the site’s administrators as liars and threatened war on each of them by name, or at least by handle: “This is for you bandolera, felina, valor and all the rest who make things up.”
The founder of Valor por Tamaulipas, whose identity remains unpublished, said the need for secrecy had become greater than ever before. But he said Felina could not be convinced to alter her behavior to account for the increased danger. In a post on the site the founder described her as someone “who moved heaven and earth” for anyone in need. Her activity as a citizen journalist had fed into a larger vision of building a supportive community in Tamaulipas. She raised money; she organized blood donations, and helped people find affordable housing and free medical care. She listened but did not heed warnings from her peers that by raising her public profile in the community she risked being discovered. The founder removed Felina as an administrator after one last argument about helping someone in need of orthopedic shoes.
Felina nevertheless continued to post a high volume of news alerts to the site at the hashtag #ReynosaFollow. Until early in the morning of Thursday, Oct. 16, when this message from Felina @Miut3 was posted:
# reynosafollow FRIENDS AND FAMILY, MY REAL NAME IS MARÍA DEL ROSARIO FUENTES RUBIO. I AM A PHYSICIAN. TODAY MY LIFE HAS COME TO AN END.
The next message, sent moments later, is supposedly her warning friends and family not to make the same mistake she did, using social media to report on organized crime, because “there is no point.” The message after that is a warning to her followers and to three prominent citizen journalists that the cartels “are closer to us than you think.” The last message sent from Felina’s account is not written but rather consists of two photos: in the first, a middle-aged woman keeps her hands folded in front of her and looks directly at the camera; in the second the same woman is lying on a dirty floor with a coup de grace bullet wound in the face. The founder of Valor por Tamaulipas confirmed that the photos are of Felina. Twitter has since shut down her account.
How was Felina’s identity discovered? She may have been kidnapped, at first, for another reason completely. Staff at the Tierra Santa Clinic in Reynosa witnessed armed men riding in two pickup trucks pull into the parking lot and kidnap Del Rosario between the hours of 10 and 11 a.m. after she had completed her shift last week. She was kidnapped along with another physician and a nurse.
The motive, according to a report in Zócalo Magazine, was revenge for the death of a 4-year old boy whose teenage parents had brought him to the clinic for treatment that morning. According to the report, Del Rosario administered a dose of Diazepam to treat the boy for a seizure and complications ensued, leading her to have him transferred to a hospital, and he died en route. But when the kidnappers went through the doctor’s cellphone, according to the Zócalo story, they saw her Twitter account, realized she was Felina, and executed her. With her cellphone, they were able to terrorize her followers with the photos and messages.
The founder of Valor por Tamaulipas disputes this version of events and has characterized it as disinformation. Meanwhile, fellow citizen journalists who knew her personally have had to change their cellphone numbers and delete old correspondence with her for fear the cartel will use it to track them down.
The state prosecutor’s office in Tamaulipas confirmed that a Dr. María del Rosario Fuentes Rubio was reported kidnapped on the day before the photos and messages were posted to Felina’s Twitter account. Officially the case remains a kidnapping because, according to the coroner’s office, the body of the woman in the photographs has yet to be recovered.
The founder of Valor por Tamaulipas posted a statement on the site expressing grief at the loss of “an angel who gave everything, her life, her future, her safety and peace, she gave it all for the good people of our state.”
“Today Miut3 ceased to report,” the founder said. “But what the criminals don’t know is that Miut3 is part of our soul and she will never permit us to surrender to organized crime. She will never surrender, and how disappointed she would feel knowing that a single one of all those whom she helped were to succumb.” |
<reponame>ZaoLahma/DockerizeMe
class ServiceDiscoveryCtxt:
multicast_address = (None, None) |
The present invention relates to a process for molding and vulcanizing tyres and other rubber articles in which the molded and vulcanized tyre blank is prevented from sticking to the bladder of the vulcanization press by using a cross-linked, hardened, tightly adhering, elastic release agent film bonded to the bladder by chemical interactions.
According to the prior art, tyres are molded and vulcanized by placing tyre blanks into a spraying booth in which the blanks are rotated by means of mechanical devices. A spray gun is introduced into these rotating blanks and is used for distributing the release agent solution therein. The overspray is removed by means of vacuum or a water wall. This is followed by molding and vulcanization of the blank in a vulcanization press by means of a bladder (heating membrane), which serves to heat the tyre blank, to perform vulcanization and to press the tyre under high pressure into negative shapes (compare the description of this technique in DE-OS 31 46 053).
The bladders used in the vulcanization presses are manufactured and processed by the tyre factories using their own mixtures and on the basis of their own ideas. They are formed from various rubber mixtures and have on their exterior air ducts, which are pressed or milled in, in order to remove air which could have been trapped during the cambering of the bladder. During vulcanization the bladders are exposed to high pressures and temperatures (approximately 20 bar and upto 200.degree. C.). The vulcanization times for standard car tyres are about 9 to 15 minutes. The bladders are expanded to roughly twice their size and under these loading conditions can on an average vulcanize between 300 or 600 tyres depending on the quality of the bladder and the heating medium used.
The disadvantages of this known process for molding and vulcanizing tyres and other rubber articles are especially that the uniform introduction of the release agent solution into the blanks, particularly in the vicinity of the bead area is labor-intensive and often leads to dirtying of equipment and the sides of the tyres which necessitates additional operations. This dirtying action is brought about in that the release agent solution also passes onto the gripping arms for the blank and drips during further operations and consequently dirties the blank.
The release solutions used in the aforementioned operating processes preferably contain silicones, particularly silicone oils or silicone emulsions. Both in the solvent-based release solutions and in the aqueous release solutions the silicones lead to a considerable increase in the lubricating and release properties. However, silicones have known disadvantages, which are in part concentration-dependent.
To avoid a part of the disadvantages of the known operating processes, it has been proposed in DE-OS 31 46 053 to cover the bladder with a lubricant having a certain composition and containing silicone oil. This lubricant contains about 10 to 40 parts by weight of bentonite clay having a particle size between about 100 and 500 mesh, about 15 to 45 parts by weight of polydimethylsiloxane having a viscosity of about 40,000 to 120,000 mm.sup.2 /s at 25.degree. C., about 12 to 31 parts by weight of polyethylene glycol and/or polypropylene glycol having a molecular weight between about 1500 and 2500, about 10 to 25 parts by weight of 1 or more surface active agents for the polydimethylsiloxanes and the poly(alkylene glycol) and optionally about 4 to 12 parts by weight of a stabilizing agent. The bladder is covered with this lubricant in form of an aqueous emulsion containing about 500 to 1500 parts by weight of water. This is achieved by for example spray coating and drying, for example by evaporating in air at a temperature between about 20.degree. and 110.degree. C. The bladder so coated with a lubricant layer can be used for about 6 to 9 tyre vulcanization cycles. Thereafter excess adhesion between the contacting outer surface of the bladder and the inner surface of the tyre occurs, i.e. after molding and vulcanization of the tyre, the bladder sticks to the molded and vulcanized tyre so that separation is difficult and possibly leads to damages of the bladder and/or the tyre. Therefore, after about 6 to 9 vulcanization cycles the lubricant layer has to be renewed. In the example it is stated that the aqueous emulsion applied to the bladder was dried for 1 minute at 65.degree. C. The coating already had to be renewed after four tyre vulcanization cycles. One cycle lasting for more than 1 hour.
Though the process proposed in DE-OS 31 46 053 avoids the disadvantages caused by the treatment of the tyre blanks with release agent solution, it has besides other disadvantages the big disadvantage that the lubricant cover has to be renewed already after a short time so that the operation of the vulcanization press often has to be interrupted, which of course leads to undesired production breakdowns. Further, such frequent renewal of the lubricant cover on the bladder again leads to heavy dirtying of the vulcanization press, so that indeed the dirtying problem is only shifted. Accordingly, this process has not found acceptance in practice. |
Prime Minister Malcolm Turnbull is only one of those responsible for the NBN political football. Credit:Alex Ellinghausen It is now 10 years since the NBN first came into being, with the much-repeated story being that then prime minister Rudd and communications minister Stephen Conroy dreamed it up on the back of an envelope mid-flight. Rudd, of course, contends that it was the recommendation of a committee of senior treasury officials. Either way, the eventual dream was super-fast broadband to something like 93 per cent of the population using fibre-to-the-premises technology. The rest would get fixed-wireless or satellite broadband. The reality? Super-slow, congested, costly internet in a lot of cases. Why? Because of poor political decisions made by governments of both the red and blue flavours, as well as by ISPs, such as TPG and Dodo, who are crunching the amount of bandwidth they purchase per customer from NBN in order to pump up profit margins. In reality, the "tax on usage" retail service providers complain about being charged by NBN Co, which varies between $8 and $17.50 per megabit, turns out to be about the same as what they were paying pre-NBN to Telstra and other wholesale providers once you factor in things like hauling international bandwidth to Australia and domestic interconnect fees.
Former Prime Minister Kevin Rudd and his Communications Minister Stephen Conroy unveiled a vision for the NBN that was doomed. Credit:Glen McCurtayne So what changed? The answer, it appears, is that providers such as TPG and Dodo are in an internet price war which is seeing them cut operating costs in order to win against one another. And where are they cutting costs? By reducing the amount of "usage tax" they pay to NBN for what's called the CVC, or Connectivity Virtual Circuit. They claim it's too high and is a disincentive to take up faster speeds. On average, industry sources tell me that premium ISPs, such as Telstra, are provisioning for 3 megabits of CVC per user per month. Meanwhile, cheapskate providers are provisioning between 0.5 Megabits and 1.5 Megabits per user per month on average.
To protect the grannies who only want a phone at home there should also be a cut down voice only service David Forman It's becoming so difficult for consumers to determine under the current NBN environment which provider to choose, especially given ISPs don't disclose these details. In an ideal world, they would. They would also disclose what their peak-hour usage was like so that consumers could make informed decisions about whether or not they will get a good internet experience when they get home from work to watch Netflix or Stan (which is owned by Fairfax Media). For instance, if an ISP only provisions for 2 Megabits per second and in reality each customer requires 3 Megabits per second, then internet speeds will suffer. It's time consumers voted with their feet when it comes to poor service. This isn't necessarily an NBN problem or a Turnbull government problem.
However, NBN could do its bit to incentivise ISPs to sell higher-speed NBN plans by dropping the CVC charge and increasing the monthly line service fee, known as Access Virtual Circuit, or AVC. Sources tell me this exactly what is under review, and a leaked NBN "price evolution" document confirms this. "We are currently in a confidential consultation period with internet and phone providers on a new pricing model," an NBN Co spokesperson told Fairfax Media on Wednesday. "We will inform the market and retailers when we have been through this process, and are in a position to make an announcement which will be before the end of the year." A spokesperson for federal Communications Minister Mitch Fifield gave a similar response. "NBN has adjusted its wholesale pricing on a number of occasions and is currently in discussions with retailers", the spokesperson said.
But David Forman, senior manager of industry and policy at Macquarie Telecom, told Fairfax Media that there were 10 different wholesale access models being contemplated by NBN Co in the pricing review.
"One is to get rid of CVC," he said. "Others are to rebalance it and others are to shift the cost." One is to have a monthly AVC that is $12 more than the current $22.
"That's the model we have told them we prefer alongside a product for voice only customers," he said.
The voice-only product would be about $19, according to Forman. "We are saying we want an AVC-only broadband product but in order to protect the grannies who only want a phone at home there should also be a cut down voice only service. I think they are estimating.. that would be around $19." The NBN is canvassing retailers confidentially. John Lindsay, the former chief technology officer of ISP Internode, backs the move.
"At end of the day I completely stand by my assertion that the CVC is effectively a tax on megabits. It therefore drives megabit consumption downwards, in the same way that putting a price on carbon drives CO2 emissions down," he said. Another source rubbished NBN Co's claims of confidentially when it is required to offer services on the same terms and conditions to all customers. "So if they are floating new ideas of pricing; that can't be confidential. They should just put it out on public website saying, 'We are thinking of doing this, what do people think about it? '," he said. "At present they engage in these secret squirrel meetings between partners when they are a wholesale access government-owned network. Why are we doing this little dance? It's absurd." But even with no CVC, we could end up in the same situation we are in today, where ISPs hide behind how much bandwidth they provision for each of their customers, and partake in price wars that drive down not only internet costs but internet speeds.
Loading There are two things you can do. If your ISP is at fault for slow speeds, walk away from them. If they don't let you, contact the Telecommunications Industry Ombudsman, or TIO, and get their help to move to another provider. Then, before choosing your next provider, ask neighbours what their experience is like. |
Q:
Why wasn't this character an Obscurial?
In the movie, Newt reveals that the beast attacking New York was actually an Obscurus, which he explains is
a burst of dark power that manifests in witch or wizard that represses their magical power.
Now, he goes on to explain that
The oldest known Obscurial was 10 years old, but they're usually younger.
If this is true, why then
did Harry Potter or Hermione Granger not develop an Obscurus? They were not even aware magic existed until they were 11. My only thought would be that they didn't actively repress their magic, just didn't know what it was.
I don't know if there was any more detail given in a companion novel, Pottermore or the book itself, but on the wiki it made no mention of details other than was given in the movie. Are there any additional rules that would explain why this doesn't happen more often?
A:
Neither of them were suppressing their magical power
Newt is quite clear about this in the script; an Obscurus only develops when magic is intentionally suppressed:
Newt: Before wizards went underground, when we were still being hunted by Muggles, young wizards and witches sometimes tried to suppress their magic to avoid persecution. Instead of learning to harness or to control their powers, they developed what was called an Obscurus.
Fantastic Beasts and Where to Find Them (2016)
The early chapters of Philosopher's Stone give us some insight into Harry's pre-Hogwarts childhood, and it's revealed that he had incidents of accidental magic even before turning eleven:
Once, Aunt Petunia, tired of Harry coming back from the barbers looking as though he hadn't been at all, had taken a pair of kitchen scissors and cut his hair so short he was almost bald except for his bangs, which she left "to hide that horrible scar." Dudley had laughed himself silly at Harry, who spent a sleepless night imagining school the next day, where he was already laughed at for his baggy clothes and taped glasses. Next morning, however, he had gotten up to find his hair exactly as it had been before Aunt Petunia had sheared it off He had been given a week in his cupboard for this, even though he had tried to explain that he couldn't explain how it had grown back so quickly.
Another time, Aunt Petunia had been trying to force him into a revolting old sweater of Dudley's (brown with orange puff balls) -- The harder she tried to pull it over his head, the smaller it seemed to become, until finally it might have fitted a hand puppet, but certainly wouldn't fit Harry. Aunt Petunia had decided it must have shrunk in the wash and, to his great relief, Harry wasn't punished.
On the other hand, he'd gotten into terrible trouble for being found on
the roof of the school kitchens. Dudley's gang had been chasing him as
usual when, as much to Harry's surprise as anyone else's, there he was
sitting on the chimney.
Harry Potter and the Philosopher's Stone Chapter 2: "The Vanishing Glass"
Although we don't know much about Hermione's childhood, presumably she had similar experiences (though without the flagrant child abuse, I should think).
Interestingly, Harry would seem to be the perfect candidate for becoming an Obscurus; since he was quite literally abused for his magical outbursts, it seems logical that he would have tried to suppress them. Although I don't have any evidence for this, I suspect that his magical ignorance is actually what protected him; since he didn't have any notion of what was causing his outbursts, he didn't know how to suppress them.
But, regardless of quite how, it's clear that he spectacularly failed at supressing his magical powers; hence, no Obscurus.
A:
This question is answered by Rowling in the FAQ of her new website.
Why didn’t Harry Potter develop an Obscurus?
An Obscurus is developed under very specific conditions: trauma associated with the use of magic, internalized hatred of one’s own magic and a conscious attempt to suppress it.
The Dursleys were too frightened of magic ever to acknowledge its existence to Harry. While Vernon and Petunia had a confused hope that if they were nasty enough to Harry his strange abilities might somehow evaporate, they never taught him to be ashamed or afraid of magic. Even when he was scolded for ‘making things happen’, he didn’t make any attempt to suppress his true nature, nor did he ever imagine that he had the power to do so.
J.K. Rowling's new website - FAQ
A:
The implication seems to be that not knowing about magic isn't enough, you have to be consciously repressing your magic, forcing it back inside until it finally erupts.
‘It’s a manifestation of Dark magic,’ explains Yates. ‘It’s really a
wonderful idea that Jo came up with. When a young child is prohibited
from developing their magic in a healthy, organic way, then this dark
energy can develop, and the dark energy can suddenly get out of
control and wreak havoc.’
Inside the Magic: The Making of Fantastic Beasts
Harry, by comparison isn't especially trying not to do magic. Rather than repressing it, it just occasionally bubbles out of him
“So Harry had been brought up by his dead mother’s sister and her husband. He had spent ten years with the Dursleys, never understanding why he kept making odd things happen without meaning to, believing the Dursleys’ story that he had got his scar in the car crash which had killed his parents.
...
And then, exactly a year ago, Hogwarts had written to Harry, and the whole story had come out.”
Harry Potter and the Chamber of Secrets, Chapter 1 (The Worst Birthday)
In his later year, had he remained with a vehemently anti-magical family like the Dursleys (rather than going to Hogwarts), there's a distinct possibility that he might have gone on to become an Obscurial, although that particular affliction only seems to affect younger children. |
Survival of the fittest? Natural selection in islet transplantation. The full potential of cadaveric islet transplantation will only be realized by avoiding both pretransplant insults programming islets for subsequent death and posttransplant triggers for apoptosis and necrosis. The immediate blood mediated inflammatory response causes significant islet loss in the immediate posttransplant period. However, if we focus on this alone we will miss many opportunities to improve transplanted islet survival. Even when single donor islet transplants become the norm, there will still be more patients who might benefit from islet transplants than grafts available. Input from "transplanters" and diabetologists is essential in order to select appropriate patients for islet transplantation. |
import React, { useState } from 'react'
import { ScrollView, TouchableOpacity, TouchableWithoutFeedback } from 'react-native'
import { BaseLayout, Animator, BaseText } from '../../../../lib'
import { RootType } from '../../routes/types'
import styles from './styles'
import { Navigation } from 'react-native-navigation'
import { Routes } from '../../routes/routes'
export type HomeProps = {}
export const Home: RootType<HomeProps> = ({ componentId }) => {
const [animVisible1, setAnimVisible1] = useState(true)
const [animVisible2, setAnimVisible2] = useState(false)
const onBaseLayoutDemoScreenPush = () => {
return Navigation.push(componentId, {
component: {
name: Routes.BaseLayoutDemo,
},
})
}
const onAnimatorDemoScreenPush = () => {
return Navigation.push(componentId, {
component: {
name: Routes.AnimatorDemo,
},
})
}
return (
<ScrollView contentContainerStyle={styles.wrapper}>
{/* Explore BaseLayout section. */}
<BaseLayout margin={{ bottom: 20 }}>
<TouchableOpacity activeOpacity={0.9} onPress={onBaseLayoutDemoScreenPush}>
<Animator.View
visible={animVisible1}
size={{ width: 300, height: 50 }}
vAlign="center"
hAlign="center"
border={{ radius: 8 }}
animation={{
backgroundColor: ['#DBCFB0', '#D4B2D8', '#545775', '#718F94', '#0F1020'],
}}
config={{
fromValue: 0,
toValue: 4,
inputRange: [0, 1, 2, 3, 4],
useNativeDriver: false,
duration: 5000,
unmount: false,
}}
onAnimationEnd={() => setAnimVisible1(false)}
onAnimationReset={() => setAnimVisible1(true)}
>
<BaseText color="white">Explore BaseLayout</BaseText>
</Animator.View>
</TouchableOpacity>
</BaseLayout>
<BaseLayout margin={{ bottom: 20 }}>
<TouchableWithoutFeedback
onPress={onAnimatorDemoScreenPush}
onPressIn={() => setAnimVisible2(true)}
onPressOut={() => setAnimVisible2(false)}
>
<Animator.View
visible={animVisible2}
backgroundColor="coral"
size={{ width: 300, height: 50 }}
vAlign="center"
hAlign="center"
border={{ radius: 8 }}
animation={{ backgroundColor: ['#F4B393', '#7A28CB'] }}
config={{ unmount: false, useNativeDriver: false }}
>
<Animator.Text
visible={animVisible2}
color="white"
animation={{ scale: [1, 1.1] }}
config={{ unmount: false }}
>
Explore Animator
</Animator.Text>
</Animator.View>
</TouchableWithoutFeedback>
</BaseLayout>
</ScrollView>
)
}
Home.options = {
topBar: {
title: { text: 'Home' },
largeTitle: { visible: true },
},
}
|
Recurrence of Prinzmetal angina seven years following aortocoronary bypass surgery: a clinical and angiographic follow-up. A patient with Prinzmetal angina and ST segment elevation in the anterior ECG leads became asymptomatic after a 50% left anterior descending coronary artery stenosis was bypassed. However, seven years later Prinzmetal angina recurred but with ST segment elevation in the inferior ECG leads. Although the coronary bypass graft had remained patent, the proximal and distal left anterior descending coronary artery was occluded. No significant stenosis was present in the right coronary artery. Perhexiline maleate controlled his symptoms but when the drug was stopped because of side effects an acute inferior myocardial infarction occurred. |
Positron emission tomography (PET) is a useful diagnostic tool that supports the need for more accurate staging of lung cancer and improved treatment for patients, concludes an extensive systematic review published online in Journal of National Cancer Institute.
The review conducted by the Lung Cancer Disease Site Group of Cancer Care Ontario’s Program in Evidence-Based Care led by a Sunnybrook researcher, Dr. Yee Ung, evaluates the accuracy and utility of 18-fluorodeoxyglucose PET (18FDG-PET) in the diagnosis and staging of lung cancer.
While the standard imaging technologies CT provide structural information and defines disease states based on anatomical changes, PET provides complementary information on biochemical processes that may precede gross anatomical changes.
Key findings drawn from the literature review include PET imaging is accurate in differentiating between benign and malignant lung tumours as small as 1 centimetre. PET was also shown to be more effective for mediastinal (lymph nodes in the centre of the chest) staging in non-small cell lung cancer. Nonetheless, confirmation of PET findings by surgical biopsy remains important. With best available data, the researchers also identified good accuracy in staging extensive versus limited stage small cell lung cancer.
The Lung Cancer Disease Site Group of Cancer Care Ontario’s Program in Evidence-Based Care reviewed recent relevant health technology assessments, randomized trials and meta-analyses and also took into consideration studies evaluating the utility of PET.
“Future research is needed to determine not only if PET should be integrated into the standard staging and diagnostic processes of lung cancer but also how PET would be incorporated into the staging algorithm,” says Ung.
In 2007, an estimated 23,300 Canadians will be diagnosed with lung cancer and 19,900 will die of it. The total number of lung cancer deaths (men and women combined) is greater than the number of either prostate or breast cancer related deaths combined. According to Lung Cancer Canada, in 2006, almost 23,000 Canadians were diagnosed with the disease and another 27,000 cases are expected to be diagnosed this year. |
<reponame>patrickdehoon/dagu
import unittest
import json
from os import path
from dagu.dagu_exec import DaguExec
class TestDaguDateOptions(unittest.TestCase):
"""
The purpose of this unittest is to check if every date-option, for every length is being processed as expected.
"""
def setUp(self):
self.file = open(path.abspath(path.join(path.dirname( __file__ ), '..', 'dagu.json')))
self.config = json.load(self.file)
self.datetimes_with_divider_eu = ["01-02-1992 01:00:00 am", "01-02-1992 1:00:00 am", "01-02-1992 1:00:00", "01-02-1992 01:00:00",
"1-02-1992 01:00:00 am", "1-02-1992 1:00:00 am", "1-02-1992 1:00:00", "1-02-1992 01:00:00",
"01-2-1992 01:00:00 am", "01-2-1992 1:00:00 am", "01-2-1992 1:00:00", "01-2-1992 01:00:00",
"1-2-92 01:00:00 am", "1-2-92 1:00:00 am", "1-2-92 1:00:00", "1-2-92 01:00:00",
"01-02-92 01:00:00 am", "01-02-92 1:00:00 am", "01-02-92 01:00:00", "01-02-92 1:00:00",
"01-2-92 01:00:00 am", "01-2-92 1:00:00 am", "01-2-92 1:00:00", "01-2-92 01:00:00",
"1-02-92 01:00:00 am", "1-02-92 1:00:00 am", "1-02-92 1:00:00", "1-02-92 01:00:00",
"1-2-92 01:00:00 am", "1-2-92 1:00:00 am", "1-2-92 01:00:00", "1-2-92 1:00:00"]
self.datetimes_with_divider_usa = ["02/01/1992 01:00:00 am", "02/01/1992 1:00:00 am", "02/01/1992 1:00:00", "02/01/1992 01:00:00",
"2/01/1992 01:00:00 am", "2/01/1992 1:00:00 am", "2/01/1992 1:00:00", "2/01/1992 01:00:00",
"02/1/1992 01:00:00 am", "02/1/1992 1:00:00 am", "02/1/1992 1:00:00", "02/1/1992 01:00:00",
"2/1/92 01:00:00 am", "2/1/92 1:00:00 am", "2/1/92 1:00:00", "2/1/92 01:00:00",
"02/01/92 01:00:00 am", "02/01/92 1:00:00 am", "02/01/92 01:00:00", "02/01/92 1:00:00",
"02/1/92 01:00:00 am", "02/1/92 1:00:00 am", "02/1/92 1:00:00", "02/1/92 01:00:00",
"2/01/92 01:00:00 am", "2/01/92 1:00:00 am", "2/01/92 1:00:00", "2/01/92 01:00:00",
"2/1/92 01:00:00 am", "2/1/92 1:00:00 am", "2/1/92 01:00:00", "2/1/92 1:00:00"]
self.datetimes_without_divider = ["01021992 01:00:00 am", "01021992 1:00:00 am", "01021992 1:00:00",
"01021992 01:00:00",
"1021992 01:00:00 am", "1021992 1:00:00 am", "1021992 1:00:00",
"1021992 01:00:00",
"0121992 01:00:00 am", "0121992 1:00:00 am", "0121992 1:00:00",
"0121992 01:00:00",
"1292 01:00:00 am", "1292 1:00:00 am", "1292 1:00:00",
"1292 01:00:00",
"010292 01:00:00 am", "010292 1:00:00 am", "010292 01:00:00",
"010292 1:00:00",
"01292 01:00:00 am", "01292 1:00:00 am", "01292 1:00:00",
"01292 01:00:00",
"10292 01:00:00 am", "10292 1:00:00 am", "10292 1:00:00",
"10292 01:00:00",
"1292 01:00:00 am", "1292 1:00:00 am", "1292 01:00:00",
"1292 1:00:00"]
self.datetimes_with_divider_space = ["01 02 1992 01:00:00 am", "01 02 1992 1:00:00 am", "01 02 1992 1:00:00",
"01 02 1992 01:00:00",
"1 02 1992 01:00:00 am", "1 02 1992 1:00:00 am", "1 02 1992 1:00:00",
"1 02 1992 01:00:00",
"01 2 1992 01:00:00 am", "01 2 1992 1:00:00 am", "01 2 1992 1:00:00",
"01 2 1992 01:00:00",
"1 2 92 01:00:00 am", "1 2 92 1:00:00 am", "1 2 92 1:00:00",
"1 2 92 01:00:00",
"01 02 92 01:00:00 am", "01 02 92 1:00:00 am", "01 02 92 01:00:00",
"01 02 92 1:00:00",
"01 2 92 01:00:00 am", "01 2 92 1:00:00 am", "01 2 92 1:00:00",
"01 2 92 01:00:00",
"1 02 92 01:00:00 am", "1 02 92 1:00:00 am", "1 02 92 1:00:00",
"1 02 92 01:00:00",
"1 2 92 01:00:00 am", "1 2 92 1:00:00 am", "1 2 92 01:00:00",
"1 2 92 1:00:00"]
self.dates_with_divider_eu = ["01-02-1992", "1-02-1992", "01-2-1992", "1-2-92", "01-02-92", "01-2-92", "1-02-92", "1-2-92"]
self.dates_with_divider_usa = ["02/01/1992", "2/01/1992", "02/1/1992", "2/1/92", "02/01/92", "02/1/92", "2/01/92", "2/1/92"]
self.dates_with_divider_space = ["01 02 1992", "1 02 1992", "01 2 1992", "1 2 92", "01 02 92", "01 2 92", "1 02 92", "1 2 92"]
self.dates_without_divider = ["01021992", "1021992", "0121992", "1292", "010292", "01292", "10292", "1292"]
self.target_format = '%Y/%m/%d'
def test_datetimes_without_divider(self):
dagu_exec = DaguExec(dagu_config=self.config)
dates = self.datetimes_without_divider
for record in dates:
print(record)
dagu_exec.execute(record=record, target_format=self.target_format)
result = dagu_exec.get_record()
self.assertEqual(result, '1992/02/01')
def test_datetimes_with_divider_space(self):
dagu_exec = DaguExec(dagu_config=self.config)
dates = self.datetimes_with_divider_space
for record in dates:
print(record)
dagu_exec.execute(record=record, target_format=self.target_format)
result = dagu_exec.get_record()
self.assertEqual(result, '1992/02/01')
def test_datetimes_with_divider_usa(self):
dagu_exec = DaguExec(dagu_config=self.config)
dates = self.datetimes_with_divider_usa
for record in dates:
dagu_exec.execute(record=record, target_format=self.target_format)
result = dagu_exec.get_record()
self.assertEqual(result, '1992/02/01')
def test_datetimes_with_divider_eu(self):
dagu_exec = DaguExec(dagu_config=self.config)
dates = self.datetimes_with_divider_eu
for record in dates:
dagu_exec.execute(record=record, target_format=self.target_format)
result = dagu_exec.get_record()
self.assertEqual(result, '1992/02/01')
def test_dates_with_divider_eu(self):
dagu_exec = DaguExec(dagu_config=self.config)
dates = self.dates_with_divider_eu
for record in dates:
dagu_exec.execute(record=record, target_format=self.target_format)
result = dagu_exec.get_record()
self.assertEqual(result, '1992/02/01')
def test_dates_with_divider_usa(self):
dagu_exec = DaguExec(dagu_config=self.config)
dates = self.dates_with_divider_usa
for record in dates:
dagu_exec.execute(record=record, target_format=self.target_format)
result = dagu_exec.get_record()
self.assertEqual(result, '1992/02/01')
def test_dates_with_divider_space(self):
dagu_exec = DaguExec(dagu_config=self.config)
dates = self.dates_with_divider_space
for record in dates:
dagu_exec.execute(record=record, target_format=self.target_format)
result = dagu_exec.get_record()
self.assertEqual(result, '1992/02/01')
def test_dates_without_divider(self):
dagu_exec = DaguExec(dagu_config=self.config)
dates = self.dates_without_divider
for record in dates:
dagu_exec.execute(record=record, target_format=self.target_format)
result = dagu_exec.get_record()
self.assertEqual(result, '1992/02/01')
def tearDown(self):
self.file.close()
if __name__ == '__main__':
unittest.main()
|
<gh_stars>0
#!/usr/bin/env python
# -- coding: utf-8 --
"""
File: lambda_function.py
Author: <NAME>
Description: AWS Lambda function to create PrivateLink.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
__version__ = "0.1"
import unittest
from botocore.exceptions import ClientError
import boto3
try:
import json
except ImportError:
import simplejson as json
try:
from urllib2 import HTTPError, build_opener, HTTPHandler, Request
except ImportError:
from urllib.error import HTTPError
from urllib.request import build_opener, HTTPHandler, Request
SUCCESS = "SUCCESS"
FAILED = "FAILED"
EC2 = boto3.client('ec2')
def send(event, context, response_status, reason= \
None, response_data=None, physical_resource_id=None):
"""
building own response function
"""
response_data = response_data or {}
response_body = json.dumps(
{
'Status': response_status,
'Reason': reason or "See the details in \
CloudWatch Log Stream: " + context.log_stream_name,
'PhysicalResourceId': physical_resource_id or context.log_stream_name,
'StackId': event['StackId'],
'RequestId': event['RequestId'],
'LogicalResourceId': event['LogicalResourceId'],
'Data': response_data
}
)
opener = build_opener(HTTPHandler)
request = Request(event['ResponseURL'], data=response_body)
request.add_header('Content-Type', '')
request.add_header('Content-Length', len(response_body))
request.get_method = lambda: 'PUT'
try:
response = opener.open(request)
print("Status code: {}".format(response.getcode()))
print("Status message: {}".format(response.msg))
return True
except HTTPError as exc:
print("Failed executing HTTP request: {}".format(exc.code))
return False
def get_my_log_stream(context):
"""
Logging function for the lambda handler to call.
"""
print("Log stream name:", context.log_stream_name + '\n' + "Log group name:", \
context.log_group_name + '\n' + "Request ID:", context.aws_request_id \
+ '\n' + "Mem. limits(MB):", context.memory_limit_in_mb + '\n' + \
"Time remaining (MS):", context.get_remaining_time_in_millis())
def handler(event, context):
"""
Handler to build Private-Link
"""
response = {}
# There is nothing to do for a delete request
if event['RequestType'] == 'Delete':
send(event, context, SUCCESS)
return
try:
response = EC2.create_vpc_endpoint(
DryRun=False,
VpcEndpointType=event['ResourceProperties']['VpcEndpointType'],
VpcId=event['ResourceProperties']['VpcId'],
ServiceName=event['ResourceProperties']['ServiceName'],
SubnetIds=event['ResourceProperties']['SubnetIds'],
PrivateDnsEnabled=False
)
response['VpcEndpoint'].pop('CreationTimestamp')
send(event, context, SUCCESS, response)
except ClientError as error:
print(error)
print("Error: {0}".format(error))
send(event, context, FAILED, response)
if __name__ == "__main__":
handler(event, context)
import doctest
doctest.testmod()
class MyTest(unittest.TestCase):
"""
Class to initiate to test function
"""
def test(self):
"""
Test Function
"""
self.assertEqual(handler(event, context),)
|
Reduction in semen quality after mixed exposure to bisphenol A and isobutylparaben in utero and during lactation periods This study was performed to determine the effect of low-level exposure to a mixture of bisphenol A (BPA) and isobutylparaben (IBP) on male reproduction. Corn oil, BPA (0.05 mg/kg/day), IBP (2.5 mg/kg/day), and a BPA/IBP mixture (BPA 0.05 mg/kg/day and IBP 2.5 mg/kg/day) were administered once daily by oral gavage to female rats for 5 weeks from gestation day 6 to lactation day 21. Male pups were killed at postnatal day 70 and examined for developmental characteristics, body weight, testis and epididymis weight, steroid hormones, epididymal sperm count and motility, and histological changes in testis and epididymis. The BPA/IBP mixture produced a significant downregulation of epididymal sperm count and motility. BPA or IBP alone also reduced epididymal sperm count and motility compared to control. These results indicate that exposure to low-level BPA/IBP mixture, which showed no notable physiological response in early life stages, can decrease semen quality in adulthood. |
<reponame>VarahaMaithreya/LinkedIn-Automatic-JobApply
import datetime as dt
from tkinter.messagebox import showinfo
import tkinter as TK
from tkinter import *
from tkinter import filedialog
import LinkedInAuto
import time
import random
class MyFirstGUI:
def __init__(self, master):
self.master = master
master.title("Linked_in_Auto_for_Jay V.Alpha")
Frame = TK.Frame(master)
Frame.grid(row=0, column=0, rowspan=13, columnspan=3, sticky='nsew')
self.var = StringVar(master)
self.stringvar1 = TK.StringVar(master)
self.stringvar2 = TK.StringVar(master)
self.stringvar3 = TK.StringVar(master)
self.stringvar4 = TK.StringVar(master)
self.stringvar5 = TK.StringVar(master)
self.stringvar6 = TK.StringVar(master)
self.stringvar7 = TK.StringVar(master)
self.stringvar8 = TK.StringVar(master)
self.stringvar9 = TK.StringVar(master)
self.stringvar10 = TK.StringVar(master)
self.var.trace("w", self.validate)
self.stringvar1.trace("w", self.validate)
self.stringvar2.trace("w", self.validate)
self.stringvar3.trace("w", self.validate)
self.stringvar4.trace("w", self.validate)
self.stringvar6.trace("w", self.validate)
self.stringvar7.trace("w", self.validate)
self.stringvar8.trace("w", self.validate)
self.stringvar9.trace("w", self.validate)
self.stringvar10 = TK.StringVar(master)
self.emailEntry = TK.Entry(Frame, textvariable=self.var)
self.emailEntry.grid(row=0, column=1, padx=5, pady=5, sticky=TK.N + TK.S + TK.E + TK.W)
self.emailEntryLabel = TK.Label(Frame, text="Email Address:")
self.emailEntryLabel.grid(row=0, column=0, sticky=TK.W)
self.emailPass = TK.Entry(Frame, textvariable=self.stringvar1)
self.emailPass.grid(row=1, column=1, padx=5, pady=5, sticky=TK.N + TK.S + TK.E + TK.W)
self.emailPassLabel = TK.Label(Frame, text="Email Password:")
self.emailPassLabel.grid(row=1, column=0, sticky=TK.W)
self.linkedInUserNameEntry = TK.Entry(Frame, textvariable=self.stringvar2)
self.linkedInUserNameEntry.grid(row=2, column=1, padx=5, pady=5, sticky=TK.N + TK.S + TK.E + TK.W)
self.linkedInUserNameLabel = TK.Label(Frame, text="LinkedIn Username:")
self.linkedInUserNameLabel.grid(row=2, column=0, sticky=TK.W)
self.linkedInPass = TK.Entry(Frame, textvariable=self.stringvar3)
self.linkedInPass.grid(row=3, column=1, padx=5, pady=5, sticky=TK.N + TK.S + TK.E + TK.W)
self.linkedInPassLabel = TK.Label(Frame, text="LinkedIn Password:")
self.linkedInPassLabel.grid(row=3, column=0, sticky=TK.W)
self.jobTitle = TK.Entry(Frame, textvariable=self.stringvar4)
self.jobTitle.grid(row=4, column=1, padx=5, pady=5, sticky=TK.N + TK.S + TK.E + TK.W)
self.jobTitleLabel = TK.Label(Frame, text="Desired Job Title:")
self.jobTitleLabel.grid(row=4, column=0, sticky=TK.W)
self.role = TK.Entry(Frame, textvariable=self.stringvar5)
self.role.grid(row=5, column=1, padx=5, pady=5, sticky=TK.N + TK.S + TK.E + TK.W)
self.roleLabel = TK.Label(Frame, text="role")
self.roleLabel.grid(row=5, column=0, sticky=TK.W)
self.city = TK.Entry(Frame)
self.city.grid(row=6, column=1, padx=5, pady=5, sticky=TK.N + TK.S + TK.E + TK.W)
self.cityLabel = TK.Label(Frame, text="Location City:")
self.cityLabel.grid(row=6, column=0, sticky=TK.W)
self.state = TK.Entry(Frame, textvariable=self.stringvar6)
self.state.grid(row=7, column=1, padx=5, pady=5, sticky=TK.N + TK.S + TK.E + TK.W)
self.stateLabel = TK.Label(Frame, text="Location State:")
self.stateLabel.grid(row=7, column=0, sticky=TK.W)
self.phone = TK.Entry(Frame, textvariable=self.stringvar7)
self.phone.grid(row=8, column=1, padx=5, pady=5, sticky=TK.N + TK.S + TK.E + TK.W)
self.phoneLabel = TK.Label(Frame, text="Your Phone Number:")
self.phoneLabel.grid(row=8, column=0, sticky=TK.W)
self.num_loops_label = TK.Label(Frame, text="Page Limit:")
self.num_loops_label.grid(row=9, column=0, sticky=TK.W)
self.num_loops = TK.Entry(Frame, textvariable=self.stringvar10)
self.num_loops.grid(row=9, column=1, sticky=TK.N + TK.S + TK.E + TK.W, padx=5, pady=5)
self.resume_path = TK.Entry(Frame, textvariable=self.stringvar8)
self.resume_path.grid(row=10, column=1, padx=5, pady=5, sticky=TK.N + TK.S + TK.E + TK.W)
self.resume_path_label = TK.Label(Frame, text="Resume Path:")
self.resume_path_label.grid(row=10, column=0, sticky=TK.W)
self.resume_path.configure(state="readonly")
self.resumeBtn = HoverButton(Frame, text='Browse Resume', activebackground='lightgrey', command=self.askopenfileResume)
self.resumeBtn.grid(row=10, column=2, sticky=TK.N + TK.S + TK.E + TK.W, padx=5, pady=5)
self.driver_path = TK.Entry(Frame, textvariable=self.stringvar9)
self.driver_path.grid(row=11, column=1, padx=5, pady=5, sticky=TK.N + TK.S + TK.E + TK.W)
self.driver_path_label = TK.Label(Frame, text="Driver Path:")
self.driver_path_label.grid(row=11, column=0, sticky=TK.W)
self.driver_path.configure(state="readonly")
self.driver_btn = HoverButton(Frame, text='Browse Drivers', activebackground='lightgrey', command=self.askopenfileDriver)
self.driver_btn.grid(row=11, column=2, sticky=TK.N + TK.S + TK.E + TK.W, padx=5, pady=5)
self.submit_button = HoverButton(Frame, text="Submit", activebackground='lightgrey', command=self.apply)
self.submit_button.grid(row=12, column=0, columnspan=2, sticky=TK.N + TK.S + TK.E + TK.W, padx=5, pady=5)
def askopenfileResume(self):
f = filedialog.askopenfile(mode='r')
if f:
filename = f.name
self.resume_path.configure(state="normal")
self.resume_path.delete(0, 'end')
self.resume_path.insert(0, filename)
self.resume_path.configure(state="readonly")
def askopenfileDriver(self):
f = filedialog.askopenfile(mode='r')
if f:
filename = f.name
self.driver_path.configure(state="normal")
self.driver_path.delete(0, 'end')
self.driver_path.insert(0, filename)
self.driver_path.configure(state="readonly")
def validate(self, *args):
a = self.var.get()
b = self.stringvar1.get()
c = self.stringvar2.get()
d = self.stringvar3.get()
e = self.stringvar4.get()
g = self.stringvar6.get()
h = self.stringvar7.get()
i = self.stringvar8.get()
j = self.stringvar9.get()
if a and b and c and d and e and g and h and i and j:
self.submit_button.config(state='normal')
else:
self.submit_button.config(state='disabled')
def apply(self):
c = LinkedinEasyApply.linkedinApply(phone=self.phone.get(), username=self.linkedInUserNameEntry.get(), password=<PASSWORD>(), driverPath=self.driver_path.get(), jobTitle=self.jobTitle.get(),
city=self.city.get(), state=self.state.get(), resumeLocation=self.resume_path.get(), num_loops=self.num_loops.get())
c.init_driver()
time.sleep(3)
print ("Logging into Linkedin account ...")
c.login()
time.sleep(1)
dicts = c.searchJobs()
subject = "LinkedIn Job Application Report: " + str(dt.date.today())
df = ReportingModule.saveReportAsCSV(dicts)
time.sleep(1)
sendMail.send_email(user=self.emailEntry.get(), pwd=self.emailPass.get(), recipient=self.emailEntry.get(), subject=subject, df=df)
TK.messagebox.showinfo("Success", "Sequence Complete!")
class HoverButton(TK.Button):
"""HoverButton class to change color of button when hovering.
Attributes:
defaultBackground: Background instance of window
defaultForeground: Foreground instance of window
bind: Event to trigger color change of button
"""
def __init__(self, master, **kw):
"""Inits SampleClass with master widget."""
TK.Button.__init__(self,master=master,**kw)
self.defaultBackground = self["background"]
self.defaultForeground = self["foreground"]
self.bind("<Enter>", self.on_enter)
self.bind("<Leave>", self.on_leave)
def on_enter(self, e):
"""Hover over button event"""
self['background'] = self['activebackground']
self['foreground'] = self['activeforeground']
def on_leave(self, e):
"""Hover off button event"""
self['background'] = self.defaultBackground
self['foreground'] = self.defaultForeground
|
<reponame>typesupply/defcon
import unittest
from defcon.tools.fuzzyNumber import FuzzyNumber
class TestFuzzyNumber(unittest.TestCase):
def __init__(self, methodName):
unittest.TestCase.__init__(self, methodName)
def test_init(self):
fuzzyNumber1 = FuzzyNumber(value=0, threshold=1)
fuzzyNumber2 = FuzzyNumber(2, 3)
self.assertEqual([fuzzyNumber1.value, fuzzyNumber1.threshold],
[0, 1])
self.assertEqual([fuzzyNumber2.value, fuzzyNumber2.threshold],
[2, 3])
def test_repr(self):
fuzzyNumber = FuzzyNumber(0, 1)
self.assertEqual(repr(fuzzyNumber), "[0.000000 1.000000]")
def test_comparison(self):
fuzzyNumber1 = FuzzyNumber(value=0, threshold=1)
self.assertEqual(fuzzyNumber1, 0)
self.assertTrue(fuzzyNumber1 < 1)
self.assertFalse(fuzzyNumber1 < -0.000001)
self.assertFalse(fuzzyNumber1 < 0)
fuzzyNumber2 = FuzzyNumber(value=0.999999, threshold=1)
self.assertEqual(
repr(sorted([fuzzyNumber1, fuzzyNumber2])),
"[[0.000000 1.000000], [0.999999 1.000000]]"
)
self.assertFalse(fuzzyNumber1 < fuzzyNumber2)
fuzzyNumber2 = FuzzyNumber(value=1, threshold=1)
self.assertEqual(
repr(sorted([fuzzyNumber1, fuzzyNumber2])),
"[[0.000000 1.000000], [1.000000 1.000000]]"
)
self.assertTrue(fuzzyNumber1 < fuzzyNumber2)
fuzzyNumber2 = FuzzyNumber(value=-0.999999, threshold=1)
self.assertEqual(
repr(sorted([fuzzyNumber1, fuzzyNumber2])),
"[[0.000000 1.000000], [-0.999999 1.000000]]"
)
self.assertFalse(fuzzyNumber1 > fuzzyNumber2)
fuzzyNumber2 = FuzzyNumber(value=-1, threshold=1)
self.assertEqual(
repr(sorted([fuzzyNumber1, fuzzyNumber2])),
"[[-1.000000 1.000000], [0.000000 1.000000]]"
)
self.assertTrue(fuzzyNumber1 > fuzzyNumber2)
# equal
self.assertEqual(fuzzyNumber1, fuzzyNumber1)
self.assertNotEqual(fuzzyNumber1, fuzzyNumber2)
# complex sorting
fuzzyNumber2 = FuzzyNumber(value=0.999999, threshold=1)
self.assertEqual(
repr(sorted([(fuzzyNumber1, 20), (fuzzyNumber2, 10)])),
"[([0.999999 1.000000], 10), ([0.000000 1.000000], 20)]"
)
if __name__ == "__main__":
unittest.main()
|
//
// Copyright yutopp 2013 - .
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef RILL_TYPE_ATTRIBUTE_HPP
#define RILL_TYPE_ATTRIBUTE_HPP
#include <bitset>
#include <iostream>
namespace rill
{
namespace attribute
{
enum class holder_kind
{
k_suggest,
k_val,
k_ref,
last
};
enum class modifiability_kind
{
k_mutable,
k_const,
k_immutable,
k_none,
last
};
// ---------------------------------------|
// | k_auto |
// ---------------------------------------|
// | k_managed | k_full_managed | | |
// | k_static | | | |
// ---------------------------------| | |
// | k_scoped | k_partial_managed | | <- default
// ------------------------------------| |
// | k_unmanaged | k_unmanaged |
// ---------------------------------------|
enum class lifetime_kind
{
k_managed,
k_static,
k_unmanaged,
k_scoped,
k_full_managed,
k_partial_managed,
k_none,
last
};
struct type_attributes
{
attribute::holder_kind quality; // TODO: rename
attribute::modifiability_kind modifiability;
attribute::lifetime_kind lifetime;
};
inline auto operator==( type_attributes const& lhs, type_attributes const& rhs )
-> bool
{
return lhs.quality == rhs.quality
&& lhs.modifiability == rhs.modifiability
&& lhs.lifetime == rhs.lifetime;
}
inline auto operator<<( std::ostream& os, holder_kind const& k )
-> std::ostream&
{
switch( k ) {
case holder_kind::k_suggest:
os << "suggest";
break;
case holder_kind::k_val:
os << "val";
break;
case holder_kind::k_ref:
os << "ref";
break;
default:
assert( false );
}
return os;
}
inline auto operator<<( std::ostream& os, modifiability_kind const& k )
-> std::ostream&
{
switch( k ) {
case modifiability_kind::k_none:
os << "none";
break;
case modifiability_kind::k_mutable:
os << "mutable";
break;
case modifiability_kind::k_const:
os << "const";
break;
case modifiability_kind::k_immutable:
os << "immutable";
break;
default:
assert( false );
}
return os;
}
inline auto operator<<( std::ostream& os, lifetime_kind const& k )
-> std::ostream&
{
switch( k ) {
case lifetime_kind::k_scoped:
os << "scoped";
break;
case lifetime_kind::k_managed:
os << "managed";
break;
case lifetime_kind::k_unmanaged:
os << "unmagaged";
break;
case lifetime_kind::k_static:
os << "static";
break;
default:
assert( false );
}
return os;
}
inline auto operator<<( std::ostream& os, type_attributes const& attr )
-> std::ostream&
{
os << "type_attributes_bit" << std::endl
<< " q: " << attr.quality << std::endl
<< " m: " << attr.modifiability << std::endl
<< " l: " << attr.lifetime << std::endl;
return os;
}
namespace detail
{
template<typename E>
constexpr std::size_t min_bitwidth( E const& e )
{
std::size_t i = 1, t = 1;
std::size_t n = static_cast<std::size_t>( e );
while( n > i ) {
i *= 2;
++t;
}
return t;
}
}
constexpr auto attributes_width_max
= detail::min_bitwidth( holder_kind::last )
+ detail::min_bitwidth( modifiability_kind::last )
+ detail::min_bitwidth( lifetime_kind::last );
typedef std::bitset<attributes_width_max> attributes_bit_t;
namespace detail
{
auto inline make_type_attributes_bit( type_attributes const& attr )
-> attributes_bit_t
{
using ull = unsigned long long;
ull bits = 0;
std::size_t offset = 0;
bits |= static_cast<ull>( attr.quality ) << offset;
offset += detail::min_bitwidth( holder_kind::last );
bits |= static_cast<ull>( attr.modifiability ) << offset;
offset += detail::min_bitwidth( modifiability_kind::last );
bits |= static_cast<ull>( attr.lifetime ) << offset;
offset += detail::min_bitwidth( lifetime_kind::last );
rill_dout << attr
<< " bits: " << attributes_bit_t( bits ).to_string() << std::endl;;
return attributes_bit_t( bits );
}
} // namespace detail
namespace detail
{
inline void set_type_attribute(
type_attributes& attr,
holder_kind const& k
)
{
attr.quality = k;
}
inline void set_type_attribute(
type_attributes& attr,
modifiability_kind const& k
)
{
attr.modifiability = k;
}
inline void set_type_attribute(
type_attributes& attr,
lifetime_kind const& k
)
{
attr.lifetime = k;
}
template<typename T>
void set(
type_attributes& attr,
T const& arg
)
{
set_type_attribute( attr, arg );
}
template<typename T, typename... Args>
void set(
type_attributes& attr,
T const& arg,
Args const&... args
)
{
set_type_attribute( attr, arg );
set( attr, args... );
}
} // namespace detail
inline auto operator+=(
type_attributes& a,
type_attributes const& b
)
-> type_attributes&
{
detail::set(
a,
b.quality,
b.modifiability
);
return a;
}
inline auto operator+(
type_attributes a, // copy
type_attributes const& b
)
-> type_attributes
{
a += b;
return a;
}
namespace detail
{
inline void unset_type_attribute(
type_attributes& attr,
holder_kind const& k
)
{
if ( k != holder_kind::k_suggest ) {
attr.quality = holder_kind::k_suggest;
}
}
inline void unset_type_attribute(
type_attributes& attr,
modifiability_kind const& k
)
{
// modifiability can NOT be none
if ( k != modifiability_kind::k_none ) {
attr.modifiability = k;
}
}
template<typename T>
void unset(
type_attributes& attr,
T const& arg
)
{
unset_type_attribute( attr, arg );
}
template<typename T, typename... Args>
void unset(
type_attributes& attr,
T const& arg,
Args const&... args
)
{
unset_type_attribute( attr, arg );
unset( attr, args... );
}
} // namespace detail
inline auto operator-=(
type_attributes& a,
type_attributes const& b
)
-> type_attributes&
{
detail::unset(
a,
b.quality,
b.modifiability
);
return a;
}
inline auto operator-(
type_attributes a, // copy
type_attributes const& b
)
-> type_attributes
{
a -= b;
return a;
}
namespace detail
{
inline void overlap_empty(
attribute::type_attributes& attr,
attribute::holder_kind const& k
)
{
if ( attr.quality == holder_kind::k_suggest ) {
attr.quality = k;
}
}
inline void overlap_empty(
attribute::type_attributes& attr,
attribute::modifiability_kind const& k
)
{
if ( attr.modifiability == attribute::modifiability_kind::k_none ) {
attr.modifiability = k;
}
}
inline void overlap_empty(
attribute::type_attributes& attr,
attribute::lifetime_kind const& k
)
{
if ( attr.lifetime == attribute::lifetime_kind::k_none ) {
attr.lifetime = k;
}
}
template<typename T>
void set_overlap_empty_by(
attribute::type_attributes& attr,
T const& arg
)
{
overlap_empty( attr, arg );
}
template<typename T, typename... Args>
void set_overlap_empty_by(
attribute::type_attributes& attr,
T const& arg,
Args const&... args
)
{
overlap_empty( attr, arg );
set_overlap_empty_by( attr, args... );
}
} // namespace detail
inline auto overlap_empty_attr(
attribute::type_attributes a, // copy
attribute::type_attributes const& b
)
-> attribute::type_attributes
{
detail::set_overlap_empty_by(
a,
b.quality,
b.modifiability
);
return a;
}
namespace detail
{
inline auto overwrite_by_nonempty(
type_attributes& attr,
holder_kind const& k
) -> type_attributes&
{
if ( k != holder_kind::k_suggest ) {
attr.quality = k;
}
return attr;
}
inline auto overwrite_by_nonempty(
type_attributes& attr,
modifiability_kind const& k
) -> type_attributes&
{
if ( k != modifiability_kind::k_none ) {
attr.modifiability = k;
}
return attr;
}
inline auto overwrite_by_nonempty(
type_attributes& attr,
lifetime_kind const& k
) -> type_attributes&
{
if ( k != lifetime_kind::k_none ) {
attr.lifetime = k;
}
return attr;
}
template<typename T>
void set_overwrite_by_nonempty(
attribute::type_attributes& attr,
T const& arg
)
{
overwrite_by_nonempty( attr, arg );
}
template<typename T, typename... Args>
void set_overwrite_by_nonempty(
attribute::type_attributes& attr,
T const& arg,
Args const&... args
)
{
overwrite_by_nonempty( attr, arg );
set_overwrite_by_nonempty( attr, args... );
}
} // namespace detail
inline auto overwrite_by_nonempty_attr(
attribute::type_attributes a, // copy
attribute::type_attributes const& b
)
-> attribute::type_attributes
{
detail::set_overwrite_by_nonempty(
a,
b.quality,
b.modifiability
);
return a;
}
template<typename T>
auto operator<<=( type_attributes& attr, T const& t )
-> type_attributes&
{
detail::set( attr, t );
return attr;
}
auto inline make_default_type_attributes()
-> type_attributes
{
return { holder_kind::k_val, modifiability_kind::k_immutable };
}
auto inline make_empty_type_attributes()
-> type_attributes
{
return { holder_kind::k_suggest, modifiability_kind::k_none };
}
template<typename... Args>
auto inline make_type_attributes( Args const&... args )
-> type_attributes
{
type_attributes attr = make_default_type_attributes();
detail::set( attr, args... );
return attr;
}
auto inline make_default()
-> type_attributes
{
return { holder_kind::k_val, modifiability_kind::k_immutable };
}
auto inline make_value_default()
-> type_attributes
{
return {
holder_kind::k_val,
modifiability_kind::k_none
};
}
template<typename... Args>
auto inline make( Args const&... args )
-> type_attributes
{
type_attributes attr = make_empty_type_attributes();
detail::set( attr, args... );
return attr;
}
} // namespace attribute
} // namespace rill
#endif /*RILL_TYPE_ATTRIBUTE_HPP*/
|
Indolent neuroendocrine tumor involving the bone marrow. A case report with a 9-year follow-up. We report a unique case of a patient with a neuroendocrine tumor localized to the bone marrow. The patient had a history of hairy cell leukemia, and the neuroendocrine tumor was detected in a bone marrow biopsy specimen obtained to assess response to 2-chlorodeoxyadenosine therapy. The neuroendocrine tumor was present as nodules that replaced approximately 15% of the bone marrow medullary space and was composed of round cells with fine chromatin, indistinct nucleoli, and relatively abundant, granular, eosinophilic cytoplasm. Histochemical stains showed cytoplasmic reactivity with Grimelius and Fontana-Masson stains, and immunohistochemical studies showed positivity for keratin and chromogranin. The histologic, cytochemical, and immunohistochemical features resembled a carcinoid tumor, and metastasis to the bone marrow was considered initially. The patient was asymptomatic without diarrhea, flushing, or cardiac valve disease. Serotonin production, assessed by the measurement of serum 5-hydroxyindoleacetic acid and substance P levels, was normal. Extensive clinical and radiologic work-up and endoscopy of the gastrointestinal tract to detect a primary site other than the bone marrow were negative. Follow-up bone marrow biopsy 7 years after the initial diagnosis was positive for persistent neuroendocrine tumor. The patient has not received any therapy specific for the neuroendocrine tumor and has had no clinical symptoms or evidence of progression after 9 years of clinical follow-up. We suggest that this neuroendocrine tumor may have arisen in the bone marrow. |
// Code generated by goderive DO NOT EDIT.
package package1
// deriveEqual returns whether this and that are equal.
func deriveEqual(this, that *Type1) bool {
return (this == nil && that == nil) ||
this != nil && that != nil &&
((this.StringPtr == nil && that.StringPtr == nil) || (this.StringPtr != nil && that.StringPtr != nil && *(this.StringPtr) == *(that.StringPtr)))
}
|
The role of counterions on the elasticity of highly charged lamellar phases: a small-angle x-ray and neutron-scattering determination. The structure and fluctuations of the swollen L(alpha) lamellar phase of highly charged surfactant didodecyldimethylammonium halide fluid bilayers (DDA+X-) are studied using high-resolution small-angle x-ray scattering and medium-resolution, high-contrast small-angle neutron-scattering. The Caille parameter eta, as a function of the swelling (L(alpha) periodicity d), was determined from the full q-range fits of the measured scattering profiles for three different counterions (X- = Cl-, Br-, and NO3-). This parameter quantifies the amplitude of the membrane fluctuations within the Landau-de Gennes smectic-A linear elasticity theory. The different anions used gave strong specific effects at the maximum swelling of the L(alpha) phase, while at lower swellings a two-phase coexistence of swollen and collapsed lamellae (d approximately 30 and approximately 80 angstroms) was observed for bromide and nitrate ions. Over the intermediate dilution range for all three counterions, a single L(alpha) phase can be continuously swollen with pure water which is governed by an equation of state (i.e., osmotic pressure versus period) and thermally excited fluctuation amplitudes that can be well described by the same Poisson-Boltzmann calculation. The membranes were found to be slightly stiffer than predicted by purely electrostatic repulsions, and this is tentatively attributed to an extra bending rigidity contribution from the surfactant chains. |
<filename>LLDataStructures/LLDataStructures/DoubleLink/LLDoubleLinkNode.c
//
// LLDoubleLinkNode.c
// LLDataStructures
//
// Created by 奥卡姆 on 2017/12/30.
// Copyright © 2017年 liushaohua. All rights reserved.
//
#include "LLDoubleLinkNode.h"
#include <stdlib.h>
void * initDoubleLinkNode(){
LLDulNode *p = malloc(sizeof(LLDulNode));
p->data = 0;
p->prior = p;
p->next = p;
return p;
}
|
An Overview of Recent Standard and Accelerated Molecular Dynamics Simulations of Helium Behavior in Tungsten One of the most critical challenges for the successful adoption of nuclear fusion power corresponds to plasma-facing materials. Due to its favorable properties in this context (low sputtering yield, high thermal conductivity, high melting point, among others), tungsten is a leading candidate material. Nevertheless, tungsten is affected by the plasma and fusion byproducts. Irradiation by helium nuclei, in particular, strongly modifies the surface structure by a synergy of processes, whose origin is the nucleation and growth of helium bubbles. In this review, we present recent advances in the understanding of helium effects in tungsten from a simulational approach based on accelerated molecular dynamics, which emphasizes the use of realistic parameters, as are expected in experimental and operational fusion power conditions. Introduction Conditions expected in the divertor of the world's largest tokamak under construction, ITER ("The Way" in Latin, formerly known as International Thermonuclear Experimental Reactor), include the low-energy (≤100 eV) helium nuclei impact on a high-temperature tungsten surface (∼1000 K). No tungsten defects are created upon impact because the maximum energy transferable from the collision is significantly below the tungsten displacement threshold. The helium atoms diffuse in the tungsten matrix, eventually forming helium clusters with lower diffusion rates. At a critical size, a helium cluster converts into a practically immobile (under Molecular Dynamics (MD) time scales) entity, composed of the helium cluster and a tungsten Frenkel pair. This helium (nano-)bubble is able to collect additional helium clusters, triggering the nucleation of additional Frenkel pairs. As a result, the bubble grows and the tungsten interstitials form a dislocation line pinned to the bubble, which eventually detaches as a loop, effectively displacing tungsten atoms in the matrix. Recent simulation results, which are the focus of the present review, have shown that the process of the nucleation and growth of He bubbles in W exhibits extremely rich dynamics, involving competing mechanisms defined in an ample interval of time scales, which should be studied by considering advanced atomistic techniques beyond the standard MD approach. In doing so, we mostly focus on work from our own group where so-called Accelerated MD (AMD) techniques have been applied to the problem. This manuscript is therefore not meant to be an exhaustive review of the vast literature in the field, but to summarize our research effort over the last few years. First of all, we briefly review in Section 2 some results concerning the reflection and implantation of He atoms in W, which give information about the initial distribution of diffusing He atoms as a function of the impact energy, angle of incidence, surface orientation and temperature. In Section 3, the kinetics of He clusters is considered, with particular attention on the mobility of small clusters and the phenomenon of trap-mutation, as well as the mobility of small vacancy/helium complexes. The nucleation and growth of He bubbles in W is the focus of Section 4. In Section 5, we present some results from recent studies on the interaction between He clusters and He bubbles. Interaction between He bubbles and defects, specifically grain boundaries, is reviewed in Section 6. Finally, in Section 7, we discuss the advantages of the AMD techniques, as compared to standard MD, which have allowed us to gain fundamental insight into the nucleation and growth of helium bubbles in tungsten. Reflection and Implantation of He Atoms For the sake of completeness, we first discuss the reflection and implantation processes of He atoms in W. In a fusion reactor, the plasma irradiation flux is composed of deuterium, tritium, and helium. Contrary to the other two species, which may form a deposited layer, incoming He atoms are either reflected upon impact or implanted below the W surface. As a first approach to the implantation problem, we can ignore the interaction with deuterium and tritium, in order to focus on the behavior of He atoms. Borovikov et al. studied this topic via MD simulations, significantly extending the scope of previous computational efforts by considering the effect of temperature in the substrate (300 K, 1000 K, and 1500 K), incidence energy E i (≤100 eV), deposition angles i (0-75 ), and substrate surface orientation (,, and ). The interaction between W atoms was determined by an Ackland-Thetford potential, modified at short distances by Juslin and Wirth. He-W interactions were obtained from Juslin and Wirth, while the He-He potential corresponded to the one used by Beck modified at short distances by Morishita et al.. Incidentally, these potentials were also used to obtain all results discussed in the following sections. For each set of parameters considered, 1000 non-accumulative He impact simulations were performed, generating the statistics. The main focus was the determination of the reflection coefficient R (ratio of reflected He atoms to the total number of impacting He atoms), the energy reflection coefficient R E (ratio of the kinetic energy of the reflected He atom to the incident kinetic energy of the He atom), and the average projected range L (implantation depth normal to the surface) for the implanted He atoms. Given a substrate temperature and orientation and a deposition angle i ≤ 75, Borovikov et al. showed that an increase of impact energy (E i > 10 eV), in general, implies a decrease of R and R E and an increase of L. For i = 75, all the atoms were reflected. Low impact energies (E i ≤ 10 eV), even for small deposition angles, resulted in a reflection coefficient equal to one. They also observed that the dependence of particle/energy reflection coefficients with the incidence angle was non-monotonic, with a minimum at specific angles (e.g., i ∼ 30-45 for a surface orientation of ), a behavior attributed to channeling effects. At low temperatures (∼300 K), L increases substantially at i = 0 due to the high probability of channeling events. If channeling is absent, the implantation depth distributions can be well described by a Gaussian distribution, which, at low impact energies, is truncated at the surface, as shown in Figure 1. More recent works have extended these results by considering additional surface orientations, the effects of pre-existing bubbles in W surfaces, and curvature effects in W nanoparticles. (Color online) He-implantation depth distribution for a (low) impact energy E i = 80 eV, at a deposition angle i = 0, on a W surface equilibrated at 1000 K. A fit to a Gaussian distribution truncated at the surface is also shown. Taken from Borovikov et al.. Kinetics of He Clusters Once individual He atoms are implanted into the W matrix, their evolution is dictated by diffusion and clustering. In this section, we highlight some recent results concerning the evolution of interstitial He. Mobility of Small He Clusters and Trap Mutation As a He atom diffuses through the lattice, it either encounters traps (point defects, dislocations, etc.) or other He atoms. Clustering is favored because of the binding between He atoms generated by the elastic interactions caused by the repulsion between the metal atoms and He. At a certain size, a growing He cluster can force the emission of W interstitials (crowdions), nucleating vacancies (V) that accommodate the He cluster. This process is known as trap mutation or self-trapping. Using conventional MD, Temperature-Accelerated Dynamics (TAD), Statistical Temperature (STMD), and multicanonical MD, Perez et al. determined important thermodynamic and kinetic parameters describing the diffusion and transformation of small He clusters in W. They specifically investigated the behavior of He N clusters with N ranging from 2-7 He atoms, in an interval of temperatures relevant to nuclear fusion applications centered around 1000 K. In order to find the most important low-temperature diffusion pathways, Perez et al. performed TAD with low and high target temperatures of 300 K and 600 K, respectively. For a given cluster with size N, their simulations started with the lowest energy structure found for the cluster with size N − 1 plus one additional He interstitial. Once the two species encountered one another, forming a He cluster with size N, its diffusion was simulated. For each cluster, the lowest energy diffusion pathway, as well as the lowest energy structure was identified. With the exception of the case corresponding to N = 5, the ground state structure for all the clusters was found to be composed of He atoms located in tetrahedral interstices. For N = 5, the fifth He atom occupies an octahedral interstice; note that there are 24 tetrahedral and 18 octahedral positions within the BCC unit cell. As shown in Figure 2, the strength of the binding of the He cluster increases with the cluster size. If we consider the change of energy after removing a He atom from the clusters, the case N = 5 corresponds to a local maximum. Density Functional Theory (DFT) calculations show a similar behavior, but with higher values, approximately 30%, as compared to the classical potential used in this work. Using STMD and multicanonical simulations, Perez et al. obtained finite-temperature effects on the stability of the clusters, specifically the canonical distributions of cluster compositions for all temperatures, which allowed determining the probabilities p Q (T) of finding certain cluster compositions Q. As an example, the case corresponding to N = 4 is shown in Figure 3. For temperatures T ≤ 2500 K, the most notable cluster configuration is a cluster containing all four He atoms. With significant probability, single He atoms start to be observed at temperatures above 1500 K. On the other hand, the equilibrium probability of single He atoms becomes vanishingly small at low temperatures. Furthermore, using free energy data, Perez et al. showed that the temperature at which He atoms separate from the clusters, or at which clusters are completely fragmented, grows with N, in accordance with the results obtained at T = 0 K. Figure 3 also provides a picture of the most probable dissociation scenario as a function of temperature. For instance, approximately between 1500 K and 2700 K, the four-atom cluster most likely transforms to a three-atom cluster plus a dissociated He atom, although the additional dissociation of He atoms starts to be more significant above 2000 K, probably involving intermediate steps. Additional insight is gained when we consider the volume-independent free energy of the clusters, which provides transition points for a given transformation. Available transition pathways are characterized via the Nudged Elastic Band (NEB) method, which is an inherent step in TAD. This analysis was performed by Perez et al. for He cluster sizes ranging from N = 1-N = 6. For instance, for N = 1, the diffusion pathway goes from a tetrahedral interstice (lowest energy), through an octahedral interstice (saddle point), to another tetrahedral interstice position. The corresponding energy barrier was 0.15 eV. Note that this value is almost one order of magnitude higher than the one obtained via ab initio calculations, a result attributed to the limitations of the interatomic potential. The diffusion pathways become more complex (additional intermediate minima) as the He cluster size increases. As an example, Figure 4 shows the lowest energy migration pathway for N = 4. The corresponding migration energy as a function of cluster size is presented in Figure 5. Coinciding with the unusual structure of the clusters highlighted previously, the cluster with N = 5 He atoms exhibits a very low diffusion barrier, indicating that its mobility is significantly higher. The diffusivity of the different clusters, as a function of temperature, was obtained from the time-dependent Mean Squared Displacement (MSD) via a linear fit. As an example, in Figure 6, we show the results corresponding to N = 4 (similar behavior is seen for N = 1, 6). For the cluster sizes considered in this study, the main result was the departure from a standard Arrhenius behavior. Additional insight is gained by considering what Perez et al. termed Superbasin Harmonic Transition State Theory (SB-HTST), from which a generalized Arrhenius expression is obtained with an activation energy that becomes a function of temperature. In very good agreement with the MD results, SB-HTST predicts the downward bending of the slope of the Arrhenius curve as the temperature rises, due to the increase in the sampling frequency of higher-lying energy basins. On the other hand, even if the formation of He clusters is energetically favorable, configurational entropy effects favor isolated He atoms at low concentrations and high temperatures, which motivates the consideration of breakup reactions. After a careful definition of bound and unbound radii, Perez et al. directly determined the breakup rate of He clusters in a range of temperatures between 1000 K and 1500 K using MD. Their results indicated a fast decrease of the breakup rate (and an increase of activation barriers) as the He cluster size increases, which is shown in Figure 7, in agreement with the fact that the binding energy per He atom increases with the cluster size. Concerning the trap mutation process, Perez et al. also obtained the mutation rates as a function of temperature, which are shown in Figure 8. The mutation rate increases sharply with size, with a clear Arrhenius behavior over the range of temperatures considered. Other MD calculations also exhibit an Arrhenius behavior, although the values reported for the characteristic times were approximately two orders of magnitude higher. As expected, the larger the cluster, the higher the mutation rate. Further compounding this effect is the fact that mutation is reversible at smaller N, i.e., that the W vacancy and W interstitial can recombine, restoring the He atoms to interstitial positions. The results presented in this section provide a comprehensive characterization of the kinetics of small interstitial He clusters in bulk W. The behavior close to surfaces has been also studied via MD simulations and DFT calculations. This detailed analysis of He cluster diffusion, breakup, and mutation into He bubbles can feed, e.g., cluster dynamics or kinetic Monte Carlo models able to describe the performance of W at the mesoscale. As an example, by recording the cluster pressure and using an object kinetic Monte Carlo code, Valles et al. showed that the elastic strain energy in the interior of the grains of nanocrystalline W was significantly lower than the one calculated for monocrystalline W, indicating that nanocrystalline W has a better mechanical response under He irradiation. Mobility of Small Vacancy/Helium Complexes A further step in understanding the He damage in W is the study of the kinetics of small vacancy/helium (V N He M ) complexes. After implantation, He atoms diffuse and form clusters, as discussed in the previous section. Eventually, these He clusters are capable of self-trapping via the nucleation of a Frenkel pair (W interstitial/vacancy recombination is prevented by He atoms filling the vacancy) or of binding to preexisting W vacancies. Perez et al. performed AMD simulations via the Parallel trajectory Splicing (ParSplice) method to study the motion of the complexes involving one or two W vacancies, characterizing their diffusivity. A first striking observation is the effect of a single He atom on the mobility of W vacancies. Perez et al. found that adding a He atom to a single W vacancy (N = 1) causes the diffusivity to change by at least four orders of magnitude, from ∼10 −12 m 2 /s to a value below ∼10 −16 m 2 /s (with 90% confidence). Note that previous DFT calculations provided explicit values for the change in migration energy (from 1.81 eV-4.83 eV), which explains the immobilization of the V 1 He 1 complex on ms timescales. Similar values were obtained for two and three He atoms, as shown in Figure 9. A di-vacancy (N = 2), on the other hand, is weakly bounded. Over long times, the dimer breaks apart. In this case, the single He atom immobilizes just one vacancy. However, over longer time scales, the dimer may reform, eventually allowing the He atom to jump to the other vacancy. An additional He atom, as seen in Figure 9, immobilizes the dimer over tens of s time scales. An increase of the M-to-N ratio leads to He bubble growth via Frenkel pair nucleation. Perez et al. highlighted that the Frenkel pair nucleation process is reversible. Using ParSplice simulations, Perez et al. found that the rates at which nucleation and annihilation (untrapping) occur are quite sensitive to He content: as M increases, the nucleation rate increases, while the annihilation rate decreases, as He pressure favors nucleation, but counteracts annihilation. Similar results for He in Fe have been obtained by Gao et al. also using an AMD approach. Annihilation is not restricted to the reverse process of the last nucleation event, but instead, many variants are possible due to the diffusion of W interstitial around the vacancies. Sequences of such nucleation/interstitial migration/annihilation events give rise to net migration of the cluster. Figure 10 shows that the diffusivity of complexes depends sensitively on the He content, through the dependence of the nucleation and annihilation rates. In order to evaluate the importance of considering the mobility of such complexes, Perez et al. performed mesoscale cluster dynamics simulations using the Xolotl model of microstructural evolution. Figure 11 shows the overall retention of He atoms within the W wall when the diffusion of He/vacancy complexes is either allowed or forbidden. The results clearly showed that the mobility of these complexes provides an efficient outgassing pathway for He. These results also demonstrate that incorrect conclusions can be reached from standard MD simulations, as their limited time-scale restricts the set of events that can be observed. Surface effects on the stability of helium-vacancy complexes, on the other hand, have been recently studied via DFT calculations. Nucleation and Growth of He Bubbles In this section, we focus on the growth of He bubbles after self-trapping, whereby additional He atoms are captured by helium/vacancy complexes, driving the nucleation of additional Frenkel pairs and the formation of dislocation lines around the bubbles. Sandoval et al. studied the growth of isolated He bubbles using AMD simulations in order to isolate the effect of the growth rate on the microstructural evolution. Starting with a W vacancy filled with eight He atoms, located 1.9 nm below the surface of the material, Sandoval et al. carefully inserted He atoms at constant time intervals (the diffusion process of He atoms and their capture by the bubble were not explicitly considered). The growth rates spanned six orders of magnitude, from 10 12 -2 10 6 He s −1, which can be associated with He fluxes in the range of 10 30 -10 24 He m −2 s −1, the last one being on the order of magnitude of fluxes expected at ITER. Successive incorporation of He atoms in a bubble increases its pressure, which is the driving force for nucleation of Frenkel pairs, as has been shown by standard MD simulations. The nucleation of Frenkel pairs increases the bubble size and partially releases the pressure in the bubble. Prismatic 111 dislocation loops, formed by the aggregation of W interstitials, are emitted from the bubble. Sandoval et al. observed clear kinetic differences as a function of the growth rate. For instance, the first detected event (the nucleation of a Frenkel pair) required fewer He atoms at slower growth rates, as shown in Figure 12a. After nucleation of a Frenkel pair, the new W vacancy increases the bubble volume, while the W interstitial becomes a 111 crowdion tangent to the bubble. If the growth rate is slow enough, the crowdion is able to move around the bubble. Simulations show that subsequent interstitial emissions (driven by the constant addition of He) are most likely to occur in the neighborhood of interstitials already decorating the bubble, hence forming an incipient 111 dislocation line. For shallow bubbles, these dislocations elastically interact with the W surface, which drives their motion to the side of the bubble closer to the surface. This in turn favors subsequent interstitial emission from the surface-facing side of the bubble, which causes a preferential growth towards the surface. The dislocation arc eventually detaches from the bubble forming a 111 dislocation loop, which glides to the surface displacing W atoms and increasing the surface roughness. Note that, in general, as the growth rate is lowered, the probability of nucleating a new Frenkel pair before the next insertion increases, leading to lower pressure because of smaller helium/vacancy ratios, as seen in Figure 12b. This allows the definition of slow and fast growth regimes based on the speed at which W interstitials (crowdions) can diffuse around the bubble. At fast growth rates, typical of the ones commonly used in standard MD simulations, the emission of W interstitials is fast compared to their diffusion around the bubble. Therefore, dislocation lines grow where they are first nucleated, generating a more isotropic growth, delaying the bursting point as compared to the slow growth regime where emitted interstitials have time to diffuse around the bubble, facilitating the interaction with the surface and leading to a more directional growth process. The growth of deeper and bigger He bubbles was studied by Sandoval et al., following the approach described previously, where MD and AMD simulations were performed to explore the role of the growth rate, whose values spanned six orders of magnitude (10 6 -10 12 H s −1 ). In this case, the bubble was created 6 nm below the surfaces. As observed in Sandoval et al. for shallow bubbles, fast growth rates lead to higher pressures than slow growth rates. Between successive insertions, at slow growth rates, the system is able to explore its phase-space more thoroughly, eventually activating relaxation mechanisms such as the nucleation of Frenkel pairs, which allows for the release of the pressure. In addition, a remarkable difference is observed between simulations with different growth rates, corresponding to the number of coexisting dislocation lines attached to the bubble. As is shown in Figure 13, multiple dislocations were observed at fast growth rates, in contrast to only one at slower rates. This was again attributed to the insufficient time for the interstitials to reorganize around the bubble when the interstitial emission rate was fast compared to their diffusion rate. Figure 13. (Color online) Representative snapshots highlighting the dislocation loops attached to a growing He bubble for (a) fast and (b) slow growth rates. Dark and light spheres correspond to W vacancies and W interstitials, respectively. The detection of point defects is performed by the Wigner-Seitz defect analysis tool implemented in OVITO. Taken from Sandoval et al.. Using a Parallel Replica Dynamics (ParRep) simulation, Sandoval et al. showed that the nature of the dislocation structure around a growing bubble strongly depends on the growth rate. Specifically, they took, as the initial ParRep configuration, a dislocation structure composed of many arcs obtained from an MD simulation of a bubble growing at a fast rate. The entangled dislocation lines evolved to a single dislocation via a reorganization of W interstitials, which was then released from the bubble as a single loop. Recent works have advanced this knowledge by studying the loop-punching mechanism for large bubbles at low temperatures (300 K), the energetics and kinetics of He bubble growth for insertion rates in the fast growth regime (∼30 ps between He insertions), the lifetimes of non-growing He bubbles close to W surfaces, and the effect of strain fields. MD and AMD results describing the bubble bursting process have also been incorporated into the cluster dynamics model Xolotl. Including the diffusion process of He clusters to study the growth process of He bubbles adds interesting aspects to the simulation results, as shown by Sandoval et al.. He monomers and dimers were introduced in a simulation box thermalized at different temperatures in the range K. After nucleation of an initial He bubble and a W interstitial (crowdion) via self-trapping, incoming He clusters were allowed to diffuse freely and interact with them. The simulations showed that incoming He atoms strongly interact with the crowdion structure developed around a bubble, either impeding their incorporation into the bubble or even trapping them. If an He atom remains trapped in the crowdion structure for a sufficiently long time, it can eventually be joined by a newly-inserted He atom, forming a dimer. Sandoval et al. also showed that the interaction with a He dimer is stronger, as compared to single He atoms. The simulations revealed that if the He-dimer, already trapped in the crowdion structure, captured two additional He atoms, the nucleation of a new He bubble via self-trapping was highly probable. Subsequently, as new bubbles grow, more crowdions are generated, which, in turn, can capture additional He atoms. A network of He (nano-)bubbles is formed, which is strongly dependent on the temperature, as shown in Figure 14. High temperatures reduce the probability that He atoms would remain trapped by the crowdions long enough to facilitate the nucleation of new He bubbles. Furthermore, at low He fluxes the trapped clusters would likely have time to de-trap from the crowdion structures, which affects the formation of the network. Interaction between He-Clusters and He-Bubbles Now, we extend the observations considered in the previous section to include the interaction between pre-existing bubbles and He clusters. Perez et al. characterized the thermodynamics and kinetics of these interactions, showing that, in addition to attracting clusters, He bubbles also enhance the probability of trap-mutation in their neighborhood. In Figure 15a we show the simulation setup used by Perez et al.. In a cubic simulation box containing 16,000 W atoms, a rhombic dodecahedral bubble with facets was constructed by creating a void of 175 W vacancies, which was subsequently filled with 481 He atoms (in the original paper, the bubble geometry used was incorrectly described). The system was equilibrated at a temperature of T = 1000 K. Previous MD simulations indicated that the internal pressure was 26 GPa, a typical value for a growing bubble that has just released a dislocation loop. In addition to the large bubble, individual He N (N = 1-6) clusters are introduced in the simulation cell. Using a direct histogram method, Perez et al. obtained the free energy of He clusters at different positions around the bubble. The free energy gradually decreases at short range, as seen in Figure 15b, while the elastic interaction becomes stronger as the He cluster size increases. The capture distance goes from ∼18 for N = 1-∼22 for N = 6. Furthermore, the He cluster-bubble interaction presents a notable angular dependence because of the elastic anisotropy. He clusters are channeled along directions, as approaches along directions are strongly disfavored. Although the incorporation of He clusters into existing bubbles is thermodynamically favored, there also are mechanisms that might obstruct the bubble growth. One of them is trap-mutation, where the cluster becomes a satellite nanobubble. Perez et al. computed the trap mutation rates for He N clusters as a function of the position around the bubble. Their results clearly showed an enhancement of the trap mutation rate for distances going from 8 to 25. Figure 15c shows the case corresponding to N = 5, where the asymptotic behavior to bulk values at long distances is clear, while at short distance, the trap-mutation rate increases by almost three orders of magnitude. Much like the interaction with the dislocations above, strains due to the surrounding microstructure can enhance the probability of self-trapping. Using AMD simulations, Perez et al. determined the role of the satellite nanobubbles in the bubble growth process. One interaction mechanism observed corresponds to the annihilation of the satellites, for N = 1 or 2 and short distances, by means of a W interstitial emitted by the bubble via a Frenkel pair nucleation. The nanobubble becomes a mobile interstitial cluster again, which is easily absorbed by the bubble. At longer distances, the annihilation of W vacancies in satellite bubbles can be activated when 111 dislocation loops emitted by the bubble impinge upon the nanobubble; this mechanism is more significant for small N. For larger values of N, we observed that transfer of He atoms to the bubble preceded annihilation. In particular, it was observed that, for N ∈, dislocation loops and nanobubbles were transiently bound, which facilitated the transfer of He to the bubble. Interaction between He-Clusters/Bubbles and Defects We have so far considered the nucleation and growth of He bubbles in initially pristine crystal lattices or in lattices with a controlled configuration of vacancies where He atoms have been carefully introduced. All crystal defects (vacancies, interstitials, and dislocations) were generated in the process of nucleation and growth. In this section, we highlight some recent results obtained via AMD simulations, which consider pre-existing defects, in particular Grain Boundaries (GBs). Recently, Liu et al. studied the process of He-bubble nucleation and growth in the neighborhood of a 5 tilt GB. This GB possesses a well-ordered structure, stable at temperatures typical of a fusion environment (1000 K in that work), as shown in Figure 16. Liu et al. used a simulation supercell for ParRep simulations initially containing 39,200 atoms, with periodic boundary conditions applied along the y and z directions. Similar to Sandoval et al., eight He atoms were placed inside a pre-existing vacancy at the center of the GB plane. New He atoms were inserted inside the bubble at a rate of 1 He atom/10 ns, a value that corresponds to the slow growth regime in bulk conditions, close to what is expected at ITER for surface GBs. During growth, W interstitials were emitted within the GB, and some of them escaped away from the nanobubble. As the bubble grew, it was observed that self-interstitial-atom loops were not formed, contrary to the behavior in the bulk, due to the strong binding of W interstitials to the GB plane. Eventually, a halo of W interstitials was formed around the bubble, trapped at the GB, as shown in Figure 17, corresponding to the final snapshot of the ParRep simulation. In a second set of simulations, Liu et al. evaluated the effect of the W interstitial halo on the arrival of a diffusing He atom. Snapshots corresponding to these simulations are shown in Figure 18. It was observed that the W halo attracts the incoming He atom, but prevents it from reaching the bubble, which suggests that the W halo may limit the diffusion of He atoms into the bubble, affecting the bubble growth process. This hypothesis was further supported by directly computing the diffusion barriers for He using climbing-image nudged elastic band calculations. In a last set of ParRep simulations, Liu et al. introduced He atoms randomly into the GB at a rate of one He atom/100 ns. Inserting He atoms directly into the GB plane is supported by the fact that He atoms introduced into bulk W quickly migrate to the GB, as shown by recent simulations, where a sink segregation strength has been defined and calculated for some symmetric tilt grain boundaries, as well as for a few surface orientations. As in the bulk, He atoms migrating in the GB eventually encounter other He atoms, trap-mutating and nucleating bubbles. Again, contrary to the bulk case, interstitials emitted during the bubble growth process cannot escape, as previously described. As a result, for a given population of He atoms, a more evenly-dispersed set of He nanobubbles is expected at a GB, as compared to the bulk. After this saturation stage, new He atoms would arrive directly to the reconstructed GB region, re-initiating the bubble growth process. Further investigation is required to determine the bubble nucleation and growth process in other types of GBs to determine the generality of this bubble growth mode. Discussion The key defining characteristic of the AMD methods is their ability to extend the time scale of atomistic simulations to times further, in some cases much further, than conventional MD, while retaining near-full fidelity with the underlying atomistic interactions. This enables simulations that are simply impossible otherwise, probing behavior that is otherwise opaque. Many of the examples discussed in this overview exemplify this behavior, as we have elucidated atomic-scale mechanisms that would not be found if limited to MD time scales. Just as importantly, other methods for accelerating time scales, such as Adaptive Kinetic Monte Carlo (AKMC), would be challenging, if not impossible, to apply to some of the scenarios discussed here. In ParRep, the definition of a state can be made very generally, and this was particularly valuable when simulating bubbles, where the dynamics of the fast He atoms could be ignored. Methods such as AKMC and, to be clear, TAD, which require explicitly finding saddle points for all events, would not be applicable to systems with such fast moving degrees of freedom. Thus, while those methods are certainly powerful and provided new insight into some of the problems described here, there are limitations in using those methods in simulations involving gas bubbles. For example, in scenarios in which the He gas is still in the W matrix, TAD proved effective at describing the kinetics of the resulting interstitial clusters. These TAD simulations revealed complex behavior versus cluster size that would be difficult to guess a priori. However, once gas bubbles nucleate, methods such as TAD would simply be impossible to apply. Using ParRep, where the states could be defined based on the W subsystem, the types of simulations can be extended significantly. In particular, ParRep enabled long-time simulations of bubbles in multiple environments with varying types of boundary conditions, providing new insight into how bubbles grow. The most important consequence of extending the time scale of these simulations is that new mechanisms start to dominate. In most of the examples discussed here, there are multiple atomic-scale mechanisms with different rates that compete to drive the evolution of the material. If the time scale is not extended, the external drive applied to the system, in this case, the introduction of He, has to be so fast that other processes simply cannot occur on the time scale of the simulation. For example, if He is introduced too fast into a growing bubble, the emitted W interstitials are simply frozen in place, and the bubble grows qualitatively differently than if those interstitials can migrate and interact with the surrounding microstructure. Similarly, if the bubbles are grown more naturally, via the arrival of He from the matrix, the rate of He introduction changes whether the He reaches the central bubbles or not. In the case of the migration of He-V clusters, there is no external drive, but extending the time scale of the simulation allowed for both Frenkel pair formation and, critically, annihilation. If that annihilation had not been observed, neither would the net migration of the cluster. Thus, we see repeatedly that the observed behavior strongly depends on which mechanisms are active over the course of the simulation. It should be noted that AMD methods are not a panacea for all simulations at the atomic scale. There are cases where AMD approaches will not provide any significant benefit over conventional MD. For example, the dynamics of the He within the bubbles cannot be accelerated as their dynamics are simply so fast. In the cases described here, this was not a critical limitation as the W dynamics dictate the system evolution. However, if all of the key behavior was related to the dynamics of the fast moving system, the AMD methods would provide only marginal benefit. As a general rule, what is already fast cannot be significantly accelerated. Another limitation involves the system size. As the system size increases, so does the computational cost. Depending on the nature of the scaling, the AMD methods scale worse than MD, the worst situation being when the overall rate of events increases with system size. Thus, the simulations presented here are limited in how deep the bubbles are below the surface, a direct consequence of the need for larger system sizes and the issue with scaling. There are developments to overcome these limitations, and significant progress has been made; however, this is one of the ongoing challenges in applying these methods. However, in spite of these limitations, the insights gained from these simulations extend our knowledge of how gases behave in metals, not only for fusion-relevant conditions, but more generally. They provide direct atomic-level information about key mechanisms that can be directly used in higher level models and have been shown to significantly change predictions at the meso-scale. In conjunction with conventional MD simulations, atomic scale simulations using AMD methods can provide high fidelity information about the atomistic mechanisms that drive material evolution in harsh conditions where kinetics are all-important. Conclusions We have reviewed some recent results concerning the modeling and simulation of helium effects in tungsten in the context of nuclear fusion power, with special focus on the application of accelerated molecular dynamics methods. We have considered the implantation process of helium atoms in the tungsten matrix, the subsequent diffusion of helium clusters, the process of nucleation and growth of helium bubbles, the interaction between helium clusters and bubbles, and the role of tungsten defects (interstitials, dislocations, and grain boundaries). A manifest outcome of this review corresponds to the importance of taking into account an extended range of time scales in order to include the dominant mechanisms determining the evolution of the surface microstructure in tungsten as a plasma-facing material. |
Flash flooding is a far greater threat to homes, railways and roads than river or coastal floods but is completely excluded from government plans to deal with increased rainfall
Flash flooding, which struck a swathe of southern and eastern England on Friday, is a greater threat to homes, roads and railways than river or coastal flooding. Yet it was completely excluded from the government’s National Flood Resilience Review, published last week.
Worse, the risk of flash flooding is rising, as climate change leads to more intense, more frequent rainstorms: the Met Office has shown that extremely wet days have become more common. On Friday, half a month’s rain was dumped in one day.
The problem is the overloading of Britain’s antiquated drainage and sewer networks, compounded by the continued concreting over of land for development. The surface water can neither be absorbed or quickly drained away, leading to flash floods.
Ministers cannot say they were not warned. Flash flooding was the principal cause of the most damaging floods in UK history, which in 2007 caused over £3bn of damage, caused 13 deaths and was classified by the Environment Agency (EA) as a “national disaster”.
In 2013, new maps from the EA showed 3m properties were at risk from flash flooding in England, compared to 2m from river and coastal flooding. Most insurance claims made each year for flood damage are because of flash floods and there are at least 20,000 sewer overflows a year in the UK.
Risks to transport have also been identified: Network Rail is monitoring 200 “high risk” earthworks – embankments and cuttings vulnerable to washing away. In April the Guardian revealed that 57 tube stations are at high risk of flash flooding, including Manor House which flooded on Friday. The London Underground report said it was “only a matter of time” before serious flooding strikes.
After the 2007 disaster, the Pitt review led to new laws in 2010 to implement the use of sustainable drainage systems, which provide safe areas for water to pond. But the provisions were never implemented and instead a voluntary system asking developers to follow these practices was put in place.
But it has not worked: the government’s official advisers, the Committee on Climate Change (CCC), found that just 15% of planning applications in areas of flood risk incorporate sustainable drainage measures and in 2015 the CCC warned ministers their plans were inadequate. However, in May, the government successfully opposed a plan to make sustainable drainage compulsory, and to make developers increase the capacity of drains to which new homes are connected.
“The National Flood Resilience Review team was told it was a mistake to exclude surface water flooding from consideration on the basis that the last two major flood events had been river flooding,” said Bob Ward, policy director at the Grantham Research Institute on Climate Change and the Environment at the London School of Economics.
“We know our major cities, including London, are vulnerable to surface water problems,” he said. “But the UK remains at risk because the government refuses to confront the problem. The main problem is the inadequacy of the drainage system, which even nine years after the 2007 floods are still not up to the task.”
The EA maps shows that one home in particular is at risk of flash flooding: No 10 Downing Street. Perhaps this might spur prime minister Theresa May to finally take meaningful action. |
Reflecting on Decolonial Queer Abstract:This article aims to accompany the voyages of different theories by seeking to delineate the principal outlines of the encounter between queer theory and decolonial thinking. In a preliminary way, with no pretensions of reaching definitive answers, it formulates questions such as: Could this encounter between decolonial thinking and queer theory produce something else that might be thought of as "decolonial queer" (as enunciated in this article's title)? Or are these theories incompatible, given that the term queer, rendered in English, signals the very sort of geopolitics that decolonial thinking attempts to counter? Is there any commonality between these proposals? What is the potential of this encounter, and what might it produce? And what sorts of movements would a queer decolonial reading design? |
The short-snouted seahorse may now be resident in the River Thames. ©ZSL
The River Thames runs 215 miles, from Gloucestershire through London to the North Sea, and it hasn’t always been much of a source of English pride. In the 19th century it was known as the “Great Stink,” and Charles Dickens called it a “polluted stream” in David Copperfield (1850). By the late 1950s, after World War II bombings had destroyed much of London’s Victorian sewage system, it was declared “biologically dead.”
But the Thames is back. In recent years, stricter regulations on industrial dumping, improvements to London’s sewage system, and aggressive clean-up efforts seem to have reversed its fate. The river is now home to a varied range of animals (including seals, porpoises, and even the occasional stray whale).
Recent findings now suggest that a new marine creature is calling the English capital home. In the past two months, ecologists from the Zoological Society of London (ZSL) have spotted seahorses—known as “sticklers for clean water,” they said—on six different occasions near the city’s South Bank and in Greenwich, a borough in southeast London.
Surveyors from the Zoological Society of London recently found a short-snouted seahorse in Greenwich, in southeast London. ©ZSL
Back in 2008, the first sightings of Britain’s two seahorse species—the long-snouted (Hippocampus guttulatus) and short-snouted (Hippocampus hippocampus)—lead to their legal protection under the Wildlife and Countryside Act.
The frequency of the more recent sightings—six in two months versus the previous average of two a year—suggests that the creatures are back to stay. “We’re really excited to be finding more and more evidence suggesting seahorses are resident in the Thames,” Anna Cucknell, a conservation manager at the ZSL, said in a press release.
Cucknell added that recent findings may also spark new research. “There’s currently a real lack of scientific data on the wider status and populations of these two seahorse species in the Thames and throughout their range, so we’re hopeful these recent finds will attract the attention of funders to help us understand more about these amazing animals.” |
NEW YORK (AP) — “Rowdy” Roddy Piper, who trash-talked his way to the main event of the first WrestleMania and later found movie stardom, has died. He was 61.
The WWE says Piper died Friday. It had no additional details. In an email to Variety, Piper’s agent Jay Schacter said, “Rod passed peacefully in his sleep last night. I am shocked and beyond devastated.” Piper, born Roderick Toombs, was the second WWE Hall of Famer to die this summer following the June death of Dusty Rhodes. Piper’s death also comes days after Hulk Hogan, his biggest rival for decades, was fired by the WWE for using racial slurs. Piper and Hogan battled for years and headlined some of the biggest matches during the 1980s. Hogan and Mr. T defeated Piper and Paul Orndorff on March 31, 1985, at the first WrestleMania at Madison Square Garden.
“Roddy Piper was one of the most entertaining, controversial and bombastic performers ever in WWE, beloved millions of fans around the world,” said WWE Chairman & CEO Vince McMahon. “I extend my deepest condolences to his family.”
Piper was also well known for his acting roles, including the lead in the cult hit “They Live.”
According to KPTV in Portland, in 2012, Piper helped bring back “Portland Wrestling Uncut,” which aired on KPTV and KPDX.
Piper and his wife lived in Portland. He was diagnosed with Hodgkins lymphoma in 2006.
Piper had been scheduled to appear on “The Inappropriate Earl Podcast” Friday, and host Earl Skakel tweeted his shock over the death.
Piper is survived by his wife, three daughters and son. |
Motor imagery performance evaluation using hybrid EEG-NIRS for BCI In this paper, we have evaluated the performance of motor imagery (MI), before and after training by a rehabilitation robot, for brain-computer interface (BCI). A hybrid electroencephalography and near-infrared spectroscopy (EEG-NIRS) system is used to detect the MI by placing the electrodes and optodes around the motor cortex region. Five healthy subjects have participated in the experiment. The subjects are assisted by a rehabilitation robot in an arm movement paradigm during the training session. The MI activity of the subjects is recorded before and after the training sessions. The brain signals from the motor cortex are recorded simultaneously using EEG-NIRS. We found a significant improvement in the MI performance after training. Linear discriminant analysis is used to classify the acquired activity in an offline analysis. The data analysis shows that the hybrid EEG-NIRS can detect better motor activity than individual modality. The average classification accuracy of the subjects has increased from 66% to 94% after training. We propose that the training of the motor cortex by a rehabilitation robot can improve the MI performance for BCI. |
Home shopping by use of the television has been growing in popularity in recent years. Generally, home shopping channels are transmitted on a community antenna television (CATV) facility. The CATV facility, which has the capacity for transmitting a large number of commercial and public television signals, is usually connected to homes via a network of coaxial cables. In most of the home shopping systems being offered to date, subscribers passively view the home shopping channel, watch items and pricing being presented by television sales people, and if interested in a particular item, place an order over the telephone or by mail. Similarly, televised real estate offerings which present still-video pictures and information about homes for sale in a particular area are also becoming a popular method of communicating such information to a mass audience. These systems are non-interactive, in the sense that a viewer may passively watch items as they are presented on the television screen, but cannot control the course of the presentation.
More advanced interactive systems have been designed and implemented, wherein viewers are able to request a display of particular items in which they have an interest, and can control their information retrieval or perform individualized shopping as they proceed. A system of this sort is described in U S. Pat. No. 4,734,764, entitled "Cable Television System Selectively Distributing Pre Recorded Video and Audio Messages". This prior art invention describes a system which conveys still frame television quality video with overlaid graphics information and an audio message (when appropriate), to a multiplicity of CATV subscribers who tune to a specific cable channel. The subscriber, by use of a Touch-Tone telephone, transmits particular codes in response to message prompts which are displayed in menu form on the TV screen, and is able to request video displays and information on specific products as well as make purchases. The user of this system requires no additional equipment at his location other than a Touch-Tone telephone and a television set.
In order to interactively operate this type of prior art system, a subscriber tunes to the CATV channel which is being used for transmission, and dials a telephone number to gain access to the system. Each subscriber is given a particular identification number upon subscribing to the service. When this identifying number is entered via the Touch-Tone telephone keypad, the system recognizes the subscriber and his location. Graphic overlays which depict menus and directories of "electronic stores" that are on the system are then displayed, and by responding to these menus with a sequence of keystrokes on the Touch-Tone telephone keypad, the subscriber may, by means of selected video images, enter and browse through a particular store of his choice (or follow other shopping paradigms such as going down a particular aisle in a supermarket), select a particular product of interest, make purchases or request additional information or help. By selecting from a list of menu prompts which are displayed on the television screen, and which the subscriber enters on the Touch-Tone keypad, his television screen displays still-frame video, having overlaid graphics where appropriate, and possibly accompanied by a sound track that presents information about the requested item.
This prior art system uses a CATV cable network to transmit the requested video presentations and accompanying audio messages to its subscribers. In conventional television transmission, video images are transmitted at the rate of 30 frames per second (the North American or Japanese standard), or 25 frames per second (the European standard). A video frame is an interleaved composition of two video fields, with each video field being further composed of a plurality of scan lines which contain the video image information and a smaller plurality of scan lines referred to as the "vertical blanking interval". The interactive system described in U.S. Pat. No. 4,734,764 makes use of the vertical blanking interval (which consists of the first 21 lines of the video field) to store information which identifies the particular subscriber's reception device to which the requested video images and audio commentary are addressed. The control center of the CATV system (the CATV headend) transmits the frames of video and audio data, with this addressing information encoded in the vertical blanking interval, along the main "trunk" coaxial cables of the system in analog form. In order to compensate for signal losses which naturally occur as a result of transmission, CATV cable systems utilize amplifiers positioned at various locations downstream from the control center. At each of these locations, the signals from the control center are amplified and further transmitted down a plurality of secondary distribution cables. At points along the secondary distribution cables are "taps", at which the signals are split into a plurality of "drop" cables which terminate at subscribers' television sets.
To accommodate a large number of concurrent subscribers, the interactive system described in U.S. Pat. No. 4,734,764 utilizes a reception device known as a frame store unit, or "frame grabber", typically located near each amplifier of the distribution system. Each frame store unit services a small number of cable drops, and functions to capture the information that is destined for a subscriber whose particular identification code, encoded in the vertical blanking interval, matches an identification code associated with the frame store unit. The video and audio information is transmitted to the frame store unit on two separate channels. The frame store unit captures the analog video and audio information which has the appropriate address encoded in the vertical blanking interval of the frames and stores the information into its memory. The frame store unit then replays the stored video information 30 times per second (according to the U.S. National Television Standards Committee (NTSC) requirement), and transmits the video along with any accompanying audio message to the particular subscriber that it is servicing.
In the prior art system of U.S. Pat. No. 4,734,764, which has been briefly described above, the video and audio presentation which comprises a particular merchandise offering by a commercial client, must first be prepared and encoded onto conventional laser video discs. A plurality of conventional video disc players at the central system site comprise the data storage and playback portion of a subsystem which transmits the appropriate video and audio information in analog form, under control of a central processing unit. The video information is time-multiplexed in the proper sequence, and the audio is appropriately modulated and frequency-division multiplexed for transmission down the CATV cable network.
Numerous problems and limitations are associated with this type of "analog" interactive system, even though the small amount of data that is generated may be transmitted with a link having much less bandwidth. First, a large number of video disc players are required, making the cost and physical size of the electronics for this prior art system exorbitant. Adding to this cost is the utilization of a full bandwidth telephone link for each connection between a subscriber and the host computer of the system, even though the small amount of data that is generated may be transmitted with a link having much less bandwidth. Second, the response time between a subscriber entering a particular code on the telephone keypad and the appearance of a display in response to that code is too slow to establish a comfortable interactive session. The response time in the analog system is limited primarily by the time it takes the video disc player to access a particular location on the disc and can be on the order of three to ten seconds. The slow response time is exacerbated by the graphics overlay process, in which a graphics decoder receives graphics information that is associated with a particular video frame from the central processing unit, generates the appropriate graphics display data and routes this data to a video combiner. The video combiner must first receive the video frame from the video player and then overlay the graphics information onto the frame.
Further, in the prior art analog system, the audio information is stored on the video disc in the electronic format of a video frame. This imposes a maximum limit of ten seconds for the duration of the audio portion associated with a particular frame. In many cases, this time limitation is too restrictive for practical use. In other cases it is wasteful of space.
An additional limitation arises from the choice of a laser disc as the storage medium for the video and audio data. A commercial client who desires to market his merchandise or services on the interactive system of the prior art must undertake a lengthy premastering procedure, required to convert his advertising material (possibly in the format of catalog photographs, video tape information, etc.) into a format which can be encoded onto a video disc master. Multiple copies of the master disc must then be made so that each video disc player in the system can have a copy of the information when it is called upon to deliver a particular presentation to a subscriber. This premastering and duplication process is a time-consuming, linear and batch oriented procedure, generally taking up to 10 weeks from initial setup to final product. The process provides no mechanism for making minor modifications to audio or video images at a later date. If changes are required, a new video disc must be mastered and reproduced. Thus, no reusable archiving is possible.
The prior art analog system is structured with an overly complicated pathway between the subscriber and host computer system which does not generate adequate feedback to either the subscriber or the system. For example, when a subscriber enters a particular sequence of keystrokes, he has no acknowledgment that the sequence has been properly received by the system. Similarly, the system has no feedback that a subscriber has received whatever was transmitted to him. Further, when help from a consumer service representative is requested by a subscriber, the consumer service representative can hear what the subscriber is saying over the telephone, but cannot see what is being displayed on the subscriber's TV screen.
Another important drawback of the prior art system is the manner in which the analog data is distributed from the system to the CATV center and the subscribers. The cost of transmitting data from the host computer to the CATV is expensive and the prior art system makes sub-optimal use of the distribution channel capacity. In the prior art system, the video information is time-multiplexed onto one distribution channel while the audio is frequency-division multiplexed onto another distribution channel. Thus, the CATV headend must allocate two distribution channels to the system. Not only are these channels costly to acquire, but many CATV companies may not have enough channel capacity for all their users, and from a business perspective, may be hesitant to sell more than one channel to a single user.
Finally, the prior art system has problems which are fundamentally related to the storing, copying and transmission of data in analog form. Analog signals are more prone to degradation by noise sources that generally arise in any electronic system. Degradation of analog signals as they are transmitted down the long lengths of coaxial line which comprise the transmission network of the CATV system is inevitable. Additionally, the maximum signal-to-noise of the video signals which are attainable at the output of a video disc player is much lower than the noise figure for studio quality video broadcast. This adds to the degradation in quality of the final video images seen by the subscriber. |
/**
* @return The set of abstract superclasses not in this project, based on naming conventions.
*/
public HashSet<String> abstractSuperClasses()
{
if (abstractSuperClasses.isEmpty())
{
project.typeDeclarations(type ->
{
if (type.isClassOrInterfaceDeclaration() && !Annotations.shouldExcludeType(type))
{
final var classOrInterface = type.asClassOrInterfaceDeclaration();
if (includesQualifiedTypeName(Names.name(type, QUALIFIED, WITHOUT_TYPE_PARAMETERS)))
{
classOrInterface.getExtendedTypes().forEach(at ->
{
final var superClass = at.getName().asString();
if (!Types.isExcludedSuperType(type, this, Names.name(at, UNQUALIFIED, WITHOUT_TYPE_PARAMETERS)))
{
if (superClass.startsWith("Base") || superClass.startsWith("Abstract"))
{
abstractSuperClasses.add(superClass);
}
}
});
}
}
});
}
return abstractSuperClasses;
} |
<reponame>dillonthompson/dillonthompson.github.io
export { default } from './lib/icons/AliwangwangFilled'; |
Tripp Mickle and Drew FitzGerald, reporting for The Wall Street Journal:
Apple Inc. has scheduled a product-announcement event on Sept. 12, according to people briefed on its plans, reinforcing expectations that the technology giant will release new iPhones and a smartwatch well ahead of the holiday shopping season.
That’s the date I would have bet on. Last few years it’s been the Wednesday after Labor Day, but that felt too early this year.
The company is expected to unveil three iPhones, according to other people familiar with its plans. Those include a showcase iPhone to mark the product’s 10th anniversary that is larger and pricier and features an edge-to-edge display and facial-recognition technology, as well as updates to the two iPhone 7 models that started selling last year.
They’re not launching D22 this year because it’s the iPhone’s 10th anniversary. They’re launching it this year because it’s ready. If it had been ready last year, they would have launched it last year. They might well mention the 10th anniversary of the original iPhone on stage at the event, but I would be very surprised — and probably a little alarmed — if they make it part of the marketing campaign for the device. Again, they might put it in the keynote event (like they did with the company’s 40th anniversary), but that was never part of any advertising campaign.
The trick Apple needs to pull off here is making all three new iPhones look new and exciting. Calling D22 the special 10th Anniversary iPhone makes the 4.7- and 5.5-inch models seem non-special.
In the past two years it has used San Francisco’s Bill Graham Civic Auditorium, but people close to the company say it is aiming to use the 1,000-seat Steve Jobs Theater on its new headquarters campus. The new headquarters, however, aren’t finished, and the construction timetable could affect the timing or location of the event, those people said.
We’re two weeks away from the event. The Journal’s sources may not know where it’s being held, but Apple does. (But it leaves me hanging where I should book a hotel room.)
★ Tuesday, 29 August 2017 |
class Scoresheet:
"""
Stores all the info you learn during a game
"""
def __init__(
self,
players_names: List[str],
current_player: str,
game: clue.Game = MASTER_DETECTIVE,
):
if len(players_names) != len(set(players_names)):
raise Exception(f"duplicate player names: {players_names}")
# this MUST be an ordered list for printing to work
self.players_names = [s.upper() for s in players_names]
self.current_player = current_player
self.game = game
self.data = {}
for card in game.all_cards: # clue.ALL_CARDS:
self.data[card] = {}
# self.data[PLUM] = {}
for player in self.players_names:
self.data[card][player] = clue.BLANK
# self.answer_state = collections.defaultdict(lambda: clue.UNKNOWN)
self.excluded = set()
def all_cards(self) -> List[str]:
return self.game.all_cards
def player_count(self) -> int:
return len(self.players_names)
def is_valid(self) -> bool:
"""
Checks validity. For example, if two Room cards are both marked as ANSWER,
that is invalid. Or if two people have the same card, that is invalid.
@returns true if the data structure is valid
"""
# 1. more than one player cannot have the same card
for card in self.game.all_cards:
count = 0
for player in self.players_names:
if self.get_ownership(player, card) == clue.HAS_CARD: # 1
count += 1
if count > 1:
return False
# 2. more than 1 card of the same group/type cannot be 'Answer'
def _group_of_cards_check(group):
count = 0
for card in group: # PLUM, 0
if self.is_answer(card): # DOESNT_HAVE_CARD = 2
count += 1
if count > 1:
return False
return True
if not _group_of_cards_check(self.game.suspects):
return False
if not _group_of_cards_check(self.game.weapons):
return False
if not _group_of_cards_check(self.game.rooms):
return False
# 3. Every card of the same type owned by someone
def _excluded_check(group):
count = 0
for card in group:
if self.is_excluded(card):
count += 1
if count >= len(group):
return False
return True
if not _excluded_check(self.game.suspects):
return False
if not _excluded_check(self.game.weapons):
return False
if not _excluded_check(self.game.rooms):
return False
# 4. A single player seems not to have any cards
return True
def set_ownership(self, player: str, card: str, state: int) -> None:
"""
Sets the "ownership" value for that player and card. Set a checkmark or No-card for a single box.
:player: which player
:card: which card
:state: the value for the ownership state: BLANK, HAS_CARD, DOESNT_HAVE_CARD
example: set_ownership("Olivia", clue.MUSTARD, HAS_CARD)
"""
player = player.upper()
if card not in self.game.all_cards:
raise ValueError(card)
if player not in self.players_names:
raise ValueError(player)
# self.data.get(card, {}).get(player) # 0
self.data[card][player] = state
def set_fact(self, fact):
if fact.player is None:
self.excluded.add(fact.card)
else:
self.set_ownership(fact.player, fact.card, fact.card_state())
def has_fact(self, fact) -> bool:
"""
:return: True if the scoresheet already KNOWS the fact, False=DOESN'T know it
"""
if fact.player is None:
if fact.has_card:
return self.is_excluded(fact.card)
else:
raise Exception(f"fact {fact} is invalid")
return (
self.get_ownership(fact.player, fact.card) == fact.card_state()
) # int == int
def get_ownership(self, player: str, card: str) -> int:
"""
returns a state
Gets the "ownership" value for that player and card
"""
player = player.upper()
return self.data[card][player]
# def set_card_answerstate(self, card: str, state: int) -> None:
# pass
def get_ownership_cards(self, player: str, cards: List[str]) -> List[int]:
results = []
for card in cards:
results.append(self.get_ownership(player, card))
return results
def get_owner(self, card) -> str:
"""
:return the player who owns the card, or None if we dont know who owns it.
"""
for player in self.players_names:
if self.get_ownership(player, card) == clue.HAS_CARD:
return player
return None
def set_excluded(self, card: str) -> None:
"""
Call this method to record the fact that a card cannot be the answer (even though we
might not know who has it)
:param card:
:return:
"""
self.excluded.add(card)
def is_excluded(self, card: str) -> bool:
if card in self.excluded:
return True
else:
# see if any player has it:
for player in self.players_names:
if self.data[card][player] == clue.HAS_CARD:
return True
return False
def is_answer(self, card: str) -> bool:
"""
If we are certain no one has a card
:param card:
:return: True if Answer
"""
for player in self.players_names:
if self.data[card][player] != clue.DOESNT_HAVE_CARD:
return False
return True
def print_scoresheet(self):
"""
SUSPECTS | P1| P2| P3|
---------------------------
(Mustard) | | | 0 |
Green | | 0 | |
--Plum------| | | |
Peacock | | | 1 |
WEAPONS | P1| P2| P3|
---------------------------
--Knife------| 1 | | |
Candlestick | 0 | 0 | |
ROOMS | P1| P2| P3|
---------------------------
--Kitchen----| 1 | | |
(Gazebo) | | | |
"""
titles = {
"SUSPECTS": self.game.suspects,
"WEAPONS": self.game.weapons,
"ROOMS": self.game.rooms,
}
short_names = [
Scoresheet.short_name(s) for s in self.players_names
] # HAS THE SAME ORDER AS self.players_names
for key in titles:
# print("")
print(clue.INVERTED, end="")
print(
clue.pad_right(key, clue.longest_word(self.game.all_cards)), "|", end=""
)
for player in short_names: # short names horizontally: Dav|Oli|Xen|
print(player, end="")
print("|", end="")
print(clue.NORMAL_TEXT)
# print("----------------------------")
for card in titles[key]:
if self.is_excluded(card):
print(clue.DARK_GRAY, end="")
elif self.is_answer(card):
print(clue.ANSWER_TEXT, end="")
print(
clue.pad_right(card, clue.longest_word(self.game.all_cards)),
"|",
end="",
)
for player in self.players_names:
print(self.box_str(self.get_ownership(player, card)), end="")
print("|", end="")
print(clue.NORMAL_TEXT, end="")
print("")
@staticmethod
def short_name(player_name: str) -> str:
"""
Trim players' names to fit into ### table header to print
:param player_name:
:return: a version of player_name that is 3 chars long, to be used as a column heading
"""
short_name = player_name[:3]
while len(short_name) < 3:
short_name += " "
return short_name
@staticmethod
def box_str(state: int) -> str:
"""
Given the "ownership state" of a player and card, return the string that should be printed for that box
:param state:
:return:
"""
# HAS_CARD -> " 1 "
# DOESNT_HAVE_CARD -> " 0 "
# BLANK -> " "
box = {BLANK: " ", HAS_CARD: " 1 ", DOESNT_HAVE_CARD: " 0 "}
return box[state]
def __str__(self):
return str(self.data) |
Impact of acute versus prolonged exercise and dehydration on kidney function and injury Abstract Exercise and dehydration may be associated with a compromised kidney function and potential signs of kidney injury. However, the kidney responses to exercise of different durations and hypohydration levels are not yet known. Therefore, we aimed to compare the effects of acute versus prolonged exercise and dehydration on estimated glomerular filtration rate (eGFR) and kidney injury biomarkers in healthy male adults. A total of 35 subjects (23 ± 3 years) were included and invited for two study visits. Visit 1 consisted of a maximal cycling test. On Visit 2, subjects performed a submaximal exercise test at 80% of maximal heart rate until 3% hypohydration. Blood and urine samples were taken at baseline, after 30 min of exercise (acute effects; low level of hypohydration) and after 150 min of exercise or when 3% hypohydration was achieved (prolonged effects, high level of hypohydration). Urinary outcome parameters were corrected for urinary cystatin C, creatinine, and osmolality. Subjects dehydrated on average 0.6 ± 0.3% and 2.9 ± 0.7% after acute and prolonged exercise, respectively (P < 0.001). The eGFR cystatin C did not differ between baseline and acute exercise (118 ± 11 vs. 116 ± 12 mL/min/1.73 m2, P = 0.12), whereas eGFR cystatin C was significantly lower after prolonged exercise (103 ± 16 mL/min/1.73 m2, P < 0.001). We found no difference in osmolality corrected uKIM1 concentrations after acute and prolonged exercise (P > 0.05), and elevated osmolality corrected uNGAL concentrations after acute and prolonged exercise (all Pvalues < 0.05). In conclusion, acute exercise did barely impact on eGFR cystatin C and kidney injury biomarkers, whereas prolonged exercise is associated with a decline in eGFR cystatin C and increased biomarkers for kidney injury. Introduction Strenuous exercise increases the perfusion of active muscles, whereas the perfusion of body organs such as the kidneys may decrease up to 25% of resting levels (Poortmans 1984;McAllister 1998). Furthermore, exercise increases the metabolic heat production, resulting in an elevated sweat rate and concomitant dehydration leading to a lower extracellular volume (Gonzalez-Alonso 2012). It has been hypothesized that the decreased renal blood flow and lower circulatory blood volume may attenuate kidney function and induce ischemic kidney stress or even "temporary" kidney injury (Bonventre 1988;). Furthermore, literature suggested that exercise-induced dehydration, heat stress, inflammation, and oxidative stress might also influence kidney function and induce kidney stress (;). Prolonged exercise accompanied with dehydration stimulates the secretion of arginine vasopressin (AVP) (Boone and Deen 2008;) and activates the renin-angiotensin-aldosteron system (RAAS) (Atlas 2007), both stimulate the renal reabsorption of water and sodium chloride. The increased energydemanding renal sodium uptake and the reduced renal perfusion with excessive dehydration may induce ischemic kidney injury (). Increased urinary levels of kidney damage biomarkers (kidney injury molecule 1 (KIM1) and neutrophil gelatinase-associated lipocalin (NGAL)) were found after completing a (ultra)marathon (;) and after prolonged walking exercise (). However, the interpretation of these studies is difficult, as urinary KIM1 and NGAL concentrations were not corrected for elevated urine density as an effect of dehydration. Some studies corrected for changes in urinary density using urinary creatinine concentration (;), which may be problematic because of exercise-induced muscle breakdown (). As a result, it is hard to distinguish whether observed changes are the effect of exercise or due to an increased urine concentration because of dehydration. In addition, previous studies primarily focused on the effects of prolonged exercise on kidney function and injury, but the acute effects of a short bout of exercise, with less dehydration, remain unknown. Therefore, the aim of this study was to assess and compare the effects of acute versus prolonged exercise on eGFR and kidney injury biomarkers in healthy male adults in well-controlled laboratory circumstances. To account for exercise-induced changes in urinary concentration, uNGAL and uKIM1 will be corrected for cystatin C, creatinine, and osmolality. We hypothesized that acute exercise will not impact on eGFR and kidney injury, whereas prolonged exercise will result in a decreased eGFR and the presence of biomarkers for kidney injury. Furthermore, we hypothesize that higher levels of hypohydration will augment the effects on eGFR and kidney injury biomarkers. Methods Subjects A total of 35 male subjects (23 AE 3 years, 22.3 AE 3.6 kg/ m 2 ) between 18 and 30 years were included in this study. Subjects with a history of kidney disease or a baseline eGFR <90 mL/min were excluded for participation. Furthermore, patients with thyroid disease and autoimmune disorders were excluded for participation. The study was approved by the Medical Ethical Committee of the Radboud university medical center (CMO: 2015(CMO: -1649, and all participants gave written informed consent prior to participation. Furthermore, the study was conducted under the provisions of the Declaration of Helsinki. Study design All subjects were invited for two study visits, separated by at least 5 days, to prevent interference of the two visits. After given informed consent, subjects were medically screened to control for exclusion criteria and a venous blood sample was taken. Thereafter, a maximal exercise test was performed to determine subject's physical fitness level (VO 2 max) and maximal heart rate (HR max). The second study visit consisted of a submaximal exercise test on a cycle ergometer for 150 min or until 3% hypohydration. At baseline, after 30 min of exercise (effects of acute exercise) and directly after exercise (effects of prolonged exercise), a blood and urine sample were taken and drytoweled nude body mass was measured. Subjects were instructed to refrain from alcohol and caffeine consumption and heavy physical exercise 48 h prior to the experiment. Furthermore, subjects were instructed to register all fluid intake 24 h prior to the second study visit. To ensure that subjects were well hydrated before the exercise test, subjects were asked to drink 0.5 L of water 2 h prior to the test (). Study protocol Study visit 1medical screening + maximal exercise test The medical screening consisted of a medical history check, a 12-lead ECG and physical examination. Subsequently, a venous blood sample was taken to determine the serum creatinine concentration, which was used to assess kidney function in rest by calculating the eGFR creatinine. Furthermore, subjects were asked to complete the Short QUestionnaire to ASsess Health enhancing physical activity (SQUASH) (). This questionnaire takes into account sport activities as well as other daily activities such as work, housekeeping and leisure time activities. Subjects completed the questionnaire concerning an average week of the past 6 months. Furthermore, subjects completed a stepwise incremental cycling exercise protocol, in which the workload increased with 25 W per minute until volitional exhaustion, to determine subject's physical fitness (VO 2 max), HR max, and maximal workload. Directly after volitional exhaustion we determined the rate of perceived exertion using a 10-point category Borg scale (Borg 1982) and the blood lactate level using a fingertip capillary measurement (Lactate Pro, ARKRAY Europe, Amstelveen, The Netherlands). Study visit 2submaximal exercise test During the second study visit, subjects performed a submaximal exercise test on a cycle ergometer at an exercise intensity of 80% of the HR max. At baseline the nude body mass, equipped body mass (body mass including sportswear and HR monitor), blood pressure, and resting HR were measured. Furthermore, a venous blood sample was taken and subjects were asked to provide a urine sample and subsequently empty their bladder. Thereafter, subjects started the submaximal exercise test, which consisted of two parts. In the first part, subjects exercised at 80% of HR max for 30 min at a frequency of 60-80 repetitions per minute in an ambient temperature of 20°C. In the first 5 min of the exercise test, the workload was increased until the subjects reached 80% of their maximal heart rate. Thereafter, the workload was adjusted to maintain a constant exercise intensity of 80%. After 30 min, the baseline measurements were repeated and blood and urine samples were taken to assess the acute effects of exercise. Subsequently, subjects got dressed with a thermo suit (Craft active Basic, Craft, Beverly, Massachusetts, USA) and started the second part of the exercise protocol, in which the ambient temperature was elevated to 25°C. Subjects started cycling at 80% of HR max and continued exercise for another 120 min or until 3% hypohydration (defined as a body mass loss of 3%) was achieved. The rate of perceived exertion (RPE) was measured on a 6-20 category Borg scale. Furthermore, the equipped body mass, ambient temperature, and relative humidity were measured every 15 min. Directly after completing the submaximal exercise test, the blood pressure was measured and blood and urine samples were taken again. Thereafter, the nude body mass was measured to determine the relative body mass loss (hypohydration). Fluid balance Nude body mass was measured at baseline, after 30 min and directly after finishing the submaximal exercise test. Subsequently, the exact level of hypohydration was calculated as the relative change in nude body mass (in %). Furthermore, all subjects received written and individual oral instruction about the registration of their fluid intake in a diary. Subjects were allowed to drink ad libitum, as long as they registered the time (in blocks of 1 h), amount (standardized sized cups, bottles, etc.), and type (water, sports drink, tea) of their individual fluid intake 24 h preceding the submaximal exercise test. Blood sample A blood sample was taken at baseline, after 30 min and directly after completing the submaximal exercise test. Serum creatinine and cystatin C concentrations were determined to examine kidney function. In literature, the Chronic Kidney Disease Epidemiology Collaboration formula (CKD-EPI) based on creatinine is often used to determine kidney function (). However, serum creatinine levels increase during exercise due to exercise-induced muscle breakdown. In contrast, cystatin C is independent of muscle mass, age and gender, and serum levels are not influenced by exercise (). Therefore, we used the CKD-EPI formula based on creatinine () as well as the CKD-EPI formula based on cystatin C () to calculate the eGFR at rest and after acute and prolonged exercise. Additionally, serum osmolality and plasma sodium concentration were measured as indices for dehydration. Plasma hematocrit and hemoglobin levels were measured and used to calculated the relative changes in plasma volume (in %) based on the Dill and Costil formula (Dill and Costill 1974). Furthermore, the plasma renin activity (PRA) and copeptin concentration were measured, to assess the hormonal responses to changes in the volume and osmolality balances, respectively. Arginine vasopressin (AVP) is relatively difficult to measure because of its short half-life and its interaction with blood platelets (). Copeptin and AVP are derived from the same preprohormone and thus synthesized and secreted in equal molar amounts. Copeptin, however, has a longer half-life and can be measured more easily than AVP (). Therefore, we measured copeptin as a surrogate marker for AVP secretion (Morgenthaler 2010 Urine sample At baseline, after 30 min and directly after completing the submaximal exercise test, all subjects provided a urine sample to examine fluid balance and kidney responses. Urinary cystatin C concentration was measured using the nephelometric method (Behring Nephelometer II, Siemens Healthcare, Den Haag, The Netherlands). The urinary creatinine concentration was measured using an enzymatic assay (Cobas C6000, Roche Diagnostics, Indianapolis, USA). Urine osmolality was examined using an osmometer (Advanced Model 3320 Micro-Osmometer, Osmometer, Advanced Instruments, Norwood, USA). In order to determine kidney injury in response to exercise, we measured urinary concentrations of KIM1 and NGAL (both monomeric and dimeric) in duplicate using the previously described sandwich ELISA assay (E-EL-H0186 and E-EL-H0096, Elabscience Biotechnology, Wuhan, China) (;van ). Furthermore, uKIM1 and uNGAL concentrations were corrected for urinary cystatin C, creatinine, and osmolality. The corrected uKIM1 and uNGAL data were calculated by dividing the individual uncorrected data by the corresponding cystatin C levels, creatinine levels, and the urine osmolality. Additionally, urinary albumin (uAlbumin) and glucose (uGlucose) concentrations were measured, and corrected as well, to examine the effects of acute exercise and dehydration on acute kidney injury. Exercise intensity Subjects HR was measured continuously every 15 sec throughout the test using a two-channel chest band system (Polar RS400, Polar, Oy, Kempele, Finland). Subsequently, the exercise intensity was calculated by expressing the HR as a percentage of HR max. Statistical analysis The statistical analyses were conducted using the Statistical Package for Social Sciences (SPSS version 20, Armonk, NY, USA), in which the level of significance was set at P < 0.05. Data were checked for normality using the Shapiro-Wilk test. In case of a non-Gaussian distribution, the statistical analysis was performed using the nonparametric equivalents. Normally distributed data were presented as mean AE standard deviation (SD), whereas non-Gaussian distributed date were presented as median (interquartile range). A repeated measures ANOVA was used to assess differences in fluid balance, kidney function, and kidney injury over time, in which a post hoc Bonferroni correction was used to determine individual differences between baseline, acute exercise, and prolonged exercise. Non-Gaussian distributed data were tested using a Friedman test, followed by a Wilcoxon signed-rank test. Furthermore, we have calculated the absolute change in uKIM1 and uNGAL compared to baseline for both acute ( acute exercise) and prolonged exercise ( prolonged exercise). Subsequently, we used a paired t-test or Wilcoxon signed-rank test to assess whether there is a difference between acute exercise and prolonged exercise. A Pearson or Spearman (for non-Gaussian distributed data) correlation coefficient was used to assess the relation between kidney function and injury and level of dehydration. Subjects & exercise characteristics An overview of subject characteristics is shown in Table 1. Because of a vasovagal syncope in response to the venous blood sample, one subject did not perform the submaximal exercise test. Average fluid intake 24 h prior to the test was 2956 AE 947 mL. The average exercise duration during the submaximal exercise was 107 AE 16 min, in which subjects cycled at an exercise intensity of 79.3 AE 1.4% of HRmax. The average workload in the first part was significantly higher compared to the second part of the submaximal exercise test (152 AE 30 W vs. 116 AE 36 W, P < 0.001), with an average exercise intensity of 79.8 AE 3.5% and 81.1 AE 1.0% for the first and second part, respectively (P = 0.016). Furthermore, the ambient temperature and relative humidity were, respectively, 20 AE 1°C and 61 AE 14% for the first part and 25 AE 1°C and 59 AE 12% for the second part of the submaximal exercise test. Fluid balance Fluid balance data are shown in Table 2. Relative body mass loss after acute and prolonged exercise was 0.6 AE 0.3% and 2.9 AE 0.7%, respectively (P < 0.001), while the decrease in plasma volume was also higher after prolonged exercise (P < 0.001). An exercise-induced increase in urine osmolality was observed after both acute and prolonged exercise (both P-values <0.001). No differences in serum sodium concentration and serum osmolality were found after acute exercise (P > 0.05), whereas sodium concentration and serum osmolality increased after prolonged exercise (P < 0.001). Plasma copeptin concentration after acute exercise did not increase (P = 0.07), whereas a significant increase was found after prolonged exercise (P < 0.001). Furthermore, baseline PRA levels increased after both acute and prolonged exercise (both P- values <0.001), with higher PRA levels after prolonged exercise compared to acute exercise (P < 0.001). Urinary kidney injury markers Due to technical difficulties the data analysis of one of the badges of uKIM1 failed and uKIM1 cannot be determined in n = 9 subjects. Furthermore, n = 3 subjects were not able to provide a urine sample after 30 min of exercise. A significant increase in urinary creatinine and cystatin C concentration was found after acute and prolonged exercise (all P-values <0.05), with higher levels after prolonged compared to acute exercise (Table 3). Urinary NGAL The uncorrected uNGAL concentration increased after both acute (P = 0.001) and prolonged exercise (P < 0.001), with higher levels after prolonged exercise (P = 0.001, Fig. 2).The cystatin C corrected uNGAL concentration did not differ after acute or prolonged exercise (both P-values >0.05), with lower levels after prolonged compared to acute exercise (P = 0.044). No difference in creatinine corrected uNGAL (P = 0.16) concentrations were found across measurements. The osmolality Subject characteristics for the total group. Data were presented as mean AE SD. MET, Metabolic equivalent of task, eGFR, estimated glomerular filtration ratio, bpm, beats per minute, au, arbitrary unit. corrected uNGAL concentration also increased after both acute (P = 0.018) and prolonged exercise (P < 0.001), with higher levels after prolonged exercise (P = 0.022). The prolonged exercise was significantly higher compared to acute exercise for uncorrected uNGAL and cystatin C and osmolality corrected uNGAL (all P-values <0.05), whereas no difference between acute and prolonged exercise in change in creatinine corrected uNGAL was found (P = 0.58, Table 4). After both acute and prolonged exercise, no correlation was found between the uncorrected and corrected uNGAL concentrations and hypohydration level and absolute body mass loss (all P-values>0.05). Urinary KIM1 The uncorrected uKIM1 concentration increased after both acute (P = 0.021) and prolonged exercise (P < 0.001), with higher levels after prolonged exercise (P = 0.003, Fig. 3). Cystatin C corrected uKIM1 was comparable after acute exercise (P = 0.52) and prolonged exercise (P = 0.062), with lower levels after prolonged compared to acute exercise (P = 0.003). Creatinine and osmolality corrected uKIM1 levels did not differ across measurements (P = 0.73 and P = 0.09, respectively). The prolonged exercise was significantly higher compared to acute exercise for uncorrected uKIM1 and cystatin C and osmolality corrected uKIM1 (all P-values <0.05), whereas no difference between acute and prolonged exercise in absolute change in creatinine corrected uKIM1 was found (P = 0.69, Table 4). A weak, but statistically significant, negative correlation was found between the uncorrected uKIM1 concentration and level of hypohydration after acute exercise (R 2 = 0.46, P = 0.029) and a positive correlation was found between creatinine corrected uKIM1 and level of hypohydration after prolonged exercise (R 2 = 0.45, P = 0.022). Urinary albumin The uncorrected uAlbumin concentration significantly increased after both acute (P < 0.001) and prolonged exercise (P < 0.001), with higher levels after prolonged exercise compared to acute exercise (P < 0.001). Cystatin C corrected uAlbumin levels did not differ across measurements (P = 0.14). Creatinine corrected uAlbumin levels did not differ after acute exercise (P = 0.13), whereas increased levels were found after prolonged exercise (P = 0.005). The osmolality corrected uAlbumin concentration was increased after both acute (P = 0.028) and Figure 1. The estimated glomerular filtration ratio calculated with the cystatin C formula at baseline and after acute and prolonged exercise. A Friedman test was used to examine differences over time, whereas a Wilcoxon signed-rank test was used to assess differences acute and prolonged exercise. Data were presented as median with interquartile range. *Represents a difference between acute and prolonged exercise. prolonged exercise (P < 0.001), with higher levels after prolonged exercise (P = 0.027). Urinary glucose The uncorrected uGlucose concentration increased after both acute (P = 0.024) and prolonged exercise (P < 0.001), with higher levels after prolonged exercise (P < 0.001). Furthermore, the cystatin C, creatinine, and osmolality corrected uGlucose concentration did not differ from baseline after acute exercise (all P-values >0.05), whereas the cystatin C, creatinine, and osmolality corrected uGlucose levels were higher compared to baseline after prolonged exercise (all P-values <0.05)., creatinine (C), and osmolality (D), at baseline and after acute and prolonged exercise (n = 31). A Friedman test was used to examine differences in uNGAL over time, whereas a Wilcoxon signed-rank test was used to assess differences acute and prolonged exercise. Data were presented as median (interquartile range) for uncorrected and creatinine and osmolality corrected. *Represents a significant difference from baseline, and^represents a difference from acute exercise. Discussion This is the first study that makes a direct comparison of the effects of acute versus prolonged exercise on eGFR and kidney injury biomarkers in healthy male adults. Furthermore, we are the first to use urinary cystatin C and osmolality to correct urinary biomarkers for changes in hydration status. We found that the eGFR cystatin C did not change after acute exercise, whereas it significantly decreased after prolonged exercise. Furthermore, the uncorrected uKIM1 concentration and uncorrected and osmolality corrected uNGAL concentrations were elevated after both acute and prolonged exercise, with higher levels after prolonged compared to acute exercise. Moreover, prolonged exercise was significantly higher compared to acute exercise for uncorrected, cystatin C corrected and osmolality corrected uKIM1 and uNGAL. These results suggest that acute exercise as well as prolonged exercise may be associated with kidney injury, in which lower levels of kidney injury biomarkers were found after acute compared to prolonged exercise. The absence of a decrease in eGFR cystatin C after a short bout of exercise suggests that the kidneys are well able to maintain kidney function in response to exercise and small perturbations in fluid balance. Literature reveals that the filtration fraction increases during exercise in response to a drop in renal blood flow, in which the increase in filtration fraction is caused by an increased vasoconstriction of the efferent arteriole (Poortmans 1984). As a result, the secretion of nitric oxide and prostaglandin E2 by the macula densa is upregulated, which results in a dilation of both the afferent and efferent arteriole and restoration of GFR (Poortmans 1984;Poortmans and Vanderstraeten 1994;Breyer and Breyer 2000). After prolonged exercise we did find a decrease in eGFR cystatin C, which is in line with previous studies with long distance runners and cyclists that demonstrated similar decreases in eGFR creatinine postexercise, which were restored 24 h postexercise (;;). It has been suggested that the transient alterations in eGFR are associated with the postexercise hydration status, but it may also be Figure 3. Urinary KIM1 concentration uncorrected (A), as well as after correction for cystatin C (B), creatinine (C), and osmolality (D), at baseline and after acute and prolonged exercise (n = 22). A Friedman test was used to examine differences in uKIM1 over time, whereas a Wilcoxon signed-rank test was used to assess differences acute and prolonged exercise. Data were presented as median (interquartile range). *Represents a significant difference from baseline, and^represents a difference from acute exercise. affected by exercise-induced inflammation or oxidative stress (). We did not find a correlation between the level of hypohydration and eGFR cystatin C after both acute and prolonged exercise. The strain of dehydration, inflammation, and oxidative stress is lower after acute compared to prolonged exercise, which might suggest that the kidneys are well able to preserve eGFR cystatin C after acute exercise, whereas eGFR cystatin C declines after prolonged exercise. The measurement of urinary biomarkers is likely to be influenced by changes in hydration status. Dehydration may impact urine concentration, which subsequently may overestimate the concentration of injury markers. Therefore, it is necessary to correct urinary biomarkers for changes in hydration status. We used urinary creatinine, cystatin C, and osmolality to correct our findings. Previous studies demonstrated, however, that serum and urine concentrations of creatinine may increase as a consequence of exercise-induced muscle breakdown (). On the other hand, urinary cystatin C levels may slightly increase as a consequence of a decreased proximal reabsorption due to kidney stress (). We used urinary cystatin C and creatinine concentrations to correct for changes in hydration status, while these correction methods both have limitations, since it may lead to an underestimation of the true effect of exercise on kidney injury. Alternatively, urine osmolality may be a better option to correct the data for hydration status. The urine osmolality is the most accurate measurement of total solute concentration and it therefore provides the best measurement of the kidney's concentrating ability (Armstrong 2005). As a result, the urine osmolality has previously been established as a valid measure for hydration status (Kavouras 2002), which might be used as a correction method. Therefore, we will discuss our results with respect to kidney injury based on the osmolality corrected data. We found increased urine osmolality corrected uNGAL levels after both acute and prolonged exercise, whereas the urine osmolality corrected uKIM1 concentration tended to be higher after prolonged exercise. These results suggest an exercise-induced development of kidney injury as a consequence of exercise-induced kidney stress. This is further supported by increased osmolality corrected uAlbumin and uGlucose levels after acute and prolonged exercise, which suggests that the proximal reabsorption of both substances is deteriorated as a consequence of kidney stress (;). In resting conditions, the proximal tubules almost completely reabsorb the NGAL that is produced continuously at low levels by neutrophils of different tissues (i.e., colon, trachea, and kidney epithelium) (Schmidt-Ott 2011; ). Additionally, the distal tubules secrete low levels of NGAL as well, resulting in low urinary concentrations (Schmidt-Ott 2011; Martensson and Bellomo 2014). In case of kidney stress, the proximal tubular uptake of NGAL is impaired and the NGAL expression and release are upregulated in the distal tubule (Devarajan 2008;Schmidt-Ott 2011). Both will increase the urinary excretion of NGAL, but the upregulated secretion of NGAL by the distal tubules is the primary source (). Therefore, the elevated osmolality corrected uNGAL levels after acute and prolonged exercise, as found in our study, suggest proximal tubular injury. Our findings are in line with previous studies that demonstrated increased uKIM1 and uNGAL levels after (ultra) marathon running (;;). However, the postexercise uncorrected uNGAL level after prolonged exercise found in our study (16.5 ng/mL) was lower compared to previous studies with postexercise values ranging from 37.6 to 47.0 ng/mL (;;). This might be explained by our relatively young population (23 years vs. >38 years), and the shorter period of exercise in our study (137 min vs. >240 min). Moreover, the uncorrected uNGAL levels in this study were far below the cutoff value (104 ng/mL) that has been used to diagnose kidney injury in clinical settings (). Therefore, moderate intensity exercise in young individuals results in subclinical kidney injury. Clinical relevance Our results demonstrate that healthy young male adults are well able to maintain eGFR cystatin C after acute exercise, whereas an average decline of 15.4 mL/min/1.73 m 2 (13.2%) and a largest decline of 43.2 mL/min/1.73 m 2 (35.3%) was found after prolonged exercise. Our results suggest that prolonged exercise with~3% hypohydration induces kidney stress, which result in kidney injury, as shown by increased osmolality corrected uKIM1 and uNGAL levels. Next to the detrimental effects of prolonged exercise and dehydration on kidney injury, previous studies also demonstrate that kidney injury might be influenced by heat stress, systemic inflammation, and renal perfusion (;;). One might argue that the impact of heat stress, inflammation, and renal perfusion is higher after prolonged compared to acute exercise, and could influence our results. However, within this study we did not measure heat stress (core body temperature), systemic inflammation, and renal perfusion. Therefore, it is hard to establish whether the increase in kidney injury biomarkers can be explained by prolonged exercise with 3% hypohydration solely, or by a combination of exercise duration, hypohydration, heat stress, inflammatory state, and renal perfusion. Future studies should therefore further elaborate on the relationship between exercise and 2018 | Vol. 6 | Iss. 11 | e13734 Page 9 kidney injury, in which more attention should be given to individual factors that influences kidney responses to exercise. Limitations The strength of this study is the well-controlled study design, in which subjects performed a continuous exercise bout at a constant workload with increasing levels of dehydration. However, there are some limitations that should be taken into account. First, by the absence of a measurement 24 h postexercise we were not able to determine whether the decline in kidney function and the induced kidney injury are temporary. However, previous studies demonstrated that the decline in kidney function and the increases in kidney injury markers already restored after 24 h of recovery (;). Second, spot urines were used for all laboratory analyses. Although spot urines correlate well with 24-h urine samples and have the potential to operate as a surrogate for the preferred 24-h urine collection, the use of spot urines is less accurate compared to a 24-h urine collection (van ). Moreover, the total urine volumes at baseline and after acute and prolonged exercise were not determined. Therefore, the urinary flow rate and urinary filtration over a period of time, which are potentially the best options to correct for changes in hydration status, cannot be calculated. Furthermore, within this study we did not measure core body temperature or inflammatory markers, while these factors can exacerbate kidney stress and elevate biomarkers for kidney injury. In conclusion, our results suggest that, in a group of healthy young male participants, acute exercise barely impact on eGFR cystatin C and biomarkers for kidney injury, whereas prolonged exercise is associated with a decline in eGFR cystatin C and a further increase in biomarkers for kidney injury. Follow-up studies are warranted to determine whether prolonged exercise-induced acute kidney injury is primarily due to exercise duration, hypohydration, heat stress and/or inflammation. |
import { BadRequestException, NotFoundException } from '@nestjs/common';
export class ShopCustomerAlreadyExistsException extends BadRequestException {
constructor() {
super('Shop customer already exists.');
}
}
export class ShopCustomerHasAlreadyPurchasedProductException extends BadRequestException {
constructor() {
super('It looks like you have already purchased this product. Please visit the FAQ page to see how to download it again.');
}
}
export class ShopCustomerWasNotFoundException extends NotFoundException {
constructor() {
super('Unable to find shop customer.');
}
}
|
After Steve Bannon's fall, what becomes of "Trumpism"?
The fall of Steve Bannon, who was regarded as President Trump’s chief ideologue not long ago, was as swift as it was satisfying. After last week’s publication of Michael Wolff’s tell-all book about the chaotic first year of the Trump administration, “Fire and Fury: Inside the Trump White House,” which included scathing quotes from Bannon about the president and his eldest son, the former White House chief strategist and executive chairman of Breitbart News was quickly abandoned by his biggest (read: wealthiest) political allies. He now faces political irrelevance after being forced to step down from Breitbart on Tuesday.
Indeed, Bannon was the man who translated Trump’s incoherent rants and xenophobic outbursts into a semi-coherent ideology. The liberal critic Lionel Trilling famously said that conservatives and reactionaries do not express themselves in ideas, “but in action or in irritable mental gestures which seek to resemble ideas,” and in Trump’s case this is certainly a fitting description. Bannon's task was to try to turn Trump’s irritable mental gestures into real — albeit terrible — ideas.
For Bannon, “making America great again” was always about pushing his far-right agenda and “destroying the state.” When he latched on to the Trump campaign, he appeared to have a golden opportunity to do just that. Bannon was and still is a fringe figure, and would have remained that way had it not been for Trump, who elevated him and gave him real power in the first place. Trump did so because he sympathized with Bannon’s racist and reactionary worldview on a visceral level, even if he did not grasp the reasoning behind it or the supposed complexities of his adviser’s thinking.
Bannon’s brief period near the pinnacle of power may be over, but he has left his mark on American politics. If “Trumpism” can be called an ideology (which is debatable), Steve Bannon is its true architect. Not surprisingly, then, the Trump administration has largely abandoned the tenets of Trumpism since Bannon left the White House last summer, adopting a more straightforward Republican agenda that favors big corporations and the wealthiest Americans (see the GOP tax bill). Trump is now surrounded overwhelmingly by establishment types, and thus his administration has become a fairly standard Republican operation, at least in terms of policy.
The one major difference, of course, is the president himself. Trump is still Trump — a pompous, primitive and bigoted blowhard with the temperament of a pubescent boy and the intellectual capacity of an illiterate caveman. For many MAGA supporters who have come to worship the president as much as he worships himself, that’s all that matters. |
Queen Elizabeth II has removed an antique gong framed with ivory from an Indian artifacts exhibition held on her Sandringham Estate to avoid angering conservationists.
The 91-year-old monarch's estate in the East Anglia region of England houses the museum which holds a special exhibition annually.
This year the theme of the exhibition is India to mark the 'UK-India Year of Culture 2017' and 70 years of Indian independence. Among the exhibits on display are items presented to the Queen and the British royal family over the years, many of them by Indian royalty during the Raj.
The gong was presented to the Queen's great grandfather George V during a state visit to India in 1911.
However, under modern day laws the display of ivory has come under strict scrutiny, requiring special exemption in many cases.
The Control of Trade in Endangered Species Act bans the display of "unworked ivory" for commercial gain and the offence carries a sentence of up to two years in jail and an unlimited fine. Additionally, the Queen's grandson and second in line to the throne Prince William is among the most vocal campaigners against ivory trade in the UK to protect endangered elephants around the world.
Last year, the Duke of Cambridge called for a complete ban on ivory trade in the UK.
"We know now what previous generations did not – ivory treated as a commodity is the fuel of extinction. Ivory is not something to be desired and when removed from an elephant it is not beautiful.
"So, the question is: why are we still trading it? We need governments to send a clear signal that trading in ivory is abhorrent," he had said at an international wildlife convention in November 2016.
The Museum at Sandringham holds a vast Royal Collection, including tiny Indian doll dancers in its Curio Cupboard and gifts in pearl and exotic hardwoods given to the Queen and members of the royal family on State Visits abroad.
"The exhibition of Indian artefact's in the Museum is proving popular with visitors," a Sandringham Estate statement said.
"It is our understanding that items on display at the Sandringham Estate comply with all existing regulation. However, in any case where there is a genuine doubt, the relevant specimen will be removed from display," it said.
The royal family's collection is believed to have around 1,200 historic ivory items and there is a growing effort to avoid them coming up on public display. |
import tkinter as tk
from PIL import ImageTk, Image
from os import listdir
import cv2
import numpy as np
root=tk.Tk()
root.title("DataX: Team OST, Plastic Part Matching")
#Init database
path=r"C:\Users\tobias.grab\IWK_data\test"
files=listdir(path)
nrOfFiles=len(files)
bf = cv2.BFMatcher()
fast=1
if fast==1:
img_database=np.load(r"C:\Users\tobias.grab\IWK_data\savedArrays\img_database.npy")
img_database=[img_database[i,:,:] for i in range(len(files))]
else:
img_database=[cv2.imread(path+'\\'+file,0) for file in files]
img_database_pillow=[ImageTk.PhotoImage(Image.fromarray(img).resize((320, 240),Image.ANTIALIAS)) for img in img_database]
def open_file():
from tkinter.filedialog import askopenfilename
file_path = askopenfilename(title=u'select file')
name=file_path.split("/")[-1]
img_to_match=cv2.imread(file_path,0)
img_to_match_pillow=ImageTk.PhotoImage(Image.fromarray(img_to_match).resize((320, 240),Image.ANTIALIAS))
if v.get()==1:
ALG=cv2.xfeatures2d.SURF_create()
elif v.get()==2:
ALG=cv2.xfeatures2d.SURF_create()
elif v.get()==3:
ALG=cv2.BRISK_create()
elif v.get()==4:
ALG=cv2.AKAZE_create()
elif v.get()==5:
ALG=cv2.KAZE_create()
img_database_fts=[ALG.detectAndCompute(img, None) for img in img_database]
draw_database=[ImageTk.PhotoImage(Image.fromarray(
cv2.drawKeypoints(img_from_database, img_database_fts[nr][0],None)).resize((320, 240),Image.ANTIALIAS)
) for nr, img_from_database in enumerate(img_database)]
(kps1, descs1) = ALG.detectAndCompute(img_to_match, None)
layout2=tk.Label(root)
layout2.place(relx=0.5,rely=0, relwidth=1, relheight=1,anchor='n')
label_img_to_match=tk.Label(layout2,image=img_to_match_pillow)
label_img_to_match.image=img_to_match_pillow
label_img_to_match.place(relx=0.3,rely=0.1, width=320, height=240,anchor='n')
label_img_database=tk.Label(layout2,image=draw_database[0])
label_img_database.image=draw_database[0]
label_img_database.place(relx=0.7,rely=0.1, width=320, height=240,anchor='n')
label_img_matched=tk.Label(layout2,image=draw_database[0])
label_img_matched.image=draw_database[0]
label_img_matched.place(relx=0.5,rely=0.5, width=640, height=240,anchor='n')
nrOfGoodPerImage=np.zeros([nrOfFiles,1])
image_list_matched=[]
def calc(j):
if j<nrOfFiles-1:
bf = cv2.BFMatcher()
kps2=img_database_fts[j][0]
descs2=img_database_fts[j][1]
matches = bf.knnMatch(descs1,descs2,k=2)
matchesMask = [[0,0] for i in range(len(matches))]
for i,(m,n) in enumerate(matches):
if m.distance < 0.75*n.distance:
matchesMask[i]=[1,0]
good = []
for m,n in matches:
if m.distance < 0.75*n.distance:
good.append([m])
nrOfGoodPerImage[j]=np.sum(matchesMask[:])
img3 = cv2.drawMatchesKnn(img_to_match,kps1,img_database[j],kps2,good,None,flags=cv2.DrawMatchesFlags_NOT_DRAW_SINGLE_POINTS)
img3_pillow=ImageTk.PhotoImage(Image.fromarray(img3).resize((640, 240),Image.ANTIALIAS))
image_list_matched.append(img3_pillow)
root.after(0, calc(j+1))
calc(0)
idx = (-np.squeeze(nrOfGoodPerImage)).argsort()[:3]
def matching(i):
if i<nrOfFiles-1:
label_img_database.config(image=draw_database[i])
label_img_matched.config(image=image_list_matched[i])
root.after(DELAY, lambda: matching(i+1))
elif i==nrOfFiles-1:
# my_label4=tk.Label(root,bg='#80c1ff')
my_label4=tk.Label(root,bg="LightSteelBlue1")
my_label4.place(relx=0.5,rely=0, relwidth=1, relheight=1,anchor='n')
org_label=tk.Label(my_label4,text="Image to match:\n"+name)
org_label.place(relx=0.15,rely=0.5,anchor='e')
org=tk.Label(my_label4,image=img_to_match_pillow)
org.place(relx=0.15,rely=0.5, width=320, height=240,anchor='w')
best_match_label=tk.Label(my_label4,text="Best Match:\n"+files[idx[0]])
best_match_label.place(relx=0.8,rely=0.2,anchor='w')
best_match=tk.Label(my_label4,image=img_database_pillow[idx[0]])
best_match.place(relx=0.8,rely=0.2, width=320, height=240,anchor='e')
best_match2_label=tk.Label(my_label4,text="Second Best Match:\n"+files[idx[1]])
best_match2_label.place(relx=0.8,rely=0.5,anchor='w')
best_match2=tk.Label(my_label4,image=img_database_pillow[idx[1]])
best_match2.place(relx=0.8,rely=0.5, width=320, height=240,anchor='e')
best_match3_label=tk.Label(my_label4,text="Third Best Match:\n"+files[idx[2]])
best_match3_label.place(relx=0.8,rely=0.8,anchor='w')
best_match3=tk.Label(my_label4,image=img_database_pillow[idx[2]])
best_match3.place(relx=0.8,rely=0.8, width=320, height=240,anchor='e')
# my_title2=tk.Label(my_label4,text="Matching finished! Displaying results...",font=("Helvetica",20), bg='#80c1ff')
my_title2=tk.Label(my_label4,text="Matching finished! Displaying results...",font=("Helvetica",20), bg="LightSteelBlue1")
my_title2.place(relx=0.5,rely=0.0, relwidth=0.4, relheight=0.05,anchor='n')
matching(0)
DELAY=10
HEIGHT=900
WIDTH=1400
canvas=tk.Canvas(root,height=HEIGHT, width=WIDTH)
canvas.pack()
# button_quit= tk.Button(root, text="Exit Program", command=root.quit)
# button_quit.pack()
my_title=tk.Label(root,text="Choose the algorithm you want to use",font=("Helvetica",16))
my_title.place(relx=0.5,rely=0.0, relwidth=0.4, relheight=0.1,anchor='n')
v = tk.IntVar()
v.set(1) # initializing the choice, i.e. Python
languages = [
("SIFT",1),
("SURF",2),
("BRISK",3),
("AKAZE",4),
("KAZE",5)
]
for txt, val in languages:
tk.Radiobutton(root,
text=txt,
padx = 10, pady=10,
variable=v,
value=val).place(relx=0.5,rely=0.1+val/40, relwidth=0.1, relheight=0.025,anchor='n')
my_title1=tk.Label(root,text="Choose the testimage:",font=("Helvetica",16))
my_title1.place(relx=0.5,rely=0.525, relwidth=0.4, relheight=0.1,anchor='n')
btn = tk.Button(root, text ='Open', command = lambda: open_file(),bg="LightSteelBlue1")
btn.place(relx=0.5,rely=0.6, relwidth=0.6, relheight=0.2,anchor='n')
root.mainloop() |
The safety report used to certify the plane is coming into question.
Experts across the globe are working to determine what caused the deadly Ethiopian Airlines crash and whether there was a connection between that and an earlier crash of the same plane model.
New reporting claims that engineers involved in evaluations of the plane -- a Boeing 737 Max 8 -- knew there were flaws in the original report used to certify the model before it was approved to fly.
The Seattle Times spoke to current and former engineers on the condition of anonymity about the safety analysis of the 737 Max control system.
Those engineers told the newspaper the safety analysis allegedly "understated the power of the new flight control system, which was designed to swivel the horizontal tail to push the nose of the plane down to avert a stall."
(@Bea_Aero/Twitter) Officials released this photo of the Flight Data Recorder for Ethiopian Airlines flight 302 which crashed on March 10, 2019, killing 157 people.
The engineers said that the safety analysis report also claimed the system "failed to account for" the fact that it would reset when a pilot intervened, according to The Seattle Times.
The Federal Aviation Authority said in a Monday statement, "We have no reports from whistleblowers [or] any other sources pertaining to FAA technical personnel being pressured to speed up certification of the Boeing 737 MAX."
Boeing, which is based in Seattle, echoed that statement with one of their own.
"The 737 MAX was certified in accordance with the identical FAA requirements and processes that have governed certification of all previous new airplanes and derivatives," Boeing said in their statement. "The FAA considered the final configuration and operating parameters of MCAS during MAX certification, and concluded that it met all certification and regulatory requirements."
This comes as Ethiopia's transport minister said Sunday that the latest crash showed "clear similarities" to a Lion Air crash with the same model of aircraft.
Dagmawit Moges told journalists flight recorder data showed links between the crashes of Ethiopian Airlines Flight 302 on March 10 and Lion Air Flight 610 in October, according to the Associated Press.
Moges didn't offer up specific details to support her claim, but she did say the government would release a detailed report within a month or so.
The French aviation authority, BEA, which has been working with the Ethiopian investigators confirmed Monday that upon inspection, the plane's flight data recorder did show clear similarities to the recording from the Lion Air flight.
Officials with the National Transportation Safety Board said they're working with the full cooperation of Ethiopian authorities to transcribe and analyze information retrieved from the flight data recorder, but that data hadn't been verified as of Sunday afternoon, sources with knowledge of the investigation said told ABC News.
In a letter from Boeing CEO Dennis Muilenberg, the company acknowledged that "based on facts from the Lion Air Flight 610 accident and emerging data as it becomes available from the Ethiopian Airlines Flight 302 accident, we're taking actions to fully ensure the safety of the 737 MAX."
"Work is progressing thoroughly and rapidly to learn more about the Ethiopian Airlines accident and understand the information from the airplane's cockpit voice and flight data recorders," according to the letter from Muilenberg.
The March 10 crash killed 157 people from more than two dozen countries when the Nairobi-bound Ethiopian Airlines flight plummeted shortly after takeoff.
The accident prompted the U.S. and other major countries to ground all Boeing 737 Max 8 jets until its safety could be confirmed.
The U.S. Federal Aviation Administration issued an emergency order to ground the jets on Wednesday, citing satellite-based tracking data that linked the Ethiopia jet's movements to those of Lion Air Flight 610, which killed 189 people when in crashed off Indonesia in October.
(Joe Raedle/Getty Images) An American Airlines Boeing 737 Max 8 pulls into its gate after arriving at the Miami International Airport from Saint Thomas, March 13, 2019, in Miami. American Airlines is reported to say that it will ground its fleet of 24 Boeing 737 Max planes.
Boeing issued a statement shortly after the transportation minister's press conference on Sunday, but it did not address her claims directly.
"While investigators continue to work to establish definitive conclusions, Boeing is finalizing its development of a previously announced software update and pilot training revision that will address the MCAS flight control law's behavior in response to erroneous sensor inputs," the statement said. "We also continue to provide technical assistance at the request of and under the direction of the National Transportation Safety Board, the U.S. Accredited Representative working with Ethiopian investigators."
"In accordance with international protocol," the statement continued, "all inquiries about the ongoing accident investigation must be directed to the investigating authorities." |
package com.sloniec.road;
import static com.sloniec.road.shared.commons.TimeCommons.formatTime;
import com.sloniec.road.framework.ModuleRunner;
import com.sloniec.road.shared.Context;
import java.io.IOException;
import java.time.LocalDateTime;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class App {
public static void main(String[] args) throws IOException {
log.info("Rozpoczeto prace programu");
LocalDateTime start = LocalDateTime.now();
Context context = Context.getInstance();
context.init(args);
ModuleRunner runner = new ModuleRunner();
runner.run();
LocalDateTime end = LocalDateTime.now();
log.info("");
log.info("Zakonczono prace programu w czasie: [{}]", formatTime(start, end));
log.info("Nacisniecie przycisku 'ENTER' zamknie to okno.");
System.in.read();
}
}
|
From Tomi Kilgore: A C$1.1 billion cannabis deal announced Monday helped to spark a broad rally in the broader marijuana sector to start the second quarter, even if shares of Origin House fell Monday as news broke of its acquisition by Chicago-based Cresco Labs Inc.
The ETFMG Alternative Harvest exchange-traded fund MJ, -0.77% rose 0.9% in afternoon trade, with 24 of 34 components trading higher. The ETF had soared 46% in the first quarter, the largest quarterly gain since inception in December 2015.
The Horizons Marijuana Life Sciences Index HMMJ, +0.05% advanced 0.5%, after rocketing 50% in the first quarter.
In comparison, the S&P 500 index SPX, -0.07% advanced 1.1% Monday, after rising 13.1% in the first quarter, the best quarterly performance since the third quarter of 2009.
Under terms of the deal, Cresco will exchange 0.8428 of its shares for each Origin House share outstanding. Based on Friday’s closing prices of the companies’ U.S.-listed shares, the exchange ratio would value Origin House’s stock at $9.48 each, a 4.9% premium.
Cresco’s stock slipped 0.5% in afternoon trade.
Origin House’s stock has nearly tripled (up 176%) over the past 12 months, while Cresco shares have run up 89% over the period.
Elsewhere, shares of Aphria Inc. APHA, -1.61% APHA, -0.98% surged 6.7%, after the company said its Aphria Deutschland GMBH subsidiary launched its first cannabidiol (CBD)-based nutraceutical, to be the first CBD-based cosmetics line for the German market.
Aphria said the CannRelief brand of products are being produced in the European Union, with the CBD oils being sold in both a 5% and 10% CBD concentration.
DionyMed Brands Inc.’s stock HMDEF, +7.70% fell hiked up 3.5%, erasing earlier losses of as much as 7.8%. The company announced late Friday that its California delivery service Hometown Heart has terminated its relationship with customer-acquisition services company Eaze Technologies Inc. DionyMed said following a review of Eaze’s business practices, it couldn’t confirm that Eaze’s credit card payment-processing methodology met regulatory compliance requirements.
“Deliveries made through Eaze in San Francisco and Oakland were providing approximately $2.9 million in revenues per month to [DionyMed] at an approximate 8% EBITDA [earnings before interest, taxes, depreciation and amortization] margin,” analyst Bobby Burleson at Canaccord Genuity wrote in a research note. “In the short term, we see a drag on [DionyMed] results both in terms of revenues and EBITDA as the company invests to grow its internal ‘Chill’ branded [direct-to-consumer] delivery service.
Burleson “modestly” reduced his 2019 revenue and EBITDA estimates, while affirming his 2020 estimates.
“Longer term, Chill should enhance margins (Cali Chill EBITDA margins roughly 30%), as it replaces lost Eaze revenue,” Burleson wrote.
Among other more-active weed stocks, Aurora Cannabis Inc. ACB, -1.97%ACB, -1.39% rose 1.4%, after soaring 83% in the first quarter, to lift its market capitalization to over $9 billion.
Shares of Cronos Group Inc. CRON, -2.15% CRON, -2.25% advanced 1.2%, Canopy Growth Corp. CGC, +0.52% WEED, +0.58% gave up 1.7%, CannTrust Holdings Inc. CTST, -2.81% TRST, -1.97% rose 4.2%, Hexo Corp. HEXO, -2.45%HEXO, -1.66% climbed 2.0%, Tilray Inc. TLRY, +1.67% shed 4.3% and Aleafia Health Inc. ALEF, -1.06% swung higher to a 1.1% gain.
MedMen Enterprises Inc.’s stock MMNFF, +0.02% slipped 1.4%, after rising 8.9% the first quarter. The company said before the open at it closed its acquisition of licensed cannabis retailer northern California-based Sugarleaf Trading Co., to give it 32 operational stores in 12 states.
The ETFMG Alternative Harvest ETF (MJ) was trading at $36.33 per share on Tuesday afternoon, down $0.30 (-0.82%). Year-to-date, MJ has gained 11.70%, versus a 7.55% rise in the benchmark S&P 500 index during the same period. |
Sputter alloying of Ni, Ti and Hf for fabrication of high temperature shape memory thin films Abstract In the present paper, the fabrication and characterisation of typical high temperature Ni(Ti+Hf) alloyed thin films produced by simultaneous sputter deposition from separate elemental Ni, Ti and Hf targets are presented. Film composition, determined by energy dispersive X-ray spectroscopy, was controlled by adjusting the ratio of powers applied to each target. Films deposited at room temperature had an amorphous structure and subsequent annealing at 550°C was carried out in a high vacuum environment, based on crystallisation temperature evaluation by differential scanning calorimetry (DSC). High temperature martensitic transformation, confirmed by DSC and variable temperature X-ray diffraction (XRD), was achieved by deposition of (Ti+Hf) rich NiTiHf films. Any slight change of composition towards Ni rich reduced the transformation temperature. Atomic force microscopy and XRD illustrated that the films had a fine grain structure (∼100 nm). One way shape memory effect was observed at ∼200°C in a film with composition of 156 at.-%Hf. |
. Understanding the (patho-)physiology of volume regulation and osmoregulation is fundamental to guide patient advice and therapy in chronic kidney disease (CKD). Volume regulation primarily impacts the amount of sodium in the body, and it mainly affects the extracellular space, while osmoregulation primarily impacts the amount of free water, and it affects both the intra- and extracellular space. The kidneys control water and sodium homeostasis both through their sensor (e.g. tubuloglomerular feedback) and regulator systems (e.g. sodium reabsorption). Many CKD patients are advised by non-nephrologists to a high fluid intake, although they often do not require a daily intake of more than 1.5 litres. Many CKD patients are hypervolemic, and sodium restriction is of key importance in patients' effort to utilize lifestyle changes as therapeutic means. Pharmacologically, (particularly loop) diuretics are the basis of therapy, increasing sodium excretion. Recent developments shift the focus towards classes of drugs ameliorating prognosis in CKD: sodium-glucose linked transporter 2 (SGLT2) inhibitors have proven beneficial in heart and renal failure - by sodium and fluid excretion, among others; additionally, a novel mineralocorticoid receptor antagonist (MRA), finerenone, was recently shown to improve prognosis in CKD. |
./dependencies/H/src/ios/HPluginCommand.h
|
Dual-parameter model for prediction of type I diabetes mellitus. The recent cloning and recombinant expression of novel islet autoantigens has made possible the determination of whether the quantitative expression of autoantibodies to these molecules is correlated with age of diabetes onset and rate of progression to diabetes, similar to insulin autoantibodies (IAAs). We measured autoantibodies reacting with GAD65 (GAD65AA), ICA512 (ICA512AA), and insulin in patients who recently had received a diagnosis of diabetes and in first-degree relatives prospectively identified and then followed because of the expression of high titers of ICA. Levels of IAAs (but not GAD65AA or ICA512AA) correlated inversely with age at diagnosis of diabetes and directly with time to diabetes onset among the ICA-positive relatives. In multiple linear regression models, the level of IAAs remained a significant predictor of the time to diabetes after allowing for first-phase insulin secretion. The unique and dramatic association of IAAs with progression to diabetes suggests that IAAs contribute directly to disease pathogenesis or that levels of IAAs are influenced uniquely by the process, leading--at different rates in different prediabetic individuals--to type I diabetes. In addition, the linear regression model described (involving two variables, first-phase insulin secretion and levels of IAAs) aids in the prediction of time to diabetes among ICA-positive relatives. |
package net.natroutter.minicore.handlers.features;
import org.bukkit.ChatColor;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.SignChangeEvent;
public class SignColors implements Listener {
@EventHandler
public void onSignChange(SignChangeEvent e) {
if (e.getPlayer().hasPermission("minicore.signcolor")) {
for (int i = 0; i < e.getLines().length; i++) {
String line = e.getLine(i);
e.setLine(i, ChatColor.translateAlternateColorCodes('&', line));
}
}
}
}
|
Committed emissions from existing energy infrastructure jeopardize 1.5 °C climate target Net anthropogenic CO2 emissions must approach zero by mid-century to stabilize global mean temperature at the levels targeted by international efforts15. Yet continued expansion of fossil fuel energy infrastructure implies already committed future CO2 emissions613. Here we use detailed datasets of current fossil fuel-burning energy infrastructure in 2018 to estimate regional and sectoral patterns of committed CO2 emissions, the sensitivity of such emissions to assumed operating lifetimes and schedules, and the economic value of associated infrastructure. We estimate that, if operated as historically, existing infrastructure will emit ~658 Gt CO2 (ranging from 226 to 1479 Gt CO2 depending on assumed lifetimes and utilization rates). More than half of these emissions are projected to come from the electricity sector, and infrastructure in China, the U.S.A., and the EU28 represent ~41%, ~9% and ~7% of the total, respectively. If built, proposed power plants (planned, permitted, or under construction) would emit an additional ~188 (37427) Gt CO2. Committed emissions from existing and proposed energy infrastructure (~846 Gt CO2) thus represent more than the entire carbon budget to limit mean warming to 1.5 °C with 5066% probability (420580 Gt CO2)5, and perhaps two-thirds of the budget required to similarly limit warming to below 2 °C (11701500 Gt CO2)5. The remaining carbon budget estimates are varied and nuanced14,15, depending on the climate target and the availability of large-scale negative emissions16, Nevertheless, our emission estimates suggest that little or no additional CO2-emitting infrastructure can be commissioned, and that earlier than historical infrastructure retirements (or retrofits with carbon capture and storage technology) may be necessary, in order meet Paris climate agreement goals17. Based on asset value per ton of committed emissions, we estimate that the most cost-effective premature infrastructure retirements will be in the electricity and industry sectors, if non-emitting alternative technologies are available and affordable4,18. the most cost-effective premature infrastructure retirements will be in the electricity and industry sectors, if non-emitting alternative technologies are available and affordable 4,18. International efforts to limit the increase in global mean temperature to well below 2 °C and to "pursue efforts" to avoid 1.5 °C entail a transition to net-zero emissions energy systems by mid-century. Yet recent decades have witnessed an unprecedented expansion of historically long-lived fossil fuel energy infrastructure, particularly associated with rapid economic development and industrialization of emerging markets such as China and India 9,10 and a shift towards natural gas-fired power plants in the U.S. Although such expansion may be slowing 19,20, substantial new electricity generating capacity is proposed -and in many cases already under construction 12. Consequently, there is a tension between dwindling carbon emissions budgets and future CO 2 emissions locked-in or "committed" by existing and proposed energy infrastructure 6,21,22. A 2010 study estimated that operating fossil energy infrastructure would emit ~500 Gt CO 2 over its lifetime 8. Subsequent studies estimated that existing power plants alone committed ~300 Gt CO 2 as of 2012 and 2016 9,12, and existing and proposed coal-fired power plants represented 340 Gt CO 2 as of 2016 11 (Extended Data Table 1). Other studies have used integrated assessment models (IAMs) to assess the economic costs of "unlocking" emissions under stringent climate goals 23,24, and to identify "points of no return" where no new infrastructure can be built without exceeding the 2°C target 25. Most recently, Smith et al. 13 explored the potential climate responses to committed emissions, using a reducedcomplexity climate model and an idealized phase-out of fossil infrastructure to argue that aggressive mitigation of non-CO 2 forcing could yet limit global warming to 1.5°C. However, it has been nearly a decade since a comprehensive bottom-up assessment of fossil infrastructure and committed emissions was made, during which years China's economy has grown tremendously, there has been a global financial crisis and a natural gas boom in the U.S., and the Paris Agreement was ratified and entered into force. Substantial new fossil energy infrastructure has been commissioned over this time period, proposals of new power plants have waxed and waned, and climate mitigation efforts have grown more ambitious in many countries. Here, we present region-and sector-specific estimates of future CO 2 emissions related to fossil fuel-burning infrastructure existing and power plants proposed as of the end of 2018, as well as the sensitivity of such estimates to assumed lifetime and utilization rates, and the economic value of associated energy assets. Our analyses are based upon a compilation of the most detailed and up-to-date datasets of energy infrastructure available, as described in the Methods section. Our central estimates assume historical lifetimes (e.g., 40 years for power plants and industrial boilers, 15 years for a light-duty vehicle, etc.) and utilization rates (e.g., region-and fuel-specific power plant capacity factors, region-specific averages of vehicle fuel economy and annual kilometers traveled). Figure 1 shows future CO 2 emissions from existing and proposed energy and transportation infrastructure by sector (Fig. 1a) and country/region (Fig. 1b). We estimate that cumulative emissions by existing infrastructure, if operated as historically, will be 658 Gt CO 2. Of this total commitment, 54% or 358 Gt CO 2 is anticipated to come from existing electricity Tong infrastructure (mainly power plants), reflecting the large share of annual emissions from electricity infrastructure (46% in 2018) and the long historical lifetimes of generating infrastructure. Another 25% of the total, or 162 Gt CO 2, is related to industrial infrastructure, and 10% or 64 Gt CO 2 is related to the transportation sector (mainly on-road vehicles; Fig. 1a). This difference reveals the effect of infrastructure lifetimes: although industry and road transportation sectors have similar annual CO 2 emissions (6.2 and 5.9 Gt CO 2 in 2018, respectively), vehicle lifetimes are roughly a third as long as industrial capital. Finally, existing residential and commercial infrastructure represent 42 Gt CO 2 and 18 Gt CO 2 of all committed emissions, respectively. In addition to existing infrastructure, new power plants are being planned, permitted, or constructed, and the committed emissions related to such proposed plants may be estimated 11,12. As of the end of 2018, the best-available data showed 579 GW, 583 GW, and 40 GW of coal-, gas-, and oil-fired generating capacity were proposed to be built over the next several years, respectively (~20% of it in China; Fig. 2). If built and operated as historically, this proposed capacity would represent an additional 188 Gt CO 2 committed: 97 Gt CO 2 from coal-, 91 Gt CO 2 from gas-, oil-, and other-fuel-fired generating units (Table S2). Together, committed emissions from existing infrastructure and proposed power plants total 846 Gt CO 2 if all proposed plants are built and all infrastructure operated as historically (Fig. 1). Existing electricity and industry infrastructure accounts for 79% of total committed emissions if operated as historically (i.e. with a 40-year lifetime and 53% utilization rate; Fig. 1a). However, the lifetime and operation of such infrastructure will ultimately depend on the relative costs of competing technologies, in turn influenced by factors such as technological progress and the climate and energy policies in each region 22,26. Figure 3 highlights the sensitivity of committed emissions (Figs. 3a and 3b) and the rate of annual emissions reductions (Figs. 3c and 3d; see Methods) to the assumed lifetime and utilization rates (i.e. capacity factors) of industry and electricity infrastructure (n.b. lifetimes and operation of infrastructure in other sectors are not varied from historical averages), with the star in each panel indicating historical average values. For example, total committed emissions related to existing infrastructure decrease to ~200 Gt CO 2 if lifetimes are and capacity factors decrease to 20 years and 20%, respectively, but increase to almost 1500 Gt CO 2 if lifetimes and capacity factors increase to 60 years and 80%, respectively (Fig. 3a). These ranges of lifetimes and utilization are quite wide, at the low end probably exceeding economic feasibility for recouping capital investments and covering fixed operating and maintenance costs. When proposed power plants are included, total committed emissions over the same range of lifetimes and capacity factors increase to 263-1906 Gt CO 2 (Fig. 3b). Maintaining historical capacity factors, a 5-year difference in the lifetime of existing infrastructure represents roughly 70-100 Gt of future CO 2 emissions (Fig. 3a), or about 90-130 Gt if proposed power plants are included (Fig. 3b). Maintaining historical lifetime and changing the assumed capacity factor by a comparable 9% (e.g., from 46% to 55%) results in roughly the same changes in committed emissions, suggesting these factors have a similar influence. For comparison, the hatched red and orange zones in Figures 3a and 3b 5. This suggests that, unless compensated by negative emissions technologies or retrofitted with carbon capture and storage, 1.5°C carbon budgets allow for no new emitting infrastructure and require substantial changes to the lifetime or operation of already existing energy infrastructure (e.g., decreasing lifetimes to <25 years or capacity factors to <30%; Fig. 3a). Moreover, CO 2 emissions related to the extraction and transport of fossil fuels 27 and non-energy CO 2 emissions (e.g., due to land use change) 28 are not included in our estimates and will further reduce the remaining carbon budgets. Climate targets have also sometimes been contextualized by the annual rate of emissions reduction they imply. For example, Raupach et al. 29 showed, as of 2013, the cumulative Given the constraints of 1.5°C and 2°C carbon budgets, we also explore the economic value of existing infrastructure relative to its associated committed emissions. Figure 4a highlights the disproportionality of committed emissions per unit asset value. Together power and industry infrastructure (purple and dark blue in Fig. 4a, respectively) represent >75% of total committed emissions (519 of 658 Gt CO 2 ) but <25% of the estimated economic value of CO 2 -emitting energy infrastructure (~$5 trillion of $22 trillion; Extended Data Fig. 4; Table S3; see Methods for details of how asset values were amortized). In contrast, transportation infrastructure, with shorter average lifetimes but high capacity costs and a vast number of discrete units, represents roughly two-thirds of the value of emitting assets and less than 10% of committed emissions (Fig. 4a). This analysis suggests that efforts to reduce committed emissions might cost-effectively target early retirement of electricity and industry infrastructure-despite their often powerful influence on policy and institutions 6,21,22 -if non-emitting alternative technologies are affordable: the magnitude of commitments in these sectors is large and a single dollar of asset value is related to >10 kg of future CO 2 emissions ( Fig. 4b; red rectangle). Industry and electricity sectors in China represent especially prime targets for unlocking future emissions: nearly half (46%) of these sectors' committed emissions are associated with Chinese infrastructure (Fig. 4a). Detailed and up-to-date analysis of existing and proposed CO 2 -emitting energy infrastructure worldwide reveals incredibly tight constraints of current international climate targets even if no new emitting-infrastructure is ever built. Although climate and energy analysts have emphasized that avoiding 1.5°C of warming, for example, remains "technically possible" 5, our results lend vivid context to that possibility: we would have a reasonable chance of achieving the 1.5°C target with a global prohibition of all new CO 2 -emitting devices-including many or most of the already proposed fossil fuel-burning power plants, and substantial reductions in the historical lifetimes and/or utilization rates of already existing industry and electricity infrastructure. Barring such radical changes, the global climate goals adopted in the Paris Agreement are already in jeopardy and may be contingent upon widespread retrofitting of existing emitting infrastructure with carbon capture and storage technologies (which retrofits would be tremendously expensive 30 ), large-scale deployment of negative emissions technologies 16, and/or solar radiation management 4. On the other hand, our results suggest that the level of future warming in excess of the Paris targets is largely dependent on infrastructure that has not been built yet (Extended Data Fig. 5). Some important caveats and limitations apply to our findings. The trajectory of future emissions depicted in Figure 1 represents a scenario in which existing (and proposed) emitting infrastructure "ages out," and no new emitting infrastructure is ever commissioned. These constraints are not intended as realistic; rather, they allow us to isolate and quantify infrastructural-and related economic-lock-in of energy-related emissions 22. Indeed, technological trends and climate-energy policies that encourage growth in renewable electricity (e.g., solar and wind) may lead to earlier than historical retirements of existing fossil fuel power plants in some regions, although recent growth of renewable generation has not always displaced fossil generation 18. It is also instructive to compare our estimates of committed emissions to plausible energy-emissions scenarios generated by much more sophisticated (but less transparent) IAMs that calculate infrastructure lifetimes and capacity factors endogenously. For example, a recent IAM study of 1.5°C scenarios found that largescale carbon dioxide removal may be necessary to compensate for "residual" emissions from long-lived and difficult-to-decarbonize sectors of the energy system (e.g., freight, aviation, and shipping 4 ) 31. The size of carbon budgets associated with a given temperature target is also a complicated matter that is sensitive to a host of factors such as climate sensitivity and non-CO 2 emissions 14,15. The budgets from the recent IPCC Special Report are estimates of cumulative net global anthropogenic CO 2 emissions from the start of 2018 until net-zero global CO 2 emissions are achieved (i.e. climate is stabilized) with a 50-66% probability of limiting an increase of mean near-surface air temperatures to 1.5°C or 2°C with limited (<0.1°C) or no overshoot 5 (see Methods for further discussion). Although ambitious climate targets such as 1.5°C may help to motivate and accelerate the transition toward net-zero energy systems, their feasibility is often evaluated by the existence of consistent scenarios from IAMs. However, these models have been used to analyze a very large possibility space, and some scenarios may thus reflect aspirational trajectories of energy demand or technological progress and scale whose likelihood may be difficult to evaluate 32,33. Our data-driven assessment of existing, operating, and valuable energy infrastructure may therefore help to elucidate the infrastructural and economic implications of such targets, and also help to identify targeted regional and sectoral opportunities for unlocking future CO 2 emissions. Committed emissions from existing and proposed infrastructure We extend the approach of Davis et al 9 to quantify the committed emissions from existing energy infrastructure by integrating more detailed and up-to-date data of energy infrastructure available, including country-and duty-specific vehicle sales data, and unitlevel details of global power plants and Chinese cement kilns and blast furnaces 10,34-39. We also estimate committed emission from proposed power plants by collecting all proposed power generators from the latest available databases 34,37, in recognition of substantial changes in the pipeline of planned power plants (especially coal) in recent years 34. Energy infrastructure as quantified in this study is categorized into eight sectors: electricity, industry, road transport, other transport, international transport, residential, commercial and other energy infrastructure (see Tables S4 and S5). Electricity infrastructure Emissions from electricity infrastructure in this study include all emissions under category 1A1 of the IPCC's Revised Guidelines 40. Electricity infrastructure here mainly includes main activity electricity and heat production (1A1a), and petroleum refining (1A1b), as well as manufacturing of solid fuels and other energy industries (1A1c) ( Table S5). 35 (for older units) or else use national or regional average CO 2 emission intensity for units with the same fuel type and similar nameplate capacity. As prior studies have done, we assume these emissions intensities are constant over a unit's lifetime 8,9. Assumed lifetime.-In the resulting GPED-2018, global average lifetimes of retired coal-, nature gas-, and oil-fired power units is 35.9, 37.1, and 33.9 years, respectively. Consistent with prior study 9 have done, we simplify these ranges to a single reference lifetime of 40 years for all electricity-generating units for our "as historically" case, and show the sensitivity of committed emissions to this assumption in Figure 3. When units already operating beyond their assumed lifetime, these units are randomly retired over the next 5 years in order to avoid unrealistically abrupt changes in emissions between 2018 and 2019. In addition, we assume that the age structure and lifetime of autoproducers (industrial and commercial facilities which generate their own electricity on-site) 40 and other energy industries are similar to the main activity power plants in each region. Therefore, committed emissions from existing electricity infrastructure are quantified by employing the survival curves derived from main activity power plants, scaled to include these other types of electricity infrastructure using country-level electricity emissions totals in 2018 from the International Energy Agency (IEA). It is noted that the country-level CO 2 emissions from fossil fuel combustions for 2018 were derived from multiplying country-level CO 2 emissions in 2016 by projected change rates during 2016-2018 due to data availability 41. Finally, we quantify the cumulative future CO 2 emissions from proposed power plants by the same procedure (assuming historical average unitization rates and lifetimes) using a database of proposed coal-fired units that has been developed by CoalSwarm 34 Industry infrastructure Industrial emissions in this study include all emissions under category 1A2 of the IPCC's Revised Guidelines 40. For all countries but China, we estimate cumulative future emissions from industry infrastructure using country-level emissions data for the year 2018 obtained from the IEA and assuming that the age distribution and survival curves of each region's industry infrastructure is consistent with its electricity infrastructure. To derive China's industrial survival curves, we use unit-level details of cement kilns and blast furnaces (iron & steel) currently operating in China (Extended Data Fig. 2), obtained from China's Ministry of Ecology and Environment (MEE) (unpublished data, hereinafter refer to as the MEE database). The detailed data of Chinese infrastructure represent an important improvement in the current study over prior estimates of committed emissions, as we China alone accounts for ~47% of total industrial emissions 41. In particular, the iron/steel and non-metallic minerals (e.g., cement and glass) industries account for ~50% of all industrial CO 2 emissions in recent years 41, and China produced 49.6% of the world's raw steel and 57.3% of the world's cement in 2016 42. The unit-level data of China's industrial infrastructure thus substantially decreases uncertainty of committed industry emissions by alleviating the need for assumptions related to almost half of global industry infrastructure (i.e. 9.0% of global CO 2 emissions from all sources 41 ). Moreover, we observed that the age distributions of electricity and industry infrastructure in China are quite similar (Extended Data Fig. 6), which lends support to our assumption that this is the case in other regions where we lack detailed data of industrial infrastructure. Transportation infrastructure Transport emissions in this study include all emissions under category 1A3 of the IPCC's Revised Guidelines 40, which includes emissions from road transport, other transport and international transport (Tables S4 and S5). Cumulative future emissions from road transport were calculated following the approach in Davis et al. 8 and further updating the activity rates with updated country-, region-, and dutyspecific vehicle sales data 38 "Other transportation" infrastructure includes existing aviation, rail, pipeline, navigation and other non-specified transport. International transport infrastructure includes international marine bunkers and international aviation bunkers in this work (Table S4). Again, we follow Davis et al. 8, estimating cumulative future CO 2 emissions from existing other and international transport using country-level emissions data of 2018 from IEA, and assuming lifetimes and age distributions similar to motor vehicle fleets in each country/region. Residential, commercial and other energy infrastructure Residential and commercial emissions are included under category 1A4 of the IPCC's Revised Guidelines 40, and "Other energy" emissions include, e.g., emissions from agriculture, forestry, fishing, and aquaculture under category 1A4 as well as and stationary, mobile, and multilateral operations under category 1A5 of the IPCC's Revised Guidelines. Cumulative future emissions from this infrastructure were calculated using country-level emissions data of 2018 derived from the IEA 41, and assuming age distributions and lifetimes of residential, commercial and other energy infrastructure in each region were similar to electricity infrastructure in the same region in the absence of better information. The least-supported methodological assumptions we make thus concern this residential, commercial and other energy infrastructure (~10% of total fossil fuel CO 2 emissions in 2016 41 ), where we lack any unit-level data. In order to test the sensitivity of total committed emissions from this infrastructure, we performed additional analyses of different assumed lifetimes. We found the committed emissions from residential, commercial, and other energy infrastructure are 29, 74, and 135 Gt CO 2 when lifetimes of 20, 40, and 60 years are assumed, respectively (Extended Data Fig. 7). That is, our estimates of total committed emissions from all existing energy infrastructure decrease by 7% (to 613 Gt CO 2 ) if lifetimes of residential, commercial, and other energy infrastructure are assumed to be 20 years, and increase by 9% (to 719 Gt CO 2 ) if the lifetimes are assumed to be 60 years. In comparison to the carbon budgets associated with targets of 1.5 °C and 2 °C, these are relatively small effects, and not substantial enough to affect the main conclusions of our study. Comparison of cumulative future emissions estimates Other studies have analyzed committed emissions of various infrastructure in different ways, as mentioned in the text and summarized in Extended Data Table 1 8,9,. For example, both Edenhofer et al. 11 and Pfeiffer et al. 12 reported committed emissions related to existing and planned power plants using 2016 data. Although the latter analyzed committed emissions of all fossil electricity infrastructure 12, the former focused particularly on coal-fired units 11. Importantly, the 2018 data used in the current study reveals that substantial cancellations of proposed plants have occurred over the intervening two years: whereas the previous studies estimated ~150 Gt CO 2 and 210 Gt CO 2 were committed by proposed coal plants, we estimate only ~100 Gt CO 2, 50-100 Gt CO 2 less, respectively (or 10-20% of the remaining carbon budget consistent with 1.5°C, respectively). Moreover, our study contains more detailed estimates of regional commitments and the sensitivity of these commitments to assumed lifetime and capacity factor. Most recently, Smith et al. 13 estimated the global warming related to committed emissions using a reduced-complexity climate model (FaIR). Their study also included estimates of committed emissions from all sectors, but these relied on past estimates of the age distribution of fossil fuel infrastructure and an idealized, linear phase-out of such infrastructure 13. Because turnover of infrastructure has decreased the median age of electricity generating capacity in many regions (Fig. 2), our estimates of electric power sector commitments (358 Gt CO 2 ) are ~13 Gt CO 2 greater than those used by Smith et al 13 (345 Gt CO 2 ). Our data-driven approach also permits region-specific results, analysis of the trend in commitments over time, inclusion of proposed power plants, and an assessment of the economic value of underlying infrastructures. Yet, because Smith et al.'s estimates of CO 2 emissions committed by other infrastructure are larger than our bottom-up estimates (Extended Data Table 1), the overall estimate reached by their idealized approach (715 Gt CO 2 ) is nonetheless similar to that of the current study (658 Gt CO 2 ). In turn, Smith et al. 13 assess the global climate responses to the committed CO 2 and conclude that the world is not yet committed to 1.5°C 13. However, it is difficult to directly compare the magnitude of the CO 2 emissions in Smith et al.'s phase-out scenarios with the SR1.5 carbon budgets for two reasons: First, although SR1.5 also used the FaIR model in its procedure of evaluating non-CO 2 forcing, it did not use the FaIR model's transient climate response to cumulative emissions (TCRE), which is smaller and would have led to considerably larger carbon budgets. Second, the mitigation scenarios evaluated by Smith et al. also assumed that non-CO 2 emissions are completely phased out in parallel to CO 2, while the integrated assessment model scenarios on which the SR1.5 report's non-CO 2 forcing (and carbon budgets) are based do not completely eliminate non-CO 2 emissions this century 45. Variation of utilization rates and assumed lifetimes As described above, cumulative future committed emissions from electricity and industry infrastructure depend on utilization rates and assumed lifetimes. The longer the assumed lifetime and higher the utilization, the greater the estimate of committed emissions will be. In this study, we therefore test the sensitivity of committed emissions to assumed lifetimes and utilization rates of energy and industry infrastructure across lifetimes from 20 to 60 years and utilization rates of 20% to 80%. Remaining carbon budgets to limit mean warming to 1.5 and 2 °C As described in the text and discussed in recent literature, the size of carbon budgets associated with a given temperature target is a complicated matter that is sensitive to a host of factors 14,15, including whether the budget reflects cumulative net emissions until the temperature target is exceeded or cumulative net emissions that limits global temperature increase to below the target (i.e. climate is stabilized), whether there can be a temporary overshoot of the temperature target (and by how much) 46, the climate responses to CO 2 and non-CO 2 forcings 47, the magnitude and Earth system response to negative emissions 48, how global temperature is calculated, the pre-industrial baseline used 49, whether Earth system feedbacks such as permafrost thawing are included, and future emissions of non-CO 2 greenhouse gases and aerosols 54,55. The magnitude of non-CO 2 forcing is particularly relevant to assessments of committed emissions because non-CO 2 forcing is inversely related to the remaining carbon budget 54,55, and because some non-CO 2 greenhouse gases and aerosols are directly related to the current energy system (e.g., fugitive methane 56 ) or are co-emitted with CO 2 by fossil fuel-burning infrastructure. Other large sources of non-CO 2 gases and aerosols exist outside of the energy system, such as agriculture 57. For the SR1.5 budgets, non-CO 2 forcing was estimated using integrated assessment model scenarios and a pair of reduced-complexity climate models (MAGICC and FaIR), with substantial uncertainties associated with both scenario variations (±250 Gt CO 2 ) and climate responses (-400 to 200 Gt CO 2 ) for the 1.5°C budget 5. Non-CO 2 greenhouse gases and aerosols decline but do not reach zero in any of the scenarios assessed by the SR1.5 report. In contrast, the recent study by Smith et al. modeled the complete phase-out of non-CO 2 emissions in parallel with energy-related CO 2 emissions, a formidable scenario that was found to have a high probability (64%) of limiting warming to 1.5°C 13. In this study, we compare our estimates of committed emissions to the SR1.5 budgets 5. As defined by the recent SR1.5 report, remaining carbon budgets are the cumulative net global anthropogenic CO 2 emissions from a given start date (January 1, 2018) to the year in which such emissions reach net zero that would result, at some probability, in limiting global warming to a given level 5. By this definition, budgets are not simply cumulative emissions until the time when mean temperature exceeds a given threshold 14, but rather what have been called "threshold avoidance" or called "stabilization" budgets. The SR1.5 budgets were derived from the transient climate response to cumulative CO 2 emissions in climate model simulations that have been further adjusted to include additional climate forcing related to non-CO 2 greenhouse gases and aerosols 45. They do not include Earth system feedbacks (which the report suggests could reduce the remaining budgets by 100 Gt CO 2 over the century). However, as remaining budgets associated with mean surface warming of 1.5°C dwindle, uncertainties in transient climate response to CO 2 emissions 15,47 and the current and future non-CO 2 forcing loom large. In order to make our results as useful, transparent, and comparable as possible, we report positive, CO 2 -only commitments from existing and proposed fossil fuel-burning infrastructure and compare to these to the remaining (stabilization) carbon budgets reported by the SR1.5 report to give a 50-66% probability of limiting warming to 1.5°C and 2°C with little (0.1°C) or no overshoot: 420-580 Gt CO 2 and 1170-1500 Gt CO 2, respectively (See Table 2.2 in ref. 5 ). Thus, if not offset by negative emissions, the total committed emissions we estimate if existing infrastructure operates as it has historically (i.e. 658 Gt CO 2 ) would make it likely that global temperatures will exceed 1.5°C unless the remaining carbon budgets in the SR1.5 are substantially wrong. For example, the climate response to CO 2 could be less than expected based on the climate model simulations the SR1.5 assessed and/or non-CO 2 forcing in the future could be much less than it is on average in the integrated assessment model scenarios that were assessed by the SR1.5. Indeed, Smith et al. 13 analyzed a future where both are true. Estimates of the annual rate of emission reductions We estimate annual rate of emissions reduction ("mitigation rates") following Raupach et al 29 : where f(t) is the emissions at time t, f 0 is the emissions at the start of mitigation (t = 0), r is an initially linear growth rate, and r and m both have units of per year. When the necessary annual rate of emission reductions to meet quota q from t=0 onward (with emission time T = q/f0), we estimate the annual rate of emission reductions, m, as: We use initial emissions f 0 at 2018 and growth rates r averaged over 2013-2018. Therefore, f 0 = 32.7 Gt and r = 0.028% used obtained from IEA 41 when estimating mitigation rates under different cumulative CO 2 emissions, which we assumed to be equivalent to the carbon quota, q. Estimates of asset value from existing infrastructure We estimate the asset value by sector and by country/region using the following equation: where i, s, n, y represents country/region, sector, years, and combustion/production technology, AV represents asset value, TC represents equivalent total capacity, CC represents capital costs, RV represents the ratio of residual value, and 5% is applied for all the infrastructure; DR represents depreciation rate, PY represents present year, referring 2018 in this study.LT represents lifetimes. We adopt sector-dependent method, and apply straight-line and geometric models for different infrastructure, as shown in Table S6. Data on capital costs used to estimate the asset value was collected from previous literature 12,21,58,59 and various reports. Wherever possible, we use interannual and national average capital costs for different combustion/production technology and equipment. Where an interannual and national averages were not available, we instead use an average of all the countries in the same region where capital cost data were available. Electricity infrastructure We estimate the total value of fossil fuel electricity-generating assets according to each unit's power generating capacity (kW) and age, as well as fuel-and technology-specific capital costs ($/kW). The assumed lifetime of coal power plants is 40 years. Although plants can operate for considerably longer periods, shutting down a plant after its assumed lifetime will not result in any stranded capital investment since the initial capital cost will have been fully paid 24. Thus, our estimates only include the asset value of operating electricity-generating units that are now less than 40 years old. Unit-level details of electricity-generating technologies were obtained from GPED-2018 database. In addition, part of committed CO 2 emissions in electricity infrastructure are from heating plants. The asset value of combined heat and power (CHP) plants have been evaluated along with other power plants, but we estimate the asset value of individual heating plants separately, using IEA data on heating output (TJ) 65,66 to estimate the capacity of such heating plants and converting this to an equivalent power capacity (GW) assuming they operate with the average utilization rates of power generating units in the same region. Table S6 summarizes the assumptions of estimating asset value of individual heating plants. Industrial infrastructure Industrial infrastructure includes various facilities and systems from different sub-industrial sectors (Tables S4 and S5). Considering the difficulty of collecting the operating capacity for all the sub-industrial sectors, we estimate the value of industry infrastructure as the combined asset values of cement, iron and steel plants, and industrial boilers. As described above, only the asset value for cement, iron and steel capacity operating less than 40 years was estimated in this work. Asset value from cement, iron and steel industry are quantified through total capacity and capital investment per unit (Table S6). We estimate total capacities (t/h) of industrial boilers at country-or region-level by fuel type by through total energy consumptions obtained from IEA 65, 66. The utilization rates of industrial boilers are assumed to be the same as the average utilization rate of electricity infrastructure. The related assumptions are shown in Table S6. Transport infrastructure We quantify the value from road transport, other transport and international transport assets separately. For road transport infrastructure, we estimate asset value by number of annual vehicle sales, annual average new car prices, and a depreciation rate function. The data sources of number of annual vehicle sales is described above, and we further collect annual average new car prices by vehicle type and country/region 39. Because depreciation rates tend to be considerably lower in developing countries than industrialized countries 67, we adopt different depreciation rate functions for developing and developed countries 67. For international transport infrastructure, we estimate the value of international ships and international airplanes. Due to limited data availability, we use the same approach as with heating infrastructure, basing our estimates on the total energy consumption (fuels) for international aviation and international navigation from the IEA, and converting to the number of reference narrow-body aircraft and standardized international freight ships by such fuel consumption. Specifically, we assume 2 million-km/year per aircraft and 149 MJ/ airplane-km for reference narrow-body aircrafts 21 (Table S6); 940 million annual ton-km and an average ship energy intensity of 0.125 MJ/ton-km for international freight ships 21. We use the same total average depreciation rates for international transport as we do for road transport infrastructure. We use a similar approach for other transport (i.e. domestic ships, domestic airplanes, and non-specific transport), adopting the same assumptions applied in the international transport for domestic ships and domestic airplanes. For non-specific transport, we quantify asset values by converting to the number of conventional diesel heavy-duty freight truck. The corresponding assumptions are shown in Table S6. Residential, commercial and other energy infrastructure We quantify the asset values of residential, commercial and other energy infrastructure separately using sector-and fuel-specific energy consumption data from the IEA 65,66. Residential and commercial infrastructure use energy for space heating, heating water, and cooking. Other energy infrastructure includes uses of energy for agriculture, fishing and other activities. Given very limited data, we quantify the value of residential and commercial infrastructure by according to an equivalent capacity of normalized space heating units, water heating units, and cooking equipment. In the other energy infrastructure, we quantified the asset value by converting to normalized agriculture machines, fishing boats and boilers. We then apply the total average depreciation rates of electricity infrastructure to these residential, commercial and other energy infrastructures. Uncertainty estimated Our estimates of asset values are subject to uncertainty due to incomplete knowledge of operating capacities, their age structure, and the capital costs per unit. In order to more completely assess uncertainties in our results, we perform a Monte Carlo analysis of asset values by sector and by country/region in which we vary key parameters according to ranges in the literature 58,68,69 and collected capital costs data above. The error bars shown in Figure 4 depict the results of this analysis, showing the lower and upper bounds of a 95% confidence interval (CI) around our central estimate. The Monte Carlo simulation uses specified probability distributions for each input parameter (e.g., capital cost per unit, and the ratio of residual value) to generate random variables 68. The probability distribution of asset value is estimated according to a set of runs (n=10,000) in a Monte Carlo framework with probability distributions of the input parameters. The ranges of sector-and -regionparameter values vary in part due to the quality of their statistical infrastructure 69. Table S7 summarizes the probability distributions of the asset value estimation-related parameters. Data availability The numerical results plotted in Figures 1-4 dataset includes unit-level data of Chinese iron, steel and cement infrastructure which we obtained directly from the Chinese Ministry of Ecology and Environment. We do not have permission to share the raw data, but we provide it in an aggregated form (Extended Data Figure 2). Extended Data Tong et al. Comparing commitments. Comparison of committed emissions by sector estimated in the current study and prior studies. Note that in some cases, the totals may not correspond to the sum of underlying sectors due to rounding. Estimates of future CO 2 emissions by industry sector (a; see also Tables S1 and S2) and country/region (b), assuming historical lifetimes and utilization rates. Emissions from existing infrastructure are shown by darker shading, and emissions from proposed power plants (i.e. electricity) are more lightly shaded. Contours show estimates of committed emissions related to existing infrastructure (a) and existing infrastructure and proposed power plants (b) when the assumed lifetimes and utilization rates of electricity and industry infrastructure are varied from 20-60 years 20-80%, respectively. Across the same ranges of lifetime and utilization, corresponding annual rates of emission reduction span from 3% to 30% (c and d). Hatched orange and red zones indicate carbon budgets and mitigation rates likely to limit mean warming to 1.5°C and 2°C, respectively (see Methods), and stars denote committed emissions and mitigation rates if existing/and proposed infrastructure is operated as historically. Rank ordering of CO 2 -emitting assets by committed emissions per dollar value reveals large disparities (a; colored by sector). Horizontal red lines in a indicate 50%, 75% and 90% of total committed emissions (658 Gt CO 2 ) if operated as historically, and the top ten most valuable region-sectors are labeled (see Extended Data Fig. 4 for region-specific versions). Plotting emissions per value (kg CO 2 /$) against committed emissions suggests targeted opportunities to "unlock" future CO 2 emissions if alternative technologies are affordable (region-sectors in the pink-shaded quadrant in b; showing 95% confidence intervals with regions denoted by symbols). |
/**
* Adds a section if it doesn't exist yet.
*
* @param name the name of the section
* @return <code>true</code> if the section didn't already exist
* @throws IllegalArgumentException the name is illegal, ie contains one
* of the characters '[' and ']' or consists only of white space
*/
public boolean addSection(String name) {
String normName = normSection(name);
if (!hasSection(normName)) {
Section section = new Section(normName, this.commentDelims,
this.isCaseSensitive);
section.setOptionFormat(this.optionFormat);
this.sections.put(normName, section);
this.sectionOrder.add(normName);
return true;
} else {
return false;
}
} |
Some Plasma Pharmacokinetic Parameters of Isoniazid in the Presence of a Fluoroquinolone Antibacterial Agent The effects of ciprofloxacin (CP), a fluoroquinolone antibacterial agent, on the extent of absorption of isoniazid (INH) and on some of its pharmacokinetic parameters were investigated in six healthy female volunteers between the ages of 23 and 32 years. The presence of CP led to increase in the amount of INH and to a slight reduction in its peak plasma concentration (C max ). There was a 1-hour increase in the time to attain C max (t max ) of INH, indicating absorption interaction between the two drugs. This absorption interaction was related to inhibition of cholinergic neurotransmission caused by CP, which is capable of inhibiting gastric motility, leading to a delay in gastric emptying. The rate of elimination (K) and plasma half-life (t 1/2 ) of INH were not significantly affected (P = 0.05). The extent of absorption interaction that may have occurred (based on values of 24-hour values for area under the concentration curve, C max, T max, K, and t 1/2 ) was considered to be of no therapeutic consequence, and the coadministration of the two drugs may be recommended in clinical practice. |
Validated models for pre-test probability of stable coronary artery disease: a systematic review suggesting how to improve validation procedures An overuse of invasive and non-invasive anatomical testing for the diagnosis of coronary artery disease (CAD) affects patients' and healthcare professionals' safety, and the sustainability of Healthcare Systems. Pre-test probability (PTP) models can be routinely used as gatekeeper for initial patient management. Although with different positions, international organizations clearly underline the need for more information on the various risk factors acting as modifier of the PTP. This systematic review addresses validation of PTP models adopting variables available at the first-line assessment of a suspected stable CAD. A comprehensive search has been done in MEDLINE(R), HealthSTAR, and Global Health databases. Nearly all the models considered in the 27 analysed papers include age, sex, and chest pain symptoms. Other common risk factors are smoking, hypertension, diabetes mellitus and dyslipidaemia. Only one model considers genetic profile. Reported AUCs range from 0.51 to 0.81. Relevant heterogeneity sources have been highlighted, such as the sample size, the presence of a PTP cut-off and the adoption of different definitions of CAD which can prevent comparisons of results. Very few papers address a complete validation, making then impossible to understand the reasons why the model does not show a good discrimination capability on a different data set. We consequently recommend a more clear statement of endpoints, their consistent measurement both in the derivation and validation phases, more comprehensive validation analyses and the enhancement of threshold validations of PTP to assess the effects of PTP on clinical management. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.