content
stringlengths 7
2.61M
|
---|
The husband of South Shields MP Emma Lewell-Buck has been branded a “perpetrator of elder abuse” by council chiefs after a string of allegations while he was a care worker.
South Tyneside Council spoke out after it was asked to pay out £400 compensation to Simon Buck by a watchdog who found the local authority had made procedural errors – despite a probe ruling Mr Buck had abused a vulnerable elderly man.
Mr Buck now works as a parliamentary assistant for his wife – who was Shadow Children’s Minister and a former social worker.
The abuse claims date back to 2014 – but have just to come to light now after Mr Buck complained to the Local Government Ombudsman about the council’s procedure during its investigation.
The ombudsman’s report details how the allegations were made by the elderly man’s wife – who claimed Mr Buck, referred to throughout only as ‘Mr Y’, had “swore at” and “neglected” her husband.
South Shields MP Emma Lewell-Buck and husband Simon Buck.
•Intimidating behaviour towards a manager.
Mr Buck was suspended by South Tyneside Home Care – the agency he worked for – in July 2014 following an allegation from the wife of the man he had cared for.
South Tyneside Hospital withdrew its offer of shifts to Mr Buck due to safeguarding concerns.
He was subsequently given a written warning – but the man’s wife made a safeguarding alert to the council, which launched its own probe.
Mr Buck resigned from his post and secured a job as an auxiliary nurse at South Tyneside District Hospital.
But it withdrew its offer of shifts after it discovered there were safeguarding concerns.
As the probe continued, documents seen by the Gazette show how Emma Lewell-Buck rang the council’s chief executive demanding to know why the investigation was taking so long.
The ombudsman’s report states how Mr Buck claimed he was the victim of a “witch hunt” – but after a meeting in September 2014 the council found that he had neglected his elderly patient.
He was sent a letter informing him of the results in October that year – but asked for a further review.
A hearing was held in June 2015, which he attended with his MP wife, who went along for what the report says was “emotional support”.
Before the meeting, the council instructed an independent social worker who met with Mr Buck and reviewed the evidence and concluded that there was “no evidence” abuse had occurred.
But despite this, at the multi-agency meeting, the council revealed it had decided the incidents reported by the elderly man’s family did happen.
And where as the swearing they found to have taken place did not cause the patient any psychological harm, not changing the continence pad until prompted by the family constituted abuse, according to the report.
No further investigations or hearing were held in relation to the further allegations made by whistleblowers.
Mr Buck took the decision to the ombudsman – making several complaints and allegations of his own.
And in March 2016, the Gazette reported how he had secured a role as his wife’s parliamentary assistant.
Mr Buck argued that the council did not follow safeguarding procedures correctly.
He claimed it failed to tell him about allegations made against him, or provide an opportunity for him to refute the allegations and provide supporting evidence.
He said officers from the council failed to update him, and a staff member threatened him.
He also claimed there was a data breach by the council after he alleged they gave his wife information about the investigation before telling him.
He added the council’s failures led to his rejection from a university course, and losing hours from a work placement.
And that he believed the council had a vendetta against him and his wife.
The ombudsman probe did find that the council had failed to follow some policy and procedures when conducting its investigation – but did not question the council’s finding of abuse or find there was any data breach.
It also did not find it affected his career prospects – but asked the council to pay Mr Buck £400 compensation, apologise to him to recognise “the impact of avoidable delay, distress, uncertainty and time and trouble”.
Michael King, Local Government and Social Care Ombudsman said: “People have a right to be treated fairly during any investigation, and that includes having access to any reports written about them before crucial meetings take place.
But the council has expressed concerns over why it has been asked to pay out to a man it sees as a “perpetrator of elder abuse”.
“I’m delighted the Local Government Ombudsman has told South Tyneside Council to compensate me following its investigation into my treatment at the local authority’s hands.
“It’s a shame the ombudsman has no powers to say anything publicly about the facts of my case but I repeat, as I have from the beginning, that the allegations against me are entirely fictitious.
“It’s also pleasing that the report states several areas where the council was clearly at fault during its investigations and it is quite apparent that the process which ended with my losing a job I loved was in no way fair or just.
“I note with some sadness that even today, the council cannot admit how wrong they were and are still using inappropriate and offensive language about me.
“This has never been about money for me but about mudslinging towards an innocent man.
“Accordingly, I shall be donating the £400 to the Save South Tyneside Hospital Campaign – one which the council would have done better to get behind from the outset, rather than wasting council taxpayers’ money on a vendetta against me.
“South Tyneside Council accepts the Local Government and Social Care Ombudsman findings of minor administrative failing in this case where the council was acting as the administering body for investigations into the abuse of vulnerable people.
“The ombudsman has not however challenged the decision made by a panel of multi-agency professionals to uphold a finding of abuse and there is no further challenge to this decision.
“We are therefore concerned that the council has been asked to make a payment of compensation to a perpetrator of elder abuse.
“In this case, the council was unable to demonstrate from the historical electronic care records, that it had shared a report in a specific timeframe, even though it could demonstrate that the complainant was given an opportunity to present his views and challenge the facts in person.
“We will remind staff of the importance of documenting actions taken and making clear records of the reasons for decisions made by professionals and communicating those in a timely manner.
“As required by the ombudsman, the recommendations in his report will be considered at a meeting of Borough Council on Monday 26th March 2018. |
Screen-Space Normal Distribution Function Caching for Consistent Multi-Resolution Rendering of Large Particle Data Molecular dynamics (MD) simulations are crucial to investigating important processes in physics and thermodynamics. The simulated atoms are usually visualized as hard spheres with Phong shading, where individual particles and their local density can be perceived well in close-up views. However, for large-scale simulations with 10 million particles or more, the visualization of large fields-of-view usually suffers from strong aliasing artifacts, because the mismatch between data size and output resolution leads to severe under-sampling of the geometry. Excessive super-sampling can alleviate this problem, but is prohibitively expensive. This paper presents a novel visualization method for large-scale particle data that addresses aliasing while enabling interactive high-quality rendering. We introduce the novel concept of screen-space normal distribution functions (S-NDFs) for particle data. S-NDFs represent the distribution of surface normals that map to a given pixel in screen space, which enables high-quality re-lighting without re-rendering particles. In order to facilitate interactive zooming, we cache S-NDFs in a screen-space mipmap (S-MIP). Together, these two concepts enable interactive, scale-consistent re-lighting and shading changes, as well as zooming, without having to re-sample the particle data. We show how our method facilitates the interactive exploration of real-world large-scale MD simulation data in different scenarios. |
<filename>spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerAutoConfigurationTests.java<gh_stars>1-10
/*
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.security.oauth2.resource.servlet;
import java.util.List;
import javax.servlet.Filter;
import org.junit.Test;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.test.context.FilteredClassLoader;
import org.springframework.boot.test.context.assertj.AssertableWebApplicationContext;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.BeanIds;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.oauth2.jwt.JwtDecoder;
import org.springframework.security.oauth2.jwt.NimbusJwtDecoderJwkSupport;
import org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationToken;
import org.springframework.security.oauth2.server.resource.web.BearerTokenAuthenticationFilter;
import org.springframework.security.web.FilterChainProxy;
import org.springframework.security.web.SecurityFilterChain;
import org.springframework.test.util.ReflectionTestUtils;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
/**
* Tests for {@link OAuth2ResourceServerAutoConfiguration}.
*
* @author <NAME>
*/
public class OAuth2ResourceServerAutoConfigurationTests {
private WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
.withConfiguration(
AutoConfigurations.of(OAuth2ResourceServerAutoConfiguration.class))
.withUserConfiguration(TestConfig.class);
@Test
public void autoConfigurationShouldConfigureResourceServer() {
this.contextRunner.withPropertyValues(
"spring.security.oauth2.resource.jwt.jwk.set-uri=http://jwk-set-uri.com")
.run((context) -> {
assertThat(context.getBean(JwtDecoder.class))
.isInstanceOf(NimbusJwtDecoderJwkSupport.class);
assertThat(getBearerTokenFilter(context)).isNotNull();
});
}
@Test
public void autoConfigurationWhenJwkSetUriNullShouldNotFail() {
this.contextRunner
.run((context) -> assertThat(getBearerTokenFilter(context)).isNull());
}
@Test
public void jwtDecoderBeanIsConditionalOnMissingBean() {
this.contextRunner.withPropertyValues(
"spring.security.oauth2.resource.jwt.jwk.set-uri=http://jwk-set-uri.com")
.withUserConfiguration(JwtDecoderConfig.class)
.run((context) -> assertThat(getBearerTokenFilter(context)).isNotNull());
}
@Test
public void autoConfigurationShouldBeConditionalOnJwtAuthenticationTokenClass() {
this.contextRunner.withPropertyValues(
"spring.security.oauth2.resource.jwt.jwk.set-uri=http://jwk-set-uri.com")
.withUserConfiguration(JwtDecoderConfig.class)
.withClassLoader(new FilteredClassLoader(JwtAuthenticationToken.class))
.run((context) -> assertThat(getBearerTokenFilter(context)).isNull());
}
@SuppressWarnings("unchecked")
private Filter getBearerTokenFilter(AssertableWebApplicationContext context) {
FilterChainProxy filterChain = (FilterChainProxy) context
.getBean(BeanIds.SPRING_SECURITY_FILTER_CHAIN);
List<SecurityFilterChain> filterChains = filterChain.getFilterChains();
List<Filter> filters = (List<Filter>) ReflectionTestUtils
.getField(filterChains.get(0), "filters");
return filters.stream()
.filter((f) -> f instanceof BearerTokenAuthenticationFilter).findFirst()
.orElse(null);
}
@Configuration
@EnableWebSecurity
static class TestConfig {
}
@Configuration
@EnableWebSecurity
static class JwtDecoderConfig {
@Bean
public JwtDecoder decoder() {
return mock(JwtDecoder.class);
}
}
}
|
. The notion of antimicrobial effect threshold as an index of hygienic importance for toxicological estimation of chemotherapeutic agents is grounded by the generally accepted conception of thresholds of substances harmful effect. The methodical means used in determining the antimicrobial effect threshold including the recommended set of the measurable indices of intestinal microflora are discussed. |
Modulation of murine embryonic stem cell-derived CD41+c-kit+ hematopoietic progenitors by ectopic expression of Cdx genes. Cdx1, Cdx2, and Cdx4 comprise the caudal-like Cdx gene family in mammals, whose homologues regulate hematopoietic development in zebrafish. Previously, we reported that overexpression of Cdx4 enhances hematopoietic potential from murine embryonic stem cells (ESCs). Here we compare the effect of ectopic Cdx1, Cdx2, and Cdx4 on the differentiation of murine ESC-derived hematopoietic progenitors. The 3 Cdx genes differentially influence the formation and differentiation of hematopoietic progenitors within a CD41(+)c-kit(+) population of embryoid body (EB)-derived cells. Cdx1 and Cdx4 enhance, whereas Cdx2 strongly inhibits, the hematopoietic potential of CD41(+)ckit(+) EB-derived cells, changes that are reflected by effects on hematopoietic lineage-specific and Hox gene expression. When we subject stromal cell and colony assay cultures of EB-derived hematopoietic progenitors to ectopic expression of Cdx genes, Cdx4 dramatically enhances, whereas Cdx1 and Cdx2 both inhibit hematopoietic activity, probably by blocking progenitor differentiation. These data demonstrate distinct effects of Cdx genes on hematopoietic progenitor formation and differentiation, insights that we are using to facilitate efforts at in vitro culture of hematopoietic progenitors from ESC. The behavior of Cdx genes in vitro suggests how derangement of these developmental regulators might contribute to leukemogenesis. |
Dynamics of Bacterial Communities in Two Unpolluted Soils after Spiking with Phenanthrene: Soil Type Specific and Common Responders Considering their key role for ecosystem processes, it is important to understand the response of microbial communities in unpolluted soils to pollution with polycyclic aromatic hydrocarbons (PAH). Phenanthrene, a model compound for PAH, was spiked to a Cambisol and a Luvisol soil. Total community DNA from phenanthrene-spiked and control soils collected on days 0, 21, and 63 were analyzed based on PCR-amplified 16S rRNA gene fragments. Denaturing gradient gel electrophoresis (DGGE) fingerprints of bacterial communities increasingly deviated with time between spiked and control soils. In taxon specific DGGE, significant responses of Alphaproteobacteria and Actinobacteria became only detectable after 63days, while significant effects on Betaproteobacteria were detectable in both soils after 21days. Comparison of the taxonomic distribution of bacteria in spiked and control soils on day 63 as revealed by pyrosequencing indicated soil type specific negative effects of phenanthrene on several taxa, many of them belonging to the Gamma-, Beta-, or Deltaproteobacteria. Bacterial richness and evenness decreased in spiked soils. Despite the significant differences in the bacterial community structure between both soils on day 0, similar genera increased in relative abundance after PAH spiking, especially Sphingomonas and Polaromonas. However, this did not result in an increased overall similarity of the bacterial communities in both soils. INTRODUCTION Anthropogenic activities such as combustion of wood, coal, and petroleum or mining accidents frequently result in the pollution of soils with polycyclic aromatic hydrocarbons (PAH) which have several potential adverse effects on environments and human health due to their toxicity, persistence, and carcinogenicity (;Pumphrey and Madsen, 2007;). Microbes play an important role in the bioremediation of PAH-polluted sites. Microbial populations in polluted soils or sediments are very well studied (;;Ni ;;;). Degradative populations were frequently affiliated to the genera Sphingomonas, Polaromonas, Burkholderia, Pseudomonas, Mycobacterium, Nocardia, and Rhodococcus. The type of PAH substrates (;Ni ;) together with several biotic and abiotic factors, e.g., plant exudates (;) or particle sizes of soil minerals (), were shown to influence the composition and abundance of total or degradative bacterial populations in polluted soils. However, the dynamics of microbial communities in unpolluted soils which are under the threat of PAH pollutions were only rarely explored. Polycyclic aromatic hydrocarbons or their metabolites may have toxic effects on microbes (). Previously unpolluted soils which were reported to have a low abundance of PAH-degrading populations (;;) and thus detoxification of PAH are assumed to be retarded. As a consequence, PAH pollution of non-adapted soils might reduce soil microbial diversity and cause more severe effects on soil microbial function as a high microbial diversity is assumed to be important for the proper functioning of soil ecosystems (Giovannoni, 2004;). Toxic effects of PAH on plants () and animals () were reported, but so far microbial ecology studies mainly focused on microbes which are able to degrade the pollutants or their metabolites. In a study by Sipila et al. the relative abundance of Acidobacteria subgroup GP1 was lower in the PAH-polluted bulk soil and rhizosphere than in the non-polluted soil. In a previously described experiment, a Cambisol and a Luvisol soil contrasting in their texture were either spiked with phenanthrene or not and incubated in soil microcosms for 63 days (). The diversity and abundance of enriched populations carrying PAH-hydroxylating dioxygenase (PAH-RHD) genes depended on the soil type (). Here we investigated for the same experiment how the bacterial communities change after spiking of the Cambisol and Luvisol with phenanthrene, in comparison to the unpolluted controls, by analyzing 16S rRNA gene fragments amplified from total community (TC) DNA by denaturing gradient gel electrophoresis (DGGE). An integrated data processing pipeline was developed for the analysis of data from pyrosequencing of 16S rRNA gene amplicons from the spiked soils and unpolluted controls after 63 days of incubation, in order to systematically identify taxa with increased or decreased abundance, to compare community structure and diversity of total and important groups between different samples. EXPERIMENTAL DESIGN Details of the experimental setup were described previously (). Briefly, Cambisol and Luvisol soil samples taken from the long-term observation sites in Ultuna (Sweden) and Scheyern (Germany), respectively, were contaminated with phenanthrene to reach a final concentration of 2 mg g −1 soil. Four replicates of each soil, phenanthrene-spiked or not, were incubated at room temperature (23C) in the dark. Samples were taken on days 0, 21, and 63 after phenanthrene spiking and kept at −20C before DNA extraction with Bio-101 DNA spin kit for soil (QBiogene, Heidelberg, Germany). DGGE ANALYSIS OF 16S rRNA GENE FRAGMENTS Bacterial 16S rRNA gene fragments from the soil samples were amplified with the primers F984-GC and R1378 as described by Heuer et al.. A semi-nested or nested PCR approach was applied for amplification of 16S rRNA genes of Actinobacteria, Alphaproteobacteria, Betaproteobacteria, or Pseudomonas as previously described (;;). All primers used in this study are provided in Table A1 in Appendix. DGGE of the 16S rRNA gene amplicons was performed according to Gomes et al., using a double gradient gel composed of 46.5-65% denaturants (100% denaturant was defined as 7 M urea and 40% formamide and 6.2-9% of mixture of bis-acrylamide and acrylamide (1:37.5). The following electrophoresis was performed at a constant voltage of 140 V for 17 h at 58C in 1 Tris-acetate-EDTA buffer with a PhorU2 apparatus (Ingeny, Goes, Netherlands). The DGGE gels were silver stained according to Heuer et al.. GelCompar II 4.5 was used for pairwise comparisons of microbial DGGE profiles. Dendrograms were constructed based on pairwise Pearson correlation indices by means of unweighted pair group method using arithmetic averages (UPGMA). The pairwise Pearson correlation indices were used to test for significant treatment effects by application of the previously described PERMTEST software (). Cloning and sequencing of the selected bands from DGGE gels were done as previously described (). The partial 16S rRNA gene sequences excluding the primers were classified by the Nave Bayesian rRNA Classifier of the Ribosomal Database Project 1 and BLASTN in the GenBank database. 2 PYROSEQUENCING Three replicate samples per treatment and control from day 63 were studied more in depth by barcoded pyrosequencing. PCR amplification and sequencing were done at Biotechnology Innovation Center (BIOCANT, Cantanhede, Portugal). Briefly, the hypervariable V3-V4 regions of 16S rRNA genes were amplified with bacterial primers 338F and 802R (RDP's Pyrosequencing Pipeline 3 ) which were fused to the 454 A and B adaptors, respectively. Standard PCR reaction conditions were employed for reactions with Fast Start polymerase (Roche, Pensberg, Germany), 3 mM MgCl 2, 6% DMSO, 200 nM each primer and 200 mM dNTP. The PCR conditions were 94C for 3 min, followed by 35 cycles of 94C for 30 s, 44C for 45 s, and 72C for 60 s, and a final elongation step at 72C for 2 min. Sequencing was performed on a 454 Genome Sequencer FLX platform according to standard 454 protocols (Roche -454 Life Sciences, Branford, CT, USA). SEQUENCE AND STATISTICAL ANALYSES A semi-automatic pipeline for analyzing 16S rRNA gene sequences was integrated by Perl 4 (5.12). The pipeline consists of two major parts: an operational taxonomic unit (OTU) report generator and an OTU report analyzer (supplement). Denoizing, multiple alignments, OTU assignment, classification, and generation of OTU reports were linked according to the following steps and criteria: the unpaired region for each sequence was truncated based on standalone BLASTN analysis against a SILVA 16S rRNA gene database (). Only sequences of more than 200 bp were analyzed. The software package Mothur (v1.14.0; ;Schloss, 2010) was used for multiple alignments and OTU assignment. Classification of sequences was done by using the Nave Bayesian classifier at >80% confidence (). Aligned sequences, their corresponding taxonomy, as well as OTU assignment were stored in a local MYSQL database. A Perl script including the package database interface (DBI) was used to construct an OTU level report with each row representing one OTU containing taxonomic position (domain, phylum, class, order, family, and genus) and number of sequences for each sample. Analyses based on the OTU (>97%) report were done with R 5 (2.12). To compare the community structure between samples, cluster analyses were performed, including all taxonomic groups with more than 50 OTUs, based on the pairwise Pearson correlation which is suitable to compare samples with a different number of sequence reads. The reliability of clusters was tested by 500 times bootstrap analyses. The difference in community structure between treatments was measured using the average of Pearson correlation within treatment minus average of Pearson correlation between treatments. Rarefaction analysis for different treatments and different taxonomic groups was also performed with R to compare the detected diversity between treatments. Diversity indices such as Chao1, Pielous's evenness, and Shannon were also analyzed in a similar manner as the rarefaction analysis to alleviate the bias caused by the different numbers of sequence reads per sample. Discriminative taxa between treatments or soil types were identified by Tukey's honest significance tests under a generalized linear model via a logistic function for binomial data with the package multcomp (). The analyses were performed systematically from phylum to species level (OTU > 97% similarity). Representative sequences for those discriminative OTUs (>97% sequences similarity) as well as their closest related 16S rRNA gene sequences were aligned with Mothur. A neighborjoining phylogenetic tree was constructed and tested using software package SeaView4 (). Compression of the branches was performed to reduce the complexity of the phylogenetic tree generated. Nodes in the phylogenetic tree were marked for compression at defined distances using a local Perl package (gardener) including TreeIO (Bioperl) and DBI. Phylogenetic trees were edited with software Archaeopteryx (Han and Zmasek, 2009). RESPONSES OF SOIL BACTERIAL COMMUNITIES TO PHENANTHRENE DEPENDING ON SOIL TYPE, EXPOSURE TIME, AND TAXONOMIC GROUP AS REVEALED BY PCR-DGGE Community fingerprints of Bacteria, Pseudomonas, Actinobacteria, Beta-, and Alphaproteobacteria were clustered by UPGMA based on Pearson correlation indices. Phenanthrene significantly affected the bacterial community structure in both soils ( Table 1). The bacterial taxonomic groups analyzed responded differently to phenanthrene spiking ( Table 1). Despite the relatively high variability of the Pseudomonas-specific gacA fingerprints some differentiating bands were detected in the patterns of phenanthrene-polluted Luvisol and Cambisol on day 21 ( Figures A1A,B in Appendix). A pronounced difference (d = 23%) of the Pseudomonas community structure between phenanthrene-spiked Cambisol and the control was observed ( Table 1). But on day 63, no differentiating bands were identified in response to the phenanthrene contamination in the Pseudomonas fingerprints (Figures A1C,D in Appendix), and the dissimilarity of Pseudomonas microbial DGGE fingerprints between phenanthrene-polluted soil and the corresponding control was small (Table 1). In contrast to Pseudomonas communities, a difference of the actinobacterial communities of phenanthrenepolluted and control soils was observed only on day 63 but not on day 21 ( Table 1). Responses of betaproteobacterial communities to phenanthrene spiking were observed for both soils on days 21 and 63. The populations (accession numbers: JF810414-JF810419) behind the bands with strongly increased intensity (most dominant responder) in both soils shared the highest sequence similarity with Polaromonas sp. (AM492164; Figures A2A-C in Appendix). The alphaproteobacterial community patterns for soil samples taken on day 21 displayed a high variability among replicates. But some differentiating bands were identified when comparing polluted and unpolluted Luvisol (data not shown). On day 63, significant differences were observed between polluted and nonpolluted treatments for both soils (Table 1 and Figures A3A,B in Appendix). As for the total bacterial community, differences of the alphaproteobacterial, betaproteobacterial, and actinobacterial community between the polluted soils and the corresponding controls strongly increased with time in both soils, while the community of Pseudomonas became more similar between phenanthrenetreated and non-treated soils ( Table 1). Changes in the bacterial community structure of the untreated control soils during the experiment were minor for Cambisol and not detectable for Luvisol, indicating that microbial community changes were directly or indirectly induced by the phenanthrene spiking ( Figure A4 in Appendix). Based on the d-values (Table 1), differences in the bacterial community structure after phenanthrene spiking were more pronounced in Luvisol than in Cambisol at both samplings. SOIL TYPE AND TAXONOMIC GROUP DEPENDENT EFFECTS OF PHENANTHRENE SPIKING ON BACTERIAL COMMUNITY STRUCTURE AND DIVERSITY AS REVEALED BY 16S rRNA GENE AMPLICON SEQUENCING Three replicate samples per treatment from day 63 were analyzed by barcoded pyrosequencing of 16S rRNA genes. Altogether 34,054 sequences for all 12 samples were examined, of which 31,201 sequences could be classified to 21 phyla. The remaining 2,853 sequences were only classified as Bacteria. More than 40% could not be reliably classified at genus level indicating novel diversity not yet described ( Table A2 in Appendix). The most abundant phyla in both soils belonged to the Proteobacteria, Actinobacteria, Acidobacteria, Firmicutes, and Gemmatimonadetes ( Figure A5 in Appendix). A taxonomic report containing 8,889 OTUs at species level (>97% sequences similarity) was obtained for comparing community structures. Phenanthrene spiking strongly influenced the total bacterial community structure in both soils. The differences between polluted soils and their corresponding control were comparable for both soils (37% for Cambisol and 30% for Luvisol; Figure 1A). Bootstrap analysis confirmed the high reliability of the formed clusters for each treatment (bootstrap value > 90), suggesting that the total bacterial community differed between treated and control soils. The difference (d = 30%) between two polluted soils was similar to the difference (d = 34%) between the control soils ( Figure 1A), indicating that bacterial communities in both soils did not converge or diverge after pollution. www.frontiersin.org To compare DGGE and pyrosequencing in analyzing the community structure of bacterial taxonomic groups, Alphaproteobacteria, Betaproteobacteria, and Actinobacteria were also analyzed using OTUs belonging to these taxa, respectively. Like DGGE, clear soil type and treatment clusters were formed for alphaproteobacterial communities ( Figure 1B). In contrast to the DGGE results the differences between polluted soils and the corresponding controls were comparable for both soil types ( Figure 1B). Pyrosequencing analysis additionally showed that the topology of the UPGMA clusters for Alphaproteobacteria was highly similar to that observed for the total bacterial community, suggesting that the dominant members of the bacterial communities and responders belonged to Alphaproteobacteria. Both DGGE and pyrosequencing analyses suggested that differences between betaproteobacterial communities of polluted and unpolluted Luvisol (d = 66%) were stronger than for Cambisol (d = 43%; Table 2 and Figure 1C). The polluted soils shared more similarity to each other than to their corresponding control soil. Additionally, pyrosequencing analysis showed that replicates were more similar for the polluted Luvisol (>74%) than the control (55-59%), indicating convergence of the betaproteobacterial communities in the Luvisol after phenanthrene pollution. DGGE analysis revealed a significant effect of the phenanthrene spiking on actinobacterial communities in both soils. The similarities shared by replicates within each type of polluted soil were high. Pyrosequencing analysis confirmed the significant difference between polluted soils and the corresponding control except for one replicate of the control Cambisol ( Figure 1D). Unlike the DGGE analysis, the similarity among replicates of dominant actinobacterial communities in both polluted soils was low, probably due to the high diversity of Actinobacteria and the rather limited amount of sequences acquired for some of the phenanthrene-spiked soils. To compare the diversity of detected sequences from different treatments, rarefaction analyses were performed based on OTUs defined at four similarity levels (97% and 90% = Figure 2A, 80% and 70% = Figure A6 in Appendix). The bacterial diversity was lower in the polluted soils than in the unpolluted control at all similarity levels (Figure 2A and Table A3 in Appendix). The lowest www.frontiersin.org diversity was found for the polluted Cambisol (Figure 2A). A lower bacterial diversity (richness and evenness) in the polluted soils was also confirmed by Chao1 (Figure A7A in Appendix), Pielous's evenness ( Figure A7B in Appendix), and Shannon index (Figure A7C in Appendix). For Alphaproteobacteria (Figure 2B), Betaproteobacteria (Figure 2C), and Actinobacteria (Figure 2D), the detected diversities were also lower for polluted soils than for the controls. The average of observed OTUs for 400 sequences was used to compare the diversity in phenanthrene-spiked and control soils (Alphaproteobacteria, Betaproteobacteria, and Actinobacteria could be analyzed with this amount of sequences). The percentage of reduction in diversity after pollution depended on the taxonomic group and the soil type. For the polluted Luvisol, the highest decrease in diversity was observed for Betaproteobacteria (27%), followed by Bacteria (15%), Alphaproteobacteria (13%), and Actinobacteria (9%). For the polluted Cambisol, the decrease in betaproteobacterial diversity was only 9%, while a similar decrease in diversity was found for Bacteria, Alphaproteobacteria, and Actinobacteria in both polluted soils. NUMEROUS COMMON AND SOIL TYPE SPECIFIC TAXA ENRICHED IN PHENANTHRENE-POLLUTED SOILS To identify those taxa which were enriched in the polluted soils, multiple Tukey's tests were applied (unadjusted p < 0.05). Phenanthrene spiking selectively enriched diverse bacterial taxonomic groups ( Table 2). About 10% of the genera detected were significantly enriched in one or both polluted soils. Most genera belonged to Proteobacteria (23 genera), and few to Actinobacteria (2 genera) or Bacteroidetes (1 genus; Table 2). Many genera were never reported being involved in PAH degradation, e.g., Sphingosinicella, Afipia, Duganella, Herbaspirillum, Rhodanobacter, Dokdonella, Dyella, Aquicella, Peredibacter, Legionella, Nannocystis, Byssovorax, Dactylosporangium, and Mucilaginibacter. The relative abundance of most enriched genera was still low (<0.4%) in both polluted soils. Sphingomonas, Polaromonas, Novosphingobium, Phenylobacterium, Burkholderia, Mycobacterium, and Mucilaginibacter were enriched in both polluted soils. Among them, Sphingomonas (>18%) and Polaromonas (>4%) became the most dominant genera in both soils. In contrast to these genera commonly enriched in both polluted soils, Herbaspirillum, Dokdonella, Dyella, Legionella, and Dactylosporangium were enriched in the polluted Luvisol, while Pseudoxanthomonas showed an increased abundance only in the polluted Cambisol. Interestingly, the genus Dokdonella had a similar relative abundance (0.6%) in both control soils, but an increased abundance of this genus was only observed in the polluted Luvisol ( Table 2). Further analysis at the species level confirmed that the most abundant Dokdonella OTUs were present in both control soils but a significantly increased abundance was observed only in the polluted Luvisol. Other examples of soil type specific responses were observed for Novosphingobium, Sphingomonas, and Polaromonas ( Table 2). To pinpoint those species which significantly differed between phenanthrene-polluted and non-polluted soils, all OTUs at the species level were subjected to Tukey's tests. A total of 88 OTUs were identified as significantly enriched in the polluted soils, and the majority of them were affiliated to Proteobacteria and Frontiers in Microbiology | Microbiotechnology, Ecotoxicology and Bioremediation Actinobacteria. The diversity of enriched OTUs was higher in the polluted Luvisol (69 OTUs belonging to Proteobacteria or Actinobacteria) than in the polluted Cambisol (49 OTUs belonging to Proteobacteria, Actinobacteria, Acidobacteria, or Bacteroidetes) at species level. Interestingly, 30 out of 88 OTUs (Table A4 in Appendix) were commonly enriched in both polluted soils. Some enriched OTUs (Sphingomonadaceae) were also abundant in the control soils. Eight out of the 10 most abundant and significantly enriched OTUs were more frequently detected than average in the control soils. Three of them even ranked among the most detected seven OTU in the control Luvisol. In contrast, the most dominant OTUs detected for both polluted soils were not detected from their corresponding control at all. Their relative abundance was extremely high, reaching 3.9% in the polluted Cambisol and 2.5% in the polluted Luvisol. Interestingly, they were affiliated to Sphingomonas (Sphingomonadaceae) and Polaromonas (Burkholderiales), respectively, corresponding to the results in the previous study on PAH-RHD genes. DIVERSE SOIL TYPE SPECIFIC TAXA WITH DECREASED ABUNDANCE IN THE POLLUTED SOILS To identify those taxa numerically reduced (termed in the following as diminished OTUs) in the polluted soils, stringent criteria were applied. Only those OTUs were regarded as diminished OTUs which were five times more often detected than average in the control soil but were never detected in the corresponding polluted soils, or which were at least four times more often detected than average and significantly higher (p < 0.05) in relative abundance in control soil than in the corresponding polluted soil. A total of 30 OTUs were identified, belonging to five phyla (Proteobacteria, Actinobacteria, Bacteroidetes, Acidobacteria, and Gemmatimonadetes). Compared to those enriched OTUs, the OTUs with decreased abundance seemed more soil type specific. Only one OTU affiliated to Massilia sp. (D84590) was found to be reduced in both polluted soils. Most diminished OTUs belonged to the Proteobacteria, but no one was affiliated with Alphaproteobacteria to which most enriched OTUs belonged. The diminished OTUs belonging to the Proteobacteria were affiliated to Gammaproteobacteria (eight OTUs), Deltaproteobacteria (four OTUs), or Betaproteobacteria (four OTUs). To compare the diminished OTUs and enriched OTUs phylogenetically, representative sequences for each OTU as well as their closest related reference sequences were retrieved from the SILVA 16S rRNA gene database () and subjected to phylogenetic analysis (Figure 3). Interestingly, the diminished OTUs and those enriched OTUs belong to different phylogenetic branches (Figure 3). For example, diminished OTUs belonging to Actinobacteria were affiliated with Conexibacter, Solirubrobacter, and Streptomyces while sequences of enriched OTUs were affiliated to Mycobacterium and Dactylosporangium (Figure 3). Other examples were also observed for Acidobacteria and Bacteroidetes (Figure 3). DISCUSSION The response to phenanthrene spiking of bacterial communities in two previously unpolluted soils was explored by DGGE and pyrosequencing analysis of 16S rRNA gene fragments amplified from TC DNA. A novel semi-automatic pipeline for analyzing 16S rRNA gene sequences consisting of an OTU report generator and OTU report analyzer allowed us to determine the community structure but also to reveal taxonomic affiliation of the responders to phenanthrene spiking. The deviation of the bacterial communities between the spiked and non-spiked control increased over time, suggesting that specific bacteria grew on the added substrate or its metabolites. The concentration of phenanthrene in both soils continually decreased after spiking (). Many enriched ribotypes belonged to genera that were never reported as responders to PAH pollution. However, the bacterial populations which showed the strongest enrichment in both soils belonged to genera such as Sphingomonas, Polaromonas, which were previously found to be involved in PAH degradation in polluted soils or sediments (;;;). Several bacterial isolates affiliated to the two genera were shown to grow on media with one of PAH substrates as sole carbon source ;), suggesting they could be the dominant populations utilizing added PAH substrates. However, microorganisms were reported degrading organic pollutants cooperatively (;;) and the populations controlling the flux of metabolic intermediates were assumed to be important for accelerating bioremediation of polluted environments (). In the present study, only a small proportion of enriched Sphingomonas populations seemed to carry RHD-like genes () that are essential for the first step of the aerobic phenanthrene degradation, and that the majority was benefiting from the initial degraders by syntrophic interactions. This finding is supported by the GeoChip analysis () as most enriched organic pollutant remediation genes were linked with the degradation of one-ring aromatic hydrocarbons and chloro-hydrocarbons. Some of the enriched OTUs belonging to Sphingomonas were also highly abundant in the control soils from which no PAH-RHD gene amplicons were previously detected (), suggesting that dominant Sphingomonas probably had a better chance to utilize metabolic intermediates of phenanthrene. Bacterial consortia consisting of functional complementary groups might facilitate synergistic degradation of organic pollutant by decreasing the possible inhibition effects of metabolic intermediates (). A fast degradation of PAH substrates by co-culture of Sphingomonas and Mycobacterium was indeed observed by Guo et al.. Enrichment of Polaromonas (Burkholderiales) in both phenanthrene-spiked soils was evident by both DGGE and pyrosequencing analysis. Polaromonas is an important genus responsible for aromatic hydrocarbon degradation in soil or sediments (;). NagA genes encode the key enzyme for naphthalene (PAH) degradation in Polaromonas naphthalenivorans CJ2. However, the enriched Polaromonas populations probably differed between polluted soils in this experiment, as phnAc was the dominant degradative gene in phenanthrene-spiked Luvisol but was not detected in the polluted Cambisol and both control soils (). The gene phnAc was reported in strains of the genus Burkholderia (Laurie and Lloyd-Jones, 1999;), Acidovorax (Singleton www.frontiersin.org (). All host bacteria of the phnAc gene reported so far belong to the order Burkholderiales (Betaproteobacteria). Based on the complete genome analysis of P. naphthalenivorans CJ2, Yagi et al. suggested that extensive horizontal gene transfer contributed to the evolution and metabolic versatility of this strain. Pyrosequencing analysis revealed that the most dominant OTU (2.5%) for phenanthrene-spiked Luvisol was also affiliated to Polaromonas, while this OTU was not detected for both control soils and was less abundant (0.3%) in polluted Cambisol. The relative abundance of this OTU (0.3%) was much lower than all OTUs affiliated to Polaromonas in the polluted Cambisol (4.1%). These results support that the majority of enriched Polaromonas populations in the polluted Cambisol likely also benefit from the initial degraders. The study of Yagi Frontiers in Microbiology | Microbiotechnology, Ecotoxicology and Bioremediation et al. also predicted that P. naphthalenivorans CJ2 can utilize aromatic hydrocarbons such as benzoate and biphenyl which share metabolic pathways with intermediates in the degradation of phenanthrene or other PAH. In the present study, pyrosequencing data revealed that the relative abundance of Pseudomonas was significantly higher in the polluted Cambisol than in the corresponding control ( Table 2), suggesting that some Pseudomonas bacteria grew in the polluted Cambisol. Pseudomonas was reported to be enriched in PAHpolluted sites (Edlund and Jansson, 2008;). Unlike the pyrosequencing data, the DGGE analysis did not indicate an effect of phenanthrene on Pseudomonas which may be explained by the inefficient amplification of some Pseudomonas populations by the gacA primers (). The role of the enriched Pseudomonas in the polluted Cambisol remains to be elucidated as no nahAc-like genes were found in the previous study on PAH-RHD genes (). NahAc-like genes are often located on IncP-9 plasmids (Dennis and Zylstra, 2004;;). The host range of IncP-9 plasmids is confined mainly to Pseudomonas. In our experiment, oriV-rep regions of IncP-9 plasmids were detected for most soil samples but no enhanced abundance of IncP-9 plasmids was found for the polluted soils (data not shown). Pyrosequencing analysis revealed that the bacterial diversity was lower in the phenanthrene-spiked soils than the non-spiked control, probably due to the remarkable increase in relative abundance of few taxa. The influence of PAH pollution on bacterial diversities seemed inconsistent as Dos Santos et al. observed an increase of bacterial richness for sediments after adding oil which is a complex mixture containing different PAH compounds. However, bacterial species diversity in soil or sediments is often extremely high (;;), only the relatively dominant populations are likely to be detected and the estimation of the bacterial richness is frequently biased by the amount of sequences (see Figure A7 in Appendix) or the algorithm. Populations that decreased in abundance after PAH pollution might be useful indicators of adverse effects of PAH pollutants. In the present study, bacteria belonging to Conexibacteria,Acidobacteria Gp1, Myxobacterium were numerically reduced in the phenanthrene-polluted soils. Among these taxa, only Acidobacteria Gp1 was previously reported to be affected by phenanthrene in soil (). Bacteria belonging to Solirubrobacter, Conexibacter, Myxobacterium, and Acidobacteria GP1 prevail in soils but are difficult to be cultivated under standard lab conditions (). Several studies suggested an important role of fungi in PAH metabolization by direct degradation, by transport of bacterial degraders to the source of PAH (;;;). However, DGGE analysis of PCR-amplified ITS fragments () revealed that the fungal communities were less affected by phenanthrene in the present study, except for Cambisol on day 63 ( Table 1). Compared to the Luvisol, the Cambisol has a much higher clay content. High clay contents were found to impact bacterial motility or the rate of substrate diffusion in soil (Raynaud and Leadley, 2004;Long and Or, 2009). The transport of bacterial degraders to phenanthrene (;) or vice versa on fungal hyphae, might be more important in the Cambisol than in the Luvisol. However, the different response of fungal community to phenanthrene spiking might be also related to the differences in fungal community compositions of both soils (data not shown). In summary, the responses of soil indigenous bacteria to phenanthrene depended on soil type, exposure time and taxonomic group. In relation to the abundance and diversity of enriched PAH-RHD genes and the relative abundance of enriched taxa in the corresponding control soil, possible synergistic interactions of bacteria belonging to Sphingomonadaceae in degrading phenanthrene were suggested. In response to phenanthrene pollution of previously unpolluted soils, numerous OTUs with decreased abundance were identified. www.frontiersin.org |
package memlib
import "github.com/benchlab/bengo/bench"
type machineStorage struct {
data map[bengo.Hash]bengo.Hash
}
func newMachineStorage() *machineStorage {
s := new(machineStorage)
s.data = make(map[bengo.Hash]bengo.Hash)
return s
}
func (s machineStorage) Set(key, value bengo.Hash) {
s.data[key] = value
}
func (s machineStorage) Get(key bengo.Hash) bengo.Hash {
return s.data[key]
}
func (s machineStorage) Size() int {
return len(s.data)
}
func (s machineStorage) Copy() (f machineStorage) {
f.data = make(map[bengo.Hash]bengo.Hash)
for k, v := range s.data {
f.data[k] = v
}
return f
}
func (s machineStorage) pushViewer() {
}
|
Lee’s note: Here’s a great column from Peter Burlingame, AKA VIGunfighter, president of the Self Defense Initiative on St. Thomas. Peter’s work is highly recommended.
You can access his You Tube Channel here.
Eight Tactics for Vehicle Self Defense
by Peter Burlingame
This is a new wrinkle on attacks that can happen in and around your vehicle. Car jackings have been around for decades as have bump and robs. More unusual is the robber impersonating a cop and pulling you over. This article highlights a south-of-the-boarder robbery tactic springing up in Chicago.
So. What can you do?
1. Drive a ‘self defense’ type vehicle.
[yt url=https://www.youtube.com/watch?v=b3Sgta8ZtzI]
2. Be as alert while driving as you are at other times. You’ve got all those mirrors. Use them. See as far ahead as possible, not only as far as the car in front of you. The ‘self defense’ car rides higher, allowing you to see over many other, lower cars. Pulling slightly left can also offer you a view past the car(s) in front of you. You are probably more on the ball than the drivers around you. Don’t rely on them to provide you with a proper and timely warning that there is a problem.
3. Always have an ‘out. continuously look for places you can put your vehicle if you need to MOVE NOW! Realize that might involve contact with another vehicle or other objects.
4. Watch your following distance. Leave yourself room to MOVE NOW!
[yt url=https://www.youtube.com/watch?v=Zbi-ZqbcocY]
5. As much as possible, mentally prepare yourself to run someone over. You’ve spent your entire driving life doing everything you can to avoid accidents and hitting pedestrians. That’s no small thing, easily overcome. Mental preparation alone is of limited value. Your firearm training simulates shooting people doesn’t it? There’s an old saying that applies here: “The car can’t go where the mind’s never been” (ok, so I paraphrased a bit.)
6. If you carry a gun, practice using it from a car. Remember you CAN shoot through the glass. An open window will help mitigate damage to your ears. Practice drawing while seated and belted in. DON”T CROSS yourself with the muzzle. Use Airsoft trainers if you don’t have a range that let’s you shoot from your car.
[yt url=https://www.youtube.com/watch?v=bBMf1YccpNo]
7. Understand the use of lethal force and how it relates to the vehicle. Not just the legal aspects but your political/social climate. When can you justify running someone over in the context of legal/social/political considerations? You are in an escape pod. It is going to be harder to justify shooting someone if you had the option of driving away from the attack.
8. Be aware for scams/traps such as this. Think of proper responses NOW while you can. Your awareness of your environment shouldn’t be limited to the Tactical, but also to the Strategic. What sort of things are the bad guys doing in your area?
These 8 things will help you successfully deal with an attack while you are in your car. You will also find that they make everyday driving go smoother and safer.
Disciplina remumenor fidelis!
Peter
lfdefenseinitiative.wordpress.com/ |
Australia has fallen to 60th in global internet speed rankings. If we fell to 60th in the Olympics medal tally there'd be a national outcry. Just a few years ago we were 30th in terms of average peak internet speed, which is a key measurement of broadband performance.
Within our region we came eighth (even New Zealand is two places ahead of us). Singapore, with whom we are destined to be in serious competition as an Asia-Pacific innovation hub, already has internet speeds 100 times faster than ours.
The bad news is delivered in the latest State Of The Internet report from content delivery network provider, Akamai.
There's some good news. Both our average and peak internet speeds have increased by 11 per cent and 6.4 per cent year-on-year, respectively. However, that's a bit like kicking six unanswered goals in the last quarter of an AFL match when you're 50 points behind. It might make a few players feel better but it still means you lost the game. |
Specific microRNA signatures responsible for immune disturbance related to hip fracture in aged rats Background Hip fracture is commonly associated with an overwhelming inflammatory response, which may lead to high rates of morbidity and mortality in the elderly. MicroRNAs (miRNAs) play important roles in the functions of immune system. However, the association between miRNA dysregulation and immune disturbance (IMD) related to elderly hip fracture is largely unknown. Methods In this study, microarray profiling was carried out to evaluate the differential expression patterns of miRNAs in plasma of the aged hip fracture rats with IMD, those without IMD, and normal aged rats, followed by validation using quantitative real-time reverse transcription polymerase chain reaction (qRT-PCR). Genes and signaling pathways of the dysregulated miRNAs related to elderly hip fracture-induced IMD were investigated in silico using Gene Ontology and analysis of Kyoto Encyclopedia of Genes or Genomes. Results Dead or moribund rats with hip fracture exhibited significantly reduced TNF-/IL-10 ratio compared with healthy controls and other hip fracture rats, which were therefore named as hip fracture rats with IMD. Seven serum miRNAs in hip fracture rats with IMD were significantly downregulated. qRT-PCR and in silico analysis revealed that miR-130a-3p likely participated in regulating the hip fracture-induced IMD. Furthermore, Western blot experiment demonstrated that in lung tissue, the reduction of miR-130a-3p was accompanied with the increase of the protein expression of interferon regulatory factor-1 (IRF1) and sphingosine-1-phosphate receptor 1 (SIPR1). Conclusions miR-130a-3p desregulation may be associated with elderly hip fracture-induced IMD, which might act as a new potential biomarker for the diagnosis and prognosis of elderly hip fracture-induced IMD and a potential therapeutic target as well. Background Hip fracture remains a leading cause of excessive morbidity and mortality among old people. Particularly, mortality associated with hip fracture is over 20% within 6 months. Hip fracture becomes one of the most serious health care burdens affecting old people. Trauma triggers an inflammatory response that can result in additional organ damage and even multi-organ failure. The tumor necrosis factor- (TNF-) and interleukin-10 (IL-10) play an important regulatory role in the course of inflammatory responses. The balance between TNF- and IL-10 is important for the immune homeostasis maintenance, and the dysregulation of the TNF-/IL-10 ratio might be predictive of complications in patients with inflammatory diseases. Hip fracture is a common trauma in the elderly, which induces a state of inflammation. Hip fracture is reportedly associated with elevated systemic pro-inflammatory function [2,6,7, and is thus accompanied with postoperative liver and lung dysfunction. MiRNAs, small non-coding 22-nucleotide RNA molecules, involve in many biological and pathological processes such as tissue formation, cancer development, diabetes, neurodegenerative diseases, and cardiovascular diseases. Particularly, it has been shown that some microRNAs (miRNAs) (e.g., miR-155, miR-146, miR-150) control the development and responses of the immune system. However, there is little understanding on which miRNAs participate in the immune disturbance (IMD) related to hip fracture. In this study, we characterized and validated the dysregulated expression patterns of miRNAs related to hip fracture-induced IMD in rats by using microarray profiling, as well as analyzed genes and signaling pathways related to these dysregulated miRNAs using bioinformatics tools. This study might provide a new potential biomarker for the diagnosis and prognosis of IMD related to hip fracture in aged patients and a potential therapeutic target as well. Experimental animals Male Sprague Dawley (SD) rats were purchased from Beijing Vital River Laboratory Animal Technology Co., Ltd. (Beijing, China) and maintained on a 12:12 h light/dark cycle with free access to food and water. Animals were monitored every 3 days to check the status of movement and feeding. A total of 60 male SD rats, aged 22-23 months, defined as aged, and weighted 460-570 g, were used in this study. Rats were randomly divided into normal group (subject to anesthesia only, n = 15) and hip fracture group (subject to operation, n = 45), respectively. The experiment was designed to last for 72 h. The plasma of rats was collected at 24, 48, or 72 h after the hip injury. At 72 h, rats were sacrificed by intraperitoneal injection of phenobarbital, and the lung tissues were collected and stored at − 80°C until use. This study was approved by the Institutional Committee of Animal Care and Usage of the Chinese PLA Army General Hospital (Beijing, China). Hip fracture model The method was described previously by Zhang et al.. In brief, rats were anesthetized by an intraperitoneal injection of xylazine (25 mg/kg) and ketamine (75 mg/ kg) and were then placed on the base of a blunt guillotine ramming apparatus in a prone position with one rear leg immobilized by a rubber band to a screw. The proximal femur was identified and marked under the guidance of a C arm fluoroscopy (PLX112D, Siemens, Germany). A blunt guillotine with a weight of 500 g was dropped on it, with an average drop height of 14 cm. The force of the descending weight resulted in a unilateral closed proximal femoral fracture. After the modeling procedure, rats were put back in the feeding room to bind the injury site to relieve the pain and freely get access to food and water. Rats in the normal group were anesthetized but were not subject to the following treatment. Analysis of serum TNF- and IL-10 Blood samples were harvested from rats at 24, 48, and 72 h after the hip fracture injury. Serum concentrations of TNF- and IL-10 were determined using an enzymelinked immunosorbent assay kit (R&D, Minneapolis, MN, USA) according to the manufacturer's instruction. MiRNA microarray Three rats were randomly selected from each group, and the total RNA was isolated using an SLNco Total RNA Isolation kit (SLNco, Shanghai, China) in accordance Algorithm analyses To identify possible mRNA targets and functions of the differentially expressed miRNAs, three different in silico analyses were performed, including Gene Ontology (GO), pathway analysis with Kyoto Encyclopedia of Genes or Genomes (KEGG), and the interaction analysis of miRNAs with genes using the Sanger miRNA database. RNA isolation and quantitative real-time reverse transcription polymerase chain reaction analysis The differentially expressed miRNAs identified by microarray were validated through quantitative real-time reverse transcription polymerase chain reaction (qRT-PCR) analysis using an iQ5 real-time PCR detection system (Bio-Rad, Hercules, CA, USA) and the SYBR Premix Ex Taq™ kit (TaKaRa, Otsu, Shiga, Japan). Related primers were purchased from Dingguochangsheng Biotech. (Beijing, China), which were shown in Table 1. Prediction of the potential target genes of miRNA The potential target genes were predicted using Target Scan software (http://www.targetscan.org/vert_70/). Western blotting Lung tissues were collected from the sacrificed rats, grinded and sonicated at 4°C in lysis buffer containing 50 mM Tris (pH 7.5), 1 mM EDTA, 1% NP-40, 150 mM KCl, 2 mM NaF, 4 mM sodium orthovanadate, 0.2 mM Na 4 P 2 O 7, 0.2 mM -glycerol phosphate, and EDTA-free protease inhibitor mix (Roche, Basel, Switzerland). Protein concentration of the lysate was measured, and proteins were separated by standard SDS-PAGE using a 10% separating gel. A mouse anti-interferon regulatory factor-1 (IRF1) monoclonal antibody (1: 1000, Abcam, Cambridge, MA, USA) and rabbit anti-sphingosine-1phosphate receptor 1 (SIPR1) monoclonal antibody (1:1000, Abcam) were used as primary antibodies. Goat or rabbit anti-mouse monoclonal antibody conjugated with horseradish peroxidase (Beijing Dingguochangsheng Biotech.) was used as the secondary antibody. The Fig. 1 Serum levels of TNF-, IL-10, and TNF-/IL-10 ratio in hip fracture versus normal rats. a, b Serum level of TNF- (a) and IL-10 (b) in hip fracture versus normal rats. **P < 0.01, ***P < 0.001 compared with normal rats. c Serum TNF-/IL-10 ratio in normal, immune disturbance (IMD), and non-IMD rats. *P < 0.05 for comparison between IMD and normal rats, and # P < 0.05 for comparison between IMD and non-IMD rats. N = 15 at each time point membrane was developed using the enhanced chemiluminescence method. Protein of each blot on the membrane was quantified based on the analysis of grayscale intensity using Quantity one software (Bio-Rad), which was normalized to -tubulin. Statistical analysis Data were analyzed using SPSS software Version 18.0 (SPSS, Chicago, IL, USA). Data were presented as mean ± standard error of the mean, and data at each time point were compared between all the groups using one-way analysis of variance with the following post hoc Tukey test. P < 0.05 was considered statistically significant. Analysis of serum cytokines after hip fracture To check the status of immune response associated with hip fractures, we determined the serum TNF- and IL-10 levels as well as the serum TNF-/IL-10 ratio in rats at 24, 48, or 72 h after the hip fracture. The serum levels of both TNF- and IL-10 in hip fracture rats were gradually decreased after the operation, and the levels at 24, 48, or 72 h except that of serum IL-10 at 72 h were significantly higher than in normal rats (P < 0.01, Fig. 1a, b). 13.3% (6 of 45) of hip fracture rats were dead or became moribund at 72 h after hip fracture, and simultaneously, the serum TNF-/IL-10 ratio in these rats was significantly downregulated compared with that in normal rats and other hip fracture rats (Fig. 1c). The reduction of TNF-/IL-10 ratio indicates a status of IMD. Therefore, these dead and moribund rats with hip fracture were named as IMD rats and other hip fracture rats as non-IMD rats. MiRNA dysregulation signature in hip fracture-induced IMD To investigate the roles of miRNAs in the regulation of the hip fracture-induced IMD, miRNA microarray analysis was performed in serum samples of normal, IMD, and non-IMD rat group rats, three rats per each group. Thirteen differentially expressed miRNAs were identified in serum of IMD rats, including 6 with upregulated expression and 7 with down-regulated expression ( Table 2). Through hierarchical cluster analysis, the 13 differentially expressed miR-NAs among the normal, IMD, and non-IMD rats were normalized and generated a heat map (Fig. 2). Validation of the differentially expressed miRNAs by qRT-PCR To validate the reliability of the microarray result, 4 of the 13 differentially expressed miRNAs were selected for validation by qRT-PCR in the lung and serum of normal, IMD, and non-IMD rats. The data showed that the serum and lung levels of miR-130a-3p were significantly downregulated in IMD rats compared with those in normal and non-IMD rats (P < 0.001) (Fig. 3a, b). In contrast, there was no significant difference in the serum and lung levels of miR-150-5p, miR-143-3p, and miR-223-3p of among Fig. 3 Validation of miR130a-3p, miR-150-5p, miR-143-3p, and miR-223-3p in serum and lung tissues by qRT-PCR. Serum (a) and lung (b) levels of miR-130a-3p in normal, immune disturbance (IMD), and non-IMD rats. Serum (c) and lung (d) levels of miR-150-5p in normal, IMD, and non-IMD rats. Serum (e) and lung (f) levels of miR-143-3p in normal, IMD, and non-IMD rats. Serum (g) and lung (h) levels of miR-223-3p in normal, IMD, and non-IMD rats. N = 6, *P < 0.05 for comparison between IMD and non-IMD, ## P < 0.01 and ### P < 0.001 for comparison between IMD and normal rats the normal, IMD, and non-IMD rats (P > 0.05, Fig. 3c-h). Functional categories of downregulated miRNAs in IMD rat serum According to GO analysis of biological processes, the seven significantly downregulated miRNAs were classified into different functional categories (Fig. 4). All of these GOs showed an increased enrichment in each category by these miRNAs. The top five GO functional categories for the downregulated miRNAs were as follows: transport, defense response to bacterium, ribosome, structural constituent of ribosome and positive regulation of peptidyl-tyrosine phosphorylation. Downregulated miRNA-associated regulatory networks The pathways associated with the differentially expressed miRNAs were determined by KEGG pathway analysis. The most significant pathways of the downregulated miRNAs concerned autoimmune thyroid disease, ribosome, oxidative phosphorylation, collecting duct acid secretion, and pyrimidine metabolism (Fig. 5). The potential target genes of miR-130a-3p Furthermore, to illustrate the role of miR-130a-3p, significantly decreased in the serum and lung tissues of IMD rats in comparison to normal and non-IMD rats as validated by RT-PCR, in the regulation of immune system in IMD rats, a miRNA-mRNA network was suggested. In total, 235 mRNAs which may differentially regulate the miR-130a-3p-targeted mRNAs were included in the network (Fig. 6a). Particularly, 14 mRNAs as the potential target genes of miR-130a-3p, such as IRF1, S1PR1, Ccl7, Pik3cb, and Cxcl14, were supposedly associated with immune system (Table 3, Fig. 6b). S1PR1 and IRF1 protein were upregulated in IMD rat lung Using TargetScan software, S1PR1 and IRF1 were predicted as the potential target genes of miR-130a-3p (Fig. 7a). The expression level of S1PR1 and IRF1 in rat lung tissues was determined by Western blotting. The result showed that the lung S1PR1 and IRF-1 expression was significantly increased in IMD rats compared with that in normal and non-IMD rats (P < 0.05, Fig. 7b). Discussion Hip fracture frequently occurs in the elderly, with a high incidence of morbidity and mortality. Reportedly, hip fracture causes systemic pro-inflammatory response [2,6,7,. Particularly, patients with hip fracture have significantly increased serum levels of inflammatory cytokines (e.g., TNF-, IL-6, IL-10) compared with healthy controls. In this study, we determined the serum levels of TNF- and IL-10 in normal versus hip fracture rats. Elderly rats were randomly divided into normal or hip fracture groups. To avoid any potential resultant inflammatory response from blood collecting, the hip fracture rat group The vertical axis showed the pathway categories and the horizontal axis showed the degrees of the enrichment of the pathways was classified into three subgroups for collecting blood at 24, 48, or 72 h, respectively, after the hip injury. Our result showed that in elderly hip fracture rats, the serum levels of TNF- and IL-10 were almost significantly increased compared with healthy controls, which was consistent with those previously reported. TNF- as a pro-inflammatory cytokine is mainly produced by monocytes, macrophages, initial hemorrhages, and necrosed tumor tissues. IL-10 is a cytokine that downregulates the immune response and inflammation by suppressing the expression of pro-inflammatory cytokines and downregulating important cell surface molecules such as MHC class II molecules. There is a consensus as to a protective effect of IL-10 on the inflammatory action of TNF- during systemic inflammatory response syndrome. Low TNF-/IL-10 ratio, characterized by IL-10 superiority, indicates a status of immunosuppression in IMD. In this study, 13.3% (6 of 45) of hip fracture rats were dead or became moribund at 72 h after injury, which was simultaneously accompanied by a significant decrease of TNF-/IL-10 ratio compared with non-IMD hip fracture and normal rats. This implies an immunosuppression status in these dead or moribund rats (IMD) with hip fracture. As small non-coding 22-nucleotide RNA molecules, miRNAs involve in post-transcriptional regulation either by mRNA cleavage and degradation or by repressing the translation of mRNA into proteins. MiRNA control has emerged as a critical regulatory principle in the mammalian immune system, and it has been shown that miRNAs may be used as potential biomarkers for the diagnosis of various human diseases. A recent study showed that the serum levels of miR-122-5p, miR-125b-5p and miR-21-5p were significantly upregulated in patients with bone fracture in comparison with healthy controls, implying the potential values of these miRNAs as biomarkers for bone fracture. However, until now, there have no miRNA profiling studies on hip fracture. In this study, we screened the differentially expressed miRNAs between the normal, IMD, and non-IMD elderly hip fracture rats by using miRNA microarray and further confirmed that the miR-130a-3p levels of the serum and lung tissue in IMD rats were both significantly reduced compared with those in normal and non-IMD rats using qRT-PCR. This implies that miR-130a-3p may be used as a potential biomarker for the IMD related to hip fracture in the elderly. To further understand the role of miR-130a-3p in the regulation of immune response in aged IMD rats, a miRNA-mRNA network was suggested, including 14 mRNAs (e.g., S1PR1 and IRF-1 genes) related to immune system as the potential target genes of miR-130a-3p. Target prediction showed that S1PR1 and IRF-1 genes are potential targets of miR-130a-3p. Since reportedly elderly hip fracture often accompanies with postoperative liver and lung dysfunction, we selectively observed the expression of miR-130a-3p and protein of S1PR1 and IRF in lung tissue. Sphingosine 1phosphate (S1P) is a major mediator of T cell lymphoid traffic, tissue migration and proliferation, and cytokine secretion. S1PR1 as a receptor of S1P restrains thymic development, and peripheral number and suppressive functions of T regulatory cells. 23 Increase of S1PR1 in CD4 + T cells promotes STAT3 activation, and STAT3 is the main downstream molecular target for IL-6R and IL-10R signaling and promotes IL-10 while inhibits IL-12 production. Conversely, IL-10induced STAT3 activity in macrophages leads to impaired antigen-specific T cell responses. Therefore, S1PR1, as an immunosuppresive factor, may induce the production of IL-10 via STAT3 signaling. IRF-1 is a nuclear transcription factor crucial to inflammation, immunity, cell proliferation, and apoptosis. IRF1 and the transcription factor complex ISGF3 (including STAT1, STAT2, and p48) mediate the upregulation of IL-10 expression by type I interferon (IFN) and IFN-. Activation of IRF1 and STAT3 in IFN--stimulated human monocytes initially contributes to the production of IL-10, pro-inflammatory cytokines, etc. by low level autocrine IFN--mediated signaling. Therefore, IRF1 may also participate in the regulation of the IL-10 production. In this study, we found the lung expression Fig. 7 MiR-130a-3p inhibited the SIPR1 and IRF1 expression in rat lung. a Prediction of SIPR1 and IRF-1 as the potential target genes of miR-130a-3p. b Western blotting for the protein expression SIPR1 and IRF1 in rat lung. n = 6, **P < 0.01 for comparison between immune disturbance (IMD) and normal rats, and # P < 0.05 for comparison between IMD and non-IMD rats of SIPR1 and IRF1, both related to the production of IL-10, were significantly increased in IMD rats, suggesting that the reduction of miR-130a-3p may lead to increased expression of SIPR1 and IRF1, which mediates the production of IL-10. In addition, a previous study reported that miR-130a directly targeted the 3-UTR of TNF- and repressed its translation. Consistently, this study revealed that decrease of miR-130a-3p promotes the production of the pro-inflammatory factor TNF- in hip fracture rats. In this study, through the target prediction of miR-130a-3p using bioinformatics tool and the measurement of the lung levels of miR-130a-3p, S1PR1, and IRF1, we supposed that S1PR1 and IRF are the targets of miR-130a-3p. The next study will be carried out to determine the direct control of miR-130a-3p toward S1PR1 and IRF genes. Conclusions This study demonstrates that hip fracture-induced IMD, characterized by reduced TNF-/IL-10 ratio, in aged rats may be attributable to the downregulation of miR-130a-3p and the upregulation of target S1PR1 and IRF1. Our experimental results may aid in the understanding of the molecular mechanisms underlying the roles of miRNAs in the pathogenesis of IMD related to elderly hip fracture. This study might provide a new potential biomarker with the diagnostic and prognostic values and a potential therapeutic target for hip fracture-induced IMD in the elderly as well. |
// Handle @acreate on master room objects
//
static void ProcessMasterRoomACreate(dbref creator, dbref thing)
{
int nxargs = 2;
const UTF8 *xargs[2];
switch (Typeof(thing))
{
case TYPE_ROOM:
xargs[1] = T("ROOM");
break;
case TYPE_EXIT:
xargs[1] = T("EXIT");
break;
case TYPE_PLAYER:
xargs[1] = T("PLAYER");
break;
case TYPE_THING:
xargs[1] = T("THING");
break;
default:
xargs[1] = T("#-1");
break;
}
dbref master_room_obj = -1;
DOLIST(master_room_obj, Contents(mudconf.master_room))
{
if (thing == master_room_obj)
{
break;
}
if (Controls(master_room_obj, thing))
{
int aowner, aflags;
UTF8* act = atr_pget(master_room_obj, A_ACREATE, &aowner, &aflags);
if ('\0' != act[0])
{
CLinearTimeAbsolute lta;
UTF8 buf[SBUF_SIZE];
mux_sprintf(buf, SBUF_SIZE, T("#%d"), thing);
xargs[0] = buf;
wait_que(master_room_obj, creator, creator,
AttrTrace(aflags, 0), false, lta, NOTHING, 0, act, nxargs,
(const UTF8 **) xargs, mudstate.global_regs);
}
free_lbuf(act);
}
}
} |
Q:
Can very tight glasses restrict blood flow to the brain?
Can extended use of glasses that are very tight-pressing against the temples inhibit blood circulation towards the brain?
I find that I get headaches if I wear tight glasses, and found a similar question here: Can tight glasses cause headaches?
but it still doesn't clear out my doubts about blood flow.
A:
Not towards the brain.
Look at the two diagrams. The temporal artery is a branch of the external carotid artery that stays outside the skull. The internal carotid artery goes inside the skull.
You couldn't compress the skull with sunglasses if you tried.
MANY headaches are related to muscular/tendinous pain in the head and neck, not the brain. Putting pressure on the temporal regions can cause pain in the muscles, and sustained pressure can cause spasms. Restricting the flow through the arteries of your face could in theory reduce flow to muscles of your scalp, causing pain and ischemia. It is less likely to be the cause of pain from sunglasses pressure, as there is lots of collateral blood flow, but not impossible.
Note that transmitting any force through the actual skull via compression, which is a pretty solid bone, would take a great deal of pressure (orders of magnitude above what sunglasses are capable of) and would involve fracturing bone. Then you'd be looking at potential stroke/TBI symptoms. That is not happening to you.
I am not going to discuss your symptoms of confusion, that starts down the path of individual medical advice. If you are concerned about any of your symptoms, see a doctor.
Get some better sunglasses or fix the hinges. |
It's over suddenly, but the past two days of glorious sunshine, and Day 1 under threatening skies, have whetted all our appetites for football.
It has always been in April and May that you realize, with a capital 'R', just how freakin' long the CFL off-season is: it and the NFL have by far the longest downtime of any of the four major team sports on the continent.
That's another reason why mini-camp--oh, excuse, us OTA--was a good CFL idea. It's a concrete reminder to the market of what it is they sell. And what they sell gets better because of the OTAs, which this corner has always called 'quality control.' Any team that uses it strictly as a tryout camp, without getting a head start on systems and other season-related specifics is cheating itself and, worse, the fans of the league. And fans of this league are the all-time sports martyrs, and don't deserved to be deprived in any way.
This Ticat mini-camp, more than any of the previous ones, seems to have been more broadly welcomed by the city and its fans. Weather has played a role, but so has the unbelievably successful return to town last year from exile in Guelph. Undefeated here since they came back and they'll stay that way, at least in regular season, until August. Their winning--with the Leafs and Bulldogs competing to see who could turn in the more irrelevant season---and their young stars, have been missed.
And there is an expectation, as there was last year, that the Cats will make their third consecutive Grey Cup appearance for the first time since 1986 and, despite the collective missteps of the builders and the sheer public boredom with the incessant delays, there is excited anticipation about returning to Tim Hortons Field.
The Ticats have enough returnees, enough marquee players, and enough excellent coaching that they should win the east. It would be nice if they got off to a good start for a change, instead of counting on sprinting like madmen down the stretch, but where would this team be without season-long drama.
Today, under this sun, it's all hope and optimism and everybody has zero losses. In that way, it's not unlike the sport with the shortest off-season: it's kind of like baseball spring training.
I was at camp today ... as were approx 30-40 others. It was glorious! Warm sun, blue skies and little breeze ... and LOTS of smiles.
I agree with Millise that it was a basic camp. Good to get CFL officials there to get some ideas on how penalties will be called with the new rule changes.
Some good plays but none were really in game situations. Jeff Matthews vying for #2 QB caught my eye as well. He's got height, arm strength and appeared to be really accurate with this throws with a nice arc and small hang time. Plus he seemed to get rid of the ball quickly ... then again there were no DL running him down!
@Flying Wildcat: Wow The team's just hitting the ground, but you're in mid season form. LOL!!
Too bad you couldn't get to the Mini Camp.
1- I saw it as an intro for all the Wanna Be's to make their case for an invite to the Big Camp at the end of May. Receiver Tiquan Underwood caught my eye.
2- It was also a showcase for the guys going for the #2 spot behind Zach Collaros. For the record Zach mentioned he's been working on his throwing motion in the off season. Jeff Mathews caught my eye.
3- It was also the Coaching Staffs first chance to bring the new rules to the guys at camp to study.
I really saw it as a very basic camp with those basic goals mentioned fulfilled. All your questions are solid ones, and will surely be investigated and reported on now that camp is over.
SPECIAL THANKS has to go to the HAMILTON TIGER CATS for continuing to bring Mini Camp to the Hammer while most, if not all the other teams take theirs down south to 4 Down Cities, and balmy beaches.
@craig Not asking for many conclusions but ANY would be nice. And certainly KA would hold his cards close but at least he could ask him for any insight. Drew's job is to ask the pertinent questions. If KA wants to smirk back at him then so be it.
I think it's unreasonable to expect Drew (or Steve) to draw many conclusions from mini-camp. And on the injury/ratio front, we should expect Austin to be tight-lipped because he doesn't want to hurt his chances of getting what he wants out of the draft.
@Aaron....which means that Drew did even less than what @flying_wing thought he did.
Nothing personal...I think we all like Drew and are very appreciative of The Scratching Post blog and The Spec, but I have to admit I was hoping for more than five measly tweets per day over a three day (six hour??)mini camp, which as Drew's Uncle Milty keenly pointed out, represented the return of "our boys", "our winning team" to town, with a lot of guys from the "neg list" or perhaps the "US free agent camps" on the field. I don't think it should come as a shock to anyone, that the fans would like to know who looks good so far, who has caught one's eye.
Again, nothing personal, I guess I just miss the twenty second vids of drills being done and the very popular "one minute with " or "two minutes with" vids, whatever they were called, Drew used to provide.
Maybe what we don't know is that the number of hits on TSP and TheSpec.com/ticats websites is way down, and Drew and Steve no longer feel that the extra effort is worth it. I don't know, I'm just taking a guess.
What I do know is that Tiger-Cats fans seems to be pretty interested in their team, like Roughriders fans, like Bills fans in theirs, but we don't seem to get the information in Hamilton that Rider Rumblings and The Regina Leader-Post and WGR550 and The Buffalo News delivers to their respective fans.
For those of you like myself who would have liked to have attended the mini camp sessions to see with our own eyes, but could not because we have to work, (funny thing having a job eh), there are some photos and short vids at ticats.ca under Ticats.TV and Instgram.
Steve it is an old cliche but hope does spring eternal especially during the OTA's. I likely would have attended, in fact I have been off of work (this is the second consecutive week) looking after my better half, who had a total knee replacement on April 17. Really looking forward to the start of this season. Every year begins hopefully but doesn't always pan out that way. This will be the year of the cat. I have that positive feeling.
Sorry you are right Aaron my mistake. However the same questions apply for sure.
@Flying Wing - Very astute questions indeed. Too bad you didn't notice that it was Steve Milton who wrote the article.
Very nice story Drew but give us the goods. Give us some detail about what was happening on field. Who looks like they might be players and who is going to be invited to the main camp. What are the details around the injuries to Gaydosh and Watt. What are the Ticat plans for dealing with these injuries?? Change of draft plans?? Change in how the ratio is handled?? Come on Drew....investigative reporting man. |
<gh_stars>0
package cellsociety.logic.simulations;
import cellsociety.errors.MissingSimulationArgumentError;
import cellsociety.logic.grid.Cell;
import cellsociety.logic.grid.Grid;
import cellsociety.logic.neighborhoodpatterns.NeighborhoodPattern;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
* This class simulates Schelling's Model of Segregation. For each cell, it will attempt to move
* to an adjacent empty cell if the ratio of similar to different states among its neighbors is less
* than the satisfaction rate set by the user.
*
* @autahor <NAME>
* @author <NAME>
* @author <NAME>
*
* @since 0.0.2
*/
public class ModelOfSegregation extends Simulation {
//The ratio at which a cell will not attempt to move.
private double satisfactionRate;
/**
* Constructs a new Simulation with a specified starting Grid and a Map of simulation-specific data
* values.
*
* @param grid the starting grid_LEGACY of the simulation.
* @param metadata the user-specified values used by the simulation.
* @throws MissingSimulationArgumentError if the metadata is missing a required argument for the
* simulation.
*/
public ModelOfSegregation(Grid grid, NeighborhoodPattern np, Map<String, String> metadata)
throws MissingSimulationArgumentError {
super(grid, np, metadata);
satisfactionRate = Double.parseDouble(metadata.get("SatisfactionRate"));
setDefaultValue(2);
}
/**
* @see Simulation#updateNextGridFromCell(Cell)
*/
@Override
protected void updateNextGridFromCell(Cell cell) {
List<Cell> myNeighbors = getGrid().getNeighbors(cell, getNeighborhoodPattern());
myNeighbors.removeIf(Objects::isNull);
double similar = 0;
double different = 0;
for (Cell c: myNeighbors) {
if (c.getCurrentState() != 0 && c.getCurrentState() == cell.getCurrentState()) {
similar++;
} else if (c.getCurrentState()!=0) {
different++;
}
}
//Given the neighbor list, remove all non-zero entries in either this or the next iterations, and pick
//a new location from there.
myNeighbors.removeIf(e->e.getNextState() != 0 || e.getCurrentState()!=0 );
//myNeighbors.removeIf(e->e.getCurrentState()!=0 );//|| nextGrid.getCellState(e.getRow(), e.getColumn()) != 0);
//myNeighbors.removeIf(e->getGrid().getCell(e.getCoordinates().r(), e.getCoordinates().c()).getCurrentState()!=0);
if (different != 0 && (similar/different) < satisfactionRate && myNeighbors.size() > 0) {
Collections.shuffle(myNeighbors);
getGrid().changeCell(myNeighbors.get(0), cell.getCurrentState(), cell.getAltStates());
} else {
getGrid().changeCell(cell, cell.getCurrentState(), cell.getAltStates());
}
}
}
|
Purinergic Receptors Coupled to Intracellular Ca 2 (cid:1) Signals and Exocytosis in Rat Prostate Neuroendocrine Cells* Rat prostate neuroendocrine cells (RPNECs) display a variety of ion channels and exhibit (cid:2) -adrenergic regulation of cytosolic Ca 2 (cid:1) concentration ( c ). In this study, purinergic regulation of c and exocytosis was investigated in freshly isolated single RPNECs showing chromogranin A immunoreactivity. The presence of P2X and P2Y receptors in RPNECs was verified by the transient activation of Ca 2 (cid:1) -permeable cationic channels and the release of Ca 2 (cid:1) from intracellular stores by extracellular ATP, respectively. The transient inward cationic current was effectively activated by (cid:2), (cid:3) methyleneadenosine 5 (cid:1) -triphosphate ( (cid:2), (cid:3) -MeATP) and blocked by 2 (cid:1),3 (cid:1) - O -(2,4,6-trinitrophenyl)adenosine 5 (cid:1) -triphosphate, suggesting the presence of a P2X 1 or P2X 3 subtype. For the release of stored Ca 2 (cid:1), ATP and UTP were equally potent, indicating the functional expression of the P2Y 2 or P2Y 4 subtype. The mRNAs for P2X 1 and P2Y 2 were confirmed from reverse transcription- PCR analysis of RPNECs. The application of (cid:2), (cid:3) -MeATP induced large and transient increases in c, which were not attenuated by the blockers of voltage-activated Ca 2 (cid:1) channels or by depleting intracellular Ca 2 (cid:1) stores, but were abolished by omitting extracellular Ca 2 (cid:1). The application of UTP increased c to 55% of the peak (cid:4) c induced by (cid:2), (cid:3) -MeATP. The application of (cid:2), (cid:3) MeATP induced exocytotic responses of RPNECs as monitored by carbon fiber amperometry and capacitance measurements. To our interest, the application of UTP did not induce amperometric currents, but reduced the membrane capacitance, indicating a net endocytosis. From these results, we postulate that a sharp rise in c by the P2X-mediated Ca 2 (cid:1) influx is required for exocytosis, whereas the relatively slow release of stored Ca 2 (cid:1) induces endocytosis in RPNECs. and with fluorescein isothiocyanate (FITC)-conjugated phalloidin. Cells were then glass and investigated using a Zeiss LSM 510 laser-scanning confocal microscope (FITC, excitation at 488 nm and emission at 520 nm; and Alexa Fluor 546, excitation at 556 nm and emission at 573 nm). Intracellular Ca 2 (cid:1) Measurement Dispersed single cells were loaded with fura-2 acetoxymethyl ester (2 (cid:4) M ) in PBS for 20 min at room temperature and then washed out with fresh solution. RPNECs were identified following the above criteria, and the region of interest for the fura-2 experiment was set so that the fluorescence from a single RPNEC could be collected selectively. The recording of cytosolic Ca 2 (cid:1) concentration ( c ) was performed with a microfluorometric system consisting of an Olympus IX-70 inverted fluorescence microscope with a dry-type fluorescence objective lens ( (cid:3) 40, numerical aperture of 0.85), a photomultiplier tube (type R1527, Hamamatsu Photonics, Hamamatsu, Japan), and a Deltascan illuminator (Photon Technology International Inc., Lawrenceville, NJ). Light was provided by a 75-watt xenon lamp, and a chopper wheel alternated the light path to monochromators (340 and 380 nm) with a frequency of 10 Hz; the intensity of emitted light at 510 nm was measured. As a measure of c, the fluorescence emission ratio at 340/380 nm excitation ( F 340/380 ) is presented. Fluorescence Quenching Experiment The divalent cation m M ) used a surrogate for to fura-2 capacitance measurement contained 110 m M CsCl, 40 m M HEPES, 0.3 m M EGTA, 1 m M MgCl 2, 0.2 m M CaCl 2, 0.35 m M GTP, and 2 m M MgATP with a free c of 350 n M. For the simultaneous measurement of c and capacitance, EGTA and CaCl 2 in the pipette solution were replaced with 0.15 m M K 5 -fura-2. Data Analysis and Statistics The data are presented as original recordings, current-voltage ( I - V ) curves, histograms, and bar graphs of means (cid:8) S.E. (for n cells tested). When necessary, Students t test for paired samples was applied since the control and test recordings were made from the same cell. p (cid:6) 0.05 was regarded as significant. Prostate neuroendocrine cells, considered to be a group of amine precursor uptake and decarboxylation cells, are intraepithelial regulatory cells with paracrine properties. Similar to other amine precursor uptake and decarboxylation cells in the gastric gland, prostate neuroendocrine cells may also influence the growth of the prostate gland or regulate the exocrine secretion of prostatic fluid. Previous immunohistochem-ical studies suggest that prostate neuroendocrine cells both store and produce neurosecretory products such as serotonin, histamine, bombesin, calcitonin, and parathyroid hormone-related peptides that could regulate the growth, invasiveness, metastatic processes, and angiogenesis related to prostatic carcinoma (4 -7). In a previous study, we initially reported that putative rat prostate neuroendocrine cells (RPNECs) 1 display spontaneous action potentials and voltage-activated Ca 2 channels (both L and N types) in accordance with the electrically excitable properties of neuroendocrine cells. Also, pharmacological studies clearly demonstrated that RPNECs functionally express ␣ 1and ␣ 2 -adrenergic receptors, which are linked to the release of stored Ca 2 and the inhibition of N-type Ca 2 channels, respectively. Despite the aforementioned electrophysiological evidence of excitable cells, the genuine property of neuroendocrine cells, viz. exocytosis, has not yet been directly investigated in RPNECs. ATP is frequently colocalized with noradrenaline in postganglionic sympathetic nerve fibers and acts as a cotransmitter in several tissues. The purinoreceptors (P2), receptors for extracellular ATP, are divided into two distinct receptor families: G-protein-coupled metabotropic receptors (P2Y receptors) and receptor ion channels with a nonselective permeability to cations, including Ca 2 (P2X receptors). In some neurons and neuroendocrine cells, extracellular ATP induces exocytosis in a Ca 2 -dependent manner. In the sympathetic neurons, for example, it has been suggested that the P2X receptors mediate a positive modulation of noradrenaline release, whereas the G-protein-coupled P2Y receptors mediate the opposite response. In the case of adrenal chromaffin cells displaying heterogeneous expression of P2X and P2Y receptors, P2X channels are preferentially localized to noradrenaline-secreting cells. The pathophysiological significance of purinoreceptors has also been suggested by the Ca 2 release and growth regulation of prostate tumor cells by extracellular ATP. Considering the suspected role of ATP as a cotransmitter from the sympathetic nerves that regulate the function of prostate glands, we chose to investigate the operation of multiple Ca 2 translocation mechanisms linked to purinoreceptors in RPNECs. In addition, we compared the efficiency of the exocytosis triggered by P2X and P2Y receptors recruiting different sources of calcium ions in RPNECs. The direct measurement of exocytosis in prostate neuroendocrine cells was performed for the first time in this study. EXPERIMENTAL PROCEDURES Cell Isolation-Male Sprague-Dawley rats (350 -400 g) were killed by 100% CO 2 inhalation, and the ventral lobe of the prostate gland was removed rapidly thereafter. The procedure for single cell isolation was the same as described in our previous reports. Briefly, the chopped tissue (1-2 mm 3 ) was digested for 25 min at 37°C in Ca 2 -free phosphate-buffered saline (PBS) containing collagenase (2 mg/ml; Wako, Osaka, Japan), trypsin inhibitor (1 mg/ml; Sigma), bovine serum albumin (3 mg/ml; Sigma), and dithiothreitol (1 mg/ml; Sigma). Following digestion, tissue segments were transferred to fresh PBS and agitated gently using a fire-polished wide bore (1-2 mm) Pasteur pipette. Cells were isolated daily and stored in fresh solution at 4°C for up to 6 h. Dispersed cells were moved into the experiment chamber and examined using an Olympus IX-70 inverted microscope. After the digestion procedure, most of the isolated single cells had an elongated columnar shape, a typical feature of secretory epithelial cells. In addition to columnar cells, we could identify round-or oval-shaped cells with a relatively dark cytoplasm that were regarded as RPNECs in this study. Immunofluorescence Confocal Microscopy-Chromogranin A was identified using mouse monoclonal antibody LK2H10 (NeoMarkers, Fremont, CA). Cells were maintained at room temperature on a coverslip coated with polylysine (5%), fixed with 2% paraformaldehyde for 15 min, permeabilized with 0.1% Triton X-100 for 10 min, and then incubated with PBS containing 3% bovine serum albumin (blocking solution) for 45 min. Cells were incubated with primary antibodies, followed by treatment with bridging Alexa Fluor 546-coupled goat anti-mouse Ig (Molecular Probes, Inc., Eugene, OR) and double staining with fluorescein isothiocyanate (FITC)-conjugated phalloidin. Cells were then mounted onto glass slides and investigated using a Zeiss LSM 510 laser-scanning confocal microscope (FITC, excitation at 488 nm and emission at 520 nm; and Alexa Fluor 546, excitation at 556 nm and emission at 573 nm). Intracellular Ca 2 Measurement-Dispersed single cells were loaded with fura-2 acetoxymethyl ester (2 M) in PBS for 20 min at room temperature and then washed out with fresh solution. RPNECs were identified following the above criteria, and the region of interest for the fura-2 experiment was set so that the fluorescence from a single RPNEC could be collected selectively. The recording of cytosolic Ca 2 concentration ( c ) was performed with a microfluorometric system consisting of an Olympus IX-70 inverted fluorescence microscope with a dry-type fluorescence objective lens (40, numerical aperture of 0.85), a photomultiplier tube (type R1527, Hamamatsu Photonics, Hamamatsu, Japan), and a Deltascan illuminator (Photon Technology International Inc., Lawrenceville, NJ). Light was provided by a 75-watt xenon lamp, and a chopper wheel alternated the light path to monochromators (340 and 380 nm) with a frequency of 10 Hz; the intensity of emitted light at 510 nm was measured. As a measure of c, the fluorescence emission ratio at 340/380 nm excitation (F 340/380 ) is presented. Fluorescence Quenching Experiment-The divalent cation Mn 2 (0.1 mM) can be used as a surrogate for Ca 2 to trace Ca 2 influx. Since fura-2 has a high affinity for Mn 2 (K d 5 nM), essentially all Mn 2 ions entering a fura-2-loaded cell are trapped as fura-2⅐Mn 2 complexes. These complexes are virtually non-fluorescent at all wavelengths. Thus, an accelerated attenuation of fura-2 fluorescence provides an estimate of the entry of divalent cations (e.g. Ca 2 ) into a cell. Single Cell Reverse Transcription (RT)-PCR-To synthesize first strand cDNA, RPNECs were collected individually using microelectrodes with an inner diameter of 25-30 m on the stage of an inverted microscope for the patch clamp. After aspiration, the cell was expelled from the pipette into ice-cooled 0.2-ml tubes that contained 2 units of RNase-free DNase (Takara Bio Inc., Shiga, Japan), 40 units of ribonuclease inhibitor (Takara Bio Inc.), 50 mM Tris-HCl (pH 8.3), 3 mM MgCl 2, 75 mM KCl, and 100 mM dithiothreitol. The reaction mixture was incubated at 37°C for 30 min, followed by 95°C for 5 min. The reverse transcription reaction was then performed in the presence of 0.8 g of oligo(dT) 15 (Roche Applied Science); 10 mM each dATP, dTTP, dGTP, and dCTP (Roche Applied Science); and 200 units of Super-Script TM reverse transcriptase (Invitrogen). The reaction proceeded for 10 min at 25°C and for 50 min at 42°C, followed by a 15-min step at 70°C to inactivate the SuperScript TM reverse transcriptase. Two rounds of PCR (PTC-0150 MiniCycler TM, MJ Research, Inc., Waltham, MA) were performed with outer primers of P2Y 2, P2Y 4, P2X 1, and P2X 3 from rat and four sets of nested primers. First strand cDNA was used for the first PCR amplification. This mixture was then used for the second nested PCR amplification. PCRs were carried out using 2.5 units of Taq polymerase (Takara Bio Inc.) containing 10 mM Tris-HCl (pH 8.3), 50 mM KCl, 1.5 mM MgCl 2, 10 mM dATP, 10 mM dTTP, 10 mM dGTP, 10 mM dCTP, 100 pM each sense and antisense primer, and DNA template. Temperature cycling proceeded as follows: one cycle at 95°C for 5 min and 45 cycles at 95°C for 30 s, 50°C (for P2X 3 ) or 55°C (for P2Y 2, P2Y 4, and P2X 2 ) for 60 s, and 72°C for 90 s, followed by 72°C for 10 min. PCR products were then subjected to gel electrophoresis on a 1.5% agarose gel containing ethidium bromide. The primers used for the PCR of P2Y 2, P2Y 4, P2X 1, and P2X 3 were as follows Patch Clamp Methods-Isolated cells were transferred into a bath situated on the stage of an Olympus IX-70 inverted microscope. The bath (0.3 ml) was superfused at 10 ml/min, and voltage clamp experiments were performed at room temperature (22-25°C). Patch pipettes (with a free tip resistance of 2.5-3 megaohms) were connected to the head stage of an Axopatch 1-D patch clamp amplifier (Axon Instruments, Inc., Foster City, CA). Liquid junction potentials were corrected with an offset circuit prior to each experiment. For the perforated whole cell patch clamp, a stock solution of nystatin in dimethyl sulfoxide (15 mg/ml) was added to the pipette solution, yielding a final concentration of 0.15 mg/ml. A steady-state perforation (series resistance of 20 megaohms) was usually achieved within 10 min after making a giga-seal. pCLAMP Version 7.0 software and Digidata-1200A (both from Axon Instruments, Inc.) were used for data acquisition and the application of command pulses. The voltage and current data were low pass-filtered (5 kHz) and displayed on a computer monitor. Current traces were stored in a Pentium-grade computer and analyzed using Origin Version. 6.1 (Microcal Software Inc., Northampton, MA). Carbon Fiber Electrode (CFE) Amperometry-CFEs were fabricated from carbon fibers (5-11-m diameter) and polypropylene micropipettor tips of 10-l volume as described previously. The tip of the electrode was closely apposed to the cell surface to minimize the diffusion distance from the release sites. The amperometric current, generated by the oxidation of released bioamines (e.g. serotonin) at the exposed tip of the CFE, was measured using an EPC-9 amplifier (HEKA Elektronik, Lambrecht/Pfalz, Germany) operated in the voltage clamp mode at a holding potential of 600 mV. Amperometric signals were low pass-filtered at 0.1 kHz with a gain of 20 or 50 mV/pA and then sampled at 0.5 kHz. Amperometric recordings were semiautomatically analyzed using software written in Igor (WaveMetrics, Lake Oswego, OR). Some recordings with a small number of amperometric signals were plotted on a fast chart recorder, and the events were counted manually. To evaluate the relative exocytosis, the numbers of exocytotic events in the control and test conditions were averaged for 2 min, respectively. Capacitance Measurements-Capacitance measurements were performed using the Lindau-Neher technique implemented as the "sine dc" mode of the "software lock-in" extension of PULSE software (HEKA Elektronik). A 1 kHz, 35-mV peak-to-peak sinusoid stimulus was applied about a direct current holding potential of 60 mV. For the simultaneous acquisition of membrane current and capacitance, the X-chart program (HEKA Elektronik) was used. Solutions and Chemicals-All experiments were performed in PBS containing 145 mM NaCl, 1.6 mM K 2 HPO 4, 0.4 mM KH 2 PO 4, 1 mM MgCl 2, 2 mM CaCl 2, and 5 mM D-glucose (pH 7.4) titrated with NaOH. Data Analysis and Statistics-The data are presented as original recordings, current-voltage (I-V) curves, histograms, and bar graphs of means S.E. (for n cells tested). When necessary, Student's t test for paired samples was applied since the control and test recordings were made from the same cell. p 0.05 was regarded as significant. Identification of RPNECs and ATP-induced c Increase-Among the dispersed prostate cells, we could discriminate between putative neuroendocrine cells with a round shape and relatively dark cytoplasm and the columnar epithelial cells and thin smooth muscle cells The presence of chromogranin A, a representative marker of neuroendocrine cells, was confirmed. Fig. 1A shows a representative confocal image of chromogranin A-positive RPNECs co-stained with FITC-conjugated phalloidin, indicating the distribution of Factin. It is noteworthy that chromogranin A distributes in a granular fashion at the periphery of the cell, where the signal of F-actin is not strong. The following experiments were performed with putative RPNECs, with which the previous patch clamp study and Ca 2 measurement consistently showed characteristics of electrically excitable cells. The fura-2 fluorescence ratio (F 340/380 ; see "Experimental Procedures'') was measured. The mean of F 340/380 under control conditions was 1.27 0.019 (n 85), and the bath application of ATP (100 M) induced a sharp increase in F 340/380 to 3.0 or above in most of the RPNECs tested. In the normal bath solution (PBS), a closer observation revealed an interesting phenomenon of split peaks of the initial Ca 2 transients induced by ATP (Fig. 1B, arrowhead). The time interval between the first and second peaks was 6.5 1.10 s (n 6). In the same cell, the removal of extracellular Ca 2 abolished the first peak without affecting the amplitude of the second peak (Fig. 1B). The Mn 2 quenching experiment also demonstrated a fast influx of divalent cations induced by ATP (Fig. 1C). While measuring the fura-2 fluorescence, we added 0.1 mM Mn 2 to the bath perfusate in the absence of Ca 2, which alone did not induce a significant change in the fluorescence intensity, indicating that there is little background conductance of Mn 2. Under these conditions, the application of ATP (100 M) immediately attenuated both F 340 and F 380, followed by a symmetrical increase and decrease in F 340 and F 380, respectively (n 3). The initial decay of fluorescence was interpreted as quench- ing by the Mn 2 influx through Ca 2 -permeable channels activated by ATP, and the second symmetrical change, viz. the increase in F 340/380, was regarded as the Ca 2 release from intracellular stores. These results suggest that RPNECs express both P2X and P2Y receptors, which recruit extra-and intracellular sources of Ca 2 with fast and slow kinetics, respectively. P2Y-mediated Release of Ca 2 in RPNECs-UTP, a pyrimidine triphosphate, activates some subtypes of P2Y receptors and induces inositol 1,4,5-trisphosphate-mediated Ca 2 release. Thus, we compared the concentration dependence of stored Ca 2 release induced by extracellular ATP and UTP (Fig. 2, A and B). ATP or UTP was applied in the absence of extracellular Ca 2 to exclude the Ca 2 influx pathways. During the interval of ATP application, CaCl 2 (2 mM) was added back to replenish the intracellular calcium stores. The halfeffective concentrations (EC 50 ) of ATP and UTP were 2.8 and 3.8 M, respectively. The EC 50 of UTP in the presence of 2 mM CaCl 2 was 2.2 M, not significantly different from the EC 50 of UTP under the Ca 2 -free condition (Fig. 2B). Next, the efficiency of stored Ca 2 release was compared between various analogs of purines and pyrimidines. As a positive control, a typical response of c to noradrenaline (10 M) was confirmed for each cell. Then, the responses to ATP, UTP, UDP, 2-methylthio-ATP, ADP, and ATP␥S, all at 100 M, were compared in the absence of extracellular Ca 2. The ⌬F 340/380 were normalized to the peak level induced by noradrenaline (10 M) in the same cell. In summary, the Ca 2 response to UTP (n 9) or ATP (n 9) was greater than the responses to ATP␥S (n 6) or ADP (n 3). 2-Methylthio-ATP (n 3) and UDP (n 6) showed little effect on c of RPNECs, indicating that the involvement of P2Y 1 and P2Y 6 subtypes could be excluded (Fig. 2C). The overall results were quite similar to the reported order of potency for the P2Y 2 or P2Y 4 subtype in rat. Although not a specific agent, suramin has been reported as a relatively selective blocker of P2Y 2 compared with P2Y 4 in rats. In RPNECs, the Ca 2 response to UTP (100 M) was completely blocked by pretreatment with 50 M suramin (n 7) (Fig. 2D). In addition, the RT-PCR analysis of RPNECs consistently showed positive signals for P2Y 2 (Fig. 2E). Ca 2 -permeable P2X Channels in RPNECs-Under the nystatin-perforated or conventional whole cell patch clamp conditions, extracellular ATP (10 M) induced a fast transient inward current (I ATP ) (Fig. 3A). In some cases, to ensure fast solution exchange, 10 M ATP was applied by puffing from a thin polyethylene tube (tip diameter of 100 m) located 50 -100 m from the recorded cell. The "local puff " method, combined with a nystatin-perforated whole cell clamp, was re-quired to prevent the rundown of I ATP following repetitive stimulation (e.g. Fig. 3D). The mean amplitude of I ATP was 1.9 0.78 nA at a holding potential of 60 mV (n 9). To obtain the I-V curve of I ATP, brief ramp pulses from 60 to 100 mV were applied, and the control current was digitally subtracted from the peak current in response to ATP. The I-V curve of I ATP reversed direction at 10.0 1.02 mV (n 8) (Fig. 3B). In all cases, the I ATP or ␣,-MeATP-induced inward current (see below) showed fast inactivation, with 90% of the total current decayed within 1 s of drug application. P2X channels are usually more permeable to Ca 2 than monovalent cations and provide significant Ca 2 influx pathways in many kinds of cells (20 -22). In RPNECs, after replacing the NaCl bath solution with 110 mM CaCl 2 solution, the bath application of 10 M ␣,-MeATP induced a huge inward current with a mean amplitude of 2.04 0.41 nA (n 7) at 60 mV. The I-V curve showed an inwardly rectifying property with a reversal potential of 18 3.0 mV (n 7) (Fig. 3F). Under this bi-ionic condition, where Cs (140 mM) and Ca 2 (110 mM) are the only permeable cations at the intracellular and extracellular sides, respectively, the calculated permeability ratio of Ca 2 to Cs (P Ca /P Cs ) for the P2X channel is 2.0. In line with the high Ca 2 permeability of P2X channels, the application of ␣,-MeATP increased the Ca 2 concentration of RPNECs in a concentration-dependent manner (Fig. 3G). In some cases of this experiment, to prevent the spontaneous desensitization of P2X receptors by ATP released from nearby cells, apyrase (20 g/ml) was included in the extracellular solution throughout the cell isolation and incubation period. The EC 50 of ␣,-MeATP was 0.13 and 0.12 M in the absence and presence of apyrase, respectively, indicating that the P2X channels were not significantly desensitized after single cell isolation (Fig. 3G). In the following experiments, considering the fast desensitization, 10 M ␣,-MeATP was applied via the bath perfusate to achieve maximum and simultaneous stimulation of P2X receptors. From the above results, it was clear that RPNECs express both P2X (P2X 1 ) and P2Y (P2Y 2 ) receptors that link to fast Ca 2 influx and relatively slow release of stored Ca 2, respectively. As a next step, we asked whether the P2X and P2Y receptors play a subtype-specific role in the physiological responses of RPNECs, viz. exocytosis. To address this question, we tested whether ␣,-MeATP is a selective activator of P2X receptors without activating stored Ca 2 release. In the absence of extracellular Ca 2, ␣,-MeATP had no effect on the c of RPNECs at 10 M (n 7) (Fig. 4A) or at 100 M (n 3) (data not shown). In another experiment, RPNECs were pretreated with noradrenaline (10 M) in the presence of thapsigargin (1 M), a potent inhibitor of Ca 2 -ATPase in the endoplasmic reticulum. After confirming that noradrenaline did not release any additional Ca 2, ␣,-MeATP (10 M) was applied, which still induced a robust Ca 2 response (Fig. 4B). These results indicate that ␣,-MeATP could be used as a selective agonist of P2X receptors mediating Ca 2 influx in RPNECs. Despite the high Ca 2 permeability, the amount of direct Ca 2 influx via P2X 1 and P2X 3 channels is reportedly small because of their fast desensitization. According to the results obtained with heterologously expressed P2X channels, the Ca 2 influx via voltage-operated Ca 2 channels (VOCCs) secondarily activated by P2X 1 -or P2X 3 -induced depolarization greatly exceeds the Ca 2 influx via P2X 1 /P2X 3 channels. Therefore, to block the L-and N-type VOCCs in RPNECs, cells were pretreated with nifedipine (1 M) and -conotoxin GVIA (1 M). However, the combined treatment with Ca 2 channel blockers did not affect the peak amplitudes of Ca 2 responses to ␣,-MeATP (⌬F 340/380 4.1 0.45, n 7) (Fig. 4C). In another experiment, the membrane voltage was clamped at 60 mV using a whole cell patch clamp to prevent the activation of VOCCs (Fig. 4D). Both the membrane current and the change in c were simultaneously monitored using 0.2 mM K 5 -fura-2 dialyzed with a CsCl pipette solution. Under these conditions, ␣,-MeATP simultaneously induced a huge inward current and transient increase in c (⌬F 340/380 2.1 0.37, n 4). In the same cell, the increase in c by a depolarizing step pulse to 0 mV was also measured. The mean of depolarization-induced ⌬F 340/380 was 0.8 0.09 (n 4), much smaller than that with ␣,-MeATP (10 M) (Fig. 4D). Thus, it is fairly safe to say that Ca 2 influx directly through ␣,-MeATP-sensitive P2X channels determines the peak level of c in RPNECs. To compare the peak amplitudes of c responses to P2Xand P2Y-selective stimulations, we applied ␣,-MeATP (10 M) and UTP (100 M), alternating the order of drug application in each cell. Although both agents induced substantial increases in c in all the putative RPNECs tested, the peak ⌬F 340/380 induced by ␣,-MeATP was larger than that induced by UTP (⌬F 340/380 3.8 0.25 for ␣,-MeATP and 2.1 0.19 for UTP, n 25; p 0.05), as summarized in Fig. 5C. Apart from the larger peak amplitude, the recovery of the Ca 2 response after the washout of ␣,-MeATP generally took longer time than that after the washout of UTP, the reason for which is not clear yet. In 90% of RPNECs tested for UTP and ␣,-MeATP, both agonists induced significant increases in c, indicating that P2X and P2Y receptors are coexpressed in the same cell. Purinergic Stimulation and Exocytosis in RPNECs-Previous immunohistochemical studies suggest that prostatic neuroendocrine cells contain oxidizable amine compounds such as serotonin (5-hydroxytryptamine). Therefore, in an effort to prove exocytosis in putative RPNECs, we performed amperometry using a CFE (Fig. 5). The CFE was located in close contact with the cell, and the voltage was held at 600 mV. In 18 of 30 cells tested, the events of spontaneous exocytosis of oxidizable molecules were observed under the control conditions. The application of ATP (100 M) increased the frequency and amplitudes of current spikes superimposed on a slowly fluctuating base-line current, as described previously for other cell types such as PC12 cells and chromaffin cells. The time-expanded trace of an exocytotic event (Fig. 5D, inset) demonstrated an instantaneous upstroke in the oxidizing current, followed by an exponential decay. The burst-like increase of current spikes by ATP was in accordance with our hypothesis that an appropriate stimulation would induce the exocytosis of oxidizable compounds in putative RPNECs (Fig. 5A). The frequency of events rose from nearly 8.5/min in the control to 28/min after ATP application in this particular case (Fig. 5B). an onset and exponential decay that are characteristic of exocytotic release from single secretory vesicles. To analyze the characteristics of quantal secretion in RPNECs more precisely, we measured the peak amplitudes and total charge of each exocytotic spike of the control and stimulation with ATP and then summarized the data in histograms (Fig. 5D). The average spike amplitude and area of quantal events were 0.24 0.04 pA and 3.1 0.41 femtocoulomb in the control and were significantly increased to 0.49 0.07 pA and 9.3 1.29 femtocoulomb by ATP treatment in this particular experiment. Similar results were obtained in the five RPNECs tested with ATP. Stimulation of P2X (but Not P2Y) Induces Exocytosis in RPNECs-We then compared the effects of P2X and P2Y stimulations on the amperometrically measured exocytosis in RPNECs. ␣,-MeATP (10 M) significantly increased the amplitude and frequency of spikes in 14 of 15 cells tested. In contrast, UTP (100 M) induced a slight secretory response in only 2 of 15 cells. Fig. 6 depicts the representative results showing that only the stimulation with ␣,-MeATP induced exocytotic responses; the frequency of spikes increased from 19 to 85 events/ min (Fig. 6B). The difference between the two agonists is also obvious upon comparison of the histograms of the amplitudes and total charge of the current spikes (Fig. 6, C and D). Although CFE amperometry allows a direct measurement of exocytosis, it is limited to detecting only oxidizable compounds. To overcome this limit, we adopted another method for measuring exocytosis, viz. the Lindau-Neher mode of capacitance measurement. The membrane capacitance (C m ), membrane current (I m ), and c of RPNECs were simultaneously monitored in the whole cell clamp mode. The representative cases show that application of ␣,-MeATP (10 M) induced a large inward current and Ca 2 spike, followed by an increase in C m that decayed slowly to the control level (Fig. 7, A and B). In contrast, the Ca 2 response to UTP (100 M) was accompanied by a reversible decrease in C m, implying endocytosis (Fig. 7A). In some cases of testing ␣,-MeATP, the initial change in C m started from the level below the resting C m and then increased slowly to above the base line (trace not shown). Fig. 7B shows the mean time course of C m changes induced by ␣,-MeATP and UTP in 23 and 15 RPNECs, respectively. On average, the maximum increase in C m by ␣,-MeATP was 5.2 1.53% of the control (n 23), and the maximum decrease in C m by UTP was 7.3 1.39% (n 15). Both the ⌬ c and exocytotic increase in C m by ␣,-MeATP (10 M) were abolished in the absence of extracellular Ca 2 (1 mM EGTA without CaCl 2 ) despite the large inward current (n 6) (Fig. 7, C and D). Similarly, the UTP-induced C m decrease was completely blocked when 10 mM EGTA was included in the pipette solution (n 5) (data not shown), indicating that the endocytotic response to P2Y stimulation was also Ca 2 -dependent. Also, pretreatment of RPNECs with suramin (50 M), but not with TNP-ATP (0.1 M), blocked the endocytotic response to 100 M UTP (n 2) (Fig. 7E). Interestingly, upon pretreatment with TNP-ATP (0.1 M), extracellular ATP consistently decreased the C m of RPNECs (6.3 1.43%, n 6) (Fig. 7E). DISCUSSION This study demonstrates that RPNECs express both P2X (P2X 1 ) and P2Y (P2Y 2 ) purinoreceptors. The fast Ca 2 influx via P2X channels seems to be more efficiently linked to exocytosis in RPNECs, whereas the relatively slow and smaller increase in signaled from P2Y receptors is consistently linked to a net decrease in C m, viz. endocytosis. Previous studies of the effects of extracellular ATP in the prostate have been confined to epithelial cells and smooth muscle. This study is, to our knowledge, the first investigation on the functional role of purinoreceptors in prostate neuroendocrine cells. Thus, like other organs, purinoreceptors seem to be widely distributed in the prostate gland, including neuroendocrine cells. Both the fast desensitization of I ATP and the potent activation by ␣,-MeATP are consistent with the known properties of P2X 1 /P2X 3 channels, and single cell RT-PCR confirmed the expression of the P2X 1 subtype in RPNECs. It is noteworthy that the large ␣,-MeATP-induced increase in c (⌬ c ) was not significantly affected by blocking VOCCs or by depleting intracellular Ca 2 stores (Fig. 4). Because 10 or 100 M ␣,-MeATP had no effect in the absence of extracellular Ca 2, the large Ca 2 response activated by ␣,-MeATP must have been due to the transmembrane influx of Ca 2. Considering the fast inactivation kinetics of P2X 1 channels, however, it was surprising that the transient Ca 2 influx through P2X 1 channels overwhelmed the contribution of VOCCs that would be concomitantly activated in RPNECs. In contrast to our present results, in GT1 cells heterologously expressing P2X 1 or P2X 3 receptors, the transient ⌬ c by extracellular ATP is largely abolished by nifedipine, suggesting that direct influx of Ca 2 via P2X 1 and P2X 3 plays a minor role. One plausible explanation of the unexpectedly strong influx of Ca 2 upon stimulation with ␣,-MeATP is the huge amplitude of the P2X receptor current in RPNECs. If we simply assume that 10% of the 2 nA square current with a duration of 20 ms is carried by Ca 2, the instantaneous entry of Ca 2 would be 4.1451 10 16 mol. Such flux of Ca 2 into a RPNEC with a diameter of 10 m would produce an instantaneous increase in c by 1.056 mM. If only 1% of the entered Ca 2 is present as a free ionized form, it will still produce 10 M ⌬ c. Such a large ⌬ c might have not only overwhelmed the secondary influx of Ca 2 via VOCCs, but also induced Ca 2 -dependent inactivation of VOCCs, which could explain the insignificant effects of Ca 2 channel blockers on ⌬ c induced by ␣,-MeATP (Fig. 4C). The results of amperometry indicate that the tested cells are capable of synthesizing and releasing oxidizable bioamines ( Fig. 5 and 6), most likely serotonin. The single amperometric spikes in RPNECs usually display 5-10 ms of halfamplitude width. Such values are similar to those observed in pancreatic duct epithelial cells (7 ms) and adrenal chromaffin cells (5-15 ms). However, the mean amplitudes of these amperometric current spikes are much smaller than those observed in adrenal chromaffin cells, which often display 10 pA in an individual spike. Presumably, such small spikes may reflect either the less concentrated hormones or the smaller size of secretory vesicles in RPNECs compared with chromaffin cells. Another possibility is that RPNECs store oxidizable compounds together with other substances, e.g. neuropeptides, that are undetectable by CFE amperometry. Both in the amperometry and C m measurements, UTP was found to be far less effective than ␣,-MeATP in triggering exocytosis from RPNECs. Although the application of UTP also induced a sizable increase in c, the change in fura-2 fluorescence (⌬F 340/380 ) by UTP was about half of that induced by ␣,-MeATP. If we suppose that the level of c is the key determinant of exocytosis, the above results suggest that the threshold of c for triggering the exocytosis in RPNECs is relatively high, which might be hard to be attained by P2Y stimulations. In the hair cells of the inner ear, for example, sizable C m changes occur only after the elevation of c by 7 M. Another assumptive speculation is that the P2Xmediated Ca 2 influx might have induced a huge increase in in the subplasmalemmal space, where the exocytotic machinery and vesicles are likely to be localized. However, we did not observe such a Ca 2 gradient when a preliminary Ca 2 imaging study was carried out using confocal microcopy (data not shown). Also, a recent study of cellular Ca 2 images induced by P2X stimulation in neuroendocrine cells demonstrated a global increase in c rather than a local subplasmalemmal change. The opposite changes in the C m of RPNECs in response to ␣,-MeATP and UTP initially suggest an intriguing possibility that the Ca 2 signals due to P2X and P2Y stimulations may be linked to distinctive cellular responses, viz. exocytosis and endocytosis. According to a recent study in the motor nerve endings of Drosophila, exocytosis and endocytosis are separately controlled by different routes of Ca 2 influx mechanisms. However, in RPNECs, we do not have further evidence to suggest that exocytosis and endocytosis are separately regulated by Ca 2 influx and release from stores. Instead of that hypothesis, the slow increase in C m, sometimes from below the resting level, upon the application of ␣,-MeATP (Fig. 7B) suggests that a rise in c might commonly induce endocytotic events irrespective of the Ca 2 recruitment pathways. In other words, the concomitant activation of endocytosis might have impeded the initial fast increase in C m by exocytosis. An induced decrease in C m below the resting level has also been reported in calf adrenal chromaffin cells and rat melanotrophs. The endocytotic events reported in other cells are usually preceded by an initial exocytosis, whereas the UTPinduced endocytosis in the present study displayed a monophasic decrease in C m. Thus, the UTP-induced endocytosis in RPNECs may not be a retrieval of previously exocytosed membrane, the physiological meaning of which needs further investigations. In summary, both ionotropic P2X 1 receptors and metabotropic P2Y 2 receptors are present in RPNECs, the stimulation of which increases c with discriminate kinetics and amplitudes. The strong Ca 2 signal from P2X is more effectively linked to exocytosis, whereas the P2Y stimulation results in a net decrease in C m, i.e. endocytosis. Identification of the components determining the direction of responses and the threshold of ⌬ c will be essential to attain a full understanding of exo/endocytosis in RPNECs, a novel type of neuroendocrine cell. |
Motion analysis in two dimensions of radial-ulnar deviation of type I versus type II lunates. The motions of 2 different types of lunate (type I, no medial hamate facet; type II, medial hamate facet) were evaluated and compared during radial-ulnar deviation of the wrist using radiography and magnetic resonance imaging. Ten right wrists (5 type I and 5 type II lunates) were studied using posteroanterior and lateral x-rays. Six of the 10 normal volunteers (3 type I and 3 type II lunates) were studied using magnetic resonance imaging in 6 positions of radial-ulnar deviation. In the radiographic study the ulnar shift ratio of the lunate (USR), the shortest distance between the proximal ulnar tip of the lunate and the distal ulnar edge of the sigmoid notch of the radius (R-L), the closest distance between the distal ulnar tip of the lunate and the proximal pole of the hamate (L-H), the radius of curvature of the proximal head of the capitate (Cr) on posteroanterior view, and the radiolunate angle on lateral view were measured in each wrist in each of the 6 positions. There were statistically significant differences between type I and II lunates with regard to average maximum ulnar deviation of USR and R-L, total change of USR, R-L distance and L-H distance, average L-H distance and Cr distance in all positions, and average radiolunate angle in neutral and 15 degrees ulnar deviation. In the magnetic resonance imaging study the wrists with a type I lunate did not have contact between the lunate and hamate in any position; the wrists with a type II lunate did have contact between the hamate and the lunate, but only in ulnar deviation. The results of this study demonstrate that the kinematics of a type I lunate are different from those of a type II lunate during radial-ulnar deviation of the wrist. |
Peanut Drought Risk Zoning in Shandong Province, China Peanut growth in Shandong Province, a major peanut-producing area in China, is greatly affected by drought. The present study uses hierarchical analysis, weighted comprehensive evaluation, and ArcGIS spatial analysis to conduct spatial zoning of peanut drought risk in Shandong Province based on daily precipitation data for the province acquired from 1991 to 2020, the per capita GDP, and the peanut planting area of Shandong Province, so as to quantify the disaster risk of peanut drought and formulate disaster prevention and resilience planning accordingly. The results show the high-drought-risk zone was mainly distributed in the northwestern part of Shandong Province and on the Jiaodong Peninsula, covering 32.4% of the province. Drought risk was concentrated on the Jiaodong Peninsula, covering 20.7% of the province. The high-vulnerability zone was mainly distributed in the cities of Yantai, Weihai, Linyi, and Rizhao, accounting for 26.8% of the total area. The low-disaster-prevention and low-mitigation-capacity zone was mainly distributed in the western part of Shandong Province, covering 38.7% of the province. Medium- and high-risk areas for drought affecting peanuts were widely distributed, while the overall comprehensive risk index was high, covering 76.2% of the province. Spatial analysis to conduct risk zoning and assessment of peanut drought in Shandong Province, so as to provide a basis for peanut drought disaster prevention and safe peanut production in Shandong Province. |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ro.nextreports.designer.action.report;
import javax.swing.*;
import ro.nextreports.designer.FormSaver;
import ro.nextreports.designer.Globals;
import ro.nextreports.designer.action.query.SaveAsQueryAction;
import ro.nextreports.designer.grid.DefaultGridModel;
import ro.nextreports.designer.querybuilder.QueryBuilderPanel;
import ro.nextreports.designer.util.I18NSupport;
import ro.nextreports.designer.util.ImageUtil;
import ro.nextreports.designer.util.MessageUtil;
import ro.nextreports.designer.util.ShortcutsUtil;
import ro.nextreports.designer.util.Show;
import ro.nextreports.designer.wizpublish.WebServiceResult;
import ro.nextreports.designer.wizpublish.WebServiceUtil;
import java.awt.event.ActionEvent;
/**
* Created by IntelliJ IDEA.
* User: mihai.panaitescu
* Date: May 3, 2006
* Time: 2:01:27 PM
*/
public class SaveReportAction extends SaveAsQueryAction {
private boolean cancel = false;
private boolean forced = false;
public SaveReportAction() {
this(false);
}
public SaveReportAction(boolean forced) {
putValue(Action.NAME, I18NSupport.getString("save.report"));
Icon icon = ImageUtil.getImageIcon("report_save");
putValue(Action.SMALL_ICON, icon);
putValue(Action.MNEMONIC_KEY, ShortcutsUtil.getMnemonic("report.save.mnemonic", new Integer('T')));
putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(ShortcutsUtil.getShortcut("report.save.accelerator", "control T")));
putValue(Action.SHORT_DESCRIPTION, I18NSupport.getString("save.report"));
putValue(Action.LONG_DESCRIPTION, I18NSupport.getString("save.report"));
this.forced = forced;
}
public void actionPerformed(ActionEvent e) {
QueryBuilderPanel builderPanel = Globals.getMainFrame().getQueryBuilderPanel();
if (builderPanel.isCleaned()) {
return;
}
DefaultGridModel gridModel = (DefaultGridModel) Globals.getReportGrid().getModel();
if ((gridModel.getRowCount() == 0) && (gridModel.getColumnCount() == 0)) {
Show.info(I18NSupport.getString("report.isEmpty"));
return;
}
if (!forced && MessageUtil.showReconnect()) {
return;
}
boolean saveToServer = false;
if (Globals.getServerPath() != null) {
int option = JOptionPane.showConfirmDialog(Globals.getMainFrame(),
I18NSupport.getString("save.entity.server", I18NSupport.getString("report")),
"", JOptionPane.YES_NO_OPTION);
if (option == JOptionPane.YES_OPTION) {
saveToServer = true;
}
}
String name = FormSaver.getInstance().save((String) this.getValue(Action.NAME), false);
if (name != null) {
String path = Globals.getCurrentReportAbsolutePath();
// forced is used when connection is really down, so we cannot update UI
// saving a subreport while in editing report mode, does not require to update UI
if (!forced && !Globals.isInner()) {
builderPanel.addReport(name, path);
}
Globals.setCurrentReportName(name);
Globals.setCurrentQueryName(name);
Globals.getReportUndoManager().discardAllEdits();
if (saveToServer) {
WebServiceResult result = WebServiceUtil.publishReport(Globals.getWebService(),
Globals.getServerPath(),
Globals.getServerDSMetaData().getPath(),
Globals.getServerReportMetaData().getDescription(),
path);
if (result.isError()) {
Show.error(Globals.getMainFrame(), result.getMessage());
} else {
Show.info(Globals.getMainFrame(), result.getMessage());
}
}
} else {
cancel = true;
}
}
public boolean isCancel() {
return cancel;
}
}
|
Struggles Around the Commodification of Daily Life in South Africa Post-apartheid South Africa has seen the emergence of new social and community movements making demands on the African National Congress government to deliver on its promise of a better life for all. In these struggles, the identity of the poor has been increasingly mobilised, both by movements reminding the state of its obligations to its people, and in official policy discourse seeking to introduce neoliberal macro-economic changes. This paper explores how the category of the poor is mobilised in struggles for basic services in urban areas in South Africa, and in state policy that seeks to draw poor people into agreements to pay for services. In doing this, it explores the possibilities inherent in capitalist society for change and the building of relations that challenge or subvert the dominant logic of commodification and, in turn, of capital. |
// gcMark runs the mark (or, for concurrent GC, mark termination)
// STW is in effect at this point.
//TODO go:nowritebarrier
func gcMark(start_time int64) {
if debug.allocfreetrace > 0 {
tracegc()
}
if gcphase != _GCmarktermination {
throw("in gcMark expecting to see gcphase as _GCmarktermination")
}
work.tstart = start_time
gcCopySpans()
gcFlushGCWork()
gcMarkRootPrepare()
work.nwait = 0
work.ndone = 0
work.nproc = uint32(gcprocs())
if trace.enabled {
traceGCScanStart()
}
if work.nproc > 1 {
noteclear(&work.alldone)
helpgc(int32(work.nproc))
}
gchelperstart()
gcw := &getg().m.p.ptr().gcw
gcDrain(gcw, gcDrainBlock)
gcw.dispose()
if work.full != 0 {
throw("work.full != 0")
}
if work.nproc > 1 {
notesleep(&work.alldone)
}
work.finalizersDone = true
for i := 0; i < int(gomaxprocs); i++ {
if !allp[i].gcw.empty() {
throw("P has cached GC work at end of mark termination")
}
}
if trace.enabled {
traceGCScanDone()
}
cachestats()
allocatedDuringCycle := memstats.heap_live - work.initialHeapLive
if memstats.heap_live < work.initialHeapLive {
allocatedDuringCycle = 0
}
if work.bytesMarked >= allocatedDuringCycle {
memstats.heap_reachable = work.bytesMarked - allocatedDuringCycle
} else {
memstats.heap_reachable = 0
}
memstats.next_gc = uint64(float64(memstats.heap_reachable) * (1 + gcController.triggerRatio))
if memstats.next_gc < heapminimum {
memstats.next_gc = heapminimum
}
if int64(memstats.next_gc) < 0 {
print("next_gc=", memstats.next_gc, " bytesMarked=", work.bytesMarked, " heap_live=", memstats.heap_live, " initialHeapLive=", work.initialHeapLive, "\n")
throw("next_gc underflow")
}
memstats.heap_live = work.bytesMarked
memstats.heap_marked = work.bytesMarked
memstats.heap_scan = uint64(gcController.scanWork)
minNextGC := memstats.heap_live + sweepMinHeapDistance*uint64(gcpercent)/100
if memstats.next_gc < minNextGC {
Concurrent sweep happens in the heap growth from
heap_live to next_gc, so bump next_gc up to ensure
that concurrent sweep has some heap growth in which
to perform sweeping before we start the next GC
cycle.
memstats.next_gc = minNextGC
}
if trace.enabled {
traceHeapAlloc()
traceNextGC()
}
} |
Attachment of Listeria monocytogenes to an austenitic stainless steel after welding and accelerated corrosion treatments. Austenitic stainless steels, widely used in food processing, undergo microstructural changes during welding, resulting in three distinctive zones: weld metal, heat-affected zone, and base metal. This research was conducted to determine the attachment of Listeria monocytogenes in these three zones before and after exposure to a corrosive environment. All experiments were done with tungsten inert gas welding of type 304 stainless steel. The four welding treatments were large or small beads with high or low heat. After welding, all surfaces were polished to an equivalent surface finish. A 10-microl droplet of an L. monocytogenes suspension was placed on the test surfaces. After 3 h at 23 degrees C, the surfaces were washed and prepared for scanning electron microscopy, which was used to determine attachment of L. monocytogenes by counting cells remaining on each test surface. In general, bacteria were randomly distributed on each surface type. However, differences in surface area of inoculum due to differences in interfacial energy (as manifested by the contact angle) were apparent and required normalization of bacterial count data. There were no differences (P > 0.05) in numbers of bacteria on the three surface zones. However, after exposure to the corrosive medium, numbers of bacteria on the three zones were higher (P < 0.05) than those on the corresponding zones of noncorroded surfaces. For the corroded surfaces, bacterial counts on the base metal were lower (P < 0.05) than those on heat-affected and weld zones. |
import java.util.Scanner;
import java.util.Arrays;
import java.lang.Math;
public class problemB{
public static void main(String args []){
int n; //total number of divisors of both x and y
int x,y;
Scanner in = new Scanner(System.in);
n=in.nextInt();
int [] d = new int[n];
for(int i=0; i<n; i++){d[i]=in.nextInt();}
//end of input
Arrays.sort(d);
//d is now sorted
y = d[n-1]; //the largest number is automatically included
d[n-1]=0; // we won't be referencing this array element anymore
int [] tf = new int[n];
for(int i=0; i<n-1; i++){
if(i==0){
if(y%d[i]==0){tf[i]=0;}
else {tf[i]=1;}
}
else if(i==n-2&&d[i]==y){
tf[i]=1;
}
else{
if(y%d[i]==0&&d[i]!=d[i-1]){
tf[i]=0;
}
else{tf[i]= 1;}
}
}
for(int i=0; i<n-1; i++){
if(tf[i]==0){
d[i]=0;
}
}
Arrays.sort(d);
x=d[n-1];
if(n==2){x=1; y=1;}
System.out.println(x + " " + y);
}
} |
package boot.lab10;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory;
import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
import org.springframework.batch.core.launch.support.RunIdIncrementer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class BatchConfig {
@Autowired
JobBuilderFactory jobBuilderFactory;
@Autowired
StepBuilderFactory stepBuilderFactory;
@Bean
public Job processJob(Step jobStep) {
return jobBuilderFactory.get("processJob")
.incrementer(new RunIdIncrementer())
.flow(jobStep).end().build();
}
@Bean
public Step jobStep(AlunoReader alunoReader,
AlunoProcessor alunoProcessor, AlunoWriter alunoWriter) {
return stepBuilderFactory.get("alunoImportStep").<String, Aluno> chunk(10)
.reader(alunoReader).processor(alunoProcessor)
.writer(alunoWriter).build();
}
} |
<reponame>mohammedelzanaty/myRoad2BeFullStack
import React, { Component } from 'react';
import pet, { Photo } from '@frontendmasters/pet';
import { Link, navigate, RouteComponentProps } from '@reach/router';
import Carousel from './Carousel';
import ErrorBoundary from './ErrorBoundary';
import { connect } from 'react-redux';
const Modal = React.lazy(() => import('./Modal'));
class Details extends Component<
RouteComponentProps<{ id: string; theme: string }>
> {
public state = {
loading: true,
showModal: false,
url: '',
name: '',
animal: '',
breed: '',
description: '',
location: '',
media: [] as Photo[],
};
public componentDidMount() {
const { id } = this.props;
if (!id) {
navigate('');
return;
}
pet
.animal(+id)
.then(({ animal }) => {
this.setState({
url: animal.url,
name: animal.name,
animal: animal.type,
location: `${animal.contact.address.city}, ${animal.contact.address.state}`,
description: animal.description,
media: animal.photos,
breed: animal.breeds.primary,
loading: false,
});
})
.catch((err: Error) => this.setState({ error: err }));
}
private toggleModal = () =>
this.setState({ showModal: !this.state.showModal });
private adopt = () => navigate(this.state.url);
public render() {
const { theme } = this.props;
const {
loading,
name,
animal,
breed,
description,
location,
media,
showModal,
} = this.state;
if (loading) {
return (
<div className="loading-wrapper">
<div className="loading" />
</div>
);
}
return (
<div className="details">
<Carousel media={media} />
<div>
<h1>{name}</h1>
<h2>{`${animal} — ${breed} — ${location}`}</h2>
<button style={{ backgroundColor: theme }} onClick={this.toggleModal}>
Adopt {name}
</button>
<p>{description}</p>
{showModal ? (
<Modal>
<div>
<h1>Would you like to adopt {name}?</h1>
<div className="buttons">
<button onClick={this.adopt}>Yes</button>
<button onClick={this.toggleModal}>No</button>
</div>
</div>
</Modal>
) : null}
<Link to="/">
<button className="button is-dark back">Back</button>
</Link>
</div>
</div>
);
}
}
const mapStateToProps = ({ theme }: any) => ({ theme });
function DetailsErrorBoundary(props: RouteComponentProps<{ id: string }>) {
return (
<ErrorBoundary>
<Details {...props} />
</ErrorBoundary>
);
}
export default connect(mapStateToProps)(DetailsErrorBoundary);
|
<filename>spring-boot-shiro-mysql/src/main/java/com/huijava/config/ShiroFilterConfig.java<gh_stars>10-100
/**
* fshows.com
* Copyright (C) 2013-2018 All Rights Reserved.
*/
package com.huijava.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import java.util.List;
/**
* shiro的权限拦截器map设置
*
* @author chenhx
* @version ShiroFilterConfig.java, v 0.1 2018-08-20 上午 10:43
*/
@Configuration
@PropertySource("classpath:shiro/shiro.properties")
public class ShiroFilterConfig {
/**
* @Fields anon : 不进行拦截的权限
*/
@Value("#{'${shiro.filter.list.anon}'.split(',')}")
private List<String> anon;
/**
* 是否在最后添加全部链接需要认证
*/
@Value("${shiro.filter.allUrlAuthentication}")
private boolean allUrlAuthentication;
/**
* 登录页面
*/
@Value("${shiro.filter.loginUrl}")
private String loginUrl;
/**
* 登录成功后跳转页面
*/
@Value("${shiro.filter.successUrl}")
private String successUrl;
/**
* 无权限跳转的页面
*/
@Value("${shiro.filter.unauthorizedUrl}")
private String unauthorizedUrl;
/**
* Getter method for property <tt>loginUrl</tt>.
*
* @return property value of loginUrl
*/
public String getLoginUrl() {
return loginUrl;
}
/**
* Setter method for property <tt>loginUrl</tt>.
*
* @param loginUrl value to be assigned to property loginUrl
*/
public void setLoginUrl(String loginUrl) {
this.loginUrl = loginUrl;
}
/**
* Getter method for property <tt>successUrl</tt>.
*
* @return property value of successUrl
*/
public String getSuccessUrl() {
return successUrl;
}
/**
* Setter method for property <tt>successUrl</tt>.
*
* @param successUrl value to be assigned to property successUrl
*/
public void setSuccessUrl(String successUrl) {
this.successUrl = successUrl;
}
/**
* Getter method for property <tt>unauthorizedUrl</tt>.
*
* @return property value of unauthorizedUrl
*/
public String getUnauthorizedUrl() {
return unauthorizedUrl;
}
/**
* Setter method for property <tt>unauthorizedUrl</tt>.
*
* @param unauthorizedUrl value to be assigned to property unauthorizedUrl
*/
public void setUnauthorizedUrl(String unauthorizedUrl) {
this.unauthorizedUrl = unauthorizedUrl;
}
/**
* Getter method for property <tt>anon</tt>.
*
* @return property value of anon
*/
public List<String> getAnon() {
return anon;
}
/**
* Setter method for property <tt>anon</tt>.
*
* @param anon value to be assigned to property anon
*/
public void setAnon(List<String> anon) {
this.anon = anon;
}
/**
* Getter method for property <tt>allUrlAuthentication</tt>.
*
* @return property value of allUrlAuthentication
*/
public boolean isAllUrlAuthentication() {
return allUrlAuthentication;
}
/**
* Setter method for property <tt>allUrlAuthentication</tt>.
*
* @param allUrlAuthentication value to be assigned to property allUrlAuthentication
*/
public void setAllUrlAuthentication(boolean allUrlAuthentication) {
this.allUrlAuthentication = allUrlAuthentication;
}
} |
// Returns true if the user is a member of the team
func IsMember(user, team int64) (bool, error) {
role := Role{}
err := meddler.QueryRow(db, &role, roleFindStmt, user, team)
return len(role.Role) > 0, err
} |
def TR_algo8(self, h):
ve = 0
vd = self._vd
k = 0
p = [0,]*self._N
m = max(self._compact_M)
vM = sum(self._compact_M)
for i in range(m-1, -1, -1):
mu = self.extract_mask(i)
mu_norm = sum([bit_component(mu, j) for j in range(self._N)])
mu = rotate_right(mu, vd+1)
pi = rotate_right(ve, vd+1) & (~mu & 2**self._N-1)
r = [bit_component(h, vM - k - (j+1)) for j in range(mu_norm)][::-1]
r = sum( [rx*2**j for j, rx in enumerate(r)] )
k = k + mu_norm
w = gcr_inv(r, mu, pi)
l = gc(w)
l = T_inv(ve, vd, l)
for j in range(self._N):
p[j] |= bit_component(l, j) << i
ve = ve ^ (rotate_left(e(w), vd+1))
vd = (vd + d(w) + 1) % self._N
return p |
<reponame>ffteja/cgal<gh_stars>1000+
// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : <NAME> <<EMAIL>>
#ifndef CGAL_TRAPEZOIDAL_DECOMPOSITION_2_IOSTREAM_H
#define CGAL_TRAPEZOIDAL_DECOMPOSITION_2_IOSTREAM_H
#include <CGAL/license/Arrangement_on_surface_2.h>
#ifndef CGAL_TRAPEZOIDAL_DECOMPOSITION_2_H
#include <CGAL/Arr_point_location/Trapezoidal_decomposition_2.h>
#endif
namespace CGAL {
template < class Traits>
std::ostream& operator<<(
std::ostream &out,
const typename Trapezoidal_decomposition_2<Traits>::In_face_iterator& it)
{
out << "In_face_iterator(";
if (it.operator->()) out << *it; else out <<"end";
return out << ")" << std::flush;
}
template < class Traits>
std::ostream& write(
std::ostream &out,const Trapezoidal_decomposition_2<Traits>& td)
{
return out << td;
}
template < class Traits>
std::ostream& operator<<(
std::ostream &out,const Trapezoidal_decomposition_2<Traits>& td)
{
return write(out,td.dag_root(),td.get_traits());
}
template < class Traits>
std::ostream& write(std::ostream &out,const Td_X_trapezoid<Traits>& t,
const Traits& traits,bool validate=true)
{
typedef Trapezoidal_decomposition_2<Traits> TD;
typedef Td_X_trapezoid<Traits> X_trapezoid;
typedef X_trapezoid* pointer;
bool pad=false;
//MICHAL: this may fail for inactive trapezoids
out << "(";
if (!t.is_on_left_boundary()) out << t.left(); else out << "-oo"; //MICHAL: this may fail for removed point
out << ",";
if (!t.is_on_right_boundary()) out << t.right(); else out << "+oo";
out << "," << std::flush;
if (!t.is_on_bottom_boundary()) out << t.bottom(); else out << "-oo";
out << ",";
if (!t.is_on_top_boundary()) out << t.top(); else out << "+oo";
out << ",neighbours(" << std::flush;
// debug neighbours equivalence relation
int max_size=4+1;
int null_size=2,size=null_size,i,j;
X_trapezoid* value[] =
{
0,
(X_trapezoid*)CGAL_TD_DELETE_SIGNATURE,
t.lb(),
t.lt(),
t.rb(),
t.rt()
};
typedef char debug_string[256];
debug_string name[]=
{
"none",
"deleted",
"lb",
"lt",
"rb",
"rt"
};
for (j=null_size;j<=max_size;j++)
{
for (i=0;i<size;i++)
if (value[j]==value[i])
{
std::strcat(name[i],"=");
std::strcat(name[i],name[j]);
break;
}
if (i==size)
{
value[size]=value[j];
std::strcpy(name[size++],name[j]);
}
}
if (size==null_size) {out << "none";}
for(j=null_size;j<size;j++)
{
if (pad) out << " ";
else pad=true;
out << name[j];
// identify neighbours
if (traits.is_td_vertex(t) && value[j])
out << "=" << value[j]->top();
}
out << ")" << std::flush;
if (t.is_active())
{
if (traits.is_td_trapezoid(t))
{
if (t.is_unbounded())
{
out << ",U=";
if (t.is_on_left_boundary()) out << ")";
if (t.is_on_bottom_boundary()) {
if (t.is_on_top_boundary())
out << "/\\/";
else
out << "/\\";
}
else if (t.is_on_top_boundary()) out << "\\/";
if (t.is_on_right_boundary()) out << "(";
}
else
out << ",T";
}
else if (traits.is_td_edge(t))
out << ",C";
else // if (t.is_degenerate_point())
out << ",P";
}
else
out << ",D";
/* Calling t.is_valid requires the traits to be initialized with the proper
bounding box */
if (validate)
{
if (t.is_valid(&traits))
out << ",+";
else
out << ",-";
}
out << ")" << std::flush;
return out;
}
template < class Traits>
std::ostream& operator<<(std::ostream &out,const Td_X_trapezoid<Traits>& t)
{
typedef Trapezoidal_decomposition_2<Traits> TD;
typedef Td_X_trapezoid<Traits> X_trapezoid;
typedef X_trapezoid* pointer;
Traits traits;
//MICHAL: this may fail for inactive trapezoids
out << "(";
if (!t.is_on_left_boundary()) out << t.left(); else out << "-oo";
out << ",";
if (!t.is_on_right_boundary()) out << t.right(); else out << "+oo";
out << "," << std::flush;
if (!t.is_on_bottom_boundary()) out << t.bottom(); else out << "-oo";
out << ",";
if (!t.is_on_top_boundary()) out << t.top(); else out << "+oo";
out << ",neighbours(" << std::flush;
// debug neighbours equivalence relation
int max_size=4+1;
int null_size=2,size=null_size,i,j;
X_trapezoid* value[] =
{
0,
(X_trapezoid*)CGAL_TD_DELETE_SIGNATURE,
t.lb(),
t.lt(),
t.rb(),
t.rt()
};
typedef char debug_string[256];
debug_string name[]=
{
"none",
"deleted",
"lb",
"lt",
"rb",
"rt"
};
for (j=null_size;j<=max_size;j++)
{
for (i=0;i<size;i++)
if (value[j]==value[i])
{
std::strcat(name[i],"=");
std::strcat(name[i],name[j]);
break;
}
if (i==size)
{
value[size]=value[j];
std::strcpy(name[size++],name[j]);
}
}
if (size==null_size) {out << "none";}
for(j=null_size;j<size;j++)
{
out << name[j];
// identify neighbours
if (traits.is_td_vertex(t) && value[j])
out << "=" << value[j]->top();
out << " ";
}
out << ")" << std::flush;
if (t.is_active())
{
if (traits.is_td_trapezoid(t))
{
if (t.is_unbounded())
{
out << ",U";
if (t.is_on_left_boundary())
out << (char) 174;
if (t.is_on_bottom_boundary())
out << (char) 25;
if (t.is_on_top_boundary())
out << (char) 24;
if (t.is_on_right_boundary())
out << (char) 175;
}
else
out << ",T";
}
else if (traits.is_td_edge(t))
out << ",C";
else // if (t.is_degenerate_point())
out << ",P";
}
else
out << ",D";
/* Calling t.is_valid requires the traits to be initialized with the proper
bounding box
if (traits)
{
if (t.is_valid(traits))
out << ",+";
else
out << ",-";
}
*/
out << ")" << std::flush;
return out;
}
} //namespace CGAL
#endif //CGAL_TRAPEZOIDAL_DECOMPOSITION_2_IOSTREAM_H
|
/*
* Copyright (c) 2004-2010, <NAME> (<EMAIL>)
* All rights reserved.
*
* See the full license at http://one-jar.sourceforge.net/one-jar-license.html
* This license is also included in the distributions of this software
* under doc/one-jar-license.txt
*/
package com.simontuffs.onejar;
import java.io.IOException;
import java.io.InputStream;
import java.net.FileNameMap;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;
/**
* @author <EMAIL>
*
*/
public class Handler extends URLStreamHandler {
/**
* This protocol name must match the name of the package in which this class
* lives.
*/
public static String PROTOCOL = "onejar";
/**
* @see java.net.URLStreamHandler#openConnection(java.net.URL)
*/
protected URLConnection openConnection(final URL u) throws IOException {
final String resource = u.getPath();
return new URLConnection(u) {
public void connect() {
}
public String getContentType() {
FileNameMap fileNameMap = java.net.URLConnection.getFileNameMap();
String contentType = fileNameMap.getContentTypeFor(resource);
if (contentType == null)
contentType = "text/plain";
return contentType;
}
public InputStream getInputStream() throws IOException {
// Use the Boot classloader to get the resource. There
// is only one per one-jar.
JarClassLoader cl = Boot.getClassLoader();
InputStream is = cl.getByteStream(resource);
// sun.awt image loading does not like null input streams returned here.
// Throw IOException (probably better anyway).
if (is == null)
throw new IOException("cl.getByteStream() returned null for " + resource);
return is;
}
};
}
}
|
<gh_stars>0
#!/usr/bin/env python3
import os
import sys
import argparse
import logging
import numpy as np
import tqdm
from arts_tracking_beams import ARTSFITSReader
from arts_tracking_beams.constants import NSB, SB_TABLE
from arts_tracking_beams.create_tracking_beam import get_input_path, get_subint_chunks
def get_tabs_from_sb(sb):
"""
Get the TAB indices corresponding to the given SB, in low-high frequency order
:param int sb: Synthesised beam index
:return: TAB indices (array)
"""
if sb < 0 or sb >= NSB:
logging.error(f'Synthesised beam index ({sb:02d}) out of range, must be between 0 and {NSB-1}')
sys.exit(1)
# load the SB table
logging.debug(f'Loading SB table {SB_TABLE}')
sb_mapping = np.loadtxt(SB_TABLE, dtype=int)
# get the TABs of the requested sb
try:
tabs = sb_mapping[sb]
except IndexError: # pragma: no cover (because provided SB table is valid)
logging.error(f'Could not get SB{sb:02d} from SB table with {len(sb_mapping)} entries; verify SB table.')
sys.exit(1)
logging.debug(f'SB{sb:02d} consists of TABs: {", ".join([f"{tab:02d}" for tab in tabs])}')
return tabs
def main(args):
"""
The main synthesised beam program.
:param argparse.Namespace/dict args: arguments
"""
# convert args to namespace if given as dict, so they can be accessed as attributes
if isinstance(args, dict):
args = argparse.Namespace(**args)
# logger setup
if args.verbose:
level = logging.DEBUG
else:
level = logging.INFO
logging.basicConfig(format='%(asctime)s.%(levelname)s: %(message)s', level=level)
# identify input files
input_fits_path = get_input_path(args.input_folder, taskid=args.taskid, cb=args.cb)
# get output file name
if args.output is not None:
output_file = args.output
elif args.source is not None:
output_file = f'ARTS_{args.source}.fits'
else:
# get taskid and CB index
prefix, cb, _ = os.path.basename(input_fits_path).split('_')
output_file = f'{prefix}_{cb}_SB{args.sb:02d}.fits'
# check if output file already exists
if os.path.isfile(output_file) and not args.overwrite:
logging.error(f'Output file already exists: {output_file}. Use --overwrite to overwrite.')
sys.exit(1)
# get the TAB indices of the given SB
tabs = get_tabs_from_sb(args.sb)
# initialize the FITS reader
fits_reader = ARTSFITSReader(input_fits_path)
fits_reader.open_files()
# write the output to TAB00
# this does not change the TAB00 file on disk, but anything in the FITS data that is not changed
# will have the TAB00 values
output_handle = fits_reader.file_handles[0]
# update output header keys
if args.source is None:
src_name = f'SB{args.sb:02d}'
else:
src_name = args.source
output_handle['PRIMARY'].header['SRC_NAME'] = src_name
# update scanlen, as its original value is truncated to 1 decimal place
output_handle['PRIMARY'].header['SCANLEN'] = fits_reader.info['duration'].to('second').value
output_handle['SUBINT'].header['NAXIS2'] = fits_reader.info['nsubint']
# loop over the subints in steps of the max chunksize
nsubint_tot = fits_reader.info['nsubint']
for subint_start, nsubint in tqdm.tqdm(get_subint_chunks(0, nsubint_tot, args.chunksize),
desc='Creating synthesised beam', disable=args.no_progress_bar):
fits_reader.read_tabs_to_buffer(subint_start, nsubint, tabs, output_handle['SUBINT'])
# create the output file
output_handle.writeto(output_file, overwrite=args.overwrite)
output_handle.close()
# close the input files
fits_reader.close_files()
logging.info('Done')
def main_with_args():
parser = argparse.ArgumentParser(description='Create a synthesised beam from ARTS tied-array beam data. '
'Example: arts_create_synthesised_beam --input_folder /data/fits '
'--sb 36'
)
parser.add_argument('--input_folder', required=True,
help='Folder with input FITS data')
parser.add_argument('--sb', type=int, required=True,
help='Index of SB to create')
parser.add_argument('--taskid',
help='Task ID of observation (required if files from multiple observations are '
'present in the input folder')
parser.add_argument('--cb', type=int,
help='CB index of input data (required if multiple CBs of the same observation are '
'present in the input folder')
parser.add_argument('--source',
help='Source name to set in FITS header (Default: set SB index as source name)')
parser.add_argument('--output',
help='Path to output FITS file (Default: ARTS_<source name>.fits '
'if source name is specified, else ARTS_<taskid>_CB<cb index>_SB<sb index>.fits)')
parser.add_argument('--overwrite', action='store_true',
help='Overwrite output file if it already exists')
parser.add_argument('--chunksize', type=int, default=1000,
help='Maximum number of subints to load at a time (Default: %(default)s')
parser.add_argument('--no_progress_bar', action='store_true',
help='Disable progress bars')
parser.add_argument('--verbose', action='store_true',
help='Enable verbose logging')
# parse the arguments
args = parser.parse_args()
main(args)
|
/**
* Function updates and cleans asteroid assignments. It will check if the action
* is valid (i.e does object still exist)
*/
private void updateAsteroidToShip(Toroidal2DPhysics space) {
List<Asteroid> finishedAsteroids = new ArrayList<Asteroid>();
Asteroid asteroid;
Ship ship;
for (UUID asteroidId : asteroidToShip.keySet()) {
asteroid = (Asteroid) space.getObjectById(asteroidId);
if(asteroidToShip.get(asteroid.getId()) != null ) {
ship = (Ship) space.getObjectById(asteroidToShip.get(asteroid.getId()).getId());
if (asteroid == null || !(asteroid.isAlive()) || asteroid.isMoveable() || ship.getEnergy() < WorldKnowledge.ENERGY_THRESHOLD ||
(shipToNavigator.get(ship.getId()).getGoalObjectUUID() == null && !(asteroidId.equals(shipToNavigator.
get(ship.getId()).getGoalObjectUUID())))) {
finishedAsteroids.add(asteroid);
}
}
}
for (Asteroid asteroidElement : finishedAsteroids) {
asteroidToShip.remove(asteroidElement.getId());
}
} |
Intraocular lenses: complications, complication factors, and adverse conditions in lens implantation surgery. During the surgical act of lens implantation a fairly large number of minor and major complications are a result of inexperience of the surgeon. Some of them are due to ill-advised attempts to insert lenses in difficult cases. Most complications can be prevented by following a number of basic surgical rules for lens implantation. |
<filename>src/main/java/com/blue/optima/ratelimiter/util/ThrottleRequestHelper.java
package com.blue.optima.ratelimiter.util;
import io.github.bucket4j.Bandwidth;
import io.github.bucket4j.Refill;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.time.Duration;
import java.util.HashMap;
import java.util.Map;
/**
* This class defines the rate limitation capacity for all users. It acts as in-memory storage.
*/
@Component
public final class ThrottleRequestHelper {
static Map<String, Bandwidth> map = new HashMap<>();
@PostConstruct
public void intializeThrottleRequestData() {
map.put(AppConstant.API_V_1_DEVELOPERS, Bandwidth.classic(2, Refill.intervally(2, Duration.ofMinutes(2))));
map.put(AppConstant.API_V_1_DEVELOPERS_3, Bandwidth.classic(3, Refill.intervally(3, Duration.ofSeconds(1))));
map.put(AppConstant.API_V_1_ORGANIZATIONS_4, Bandwidth.classic(4, Refill.intervally(4, Duration.ofSeconds(1))));
map.put(AppConstant.API_V_1_ORGANIZATIONS_2, Bandwidth.classic(2, Refill.intervally(2, Duration.ofMinutes(1))));
}
/*
If user is registered then specific value is return otherwise default(i.e 1)
rate limit capacity is returned
*/
public static Bandwidth getNumberOfRequestAllowed(String key) {
return map.getOrDefault(key, Bandwidth.classic(1, Refill.intervally(1, Duration.ofHours(1))));
}
}
|
An electrophysiological study on the effect of laser irradiation of round window membrane in the guinea pig. An argon laser beam was used to irradiate the round window in 17 guinea pigs. Each animal was examined electrophysiologically with an electrode placed on the round window (RW) membrane 3 or 30 days after the irradiation, after which the cochlea was examined morphologically. The RW membrane was found intact in 16 out of 17 animals. All potentials (SP, CM, CAP) were abolished in 8 of the 17 animals. Histologically, perforations of the basilar membrane and Reissner's membrane were observed in 7 of 8 cases. In 4 of the 17 cases, a small effect of irradiation was evident both physiologically and histologically. Significant elevation of thresholds was observed in the remaining 5 animals, where amplitudes of CM, +SP, and CAP decreased at all intensities. Varying degrees of membranous labyrinth destruction can be used without perforating the RW membrane by the present method. |
The Generation, Transformation, and Dissipation of the Sixth Generation Cinema in China: The Entropy Change of a Concept Abstract Ever since its advent in the 1990s, the term Sixth Generation, as a postulated label, has so far run the course of three consecutive phases: generation, transformation, and dissipation. In the first phase (19902003), the Sixth Generation directors based their films on the authenticity of their individual experiences and significantly altered the structure of cinematic power and aesthetic expression in China. The second phase (20032008) witnessed the groups entry into a period characterized by a generation-less narrative drawing closer to mainstream cultural capital, market, and filmic techniques. The market overexploited the label of the Sixth Generation, and its independent identity was corrupted. 2009 and 2010 constituted the third phase in which the Sixth Generation sought all the possibilities for market survival by shooting a wide range of films, from mainstream production to commercial films. Since 2011, the label Sixth Generation went through a process of self-dissolution. Nevertheless, these directors once again came together on the platform of new media, transforming their energy through microfilm and continuing to exert social influence directly or indirectly. |
Hiding in plain smell A common rice pest can avoid its natural parasite by settling on plants that smell like they have been damaged by a species of caterpillar. I f you look carefully at a plant, you may start to notice a few telltale signs of feeding insects: holes chewed in a leaf, little mazes of trails, shiny spots of honeydew. You might even catch a caterpillar hiding along a leaf's midvein -one of many strategies that plant-eating insects have evolved to camouflage themselves. If you lean in, you will smell a planty scent, which herbivores use to choose the plants they eat (). At the same time, plants also release smells to attract species that prey on these herbivores (Turlings and Erb, 2018). In fact, recent evidence suggests that plant odors are the subject of an 'information arms race', which plants seem to be winning so far. In this arms race, plants evolve new scents to become harder for herbivores to 'sniff out' in a crowd, while herbivores evolve to use more odors to find the plants they eat (). In addition, plants also attract predators of herbivores, using smells that change depending on the herbivores feeding on the plant (Dicke and Baldwin, 2010). Together, these observations may explain why all plants studied so far produce rich, situation-dependent odor bouquets. Now, in eLife, Yunhe Li from the Chinese Academy of Agricultural Sciences and colleagues from Switzerland and China -including Xiaoyun Hu as first author -report that a common crop pest can use the plant odors released by the feeding of another herbivore to hide from its own enemies ( Figure 1; ). This strategy is known as 'olfactory camouflage'. Hu et al. focused on two widespread rice pests: the striped stem borer caterpillar and the brown planthopper. Rice can make different blends of odors to attract animals that rid the plant of feeding herbivores. One such animal is a species of wasp called Anagrus nilaparvatae, which lays its eggs inside planthopper eggs. Hu et al. first observed that brown planthoppers preferred to lay their eggs on caterpillar-infested rice plants rather than undamaged plants ( Figure 1A). Next, experiments were performed to test whether Anagrus nilaparvatae wasps chose the plant on which to lay their eggs based on the presence of caterpillars. The results showed that, in the absence of caterpillars, wasps preferred plants with more planthoppers. However, when the plants had both planthoppers and caterpillars, the wasps instead preferred plants with fewer caterpillars ( Figure 1B). This indicates that one or more odors emitted by the caterpillar-infested plants were masking the presence of planthoppers. To test this hypothesis, Hu et al. identified 20 odor compounds whose levels varied depending on the densities of planthoppers and caterpillars on the plants. These compounds were then used to test which odors the wasps preferred. Finally, to test whether odor alone was sufficient to explain the wasps' choice, Hu et wasps' behavior. This experiment had exactly the same results as using infested plants: wasps did not choose any odor blends that smelled like plants eaten by caterpillars, with or without planthoppers ( Figure 1C). In fact, both in the glasshouse and in the field, wasps parasitize a smaller share of eggs on caterpillar-infested plants, even when the larger number of eggs on those plants is accounted for ( Figure 1D). This corresponds to wasps' preference for the odors of plants hosting only planthoppers, and not caterpillars. Hu et al.'s results suggest that planthoppers currently have the advantage in their information arms race with rice plants and wasps. How did this happen? The blend of odors that rice produces to encode 'caterpillar' appears to be more complex than the blend for 'planthopper', so when both are present, information about the planthoppers may be lost. However, the information arms race model indicates that rice plants should evolve a counter-strategy (); and indeed, Hu et al. further showed that olfactory camouflage is less effective in wild rice than in cultivated plants. Unlike wild rice, cultivated rice is under artificial selection pressure by humans and is not free to respond to natural selection. These results indicate that reducing striped stem borer caterpillar infestations in rice can yield additional benefits, as it may promote biological control of the brown planthopper by parasitoid wasps. From an evolutionary perspective, however, this is shortsighted: if efforts to reduce caterpillar populations fail, planthoppers will continue using the caterpillars as camouflage unless rice plants and wasps evolve ways to elude this mechanism. Unfortunately, waiting for rice plants to evolve a response would entail several generations of reduced rice yield -a disaster for our food supply. An alternative may be to artificially select plants with an advantage in this evolutionary arms race. Doing so will first require dissecting exactly how the planthopper's olfactory camouflage works, and better understanding how plant odors direct interactions between species. Youngsung Joo is in the Department of Biology, Chungbuk National University, Cheongju, Republic of Korea https://orcid.org/0000-0001-8245-7693 Meredith C Schuman is in the Departments of Geography and Chemistry at the University of Zurich, Zurich, Switzerland [email protected] The parasitoid wasp Anagrus nilaparvatae, which lays its eggs inside planthopper eggs, prefers plants infested with ten brown planthoppers (BPH) over those infested with just five (left). However, if a striped stem borer caterpillar is added to the plant with ten brown planthoppers, the wasp has no significant preference for either plant. If a second caterpillar is added to the plant with ten brown planthoppers, the wasp then prefers the plant with five brown planthoppers (right). (C) Wasps placed in the middle of a tube between two synthetic scent blends never preferred the blends that smelled like striped stem borer caterpillars. (D) The results were consistent both in the wild and in the glasshouse, with wasps always preferring plants with brown planthoppers that were not infested with striped stem borer caterpillars. |
Metabolism of the amino acid beta-pyrazol-1-ylalanine and its parent base pyrazole. beta-Pyrazol-1-yl-DL-alanine, an uncommon amino acid from plants of the Cucurbitaceae, was fed to mice. Although pyrazole is known to affect the liver enzymes UDP-glucose dehydrogenase, UDP-glucuronyl transferase and UDP-glucuronic acid pyrophosphatase, and also depresses their liver glycogen concentrations, beta-pyrazol-1-ylalanine had no such effects. beta-Pyrazol-1-ylalanine could not be detected in the liver of the experimental animals but was present in the urine. No other change in urinary amino acid content was observed. Studies with -beta-pyrazol-1-yl-DL-alanine showed the administered amino acid was excreted over a 4-day period, 93% of the compound supplied was recovered. Similar recoveries were obtained with the L-enantiomer from cucumber seed. The metabolic inertness of beta-pyrazol-1-ylalanine was also apparent in experiments involving subcutaneous injection of this compound. Administration of pyrazole confirmed an earlier report of resultant increased activity of liver UDP-glucose dehydrogenase and UDP-glucuronyl transferase, and of the depression of activity of liver UDP-glucuronic acid pyrophosphatase. A concomitant 40% decrease in liver glycogen content was seen. The urine contained a novel metabolite, identified as a peptide conjugate of a pyrazole derivative. Mass spectrometry and p.m.r. spectroscopy indicate that this derivative is 3,4,4-trimethyl-5-pyrazolone. The amino acid constituents are aspartic acid, threonine, serine, glutamic acid, proline, glycine, alanine, valine and leucine. The urine of mice receiving pyrazole contained less free glycine and alanine than controls. From the results, it is concluded that pyrazole is not a catabolite of dietary beta-pyrazol-1-ylalanine but to the contrary, the amino acid is essentially excreted unchanged. Formation of 3,4,4-trimethyl-5-pyrazolone from pyrazole would imply C-methylation, a process that has not been previously observed in a mammalian detoxication context. |
Picking up your phone and saying "Call my dad" or "Call Ted" (meaning Ted your boss, not that random Ted fellow you met five years ago) should work like magic.
All too often, though, both Siri (on iOS) and Google Now (on Android phones) will do a double-take, asking "Who's Dad?" or "Which Ted did you mean?"
Even worse, it might mistake "my dad" for another name in your contact book and start dialing—and at that point, you'll probably be wondering why you didn't skip the fancy voice commands and simply tap your way to your phone favorites.
With a little work on your part, you can teach Siri and Google Now the nicknames and relationships of the most important people in your life, from your loving spouse or parents to your closest (or most demanding) colleagues.
Once your iPhone or Android phone knows who your dad is—or that "Ted" means your boss, not Ted whatshisname—using voice commands for phone calls will feel a lot more magical.
For Android
Of the few different ways to add nicknames and relationships to contacts, the easiest is to simply tell Google Now via voice command.
Open Google Now (slowly swipe up from the bottom of the screen, or tap the home-screen Google search box), tap the microphone icon (or just say "OK Google" if you've enabled this setting, and say "[name of your spouse] is my [husband or wife]," or "[name} is my [boss]."
Assuming it heard you loud and clear, Google Now will go ahead and assign those labels to the person you named.
Want to add relationships with a bit more precision, or want to give one of your contacts a nickname? Try this:
Launch the People app on your Android device, open a contact card, tap the three-dot menu button in the top corner of the screen, then tap Edit.
Tap Add another field, tap Nickname, then fill in the blank, either with an actual nickname or the contact's relationship to you, such as "boss" or "sister." (Yes, both the People app and Gmail have an actual "Relationship" field, but filling it in won't do any good as far as voice commands are concerned.)
Is Google Now—or are you, for that matter—having trouble with a tongue-twister of a name? Tap Add another field, then select "Phonetic name" to make life (and voice recognition) a little easier.
Adding nicknames and relationships from your PC or Mac is easy, too.
Fire up your favorite web browser, open the Gmail account associated with your Android device, then select "Contacts" from the pull-down menu in the top-left corner of the page.
Search for and then open the contact you want to edit, tap the Add button at the bottom of the contact card, select "Relationship, "Nickname," or "Phonetic name," and fill in the blanks.
For iOS
The easiest of several ways is this one:
Click and hold the Home button on your iPhone or iPad to launch Siri, then say "[name of contact] is my [husband, wife, boss]."
After thinking about it a moment, Siri will ask to confirm the relationship. Done and done.
Here's how to do the same thing using the iOS keypad:
Open the Contacts app, tap your own contact card, then tap the Edit button.
Scroll down to the "Add related name" field, tap it, select a relationship (like "spouse" or "manager"), then type a name, or tap the little "i" to choose a contact from the iOS address book.
Does Siri need help recognizing the names of your friends, colleagues and loved ones? Find one of their contact cards in the Contacts app, scroll down to the "add field" button, then tap it to add a phonetic name or a nickname.
If you use iCloud to store your contacts, you can edit your relationships, nicknames and phonetic name from a web browser.
Log into iCloud.com, click the Contacts icon. Search for a contact card, then click the Edit button.
Click the Add Field button to add a phonetic first or last name, a nickname, or a "related" person.
Finally, Mac users can use the Mac's Contact app to add nicknames and relationships in pretty much the same way—assuming you're using iCloud to sync your contacts on your Mac, of course.
Launch the Contacts app on your Mac, open a contact and click the Edit button.
Click the little + button in the bottom corner of the contact card, select More Fields, then pick Phonetic First/Last Name, Related Name, or Nickname. |
<filename>ThunderLord/RedSandBox/src/swingSandBeta/MainPanel.java<gh_stars>1-10
package swingSandBeta;
import javax.swing.*;
import java.awt.*;
public class MainPanel extends JPanel
{
public MainPanel()
{
setBackground(Color.red);
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
}
}
|
China has taken a lead in making search engines more social, after Baidu, the country’s largest search provider, announced that it has begun indexing real-time results from popular microblogging service Sina Weibo.
While neither Facebook nor Twitter have granted Google access to their data for search results, having once done so, their Chinese equivalents have come together to play nicely and bring information from the service to a wider audience in China.
Starting today, Baidu now prominently displays breaking real-time news and trending content from Sina Weibo in results, while the search engine also includes related content from three other microblog services, including Tencent Weibo.
Results from the microblogs is shown towards the top of the results page, and labelled to explain that it is taken from the social site.
You can test the feature out by searching with any of the trending topics found at Baidu Fengyunbang, its trend insight page. However, once they have been searched for, a registered Sina Weibo account is required, as messages on the service can only be read by its users.
We process billions of search queries on a daily basis, and many of those queries are related to the real-time information found on microblog posts. With this deal between Baidu and Sina Weibo, Baidu has completed its integration of high-quality content from China’s four leading microblog platforms.
From Sina’s side, Peng Shaobin, vice president and general manager of microblog operations, said that the company “hopes to encourage the continuous development of China’s Internet industry by actively cooperating with other major online platform”.
Shaobin also lauded Baidu as a “highly efficient channel for extending the reach of quality real-time information to more netizens”, as Sina looks to increase its Weibo’s influence within China’s Web space.
The inclusion of social news gives Chinese Internet users a new place they go to see what’s happening but, thanks to Baidu’s wide range of search and other products, they are able to get more than just a search on Sina Weibo or Tencent Weibo gives.
Shaobin repeated comments from CEO Charles Chao, that the services now has more than 300 million users, while he also revealed that it is seeing 100 million messages and comments posted by its users each day.
The move is yet another example of Baidu’s dominance of the Chinese Web space, where it leads Google by some way. We compared the two firms last week and showed that Baidu holds 83.6 percent of China’s search market, to Google’s 11.1 percent. Revenue-wise, Baidu accounts for a reported 77.7 percent of the $866 million (5.5 billion yuan) market, with Google taking home 18.3 percent.
News of the collaboration comes two weeks before the introduction of a government ruling that will mean users of Sina, and other Weibo, must verify their identity on the service using official ID.
Chao admits that the move will hurt the service, by reducing activity there, but unverified users will still be able to read news and messages there. Given the move to index real-time results with Baidu, Sina is pushing the news consumption benefits of Weibo, particularly for unverified users that fear the repercussions of being fully accountable on the service. |
September 30, 2013 This was the final season for New York Yankees closer Mariano Rivera. His number is being retired by the only team he has ever played for during his 19-year Major League Baseball career. Rivera with his signature pitch, the cut fastball, was one of the most successful closers in baseball history.
Is Camaraderie Slowing Down Competition?
September 29, 2013 Kevin Helliker, senior sports editor for The Wall Street Journal, argues that young runners have lost the competitive spirit in running, making them the "slowest generation." He tells host Arun Rath that many young people value camaraderie more than finish times, and some competitions, like the "Tough Mudder" race, explicitly avoid the focus on finish times.
September 29, 2013 Many teams making baseball playoffs this year are among those with smaller budgets. NPR's Mike Pesca tells host Rachel Martin that they're winning because they're craftier.
September 28, 2013 On the last weekend of regular-season baseball, Howard Bryant of ESPN joins host Scott Simon to talk about the playoff possibilities, plus big changes afoot in how college athletes get paid for their likenesses.
September 27, 2013 David Greene speaks to Sid Bream, the former Atlanta Braves player whose dramatic slide into home plate ended the Pittsburgh Pirates last playoff run in 1992. A Pennsylvania native and former Pirate, Bream is now cheering for the Pirates as they return to the post season for the first time in 21 years.
September 27, 2013 It's not just sports teams that win championships. It's also their fans who endure long seasons hanging on every pitch, touchdown or basket. David Greene finds out what it's like to be on the cusp of either a championship — or a disaster. |
<filename>iOSOpenDev/frameworks/Symbolication.framework/Headers/VMUSampler.h
/**
* This header is generated by class-dump-z 0.2b.
*
* Source: /System/Library/PrivateFrameworks/Symbolication.framework/Symbolication
*/
#import <Symbolication/Symbolication-Structs.h>
#import <Foundation/NSObject.h>
@class NSMapTable, NSConditionLock, NSMutableArray, VMUTaskMemoryCache, NSString, VMUProcessDescription;
@interface VMUSampler : NSObject {
int _pid; // 4 = 0x4
unsigned _task; // 8 = 0x8
BOOL _needTaskPortDealloc; // 12 = 0xc
BOOL _recordThreadStates; // 13 = 0xd
BOOL _taskIs64Bit; // 14 = 0xe
NSString *_processName; // 16 = 0x10
VMUProcessDescription *_processDescription; // 20 = 0x14
CSTypeRef _symbolicator; // 24 = 0x18
VMUTaskMemoryCache *_memCache; // 32 = 0x20
sampling_context_t *_samplingContext; // 36 = 0x24
unsigned _mainThread; // 40 = 0x28
NSMapTable *_lastThreadBacktraceMap; // 44 = 0x2c
unsigned _numberOfCopiedBacktraces; // 48 = 0x30
unsigned *_previousThreadList; // 52 = 0x34
unsigned _previousThreadCount; // 56 = 0x38
unsigned _maxPreviousThreadCount; // 60 = 0x3c
double _tbRate; // 64 = 0x40
double _tbInterval; // 72 = 0x48
NSConditionLock *_stateLock; // 80 = 0x50
double _interval; // 84 = 0x54
double _timeLimit; // 92 = 0x5c
unsigned _sampleLimit; // 100 = 0x64
BOOL _sampling; // 104 = 0x68
unsigned _samplingThreadPort; // 108 = 0x6c
unsigned _numberOfSamples; // 112 = 0x70
NSMutableArray *_samples; // 116 = 0x74
BOOL _stacksFixed; // 120 = 0x78
void *_cfi; // 124 = 0x7c
id _delegate; // 128 = 0x80
double _timeSpentSamplingWithoutCFI; // 132 = 0x84
double _timeSpentSamplingWithCFI; // 140 = 0x8c
BOOL _shouldOutputSignature; // 148 = 0x94
BOOL _showDispatchQueueNames; // 149 = 0x95
}
@property(assign) double samplingInterval; // G=0x2bcd0; S=0x2bca8; converted property
@property(assign) double timeLimit; // G=0x2bd14; S=0x2bcec; converted property
@property(assign) unsigned sampleLimit; // G=0x2bd44; S=0x2bd30; converted property
@property(assign) BOOL shouldOutputSignature; // G=0x2bd80; S=0x2bd6c; converted property
@property(assign) id delegate; // G=0x2be0c; S=0x2bdf8; converted property
@property(readonly, assign) int pid; // G=0x2bdbc; converted property
@property(readonly, assign) CSTypeRef symbolicator; // G=0x2bd98; converted property
@property(readonly, assign) unsigned mainThread; // G=0x2bde4; converted property
@property(readonly, retain) NSMutableArray *samples; // G=0x2cd50; converted property
+ (void)initialize; // 0x2c0a0
+ (id)sampleAllThreadsOfPID:(int)pid; // 0x2c03c
+ (id)sampleAllThreadsOfPID:(int)pid withSymbolicator:(id)symbolicator; // 0x2c02c
+ (id)sampleAllThreadsOfTask:(unsigned)task; // 0x2bfc8
+ (id)sampleAllThreadsOfTask:(unsigned)task withSymbolicator:(id)symbolicator; // 0x2bfb8
+ (id)sampleAllThreadsOfTask:(unsigned)task symbolicate:(BOOL)symbolicate; // 0x2bf44
+ (id)sampleAllThreadsOfTask:(unsigned)task withSymbolicator:(id)symbolicator symbolicate:(BOOL)symbolicate; // 0x2bf30
- (id)initWithPID:(int)pid orTask:(unsigned)task options:(unsigned)options; // 0x2e83c
- (id)initWithPID:(int)pid; // 0x2be20
- (id)initWithTask:(unsigned)task; // 0x2be4c
- (id)initWithPID:(int)pid options:(unsigned)options; // 0x2be7c
- (id)initWithTask:(unsigned)task options:(unsigned)options; // 0x2bea8
- (void)dealloc; // 0x2e6a4
- (void)finalize; // 0x2bedc
- (void)_makeHighPriority; // 0x2e510
- (void)_makeTimeshare; // 0x2e4c0
- (void)initializeSamplingContext:(BOOL)context; // 0x2e3b4
- (unsigned)recordSampleTo:(id)to beginTime:(double)time endTime:(double)time3 thread:(unsigned)thread; // 0x2d960
- (void)_fixupStacks:(id)stacks; // 0x2d718
- (void)_runSamplingThread; // 0x2d27c
- (id)sampleAllThreadsOnce; // 0x2d1c4
- (id)sampleThread:(unsigned)thread; // 0x2d0a8
- (BOOL)start; // 0x2cf1c
- (BOOL)stop; // 0x2ce4c
- (BOOL)waitUntilDone; // 0x2cd80
// converted property setter: - (void)setSamplingInterval:(double)interval; // 0x2bca8
// converted property getter: - (double)samplingInterval; // 0x2bcd0
// converted property setter: - (void)setTimeLimit:(double)limit; // 0x2bcec
// converted property getter: - (double)timeLimit; // 0x2bd14
// converted property setter: - (void)setSampleLimit:(unsigned)limit; // 0x2bd30
// converted property getter: - (unsigned)sampleLimit; // 0x2bd44
- (void)setRecordThreadStates:(BOOL)states; // 0x2bd58
// converted property setter: - (void)setShouldOutputSignature:(BOOL)outputSignature; // 0x2bd6c
// converted property getter: - (BOOL)shouldOutputSignature; // 0x2bd80
// converted property getter: - (CSTypeRef)symbolicator; // 0x2bd98
// converted property getter: - (int)pid; // 0x2bdbc
// converted property getter: - (id)samples; // 0x2cd50
- (unsigned)sampleCount; // 0x2bdd0
- (void)flushData; // 0x2ccd0
// converted property getter: - (unsigned)mainThread; // 0x2bde4
- (id)threadNameForThread:(unsigned)thread returnedThreadId:(unsigned long long *)anId returnedDispatchQueueSerialNum:(unsigned long long *)num; // 0x2cc6c
- (id)threadNameForThread:(unsigned)thread; // 0x2cc40
- (id)dispatchQueueNameForSerialNumber:(unsigned long long)serialNumber returnedConcurrentFlag:(BOOL *)flag returnedThreadId:(unsigned long long *)anId; // 0x2cbb0
- (id)dispatchQueueNameForSerialNumber:(unsigned long long)serialNumber; // 0x2cb80
// converted property setter: - (void)setDelegate:(id)delegate; // 0x2bdf8
// converted property getter: - (id)delegate; // 0x2be0c
- (void)preloadSymbols; // 0x2cb34
- (void)sampleForDuration:(unsigned)duration interval:(unsigned)interval; // 0x2caac
- (void)stopSampling; // 0x2ca9c
- (void)forceStop; // 0x2ca8c
- (id)stopSamplingAndReturnCallNode; // 0x2c970
- (void)writeOutput:(id)output append:(BOOL)append; // 0x2c18c
@end
|
/*
* Copyright (c) 2007 BUSINESS OBJECTS SOFTWARE LIMITED
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of Business Objects nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* ValueGem.java
* Creation date: (10/18/00 1:03:35 PM)
* By: <NAME>
*/
package org.openquark.gems.client;
import java.util.List;
import org.openquark.cal.compiler.CompositionNode;
import org.openquark.cal.compiler.ModuleName;
import org.openquark.cal.compiler.SourceModel;
import org.openquark.cal.compiler.TypeExpr;
import org.openquark.cal.valuenode.ParametricValueNode;
import org.openquark.cal.valuenode.Target;
import org.openquark.cal.valuenode.TargetRunner;
import org.openquark.cal.valuenode.ValueNode;
import org.openquark.util.xml.BadXMLDocumentException;
import org.openquark.util.xml.XMLPersistenceHelper;
import org.w3c.dom.CDATASection;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
/**
* A ValueGem which we are using to build our supercombinator (compound Gem).
* Creation date: (10/18/00 1:03:35 PM)
* @author <NAME>
*/
public final class ValueGem extends Gem implements CompositionNode.Value {
/** The value node representing the value of this value gem */
private ValueNode valueNode;
/**
* Construct a default ValueGem.
*/
public ValueGem() {
// The default value is a parametric value node with an unconstrained type variable.
// TODOEL: this assumes that parametric value nodes will always be present, and that
// they are the best type to use. This will be true for (at least) a while though..
this(new ParametricValueNode(TypeExpr.makeParametricType()));
}
/**
* Construct a ValueGem from a value node
* @param valueNode ValueNode the initial value of this value gem
*/
public ValueGem(ValueNode valueNode) {
// Initialize with no input parts.
super(0);
this.valueNode = valueNode;
}
/**
protected PartOutput createOutputPart() {
return new PartOutput();
}
* {@inheritDoc}
*/
@Override
protected PartOutput createOutputPart() {
return new ValuePart();
}
/**
* Obtain the string value of this CompositionNode
* @return the string value
*/
public final String getStringValue() {
return valueNode.getCALValue();
}
/**
* Obtain the source model of this CompositionNode
* @return the source model
*/
public final SourceModel.Expr getSourceModel() {
return valueNode.getCALSourceModel();
}
/**
* Returns true if this ValueGem contains parametric values.
* Otherwise, returns false.
* @return boolean
*/
public boolean containsParametricValues() {
return valueNode.containsParametricValue();
}
/**
* Change the value of this gem.
* @param newValue the new value of this gem.
*/
public void changeValue(ValueNode newValue) {
ValueNode oldValue = valueNode;
this.valueNode = newValue;
fireValueChangeEvent(oldValue);
}
/**
* Adds the specified listener to receive value change events from this gem.
* @param l the value change listener
*/
public void addValueChangeListener(ValueGemChangeListener l) {
listenerList.add(ValueGemChangeListener.class, l);
}
/**
* Removes the specified value change listener so that it no longer receives value change events from this gem.
* @param l the value change listener
*/
public void removeValueChangeListener(ValueGemChangeListener l) {
listenerList.remove(ValueGemChangeListener.class, l);
}
/**
* Fires a value change event.
* @param oldValue the old input parts.
*/
private void fireValueChangeEvent(ValueNode oldValue) {
Object[] listeners = listenerList.getListenerList();
ValueGemChangeEvent e = null;
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == ValueGemChangeListener.class) {
if (e == null) {
// Lazily create the event:
e = new ValueGemChangeEvent(this, oldValue, valueNode);
}
((ValueGemChangeListener)listeners[i + 1]).valueChanged(e);
}
}
}
/**
* Get the value of this gem.
* @return ValueNode the value node represented by this gem.
*/
public final ValueNode getValueNode() {
return valueNode;
}
/**
* Return whether this target is runnable
* @return boolean whether this target is runnable
*/
@Override
public final boolean isRunnable(){
// additional constraint: can't be parametric
return (super.isRunnable());
}
/**
* Describe this Gem
* @return the description
*/
@Override
public String toString() {
return "Value: " + getTextValue();
}
/**
* Return the textual representation of the value that this gem is storing
* @return String
*/
public String getTextValue() {
return getValueNode().getTextValue();
}
/*
* Methods supporting XMLPersistable ********************************************
*/
/**
* {@inheritDoc}
*/
@Override
public void saveXML(Node parentNode, GemContext gemContext) throws XMLPersistenceHelper.StateNotPersistableException {
Document document = (parentNode instanceof Document) ? (Document)parentNode : parentNode.getOwnerDocument();
// Create the value gem element
Element resultElement = document.createElementNS(GemPersistenceConstants.GEM_NS, GemPersistenceConstants.VALUE_GEM_TAG);
resultElement.setPrefix(GemPersistenceConstants.GEM_NS_PREFIX);
parentNode.appendChild(resultElement);
// Add info for the superclass gem.
super.saveXML(resultElement, gemContext);
// Now add ValueGem-specific info
// Add info for the value
// Add a value gem element
Element valueElement = document.createElement(GemPersistenceConstants.VALUE_GEM_VALUE_TAG);
resultElement.appendChild(valueElement);
// // Add the value text to the value gem element
// if (containsParametricValues()) {
// throw new StateNotPersistableException("Value gem has parametric values.");
// }
String valueString = valueNode.getCALValue();
CDATASection valueStringChild = XMLPersistenceHelper.createCDATASection(document, valueString);
valueElement.appendChild(valueStringChild);
}
/**
* Create a new ValueGem and loads its state from the specified XML element.
* @param gemElement Element the element representing the structure to deserialize.
* @param gemContext the context in which the gem is being instantiated.
* @param valueRunner ValueRunner the ValueRunner used to get the value node from the value.
* @param loadModuleName the name of the module in which this value node was saved
* @return ValueGem
* @throws BadXMLDocumentException
*/
public static ValueGem getFromXML(Element gemElement, GemContext gemContext,
ValueRunner valueRunner, ModuleName loadModuleName) throws BadXMLDocumentException {
ValueGem gem = new ValueGem();
gem.loadXML(gemElement, gemContext, valueRunner, loadModuleName);
return gem;
}
/**
* Load this object's state.
* @param gemElement Element the element representing the structure to deserialize.
* @param gemContext the context in which the gem is being instantiated.
* @param valueRunner ValueRunner the ValueRunner used to get the value node from the value.
* @param loadModuleName the name of the module in which this value node was saved
*/
void loadXML(Element gemElement, GemContext gemContext,
ValueRunner valueRunner, ModuleName loadModuleName) throws BadXMLDocumentException {
XMLPersistenceHelper.checkTag(gemElement, GemPersistenceConstants.VALUE_GEM_TAG);
XMLPersistenceHelper.checkPrefix(gemElement, GemPersistenceConstants.GEM_NS_PREFIX);
List<Element> childElems = XMLPersistenceHelper.getChildElements(gemElement);
// Get info for the underlying gem.
Element superGemElem = (childElems.size() < 1) ? null : (Element) childElems.get(0);
XMLPersistenceHelper.checkIsElement(superGemElem);
super.loadXML(superGemElem, gemContext);
// figure out the value node
Element valueChildElem = (childElems.size() < 2) ? null : (Element) childElems.get(1);
XMLPersistenceHelper.checkIsElement(valueChildElem);
this.valueNode = getValueNodeFromXML(valueChildElem, valueRunner, loadModuleName);
}
/**
* Get a value node from its corresponding XML element.
* @param valueElement the element representing the structure to deserialize.
* @param valueRunner the ValueRunner used to get the value node from the value.
* @param loadModuleName the name of the module in which this value node was saved
* @return ValueNode a new value node corresponding the to XML element. Null if evaluation fails, or
* if the value node system can't handle the output.
*/
public static ValueNode getValueNodeFromXML(Element valueElement, ValueRunner valueRunner, ModuleName loadModuleName)
throws BadXMLDocumentException {
XMLPersistenceHelper.checkTag(valueElement, GemPersistenceConstants.VALUE_GEM_VALUE_TAG);
// Get the value text
StringBuilder valueText = new StringBuilder();
Node valueChild = valueElement.getFirstChild();
XMLPersistenceHelper.getAdjacentCharacterData(valueChild, valueText);
// Create a target to be run by a value runner, and return the result
Target valueTarget = new Target.SimpleTarget(valueText.toString());
ValueNode targetValue = null;
try {
targetValue = valueRunner.getValue(valueTarget, loadModuleName);
} catch (TargetRunner.ProgramCompileException pce) {
XMLPersistenceHelper.handleBadDocument(valueElement, "Can't compile program: \"" + valueText + "\".");
}
// What to do?
if (targetValue == null) {
XMLPersistenceHelper.handleBadDocument(valueElement, "Can't convert to a value node: \"" + valueText + "\".");
}
return targetValue;
}
/**
* The PartConnectable representing the output part of a ValueGem
* Creation date: (Jul 26, 2002 5:04:03 PM)
* @author <NAME>
*/
class ValuePart extends PartOutput {
/**
* Default constructor for an emitting part
*/
private ValuePart(){
super();
}
/**
* Get the type of this part
* @return the type expression
*/
@Override
public final TypeExpr getType() {
return valueNode.getTypeExpr();
}
/**
* Set the type of this part
* @param newType TypeExpr the type expression to set
*/
@Override
void setType(TypeExpr newType) {
throw new UnsupportedOperationException("Can't set the type of a value gem.");
}
}
}
|
import { Module } from '@nestjs/common';
import { MongooseModule } from '@nestjs/mongoose';
import { UserService } from './user.service';
import { UserResolver } from './user.resolver';
import { UserSchema } from './user.schema';
import { FirebaseModule } from '../firebase';
import { AuthModule } from '../auth';
import { ConfigModule } from '../config';
@Module({
imports: [
MongooseModule.forFeature([{ name: 'User', schema: UserSchema }]),
FirebaseModule,
AuthModule,
ConfigModule,
],
providers: [UserService, UserResolver],
exports: [UserService],
})
export class UserModule {}
|
Percutaneous full endoscopic lumbar foraminoplasty for adjacent level foraminal stenosis following vertebral intersegmental fusion in an awake and aware patient under local anesthesia: A case report. Percutaneous endoscopic surgery for the lumbar spine has become established in the last decade. It requires only an 8 mm skin incision, causes minimal damage to the paravertebral muscles, and can be performed under local anesthesia. With the advent of improved equipment, in particular the high-speed surgical drill, the indications for percutaneous endoscopic surgery have expanded to include lumbar spinal canal stenosis. Transforaminal percutaneous endoscopic discectomy has been used to treat intervertebral stenosis. However, it has been reported that adjacent level disc degeneration and foraminal stenosis can occur following intervertebral segmental fusion. When this adjacent level pathology becomes symptomatic, additional fusion surgery is often needed. We performed minimally invasive percutaneous full endoscopic lumbar foraminoplasty in an awake and aware 50-year-old woman under local anesthesia. The procedure was successful with no complications. Her radiculopathy, including muscle weakness and leg pain due to impingement of the exiting nerve, improved after the surgery. J. Med. Invest. 64: 291-295, August, 2017. |
Oakland councilwoman calls on state to expunge pot-crime records
Oakland Councilmember At-Large Rebecca Kaplan speaks to journalists and community members during a press conference at Oakland City Hall in Oakland, California, on Tuesday, May 3, 2016. Oakland Councilmember At-Large Rebecca Kaplan speaks to journalists and community members during a press conference at Oakland City Hall in Oakland, California, on Tuesday, May 3, 2016. Photo: Connor Radnovich, The Chronicle Buy photo Photo: Connor Radnovich, The Chronicle Image 1 of / 4 Caption Close Oakland councilwoman calls on state to expunge pot-crime records 1 / 4 Back to Gallery
Oakland City Councilwoman Rebecca Kaplan is calling on the state to expunge all marijuana-related criminal records, a move that she says will open the door for people of color who have traditionally been shut out of a multibillion-dollar cannabis industry.
“I think it’s important to keep in mind the racial disparity here,” Kaplan told The Chronicle on Wednesday. “Over the past decade, it’s been black people who’ve been locked up — had their freedom taken away, their families taken away, their jobs taken away — for something that white people mostly don’t get punished for.”
She said that people who were convicted years ago may still be denied jobs, affordable housing or student loans. “So they’re punished over and over again for something that society now doesn’t think is a crime.”
Kaplan has authored a resolution, which goes before its first council committee on Thursday, and may be the next political maneuver by a city intent on correcting the racial injustices of the U.S. war on drugs. On Tuesday, the council unanimously approved new marijuana laws that included a controversial equity program that supporters say will help right some of the wrongs, but that critics say will cause the city’s pot trade to sputter.
‘This is a travesty’
“This is not equity, this is a travesty,” said Jake Sassaman, a member of the city’s Cannabis Regulatory Commission. Sassaman, who is white, said he knows several African American pot entrepreneurs who would not qualify for an equity permit because they do not meet the requirements.
Oakland’s new equity permit program will set aside half of the city’s cannabis business permits for applicants who fit a narrow set of criteria: Residents who have lived for at least two years in a designated police beat in East Oakland where marijuana arrests were highly concentrated in 2013, or individuals who were incarcerated for marijuana-related crimes in Oakland over the past decade. Equity permit holders must sustain at least a 50 percent ownership stake in their businesses.
Opponents of the program say it will create huge backlogs on permits because the rules stipulate that the city must award at least one equity permit for each general permit. While the city’s eight currently licensed dispensaries will be grandfathered in, its mom-and-pop cannabis businesses — many of which are run by African Americans and Latinos — could get caught up in the jam.
Among the critics who spoke out at Tuesday’s council meeting was Andrea Unsworth, the black owner of a delivery service called StashTwist. Many of her suppliers are moms who grow pot plants in their garages.
Risk for entrepreneurs
“We know this is about those who have been arrested and impacted by the drug war, but it’s also about those of us who have taken the immense risk of opening businesses,” Unsworth told the council.
But on the other side of the debate were Oakland residents who see themselves as victims of a drug policy that disproportionately punished people of color. Some who spoke at the council meeting said they’ve been left behind as the state inches toward legalizing recreational marijuana.
“The war on drugs has criminalized black and brown communities, and now that (marijuana) is becoming legalized there’s a whole line of white men that are about to get rich,” said a speaker named George Galvis.
Councilwoman Desley Brooks pushed for the equity program by tacking on last-minute amendments to ordinances that had taken the city’s Cannabis Regulatory Commission 18 months to write. Councilwoman Annie Campbell Washington added to a provision extending equity permits to people with criminal records.
“If you’re serious about equity, show us you’re willing to share this big pie,” Brooks said to the pot business owners who challenged her amendments.
May need to tweak laws
Kaplan acknowledged on Wednesday that the laws might need a few tweaks before they can fully achieve the council’s vision of a more inclusive marijuana economy.
She’s confident that eventually the state will get on board with the idea to expunge records for marijuana crimes.
“There’s an open question as to whether this is something that (Gov. Jerry Brown’s) administration just launches, or whether it will take legislation,” she said. “But I do think we are likely to win in the end.”
A spokeswoman for the state’s newly formed Bureau of Medical Marijuana Regulation said she thinks the decision about whether to toss records will be left to the courts.
Rachel Swan is a San Francisco Chronicle staff writer. Email: [email protected] |
import Joi from 'joi';
import { schema as dropCommandSchema, DropCommand } from './drop-command';
import { schema as handleCommandDueSchema, HandleCommandDue } from './handle-command-due';
import { schema as handleDeletedCommandSchema, HandleDeletedCommand } from './handle-deleted-command';
import { schema as handleIncomingRequestSchema, HandleIncomingRequest } from './handle-incoming-request';
import { schema as handleLinkSchema, HandleLink } from './handle-link';
import { schema as handleLinkUpdateSchema, HandleLinkUpdate } from './handle-link-update';
import { schema as handleNewCommandSchema, HandleNewCommand } from './handle-new-command';
import { schema as handleUnlinkSchema, HandleUnlink } from './handle-unlink';
import { schema as handleReportLateSchema, HandleReportLate } from './handle-report-late';
import { schema as increaseReportingCounterSchema, IncreaseReportingCounter } from './increase-reporting-counter';
import { schema as markCommandAsSentSchema, MarkCommandAsSent } from './mark-command-as-sent';
import { schema as parseReportSchema, ParseReport } from './parse-report';
import { schema as scheduleCommandSchema, ScheduleCommand } from './schedule-command';
import { schema as sendRequestSchema, SendRequest } from './send-request';
import { schema as setDeviceFieldsSchema, SetDeviceFields } from './set-device-fields';
import { schema as expectNextReportBeforeSchema, ExpectNextReportBefore } from './expect-next-report-before';
type AllActivities = DropCommand
| HandleCommandDue
| HandleDeletedCommand
| HandleIncomingRequest
| HandleLink
| HandleLinkUpdate
| HandleNewCommand
| HandleUnlink
| HandleReportLate
| IncreaseReportingCounter
| MarkCommandAsSent
| ParseReport
| ScheduleCommand
| SendRequest
| SetDeviceFields
| ExpectNextReportBefore;
const schema = (apiVersion: number): Joi.AlternativesSchema => Joi.alternatives().try(
dropCommandSchema,
handleCommandDueSchema(apiVersion),
handleDeletedCommandSchema(apiVersion),
handleIncomingRequestSchema(apiVersion),
handleLinkSchema(apiVersion),
handleLinkUpdateSchema(apiVersion),
handleNewCommandSchema(apiVersion),
handleUnlinkSchema(apiVersion),
handleReportLateSchema(apiVersion),
increaseReportingCounterSchema,
markCommandAsSentSchema,
parseReportSchema(apiVersion),
scheduleCommandSchema,
sendRequestSchema,
setDeviceFieldsSchema,
expectNextReportBeforeSchema,
);
export { schema, AllActivities };
|
Michael Boone welcomed the community to the Boys and Girls Clubs of Phillips County. The community gathered Sunday, May 20 from 2 - 4 p.m. to welcome Boone as the new Executive Director of the Boys and Girls Clubs.
What sports does the Club offer for the boys and girls? |
Application of computerized adaptive testing in medical education. Application of computerized adaptive testing (CAT) in medical education is still spare in the high stakes examination or in the school-based examination. In the medical school in Belgium, CAT was used for an assessment tool in general practice as pilot test was reported. In Hallym University, CAT has been introduced in the evaluation of the students' performance as in-course general evaluation test and parasitology test. Another examples of application of CAT for high stakes examination are Medical Council of Canada Qualifying Examination - Part 1 in Canada and National Council Licensure EXamination - Registered Nurse in USA. CAT has some merits such as accurate estimation of the ability parameters of the examinees and the shorter period of examination. To apply the CAT in medical education more actively, medical teachers should have an interest in the modern measurement theories such as item response theory and technologies. It is still uncertain if CAT may be prosperous in the medical education as a tool for the measurement of the examinees' ability. However, we should prepare the era of application of CAT in high stakes examination such as medical licensing examination. |
<gh_stars>0
import { WithStyles } from '@material-ui/core';
import RdsContainerStyles from './RdsContainer.styles';
export default interface RdsContainerProps extends WithStyles<typeof RdsContainerStyles> {
/**
* Children.
*/
children: JSX.Element | JSX.Element[];
/**
* Padding will `0`.
*/
disableGutters?: boolean;
/**
* Max width. Default is 'md'.
*/
maxWidth?: 'lg' | 'md' | 'sm' | 'xl' | 'xs' | false;
}
|
Rational investigation of upper abdominal pain. BACKGROUND Upper abdominal pain is a common problem with an extraordinary diversity of possible causes. Many patients have no structural disease, and making the correct diagnosis can be a challenge. The roles of endoscopy, testing for Helicobacter pylori, and imaging techniques have been debated widely and continue to be a matter for discussion. OBJECTIVE This article details the value of various investigations in the setting of specific presentations of upper abdominal pain. DISCUSSION Functional dyspepsia is a common cause of upper abdominal pain but the diagnosis should only be made after consideration of more serious pathology. The various organic causes of upper abdominal pain and the appropriate investigations are discussed. Early endoscopy is advisable in the presence of alarm symptoms and in patients over 55 years of age. |
<reponame>acrazing/undux
/*
* @since 2020-11-30 13:52:50
* @author acrazing <<EMAIL>>
*/
import { IDOf, JSONState, Pair, PartialRecord } from 'amos-utils';
import { Map } from './Map';
import { PartialProps, PartialRequiredProps, Record, RecordProps } from './Record';
export class RecordMap<R extends Record<any>, KF extends keyof RecordProps<R>> extends Map<
IDOf<R[KF]>,
R
> {
constructor(readonly defaultValue: R, readonly keyField: KF) {
super(defaultValue);
}
// FIX TS2344: Type '{ [x: string]: any; }' is not assignable to type
// 'JSONState<PartialRecord<R[KF], R>>'
override fromJSON(state: PartialRecord<R[KF], JSONState<RecordProps<R>>>): this {
return super.fromJSON(state as any);
}
override setItem(key: R[KF], value: R): this;
override setItem(value: R): this;
override setItem(key: any, value?: any) {
value ??= key;
key = key === value ? key[this.keyField] : key;
return super.setItem(key, value);
}
override setAll(items: readonly R[]): this;
override setAll(items: readonly Pair<R[KF], R>[]): this;
override setAll(items: readonly any[]): this {
return super.setAll(
items.map((value) => {
return Array.isArray(value) ? value : [value[this.keyField], value];
}) as any[],
);
}
override mergeItem(props: PartialRequiredProps<R, KF>): this;
override mergeItem(key: R[KF], props: PartialProps<R>): this;
override mergeItem(key: any, value?: any) {
value ??= key;
key = key === value ? key[this.keyField] : key;
return this.setItem(key, this.getItem(key).merge(value));
}
override mergeAll(items: readonly PartialRequiredProps<R, KF>[]): this;
override mergeAll(items: readonly Pair<R[KF], PartialProps<R>>[]): this;
override mergeAll(items: any[]): this {
if (Array.isArray(items[0])) {
return super.setAll(
items.map(([key, value]) => {
value[this.keyField] = key;
return [key, this.getItem(key).merge(value)];
}),
);
} else {
return super.setAll(
items.map((value) => [
value[this.keyField],
this.getItem(value[this.keyField]).merge(value),
]),
);
}
}
}
export type RecordMapKeyField<T> = T extends RecordMap<infer R, infer KF> ? KF : never;
export type RecordMapKey<T> = T extends RecordMap<infer R, infer KF> ? R[KF] : never;
export type RecordMapRecord<T> = T extends RecordMap<infer R, infer KF> ? R : never;
export type RecordMapProps<T> = T extends RecordMap<infer R, infer KF> ? RecordProps<R> : never;
|
Q:
Am I wrong to flag an OP answering their question multiple times?
Regarding this question, the OP has asked a question and then posted 2 solutions neither of which is satisfactory. Personally, I think those details should be part of the question (clarification of attempts to date and why they're not acceptable) but clearly the OP disagrees with me.
My reasons stem from:
The "useless" answers could be pushed below useful ones so new visitors won't see all the information
Seeing 2 answers on a Q may deter others from visiting and trying to answer
It's untidy
I'd like to know what others think? Am I wrong on this?
A:
Judging by the comment upvotes, my comment might be strong enough to be an answer, so I am reposting it....
I'm not familiar enough with the technologies involved to assess the validity of the answers, but the 1st answer now deleted 10K only seems to be more of a commentary:
Another solution suggested by @MikeSW was to subclass Route class and then add custom "id" propagation logic in there:
ASP.NET MVC: The right way to propagate query parameter through all ActionLinks
What I don't like about this is that it feels like a hack of the frameworks internals. I hope there is an officially supported way of doing this.
I think it should be an edit to the question, just based on how it is worded (or edited to remove the discussion aspect).
The second answer at least looks like an answer, so it might be ok (if the content is good).
However, even give this, the structure of his responses just has a help forum feel where the OP continues to provide running updates on changes to the code in an effort to get more and different feedback (or maybe the feel of a whiteboard session where you are working out the problems with your team). Even if the answers are valid responses and work, they just don't have the feel of a true Q&A. |
<reponame>FernandoDoming/galerist<gh_stars>0
package me.fernandodominguez.pixels;
import me.fernandodominguez.pixels.models.PhotoResponse;
import me.fernandodominguez.pixels.models.PhotosResponse;
import retrofit.http.GET;
import retrofit.*;
import retrofit.http.Path;
import retrofit.http.Query;
/**
* Created by <NAME> on 06/12/15.
*/
public class FiveHundredPxClient {
/* Where to contact the HTTP API */
private static final String WEB_SERVICE_BASE_URL = "https://api.500px.com/v1/";
private String apiKey;
private final FiveHundredPx service;
/* Constructor */
public FiveHundredPxClient(final String apiKey){
this.apiKey = apiKey;
RestAdapter restAdapter = new RestAdapter.Builder()
.setEndpoint(WEB_SERVICE_BASE_URL)
.setRequestInterceptor(new RequestInterceptor() {
public void intercept(RequestFacade request) {
request.addQueryParam("consumer_key", apiKey);
}
})
.build();
service = restAdapter.create(FiveHundredPx.class);
}
private interface FiveHundredPx {
@GET("/photos")
PhotosResponse getImages();
@GET("/photos")
void getImages(@Query("feature") String feature, @Query("rpp") Integer rpp,
@Query("image_size") Integer imageSize, Callback<PhotosResponse> callback);
@GET("/photos/{id}")
PhotosResponse getImage(@Path("id") int id);
@GET("/photos/{id}")
void getImage(@Path("id") int id, Callback<PhotoResponse> callback);
@GET("/photos/{id}")
PhotosResponse getImage(@Path("id") int id, @Query("image_size") int size);
@GET("/photos/{id}")
void getImage(@Path("id") int id, @Query("image_size") int size, Callback<PhotoResponse> callback);
@GET("/photos/{id}")
void getImage(@Path("id") int id, @Query("image_size") int size, @Query("tags") int tags, Callback<PhotoResponse> callback);
}
/**/
public void getImage(int id, Callback<PhotoResponse> callback){
service.getImage(id, callback);
}
public void getBigImage(int id, Callback<PhotoResponse> callback){
service.getImage(id, 4, 1, callback);
}
public PhotosResponse getImages(){
return service.getImages();
}
public void getImages(Callback<PhotosResponse> callback){
service.getImages(null, null, 4, callback);
}
public void getImages(String feature, Callback<PhotosResponse> callback){
service.getImages(feature, null, 4, callback);
}
public void getImages(String feature, int rpp, Callback<PhotosResponse> callback){
service.getImages(feature, rpp, 4, callback);
}
public void getImages(String feature, int rpp, int imageSize, Callback<PhotosResponse> callback){
service.getImages(feature, rpp, imageSize, callback);
}
}
|
NOTHING BUT BLIND PITILESS INDIFFERENCE: BOUNDARY MONUMENTS, DEFERRAL AND THE PUBLIC INTEREST Abstract Boundary monuments in Canada have long been asserted to be a public good. Such goods, however, be they monuments or water and sewerage systems, are only in the public interest if they are reliable. Some 800 boundary monuments in 26 residential subdivisions in the province of Alberta were closely inspected (using metal detectors and shovels) for their reliability. Four findings resulted. First, monuments established immediately upon survey, but before servicing and construction, are reliable only 60% of the time. Second, deferring establishment for 4.5 months increases the reliability of the monuments by only 10%; they are reliable 70% of the time. Third, the practice of not deferring establishment until house construction is the reason that deferral is ineffective at significantly enhancing the reliability of monuments. Fourth, although enhanced deferral is in the public interest (if boundary monuments are a public good), land surveyors are reluctant to embrace a longer deferral period. This reluctance is partly a function of wanting to appease clients who prefer to locate house foundations from boundary monuments, and partly a function of viewing deferral as the slippery slope to the wide-spread use of coordinates in place of monuments to define boundaries. This reluctance, however, leads to a logical contradiction: If monuments are a public good, then their reliability only 60 70% of the time is intolerable. Conversely, if monuments are not a public good, then their current use is questionable. |
/**
* This function returns a map from line number to a pair <defined variable,used variables>
* When a new variable is defined, we check if this is where the scope starts, if not, we need to add a definition for the beginning of the scope
* @param method the method
* @return a map from line number to pair <defined variable,used variables> (e.g 15 --> <val, [x,i] for int val = x*i)
*/
public TreeMap<Integer,Pair<String,HashSet<String>>> defUsePerLine(MethodNode method) throws AnalyzerException {
TreeMap<Integer, Pair<String, HashSet<String>>> defUsePerLine = new TreeMap<>();
DefUseInterpreter interpreter = new DefUseInterpreter();
FlowAnalyzer<Value> flowAnalyzer = new FlowAnalyzer<Value>(interpreter);
DefUseAnalyzer analyzer = new DefUseAnalyzer(flowAnalyzer, interpreter);
analyzer.analyze("package/ClassName", method);
Variable[] variables = analyzer.getVariables();
HashMap<Integer, Integer> lineInst = instructionToLine(method);
DefUseChain[] chains = new DepthFirstDefUseChainSearch().search(
analyzer.getDefUseFrames(),
analyzer.getVariables(),
flowAnalyzer.getSuccessors(),
flowAnalyzer.getPredecessors());
for (int i = 0; i < chains.length; i++) {
DefUseChain chain = chains[i];
Integer defLine = lineInst.get(chain.def);
Integer useLine = lineInst.get(chain.use);
if(defLine != null) {
String var = variables[chain.var].toString();
int index = getIndexFromVarName(var);
Integer start = scopeStart(index,defLine,method);
HashSet<String> inputs = new HashSet<>();
if (defUsePerLine.containsKey(defLine))
inputs = defUsePerLine.get(defLine).getValue();
defUsePerLine.put(defLine,new Pair(var,inputs));
if(defLine != start){
inputs = new HashSet<>();
if(defUsePerLine.containsKey(start))
inputs = defUsePerLine.get(start).getValue();
defUsePerLine.put(start,new Pair(var,inputs));
}
}
if(useLine != null) {
String s = variables[chain.var].toString();
if (isStatic || chain.var != 0) {
if (defUsePerLine.containsKey(useLine)) {
HashSet<String> inputs = defUsePerLine.get(useLine).getValue();
if (!inputs.contains(s)){
inputs.add(s);
}
} else {
HashSet<String> inputs = new HashSet<>();
inputs.add(s);
defUsePerLine.put(useLine, new Pair(null, inputs));
}
}
}
}
return defUsePerLine;
} |
1857 Carmarthenshire by-election
The Carmarthenshire by-election of 1857 was fought in June 1857. The by-election arose because of the death of the incumbent Conservative MP, David Arthur Saunders Davies. It was won by the Conservative candidate David Pugh, who prevailed against the opposition of many within the party.
Candidates
John Lloyd Davies, who had stood down as member for Cardigan Boroughs at the recent election, having faced certain defeat when opposed by Edward Pryse, was first in the field. He issued an address within days of the late member's death and emphasised his role in the public life of the county for thirty years. However, it was soon rumoured that David Pugh had the support of a large proportion of the county gentry.
On 3 June, Charles Bishop convened a meeting at the Ivy Bush Hotel in Carmarthen to choose a candidate. The meeting was chaired by Sir John Mansel and addressed by two of the aspirants, John Lloyd Davies and Sir James Hamilton. David Pugh was not present and it was unclear whether he would abide by the decision of the meeting. Howel Gwyn, former MP for Falmouth, was also mentioned but had little support. A lengthy discussion ensued, which ended with Pugh being omitted from a ballot in which John Lloyd Davies secured a majority over Sir James Hamilton.
|the county that he would have been heavily defeated at a contested election. Pugh's selection was described by the Welshman as a reflection of a consensus which enabled moderate supporters of both the Liberal and Conservative factions to support him.
Outcome
Pugh was duly returned after the hustings at Llandeilo on 12 June, when he was proposed by W.R.H. Powell of Maesgwynne. The Welshman stated that Pugh "was chosen, not by any party, but by the constituents as a body, without any reference to political distinctions." |
<filename>deeplearning4j-scaleout/deeplearning4j-nlp/src/main/java/org/deeplearning4j/text/tokenization/tokenizerfactory/PosUimaTokenizerFactory.java
/*
*
* * Copyright 2015 Skymind,Inc.
* *
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
* *
* * http://www.apache.org/licenses/LICENSE-2.0
* *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* * See the License for the specific language governing permissions and
* * limitations under the License.
*
*/
package org.deeplearning4j.text.tokenization.tokenizerfactory;
import static org.apache.uima.fit.factory.AnalysisEngineFactory.createEngineDescription;
import static org.apache.uima.fit.factory.AnalysisEngineFactory.createEngine;
import java.io.InputStream;
import java.util.Collection;
import org.apache.uima.analysis_engine.AnalysisEngine;
import org.deeplearning4j.text.annotator.PoStagger;
import org.deeplearning4j.text.annotator.SentenceAnnotator;
import org.deeplearning4j.text.annotator.StemmerAnnotator;
import org.deeplearning4j.text.annotator.TokenizerAnnotator;
import org.deeplearning4j.text.tokenization.tokenizer.PosUimaTokenizer;
import org.deeplearning4j.text.tokenization.tokenizer.TokenPreProcess;
import org.deeplearning4j.text.tokenization.tokenizer.Tokenizer;
/**
* Creates a tokenizer that filters by
* part of speech tags
* @see {org.deeplearning4j.text.tokenization.tokenizer.PosUimaTokenizer}
* @author <NAME>
*
*/
public class PosUimaTokenizerFactory implements TokenizerFactory {
private AnalysisEngine tokenizer;
private Collection<String> allowedPoSTags;
private TokenPreProcess tokenPreProcess;
private boolean stripNones = false;
public PosUimaTokenizerFactory(Collection<String> allowedPoSTags, boolean stripNones) {
this(defaultAnalysisEngine(),allowedPoSTags);
this.stripNones = stripNones;
}
public PosUimaTokenizerFactory(Collection<String> allowedPoSTags) {
this(allowedPoSTags, false);
}
public PosUimaTokenizerFactory(AnalysisEngine tokenizer,Collection<String> allowedPosTags) {
this.tokenizer = tokenizer;
this.allowedPoSTags = allowedPosTags;
}
public static AnalysisEngine defaultAnalysisEngine() {
try {
return createEngine(
createEngineDescription(SentenceAnnotator.getDescription(),
TokenizerAnnotator.getDescription(),
PoStagger.getDescription("en"),
StemmerAnnotator.getDescription("English")));
}catch(Exception e) {
throw new RuntimeException(e);
}
}
@Override
public Tokenizer create(String toTokenize) {
PosUimaTokenizer t = new PosUimaTokenizer(toTokenize,tokenizer,allowedPoSTags, stripNones);
if (tokenPreProcess!= null) t.setTokenPreProcessor(tokenPreProcess);
return t;
}
@Override
public Tokenizer create(InputStream toTokenize) {
throw new UnsupportedOperationException();
}
@Override
public void setTokenPreProcessor(TokenPreProcess preProcessor) {
this.tokenPreProcess = preProcessor;
}
/**
* Returns TokenPreProcessor set for this TokenizerFactory instance
*
* @return TokenPreProcessor instance, or null if no preprocessor was defined
*/
@Override
public TokenPreProcess getTokenPreProcessor() {
return tokenPreProcess;
}
}
|
#ifndef USERSPACE_H
#define USERSPACE_H
#include "common.h"
#include "virtix_proc.h"
extern unsigned int c_err;
typedef unsigned int uint;
#define SYS_FORK 0
#define SYS_GETPID 1
#define SYS_GETENV 2
#define SYS_WRITE 3
#define SYS_READ 4
#define SYS_CLOSE 5
#define SYS_EXIT 6
#define SYS_OPEN 7
#define SYS_MALLOC 8
#define SYS_FREE 9
#define SYS_GET_ARGS 10
#define SYS_LSEEK 11
#define SYS_GETSTDIN 12
#define SYS_GETSTDOUT 13
#define SYS_GETSTDERR 14
#define SYS_EXEC 15
#define SYS_SBRK 16
#define SYS_RAISE 17
#define SYS_SIGNAL 18
#define SYS_SIGEXIT 19
#define SYS_WAIT 20
#define SYS_GETGID 21
#define SYS_GETCWD 22
#define SYS_CHDIR 23
#define SYS_EXECVE 24
#define SYS_STAT 25
#define SYS_FSTAT 26
#define SYS_SYNC 27
uint fork();
uint getpid();
char** get_env();
uint write(uint fid, char* buffer, size_t length);
uint read(uint fid, char* buffer, size_t length);
uint close(uint fid);
uint open(char* path, uint offset);
int sys_wait(int pid, int* status, int options);
uint _exit(registers_t* regs);
void init_userspace(); //Maps userspace call handler
#endif
|
Oxygen and Iron Regulation of Iron Regulatory Protein 2* Iron regulatory protein 2 (IRP2) is a central regulator of cellular iron homeostasis due to its regulation of specific mRNAs encoding proteins of iron uptake and storage. Iron regulates IRP2 by mediating its rapid proteasomal degradation, where hypoxia and the hypoxia mimetics CoCl2 and desferrioxamine (DFO) stabilize it. Previous studies showed that iron-mediated degradation of IRP2 requires the presence of critical cysteines that reside within a 73-amino acid unique region. Here we show that a mutant IRP2 protein lacking this 73-amino acid region degraded at a rate similar to that of wild-type IRP2. In addition, DFO and hypoxia blocked the degradation of both the wild-type and mutant IRP2 proteins. Recently, members of the 2-oxoglutarate (2-OG)-dependent dioxygenase family have been shown to hydroxylate hypoxia-inducible factor-1 (HIF-1), a modification required for its ubiquitination and proteasomal degradation. Since 2-OG-dependent dioxygenases require iron and oxygen, in addition to 2-OG, for substrate hydroxylation, we hypothesized that this activity may be involved in the regulation of IRP2 stability. To test this we used the 2-OG-dependent dioxygenase inhibitor dimethyloxalylglycine (DMOG) and showed that it blocked iron-mediated IRP2 degradation. In addition, hypoxia, DFO and DMOG blocked IRP2 ubiquitination. These data indicate that the region of IRP2 that is involved in IRP2 iron-mediated degradation lies outside of the 73-amino acid unique region and suggest a model whereby 2-OG-dependent dioxygenase activity may be involved in the oxygen and iron regulation of IRP2 protein stability. |
The effect of nozzle internal flow on spray atomization The effect of nozzle surface features on the overall atomization behavior of a liquid jet is analyzed in the present computational work by adopting three representative geometries, namely a single X-ray tomography scan of the Engine Combustion Networks Spray A nozzle (Unprocessed), a spline reconstruction of multiple scans (Educated), and a purely external flow configuration. The latter configuration is often used in fundamental jet atomization studies. Numerically, the two-phase flow is solved based on algebraic volume-of-fluid methodology utilizing the OpenFoam solver, interFoam. Quantitative characterization of the surface features concerning the first two geometries reveals that while both of them have similar levels of cylindrical asymmetries, the nozzle configuration pertaining to the Unprocessed geometry has much larger surface features along the streamwise direction than the Educated geometry. This produces for the Unprocessed configuration a much larger degree of non-axial velocity components in the flow exiting the orifice and also a more pronounced disturbance of the liquid surface in the first few diameters downstream of the nozzle orifice. Furthermore, this heightened level of surface destabilization generates a much shorter intact liquid core length, that is, it produces faster primary atomization. The surprising aspect of this finding is that the differences between the Unprocessed and Educated geometries are of O m, and they are able to produce O mm effects in the intact liquid core length. In spite of more pronounced atomization for the Unprocessed geometry, the magnitude of the turbulent liquid kinetic energy is roughly the same as the Educated geometry. This highlights the important role of mean field quantities, in particular, non-axial velocity components, in precipitating primary atomization. At the other end of the spectrum, the external-only configuration has the mildest level of surface disturbances in the near field resulting in the longest intact liquid core length. |
<filename>syncano-ios/SCMacros.h
//
// SCMacros.h
// syncano4-ios
//
// Created by <NAME> on 27/03/15.
// Copyright (c) 2015 Syncano. All rights reserved.
//
/*
* Singleton for .h file
*/
#define SINGLETON_FOR_CLASS(classname) \
+ (classname *)shared##classname
/*
* Singleton for .m file
*/
#define SINGLETON_IMPL_FOR_CLASS(classname) \
\
+ (classname *)shared##classname { \
\
static dispatch_once_t pred; \
__strong static classname * shared##classname = nil;\
dispatch_once( &pred, ^{ \
shared##classname = [[self alloc] init]; }); \
return shared##classname; \
}
/**
Raises an `NSInvalidArgumentException` if the `condition` does not pass.
Use `description` to supply the way to fix the exception.
*/
#define SCParameterAssert(condition, description, ...) \
do {\
if (!(condition)) { \
[NSException raise:NSInvalidArgumentException \
format:description, ##__VA_ARGS__]; \
} \
} while(0)
|
package entities;
public class PessoaFisica extends Contribuinte{
private double FaturaDeSaude;
public PessoaFisica(){
super();
}
public PessoaFisica(String Nome,double RendaAnual, double FaturaDeSaude){
super(Nome,RendaAnual);
this.FaturaDeSaude=FaturaDeSaude;
}
public double getFatureDeSaude(){
return FaturaDeSaude;
}
public void setFatureDeSaude(double FaturaDeSaude){
this.FaturaDeSaude=FaturaDeSaude;
}
@Override
public double Imposto(){
double ValorImposto,RendaAnual=0,FaturaSaude=0;
if(this.RendaAnual<20000){
RendaAnual=this.RendaAnual*0.15;
}else{
RendaAnual=this.RendaAnual*0.25;
}
if(this.FaturaDeSaude>0){
FaturaSaude=this.FaturaDeSaude*0.5;
}
ValorImposto=RendaAnual-FaturaSaude;
return ValorImposto;
}
} |
package com.kit181.yakov777;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class LoginActivity extends AppCompatActivity {
private static final int REQUEST_READ_CONTACTS = 0;
private static final String[] DUMMY_CREDENTIALS = new String[]{
"<EMAIL>:hello", "<EMAIL>:world"
};
private EditText mPasswordView, mUserName;
private View mProgressView;
private View mLoginFormView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
// declaring obejct of EditText control
mUserName = (EditText) findViewById(R.id.txtUserName);
mPasswordView = (EditText) findViewById(R.id.login);
Button btnLogin = (Button) findViewById(R.id.btnLogin);
btnLogin.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
String UserName = mUserName.getText().toString();
String Pwd = mPasswordView.getText().toString();
if(UserName.equalsIgnoreCase("Yakov777") && Pwd.equals("<PASSWORD>")){
Intent MainIntent = new Intent(LoginActivity.this, MainActivity.class);
startActivity(MainIntent);
Toast.makeText(LoginActivity.this,"You are Sign in Successfuly.", Toast.LENGTH_LONG).show();
}else
{
Toast.makeText(LoginActivity.this,"Sorry,User Name or Password is incorrect.", Toast.LENGTH_LONG).show();
}
}
});
mLoginFormView = findViewById(R.id.login_form);
mProgressView = findViewById(R.id.login_progress);
}
} |
[Editor's note: J Rainsnow is a novelist. His unusual review of Bulding Co-operative Power: Stories and Strategies from Worker Co-Operatives in the Connecticut River Valley comes from an artist’s perspective, outside of that of most co-operators, organizers, and activists. His view is large and his grasp of details surprisingly rich. This review is cross-posted from his blog . He and Michael Johnson, one of the co-authors of the book and a member of the GEO Collective, know each other.]
Sort of a book review (I don't straight-shoot anything)...
When I first began writing The March of the Eccentrics, it was because I was propelled by a crazy imagination which I could not resist, any more than a rocket can resist the flame coming out of its back ("like it or not, you're going to the moon"); and because I wanted to have a positive influence on the world. I wanted to inject a new dose of revolutionary culture into the world - characters who would inspire, trigger, lift and launch the slumbering and the demoralized, the dormant and the unknowing; stories which would lead people who were tired of reality back to reality, refreshed and reinvigorated by a new mythology; fantasy back-doors into truth which would bypass the daunting parapets of depressing newspaper articles and the numbing moats of unbearable television footage, which inspired retreat from what was happening just as much as engagement. It was my hope to create a diversion from reality which would use reality (mixed with an alluring measure of fantasy) as its raw material, and which, instead of leading to a permanent detachment from reality, would re-energize us and resurrect our ability to face it anew. My fantasy world was always meant to be connected with the real world: to be joined with those who were fighting, with those who were struggling, with those who were dreaming with tools in their hands, actually putting together the bricks of a new day.
This understood, it should not be surprising that I have undertaken to 'review', or better said, 'bring up', or 'publicize' a humble yet hopeful little book by the name of Building Co-operative Power, authored by Janelle Cornwell, Michael Johnson, and Adam Trott, with Julie Graham (Amherst, Mass: Levellers Press, 2013). It is a book which describes people who are attempting to build a new day, not by waving brightly-colored flags around and beating on drums in the middle of the street (nothing against that so long as there is more than just the show), but by meticulously and with great determination working, day by day, to create the structures, foundations, understandings and behaviors which will not only make their own lives more rewarding and in tune with the principles which most people profess but few manage to live by, but could also, conceivably, one day plant the seeds of a major shift in the way the world's heart beats and the world's lungs breathe. Although Building Co-operative Power seems to deliberately curtail that emphasis, it suggests it more discreetly. It avoids the grandiose, but its sober and careful analyses of small-scale, nuts-and-bolts operations of transformation do define and map out potential building blocks of a new kind of civilization: one in which there is peace between labor and capital; one in which fairness, justice, sustainability, health and well-being are major factors in the planning and running of the economy; one in which humanity is not swallowed up by the processes ostensibly created to benefit it, but remains in true control of its destiny and future.
To break it all down: Building Co-operative Power attempts to do several things at once. It provides, on the basis of interviews, protagonist-self-explanations, and author research and assessments, a close-up view of several worker cooperatives in the Connecticut River Valley, as well as a look into the Valley Alliance of Worker Co-operatives (the VAWC), a larger coordinating and connecting organization which has come into being to represent and assist these co-ops, and, where possible, to extend and strengthen the phenomenon begun by them. Building Co-operative Power also attempts to provide a framework for understanding worker cooperatives in general, and beyond that, all types of cooperatives (for example, producer cooperatives and consumer/user cooperatives); to clarify the nature of worker cooperatives, and the challenges inherent in building and maintaining them; to study the nature of the difference between these co-ops and mainstream business models, as well as the nature of the relationship between these co-ops and society at large; and to point out the benefits of cooperative systems and to advocate for them, in an effort to break through society's disempowering lack of awareness regarding them (you don't let in what you don't understand) and to also move cooperatives, themselves, towards a higher level of inter-co-op cooperation, in order to magnify their impact and enhance their survivability.
In the end, the book seems to direct its final focus towards the goal of promoting and strengthening the co-op movement in the Connecticut River Valley, which would make it seem to be a local piece, something beautiful but limited like "arts and crafts from Alameda County", or "novels written by residents of Jackson Heights." However, the discussion in the book is wide-ranging (even taking us abroad to Italy and Spain), and the lessons to be learned from the cooperative struggles and triumphs in the Connecticut River Valley are clearly useful and applicable on a much wider scale, certainly throughout the U.S.A. It also seems clear, between the lines, that the authors of the book are drawn to the activity in the Connecticut River Valley not just because they live there or within driving distance of it, but because there is some kind of collaborative buzz there, something palpable, and hope-creating: in the Connecticut River Valley, they have found a promising hub of cooperative activity which, perhaps with a little extra nudge (and certainly some more time), might one day start rolling towards the kind of 'critical mass' needed to generate something powerful and expansive, like the attainments of Mondragon in the Basque region of Spain, which are repeatedly referred to. Such a powerful development in such a culturally visible and influential region of the US (East Coast, in range of Boston and New York City) could, in turn, begin to engage the rest of the country in a shift towards new concepts of business management, ownership, priorities and concerns, which could, in turn, have a revolutionary and humanizing effect on the nature of our civilization, itself. That's something we sure could use at a time like this: a time when the integrity of our democracy, the fate of justice throughout the world, and even the survival of the earth itself, victimized by our human lack of vision and self-control, seem at risk! (Not to be melodramatic, just keeping it real...)
This having been said, I won't go on to exhaustively chronicle Building Co-operative Power, but stick to bringing up a few of my favorite points from it.
But before that, I suppose, we need to be clear on the basic subject matter of the book: the co-operative, itself! What is it? The authors describe three basic types of cooperatives: producer cooperatives (such as farmer co-ops); consumer, or user cooperatives (such as food co-ops, or credit unions); and worker co-ops, which are the main (but far from exclusive) focus of the book. (These three types of co-ops are referred to as sectors, while the term industry is used to differentiate between the specific areas of cooperative endeavor, such as printing, textiles, retail/bookstore, etc.) In the worker cooperative, the enterprise is owned by the workers, and not by capitalist entrepreneurs or investors dedicated to their own profit above the well-being of the workers (who in the classic capitalist business model are envisioned as components of the profit-generating scheme and not as its principal benefactors). Neither is the worker cooperative a cog in a bureaucratic socialist milieu (such as the old-school USSR), in which the ideal of the worker's primacy is merely a myth at the service of a heavy-handed and domineering political-managerial class.
In the worker's cooperative, as it exists and is conceived of in the US and in many other places throughout the world today, the workers are no longer pawns who are pushed across the board by someone else: they make their own moves. They are bosses, they are in control; they are worker-owners. They create their own management structures and direct themselves, participate in making important business decisions affecting the company and its members, set their own objectives, determine (according to their economic understanding and personal and moral priorities) what they will produce, how much, and for what price, and how the surplus generated by their activities will be distributed among members or invested in the company or community. All of this has huge potential ramifications for both individual and society.
The individual who works for the cooperative is empowered, which is humanizing, not mere 'cannon fodder' for creating someone else's wealth as often happens in classic business enterprises; he/she is more likely to get a fair wage (an unbalanced portion of the surplus is not siphoned off and directed to non-worker managers, entrepreneurs and investors as profit); and he/she is more likely to experience a sense of (and reality of) job security, since the cooperative is not geared to treat its workers as expendable factors, to be shed in 'cost-effective' streamlining operations in times of hardship. (At such times, the cooperative is far more likely to struggle for solutions which will enable its members to remain aboard). For society, the co-op is also highly beneficial, since raw 'profit motive' is not built into its design, and the state of mind fostered by and necessary for its operation tilts it towards the bigger picture, towards collaboration with others, and towards responsible belonging within the larger social group. It seems that many worker's co-ops actually orient themselves towards providing extra services/discounts/and/or investments in the wider community of which they are a part.
One point I really loved, as the authors developed their arguments, was this one: Today, we live in what has been termed a 'thin democracy', meaning a society in which 'democracy' for the average man has boiled down to little more than voting in elections - choosing officials who will lead us (or drag us behind them until the next election): a pretty hollow form of political inclusion, though certainly better than nothing. Meanwhile in the classic workplace, where we spend much of our lives and where our fate hangs in the balance (for without our wages we will be cast down to new levels of adversity), there is no democracy. We are essentially exposed to an autocratic environment which not only affects our sense of worth and security, but also de-conditions us to the skills and values vital to the health and preservation of our democratic system. In the worker's co-op, that changes. In the crucible of this alternative business model, the 'good citizen' is encouraged to grow and is, in cases, reconstructed by experience and practice: the 'good citizen' who is communicative, involved, able to express ideas, to compromise, to overcome personal differences and forge common paths, to push forward past the sparks instead of closing up or leaving, to weave different outlooks into a coherent whole; the 'good citizen' who is the essential raw material of a survivable democracy, and surely one of the greatest products any enterprise could ever manufacture!
The authors of Building Co-operative Power effectively convey to us the benefits of worker co-ops over traditional business models. But they are also absolutely clear in emphasizing the hard work involved in forming and running them in a society which is geared towards recognizing and encouraging traditional business models, and which does not necessarily prepare us, as individuals, for the responsibility and person-to-person skills necessary for cooperating with others in place of commanding and following others. Some of the difficulties associated with getting worker co-ops off the ground, and keeping them up (as well as many of the successes and benefits of the process), are crystallized in the book's substantial and very helpful section on specific worker co-ops of the Connecticut River Valley. These sections are written by co-op members themselves, with review or commentary provided as needed by the authors. Among the co-ops portrayed are: Common Wealth Printing, Collective Copies, PV Squared (solar-panel installation), Pedal People (bicycle-powered trash-collectors), GAIA Host Collective (web and email hosting), Green Mountain Spinnery (yarn producer), Co-op 108 (natural body products), Valley Green Feast (food delivery service connecting customers with local farm produce), TESA/Toolbox for Education and Social Action (educational materials and games to promote a progressive social vision), Brattleboro Holistic Health Center, and Simple Diaper and Linen (biodegradable disposable diapers and conventional diaper laundering service). The stories are engaging and instructive, and add personality to a book which otherwise might become too theoretical and technical. Put together with the theory, a nice balance is struck, and a compelling 3-dimensional picture of worker co-ops fleshed out.
Besides these points, I also found the authors' discussion of "invisibility" quite important and interesting. According to the authors: "Together, consumer, producer and worker co-ops comprise a substantial fraction of the world economy. One billion members of co-operatives are providing 100 million jobs worldwide. Even the U.S. - a pillar of capitalist profit and culture - is home to some 30,000 co-operatives operating in 73,000 places of business, managing $3 trillion in assets, $500 billion in revenue and $25 billion in wages." (p. 170) In light of these impressive figures, how is it possible that the existence of cooperatives is so underperceived (even by many people who are directly benefiting from them!); how is it possible that a phenomenon so tried and tested is still treated as if it were something novel and fringe, a dangerous new innovation likely to go off the road and crash, a pipedream of lunatics, or utopian wet-dream? It is as if the successes and viability of many such co-ops and the substantial track record already established by them were draped in a cloak of invisibility, obscuring the cooperative option and removing it from the national economic conversation. With but a few exceptions, business schools and universities do not offer courses or training regarding the cooperative option. Many state laws and state bureaucracies do not easily facilitate their creation (they anticipate that businesses will be formed along the classic lines of the sole proprietorship, the partnership, the LLC, and the corporation.) The public, often not aware or in proper understanding of the "co-operative difference", is not always engaged to support co-ops and nurture what they represent, in spite of the potential payback for society.
The hypnotic power of the mainstream economic model, and the inertia of our culture and its official history and mythology, have simply trained our eyes to look the other way and to see the preferences of the powerful and the entrenched, which blind us to choices less conventional - to choices less centrally located on the map of lauded triumphs, yet every bit as legitimate and functional. As a consequence of this 'invisibility', co-ops and the cooperative movement are denied much of the human energy, belief, commitment, patronage, and training, and many of the investment opportunities and foundational skills necessary for their proliferation and transition into a more widespread and influential model for business development/social evolution.
To break through this barrier, many worker co-ops in the Connecticut River Valley have joined forces through the VAWC, which is committed to helping support the creation and promotion of new worker cooperatives, and to channeling crucial advice and experience to member co-ops in order to help them prevail over the inevitable obstacles. (Why reinvent the wheel every time, especially when it is such a complicated and potentially self-imploding experience?) In the same vein, efforts are being made to educate consumers and students alike - consumers who will realize the benefits and greater cultural prospects of the co-op and especially patronize it for that - and students who may come to fill the ranks of the next generation of economists and business owners: a new generation open where the previous one was closed. Besides this, the different sectors of co-ops are initiating efforts to come together - to build new levels of inter-co-op cooperation - as manifested by the creation of the VCBA (Valley Co-operative Business Association), which combines members of producer, worker, and consumer co-ops, and which is seeking to develop links between them and to enhance their connections with the public.
Finally, of course, we have this book, itself - Building Co-operative Power - which is also a part of the effort to place the co-op movement (in the Connecticut River Valley, but via extension, throughout America), onto the social radar screen; to raise public awareness regarding the existence and worth of co-ops; and, in its way - with patience and methodicality in place of glamour - to advance the cause of cooperative development, and the human progress which will intrinsically accompany it. Let's give thanks to the protagonists of the book for their consciousness and sweat! And let's give thanks to the authors of the book for their commitment to bring that story to light, and in so doing, to shine a light on new possibilities for all of us.
Although my novel, The March of the Eccentrics, is about as different in style and presentation as can be imagined from Building Co-operative Power, the latter being a sober, careful study well-grounded in the practical and focused in scope, the former being a wild idiosyncratic act of the imagination careening across an alternative-reality globe, both works meet on the common ground of envisioning a future of justice and hope for all human beings. My book seeks, through fiction, to raise the spirit and arouse the imagination that will support the changes the world needs. Building Co-operative Power portrays real-life men and women actually working on those changes, one humble yet meaningful day at a time; and it invites us to add our weight to the movement they have begun in order to build, from the ground up, a new world founded on the values of cooperation, non-exploitation and human empowerment.
Download the introduction of Building Co-operative Power
Purchase Building Co-operative Power from Levellers Press
Go to the GEO front page |
Triple negative breast cancer patients presenting with low serum vitamin D levels: a case series Introduction Serum vitamin D levels measured as 25-hydroxyvitamin D have been shown to be low in cancer patients, including breast cancer patients. However, the vitamin D status has yet to be studied in different breast cancer phenotypes: luminal A, luminal B, HER2+/ER-, and triple negative comprising the majority of basal-like. Case presentation Fifteen triple-negative breast cancer patients have presented to our medical oncology office in the last five years. Thirteen of these fifteen patients (87%) were found to be vitamin D deficient, defined as serum 25(OH)D less than 80 nmol/L, prior to initiation of adjuvant therapy. Ninety-one breast cancer patients from our office were classified as: luminal A (ER+ &/or PR+ and HER2-), luminal B (ER+ &/or PR+ and HER2+), HER2+/ER- (ER-, PR-, and HER2+), and triple-negative or basal-like (ER-, PR-, and HER2-). A normal mean was found from 78 volunteers. The breast cancer patients were found to be statistically different than the normal population. The triple-negative phenotype was found to be the most statistically different than the normal population. Conclusion The triple-negative breast cancer phenotype has the lowest average vitamin D level and the highest percentage of patients that are vitamin D deficient. These data suggests that low vitamin D levels are characteristic of the triple-negative phenotype. Introduction Studies have shown that breast cancer incidence, mortality and survival rates are inversely correlated with solar UVB irradiance and/or serum vitamin D levels. In North America, breast cancer mortality rates are highest in the northeast where ultraviolet B radiation levels allow decreased synthesis of vitamin D during a large part of the year. This area tends to have age-adjusted mortality rates that are about 40% higher than in Hawaii and considerably higher than in high sun-exposure regions of the southwest. There are two major forms of vitamin D in the body; 25hydroxyvitamin D (25(OH)D) and 1,25-dihydroxyvitamin D (1,25(OH) 2 D). 25(OH)D is the storage form of vitamin D. It circulates in the blood and is the best indicator for vitamin D status in the body. 25(OH)D is hydroxylated in the kidney to become 1,25-dihydroxyvitamin D, which is the biologically active form of vitamin D. It was found in 2001 that many tissues are able to directly convert circulating 25(OH)D to 1,25(OH)2D, including mammary tissue. This focuses more attention on the importance of the concentration of the circulating precursor 25(OH)D. It has been shown that 1,25(OH) 2D, inhibits cell proliferation and induces apoptosis in breast cancer cells in vitro. In animal models, vitamin D analogues slowed down tumor development and promoted regression of established mammary tumors. One group found that mean serum levels of 25(OH)D were significantly lower in breast cancer patients with locally advanced or metastatic disease. They showed that the mean 25(OH)D was statistically lower in advancedstage breast cancer patients compared to early-stage breast cancer. The authors suggested that the lower serum vitamin D levels might have some causative role in the progression from early-stage to advanced disease as a result of altered gene transcription. They concluded that their findings lend support to the hypothesis that vitamin D has a role in the pathogenesis and progression of breast cancer. Goodwin et al, who were measuring all-cause mortality rates in breast cancer patients, found that women who had vitamin D deficiency (<50 nmol/L) when they were diagnosed with breast cancer were 94% more likely to have their cancer metastasize and 73% more likely to die within 10 years. The team also found that only 24% of the women in the study had adequate levels of vitamin D (>72 nmol/L) at the time of the diagnosis. One of the newer phenotypic classifications for breast cancer is based on immunohistochemical and FISH analysis of tumor cell estrogen receptor (ER), progesterone receptor (PR) and HER2 neu (HER2) expression. Luminal A tumors are those that are ER + and/ or PR + and HER2 -. Luminal B tumors are ER + and/or PR + and HER2 +. This definition of luminal B tumors only identifies 30% to 50% that are HER 2 +. The other luminal B tumors with HER2 negativity would be classified under the luminal A subtype. HER2 +/ER-phenotype is HER2+, ER -, and PR -. Approximately 80% of triple negative tumors are basallike tumors that are ER -, PR -, and HER2 -, a portion of this group is represented by BRCA 1 tumors. We are aware that various investigators have defined similar but not necessarily identical subgroups by including other markers such as tumor grade, cytokeratins and HER1 expression. However, most agree that tumors negative for the three markers HER2, ER and PR (triple negative) belong in the basal-like subgroup. Though low vitamin D levels are associated with advanced stage disease and patients who develop metastases, vitamin D status has yet to be studied within the newly established breast cancer phenotypes. This case series observed low vitamin D levels in thirteen of fifteen patients with the triple negative phenotype. Case presentation Ninety-one newly diagnosed breast cancer patients' baseline vitamin D levels were obtained from our medical oncology office population in sunny Whittier, California in the last five years. Sixty-five were classified as Luminal A, six were classified as Luminal B, five were classified as HER2+/ER-, and fifteen were classified as triple-negative or basal-like. Baseline vitamin D levels were measured as 25(OH)D prior to any adjuvant therapy. Table 1 shows each patients' age, ethnicity and baseline vitamin D level as 25(OH)D. Thirteen out of fifteen (87%) of the triple negative patients were vitamin D deficient as defined as less than 80 nmol/L. The other two patients were very close to being deficient, having vitamin D levels of 80.0 nmol/L and 82.4 nmol/L. When looking at all of our breast cancer patients (91 total), we found that 54 patients (62%) had baseline vitamin D levels in the deficiency range <80 nmol/L. Of our 91 breast cancer patients, 65 were found to belong to the Luminal A subtype (ER + and/ or PR + and HER2 -), six were Luminal B subtype (ER + and/ or PR + and HER2 +), five were the HER2+/ER-subtype (HER2+, ER -, and PR -), and 15 were classified as the triple-negative subtype (ER-, PR-, HER2-). A normal control population was established from a community outreach program to Whittier, CA non-hospitalized residents, which included 78 volunteers that did not have cancer. Table 2 shows the mean, median, standard deviation and percent deficient for each group. The mean ± standard deviation for serum vitamin D levels were as follows: normal volunteers (90 ± 40 nmol/L), breast cancer patients (76 ±50), luminal A (79 ± 50 nmol/L), luminal B (75 ± nmol/L 30), HER2+/ER-(93 ± 30 nmol/L), and triple-negative or basal-like (50 ± 20 nmol/L). The triple negative phenotype had the lowest average and median baseline vitamin D level and had the highest percentage with vitamin D deficiency. To assess whether vitamin D levels were statistically lower in cancer patients than normal and whether vitamin D differed by tumor stage we used the unpaired t-test with significance level, a, of 0.05 ( Table 4. Furthermore, we used ANOVA to identify the most statistically different breast-cancer type. Post-hoc analysis by Tukey Honestly Statistically Different (HSD) test, Table 5, was used to identify which type of breast cancer was the most statistically different than normal. The triple-negative subgroup was found to be the most statistically different than the normal volunteers (significance value = 0.01). Conclusion The finding that breast cancer patients with the lowest serum 25(OH)D levels presented with the biologically aggressive triple-negative tumor phenotype was not a surprise. Others have demonstrated by in vitro studies that breast tumor cell lines growing in the presence of limited vitamin D frequently over-express more aggressive phenotypes associated with poor prognosis. Compared with luminal A, triple-negative (basal-like) tumors had more TP53 mutations (44% vs 15%), higher mitotic index, more marked nuclear pleomorphism and higher combined grade as well as poor cancer-specific survival. This case series found that patients with the more aggressive triple-negative phenotype had a mean serum vitamin D level of 50 nmol/L compared to a mean of 90 nmol/L for normal Whittier, CA volunteers. The assay normal cut-off was defined as >=80 nmol/L. This finding, coupled with tissue culture experiments and the epidemiological study noted previously, suggests that the serum vitamin D level may be important in tumor development and phenotypic expression and the biologic behavior of breast tumors. This hypothesis is compatible with the fact that African American women have the highest breast cancer specific mortality rates, the lowest serum levels of 25(OH)D, and the highest incidence of aggressive triple-negative or basal-like tumors (39%). This series observed that triple-negative breast cancer patients have lower vitamin D levels than the other breast cancer phenotypes. In addition, we found that the triplenegative subtype is the most statistically different than normal compared to the other subtypes. The lack of vitamin D transport into cells may contribute to the phenotypic expression. Further studies are warranted to investigate possible relationships between the breast cancer phenotypes, pathological grades, clinical stages, and overall and cancer specific survival and vitamin D sufficiency. We think it prudent to supplement all patients with breast cancer and low levels of vitamin D with adequate amounts of vitamin D 3 and generally administer 2000 IU/day orally. This dose in combination with moderate sunlight is usually enough to raise serum 25(OH)D levels to 130 nmol/L, which is associated with a 50% reduction in incidence of breast cancer, according to observational studies. |
package com.vijaya.caster.dao;
import java.util.List;
import com.vijaya.caster.domain.CasterEnum;
public interface EnumDao {
public List<CasterEnum> getEnumsByGroup(String enumGroup);
}
|
A luxury Maldives resort is about to take the sleeping under-the-sea phenomenon to a whole new level.
Conrad Maldives Rangali Island is building a $15 million two-story hotel villa, part of which will sit 16.4 feet below the surface of the Indian Ocean.
The property, believed to be the world's first undersea residence, is under construction in the South Asian island country and is due to be completed in November.
Named the Muraka -- or "coral" in the Maldives' local language Dhivehi -- it seeks to provide guests who travel here with an "intimate and immersive experience of one of the Earth's most breathtaking marine environments."
There's a gym, a bar, an infinity pool, butler's quarters, an ocean-facing bathtub and most importantly an underwater bedroom floor with unparalleled views of the ocean.
Connected to the upper level by a spiral staircase, the undersea suite section will be made up of a king-size bedroom, living area and bathroom.
The top level, which also has a sunrise-facing relaxation deck, measures 550 square meters, while the undersea sections occupies an area of 102 square meters.
"We are excited to present Muraka's unique sleeping under the sea experience to our future guests, providing them with an extraordinary seascape of the Maldives from an entirely new perspective," says Conrad Maldives Rangali Island's general manager Stefano Ruzza.
The Muraka, which can accommodate up to nine guests, is being erected by underwater design specialists M.J. Murphy Ltd.
It marks Conrad Hotels & Resorts' second venture in underwater architecture and technology -- the first being the Ithaa undersea restaurant, which launched at the same resort 13 years ago and was constructed by the same New Zealand-based design consultancy.
The villa is designed in a similar style to Ithaa, with a curved acrylic dome boasting 180-degree panoramic views of the encircling marine life.
Guests can already spend a night under the sea at hotels such as the Manta Resort on Pemba Island, which boasts a three-level underwater room and Atlantis, The Palm in Dubai, which has rooms with windows facing a gigantic aquarium.
Resort World Sentosas in Singapore also offers two-story ocean suites overlooking an aquarium, however the Muraka is thought to be the first underwater "residence" and certainly the most technologically advanced.
"Through our rich history of being a trailblazer in innovative luxury hospitality, we are proud to remain at the forefront of cutting-edge design, technology and architecture," says Ahmed Saleem, chief architect and designer of the undersea residence.
Set on two private islands joined by a footbridge in the Alif Dhaal Atoll, Conrad Maldives Rangali Island is also home to 12 award winning restaurants and bars, including Ithaa, and two spas.
Conrad Hotels & Resorts became the first international hotel brand to enter the Maldivian market when the resort launched as Hilton Maldives Resort and Spa in 1997. |
<reponame>willmadison/dm<filename>chaos/cases/schema.go
// Copyright 2020 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// See the License for the specific language governing permissions and
// limitations under the License.
package main
import (
"github.com/pingcap/parser"
"github.com/pingcap/parser/ast"
)
const (
tableType = "BASE TABLE"
)
// createTableToSmithSchema converts a `CREATE TABLE` statement to a schema representation needed by go-sqlsmith.
// for one column in `columns`:
// - columns[0]: DB name
// - columns[1]: table name
// - columns[2]: table type (only use `BASE TABLE` now)
// - columns[3]: column name
// - columns[4]: column type
// for `indexes`:
// - list of index name
func createTableToSmithSchema(dbName, sql string) (columns [][5]string, indexes []string, err error) {
parser2 := parser.New() // we should have clear `SQL_MODE.
stmt, err := parser2.ParseOneStmt(sql, "", "")
if err != nil {
return nil, nil, err
}
createStmt := stmt.(*ast.CreateTableStmt)
for _, col := range createStmt.Cols {
columns = append(columns, [5]string{
dbName,
createStmt.Table.Name.O,
tableType,
col.Name.Name.O,
col.Tp.String(),
})
}
for _, cons := range createStmt.Constraints {
switch cons.Tp {
case ast.ConstraintPrimaryKey, ast.ConstraintKey, ast.ConstraintIndex, ast.ConstraintUniq, ast.ConstraintUniqKey, ast.ConstraintUniqIndex:
indexes = append(indexes, cons.Name)
default:
continue
}
}
return
}
|
Feasibility of in situ hybridisation with chromosome specific DNA probes on paraffin wax embedded tissue. The feasibility was studied of in situ hybridisation using chromosome specific DNA probes on paraffin wax embedded normal and malignant tissues from different organs. Both isolated nuclei and 5 microns sections were used in in situ hybridisation experiments with biotinylated repetitive DNA probes specific for the centromeric regions of chromosomes 1 and 17. The hybridisation results were visualised with peroxidase-diaminobenzidine. The optimal pretreatments with sodium thiocyanate and pepsin were experimentally defined for the different tissues. Although interphase cytogenetics on paraffin wax embedded tissue is possible, the results indicate that it has its limitations, compared with investigations on fresh tumour tissue. |
It was a mixture of policy and red meat in the Rose Garden Monday morning as the president outlined his deficit reduction plan and rebutted GOP critics who argue that he is attempting to pit the wealthy against the middle and lower classes.
"This is not class warfare," Obama said as he urged a tax crease on wealthier Americans. "This is math."
NEW YORK (CNNMoney) - President Obama unveiled a plan on Monday to cut the national debt by roughly $3 trillion over the next decade.
Obama's plan reflects his vision for how best to put the country on a more fiscally sustainable course, so it is different in nature than the kind of legislative compromise he was trying to broker this summer during the debt-ceiling debate, a senior administration official said.
A driving principle behind the proposal is that high-income individuals and corporations should pay more in taxes than they do currently so that they will bear some of the burden of debt reduction going forward.
Indeed, in remarks on Monday morning, the president said he'll veto any debt-reduction legislation that cuts benefits and doesn't include higher taxes on the wealthy. "I will not support any plan that puts all the burden on ordinary Americans," he said.
Bill Gates and Warren Buffett two very wealthy people that are courted and sought after for their money and their advise and yes that includes you Republicans. Boy when they say the rich don’t pay enough in taxes all of sudden they don’t know what they are talking about, they are morons. Well, may I be so moronic to amass such wealth. The GOP and the fiscal terrorist are upset , why? They just spent $269000 on Squirrels in Tennessee and $200,000 on a Chevrolet Corvette simulator in Kentucky. Mitt Romney and Michelle Bachmann love to say that they run successful business (not as successful as Bill Gates and Warren Buffett). I wonder how successful would a business be if it took in no capital and tried to stay in business just by cutting spending. I am completely on board with the Buffett plan.
For some reason Howard I think Warren Buffet and Bill Gates know more about this than you. I'll take their word over yours any day.
All taxes are not created equal. The taxes Buffet pays and the taxes his secretary pays are two very different forms of taxes. Of course this administration can't seem to tell the truth.
Throw the American people under the bus? That's a good one. The rich have a vested interest in voting Dems out and have been throwing the American people under the bus for years.
How about half a billion on a green job company that was going under – or 4 trillion of tax payer money to the auto companies we will never see again? Need I go on?
Or Even his Buddy at GE who pays no taxes cause he is a strong Dem Supporter... those are the ones that need reform.
How about a breakdown of the companies names that have enjoyed these tax cuts. Let Boehner show the production increase in our country by these companies and how many jobs were created by each company. Show if they moved production off-shore, where and if this production was taken from the American worker and given to a low labor cost country such as Vietnam, China, India etc. I do not think Boehner wants to reveal such facts as they will show that him and others are bald faced liars as we really know they are.
I have never heard such blatent retoric coming from a Politician before. Obama makes no bones about taxing the so-called rich. Class Warfare at it's worst. It is right up there with Bill Clinton saying, We could give more money to the people but thay wouldn' t know how to spend it. It is glaringly the Liberal/Progressive plan that failed in the old Soviet Union and has failed here. But they keep trying. So far we have a 14.5 Trillion Dollar Fderal Debt, 15 Percent living below the Poverty line, 46 Million on Food Stamps etc, etc. There was an election last fall. People rejected the Nanny State. But Obama doesn't have a clue. Do you?
Watch out. The dems are out in force. This guy has been horrible for this country and now we really see how he spent our money. But yet the dumb dems want to give him more money to waste. 5 million per green job created? I don't see a problem there – how about you dems?
You rupgs and Tea Baggers have such short memories! No president in history has wasted as much money as George W Bush did for 8 long years! Bush lied about the huge cost of his illegitmate war and then looted social security to help pay for his war of lies! Obama's stimulus has INDEED improved our economy and resulted in over 3 million jobs! Where are all of the jobs that Bush's so-called "job creators" were going to make while they watched our country go down the drain? HMM? If Bush's policies were so great, then WHERE ARE ALL THE JOBS? idiots!
Question for all Republicans. Journalists, pay heed. This is what you should be asking them.
"Since you have declared the president's suggestion that the mega rich pay taxes at the same rate as those in the middle class as "class warfare," which side are YOU on?
i hate when people say you get punished for success by paying taxes, first of all no rich people are getting punished they are just paying a amount that's reasonable no one is going to take their hard earned money. They have to contribute more to there nation, and if the rich are in our country they all must do what they can to alleviate the struggles that we are facing. If they love and are good and willing citizen they most show their willingness to make this nation better instead of just taking. Like they say freedom is not free, and without struggle their can be no progress.
There's no logical or viable economic reason for the rich to pay a lower tax percentage than a middle class worker. None. These "job creators" haven't fulfilled their part of the bargain – we've seen the lowest job creation rate since WWII under the bush tax cuts. In turn we saw the deficit balloon.
In the last 30 years the incomes of the top 2% has increased 281% – whereas the middle class has stagnated. The game has been rigged in their favor for too long – much to the demise of this country. It's time for tax equity and equality.
Finally. Giving the rich a pass while knocking the middle class down at every turn is not the way to go. The rich, who haven't been very good at creating those supposed jobs in the past 11 years, need to pay their share. They've proven that tax cuts only go so far. The CONSUMERS who drive this economy need money. Not the rich.
The United States of America will go down in flames if Rich People have to be a little less rich. You can tell who has more than they need because they fear the poor, uninsured, and unemployed. I guess that if you aren't a Tea Bagger or Republican, then you must be an unpatriotic, lazy, stupid, LIBRUL, traitor.
Save me from the Liberal hoardes who want to take my money and give it to the unwashed and undeserving. There is a pack of Liberals coming down my street right now with torches and pichforks and they are looking for rich partiiots to kill so they can start the Class War.
It is about time he comes out swinging. The Rethugliklan fools are bleeding this country dry with their welfare for the rich.
you seriously don't get it do you jean. where do you think that Bufffet and Gates got their money? it was from people like you that paid for their products. Do you think that they will suffer a loss in wages or profits without passing that increase on to you?
When I hear people saying that having the rich pay their fair share of taxes is 'Class Warfare', I want to scream. The rich have been waging war on the little guy forever and getting rich on his blood, sweat and tears. Now they have mostly bought the government and media and have even convinced a lot of little people that they are the job creators and having them pay a bit more in taxes will wreck the economy. Guess what? Bush's unpaid for tax cuts, wars and prescription drug program wrecked the economy, not high taxes.
The Bush tax cuts were WELFARE for the rich.
2. They had to pass a second Bush tax cuts bill in 2003 to try to *fix* the first bill passed in 2001.
It doesn't matter how much DEMAND you create, the economy is limited by SUPPLY. That is why it is called SUPPLY-DEMAND! Your economic policies must take into consideration the effects that they will have on both SUPPLY and DEMAND.
And SUPPLY is limited, which the trickle-down economic policies of the GOP ignore!
When SUPPLY has been *maximized*, policies which increase DEMAND will lead to rapid INFLATION because there isn't enough SUPPLY to create enough competition to meet up with the INCREASED DEMAND.
So what the companies do? They REDUCE SUPPLY and INCREASE PRICES => INFLATION SKYROCKETS!
This is why TRICKLE-DOWN ECONOMIC POLICIES of the GOP never work!
This isn't too hard to understand. To see this clearly in effect, look at the SUPPLY of OIL.
Because of increased DEMAND for OIL, oil companies can safely REDUCE output of OIL SUPPLY. This is what OPEC has done. It has repeatedly reduced its output of SUPPLY of OIL. As a result, the price of OIL has INCREASED.
Drilling more in the US will not fix this problem either. More drilling in the US means OPEC can reduce its oil output to keep prices high.
The only solution is ALTERNATIVE ENERGY. There is more SUPPLY of other alternative energy. And alternative companies will compete with OIL based energy companies. This will satisfy DEMAND while bring energy prices down.
It is not that companies purposely reduce to SUPPLY to increase prices. It is because reducing supply and increasing prices is what markets do in a CAPITALISTIC economy! You do it to increase profits!
The only reason the Obama and Dems have kept the Bush tax cuts still in place right now is because of the recession. But now that the recession has been over for almost 2 years, it is becoming clear that the Bush tax cuts are no longer helping the economy grow. The Bush tax cuts must not be renewed or else the same inflationary bubble will occur again and cause another big recession!
So again, the Bush tax cuts are WELFARE for the RICH. They increase profits by reducing SUPPLY – including hiring less people – and raising prices.
Funny how you talk about failed Bush welfare for the rich and alternative energy in the same breath. What about all of the Dem $$ going to billionaires to bankrupt companies like Solyndra. Get all this money out of DC. The more they tax (anyone) the more reason and ability for corruption. Smaller gov't=less fleecing.
You want to know why Buffett and Gates are "supporting" the president in tax increases for the rich? It's because they know it's coming anyway and by showing support now, they can garner better deals for themselves. They aren't rich because they are stupid...If they have money to "pay more in taxes" why don't they use that money to hire instead? They are playing you for suckers.
In a limited gov't capitalistic society, when demand goes up and supply drops, without heavy barriers to entry (gov't regulations) new players step in to supply the increased demand because of the profit motive, regardless of similar or alternative sources. Laws preventing monopolies and limiting oligarchies have been pushed aside by DC (both parties) for decades. Larger gov't means more regulations, aka barriers to entry, that help large "evil" corporations.
Your scenario of inflation is myopic in that it addresses one commodity. True inflation on a macro-economic scale, is produced by the infusion of money into the system. The hidden inflation we are about to see crush this country will be the result of QE2–increased borrowing/printing of $$ by the Private "Federal" Reserve to support the Dem's insaciable thirst for spending.
Like GWB said to the Republican base: "You are my base....those that have....and those that have more".
President Obama....TAX THEM HARD...THEN TAX THEM MORE.!
I think the fact is that the republicans are against President Obama plans because he's African american, DEMOCRATIC and that he's the president. Everyone knows that the problems that the united states have are do to the fact that when bush was president he messed up the economy going after oil and not weapons of mass distruction. We know just as well as the republicans do that he's to blame and not President Obama. I feel that when President Obama became president he intended and is going to make the United States a better country. The republicans are against anything that dont benifit them in anyway. I think that Obama is doing the right thing Taxing the the wealthy and if the Republicans are against it they should not CALL THEMSELVES americans.
If Obama would only give some sort of appreciation for how much the "rich" already pay, maybe they wouldn't mind paying a little more. Just a thought.
That's it Jilli! I agree! @Mildly Amused, you got that right! Job creators? Who in the world are they these days? Oooops! I forgot, it's the governments job to create jobs! It couldn't be the ones who have been enjoying the BUSH tax cuts for over 10 years and for that very reason, I thought. Now they want to kick, scream and holler when they're being asked to go back to their true and 'just' tax rates, and calling it 'raising their taxes'. They're 'hee-ing and haw-ing' like a bunch of old buzzards circling!
Libs keep asking where the jobs were during the Bush years. Ironically, they were there, in the US private sector. A terrorist attack that basically shut down the US economy for a full week and staggered it for months afterwards hit 8 months into Bush's presidency...on the heals of a market bubble burst in 2000 UNDER CLINTON! You want to talk about inheriting a bad situation??? Yet unemployment remained between 4.5 and 6% (5% being considered healthy by most economists).
Fast forward to 2006. DEMS take control of Congress and Unemployment starts moving up. Why? Let's say your boss comes to you one day and tells you there is a very strong likelihood you will be seeing a 15-20% cut in pay plus you will have to pay more for your benefits. How do you react? Normal people begin preparing for this reduction in bring home pay by limiting expenses, putting off home improvements, making that 5 year old car ready to go another 2, 3, 4 years, etc.
Prudent businesses act the same way. When they saw the potential of higher taxes and lower sales (reduced income) and costs of business (regulations, inflation, forced benefits, etc.), they made the prudent choice to limit their exposure and hold on to cash reserves heading into an hostile, or at least unknown, business environment.
The liberal mindset, on the otherhand, seems to be (based on comments I see here) that the family, business and country should continue to live high on the hog and if income can't support the lifestyle, then borrow–mortgage yourself to the neck, run up the credit cards, print more bonds for China to buy. Hopefully one day your income will come back and you can pay off the debt. And if not, who cares? You can always file bankruptcy. This is the reality the Republicans were showing during the summer standoff, when the Dems refused to allow any of their proposals to reach the Senate (Thanks Harry Reid!) or threaten veto at O's desk. There is your obstructionist attitude and, according to some, treason.
And by the way, the reason unemployment is "only" 9+% is because of the large # of people no longer in unemployment lines because they don't qualify after 2 years of doing nothing. This is also a main reason the "poverty" figures and welfare are increasing.
I much prefer ifrnomative articles like this to that high brow literature.
How can 'we the people' ruin the private sector? We gave them tax cutson the grounds and belief that they would start creating jobs and hiring Americans! THEY DIDN'T THOUGH! They continued to produce and hire overseas workers and kept the BUSH taxcuts monies in their pockets! 'The jobs were there, in the private sector'? Well, why aren't they hiring then? Private Sector has duped it's ownself and us too, out of GREED; like WALL STREET did! Difference is, they were getting bailed out all along with taxcuts!
Liz, businesses, unlike many American individuals, look past the present. They PLAN for financial unknowns. When the Dems took control of the Senate in 06, unemployment started creeping because companies knew what the Dem win meant for 08. Tax cuts that had kept the economy moving, and gaining strength were offset by fear, that was later realized when "we the people" passed the monstrocity of a heathcare bill that is, and will continue, to drive up employment costs for businesses. Why are they sitting on so much cash?
Because they anticipated (rightfully so) their cost of business would be going up under Dem rule, they have to sit on cash to survive the economic tsunami of Dem (we the people) policies are imposing on them. This is how "we the people" ruin the private sector.
Gov't takeover of industries (Communism) ruins the private sector. Overbearing gov't taxes and regulations on businesses (Socialism) ruins the private sector. In the US gov't is supposedly "we the people" so these are the ways "we the people" ruin the private sector.
I know I repeated ad nauseum, but hope that this makes sense. Whether you agree with commie/socialist ideals vs. a free, private sector economy is a philosophical debate, but these are the FACTS of how "we the people" ruin the private sector.
Repeal the affordable helathcare act 2010 (a huge and unknown "tax" on business), and see how many jobs are created.
C-Lo, what? 'unemployment started creeping' when the DEMS took control of the Congress in 2006? I can appreciate your thoughtful analogy of what transpired, especially the part about the PYCHIC business owners knowing what a DEM win would mean on 2008! LOL! So I take it that you're saying businesses only started moving out of the US so they could operate for less, pay LESS or NO taxes, shipping/contracting work overseas, merging and shutting down out of fear of what they FORESAW DEMS in Congress MIGHT do!?
...All of those people were put out in the streets! This happened in or around the late 80s early 90s. We had in my city, once upon a time, a whole boulevard that was known mainly as THE place one could just about go and get a job; warehouses, furniture builders, clothing manufacturers, recycling companies, hotels, distribution centers, linen manufacturing, just to name a few! ALL of those companies are gone now! They sold out, merged, closed down or moved starting in the 1980s-2000s. This isn't NEW.
C-Lo, I became employed full-time (career) for the federal government, Jan 1970 and was employed with the agency until Dec 2002. I remember when computers were first being installed in our offices..late 70s I think, or it may have been early 80s, but anyway there were many of us who were afraid that our jobs would be cut out because so much of our work could be now be done by less people on the computer. Well that is exactly what happened. People started being let go for all sorts of unorthodoxed reasons.
...That's what the government itself does much of the time! It works oftentimes like business; taking work from a unit, (downgrading GS paygrades) shifting work to another unit, (possibly upgrading those) completely disbanding whole units, merging divisions. We have had work sent out to be done by contractors...they wouldn't be liable to health and life ins, pensions, etc. If it can get the same volume and quality of work out with less people, it will! As I mentioned earlier, I retired in 2002; I saw this!
You try to defend them for sitting on the cash instead of hiring people by claiming they're trying to survive the economic tsunami? Well, that was not what the tax cuts money was meant for. What about the poor jobless AMERICANS, who would like also to survive the tsunami? People whom if they were working could purchase the goods and services produced and offered by these businesses and corporations, thereby producing some stimulation to the economy. Do you expect the economy to recover when folks can't buy? |
Sino-US Competition in Asia Pacific through the Lens of Power Transition Theory Asia Pacific is a region with intricate scenarios. On the one hand, there is an unabated region-wide drive for economic development that has been pushing Asia-Pacific forward for decades. On the other hand, this region is troubled with, aside from many other conflicts, unsettled maritime disputes that have the potential to trigger wars between and among the Asia-Pacific nations. On top of these varied scenarios, there is powerful struggle between China and the United States over a wide range of vital geopolitical, geostrategic and geo-economic interests in this region. For better or for worse, the U.S.-China relationship is becoming a defining factor in the relations among the Asia-Pacific nations. The US is struggling in adopting right strategy and policy choices to deal with emerging China. Sino-American ongoing rivalry can be explained by several theories but the purpose of this paper is to analyze the power transition and the possibility of power transition in the 21st century by viewing Sino-US competition particularly in Asia pacific region which is, to a gradual extent, influencing the future of global politics. In the future there is strong possibility of increasing shakiness in the Asiapacific region because of Sino-U.S power struggle. As a result, the paper evaluates the impact of ongoing rivalry between China and US on Asia Pacific using the lens of power transition theory and investigates the factors behind USs policies towards the region. Introduction There was ideological conflict between United States of America and former Soviet Union during the Cold war era. At the time, both of them adopted every technique whether it is domestic or regional, conventional or unconventional to pursue the conflict. It was an ideological clash between two solid and different political ideologies. The Cold war era ended in 1991 at the expense of the Soviet Union break up and US emerged as the sole super power. But with the start of 21 st century, the world is experiencing a huge economic shift. Numerous world leaders and scholars have already stated that the 21 st century is an 'Asian Century. The 21 st century is the first time in several hundred years, when the importance of the Trans-Atlantic has shifted to Trans-Pacific as the centre of geopolitics and geoeconomics and is experiencing new role as a global centre for geopolitical, economic and military competition of great powers and it has enhanced the importance of regional organizations (ASEAN, SAARC, SCO, BRICS). Admittedly Asia is facing a number of structural challenges but still has a good chance of achieving in this century a greater degree of progress and development to other regions. It is a region of stunning economic growth with emerging powers like China, having expanding markets of trade, investment and strategic maritime shipping routes connecting pacific with the Indian Ocean. China is the only country widely seen as a possible threat to U.S. predominance. Indeed, China's rise has led to fears that the country will soon overwhelm its neighbors and one day supplants the United States as a global hegemon. China has now the economic and technological influence all over the world. The factors that contribute to China's rise are Beijing's economic strategy and its diplomatic magnification at global level. Having learnt from Soviet Union and Japan, China did not demonstrate her military capability to compete with the US. It is one of the leading states with 6.58% average annual growth rate and it is anticipated that its economy can overtake United States by 2039 and Economic power will increasingly move away from Western Europe and North America to Asia Pacific. This Economic shift is going to have a great impact on geo-political situation of the Asia Pacific region. China has come up with great economic strategy with the Belt and Road Initiative (BRI) to enhance connectivity and its influence in different regions. The rise of China with this economic strength is inevitable. Like many other powers, China is also upgrading it military power as the Chinese military is deploying huge number of missiles, hard to find submarines, long range sensors to track anti-satellite weapons, digital networks to coordinate attacks and cyber war weapons to catch opponent's networks (Liff & Erickson, 2013). This emergence of China as a strong contender would result in a power shift from the declining power of the US and European states. However, comparatively Russia, United Sates of America and Western countries would remain stronger in military terms than China. Therefore, U.S views any military upsurge by China with suspicion. The nature of the emerging multi-polarity is such that the US has to face this challenge posed by the regional predominance of China in the Asia-Pacific region. On the contrary, the US is also confronted with the Russian involvement in the Middle East and the Eastern European regions. This study analyzes the impact of Sino-US competition on the strategic stability of Asia Pacific. There is hard power projection by both China and the US in the South China Sea. China is very much assertive and it can be analyzed clearly by its assertive acts and sometimes tougher stands towards United States. However, hostilities have not broken out between the US and China so far. The US and China are playing a geo-political chess game in the Asia-Pacific region. In 2010 Obama administration initiated its 'pivot' to Asia; a shift in the strategy aimed at increase its military presence in the Asia Pacific (Campbell & Andrews, 2013). Basically the main objective of militarist policy of the US is to maintain its post world war II dominance over the Asia pacific. Asia pivot strategy made it clear that major focus of U.S is to strengthen US strategic and military alliances to encircle China and to defeat its capabilities. However President Obama rejected this view that the aim of Rebalancing Asia is containing China. The Obama administration was determined to expand America's influence with an extensive network of trade and investment and develop new partnerships among the major regional economic powers to hedge China on the Asian Framework (). In 2016, Republican Party won the elections in U.S and it indicated a shift in US policies towards Asian region. As Trump administration decided to pulls out America from Trans Pacific Partnership, U.S's economy and its international standing on world issues are declining. US is facing huge economic challenges due to economic stagnation at home and rising Gross Domestic Product (GDP) in the Asian states. China's continuous growing economic strength and its BRI initiative for global connectivity has created an opportunity for it that it could leave behind the economies of the North American and West European countries. If this happens, then China would be in a position to challenge the economic and possibly, the political leadership within regional organizations and international regimes. The Trump administration, despite its disagreement with the Asian tools of President Obama's foreign policy, he could not fully ignore the region. Trump's decision of withdrawing from the Trans Pacific Partnership (TPP) is a blow to the economic element in the region("Trump signs executive order to withdraw US from Trans-Pacific Partnership," 2018). Now the Trump administration would be forced to rely on a 'military-only' approach towards the region. Nonetheless, a reliance on soft power in the Asian region would make US compete with various Chinese soft power initiatives in the region. Power Transition Theory International relations analysts have often sought to explain the state interactions, events and phenomena of world politics in context of various theoretical frameworks. International theories help in developing the conceptual framework upon which states relations can be analyzed. Organski introduced power transition theory in his classic work, World Politics. Power transition is a hegemonic theory and a structural and vibrant approach to international affairs. It focuses on power relationships so sometimes it is linked to realist school of thought but unlike realist theories, it focuses on the role of dominant state in managing the status quo and deemphasizes the role of anarchy. Power transition sees global politics as a hierarchy of nations with altering levels of cooperation and competition. There is always uneven distribution of power among independent sovereign nations. Some nations are more powerful than others are in terms of size and level of development. Power transition theory has three components: structure, dynamics and policy. According to power transition theory, international system is hierarchical in which domination nation sits at the top. As Organski observes, "at any given moment the single most powerful nation on earth heads an international order which includes also some other major powers of secondary importance and some minor nations and dependencies as well. " It challenges the realist theory of balance of power, which says that balance of power is more favorable for world peace than the imbalance of power whereas power transition argues that a balance of power does not lead to peace among international powers. To the contrary, power parity leads to war, especially when one great power overtakes the dominant power in the international system (Kugler & Lemke, 1996). Organski and Kugler explain that level of satisfaction and dissatisfaction matter for the maintenance of the status quo. If the states are satisfied with the status quo, they may ally with the dominant power for economic and security support and normally the dissatisfied states are too weak and unable to stand in front of the dominant power, but if the power of rising sate approaches that of the dominant state, then that state will initiate a war to change the status quo. Therefore, war is more likely when the challenger is dissatisfied and surpasses the dominant power or there is parity between the dominant power and the challenger. According to power transition, imbalances in power can be more conducive to peace and power parity is dangerous (). Power transition theorists mainly focus on great power conflict but it can be applied on regional players as well. Distribution of power is uneven between the states in any given region as it is spread unevenly across the world. Power transition theory can be used to better understand power dynamics and the likelihood of war in a specific region or internationally. It requires a scientific definition of power for its application to real world cases. The primary theorists of the theory define power as the ability of a state to impose on or persuade another state to comply with its will (Organski & Kugler, 2015). Power is achieved through the combination of a state's population, this population's economic productivity, and the ability of its government to mobilize the former two effectively and efficiently (Keohane & Nye, 1977). Each of these three components is necessary for a state to reach great power status, and therefore, potentially challenge the dominant power. Power transition mainly focuses on the satisfaction of states with the international system because according to power transition, War occurs because of three conditions: Power shifts, approximate equality of power and Dissatisfaction with the status quo (DiCicco & Levy, 1999). Dominant powers try to maintain their hegemony and satisfied status quo by developing a system acceptable to other states. Sometimes dominant power compromises on her hegemony and control over system for creating an environment of mutual trust and benefit otherwise satisfied lesser powers would be skeptical or hostile to dominant power. Satisfied states will support and dominant power will be able to maintain its status quo peacefully rather than by persistently enforcing its will (Efird, Kugler, & Genna, 2003). Approximate equality of power is dangerous and it can create instability if the rising state is dissatisfied with the status quo established by the dominant power. Dissatisfaction can be based on historical, ideological, religious, territorial, personal, cultural or any other issue. Challenger will not initiate war until being stronger and has relative power to the dominant state. Unlike Balance of power, Power transition theory explains power as a combination of population, economic production and political power to influence the other state's decision making process. In other words, power of states increases with the industrialization and with this process states will be able to catch up the dominant state because dominant state has diffident growth and rising state has rapid growth because of industrialization but again for taking the initiative of war, challenger must be dissatisfied from the existing status quo established by dominant power. According to Christopher Layne, "a theorist" new leading power emerges because of differential rates of growth and it eventually leads to shift in power. The potential challenger if dissatisfied will try for the transition into becoming the dominant state. The question arises that will this transition will be peaceful or violent? According to a study conducted by Rapkin and Thompson, the future of such conflict is uncertain. Power transition theory argues that rising state is more like to initiate the war with dominant power or vise versa. According to Organski and Kugler, war will happen after the transition but Ronald L. Tammen has different view. He suggests that rising power will take the initiative after the point of transition (Lemke & Tammen, 2003). Levy and Thompson made an argument to challenge Organski's point of view and they state that rising state would be weaker for taking the initiative of war but it would be much stronger to confront the dominant power after the point of transition (DiCicco & Levy, 1999). Then the question is why dominant power would wait for the challenger to strike the dominant state? If the dominant state initiates' war this would be called preventive war. A preventive war is very much different from preemptive one. The difference is that preventive war would be initiated because of having fears of a rising opponent, shift in power by the fear that if the challenger will become stronger, through war and coercion it will attempt to exploit its advantage. This war is motivated by the anticipation of power shift unlike preemption because it is not motivated by the expectation of an immediate attack. In preemption, there is certainty that rising challenger would attack first and get the advantage of striking first. According to preventive logic, a shift in power leads to war but if we take examples from history, it shows us different view. For example, United States of America surpassed Britain as a global power in the 20 th century and in 1930's Germany was rapidly rising and it met with appeasement. Power shift did not lead to preventive war in both cases (Tammen & Kugler, 2006). Power transition theory is completely opposite to balance of power. Each theory focuses on different kinds and systems of power but both focus on power relationships with in the international system. Power dynamics that each theory hypothesizes can be summarized as Power transition theory define power in terms of population wealth, economic productivity and political capacity. Unlike power transition theory, balance of power focuses on military power only. To further elaborate the difference between theories: According to Balance of power, it is more conducive to peace and it views application of power as eliciting balancing alliances and major wars while power transition theory states that approximate parity of power is dangerous and leads to war and it views concentration of power in a single dominant power in the international system as stabilizing but transition of power between the dominant power and rising challenger can be the cause of instability in international system. Real Contender through the lens of Power Transition Theory Power transition theory is very useful to understand the future of world politics and relations of dominant states. Power shifts and the associated war and peace periods support the central idea of power transition theory that imbalance in power maintains the world order and peace and approximate parity in power breeds great power war. The main question is that if one or more nations are rising at the same time then how would a dominant nation identify the challenger? For example, United States of America and Germany both were expanding their national power and were rising spectacularly. They surpassed Britain but why did Great Britain only singled out Germany? In 21 st century China, India and Brazil are rising simultaneously and one has to consider a resurgent Russia. EU is also becoming an alarming actor on the world stage and finally Japan will emerge as an important factor in world's security and political affairs. The actual question that arises is that which one of thesis rising states is a real contender? According to power transition theory, there are two basic requirements to become a potential challenger. These requirements are challenger must be the strongest one among second-ranked nations in geographic and demographic measures and it should be dissatisfied from the existing status quo. These two requirements make sure that the contender has the will and capacity to change the existing status quo established by dominant power. The term dissatisfaction is subjective. Organski also provided the two objective ways to deal with the subjective term of dissatisfaction. First one is that dissatisfied challenger is not an ally of the dominant state. Second one is that challenger is not satisfied with the existing world order and finds this system against its own interests and it has no part in creating the existing world order so if it becomes more powerful, it will make an effort to change it according to its own interests (Lebow & Valentino, 2009). Brazil, Russia, India and China are the second-ranked nations and they came to the spotlight of world attention when a report entitled "Dreaming with BRIC's: The path of 2050" was published. This study was by the American Gold men Sachs Group, Inc. According to the report, these four countries occupy more half of the world's landmass, consist of 40 percent of the world's population and they are experiencing high rapid economic growth (Wilson & Purushothaman, 2003). Economies of G7 countries (US, Germany, Japan, UK, France, Italy, and Canada) could be eclipsed by the combined economies of BRIC's. Now the question is that which one of these four countries is a real contender for the next dominant power or will the BRIC's collectively rule the world? Indeed the heads of BRIC's have issued a declaration for the establishment of multi polar world order during their first summit in Yekaterinburg, Russia on June 16, 2009. They focused on issues like climate change and global financial system in their second summit held in Brazil in April 2010. BRIC's foreign ministers have been meeting annually since 2006. Heads of central bank and financial ministers also have held frequent meetings. To disqualify Russia and exclude India and Brazil as the serious contenders of world's next dominant power, there are many good reasons There is no doubt that Russia is a dissatisfied second-ranked nation and after losing the Cold war, US and Western countries have not been able to transform Russia into a great supporter. Russia's transition from communism into democracy is still questionable. U.S and West still have fears over the resurgent Russia. Russia is not happy with this kind of treatment by US and Western countries and is determined that eventually, it will restore her great power status. Although Russia will make alarm bells ring in the coming future, but the contemporary resurging Russia poses no serious threat (at least economic) for world leadership. With soviet style communism, Russia has no political, economic or cultural substitutes to offer the world. With a heavy dependence on energy (gas and oil) exports and a budget formed on the intricacies of OPEC betting of oil prices, Moscow's economy would take time to challenge the likes of Japan and Germany. Next state is India. India needs strong partners like US, Russia and Japan to counterbalance China's influence in the region. In the same case, U.S also needs India in dealing with the Chinese threat as Fareed Zakaria states that "India will be a check on China's rising ambitions and a natural ally of United States of America." Brazil is also a satisfied second-ranked power. It is a country with the abundance of natural resources, controllable population as compared to its fellow states India and China, free of territorial disputes and a running political and economic system. The argument to prove China doing differently than India, Russia and Brazil is its magnanimous economic stature. By no means could we infer that the three countries are showing incompetency for a bigger role, but we could deduce the deductibility of the Chinese speculation cum feasibility ie China would attain the super power status much earlier than India, Brazil and China. The contemporary world demands a super power to have an edge in economy and military power: China has achieved the first part in a bid to equate/ surpass the US in the coming decade or two; Beijing's military establishment needs to catch up the US train in the latter case. China is a dissatisfied, second ranked nation and has a potential greater than all the other same status major powers. It is not an ally of US and has not played any role in establishing the current world order. China's Economic Outlook and Military Modernization China's journey to progress starts with Deng Xiaoping's four-point modernization policy in 1978. The Chinese Communist Party adopted the export-oriented policy of Japan, South Korea Hong Kong and Singapore and soon emerged as a factory of world. China started to make consumer products by the mid 1990's and since then, China sustains its economic growth with approximately a double figure growth rate. It has not only showed a remarkable growth rate, but is also driving world economies around the world. Economic policy of China has become a source of inspiration for other developing countries. It has brought a revolution of exports. There is hardly any country in the world where one cannot find any product having a stamp of "made in china". Its economy lifted approximately lifted 400 million people above the poverty line with in 25 years (Bergsten, Freeman, Lardy, & Mitchell, 2008). China has become the second largest economy and its trade with its neighboring countries has been surprisingly increased. For the last few decades, China is a recordholder country of most foreign direct investment (FDI). Hongkong and Shanghai banking cooperation estimated that bank assets in China will surpass those in the United States in 2034, while Goldman Sachs estimates that China's GDP will surpass that of the United States by 2045. Fogel, a Nobel laureate in economics predicts that China's economy will reach $123 trillion by 2040. All this growth is because of giving favorable conditions created through economic reforms and implementation of well-planned strategy by China's government. According to defensive realists, a country will upgrade its military so that its reaches the point of parity or at least near-parity with its immediate rival. In other words, a state strives to attain minimum credible deterrence with the purpose to create a theatre denial capability. China's defense budget was $174.6 billion in 2018. Therefore, along with the economic progress, China is modernizing its military. Most Chinese analysts defend its continued double-digit growth in defense budget by stating that China is a vast country with a large coastline, vast land, four nuclear neighbors and the fours disputed areas in its proximity. Therefore, China's defense spending is in accordance with its need to defend the mainland and it would continue the process of modernization of its forces, which also includes a buildup of powerful naval fleet and air bases. Chinese premier Li Keqiang said: "China will continue to expand its air and a naval defense capability as its national security is undergoing changes. China will advance all aspects of military training and war preparedness, and firmly and resolvedly safeguard national sovereignty, security and development interests" China has been implementing its new defense strategy of military modernization and organizational reforms since 2016 and the intention is to transform its military to conduct joint operations along with other countries and resolve regional conflicts. China has established its first overseas military base in 2018 in Djibouti. Though the Chinese state media claims it to be a nonmilitary base and an economic extension for logistics' support, things in reality seem to be different with 23,000 square meters underground military facility along with heavy fortifications. The Horn of Africa offers commercial oil passage interests to big powers: Italy, Japan, France and the US (Camp Lemonier with 4,000 soldiers) also possess military bases in Djibouti (Downs, Becker, & DeGategno, 2017). Beijing has loaned and invested in Djibouti in its domestic hydropower and pipeline projects and the Djibouti-Ethiopia railway track, so it intends to have a long stay there countering not only the neighboring Somalian pirates but also the US influence in the Bab-el-Mandeb Strait, world's fourth most important checkpoint of imports and exports of oil. China's Military modernization strategy has started challenging the US overseas interests reaching up to East Africa from the controversies of the South China Sea. Some of the reforms that include in China's military strategy are setting up theatre commands, joint operations command centre and developing the strategic support force to combine its space, cyber and electronic warfare elements. China is also expanding its cultural influence. It is promoting education all over the world and has established the biggest scholarship network, inviting scholars and professionals from all over the world and strengthening its multilateral alliances. The Confucius teachings have promoted in the neighboring regions through development of Confucius Institutes in Europe, Africa, Asia and North America. End of bipolarity and economic growth are the most significant reasons of China's rise. This rise has become an important topic of debate in the post 9/11 era. The question now is how China manages its rise and the power transition with the United States? US-China Power Transition In contemporary international issues, Sino-US power transition process is on top of all issues, on which future of international relations is based. Both countries are engaged in power transition and both countries are willing to blaze a new path out of deadly contest for peaceful future but history of power transition is full of bloodshed. Although United States and China have good intentions for peaceful future but both countries have many debatable and unsettled issues and if not managed properly then both countries can be engaged in an unwanted war against each other. Future Sino US relations could be seen in three ways. The first one is that China would go for a war against US but it seems impossible, as China does not want to go for a war against any country, as it would disrupt its economic development. The first scenario is a hypothetical over-generalization of a US-China war over dominance. This is a supposed extension of Mearsheimer's theoretical impossibility of a peaceful rise into a non-peaceful resistance. The second scenario is an amiable one with the two powers opting for a dialogue, cooperation and issues' resolving via peaceful talks. The last hypothesis is of a continuation of the status quo: Beijing could make every effort to gain utmost advantages under the current America's hegemony until it would become strong enough to develop its own world order. According to Mearsheimer, offensive realism stipulates that a peaceful rise is not possible for China, and it is very much possible that US would engage itself in strategic competition with China by developing strategic partnerships and alliances with the regional states to contain China for example U.S's strategic partnership with India, Japan and South Korea. Next 30 years are very important for china's development and evolution of US-China power transition. According to Organski, power transition is a long process and it takes time to complete. For instance, in almost 70 years, Germany caught up with Great Britain. The transition of power from Britain to United States also took more than a century From last 30 years, conditions of another power transition are also taking place and it will take another 30 years for building a new world order so next 30 years are more crucial for Sino-US relations. "We can't predict with certainty what the future will bring, but we can be certain about the issues that will define our times. And we also know this: The relationship between the United States and China will shape the 21st century (President Barack Obama) This is quite a calculated statement of the US-China relationship. President Obama admitted that now United States is not a sole power to shape the world. China has emerged as a global player in world politics, so they have to invite China to help with the mission. Interestingly, United States is responsible for China's initial changes. About 40 years ago, President Richard Nixon visited China and brought China out of its self-imposed seclusion. America helped China's economic development by providing it access to US's and worldwide markets and business investments in China. America adopted this engagement policy for many reasons. First, to eliminate hatred factor between the two nations, because both countries remained enemies for a long period, such as the United States did not recognize China after the independence for 30 years (Fairbank & Goldman, 2006). Second was because of rivalry with Soviet Union; US supported China to create strategic balance in the region. The third one was a long-term goal. US expected that political regime would be changed because of economic development and after transforming into a democratic state, it would become an ally of US rather than an enemy. This engagement strategy served US interests Conclusion China threat debate quickly emerged when signs of power transition between China and US came to the surface and the most significant was China's economic growth. This debate dominated US and Western discussion of world politics. "China rising" and "China threat" quickly became synonymic buzzwords in the US media, academic and policy circles. Let us conclude by referring to the tragedy of great power politics by Mearsheimer discussing the Chinese threat. He provided a theoretical explanation. International system is anarchical and the most important need of states is survival. For survival, states need to maximize their national power. Great powers in any particular region have more needs because they want to be the strongest in their own region and then of course they strive to create the global hegemony. Hunger for power, dominance and regional hegemony in international politics are unmatched. This urge initiates a struggle for global hegemony vis-a-vis great power competition. There are two common things, which states do to win/dominate. First is to increase their own national power and second is to do every possible thing to undermine the development/emergence of other great powers. Following this logic, Mearsheimer argued that China has become a regional power, so it would try to push US out of Asia in order to dominate the region itself just like the US dominates the Western hemisphere. Subsequently, US will do everything to prevent China from gaining hegemonic status in Asia. This fight of cat and mouse would give space and options to the developing allies of the two countries. There would be opportunities also. For example, the Chinese initiatives of One Road One Belt (OBOR) plan an investment of around eight trillion dollars in 65 countries. The Pakistani port of Gwadar would be the gateway of exports (some imports also) of Chinese products to Middle East and the adjoining regions. Therefore, a development hungry Islamabad is receiving a mixture of investment, loans, soft loans and joint ventures of 62 billion dollars, an increase from the 2014 plan of 46 billion dollars. These Chinese plans might be termed as 'economic colonization' or a 'revival of the East India Company', but what it offers is an alliance, an economic interdependence and stability to the poor nations. Beijing would be taking such economic measures to ensure an upper hand in her competition with Washington. Therefore, we can conclude that China is leaving/already left the US economically at least in the region, but militarily, US is still miles ahead. This also has to do with the orientation and priority of the two states: their mode of preferences and choice of partner countries do indicate the winners; US is a military hegemon; China is becoming an economic one. |
Refeeding, metabolic rate, and weight gain in anorexia nervosa: a review. Patients with anorexia nervosa require refeeding to restore normal body weight. A variety of studies have examined the role of metabolic rate in the refeeding of anorectic patients. Several measurement techniques have been used to divide metabolic rate into its components: basal metabolic rate, resting energy expenditure, activity-induced thermogenesis, and dietary-induced thermogenesis. In anorexia nervosa patients several consistent findings are present. First, the number of kilocalories required for weight gain or weight maintenance increases as weight increases. Second, over 50% of the body mass gained in anorectic individuals represents fat tissue. Finally, both a history of bulimic symptoms and a higher premorbid body weight may lead to lower calorie requirements. These findings suggest the need for gradual increase in calories provided throughout treatment; resting energy expenditures may aid the determination of caloric requirements |
It’s time for some seeeeeeeerious recommendations, friends!!! Do you have your planning spreadsheets ready?!?
As much as I love my classics (Dole Whip!!!), I have found some brand new delicious Disney treats to add to the list of my favorites in 2014.
If you’re looking to try some new things, or you’re just curious about what fun new finds we’re celebrating, read on — and discover My 7 Favorite New Disney Food Items for 2014!
Brioche Ice Cream Sandwiches at L’Artisan des Glaces Sorbet and Ice Cream Shop
There’s nothing like finding something completely new and original while you’re strolling through the parks. And I wasn’t disappointed on a recent trip through Epcot’s France Pavilion.
We all love L’Artisan des Glaces Sorbet and Ice Cream Shop. I mean, 16 delicious, artisan ice creams and sorbets made right here in Epcot (I’ve seen the machines)!
PLUS Ice Cream Martinis and Chocolate Macaron Ice Cream Sandwiches. Are you kidding me?? Utter yumness.
But stop the presses! (Ha! That will be even funnier after you finish reading this.) Because they’ve also added Croque Glaces — Pressed Ice Cream Sandwiches.
If you love ice cream sandwiches as much as I do, you’ve gotta try this. They take a freshly baked Brioche Bun, add a scoop of your choice of Ice Cream, and a drizzle of your choice of Raspberry or Chocolate Sauce. (Yep! It’s totally customized!)
Then, the top of the bun is replaced, and the whole thing is put into a press that looks like a cross between a waffle maker and a panini grill.
And Voila! The whole thing is warmed and the edges are crimped together, and you have the finished sandwich!
And it’s amazing! It’s warm and cold all at the same time, and I love how the rich bread soaks up the ice cream. And the crimped edges and absorbent bread means these are a little less drippy than the traditional cookie-and-ice-cream model. I’m not saying this replaces that…but it’s certainly a nice alternative.
And these are definitely huge, and big enough to share — especially if you’re snacking your way around the World.
Nudel Gratin at Sommerfest
Sommerfest, the counter service spot in Epcot’s Germany Pavilion, has been one of my favorite stops forever. When you’re after a quick bite of good, hearty food, it can’t be beat.
And the best part — recently they introduced several delicious new options. And suddenly, making a decision about what to get here wasn’t so easy anymore.
Except that soon, one dish rose to the top of the heap — the Nudel Gratin. That’s Macaroni and Cheese to you and me.
But it’s not just mac and cheese. It’s the cheesiest, richest, most flavorful baked version of this beloved comfort food that I’ve ever tasted at Disney. No truffle. No lobster. Just straight up, cheesy goodness.
Seriously. There was a fork fight over this one when we ordered it. I wasn’t expecting it to be this good. And the really incredible thing is the price! At less than $4, this hearty portion is considered a side dish, but I could totally have it for lunch and be happy.
If I’ve inspired cravings with my rave, here’s a recipe to try it out at home!
Gourmet Cake Cups at Cheshire Cafe
I’ve said it before — when it comes to cupcakes, it’s not worth it unless it’s got a metric ton of rich, lardy frosting on top (yep; I said it)!
So when I first heard about Gourmet Cake Cups at Cheshire Cafe in Magic Kingdom, I was instantly obsessed. I immediately took myself over to the Magic Kingdom.
And trying was believing. I was smitten at first sight. Because I am not so much a cake person as a frosting person. (It would be just fine with me if we could rename them cupfrostings. Or just give me a cup of frosting. Whatever.)
The tiniest bit of Confetti Cake divides up the mounds of sugary-sweet frosting that’s like the best birthday cake you’ve ever had. And the Confetti Sprinkles on top just make everything better. But look at that frosting!!! Heaven, I say. HEAVEN.
While my favorite, hands down, is the Vanilla version, the Mocha Madhatter Cake Cup also receives high marks. Choose this version for a lighter textured, mousse-like Chocolate Frosting that boasts a strong coffee flavor.
Frozen Cheesecake
But we mustn’t think all the food wonderful is confined to Walt Disney World. You know how much I love my Disneyland snacks, too. And I’m adding a new favorite this year!
Next time you’re in Disneyland having dinner and are tempted to skip dessert — do it!! And make a beeline for Downtown Disney District’s Gelato Bars kiosk there, where you will find Frozen Cheesecake. With a Strawberry. On a Stick.
You think it’s weird, right? OK — imagine the richness of cheesecake, and the coolness of ice cream, and you start to get the picture. And all that creamy deliciousness is the perfect consistency for strolling and eating. Not tooth-breaking hard, not drippy-melty. Just right.
Hand-Dipped Corn Dogs in Walt Disney World! (Finally!!)
The good people who visit Walt Disney World each and every year have one big lament: why don’t we have Hand-Dipped Corn Dogs like they do in Disneyland? And I was right there with them.
But that dream that was a wish our heart made finally came true recently, when Food Trucks came to live at Downtown Disney — and Hand-Dipped Corn Dogs were finally introduced to the East Coast.
Fantasy Fare Food Truck represents the “culinary traditions from Disney Parks around the globe to Disney World”, so it was the perfect spot to introduce this Disneyland icon to Disney World.
Crispy Cornmeal Batter coats the outside of these ginormous Dogs and delivers a combo of smoky-salty-sweet flavor that’s heaven on earth. And even better — it’s served with those delicious House-Made Potato Chips that have become a staple side throughout Disney World lately. (And we’re sooo glad. Because they’re awesome.)
The ratio of breading to dog is pleasant. I get the awesome hand-dipped cornbread taste, but I can still get the flavor of the dog! And I can enjoy this treat without feeling like I’ve eaten a whole loaf of cornbread. Although, come to think of it, that wouldn’t be so bad.
Next time I’m in Walt Disney World, I’ll likely skip the Corn Dog Nuggets at Casey’s Corner in favor of this treat. Although I might sneak over some plastic cheese for dipping. 🙂
Croissant Donuts at Refreshment Port
Just when you think Donuts couldn’t possibly be anymore wonderful. Someone marries them with Croissants…and the Cronut is born — much to our utter delight.
Have you had the pleasure? Because they’re astounding. The Croissant Donut — so called, because the term “Cronut” has actually been cleverly trademarked — is a hot trend in the food world, and so we were super excited to find that Disney has introduced its very own version. You’ll find this thing of beauty at Refreshment Port in Epcot.
It’s the perfect treat to devour while you’re enjoying a cup of Starbucks coffee from Fountain View Cafe.
You know this is going to be my first stop for breakfast the next time I’m in Epcot. Even if my plane doesn’t arrive until night time.
Hey, breakfast for dinner, right?
Now, we’re not sure how long this will be available, since Refreshment Port tends to switch up its menu quite often. So get ’em while they’re (literally) hot!
The Grey Stuff Cupcake at Be Our Guest Restaurant
Even today, I can’t set foot inside Be Our Guest Restaurant at Magic Kingdom without humming the song of the same name. Admit it: you can’t, either. And if so, then you were with me when I wondered “how in the world are they going to bring ‘The Grey Stuff’ to life???”
But they DID! At first, it was a special occasion dessert. So you had to, like, get married or have a birthday or something to get it.
But no doubt, the Cookies and Cream Panna Cotta Mousse proved to be so popular that the brilliant chefs decided to top a cupcake with it. And lo, the Master’s Cupcake was born!
This is truly the best of both worlds — two delicious desserts in one. The wonderfully light mousse can be eaten alone with a spoon. Those beautiful little Chocolate Pearls on top provide a nice crunch.
And the goodness goes right down into the middle of the cupcake! Score!!!
But the cake itself is pretty awesome, too. Rich, moist Chocolate Cake is the perfect accompaniment to that mousse.
This is definitely a great addition to the Be Our Guest menu. No wonder the Master wants to keep it to himself!
Ready for all the News on What’s New?
We’ve given you just a small sampling of the information that you can find in our What’s New and Recommended Snacks highlighted in The DFB Guide to Walt Disney World® Dining 2014 — and the guide is your ticket to an even heartier helping of Disney Dining information!
Be sure to check out The DFB Guide to Walt Disney World® Dining 2014 for all the food information you need to plan your best Disney vacation ever!
Our reviews will help your family find the food that’s right for you! Click here to get your copy of The DFB Guide to Walt Disney World® Dining 2014 E-book — and use code 2014 for an extra $4 discount for a limited time!
What’s your favorite must-try item from this list, or do you have another new find you’re dying to try this year? Leave a comment and share your Disney culinary knowledge with us! |
// Method to collect index stats
func (c *esClient) GetIndexStats() (*IndexStatsOutput, error) {
url := fmt.Sprintf("%s://%s:%s/%s", c.scheme, c.host, c.port, allIndexStatsEndpoint)
var indexStatsOutput IndexStatsOutput
err := c.fetchJSON(url, &indexStatsOutput)
if err != nil {
return nil, err
}
return &indexStatsOutput, nil
} |
<gh_stars>1000+
package cache
import (
"context"
"math"
"time"
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/metrics"
"github.com/coredns/coredns/request"
"github.com/miekg/dns"
)
// ServeDNS implements the plugin.Handler interface.
func (c *Cache) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) {
rc := r.Copy() // We potentially modify r, to prevent other plugins from seeing this (r is a pointer), copy r into rc.
state := request.Request{W: w, Req: rc}
do := state.Do()
zone := plugin.Zones(c.Zones).Matches(state.Name())
if zone == "" {
return plugin.NextOrFailure(c.Name(), c.Next, ctx, w, rc)
}
now := c.now().UTC()
server := metrics.WithServer(ctx)
// On cache miss, if the request has the OPT record and the DO bit set we leave the message as-is. If there isn't a DO bit
// set we will modify the request to _add_ one. This means we will always do DNSSEC lookups on cache misses.
// When writing to cache, any DNSSEC RRs in the response are written to cache with the response.
// When sending a response to a non-DNSSEC client, we remove DNSSEC RRs from the response. We use a 2048 buffer size, which is
// less than 4096 (and older default) and more than 1024 which may be too small. We might need to tweaks this
// value to be smaller still to prevent UDP fragmentation?
ttl := 0
i := c.getIgnoreTTL(now, state, server)
if i != nil {
ttl = i.ttl(now)
}
if i == nil {
crr := &ResponseWriter{ResponseWriter: w, Cache: c, state: state, server: server, do: do}
return c.doRefresh(ctx, state, crr)
}
if ttl < 0 {
servedStale.WithLabelValues(server).Inc()
// Adjust the time to get a 0 TTL in the reply built from a stale item.
now = now.Add(time.Duration(ttl) * time.Second)
cw := newPrefetchResponseWriter(server, state, c)
go c.doPrefetch(ctx, state, cw, i, now)
} else if c.shouldPrefetch(i, now) {
cw := newPrefetchResponseWriter(server, state, c)
go c.doPrefetch(ctx, state, cw, i, now)
}
resp := i.toMsg(r, now, do)
w.WriteMsg(resp)
return dns.RcodeSuccess, nil
}
func (c *Cache) doPrefetch(ctx context.Context, state request.Request, cw *ResponseWriter, i *item, now time.Time) {
cachePrefetches.WithLabelValues(cw.server).Inc()
c.doRefresh(ctx, state, cw)
// When prefetching we loose the item i, and with it the frequency
// that we've gathered sofar. See we copy the frequencies info back
// into the new item that was stored in the cache.
if i1 := c.exists(state); i1 != nil {
i1.Freq.Reset(now, i.Freq.Hits())
}
}
func (c *Cache) doRefresh(ctx context.Context, state request.Request, cw *ResponseWriter) (int, error) {
if !state.Do() {
setDo(state.Req)
}
return plugin.NextOrFailure(c.Name(), c.Next, ctx, cw, state.Req)
}
func (c *Cache) shouldPrefetch(i *item, now time.Time) bool {
if c.prefetch <= 0 {
return false
}
i.Freq.Update(c.duration, now)
threshold := int(math.Ceil(float64(c.percentage) / 100 * float64(i.origTTL)))
return i.Freq.Hits() >= c.prefetch && i.ttl(now) <= threshold
}
// Name implements the Handler interface.
func (c *Cache) Name() string { return "cache" }
func (c *Cache) get(now time.Time, state request.Request, server string) (*item, bool) {
k := hash(state.Name(), state.QType())
cacheRequests.WithLabelValues(server).Inc()
if i, ok := c.ncache.Get(k); ok && i.(*item).ttl(now) > 0 {
cacheHits.WithLabelValues(server, Denial).Inc()
return i.(*item), true
}
if i, ok := c.pcache.Get(k); ok && i.(*item).ttl(now) > 0 {
cacheHits.WithLabelValues(server, Success).Inc()
return i.(*item), true
}
cacheMisses.WithLabelValues(server).Inc()
return nil, false
}
// getIgnoreTTL unconditionally returns an item if it exists in the cache.
func (c *Cache) getIgnoreTTL(now time.Time, state request.Request, server string) *item {
k := hash(state.Name(), state.QType())
cacheRequests.WithLabelValues(server).Inc()
if i, ok := c.ncache.Get(k); ok {
ttl := i.(*item).ttl(now)
if ttl > 0 || (c.staleUpTo > 0 && -ttl < int(c.staleUpTo.Seconds())) {
cacheHits.WithLabelValues(server, Denial).Inc()
return i.(*item)
}
}
if i, ok := c.pcache.Get(k); ok {
ttl := i.(*item).ttl(now)
if ttl > 0 || (c.staleUpTo > 0 && -ttl < int(c.staleUpTo.Seconds())) {
cacheHits.WithLabelValues(server, Success).Inc()
return i.(*item)
}
}
cacheMisses.WithLabelValues(server).Inc()
return nil
}
func (c *Cache) exists(state request.Request) *item {
k := hash(state.Name(), state.QType())
if i, ok := c.ncache.Get(k); ok {
return i.(*item)
}
if i, ok := c.pcache.Get(k); ok {
return i.(*item)
}
return nil
}
// setDo sets the DO bit and UDP buffer size in the message m.
func setDo(m *dns.Msg) {
o := m.IsEdns0()
if o != nil {
o.SetDo()
o.SetUDPSize(defaultUDPBufSize)
return
}
o = &dns.OPT{Hdr: dns.RR_Header{Name: ".", Rrtype: dns.TypeOPT}}
o.SetDo()
o.SetUDPSize(defaultUDPBufSize)
m.Extra = append(m.Extra, o)
}
// defaultUDPBufsize is the bufsize the cache plugin uses on outgoing requests that don't
// have an OPT RR.
const defaultUDPBufSize = 2048
|
/**=--- ripple/allocation/freelist.hpp --------------------- -*- C++ -*- ---==**
*
* Ripple
*
* Copyright (c) 2019 - 2021 <NAME>.
*
* This file is distributed under the MIT License. See LICENSE for details.
*
*==-------------------------------------------------------------------------==*
*
* \file freelist.hpp
* \brief This file defines a simple freelist class.
*
*==------------------------------------------------------------------------==*/
#ifndef RIPPLE_ALLOCATION_FREELIST_HPP
#define RIPPLE_ALLOCATION_FREELIST_HPP
#include <ripple/utility/memory.hpp>
namespace ripple {
/**
* This type is a simple, single-threaded freelist implementation, which is
* essentially just a singly-linked-list over an arena from which the free list
* nodes point to.
*
* This can be used in both host and device code, so can quickly allocate
* dynamically on the device.
*/
class Freelist {
/**
* Simple node type which points to the next element in the list.
*/
struct Node {
Node* next = nullptr; //!< The next node in the list.
};
public:
/** Default constructor. */
ripple_all Freelist() noexcept : head_{nullptr} {}
/**
* Destructor, resets the head pointer if it's not a nullptr.
*/
ripple_all ~Freelist() noexcept {
if (head_ != nullptr) {
head_ = nullptr;
}
}
/**
* Constructor to initialize the freelist with the start and end of the
* arena from which elements can be stored.
* \param start The start of the arena.
* \param end The end of the arena.
* \param element_size The size of the elements in the freelist.
* \param alignment The alignment of the elements.
*/
ripple_all Freelist(
const void* start,
const void* end,
size_t element_size,
size_t alignment) noexcept
: head_{initialize(start, end, element_size, alignment)} {}
/**
* Move constructor to move the other freelist to this one.
* \param other The other freelist to move.
*/
Freelist(Freelist&& other) noexcept = default;
/**
* Move assignment to move the other freelist to this one.
* \param other The other freelist to move.
*/
auto operator=(Freelist&& other) noexcept -> Freelist& = default;
// clang-format off
/** Copy constructor -- deleted since the freelist can't be copied. */
Freelist(const Freelist&) = delete;
/** Copy assignment -- deleted since the freelist can't be copied. */
auto operator=(const Freelist&) = delete;
// clang-format on
/*==--- [interface] ------------------------------------------------------==*/
/**
* Pops the most recently added element from the list, and returns a pointer
* to it.
* \return A pointer to the most recently added element.
*/
ripple_all auto pop_front() noexcept -> void* {
Node* const popped_head = head_;
head_ = popped_head ? popped_head->next : nullptr;
return static_cast<void*>(popped_head);
}
/**
* Pushes a new element onto the front of the list.
* \param ptr The pointer to the element to push onto the list.
*/
ripple_all auto push_front(void* ptr) noexcept -> void {
if (ptr == nullptr) {
return;
}
Node* const pushed_head = static_cast<Node*>(ptr);
pushed_head->next = head_;
head_ = pushed_head;
}
private:
Node* head_ = nullptr; //!< Pointer to the head of the list.
/**
* Initializes the freelist by linking the nodes.
* \param start The start of the freelist arena.
* \param end The end of the freelist arena.
* \param element_size The size of the elements in the freelist.
* \param alignment The alignment of the elements.
*/
ripple_all static auto initialize(
const void* start, const void* end, size_t element_size, size_t alignment)
-> Node* {
// Create the first and second elements:
void* const first = align_ptr(start, alignment);
void* const second = align_ptr(offset_ptr(first, element_size), alignment);
const size_t size = uintptr_t(second) - uintptr_t(first);
const size_t elements = (uintptr_t(end) - uintptr_t(first)) / size;
// Set the head of the list:
Node* head = static_cast<Node*>(first);
// Initialize the rest of the list:
Node* current = head;
for (size_t i = 1; i < elements; ++i) {
Node* next = static_cast<Node*>(offset_ptr(current, size));
current->next = next;
current = next;
}
assert(
offset_ptr(current, size) <= end &&
"Freelist initialization overflows provided arena!");
current->next = nullptr;
return head;
}
};
} // namespace ripple
#endif // RIPPLE_ALLOCATION_FREELIST_HPP |
The U.N. nuclear agency on Monday confirmed that Iran has begun enriching uranium at an underground bunker to a level that can be upgraded more quickly for use in a nuclear weapon than the nation's main enriched stockpile.
Comment from the International Atomic Energy Agency came after diplomats said that centrifuges at the Fordo site near Iran's holy city of Qom are churning out uranium enriched to 20 percent. That level is higher than the 3.5 percent being made at Iran's main enrichment plant and can be turned into fissile warhead material faster and with less work.
"The IAEA can confirm that Iran has started the production of uranium enriched up to 20 percent ... in the Fordow Fuel Enrichment Plant," said an agency statement, which used the alternate spelling for the site.
The move was expected, with Tehran announcing months ago that it would use the Fordo facility for 20 percent production. Iran began to further enrich a small part of its uranium stockpile to nearly 20 percent as of February 2010 at a less-protected experimental site, saying it needs the higher grade material to produce fuel for a Tehran reactor that makes medical radioisotopes for cancer patients.
But with the time and effort reduced between making weapons-grade uranium from the 20-percent level, the start of the Fordo operation increases international fears that Iran is determined to move closer to the ability to make nuclear warheads - despite insistence by the Islamic Republic that it is enriching only to make reactor fuel.
Its dismissal of findings by the International Atomic Energy Agency of secret experimental work on a nuclear weapons program also worries the international community.
British Foreign Secretary William Hague called the move "a provocative act which further undermines Iran's claims that its program is entirely civilian in nature."
The facility is a hardened tunnel and is protected by air defense missile batteries and the Revolutionary Guard. The site is located about 20 miles north of Qom, the religious nerve center of Iran's ruling system. The semiofficial Mehr news agency quoted Iran's nuclear chief, Fereidoun Abbasi, as saying Sunday that "the enemy doesn't have the ability to damage it." |
At present, various types of nanoparticles have been used in many applications. For example, nanoparticles such as metal nanoparticles, oxide nanoparticles, nitride nanoparticles and carbide nanoparticles are used in the production of sintered bodies for use as electrical insulation materials for semiconductor substrates, printed circuit boards, various electrical insulation parts and the like, materials for high-hardness and high-precision machining tools such as cutting tools, dies and bearings, functional materials for grain boundary capacitors, humidity sensors and the like, and precision sinter molding materials, and in the production of thermal sprayed parts such as engine valves made of materials that are required to be wear-resistant at a high temperature, as well as in the fields of electrode or electrolyte materials and various catalysts for fuel cells.
It is known that among various nanoparticles, silver nanoparticles are used for various devices such as solar cells and light emitting devices, conductive pastes, electrodes for electronic components such as laminated ceramic capacitors, wiring on printed circuit boards, wiring on touch panels, flexible electronic paper and the like. Silver electrodes and silver wiring can be obtained through the process of baking silver nanoparticles. Silver nanoparticles and production methods thereof are disclosed by Patent Literatures 1 and 2, for example.
Patent Literature 1 describes the ultrafine particle producing process that introduces and disperses materials for producing ultrafine particles into a thermal plasma flame under reduced pressure using an inert gas as a carrier gas to form a vapor-phase mixture, introduces a gas mixture of hydrocarbon gas and a cooling gas other than the hydrocarbon gas in a supply amount sufficient for quenching the vapor-phase mixture toward an end portion (tail portion) of the thermal plasma flame at an angle of more than 90° but less than 240° with a perpendicular direction parallel to the thermal plasma flame and at an angle of more than −90° but less than 90° with respect to the central portion of the thermal plasma flame in a plane orthogonal to the perpendicular direction of the thermal plasma flame to generate ultrafine particles, and allows the generated ultrafine particles to come into contact with the hydrocarbon gas so as to produce the ultrafine particles whose surfaces are coated with a thin film formed of a hydrocarbon compound. Patent Literature 1 describes that ultrafine silver particles are produced using the above-described production method.
Patent Literature 2 describes silver powder having a D50 value of 60 nm to 150 nm as determined by the image analysis of a scanning electron microscope (SEM) image, having a carbon (C) content of less than 0.40 wt % as determined in accordance with JIS Z 2615 (General rules for determination of carbon in metallic materials), and comprising spherical or almost-spherical silver powder particles. Patent Literature 2 teaches that the silver powder can be sintered at a temperature of 175° C. or lower. |
import tensorflow as tf
from tensorflow import keras
import numpy as np
import matplotlib.pyplot as plt
class_names = ['T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat', 'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot']
def train():
# download dataset
fashion_mnist = keras.datasets.fashion_mnist
(train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data()
# preproccess data
train_images = train_images / 255.0
test_images = test_images / 255.0
# build model
model = keras.Sequential([
keras.layers.Flatten(input_shape=(28, 28)), # add layers
keras.layers.Dense(128, activation=tf.nn.relu),
keras.layers.Dense(10, activation=tf.nn.softmax)
])
# compile model
model.compile(optimizer=tf.train.AdamOptimizer(),
loss='sparse_categorical_crossentropy',
metrics=['accuracy'])
# train model
model.fit(train_images, train_labels, epochs=5)
test_loss, test_acc = model.evaluate(test_images, test_labels)
print('Test accuracy:', test_acc)
return model, test_images, test_labels
def make_prediction(model, test_images):
predictions = model.predict(test_images)
print(predictions[0])
print(np.argmax(predictions[0]))
return predictions
def plot_image(i, predictions, true_label, img):
predictions, true_label, img = predictions[i], true_label[i], img[i]
plt.grid(False)
plt.xticks([])
plt.yticks([])
plt.imshow(img, cmap=plt.cm.binary)
predicted_label = np.argmax(predictions)
if predicted_label == true_label:
color = 'blue'
else:
color = 'red'
plt.xlabel("{} {:2.0f}% ({})".format(class_names[predicted_label],
100 * np.max(predictions),
class_names[true_label]),
color=color)
def plot_value_array(i, predictions, true_label):
predictions, true_label = predictions[i], true_label[i]
plt.grid(False)
plt.xticks([])
plt.yticks([])
thisplot = plt.bar(range(10), predictions, color="#777777")
plt.ylim([0, 1])
predicted_label = np.argmax(predictions)
thisplot[predicted_label].set_color('red')
thisplot[true_label].set_color('blue')
def main():
model, test_images, test_labels = train()
predictions = make_prediction(model, test_images)
i = 12
plt.figure(figsize=(6, 3))
plt.subplot(1, 2, 1)
plot_image(i, predictions, test_labels, test_images)
plt.subplot(1, 2, 2)
plot_value_array(i, predictions, test_labels)
'''
num_rows = 5
num_cols = 3
num_images = num_rows * num_cols
plt.figure(figsize=(2 * 2 * num_cols, 2 * num_rows))
for i in range(num_images):
plt.subplot(num_rows, 2 * num_cols, 2 * i + 1)
plot_image(i, predictions, test_labels, test_images)
plt.subplot(num_rows, 2 * num_cols, 2 * i + 2)
plot_value_array(i, predictions, test_labels)
'''
plt.show()
if __name__ == '__main__':
main()
# https://www.tensorflow.org/tutorials/keras/basic_classification
|
<filename>SushiCocos/tslib/Cocos2dH5/Cocos2d/Core/LabelTTF.d.ts<gh_stars>0
declare namespace cc {
// +--------------------------------------------------------------------------------
// + File: cocos2d/core/base-nodes/CCLabelTTF.js
// +--------------------------------------------------------------------------------
/**
* <p>cc.LabelTTF is a subclass of cc.TextureNode that knows how to render text labels with system font or a ttf font file<br/>
* All features from cc.Sprite are valid in cc.LabelTTF<br/>
* cc.LabelTTF objects are slow for js-binding on mobile devices.<br/>
* Consider using cc.LabelAtlas or cc.LabelBMFont instead.<br/>
* You can create a cc.LabelTTF from a font name, alignment, dimension and font size or a cc.FontDefinition object.</p>
* @class
* @extends cc.Sprite
*
* @param {String} text
* @param {String|cc.FontDefinition} [fontName="Arial"]
* @param {Number} [fontSize=16]
* @param {cc.Size} [dimensions=cc.size(0,0)]
* @param {Number} [hAlignment=cc.TEXT_ALIGNMENT_LEFT]
* @param {Number} [vAlignment=cc.VERTICAL_TEXT_ALIGNMENT_TOP]
* @example
* var myLabel = new cc.LabelTTF('label text', 'Times New Roman', 32, cc.size(320,32), cc.TEXT_ALIGNMENT_LEFT);
*
* var fontDef = new cc.FontDefinition();
* fontDef.fontName = "Arial";
* fontDef.fontSize = "32";
* var myLabel = new cc.LabelTTF('label text', fontDef);
*
* @property {String} string - Content string of label
* @property {Number} textAlign - Horizontal Alignment of label: cc.TEXT_ALIGNMENT_LEFT|cc.TEXT_ALIGNMENT_CENTER|cc.TEXT_ALIGNMENT_RIGHT
* @property {Number} verticalAlign - Vertical Alignment of label: cc.VERTICAL_TEXT_ALIGNMENT_TOP|cc.VERTICAL_TEXT_ALIGNMENT_CENTER|cc.VERTICAL_TEXT_ALIGNMENT_BOTTOM
* @property {Number} fontSize - Font size of label
* @property {String} fontName - Font name of label
* @property {String} font - The label font with a style string: e.g. "18px Verdana"
* @property {Number} boundingWidth - Width of the bounding box of label, the real content width is limited by boundingWidth
* @property {Number} boundingHeight - Height of the bounding box of label, the real content height is limited by boundingHeight
* @property {cc.Color} fillStyle - The fill color
* @property {cc.Color} strokeStyle - The stroke color
* @property {Number} lineWidth - The line width for stroke
* @property {Number} shadowOffsetX - The x axis offset of shadow
* @property {Number} shadowOffsetY - The y axis offset of shadow
* @property {Number} shadowOpacity - The opacity of shadow
* @property {Number} shadowBlur - The blur size of shadow
*/
export class LabelTTF extends Sprite implements Label {
///** @expose */
public string: string;
/** @expose */
public textAlign: number;
/** @expose */
public verticalAlign: number;
/** @expose */
public fontSize: number;
/** @expose */
public fontName: string;
/** @expose */
public font: string;
/** @expose */
public boundingSize: number;
/** @expose */
public boundingWidth: number;
/** @expose */
public boundingHeight: number;
/** @expose */
public fillStyle: Color;
/** @expose */
public strokeStyle: Color;
/** @expose */
public lineWidth: number;
/** @expose */
public shadowOffset: number;
/** @expose */
public shadowOffsetX: number;
/** @expose */
public shadowOffsetY: number;
/** @expose */
public shadowOpacity: number;
/** @expose */
public shadowBlur: number;
public constructor(label: string, fontName: string, fontSize: number, dimensions?: Size, hAlignment?: number, vAlignment?: number);
//public ctor(label?:string, fontName?:string, fontSize?:number, dimensions?:Size, hAlignment?:number, vAlignment?:number):boolean;
/**
* Initializes the cc.LabelTTF with a font name, alignment, dimension and font size, do not call it by yourself,
* you should pass the correct arguments in constructor to initialize the label.
* @param {String} label string
* @param {String} fontName
* @param {Number} fontSize
* @param {cc.Size} [dimensions=]
* @param {Number} [hAlignment=]
* @param {Number} [vAlignment=]
* @return {Boolean} return false on error
*/
public initWithString(label: string, fontName: string, fontSize: number, dimensions?: Size, hAlignment?: number, vAlignment?: number): boolean;
public getLineHeight(): number;
public setLineHeight(lineHeight: number): void;
/**
* Returns the text of the label
* @return {String}
*/
public getString(): string;
/**
* Returns Horizontal Alignment of cc.LabelTTF
* @return {cc.TEXT_ALIGNMENT_LEFT|cc.TEXT_ALIGNMENT_CENTER|cc.TEXT_ALIGNMENT_RIGHT}
*/
public getHorizontalAlignment(): number;
/**
* Returns Vertical Alignment of cc.LabelTTF
* @return {cc.VERTICAL_TEXT_ALIGNMENT_TOP|cc.VERTICAL_TEXT_ALIGNMENT_CENTER|cc.VERTICAL_TEXT_ALIGNMENT_BOTTOM}
*/
public getVerticalAlignment(): number;
/**
* Returns the dimensions of cc.LabelTTF, the dimension is the maximum size of the label, set it so that label will automatically change lines when necessary.
* @see cc.LabelTTF#setDimensions, cc.LabelTTF#boundingWidth and cc.LabelTTF#boundingHeight
* @return {cc.Size}
*/
public getDimensions(): Size;
/**
* Returns font size of cc.LabelTTF
* @return {Number}
*/
public getFontSize(): number;
/**
* Returns font name of cc.LabelTTF
* @return {String}
*/
public getFontName(): string;
/**
* Initializes the CCLabelTTF with a font name, alignment, dimension and font size, do not call it by yourself, you should pass the correct arguments in constructor to initialize the label.
* @param {String} text
* @param {cc.FontDefinition} textDefinition
* @return {Boolean}
*/
public initWithStringAndTextDefinition(text: string, textDefinition: FontDefinition): boolean;
/**
* Sets the text definition used by this label
* @param {cc.FontDefinition} theDefinition
*/
public setTextDefinition(theDefinition: FontDefinition): void;
/**
* Extract the text definition used by this label
* @return {cc.FontDefinition}
*/
public getTextDefinition(): FontDefinition;
/**
* Enable or disable shadow for the label
* @param {cc.Color | Number} a Color or The x axis offset of the shadow
* @param {cc.Size | Number} b Size or The y axis offset of the shadow
* @param {Number} c The blur size of the shadow or The opacity of the shadow (0 to 1)
* @param {null | Number} d Null or The blur size of the shadow
* @example
* old:
* labelttf.enableShadow(shadowOffsetX, shadowOffsetY, shadowOpacity, shadowBlur);
* new:
* labelttf.enableShadow(shadowColor, offset, blurRadius);
*/
public enableShadow(a: Color | number, b: Size | number, c: number, d?: number): void;
/**
* Disable shadow rendering
*/
public disableShadow(): void;
/**
* Enable label stroke with stroke parameters
* @param {cc.Color} strokeColor The color of stroke
* @param {Number} strokeSize The size of stroke
*/
public enableStroke(strokeColor: Color, strokeSize: number): void;
/**
* Disable label stroke
*/
public disableStroke(): void;
/**
* Sets the text fill color
* @function
* @param {cc.Color} fillColor The fill color of the label
*/
public setFontFillColor(fillColor: Color): void;
/**
* Changes the text content of the label
* @warning Changing the string is as expensive as creating a new cc.LabelTTF. To obtain better performance use cc.LabelAtlas
* @param {String} text Text content for the label
*/
public setString(text: string): void;
/**
* Sets Horizontal Alignment of cc.LabelTTF
* @param {cc.TEXT_ALIGNMENT_LEFT|cc.TEXT_ALIGNMENT_CENTER|cc.TEXT_ALIGNMENT_RIGHT} alignment Horizontal Alignment
*/
public setHorizontalAlignment(alignment: number): void;
/**
* Sets Vertical Alignment of cc.LabelTTF
* @param {cc.VERTICAL_TEXT_ALIGNMENT_TOP|cc.VERTICAL_TEXT_ALIGNMENT_CENTER|cc.VERTICAL_TEXT_ALIGNMENT_BOTTOM} verticalAlignment
*/
public setVerticalAlignment(verticalAlignment: number): void;
/**
* Set Dimensions of cc.LabelTTF, the dimension is the maximum size of the label, set it so that label will automatically change lines when necessary.
* @param {cc.Size|Number} dim dimensions or width of dimensions
* @param {Number} [height] height of dimensions
*/
public setDimensions(dim: Size | number, height?: number): void;
/**
* Sets font size of cc.LabelTTF
* @param {Number} fontSize
*/
public setFontSize(fontSize: number): void;
/**
* Sets font name of cc.LabelTTF
* @param {String} fontName
*/
public setFontName(fontName: number): void;
public setTextureRect(rect: Rect, rotated: boolean, untrimmedSize: Size): boolean;
/**
* set Target to draw on
* @param {boolean} onCacheMode
*/
public setDrawMode(onCacheMode: boolean): void;
}
} |
Uncertainty quantification for ecological models with random parameters. There is often considerable uncertainty in parameters in ecological models. This uncertainty can be incorporated into models by treating parameters as random variables with distributions, rather than fixed quantities. Recent advances in uncertainty quantification methods, such as polynomial chaos approaches, allow for the analysis of models with random parameters. We introduce these methods with a motivating case study of sea ice algal blooms in heterogeneous environments. We compare Monte Carlo methods with polynomial chaos techniques to help understand the dynamics of an algal bloom model with random parameters. Modelling key parameters in the algal bloom model as random variables changes the timing, intensity and overall productivity of the modelled bloom. The computational efficiency of polynomial chaos methods provides a promising avenue for the broader inclusion of parametric uncertainty in ecological models, leading to improved model predictions and synthesis between models and data. |
<filename>Sht31.cpp
/***************************************************
This is a library for the SHT31 Digital Humidity & Temp Sht31
Designed specifically to work with the SHT31 Digital Sht31 from Adafruit
----> https://www.adafruit.com/products/2857
These displays use I2C to communicate, 2 pins are required to
interface
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by <NAME>/Ladyada for Adafruit Industries.
BSD license, all text above must be included in any redistribution
****************************************************/
#include "Sht31.h"
#include "mbed.h"
Sht31::Sht31(PinName sda, PinName scl) : _i2c(sda, scl) {
_i2caddr = (0x44 << 1);
reset();
readStatus();
}
float Sht31::readTemperature(void) {
if (! readTempHum()) return -1;
return temp;
}
float Sht31::readHumidity(void) {
if (! readTempHum()) return -1;
return humidity;
}
void Sht31::reset(void) {
writeCommand(SHT31_SOFTRESET);
ThisThread::sleep_for(10ms);
}
uint16_t Sht31::readStatus(void) {
writeCommand(SHT31_READSTATUS);
char val[1];
_i2c.read(_i2caddr, val, 1);
uint16_t stat = val[0];
stat <<= 8;
_i2c.read(_i2caddr, val, 1);
stat |= val[0];
// printf("0x%X\r\n", stat);
return stat;
}
void Sht31::writeCommand(uint16_t cmd) {
char buf[2];
buf[0] = (cmd >> 8);
buf[1] = (cmd & 0xFF);
_i2c.write(_i2caddr, buf, 2);
}
bool Sht31::readTempHum(void) {
char readbuffer[6];
writeCommand(SHT31_MEAS_HIGHREP);
ThisThread::sleep_for(500ms);
_i2c.read(_i2caddr, readbuffer, 6);
uint16_t ST, SRH;
ST = readbuffer[0];
ST <<= 8;
ST |= readbuffer[1];
if (readbuffer[2] != crc8((uint8_t *) readbuffer, 2)) {
return false;
}
SRH = readbuffer[3];
SRH <<= 8;
SRH |= readbuffer[4];
if (readbuffer[5] != crc8((uint8_t *) readbuffer+3, 2)) {
return false;
}
double stemp = ST;
stemp *= 175;
stemp /= 0xffff;
stemp = -45 + stemp;
temp = stemp;
double shum = SRH;
shum *= 100;
shum /= 0xFFFF;
humidity = shum;
return true;
}
uint8_t Sht31::crc8(const uint8_t *data, int len) {
const uint8_t POLYNOMIAL(0x31);
uint8_t crc(0xFF);
for ( int j = len; j; --j ) {
crc ^= *data++;
for ( int i = 8; i; --i ) {
crc = (crc & 0x80) ? (crc << 1) ^ POLYNOMIAL : (crc << 1);
}
}
return crc;
}
|
/**
* This is the persistence class to save all user information in the system.
* This contains information like the user's name, his role, his account status
* and the password information entered by the user when signing up. <br/>
* Information is saved in SSN_USERS table.
*
*/
public class UserPO {
private long userId;
private String userName;
private String password;
private String statusCode;
private String statusDate;
private String salt;
private String accountStatus;
private String privilegeLevel;
public long getUserId() {
return userId;
}
public void setUserId(long userId) {
this.userId = userId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public void setStatusCode(String statusCode){this.statusCode = statusCode;}
public String getStatusCode() {return statusCode;}
public String getStatusDate() {return statusDate;}
public void setStatusDate(String statusDate){this.statusDate = statusDate;}
public String getSalt() {
return salt;
}
public void setSalt(String salt) {
this.salt = salt;
}
public String getAccountStatus() { return accountStatus; }
public void setAccountStatus(String accountStatus) { this.accountStatus = accountStatus;}
public String getPrivilegeLevel() { return privilegeLevel;}
public void setPrivilegeLevel(String privilegeLevel) { this.privilegeLevel = privilegeLevel; }
@Override
public String toString() {
return new Gson().toJson(this);
}
} |
/**
* Created by astoisavljevic on 12.11.14..
*/
public class BookItem {
//~ private fields
@SerializedName("ID")
private Long id;
@SerializedName("Title")
private String title;
@SerializedName("Description")
private String description;
@SerializedName("Image")
private String imageUrl;
@SerializedName("ISBN")
private String isbn;
@SerializedName("SubTitle")
private String subTitle;
@SerializedName("Author")
private String author;
@SerializedName("Year")
private String year;
@SerializedName("Page")
private String page;
@SerializedName("Publisher")
private String publisher;
@SerializedName("Download")
private String downloadUrl;
// default constructor
public BookItem() {
// default constructor
}
// search books - bookItem constructor
public BookItem(Long id, String title, String description, String imageUrl, String isbn) {
this.id = id;
this.title = title;
this.description = description;
this.imageUrl = imageUrl;
this.isbn = isbn;
}
// bookItem - constructor
public BookItem(Long id, String title, String description, String imageUrl, String isbn,
String subTitle, String author, String year, String page, String publisher, String downloadUrl) {
this.id = id;
this.title = title;
this.description = description;
this.imageUrl = imageUrl;
this.isbn = isbn;
this.subTitle = subTitle;
this.author = author;
this.year = year;
this.page = page;
this.publisher = publisher;
this.downloadUrl = downloadUrl;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getImageUrl() {
return imageUrl;
}
public void setImageUrl(String imageUrl) {
this.imageUrl = imageUrl;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getIsbn() {
return isbn;
}
public void setIsbn(String isbn) {
this.isbn = isbn;
}
public String getSubTitle() {
return subTitle;
}
public void setSubTitle(String subTitle) {
this.subTitle = subTitle;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public String getYear() {
return year;
}
public void setYear(String year) {
this.year = year;
}
public String getPage() {
return page;
}
public void setPage(String page) {
this.page = page;
}
public String getPublisher() {
return publisher;
}
public void setPublisher(String publisher) {
this.publisher = publisher;
}
public String getDownloadUrl() {
return downloadUrl;
}
public void setDownloadUrl(String downloadUrl) {
this.downloadUrl = downloadUrl;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("BookItem[id=");
sb.append(getId());
sb.append("; title=");
sb.append(getTitle());
sb.append("; isbn=");
sb.append(getIsbn());
sb.append("]");
return sb.toString();
}
} |
Yeast communities associated with cacti in Brazil and the description of Kluyveromyces starmeri sp. nov. based on phylogenomic analyses Yeast communities associated with cacti were studied in three ecosystems of Southeast, Central and North Brazil. A total of 473 yeast strains belonging to 72 species were isolated from 190 samples collected. Cactophilic yeast species were prevalent in necrotic tissues, flowers, fruits and insects of cacti collected in Southeast and North Brazil. Pichia cactophila, Candida sonorensis and species of the Sporopachydermia complex were the most prevalent cactophilic species in Southeast and Central regions. Kodamaea nitidulidarum, Candida restingae and Wickerhamiella cacticola were frequently associated with cactus flowers and fruits. The diversity of yeasts associated with the substrates studied was high. Twentyone novel species were found. One is described here as Kluyveromyces starmeri sp. nov. based on 21 isolates obtained from necrotic tissues, flowers, fruits and associated insects of the columnar cacti Cereus saddianus, Micranthocereus dolichospermaticus and Pilosocereus arrabidae in two different ecosystems in Brazil. Phylogenetic analyses of sequences encoding the gene of the small subunit (SSU) rRNA gene, the internal transcribed spacer, the 5.8S rRNA gene and the D1/D2 domains of the large subunit (LSU) rRNA showed that the species is related to Kluyveromyces dobzhanskii, Kluyveromyces lactis and Kluyveromyces marxianus. Phylogenomic analyses based on 1264 conserved genes shared among the new species and 19 other members of the Saccharomycetaceae confirmed this phylogenetic relationship. The holotype is K. starmeri sp. nov. CBS 16103T (=UFMGCMY3682T). The Mycobank number is MB 836817. |
Everton boss David Moyes has warned fans not to get too carried away with Wednesday night's memorable 1-0 FA Cup fourth-round replay win over Liverpool.
Teenager Dan Gosling struck the injury-time winner to set-up a fifth round home tie with Aston Villa on February 15, but the Toffees boss urged fans to keep the win in perspective.
Moyes said: "We haven't won the cup just yet. It was a great result and everyone was really desperate for it. But let's not think the cup is already here, there is a very, very long way to go yet."
He added: "We are in the fifth round, but the draw has not been kind to us. First we had to beat Liverpool and now we have Aston Villa next."
Moyes was proud of his team but had special praise for match-winner Gosling, adding: "I'm proud of them, but there is more to come. I enjoyed that one, but we move on now. I was delighted with the two youngsters, Gosling and (Jack) Rodwell, to come on in such an important cup tie and play as well as that.
"But it says, too, a lot about the other players. We have had so many injuries and we picked up more during the match, it meant we were looking around to see what we could change.
"So it was the young boys who had to come on and I did not have any worries putting the two lads on. They had the energy we needed, and it was not a worry for me to put them on. Gosling is a really good lad, he wants to learn and is a good trainer."
Liverpool lost skipper Steven Gerrard early in the game with a hamstring injury.
He will not play at Portsmouth on Saturday, and is almost certainly out of England's friendly next Wednesday against Spain in Seville.
Boss Rafael Benitez said: "Steven Gerrard will have a scan to see the extent of the injury, we do not really know yet." |
<filename>util/NetReadStr.cc
#include "gcp/util/Exception.h"
#include "gcp/util/LogStream.h"
#include "gcp/util/NetReadStr.h"
using namespace gcp::util;
#define THROW_ERROR(fn) \
{ \
ThrowError("Error occurred in: " << fn);\
}
/**.......................................................................
* Constructor.
*/
NetReadStr::NetReadStr()
{
privateConstructor(-1, 0);
};
/**.......................................................................
* Constructor with file descriptor and size.
*/
NetReadStr::NetReadStr(int fd, unsigned int size)
{
privateConstructor(fd, size);
}
/**.......................................................................
* The substance of any constructor for this class.
*/
void NetReadStr::privateConstructor(int fd, unsigned int size)
{
LogStream errStr;
readHandler_ = 0;
readArg_ = 0;
errorHandler_ = 0;
errorArg_ = 0;
netStream_ = 0;
netBufAllocated_ = false;
attached_ = false;
if((netStream_ = new_NetReadStr(fd, size)) == 0) {
errStr.appendMessage(true, "Allocate failed in new_NetReadStr()");
throw Error(errStr);
}
if(fd >= 0)
attached_ = true;
if(size > 0)
netBufAllocated_ = true;
}
/**.......................................................................
* Install a read handler
*/
void NetReadStr::installReadHandler(NET_READ_HANDLER(*handler), void* arg)
{
readHandler_ = handler;
readArg_ = arg;
}
/**.......................................................................
* Install a error handler
*/
void NetReadStr::installErrorHandler(NET_READ_HANDLER(*handler), void* arg)
{
errorHandler_ = handler;
errorArg_ = arg;
}
/**.......................................................................
* Destructor.
*/
NetReadStr::~NetReadStr()
{
netStream_ = del_NetReadStr(netStream_);
};
/**.......................................................................
* Attach this network buffer to a file descriptor.
*/
void NetReadStr::attach(int fd)
{
attach_NetReadStr(netStream_, fd);
attached_ = fd >= 0 ? false : true;
}
/**.......................................................................
* Attach this network buffer to a file descriptor.
*/
void NetReadStr::setBuffer(void* buffer, unsigned int size)
{
LogStream errStr;
if(net_set_buffer(netStream_->net, buffer, size)==0) {
errStr.appendMessage(true, "Error in net_set_buffer()");
throw Error(errStr);
}
netBufAllocated_ = true;
}
/**.......................................................................
* Read a message into our network buffer from a socket.
*/
NetReadStr::NetReadId NetReadStr::read()
{
return privateRead(-1);
}
/**.......................................................................
* Read a message into our network buffer from a socket.
*/
NetReadStr::NetReadId NetReadStr::read(int fd)
{
return privateRead(fd);
}
/**.......................................................................
* Private substance of the above read commands.
*/
NetReadStr::NetReadId NetReadStr::privateRead(int fd)
{
LogStream errStr;
NetReadId readState;
// If a file descriptor was specified, attach to it first.
if(fd >= 0)
attach(fd);
// Read as much of the message as possible.
switch (state()) {
case NET_READ_DONE:
case NET_READ_SIZE:
case NET_READ_DATA:
// If the message hasn't been read at all yet, or is
// in the process of being read, continue reading.
readState = privateState((gcp::control::NetReadStr::NetReadId)
nrs_read_msg(netStream_));
// Check the state after the last read
if(readState == NET_READ_ERROR || readState == NET_READ_CLOSED) {
// If an error occurred, call our error handler, if we have one.
if(errorHandler_ != 0)
errorHandler_(errorArg_);
} else if(readState == NET_READ_DONE) {
// If a read finished, call our read handler, if we have one.
if(readHandler_ != 0)
readHandler_(readArg_);
}
break;
// Else an error occurred.
default:
// If an error occurred, call our error handler, if we have one.
if(errorHandler_ != 0)
errorHandler_(errorArg_);
break;
}
return readState;
}
/**.......................................................................
* Private method to return the state.
*/
NetReadStr::NetReadId
NetReadStr::privateState(gcp::control::NetReadStr::NetReadId id)
{
LogStream errStr;
switch (id) {
case gcp::control::NetReadStr::NET_READ_SIZE:
return NET_READ_SIZE;
break;
case gcp::control::NetReadStr::NET_READ_DATA:
return NET_READ_DATA;
break;
case gcp::control::NetReadStr::NET_READ_DONE:
return NET_READ_DONE;
break;
case gcp::control::NetReadStr::NET_READ_CLOSED:
return NET_READ_CLOSED;
break;
case gcp::control::NetReadStr::NET_READ_ERROR:
return NET_READ_ERROR;
break;
default:
errStr.appendMessage(true, "Unrecognized return code in nrs_read_msg()");
throw Error(errStr);
}
}
/**.......................................................................
* Public method to return the state.
*/
NetReadStr::NetReadId NetReadStr::state()
{
return privateState(netStream_->state);
}
/**.......................................................................
* Return the file descriptor to which we're currently attached.
*/
int NetReadStr::getFd()
{
return netStream_->fd;
}
/**.......................................................................
* Start unpacking a message from a network buffer.
*/
void NetReadStr::startGet(int *opcode)
{
if(net_start_get(netStream_->net, opcode))
THROW_ERROR("net_start_get");
}
/**.......................................................................
* Finish unpacking a message from a network buffer.
*/
void NetReadStr::endGet()
{
if(net_end_get(netStream_->net))
THROW_ERROR("net_end_get");
}
/**.......................................................................
* Get a char from a network buffer.
*/
void NetReadStr::getChar(int ndata, unsigned char *data)
{
if(net_get_char(netStream_->net, ndata, data))
THROW_ERROR("net_get_char");
}
/**.......................................................................
* Get a short from a network buffer.
*/
void NetReadStr::getShort(int ndata, unsigned short *data)
{
if(net_get_short(netStream_->net, ndata, data))
THROW_ERROR("net_get_short");
}
/**.......................................................................
* Get a int from a network buffer.
*/
void NetReadStr::getInt(int ndata, unsigned int *data)
{
if(net_get_int(netStream_->net, ndata, data))
THROW_ERROR("net_get_int");
}
/**.......................................................................
* Get a float from a network buffer.
*/
void NetReadStr::getFloat(int ndata, float *data)
{
if(net_get_float(netStream_->net, ndata, data))
THROW_ERROR("net_get_float");
}
/**.......................................................................
* Get a double from a network buffer.
*/
void NetReadStr::getDouble(int ndata, double *data)
{
if(net_get_double(netStream_->net, ndata, data))
THROW_ERROR("net_get_double");
}
/**.......................................................................
* Pack an object to a network buffer.
*/
void NetReadStr::getObj(const NetObjTable* types, int id, void *obj)
{
if(net_to_obj(types, netStream_->net, id, obj))
THROW_ERROR("net_to_obj");
}
/**.......................................................................
* Incrementally read bytes from a network buffer.
*/
void NetReadStr::incNget(int nbytes)
{
if(net_inc_nget(netStream_->net, nbytes))
THROW_ERROR("net_inc_nget");
}
|
Q:
FOTORAMA не отображает ALT
Имею данный код:
<div class="fotorama">
<img src="images/photos/fari-ford-mustang.jpg" alt="photo1" title="title1" />
<img src="images/photos/fari-ford-mustang2.jpg" alt="photo2" title="title2" />
<img src="images/photos/fari-ford-mustang3.jpg" alt="photo3" title="title3" />
<img src="images/photos/fari-ford-mustang4.jpg" alt="photo4" title="title4" />
<img src="images/photos/fari-ford-mustang5.jpg" alt="photo5" title="title5" />
<img src="images/photos/fari-ford-mustang6.jpg" alt="photo6" title="title6" />
<img src="images/photos/fari-ford-mustang7.jpg" alt="photo7" title="title7" />
</div>
После запуска которого на сайте появляеться удобный слайдер прокрутки изображений.
Однако в консоли браузера все alt & title атрибуты пропадают..
<img src="images/photos/fari-ford-mustang.jpg" class="fotorama__img" style="width: 666.429px; height: 500px; left: 47.1137px; top: 0px;">
Пример на сайте: пример fotorama
A:
Шаг первый:
Открыть файл fotorama.dev.js и найти следущую строку:
frameData.state = '';
После нее добавить это:
if ( frameData.data.hasOwnProperty('alt') ) {
img.alt= frameData.data.alt;
}
if ( frameData.data.hasOwnProperty('title') ) {
img.title= frameData.data.title;
}
Шаг второй:
Найти строчку:
height = numberFromMeasure(imgData.height || $img.attr('height'));
И заменить на это:
height = numberFromMeasure(imgData.height || $img.attr('height')),
alt = $img.attr('alt'),
title = $img.attr('title');
if (alt){
$.extend(imgData, {
alt: alt
});
}
if (title){
$.extend(imgData, {
title: title
});
}
Шаг третий:
Минифицировать и переназвать в fotorama.js
проверено в 4.6.4 версии.
Решение взято с github:
fotorama.js |
<gh_stars>0
//
// Venue+CoreDataClass.h
// CloudEvents
//
// Created by <NAME> on 03/10/2019.
// Copyright © 2019 <NAME>. All rights reserved.
//
//
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
@class City, Event;
NS_ASSUME_NONNULL_BEGIN
@interface Venue : NSManagedObject
@end
NS_ASSUME_NONNULL_END
#import "Venue+CoreDataProperties.h"
|
package com.home.commonSceneBase.scene.unit;
import com.home.commonBase.scene.unit.OperationIdentityLogic;
import com.home.commonSceneBase.net.sceneBaseRequest.unit.RefreshOperationStateRequest;
public class BOperationIdentityLogic extends OperationIdentityLogic
{
@Override
protected void sendRefreshState(int state)
{
_unit.radioMessage(RefreshOperationStateRequest.create(_unit.instanceID,state),true);
}
}
|
import { iCommand } from './commands';
import { spawn } from 'child_process';
import * as fs from 'fs';
import { red, italic } from 'colors';
import { emoji } from 'node-emoji';
import Versions from './versions';
import { Utils } from '../utils/utils';
const INC_MEM_FLAG = '--max_old_space_size=8192';
export default class NgWrapper implements iCommand {
execute(commands: string[]) {
new Versions().execute();
Utils.log('Running Command:');
Utils.log(`${INC_MEM_FLAG} ./node_modules/.bin/ng ${commands.join(' ')}`, italic);
const ng = spawn('node', [INC_MEM_FLAG, './node_modules/.bin/ng', ...commands]);
ng.stdout.on('data', (data) => {
Utils.log(`${data}`);
});
ng.stderr.on('data', (data) => {
Utils.log(`${data}`);
});
Utils.log('');
}
/*
* Special case build to call node directly
*/
nodeExec(commands: string[]) {
new Versions().execute();
Utils.log('Running Command:');
Utils.log('node ' + commands.join(' '), italic);
const node = spawn('node', commands);
node.stdout.on('data', (data) => {
Utils.log(`${data}`);
});
node.stderr.on('data', (data) => {
Utils.log(`${data}`);
});
Utils.log('');
}
}
|
<filename>setup.py
#!/usr/bin/env python3
import os
from setuptools import setup, find_packages
setup(
name="revIOr",
version="0.2",
author="<NAME>",
author_email="<EMAIL>",
description="An auto-updating HTML window for reStructuredText, Markdown and more.",
license="BSD",
keywords="restructuredtext markdown text processor renderer view viewer review",
packages=find_packages(),
include_package_data=True,
entry_points={
'console_scripts' : ['revIOr = abstrys.revIOr.app:main'],
'setuptools.installation': ['eggsecutable = abstrys.revIOr.app:main']
},
install_requires = ['docutils', 'commonmark', 'PyGObject', 'abstrys-core']
)
|
/*
* Tencent is pleased to support the open source community by making
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
*
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
*
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
*
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
*
* ---------------------------------------------------
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
* the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import { computed, onMounted, ref } from 'vue';
import { classes, resolveClassName } from '@bkui-vue/shared';
import { TablePropTypes } from './props';
import { resolveHeadConfig, resolveNumberOrStringToPix, resolvePropBorderToClassStr, resolvePropVal } from './utils';
export const useClass = (props: TablePropTypes, root?, reactiveProp?) => {
const autoHeight = ref(200);
const tableClass = computed(() => (classes({
[resolveClassName('table')]: true,
}, resolvePropBorderToClassStr(props.border))));
const headClass = classes({
[resolveClassName('table-head')]: true,
});
const config = resolveHeadConfig(props);
const headStyle = computed(() => ({
'--row-height': `${resolvePropVal(config, 'height', ['thead'])}px`,
'--scroll-head-left': `-${reactiveProp.scrollTranslateX}px`,
'--scroll-left': `${reactiveProp.scrollTranslateX}px`,
}));
const contentClass = classes({
[resolveClassName('table-body')]: true,
});
const footerClass = computed(() => classes({
[resolveClassName('table-footer')]: true,
['is-hidden']: !props.pagination || !props.data.length,
}));
/** 表格外层容器样式 */
const wrapperStyle = computed(() => ({
minHeight: resolveNumberOrStringToPix(props.minHeight, 'auto'),
}));
const resolvePropHeight = (height: Number | string, defaultValue: number) => {
const strHeight = String(height);
if (/^\d+\.?\d*$/.test(strHeight)) {
return Number(strHeight);
}
if (/^\d+\.?\d*px$/ig.test(strHeight)) {
return Number(strHeight.replace('px', ''));
}
if (/^\d+\.?\d*%$/ig.test(strHeight)) {
const percent = Number(strHeight.replace('%', ''));
return defaultValue * percent / 100;
}
return defaultValue;
};
/** 表格外层容器样式 */
const contentStyle = computed(() => {
const resolveHeight = resolvePropHeight(props.height, autoHeight.value);
const resolveHeadHeight = props.showHead ? resolvePropHeight(props.headHeight, 40) + 2 : 0;
const resolveMaxHeight = resolvePropHeight(props.maxHeight, autoHeight.value);
const resolveMinHeight = resolvePropHeight(props.minHeight, autoHeight.value);
const resolveFooterHeight = props.pagination && props.data.length ? 40 : 0;
const contentHeight = resolveHeight - resolveHeadHeight - resolveFooterHeight;
const maxHeight = resolveMaxHeight - resolveHeadHeight - resolveFooterHeight;
const minHeight = resolveMinHeight - resolveHeadHeight - resolveFooterHeight;
const height = props.height !== 'auto' ? `${contentHeight}px` : 'auto';
return {
display: 'block',
'max-height': `${maxHeight}px`,
'min-height': `${minHeight}px`,
height,
};
});
onMounted(() => {
resetTableHeight(root?.value);
});
const resetTableHeight = (rootEl: HTMLElement) => {
if (rootEl) {
const { height } = rootEl.parentElement.getBoundingClientRect();
autoHeight.value = height;
}
};
return { tableClass, headClass, contentClass, footerClass, wrapperStyle, contentStyle, headStyle, resetTableHeight };
};
|
// DelSnsUser del sns user.
func (d *Dao) DelSnsUser(c context.Context, mid int64, platform int) (affected int64, err error) {
var res sql.Result
if res, err = d.db.Exec(c, _delSnsUserSQL, mid, platform); err != nil {
log.Error("DelSnsUser mid(%d) platform(%d) d.db.Exec() error(%+v)", mid, platform, err)
return
}
return res.RowsAffected()
} |
<reponame>ebadkamil/nicos<filename>test/nicos_sinq/sxtal/test_singlexlib.py
# -*- coding: utf-8 -*-
# *****************************************************************************
# NICOS, the Networked Instrument Control System of the MLZ
# Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS)
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Module authors:
# <EMAIL>
#
# *****************************************************************************
"""
A test suite for the singlexlib for single crystal diffraction
"""
import numpy as np
from nicos_sinq.sxtal.cell import Cell
from nicos_sinq.sxtal.singlexlib import angleBetweenReflections, \
biToNormalBeam, calcNBUBFromCellAndReflections, \
calcUBFromCellAndReflections, calculateBMatrix, rotatePsi, z1FromAngles, \
z1FromNormalBeam, z1ToBisecting, z1ToNormalBeam
def test_bisecting_angles():
ub = np.array([[0.016169, 0.011969, 0.063195],
[-0.000545, 0.083377, -0.009117],
[-0.162051, 0.000945, 0.006321]],
dtype='float64')
hkl = np.array([-2., -2., 4])
z1 = ub.dot(hkl)
theta, chi, phi = z1ToBisecting(1.179, z1)
assert(abs(np.rad2deg(theta) - 15.29352) < .01)
assert(abs(np.rad2deg(chi) - 129.053604) < .01)
assert (abs(np.rad2deg(phi) - 134.191132) < .01)
def test_bisecting_z1():
ub = np.array([[0.016169, 0.011969, 0.063195],
[-0.000545, 0.083377, -0.009117],
[-0.162051, 0.000945, 0.006321]],
dtype='float64')
hkl = np.array([-2., -2., 4])
z1 = ub.dot(hkl)
z1test = z1FromAngles(1.179, np.deg2rad(30.58704),
np.deg2rad(15.293520),
np.deg2rad(129.053604),
np.deg2rad(134.191132))
for isval, shouldval in zip(z1test, z1):
assert(abs(isval - shouldval) < .0001)
ubinv = np.linalg.inv(ub)
hkl = ubinv.dot(z1)
assert(abs(hkl[0] - -2.) < .0001)
assert (abs(hkl[1] - -2.) < .0001)
assert (abs(hkl[2] - 4.) < .0001)
def test_psi_rotation():
psiom, psichi, psiphi = rotatePsi(np.deg2rad((15.2935)),
np.deg2rad(129.0536),
np.deg2rad(134.191132),
np.deg2rad(30.))
assert(abs(np.rad2deg(psiom) - 37.374298) < .001)
assert (abs(np.rad2deg(psichi) - 123.068192) < .001)
assert (abs(np.rad2deg(psiphi) - 170.8209099) < .001)
def test_z1_to_nb():
ub = np.array([[0.016169, 0.011969, 0.063195],
[-0.000545, 0.083377, -0.009117],
[-0.162051, 0.000945, 0.006321]],
dtype='float64')
hkl = np.array([-2., -2., 4])
z1 = ub.dot(hkl)
gamma, om, nu = z1ToNormalBeam(1.179, z1)
assert(abs(np.rad2deg(gamma) - 19.3234) < .01)
assert (abs(np.rad2deg(om) - -21.0583) < .01)
assert (abs(np.rad2deg(nu) - 24.1858) < .01)
def test_bi_to_nb():
gamma, om, nu = biToNormalBeam(np.deg2rad(30.56),
np.deg2rad(15.28),
np.deg2rad(129.047),
np.deg2rad(134.188))
assert (abs(np.rad2deg(gamma) - 19.3018) < .01)
assert (abs(np.rad2deg(om) - 109.458) < .01)
assert (abs(np.rad2deg(nu) - 24.1633) < .01)
def test_nb_to_z1():
ub = np.array([[0.016169, 0.011969, 0.063195],
[-0.000545, 0.083377, -0.009117],
[-0.162051, 0.000945, 0.006321]],
dtype='float64')
hkl = np.array([-2., -2., 4])
z1 = ub.dot(hkl)
z1test = z1FromNormalBeam(1.179,
np.deg2rad(19.3234),
np.deg2rad(-21.0583),
np.deg2rad(24.1858))
for isval, shouldval in zip(z1test, z1):
assert(abs(isval - shouldval) < .0001)
def test_ub_calc():
cell = Cell(5.402, 5.402, 12.3228)
r1 = {'h': 2., 'k': 2., 'l': 0, 'stt': 35.8,
'om': 17.90, 'chi': 180.642, 'phi': 86.229}
r2 = {'h': 0., 'k': 0., 'l': 3., 'stt': 16.498,
'om': 8.249, 'chi': 268.331, 'phi': 333.714}
ub_expected = np.array([[.1215666, -.138694, -0.0021278],
[-.1386887, -.121654, .0010515],
[-.0049867, .0020612, -.081156]],
dtype='float64')
ub = calcUBFromCellAndReflections(cell, r1, r2)
for calc, exp in zip(np.nditer(ub), np.nditer(ub_expected)):
assert(abs(calc - exp) < .001)
def test_ub_nb_calc():
cell = Cell(9.663, 9.663, 9.663, 81.496, 81.496, 81.496)
r1 = {'h': 1., 'k': -2., 'l': 1, 'gamma': 13.60,
'om': -102.52, 'nu': 12.40}
r2 = {'h': 1., 'k': 1., 'l': 1., 'gamma': 10.62179,
'om': -14.005692, 'nu': 0.84147}
ub_expected = np.array([[0.0211, 0.0773564, 0.04842],
[-.1007840, 0.043792, 0.00344],
[-.0225, -.0568516, .09368]],
dtype='float64')
ub = calcNBUBFromCellAndReflections(cell, r1, r2)
for calc, exp in zip(np.nditer(ub), np.nditer(ub_expected)):
assert(abs(calc - exp) < .001)
def test_angle_between_reflections():
cell = Cell(9.663, 9.663, 9.663, 81.496, 81.496, 81.496)
r1 = {'h': 1., 'k': 0., 'l': 0.}
r2 = {'h': 0., 'k': 1., 'l': 0.}
B = calculateBMatrix(cell)
angle = angleBetweenReflections(B, r1, r2)
assert(abs(np.rad2deg(angle) - 97.40) < .01)
|
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
<NAME>, <EMAIL>
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#include <math.h>
#include <stdlib.h>
#include "pair_sph_rhosum.h"
#include "atom.h"
#include "force.h"
#include "comm.h"
#include "neigh_list.h"
#include "neigh_request.h"
#include "memory.h"
#include "error.h"
#include "neighbor.h"
#include "update.h"
#include "domain.h"
using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
PairSPHRhoSum::PairSPHRhoSum(LAMMPS *lmp) : Pair(lmp)
{
restartinfo = 0;
// set comm size needed by this Pair
comm_forward = 1;
first = 1;
}
/* ---------------------------------------------------------------------- */
PairSPHRhoSum::~PairSPHRhoSum() {
if (allocated) {
memory->destroy(setflag);
memory->destroy(cutsq);
memory->destroy(cut);
}
}
/* ----------------------------------------------------------------------
init specific to this pair style
------------------------------------------------------------------------- */
void PairSPHRhoSum::init_style() {
// need a full neighbor list
int irequest = neighbor->request(this,instance_me);
neighbor->requests[irequest]->half = 0;
neighbor->requests[irequest]->full = 1;
}
/* ---------------------------------------------------------------------- */
void PairSPHRhoSum::compute(int eflag, int vflag) {
int i, j, ii, jj, jnum, itype, jtype;
double xtmp, ytmp, ztmp, delx, dely, delz;
double rsq, imass, h, ih, ihsq;
int *jlist;
double wf;
// neighbor list variables
int inum, *ilist, *numneigh, **firstneigh;
if (eflag || vflag)
ev_setup(eflag, vflag);
else
evflag = vflag_fdotr = 0;
double **x = atom->x;
double *rho = atom->rho;
int *type = atom->type;
double *mass = atom->mass;
// check consistency of pair coefficients
if (first) {
for (i = 1; i <= atom->ntypes; i++) {
for (j = 1; i <= atom->ntypes; i++) {
if (cutsq[i][j] > 0.0) {
if (!setflag[i][i] || !setflag[j][j]) {
if (comm->me == 0) {
printf(
"SPH particle types %d and %d interact, but not all of their single particle properties are set.\n",
i, j);
}
}
}
}
}
first = 0;
}
inum = list->inum;
ilist = list->ilist;
numneigh = list->numneigh;
firstneigh = list->firstneigh;
// recompute density
// we use a full neighborlist here
if (nstep != 0) {
if ((update->ntimestep % nstep) == 0) {
// initialize density with self-contribution,
for (ii = 0; ii < inum; ii++) {
i = ilist[ii];
itype = type[i];
imass = mass[itype];
h = cut[itype][itype];
if (domain->dimension == 3) {
/*
// Lucy kernel, 3d
wf = 2.0889086280811262819e0 / (h * h * h);
*/
// quadric kernel, 3d
wf = 2.1541870227086614782 / (h * h * h);
} else {
/*
// Lucy kernel, 2d
wf = 1.5915494309189533576e0 / (h * h);
*/
// quadric kernel, 2d
wf = 1.5915494309189533576e0 / (h * h);
}
rho[i] = imass * wf;
}
// add density at each atom via kernel function overlap
for (ii = 0; ii < inum; ii++) {
i = ilist[ii];
xtmp = x[i][0];
ytmp = x[i][1];
ztmp = x[i][2];
itype = type[i];
jlist = firstneigh[i];
jnum = numneigh[i];
for (jj = 0; jj < jnum; jj++) {
j = jlist[jj];
j &= NEIGHMASK;
jtype = type[j];
delx = xtmp - x[j][0];
dely = ytmp - x[j][1];
delz = ztmp - x[j][2];
rsq = delx * delx + dely * dely + delz * delz;
if (rsq < cutsq[itype][jtype]) {
h = cut[itype][jtype];
ih = 1.0 / h;
ihsq = ih * ih;
if (domain->dimension == 3) {
/*
// Lucy kernel, 3d
r = sqrt(rsq);
wf = (h - r) * ihsq;
wf = 2.0889086280811262819e0 * (h + 3. * r) * wf * wf * wf * ih;
*/
// quadric kernel, 3d
wf = 1.0 - rsq * ihsq;
wf = wf * wf;
wf = wf * wf;
wf = 2.1541870227086614782e0 * wf * ihsq * ih;
} else {
// Lucy kernel, 2d
//r = sqrt(rsq);
//wf = (h - r) * ihsq;
//wf = 1.5915494309189533576e0 * (h + 3. * r) * wf * wf * wf;
// quadric kernel, 2d
wf = 1.0 - rsq * ihsq;
wf = wf * wf;
wf = wf * wf;
wf = 1.5915494309189533576e0 * wf * ihsq;
}
rho[i] += mass[jtype] * wf;
}
}
}
}
}
// communicate densities
comm->forward_comm_pair(this);
}
/* ----------------------------------------------------------------------
allocate all arrays
------------------------------------------------------------------------- */
void PairSPHRhoSum::allocate() {
allocated = 1;
int n = atom->ntypes;
memory->create(setflag, n + 1, n + 1, "pair:setflag");
for (int i = 1; i <= n; i++)
for (int j = i; j <= n; j++)
setflag[i][j] = 0;
memory->create(cutsq, n + 1, n + 1, "pair:cutsq");
memory->create(cut, n + 1, n + 1, "pair:cut");
}
/* ----------------------------------------------------------------------
global settings
------------------------------------------------------------------------- */
void PairSPHRhoSum::settings(int narg, char **arg) {
if (narg != 1)
error->all(FLERR,
"Illegal number of setting arguments for pair_style sph/rhosum");
nstep = force->inumeric(FLERR,arg[0]);
}
/* ----------------------------------------------------------------------
set coeffs for one or more type pairs
------------------------------------------------------------------------- */
void PairSPHRhoSum::coeff(int narg, char **arg) {
if (narg != 3)
error->all(FLERR,"Incorrect number of args for sph/rhosum coefficients");
if (!allocated)
allocate();
int ilo, ihi, jlo, jhi;
force->bounds(FLERR,arg[0], atom->ntypes, ilo, ihi);
force->bounds(FLERR,arg[1], atom->ntypes, jlo, jhi);
double cut_one = force->numeric(FLERR,arg[2]);
int count = 0;
for (int i = ilo; i <= ihi; i++) {
for (int j = MAX(jlo,i); j <= jhi; j++) {
//printf("setting cut[%d][%d] = %f\n", i, j, cut_one);
cut[i][j] = cut_one;
setflag[i][j] = 1;
count++;
}
}
if (count == 0)
error->all(FLERR,"Incorrect args for pair coefficients");
}
/* ----------------------------------------------------------------------
init for one type pair i,j and corresponding j,i
------------------------------------------------------------------------- */
double PairSPHRhoSum::init_one(int i, int j) {
if (setflag[i][j] == 0) {
error->all(FLERR,"All pair sph/rhosum coeffs are not set");
}
cut[j][i] = cut[i][j];
return cut[i][j];
}
/* ---------------------------------------------------------------------- */
double PairSPHRhoSum::single(int i, int j, int itype, int jtype, double rsq,
double factor_coul, double factor_lj, double &fforce) {
fforce = 0.0;
return 0.0;
}
/* ---------------------------------------------------------------------- */
int PairSPHRhoSum::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag, int *pbc) {
int i, j, m;
double *rho = atom->rho;
m = 0;
for (i = 0; i < n; i++) {
j = list[i];
buf[m++] = rho[j];
}
return m;
}
/* ---------------------------------------------------------------------- */
void PairSPHRhoSum::unpack_forward_comm(int n, int first, double *buf) {
int i, m, last;
double *rho = atom->rho;
m = 0;
last = first + n;
for (i = first; i < last; i++)
rho[i] = buf[m++];
}
|
Despite the saying "as American as apple pie", this famed fruit dessert is credited as an English invention, with the first recorded recipe in the 16th century.
Regardless, the apple pie in its modern incarnation is now largely affiliated with the US, where it inspires fierce debate about what makes the perfect pie.
To make pastry, using a food processor, process flour, sugar, butter and ½ tsp salt until mixture resembles fine breadcrumbs. Add 60ml ice-cold water and process until mixture forms a ball. Shape two-thirds of dough into a disc and cover with plastic wrap. Repeat with remaining one-third dough. Refrigerate both discs for 30 minutes, to rest.
Preheat oven to 200°C. Using a lightly floured rolling pin, roll out larger disc between two sheets of baking paper to a 30cm round. Line a greased deep 26cm pie dish with pastry. Roll out remaining pastry disc to a 26cm round, and refrigerate until needed.
To make filling, combine all ingredients except beaten egg mixture in a large bowl. Place in pastry case, brush edges of pastry with egg wash, top with remaining pastry round then seal by pressing edges together using your thumb and index finger. Using a small sharp knife, make 3 small incisions in pastry top to allow steam to escape, then brush top with beaten egg mixture. Bake for 50 minutes or until golden and juices begin to bubble through incisions in crust.
As seen in Feast magazine, Issue 13, pg20. |
export { View as default } from '@flexn/sdk';
|
import * as fs from "fs";
import * as path from "path";
import * as _ from "lodash";
export class ArbConverter {
constructor(private arbFileLocation: string, private outputDir: string) {}
convertToHierarchicalJson() {
const content = fs.readFileSync(path.join(this.arbFileLocation), "utf8");
const arbInJson = JSON.parse(content);
const resourceIdKeys = Object.keys(arbInJson).filter(
key => !_.startsWith(key, "@")
);
let resources: Record<string, string> = {};
resourceIdKeys.forEach(key => {
resources[key] = arbInJson[key];
});
const hierarchicalJson = JSON.stringify(resources);
fs.writeFileSync(this.outputDir, hierarchicalJson);
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.