content
stringlengths 7
2.61M
|
---|
Autodyne Proximity Sensor with Temperature Compensated Biasing Network In this paper, design and analysis of an Ultra High Frequency (UHF) Autodyne proximity sensor is presented. This sensor generates and transmits the tunable RF signal and receives the reflected signal. It generates the IF frequency corresponding to the Doppler shift of the received echo. It can be tuned for detection of different Doppler offsets by IF signal filtering. The sensor is based on a single transistor Clapp oscillator. It includes capacitor loaded short loop antenna in the feedback circuit to provide 180° phase shift which is required for oscillation along with the needed radiation for short range application. The sensor circuit is fabricated and tested on a 20 mil FR4 substrate with planar capacitors and inductors to minimize the production cost. The sensor can detect the movement of targets up to 13 m range. |
// Clone returns a new List with the same contents as this one.
func (l *List[T]) Clone() *List[T] {
nl := New[T]()
if l == nil {
return nil
}
if l.Count() == 0 {
return nil
}
tail := &node[T]{
value: l.head.value,
prev: nil,
next: nil,
}
nl.head = tail
for n := l.head; n != nil; n = n.next {
tail.next = &node[T]{
value: n.value,
prev: tail,
next: nil,
}
tail = tail.next
}
nl.tail = tail
return nl
} |
Gov. Bill Haslam's plan to free local schools from a state-mandated teacher pay schedule that rewards seniority and training is getting a chilly initial reception from the state's largest educators' group.
(Times Free Press) -- Gov. Bill Haslam's plan to free local schools from a state-mandated teacher pay schedule that rewards seniority and training is getting a chilly initial reception from the state's largest educators' group.
"We're still looking at how we're going to officially respond, but on the surface, this seems like going totally in the wrong direction," said Jerry Winters, the Tennessee Education Association's lobbyist.
Winters said teachers are "already feeling besieged and demoralized based on what the legislature did to them last year. And now, it seems it's shifting to the governor's office and he's just piling on."
Haslam said Tuesday he wants state lawmakers to "eliminate outdated requirements of state and local salary schedules based strictly on seniority and training and give districts flexibility to set parameters themselves based on what they want to reward."
Read more on the story from our news partners at the Chattanooga Times Free Press. |
<filename>src/me/jko/discogs/models/ReleaseCollection.java
package me.jko.discogs.models;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
@JsonIgnoreProperties(ignoreUnknown = true)
public class ReleaseCollection {
public int id;
public int foobar;
private Collection<CollectionRelease> releases = new ArrayList<CollectionRelease>();
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
public int getId() {
return id;
}
public int getFoobar() {
return foobar;
}
public void setFoobar(int i) {
this.foobar = i;
}
public Collection<CollectionRelease> getReleases() {
return releases;
}
public void setReleases(List<CollectionRelease> releases) {
this.releases = releases;
}
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
public void setAdditionalProperties(String name, Object value) {
this.additionalProperties.put(name, value);
}
} |
<gh_stars>0
package com.gsix.dvr_application.Adapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.gsix.dvr_application.ExpensesAndBillsActivity;
import com.gsix.dvr_application.Model.Checkin;
import com.gsix.dvr_application.Model.Expense;
import com.gsix.dvr_application.PerformanceActivity;
import com.gsix.dvr_application.R;
import java.text.DateFormat;
import java.util.Date;
import java.util.List;
public class PerformanceAdapter extends RecyclerView.Adapter<PerformanceAdapter.ViewHolder> {
private List<Checkin> checkinList;
public PerformanceAdapter(PerformanceActivity performanceActivity, List<Checkin> checkinList){
this.checkinList = checkinList;
}
@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.performancelist, parent, false);
return new ViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
//Instead of creating new view for each new row, an old view is recycled
//and reused by binding new data to it. This happens exactly in onBindViewHolder()
Checkin checkin = checkinList.get(position);
holder.empname.setText(checkin.getName());
holder.empcheckin.setText(checkin.getTotalcheckin());
holder.ranking.setText(String.valueOf(position+1));
}
@Override
public int getItemCount() {
return checkinList.size();
}
public class ViewHolder extends RecyclerView.ViewHolder{
TextView empname,empcheckin,ranking;
public ViewHolder(@NonNull View view) {
super(view);
empname=(TextView)itemView.findViewById(R.id.emp_name);
empcheckin=(TextView)itemView.findViewById(R.id.emp_checkin);
ranking=(TextView)itemView.findViewById(R.id.ranking1);
}
}
}
|
<reponame>futugyou/AnimalDeCompagnieNoSu<gh_stars>1-10
package config
var (
DatabaseSetting *database
ClientSetting []*AuthClient
)
|
Transforming growth factor-beta in breast cancer: a working hypothesis. Transforming Growth Factor-beta (TGF beta) is the most potent known inhibitor of the progression of normal mammary epithelial cells through the cell cycle. During the early stages of breast cancer development, the transformed epithelial cells appear to still be sensitive to TGF beta-mediated growth arrest, and TGF beta can act as an anti-tumor promoter. In contrast, advanced breast cancers are mostly refractory to TGF beta-mediated growth inhibition and produce large amounts of TGF beta, which may enhance tumor cell invasion and metastasis by its effects on extracellular matrix. We postulate that this seemingly paradoxical switch in the responsiveness of tumor cells to TGF beta during progression is the consequence of the activation of the latent TGF beta that is produced and deposited into the tumor microenvironment, thereby driving the clonal expansion of TGF beta-resistant tumor cells. While tumor cells themselves may activate TGF beta, recent observations suggest that environmental tumor promoters or carcinogens, such as ionizing radiation, can cause stromal fibroblasts to activate TGF beta by epigenetic mechanisms. As the biological effects of the anti-estrogen tamoxifen may well be mediated by TGF beta, this model has a number of important implications for the clinical uses of tamoxifen in the prevention and treatment of breast cancer. In addition, it suggests a number of novel approaches to the treatment of advanced breast cancer. |
<gh_stars>0
package com.jcgarciam.n26.dto;
import com.jcgarciam.n26.domain.StatisticCounter;
import java.math.BigDecimal;
import java.math.RoundingMode;
/**
* Statistics
*/
public class Statistic {
private double sum;
private double max;
private double min;
private double avg;
private int count;
public Statistic(final StatisticCounter counter) {
this.sum = counter.getSum();
this.max = counter.getMax();
this.min = counter.getMin();
this.count = counter.getCount();
this.avg = counter.getAvg();
}
public double getSum() {
return round(this.sum);
}
public double getAvg() {
return round(this.avg);
}
public double getMax() {
return round(this.max);
}
public double getMin() {
return round(this.min);
}
private double round(double min) {
BigDecimal bd = new BigDecimal(min);
bd = bd.setScale(4, RoundingMode.HALF_UP);
return bd.doubleValue();
}
public int getCount() {
return this.count;
}
} |
Use of foliar fertilizers on soybeans in the Republic of Tatarstan In 2018, studies were conducted to assess the impact of foliar feeding with complex fertilizers on the yield and grain quality of two soybean varieties. Weather conditions throughout the year were noted periodically dry in May, June and August. Metallocene® fertilizers with different mineral nutrition elements were used for soybean spraying. The fertilizers were used for spraying in the soybean beginning bloom stage. control served as a variant without foliar feeding. It was found that the variety Annushka in the conditions of 2018 was more productive than the variety Milyaushaa. The difference between the varieties in the control was 0.3 t/ha. Low yield in the control sample was associated with the negative effect of drought on the existing root system and the nudeles on it. Spraying Annushka crops by Metallocene® A with copper has high positive effect on the yield. The yield increase from this fertilizer was 0.72 t/ha. In case with Milyaushaa, the best indicators were achieved by Metallocene® D spraying with manganese. In case the yield increased by 0.79 t/ha. The use of foliar feeding had positive effect on soybean seed size. The maximum 1000 seed weight Annushka was for Metallocene® A with copper. For Milyaushaa the largest seeds were when using Metallocene® D with manganese. Foliar feeding by Metallocene® D with manganese had positive effect on phosphorus accumulation in seeds. Introduction Soybean is one of the most important legumes with significant distribution in various regions of the world. The most valuable features of this culture include high content of protein in the grain, which is essential both for food industry and in fodder production. One of the key problems in world soybean production is the negative impact of global climate change on crop productivity, which requires measures to increase plant stress resistance. Currently in Russia there is a stable growth trend of both sown areas and volumes of soybean production. The possibility of obtaining sustainable soybean crops in Tatarstan is reflected in many studies, but, still this culture in the republic is not widely spread and is way below peas. There are both natural and agricultural reasons of limited soybean cultivation in the Republic of Tatarstan. The latter include the selection of varieties, as well as the optimization of mineral nutrition of the culture. At present, there is a large number of both domestic and foreign varieties, which allow forming stable soybean crops in the conditions of the Volga region. However, the selection of soybean varieties, especially in the context of recurrent droughts in the region, remains quite a challenge. Soybean is one of the crops requiring mineral nutrition, so the optimization of the fertilizer system is essential in the technology of its cultivation. The use of various micronutrients containing certain microelements or their combination plays a significant role in increasing crop yield. One method of applying micronutrients to soybean is foliage application, i.e. spraying of plants. The efficiency of this method in agricultural technology of soybean production is quite high. However, the application of micronutrients elements requires the consideration of various factors such as the presence of microelements in soil, grade features, as well as forms, period and methods of their application, which defines the need for appropriate study. New micronutrients include Metallocene fertilizers containing various microelements in the form of chelates in combination with macroelements. Besides, they include growth regulators. The creation of complex preparations of microelements and growth regulators for foliage application is one of the main directions to optimize plant mineral nutrition. In addition, modern liquid complex fertilizers with growthstimulating effect can play a significant role in crop management technologies, including soybeans. The purpose of the study was to test the efficiency of foliage application of different micronutrients of Metallocene series on different soybean varieties. The tasks of the study included the assessment of the impact of these techniques on yield and chemical composition of grain in soybean varieties Milyausha and Annushka. Materials and methods The study was carried out in the experimental field of Kazan SAU in 2018. The object of the study included soybean varieties Annushka (Poland) and Milyausha (Russia, Tatarstan). Metallocene preparations represent liquid fertilizers with microelements in the form of chelates. Spraying was carried out in budding-early bloom stage. The consumption rate of preparations -1.0 l/ha. The total plot area -56 m 2, accounting area -50 m 2. Repetition -quadruple. Sowing norm -0.5 mln v.s./ha. Sowing was carried out with inter-rows of 30 cm. Ammophoska (2 c/ha) was introduced under pre-sowing cultivation. The precursor is winter wheat by complete fallow. Operating fluid flow rate at spraying -200 l/ha. Seed reproduction -ES1. Prior to sowing the seeds were treated with a special bacterial preparation for inoculation with tuber bacterium -soya Rhizotorfin. The soil of the experimental site is grey forest middle loamy soils, humus content -3.1%, exchangeable potassium -170 mg/kg, mobile phosphorus -180.0 mg/kg. Agricultural cultivation technology was according to recommendations for the Republic of Tatarstan. In terms of providing the soil with accessible forms of microelements, then regarding the content of copper, zinc and manganese the soil can be characterized as soil with an average content of these microelements. Weather conditions of the vegetation period were characterized by occasional dry phenomena in May, June and August, as well as excessive moistening in July. Biometric values were determined via traditional methods. Grain analysis for macroelements was carried out in a certified laboratory. Statistical processing of experimental data was carried out according to traditional methods with calculation of the least significant difference and standard deviation. To assess the accuracy of the difference for average values, the standard deviation was determined via the Student's t-test (P < 0.05). Results and discussion Foliage application affected biometric indicators of soybean growth ( Table 1). The effect of additional fertilization on biometric indicators depended on fertilizer composition and variety. Concerning Annushka, all preparations reliably increased the height of plants and the number of grains formed in one bean. The growth of the total number of beans per 1 plant occurred during spraying with preparations containing copper, zinc and iron. The maximum height of plants (stem length) was with the use of the preparation with iron and manganese. The largest number of beans per plant was when sprayed with the preparation with iron. The largest number of grains in a bean were formed using iron preparation. Note: *the difference is not reliable in relation to the control for the corresponding class in terms of the standard deviation at P = 0.05 (5% error) Concerning Milyausha, the growth stimulating effect was noticed for preparations with iron and manganese. The increase in the number of beans and the number of grains was observed only for zinc-containing preparation. The maximum length of plants and the largest number of beans per plant was achieved through fertilization with manganese preparation. The number of grains in a bean was the highest when the crops were treated with iron preparation. Thus, in both soybean varieties, the growth stimulation (stem length) was observed when foliage application of the manganese preparation was used. The impact of microelements on the number of beans per plant and the number of grains in a bean was different for different soybean varieties. Table 2 shows the results of soybean seed yield and size. In 2018, Annushka variety was more productive than the Milyausha variety. At the same time, the weight of 1000 grains of Annushka variety was higher than Milyausha variety. When comparing yields it can be noted that in almost all options of the experiment the use of feeding gave a positive result. One of the reasons for this is drought during budding period, as well as weak development of roots and complete absence of tangles on roots due to moisture stress in May. Note: *the difference is not reliable in relation to the control for the corresponding class in terms of the standard deviation at P = 0.05 (5% error) Note: *the difference is not reliable in relation to the control for the corresponding class in terms of the standard deviation at P = 0.05 (5% error) For Annushka variety, the maximum yield was obtained through foliage feeding with A (Cu) fertilizer (yield increase by 0.72 t/ha). For Milyausha variety, the highest soybean yield was when plants were treated with a preparation containing manganese (yield increase by 0.79 t/ha). The yield was slightly lower (0.66 t/ha) when copper preparation was used. Annushka variety demonstrated a reliable increase in the weight of seeds feeding caused by the application of the preparation with copper, and Milyausha -with manganese. The use of fertilizer feeding affected the content of macroelements and dry matter in soybean grains. Foliage feeding had little effect on dry matter and total nitrogen in soybean grains. However, the use of manganese and iron-based fertilizers in both varieties increased the accumulation of phosphorus in the grain. For Annushka variety, the growth of potassium content in the grain was noted in the option with iron, and for Milyausha variety -when sprayed with the preparation with manganese. In order to determine the effect of foliage feeding on total removal of mineral feed elements with grain harvest, the corresponding calculations were carried out (Table 4). The results of assessment showed that Annushka variety had higher NPK removal with grain yield than Milyausha variety. The use of all treatment options led to the increase of macroelements removal, primarily due to the increase of the soybean yield. In both soybean varieties, the maximum nitrogen removal was obtained by feeding with preparations containing copper and zinc. The largest consumption of phosphorus in Annushka variety was with the use of preparations with iron and copper, and in Milyausha variety -with manganese. For potassium the option with copper was marked for the first variety, and with manganese -for the second. A study of protein content showed that the use of foliage fertilizers containing copper and zinc has a positive effect on the increase of protein accumulation in the grain in both soybean varieties, which is essential given the role of the culture as a source of the given nutrients for humans and animals. Conclusion The studies showed that the response of soybean to foliage fertilizers in the budding-early bloom stage depends on the variety and nutrient elements contained in a fertilizer. All preparations stimulated the growth of plants, but regardless of the variety, the most pronounced effect was for the preparation with manganese. A number of researchers also indicates high importance of manganese for soybean harvest. The formation of the number of beans and the number of grains in them within different varieties during feeding with different microelements was different. While for Polish variety Annuska the best results were obtained by using the preparation with copper, for the Russian class Milyausha the advantage was for microfertilizer with manganese. The studies confirmed data obtained through some studies on high efficiency of foliage application of microfertilizers and the need to consider the grade characteristics of the culture. Apparently, spraying of plants with soy solutions of fertilizers with microelements and with biologically active substances activates metabolism thus increasing the consumption of nutrients and yield growth, as well as the quality characteristics of culture grain. The obtained results allow using this technique in soybean harvest management technologies in the Middle Volga zone of Russia, including in the Republic of Tatarstan. |
/**
* find forbid overlaps in each AggregationGroup
* the include dims in AggregationGroup must contain all mandatory, hierarchy and joint
*/
public class AggregationGroupRule implements IValidatorRule<CubeDesc> {
@Override
public void validate(CubeDesc cube, ValidateContext context) {
inner(cube, context);
}
public AggregationGroupRule() {
}
private void inner(CubeDesc cube, ValidateContext context) {
int index = 0;
for (AggregationGroup agg : cube.getAggregationGroups()) {
if (agg.getIncludes() == null) {
context.addResult(ResultLevel.ERROR, "Aggregation group " + index + " 'includes' field not set");
continue;
}
if (agg.getSelectRule() == null) {
context.addResult(ResultLevel.ERROR, "Aggregation group " + index + " 'select rule' field not set");
continue;
}
long combination = 1;
Set<String> includeDims = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);
if (agg.getIncludes() != null) {
for (String include : agg.getIncludes()) {
includeDims.add(include);
}
}
Set<String> mandatoryDims = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);
if (agg.getSelectRule().mandatory_dims != null) {
for (String m : agg.getSelectRule().mandatory_dims) {
mandatoryDims.add(m);
}
}
Set<String> hierarchyDims = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);
if (agg.getSelectRule().hierarchy_dims != null) {
for (String[] ss : agg.getSelectRule().hierarchy_dims) {
for (String s : ss) {
hierarchyDims.add(s);
}
combination = combination * (ss.length + 1);
}
}
Set<String> jointDims = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);
if (agg.getSelectRule().joint_dims != null) {
for (String[] ss : agg.getSelectRule().joint_dims) {
for (String s : ss) {
jointDims.add(s);
}
combination = combination * 2;
}
}
if (!includeDims.containsAll(mandatoryDims) || !includeDims.containsAll(hierarchyDims) || !includeDims.containsAll(jointDims)) {
List<String> notIncluded = Lists.newArrayList();
final Iterable<String> all = Iterables.unmodifiableIterable(Iterables.concat(mandatoryDims, hierarchyDims, jointDims));
for (String dim : all) {
if (includeDims.contains(dim) == false) {
notIncluded.add(dim);
}
}
context.addResult(ResultLevel.ERROR, "Aggregation group " + index + " 'includes' dimensions not include all the dimensions:" + notIncluded.toString());
continue;
}
Set<String> normalDims = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);
normalDims.addAll(includeDims);
normalDims.removeAll(mandatoryDims);
normalDims.removeAll(hierarchyDims);
normalDims.removeAll(jointDims);
combination = combination * (1L << normalDims.size());
if (CollectionUtils.containsAny(mandatoryDims, hierarchyDims)) {
Set<String> intersection = new TreeSet<>(mandatoryDims);
intersection.retainAll(hierarchyDims);
context.addResult(ResultLevel.ERROR, "Aggregation group " + index + " mandatory dimension has overlap with hierarchy dimension: " + intersection.toString());
continue;
}
if (CollectionUtils.containsAny(mandatoryDims, jointDims)) {
Set<String> intersection = new HashSet<>(mandatoryDims);
intersection.retainAll(jointDims);
context.addResult(ResultLevel.ERROR, "Aggregation group " + index + " mandatory dimension has overlap with joint dimension: " + intersection.toString());
continue;
}
int jointDimNum = 0;
if (agg.getSelectRule().joint_dims != null) {
for (String[] joints : agg.getSelectRule().joint_dims) {
Set<String> oneJoint = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);
for (String s : joints) {
oneJoint.add(s);
}
if (oneJoint.size() < 2) {
context.addResult(ResultLevel.ERROR, "Aggregation group " + index + " require at least 2 dimensions in a joint: " + oneJoint.toString());
continue;
}
jointDimNum += oneJoint.size();
int overlapHierarchies = 0;
if (agg.getSelectRule().hierarchy_dims != null) {
for (String[] oneHierarchy : agg.getSelectRule().hierarchy_dims) {
Set<String> oneHierarchySet = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);
for (String s : oneHierarchy) {
oneHierarchySet.add(s);
}
Set<String> share = Sets.intersection(oneJoint, oneHierarchySet);
if (!share.isEmpty()) {
overlapHierarchies++;
}
if (share.size() > 1) {
context.addResult(ResultLevel.ERROR, "Aggregation group " + index + " joint dimensions has overlap with more than 1 dimensions in same hierarchy: " + share.toString());
continue;
}
}
if (overlapHierarchies > 1) {
context.addResult(ResultLevel.ERROR, "Aggregation group " + index + " joint dimensions has overlap with more than 1 hierarchies");
continue;
}
}
}
if (jointDimNum != jointDims.size()) {
Set<String> existing = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);
Set<String> overlap = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);
for (String[] joints : agg.getSelectRule().joint_dims) {
Set<String> oneJoint = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);
for (String s : joints) {
oneJoint.add(s);
}
if (CollectionUtils.containsAny(existing, oneJoint)) {
overlap.addAll(Sets.intersection(existing, oneJoint));
}
existing.addAll(oneJoint);
}
context.addResult(ResultLevel.ERROR, "Aggregation group " + index + " a dimension exists in more than one joint: " + overlap.toString());
continue;
}
}
if (combination > getMaxCombinations(cube)) {
String msg = "Aggregation group " + index + " has too many combinations, current combination is " + combination + ", max allowed combination is " + getMaxCombinations(cube) + "; use 'mandatory'/'hierarchy'/'joint' to optimize; or update 'kylin.cube.aggrgroup.max.combination' to a bigger value.";
context.addResult(ResultLevel.ERROR, msg);
continue;
}
index++;
}
}
protected int getMaxCombinations(CubeDesc cubeDesc) {
return cubeDesc.getConfig().getCubeAggrGroupMaxCombination();
}
} |
#include "base/game.hpp"
#include "base/initializer.hpp"
Game::Game(unsigned int line, unsigned int column, unsigned int mine_number)
:grid_{line, column, mine_number}
{
Initializer::make(grid_)->initialize();
}
bool Game::click(unsigned int line, unsigned int column)
{
if (grid_.finished())
{
return true;
}
start_if_not_started();
grid_.click(line, column);
++click_count_;
if (grid_.finished())
{
end_ = std::chrono::system_clock::now();
return true;
}
else
{
return false;
}
}
unsigned int Game::toggle_flag(unsigned int line, unsigned int column)
{
if (grid_.finished())
{
return 0;
}
start_if_not_started();
grid_.toggle_flag(line, column);
++click_count_;
return grid_.flag_number();
}
bool Game::started() const
{
return start_.time_since_epoch() != duration_t::zero();
}
bool Game::failed() const
{
return grid_.failed();
}
bool Game::cleared() const
{
return grid_.cleared();
}
Game::time_point Game::start() const
{
return start_;
}
Game::duration_t Game::duration() const
{
return end_ - start_;
}
Grid& Game::grid()
{
// reuse the const getter
return
// cast the return value to `Grid&` (drop the const qualifier)
const_cast<Grid&>(
// cast `this` to `const Game*` to call the const version
const_cast<const Game*>(this)->grid()
);
}
const Grid& Game::grid() const
{
return grid_;
}
unsigned int Game::click_count() const
{
return click_count_;
}
void Game::start_if_not_started()
{
if (!started())
{
start_ = std::chrono::system_clock::now();
}
}
|
<gh_stars>100-1000
import { BackgroundpageWindow } from './sharedTypes';
declare const window: BackgroundpageWindow;
export namespace Info {
export function init() {
if (typeof location === 'undefined' || typeof location.host === 'undefined') {
// Running in node
window.log = () => { };
window.logAsync = () => { };
window.info = () => { };
window.infoAsync = () => { };
window.testLog = console.log.bind(console);
window.Promise = Promise;
} else {
// Running in the browser
window.log = console.log.bind(console);
window.logAsync = async (...args: any[]) => {
console.log.apply(console, await Promise.all(args));
}
if (window.location && window.location.hash && window.location.hash.indexOf('noBackgroundInfo')) {
window.info = () => { };
window.infoAsync = () => { };
} else {
window.info = console.log.bind(console);
window.infoAsync = async (...args: any[]) => {
console.log.apply(console, await Promise.all(args));
}
}
}
}
} |
<gh_stars>0
package io.github.redexpress.math;
import io.github.redexpress.hello.Hello;
import org.apache.servicecomb.provider.pojo.RpcReference;
import org.apache.servicecomb.provider.springmvc.reference.RestTemplateBuilder;
import org.apache.servicecomb.serviceregistry.RegistryUtils;
import org.apache.servicecomb.serviceregistry.api.registry.MicroserviceInstance;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
@Service
public class SimpleServiceImpl implements SimpleService{
private static RestTemplate restTemplate = RestTemplateBuilder.create();
@RpcReference(microserviceName = "helloworld", schemaId = "hello")
private static Hello hello;
public HelloVO sayHello(String name) {
String message = hello.hello();
// message = restTemplate.getForObject("cse://helloworld/hello", String.class);
return HelloVO.builder().message(message).name(name).instanceId(instanceId()).build();
}
public String instanceId() {
MicroserviceInstance instance = RegistryUtils.getMicroserviceInstance();
if (instance == null) {
throw new IllegalStateException(
"unable to find any service instances, maybe there is problem registering in service center?");
}
return instance.getInstanceId();
}
}
|
import json
import os
import re
from m2ee import logger
DEFAULT_HEADERS = {
"X-Frame-Options": "(?i)(^allow-from https?://([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*(:\d+)?$|^deny$|^sameorigin$)", # noqa: E501
"Referrer-Policy": "(?i)(^no-referrer$|^no-referrer-when-downgrade$|^origin|origin-when-cross-origin$|^same-origin|strict-origin$|^strict-origin-when-cross-origin$|^unsafe-url$)", # noqa: E501
"Access-Control-Allow-Origin": "(?i)(^\*$|^null$|^https?://([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*(:\d+)?$)", # noqa: E501
"X-Content-Type-Options": "(?i)(^nosniff$)",
"Content-Security-Policy": "[a-zA-Z0-9:;/''\"\*_\- \.\n?=%&]+",
"X-Permitted-Cross-Domain-Policies": "(?i)(^all$|^none$|^master-only$|^by-content-type$|^by-ftp-filename$)", # noqa: E501
"X-XSS-Protection": "(?i)(^0$|^1$|^1; mode=block$|^1; report=https?://([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*(:\d+)?$)", # noqa: E501
}
def parse_headers():
header_config = ""
headers_from_json = {}
# this is kept for X-Frame-Options backward compatibility
x_frame_options = os.environ.get("X_FRAME_OPTIONS", "ALLOW")
if x_frame_options != "ALLOW":
headers_from_json["X-Frame-Options"] = x_frame_options
headers_json = os.environ.get("HTTP_RESPONSE_HEADERS", "{}")
try:
headers_from_json.update(json.loads(headers_json))
except Exception as e:
logger.error(
"Failed to parse HTTP_RESPONSE_HEADERS, due to invalid JSON string: '{}'".format(
headers_json
),
exc_info=True,
)
raise
for header_key, header_value in headers_from_json.items():
regEx = DEFAULT_HEADERS[header_key]
if regEx and re.match(regEx, header_value):
escaped_value = header_value.replace('"', '\\"').replace(
"'", "\\'"
)
header_config += "add_header {} '{}';\n".format(
header_key, escaped_value
)
logger.debug("Added header {} to nginx config".format(header_key))
else:
logger.warning(
"Skipping {} config, value '{}' is not valid".format(
header_key, header_value
)
)
return header_config
|
class CSPFeedbackRecord:
"""
Feedback about a hash record from a CSP.
"""
# Which CSP has given this feedback?
source: str
# What does the CSP have to say about this hash
feedback_value: CSPFeedback
# What optional tags has the CSP added?
tags: t.List[str]
@classmethod
def from_dict(cls, d: dict) -> "CSPFeedbackRecord":
return cls(
source=d.get("source", None),
feedback_value=CSPFeedback(d.get("feedbackValue", None)),
tags=d.get("tags", []),
) |
''' Internal utility functions used by high level module '''
import sys
import inspect
import enum
import functools
def _must_be_callable(obj):
''' obj must be a callable '''
if not callable(obj):
raise ValueError('not a callable')
def _is_class_object(obj):
''' obj is a class based object? '''
return type(obj).__name__ not in ('function', 'method')
def _try_resolve_class(module, parts):
''' try resolving class object from its name '''
mod = sys.modules[module]
cls = None
for i, name in enumerate(parts):
if i == 0:
cls = getattr(mod, name)
else:
cls = getattr(cls, name)
return cls
def get_class(func):
''' extract class object of a callable (function or class-object)
returns None for top-level function, or function to resolve the
class object
Example:
def hello():
pass
class Sample:
def foo(self):
pass
assert get_class(hello) is None
assert get_class(Sample.foo)() == Sample
'''
_must_be_callable(func)
if _is_class_object(func):
return lambda: type(func)
# functions
parts = func.__qualname__.split('.')[:-1]
if not parts:
return None
if '<locals>' in parts:
if hasattr(func, '__self__'):
# bounded
self = func.__self__
if isinstance(self, type):
# class-method
return lambda: self
return lambda: type(self)
# we cannot resolve the class of unbounded local scope function
raise ValueError(f'class of nested unbound function {func.__qualname__}'
'cannot be resolved'
)
return functools.partial(_try_resolve_class,
module=func.__module__, parts=parts)
class FuncType(enum.IntEnum):
''' Function Type '''
PLAIN = 0 # plain function
STATIC_METHOD = 1 # @staticmethod of a class
CLASS_METHOD = 2 # @classmethod of a class
METHOD = 3 # normal self-bounded function of a class
CLASS_CALLABLE = 4 # A class-based callable object
def get_typeinfo(func):
''' get function type info
returns (FuncType, None or function to resolve class object)
'''
_must_be_callable(func)
if _is_class_object(func):
# class based callable object
return FuncType.CLASS_CALLABLE, lambda: type(func)
try:
cls = get_class(func)
if cls is None:
return (FuncType.PLAIN, None)
except ValueError:
# class of nested unbound function cannot be resolved
cls = None
bounded = inspect.ismethod(func)
if not bounded:
# either static-method or unbounded method
names = [*inspect.signature(func).parameters]
if len(names) == 0 or names[0] != 'self':
return (FuncType.STATIC_METHOD, cls)
return (FuncType.METHOD, cls)
# either class-method or bounded method
if isinstance(func.__self__, type):
return (FuncType.CLASS_METHOD, cls)
return (FuncType.METHOD, cls)
|
A Novel Embedded Capacitor Insulating Composite Material Using Benzoxazine Resin as Polymeric Matrix We report a novel polymer-ceramic composite of high dielectric constant for embedded capacitor application. The low cost polymeric matrix was benzoxazine resin and the high constant ceramic filler for the polymer composite was BaTiO3. The benzoxazine/BaTiO3 composite was prepared by the method of mixing. The dielectric constant, dissipation factor, volume resistivity and breakdown voltage of the composite were measured. Measurement results indicated that the particle size and the content of the BaTiO3 were affected strongly to the dielectric properties of the composite. The dielectric constant and dissipation of the composite were increased as particle sizes of the BaTiO3 powder were increased from 50nm to 1.8 mum. The volume resistivities and breakdown voltages of the composites were of comparative high as the particle sizes of the BaTiO3 powders were in the range of nanometer, and they were declined quickly with the particle sizes increasing from 50nm to 0.8 mum. Volume resistivities of the composites were declined continuously while the breakdown voltages tended to be stable as the particle sizes increasing continuously. The relation of the dielectric constant between the composite and the components was accorded with Lichtenecker logarithmic law in mixing. Effective dielectric constant of the BaTiO3 in the benzoxazine resin matrix was 283, lower than its intrinsic dielectric constant. A composite was prepared and it had good dielectric properties such as: high dielectric constant of 54, high volume resistivity of 1011 Omega.m, high breakdown voltage of 8kV/mm and low dissipation factor of 0.027.And a high dielectric constant glass cloth laminate applied in embedded capacitor was prepared with the composite resin. The laminate had good dielectric properties such as: high dielectric constant of 20, high volume resistivity of 10 11 Omega.m, high breakdown voltage of 8.9kV/mm, and low dissipation factor of 0.016.A new method of producing embedded capacitor with low cost industrially was explored |
from .base_formatter import BaseFormatter
class ListFormatter(BaseFormatter):
def __init__(self, object, inspector):
self.object = object
self.inspector = inspector
def format(self):
if len(self.object) == 0:
return '[]'
elif self.single_line():
return self.single_line_list()
else:
return self.multiple_lines_list()
def single_line_list(self):
list = self.printable_list(self.inspector.options['index'])
return self.colorize('[', None) + \
', '.join(list) + \
self.colorize(']', None)
def multiple_lines_list(self):
list = self.printable_list(self.inspector.options['index'])
return self.colorize('[\n', None) + \
',\n'.join(list) + '\n' + \
self.inspector.outdent() + \
self.colorize(']', None)
def printable_list(self, with_prefix = True):
data = self.object
list = []
for index, datum in enumerate(data):
width = self.left_width(data)
prefix = self.list_prefix(index, width) if with_prefix else self.inspector.indent()
list.append(self.inspector.increase_indentation(
lambda: self.build_colorized_list(datum, prefix)
))
return list
def build_colorized_list(self, datum, prefix):
return '{0}{1}'.format(prefix, self.inspector.awesomize(datum))
def left_width(self, data):
"""
return spaces required on the left of the printable list
e.g.
the printable list will be:
[
[0] 1,
[1] 2,
[2] 3
]
so, the spaces on the left is
indentation + length of the index (in string)
"""
if self.single_line():
return 0
return len(str(len(data) - 1))
def list_prefix(self, index, width):
return self.inspector.indent() + \
self.colorize('[{0}] '.format(str(index).rjust(width)), 'list')
|
Tuberculosis due to drug-resistant Mycobacterium bovis in pregnancy. We describe the management practices adopted in a case of pulmonary and extra-pulmonary tuberculosis caused by an isoniazid/pyrazinamide resistant strain of Mycobacterium bovis in a 26-week pregnant woman. She was initially treated with rifampin, isoniazid and ethambutol, pre-term delivery was induced and streptomycin was then added to the regimen. Screening of the new-born revealed no signs of either disease or infection. Isoniazid prophylaxis was not administered and the new-born was vaccinated and isolated from the mother for two months; however she continued to be fed with her mother's milk for the whole period. |
Developments in the scientific understanding of osteoporosis During the past 10 years we have experienced very significant developments in our understanding of bone biology, and this has improved our abilities to both diagnose and treat patients with osteoporosis. This review covers some of the significant discoveries in bone biology that have led to a better understanding of osteoporosis, including a few of the discoveries that have been translated into new therapies to treat patients with osteoporosis and the structural deterioration of patients with inflammatory arthritis. Introduction Bone is a mineralized tissue that has recognized mechanical functions, including protection and support for the internal organs and for locomotion. Bone tissue is constantly 'turning over', allowing bone to repair itself, for instance after a fracture, and to adapt to the mechanical loads that are placed on it. In the adult skeleton, the rate of bone turnover, collagen matrix, structure, geometry, and density all combine to determine the bone's overall mechanical competence. Defects in these parameters can result in diseases such as osteoporosis, osteopetrosis, osteogenesis imperfecta, and Paget's disease. The dynamic nature of the skeleton is achieved by a process of bone remodeling. Bone is continuously replaced during adult life through tightly coupled bone resorption by osteoclasts and bone formation by osteoblasts, as well as osteocytes within the bone matrix and bone lining cells that cover the bone surface. The coordinated action of these cells is described as the 'basic multicellular unit' (BMU). Within the BMU cellular activity is coupled; in principle the amount of bone that is removed is replaced. The remodeling cycle occurs continuously at discrete sites throughout the skeleton in response to mechanical and metabolic influences. Remodeling starts with the initiation of osteoclast formation, osteoclast-mediated bone resorption, and a reversal period. Then there is a longer period of bone formation mediated by osteoblasts, followed by the full mineralization of the newly formed bone matrix. There is now evidence to support that these bone cells communicate with each other and osteocytes embedded in the mineralized matrix. Apart from BMU cells, T lymphocytes, B lymphocytes, and neural cells also communicate with the bone cells. This review is limited to the advances that have been made in our understanding of bone biology and will include the differentiation and local regulation of bone cells. Osteoblasts Our understanding of osteoblast differentiation and local regulation has increased over the past 10 years through the discovery of the canonical Wnt signaling pathway. The Wnt family of glycoproteins represents a major signaling pathway that is involved in cellular differentiation. Secreted Wnt proteins act on target cells by binding to the frizzled and lowdensity lipoprotein receptor-related protein (LRP) complex on the cell surface. The binding signal is transduced to intracellular proteins including dishelved, glycogen synthase kinase-3, axin, adenomatous polyposis coli, and -catenin, which functions as a transcriptional regulator. If Wnt proteins are not present, then glycogen synthase kinase-3 constitutively phosphorylates the -catenin protein, which leads to degradation and this provides a mechanism to maintain a low concentration of -catenin in the cytoplasm of the cell. The binding of Wnt proteins act on the target cell by binding to frizzled receptors and their co-receptor LRP5/6 that stabilizes cytoplasmic -catenin protein, which in turn translocates to the nucleus and activates the transcription of target genes via transcription factors including lymphoid enhancer-binding factor and T-cell factors. There are also antagonists of the Wnt signaling pathway, which include secreted frizzled-related protein (SFRP)1, Wnt inhibitory factor (WIF)-1, dickkopf (DKK)-1, and sclerostin; these either bind to LRP5/6 or inactive LRP5/6, such that the Wnt signaling is stopped. The Wnt signaling pathway is well known in developmental biology and growth, and metastases of cancer, but the connection to the skeleton was not initially clear. However, a family was described that had a loss of function of Lrp5, which was known to be a co-receptor in the Wnt signaling pathway, members of which had low bone density (osteoporosis pseudoglyoma syndrome); another family was described with a gain of function of Lrp5, resulting in a high bone mass phenotype. These clinical observations have been confirmed in studies in which mice were generated that exhibited either no Lrp5 function or increased Lrp5 function; bone mass findings were similar. Also, mutations in the gene encoding sclerostin (Sost), an antagonist of Wnt signaling, resulted in a high bone mass disease (van Buchem disease or sclerostosis syndrome). Over-expression of DKK-1 induces osteopenia in mice, whereas deletion of a single allele of the DKK-1 gene leads to an increase in bone formation and bone mass. Increased production of DKK-1 by plasmacytoid cells in patients with multiple myeloma are responsible for the osteocytic lesions observed in that disease. Also, in patients with prostate and breast cancer bone metastasis, DKK-1 production has been reported to be responsible for development of osteolytic bone lesions in these diseases. The pathogenesis of glucocorticoid-induced osteoporosis may also involve increased expression of DKK-1, which suppresses osteoblastic differentiation through the Wnt pathway. We conducted a microarray on whole bone extracts from mice that were treated with glucocorticoids for 56 days and found that Wnt antagonists -including DKK-1, sclerostin, and WIF-1 -were upregulated from days 28 to 56. Thus, suppression of Wnt signaling may be responsible for part of the pathogenesis of prolonged suppression of bone formation after glucocorticoid administration. Concurrent treatment of glucocorticoid-treated mice with parathyroid hormone (PTH) for 28 days reversed the elevation of DKK-1 and was associated with increased osteogenesis. Secreted frizzled related protein-1 and bone formation SFRP1 is a soluble inhibitor of Wnt signaling. Its role in bone formation is now just being discovered. Adult mice deficient in sFRP1 exhibited increased trabecular bone accrual and resistance to age-related bone loss. Mice with over-expression of sFRP1 (sFRP1-transgenic mice) exhibited osteopenia with lower osteoblastogenesis and bone formation, with males being more severely affected than females. The reduced bone mass in sFRP1-transgenic mice was accompanied by evidence of reduced osteogenesis, with reduced alkaline phosphatase and mineralized nodule formation in vitro. In vitro osteoclastogenesis was also higher in sFRP1transgenic mice. sFRP1-transgenic mice treated for 2 weeks with high-dose human PTH (hPTH ) exhibited almost no increase in bone mass compared with wild-type mice. SFRP1 over-expression appears to counteract the PTH-induced increases in osteoblast differentiation and activity. Expression levels of osteogenic genes (RUNX2 and the genes encoding osterix and osteocalcin) were lower in sFRP1-transgenic mice treated with PTH, as compared with levels in wild-type mice. These data suggest that this Wnt signaling inhibitor not only reduced osteogenesis but also appeared to augment osteoclastogenesis, possibly through increased production of receptor activator of nuclear factor-B ligand (RANKL) by pre-osteoblasts and reduced production of osteoprotegerin (OPG) by mature osteoblasts. New studies that may expand our understanding of the Wnt signaling pathway and bone formation The discovery of mutations in the Wnt pathway -specifically mutations in LRP5, which is the co-receptor for Wnt proteins and is associated with a phenotype of low bone mass, namely osteoporosis pseudoglioma syndrome (OPPG) -led to the view that canonical Wnt signaling through the cell surface receptor LRP5 or LRP6 controlled osteoblast formation or action. Osteogenesis is stimulated by canonical Wnt signaling in a number of ways ( Figure 1). In the early stages of differentiation of mesenchymal stem cells to osteoblast precursors, Wnt signaling agonists direct these precursor cells toward osteogenesis and prevent the alternative differentiation of these stem cells toward adipocytes and chondrocytes through translocation of -catenin to the nucleus and activation of transcription of genes involved in osteogenesis. Findings in Lrp5 knockout mice support a further role for Wnt signaling in osteoblast function, because these mice exhibited reduced bone matrix deposition. Over-expression of -catenin can result in increased collagen production. Also, another osteogenic effect of Wnt signaling, namely that it reduced apoptosis of osteoblasts and osteocytes, has been reported. Despite the strong evidence to support the role played by LRP5 or LRP6 in bone formation, the evidence to support canonical Wnt signaling in osteoblasts was less clear. Mice null for Lrp5 did have low bone mass, which is similar to the clinical phenotype of OPPG. However, in mice null for catenin, mature osteoblasts had a normal phenotype but exhibited increased osteoclastogenesis, which did not support a role for -catenin in osteogenesis. This led to the hypothesis that LRP5 may control bone formation independent of Wnt/-catenin signaling. Investigators conducted microarray analyses of bone and other organ tissues from Lrp5 knockout mice and found that the gene encoding tryptophan hydroxylase (Tph1), a ratelimiting enzyme involved in serotonin synthesis, was highly expressed in the enterochromaffin cells of the duodenum, and serum serotonin levels were high compared with those in wild-type control animals. The investigators went on to demonstrate that LRP5 augmentation of bone formation and accrual of bone mass appeared to be through the inhibition of Tph1 expression and serotonin synthesis in enterochromaffin cells in the duodenum. Serotonin appears to inhibit osteoblast proliferation by binding to its receptor, 5-hydroxytryptamine receptor 1B, on the osteoblast surface. The investigators further demonstrated that the animals with mutations in Lrp5 (OPPG) have high circulating serotonin levels. A number of studies have reported that patients receiving serotonin re-uptake inhibitors have low bone mass compared with age-matched control individuals, suggesting that if circulating levels of serotonin are increased in these patients then they may have reduced bone formation. Although more work is needed in this area, these experiments have increased our understanding of how LRP5 may work to increase osteoblast proliferation, and provide new data to support a mechanism by which intestine and bone may communicate. A few years ago, the discovery of LRP5 as a disease with a clinical phenotype of low bone mass was the beginning of the research directed at elucidating how the Wnt signaling pathway regulates bone formation. However, this new work by Yadav and coworkers suggests that the influence of Wnt/LRP5 may be indirect and may partially work through the intestine. Osteocytes: key regulators of the skeletal response to mechanical loading and bone formation Over the past 10 years, our scientific understanding of osteocytes and their role in bone metabolism has significantly increased. The osteocyte, which is the most abundant cell type in bone, resides in the lacuna/canalicular system, and strong evidence supports its role in the control of local bone remodeling. These cells are nonproliferative terminally differentiated cells of the osteoblast lineage. They form an extensive network of canaliculi that connect these cells to each other, blood vessels, and the bone surface. The surface area of the lacuna/canalicular system is large -more than 100 times that of the trabecular bone surface. The canalicular system of communication for the osteocytes is similar to that of the nervous system, in that there are a large number of low activity cells connected through the canaliculi, and it is hypothesized to be an efficient way to transmit signals over long distances. The osteocytes are also surrounded within their lacunae by proteoglycans, which are hypothesized to assist in the amplification of fluid flow-derived mechanical signals. Each osteocyte has a cilium that extends from its cell cytoplasm, which may also translate the fluid flow signal to the osteocyte. It has long been known that mechanical stress induced by weight-bearing exercise increases osteoblast activity. However, the absence of mechanical stimulation resulting from immobilization or bed rest can cause rapid bone loss. Based on these findings, it has been postulated that osteocytes are mechano-sensitive cells and that the lacunae/ canaliculi carry the signaling molecules that are responsible for maintenance of bone structure and mass. The model has been proposed to explain how mechanical loading can induce the biochemical transmission that promotes bone formation and remodeling. During the 1960s a phenomenon was reported that was referred to as 'osteocytic osteolysis', in which large osteocyte lacunae were observed within the cortex and the trabeculae, in patients with hypophosphotemic rickets. This observation that the osteocyte can modify its microenvironment was not confirmed by other laboratories and was not validated until very recently. Our laboratory group studied Pathways for osteogenesis and osteoclastogenesis. Osteoblasts mature from mesenchymal stem cells to preosteoblasts. The Wnt signaling pathway antagonists (DKK-1, sclerostin, and SFRP1) and serotonin all inhibit osteogenesis. A number of cell types can synthesize Wnt signaling antagonists. Fibroblast-like synoviocytes from rheumatoid arthritis patients after stimulation with TNF-, and myeloma cells synthesize DKK-1 and osteocytes synthesize sclerostin. Osteoblasts also now are known to be the main controllers of osteoclastogenesis through the production of RANKL by preosteoblast cells. The antagonist of RANKL, OPG, is produced by mature osteoblasts and prevents RANKL from binding to its receptor, RANK, so that osteoclast maturation and activity are inhibited. DKK, dickkopf; OPG, osteoprotegerin; RANKL, receptor activator of nuclear factor-B ligand; SFRP, secreted frizzled-related protein; TNF, tumor necrosis factor. a mouse model of glucocorticoid-induced bone loss and reported some novel observations about osteocytes. Glucocorticoid treatment initially increased osteoclast maturation and activity, and this was followed by delayed but prolonged suppression of bone formation. Trabecular bone loss with glucocorticoid treatment was about 20% over 21 days. Analysis of gene expression from the bone revealed elevation of osteoclastogenic genes for the first 7 days of glucocorticoid treatment, followed by suppression of osteogenic genes, and an increase in dentin matrix protein-1, sclerostin, and other Wnt signaling inhibitors (DKK-1 and WIF). Interestingly, atomic force microscopy and raman microscopy of the trabecular surface from the individual trabeculae in glucocorticoid-treated mice demonstrated enlarged osteocyte lacunae and areas of low elastic modulus and low bone mineral. These findings suggested that glucocorticoid treatment was associated with changes in both bone remodeling and osteocyte metabolism, which may result in localized changes in bone strength at the bone surface and within bone tissue; this may begin to explain the increased bone fragility in patients receiving glucocorticoids. That the osteocyte can modify its microenvironment and enlarge the lacunae has been observed in the settings of prolonged estrogen deficiency in rats, hypophosphatemic rickets in mice, and lactating mice. However, we are not yet able to determine the stimuli that are responsible for the osteocyte's action. Currently, the three clinical conditions associated with enlarged osteocyte lacunae -namely hypophosphotemic rickets, lactation in mice, and glucocorticoids in mice -suggest that the lacunae may enlarge and contract depending on the need to mobilize calcium from the skeleton. Estimates of surface-based bone remodeling indicate that the number of osteoclasts that can occupy the bone surface is insufficient to maintain calcium balance in most rodents and animals. It is possible that the osteocyte, under certain physiologic conditions, can participate in mobilizing calcium from the skeleton to maintain calcium balance. The functional role of the osteocyte in bone The recent discovery of sclerostin is an example of an osteocyte-derived signal that can inhibit bone formation. Sclerostin is a Wnt signaling antagonist and is known to inhibit osteogenesis. Sclerostin gene expression has been reported to be responsive to mechanical stimulation, PTH treatment, and glucocorticoid treatment. Recent work has shown that when osteocytes produce sclerostin, it moves through the canaliculi into the bone marrow and appears to reduce osteoblast differentiation and bone formation through its inhibition of frizzled/LRP5/6 transmembrane signaling. Treatment with hPTH, an anabolic agent that stimulates bone formation, has been found to reduce sclerostin expression in osteocytes in animal models. Although rare, clinically observed diseases of sclerostin production -sclerosteosis and Van Buchem disease -are high bone mass disorders that have been linked to deficiencies in the SOST gene (which encodes sclerostin). Mice that are null for sclerostin have very high bone mass phenotypes, and treatment of osteopenic mice with anti-sclerostin antibody restored bone mass compared with that in control animals. Because sclerostin is produced in adults, primarily in osteocytes, and appears to inhibit bone formation through inhibition of Wnt signaling, this aspect of osteocyte biology may be very important for the development of an anabolic agent to treat osteoporosis. In a phase I clinical study in postmenopausal women treated with a number of doses of a sclerostin antibody, it was found that 85 days after the study subjects received the anti-sclerostin antibody, they had a dose-related increase of 60% to 100% in bone formation markers amino-terminal propeptide of type I procollagen (P1NP) and bonespecific alkaline phosphatase (BSAP), and a trend toward a dose-related decrease in a serum marker of bone resorption, namely C-telopeptide crosslink of type I collagen (CTX). Currently, phase II clinical trials with a monoclonal antibody directed against sclerostin are underway. This therapy, directed at the inhibition of osteocyte-derived sclerostin, may be a potential new anabolic therapy for patients with osteoporosis. Recent developments in our understanding of osteoclastogenesis Our understanding of the activation process in osteoclasts represents one of the most important discoveries in bone biology over the past 10 years. In summary, the activator of resorption, known as RANKL, is expressed by osteoblasts and binds to its receptor RANK on osteoclasts. RANKL is a member of the tumor necrosis family, and it is the most important of the cytokines involved in the final stages of osteoclast maturation and activity. Osteoclasts are derived from precursor cells belonging to the monocyte/macrophage lineage from bone marrow. In vitro studies have found that RANKL is expressed on immature osteoblasts in the presence of macrophage colony stimulating factor, activates RANK, induces the formation of osteoclasts through recruitment of osteoclast precursors in the marrow, and promotes their differentiation and fusion into multinucleated osteoclasts, which are responsible for resorption. Several cytokines are involved in the events that also promote osteoclast development, including macrophage colony-stimulating factor, which is essential for RANKL's action in osteoclastogenesis; IL-1, which is derived from osteoblasts and is a potent stimulator of RANKL; and IL-6, which is produced by osteoclasts in response to PTH and 1,25-dihydroxyvitamin D. T lymphocytes that produce IL-15 and IL-17 are also reported to support osteoclastogenesis. Although there are a number of systemic factors that initiate osteoclastogenesis, they all appear to work via the final common pathway of increasing production of RANKL by osteoblasts. The action of RANKL on osteoclasts is opposed by the soluble receptor OPG, which is secreted by osteoblasts, and stromal cells, which belong to the tumor necrosis factor (TNF) receptor family. The actions of RANKL and OPG on osteoclastogenesis were demonstrated in a number of experiments in mice. Mice over-expressing OPG had high bone mass and those without OPG had very low bone mass. Treatment of estrogen-deficient mice with a monoclonal antibody to OPG prevented bone loss, and mice without RANKL had high bone mass. These important studies demonstrated that the RANKL/RANK/OPG system is a key regulator of osteoclast maturation and activity. The preclinical work quickly led to clinical studies that initially evaluated OPG but then switched to an antibody to RANKL. The antibody to RANKL is now named AMG 162 or denosumab. A phase I clinical study demonstrated efficacy similar to that with OPG in terms of rapidly reducing biochemical markers of bone turnover. Clinical studies conducted to determine whether denosumab can prevent and treat osteoporosis have reported this agent to be very effective, and within 12 to 24 months it may be approved for the treatment of osteoporosis. In addition, rheumatoid arthritis (RA) patients on chronic stable methotrexate therapy with prevalent bone erosions were randomly assigned to treatment with AMG 162 or placebo for 1 year; the group treated with AMG 162 had significantly less structural deterioration than in the placebo group. These data suggest that a medication that is a potent inhibitor of osteoclast maturation and activity, such as AMG 162, may have utility in the prevention of generalized and localized bone loss and structural deterioration in patients with RA. One other important discovery about RANKL and osteoclastogenesis is related to the action of hPTH. Treatment of osteopenic animals and osteoporotic women and men is associated with a rapid increase in new bone formation, with biochemical markers of bone formation (P1NP, BSAP, and osteocalcin) increasing from baseline levels within a few weeks of therapy. This is followed by a slower increase in levels of bone resorption markers (CTX and C-telopeptide crosslink of type I collagen ). At about 6 months of treatment with hPTH, bone formation and resorption markers are elevated to around the same level. The mechanism responsible for the increased bone resorption with hPTH treatment was not immediately clear. However, when the PTH receptor was located on the osteoblast, we determined that PTH treatment augmented the maturation of osteoblasts to make bone, but also stimulated osteoblasts to produce RANKL that augmented osteoclastogenesis. The need for osteoclastogenesis it not completely clear but it may be that the bone resorption allows osteoblast growth factors stored within the bone matrix to be released into the bone marrow microenvironment (insulin-like growth factor-I, fibroblast growth factor-2 and transforming growth factor-), and these growth factors may provide continual stimulation of osteoblast differentiation and activity. Support for this observation comes from clinical studies in which the bone anabolic effects of PTH appeared to be blunted in the lumbar spine when PTH and a potent anti-resorptive agent were used in combination in both postmenopausal women and men with osteopenia. Osteoimmunology and the involvement of the Wnt signaling pathway in inflammatory bone destruction RA is characterized as an inflammatory arthritis in which joint inflammation results in bone deterioration. In RA, the proinflammatory cytokine TNF- is critical in driving inflammatory disease. TNF is mainly produced by macrophages, fibroblasts and dendritic cells, and in synovitis associated with RA, and it is responsible for activating osteoclastogenesis. Bone formation is affected in RA, and until very recently it was believed that TNF production reduced osteogenesis in the presence of the inflammatory arthritis. Diarra and coworkers utilized a transgenic mouse that overexpressed TNF-, which exhibits changes in the joints that are similar to those observed in human RA. It had been known for a few years that Wnt signaling proteins are expressed in inflamed rheumatoid joints, and Diarra and coworkers hypothesized that Wnt activation of osteogenesis might be inhibited by Wnt antagonists in the inflamed joint. They focused their work on DKK-1, which had been reported to be expressed in inflamed erosive joints. The investigators treated TNF-transgenic mice and two other mouse arthritis models with an antibody to DKK-1 and TNF, and demonstrated that these antibodies protected against bone erosions, thereby preventing structural deterioration. They also observed that osteophyte formation was more pronounced in the arthritic mice treated with the anti-DKK-1 antibody, and no effect on inflammation was observed. These observations led the investigators to conclude that inhibition of DKK-1 leads to increased osteogenesis and less osteoclastogenesis, with the latter being an indirect effect mediated by mature osteoblasts producing more OPG and less RANKL by pre-osteoblasts. This study by Diarra and coworkers was a landmark study, because they demonstrated that DKK-1, the Wnt signaling antagonist, can connect the immune system to bone metabolism. The paradigm now is that the pro-inflammatory cytokine TNF- induces the expression of DKK-1 from fibroblasts such as synoviocytes and other cells within the synovium, such that bone formation is inhibited in the presence of inflammatory arthritis. In addition, by preventing osteoblast maturation, pre-osteoblasts are able to produce more RANKL; and with less mature osteoblasts, less OPG is synthesized, which results in increased osteoclastogenesis. Another group of investigators carried this work further and collected synovium from patients with RA, and then treated these patients with TNF and found that in fibroblast-like synoviocytes (FLSs) gene expression of DKK-1 increased more than threefold, followed by modest elevations in IL-1 and IL-6 (as measured by quantitative reverse transcription polymerase chain reaction). To translate this observation to RA patients, they collected serum and synovial samples and they found that DKK-1 was elevated in serum and that DKK-1 expression was increased in FLS samples. However, DKK-1 expression was decreased in synovial samples from osteoarthritis patients. These studies are seminal to our understanding of inflammatory bone loss and lead us to hypothesize that, with the TNF--induced synovitis that accompanies RA, DKK-1, IL-1, and IL-6 are produced that are able to inhibit osteogenesis and accelerate osteoclastogenesis. When TNFtransgenic mice were treated with inhibitors of TNF and DKK-1, these agents prevented nearly all of the structural deterioration of bone and cartilage that accompanies RA. In RA patients it is possible that treatment with potent TNF-blocking agents reduce both the synovitis and the production of DKK-1, IL-1, and IL-6 by FLSs, thereby preventing some of the structural deterioration in the joints. These studies suggest that the Wnt signaling pathway, which is important in joint development, is also important in diseases of the joint. Further understanding of the Wnt signaling pathway in bone metabolism will provide new opportunities for treatment of RA. Conclusion This review highlights the developments in out scientific understanding of osteoporosis in the past 10 years. We believe, in the next 10 years, scientific advances in osteoporosis will improve both the prevention and treatment of this disease. Competing interests The authors declare that they have no competing interests. |
Adversarial Learning of Deepfakes in Accounting Nowadays, organizations collect vast quantities of accounting relevant transactions, referred to as 'journal entries', in 'Enterprise Resource Planning' (ERP) systems. The aggregation of those entries ultimately defines an organization's financial statement. To detect potential misstatements and fraud, international audit standards demand auditors to directly assess journal entries using 'Computer Assisted AuditTechniques' (CAATs). At the same time, discoveries in deep learning research revealed that machine learning models are vulnerable to 'adversarial attacks'. It also became evident that such attack techniques can be misused to generate 'Deepfakes' designed to directly attack the perception of humans by creating convincingly altered media content. The research of such developments and their potential impact on the finance and accounting domain is still in its early stage. We believe that it is of vital relevance to investigate how such techniques could be maliciously misused in this sphere. In this work, we show an adversarial attack against CAATs using deep neural networks. We first introduce a real-world 'thread model' designed to camouflage accounting anomalies such as fraudulent journal entries. Second, we show that adversarial autoencoder neural networks are capable of learning a human interpretable model of journal entries that disentangles the entries latent generative factors. Finally, we demonstrate how such a model can be maliciously misused by a perpetrator to generate robust 'adversarial' journal entries that mislead CAATs. |
<gh_stars>0
# -*- coding: utf-8 -*-
# Copyright 2021 Tampere University and VTT Technical Research Centre of Finland
# This software was developed as a part of the ProCemPlus project: https://www.senecc.fi/projects/procemplus
# This source code is licensed under the MIT license. See LICENSE in the repository root directory.
# Author(s): <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
"""
Contains class for a simulation platform component used to optimize economic dispatch
"""
from typing import Union, Any, Dict, List, Tuple
from datetime import timedelta
from dataclasses import asdict
from isodate import parse_datetime
from tools.tools import FullLogger
from tools.message.abstract import BaseMessage
from tools.message.status import StatusMessage
from tools.message.block import TimeSeriesBlock, ValueArrayBlock, QuantityBlock
from domain_messages.resource import ResourceStateMessage
from domain_messages.price_forecaster import PriceForecastStateMessage
from domain_messages.resource_forecast import ResourceForecastPowerMessage
from domain_messages.dispatch import ResourceForecastStateDispatchMessage
from domain_messages.InitCISCustomerInfo import InitCISCustomerInfoMessage
from domain_messages.Offer import OfferMessage
from domain_messages.Request import RequestMessage
from domain_messages.LFMMarketResult import LFMMarketResultMessage
from economic_dispatch.planner import EconomicDispatchFlexPlanner
from economic_dispatch.utils import Barrier
from economic_dispatch.simulation.economic_dispatch import EconomicDispatch
from economic_dispatch.simulation.dataclasses import OfferStorage, OfferBase, Offer, Congestion
from pyomo.opt import TerminationCondition
LOGGER = FullLogger(__name__)
# Max iterations in requests
REQ_MAX_ITER = 15.0
# min bid + REQ_MAX_ITER * bid resolution
def ad_to_timesteps(activation_time: str, duration: int, index: List[str]):
""" Takes timing parameters activation time and duration, and index. Returns
indicator for steps in index when the timing is active, and subset of index for those activated steps."""
timesteps = []
ad_index = []
activation_time = parse_datetime(activation_time)
stop_time = activation_time + timedelta(minutes=duration)
for ind in index:
time_index = parse_datetime(ind)
activated = activation_time <= time_index < stop_time
timesteps.append(activated)
if activated:
ad_index.append(ind)
return timesteps, ad_index
ED_STAGE = 1
FLEX_REQUEST_STAGE = 2
ED_READY_STAGE = 3
class EconomicDispatchFlex(EconomicDispatch):
"""
A simulation platform component that optimizes power production/consumption over a given horizon given the prices
and states.
"""
PLANNER = EconomicDispatchFlexPlanner
def __init__(self, scenario: Union[str, Dict],
param_topics: List[str],
dispatch_horizon: str,
dispatch_timestep: str,
dispatch_solver: str,
dispatch_topic: str,
resource_type: str,
market_id: str,
offer_topic: str,
commitment_time: str,
skip_open_offers: bool = False,
initialization_error: str = None,
):
super().__init__(scenario=scenario,
param_topics=param_topics,
dispatch_horizon=dispatch_horizon,
dispatch_timestep=dispatch_timestep,
dispatch_solver=dispatch_solver,
dispatch_topic=dispatch_topic,
resource_type=resource_type,
commitment_time=commitment_time,
initialization_error=initialization_error)
self._offer_topic = offer_topic
self._market_id = market_id
self._skip_open_offers = skip_open_offers
# TODO: change(?) so market_id can be a list
self._lfm_ready_barrier = Barrier([market_id])
self._lfm_result_count = {self._market_id: 0}
self._lfm_results_ready = {self._market_id: False}
self._latest_congestion = None
self._offer_storage = OfferStorage(size=self._num_of_timesteps)
self._accepted_offers = []
# Save requests received from LFM at start of epoch (before flexibility stage)
self._requests_before_flex = []
self.epoch_stage = None
self._request_to_process = False
@property
def epoch_stage(self):
return self._epoch_stage
@epoch_stage.setter
def epoch_stage(self, val):
self._epoch_stage = val
LOGGER.info("Epoch stage set to {!s}".format(self._epoch_stage))
def clear_epoch_variables(self) -> None:
"""
Clears all the variables that are used to store information about the received input within the
current epoch. This method is called automatically after receiving an epoch message for a new epoch.
"""
super().clear_epoch_variables()
self._lfm_ready_barrier.reset()
self._lfm_result_count[self._market_id] = 0
self._lfm_results_ready[self._market_id] = False
self._accepted_offers = []
self._requests_before_flex = []
self._request_to_process = False
self.epoch_stage = ED_STAGE
async def process_epoch_stage1(self) -> None:
"""
Handles the optimization and sends the results
"""
r = self.model.solve(level=1)
LOGGER.info("Solved {:s} level 1 with status {:s} and termination condition {:s}".
format(self.model.name, r.solver.status, r.solver.termination_condition))
results = self.model.results(level=1)
await self._send_results_message(results)
def _set_open_offers(self) -> None:
# get open offers and set them for stage 2 problem
start_time = self.get_time_index()[1] # first step dispatch set from stage 1
open_offers = self._offer_storage.get_open_offers(start_time, self._accepted_offers)
time_index = self.get_time_index()
for offer in open_offers:
timesteps, idx = ad_to_timesteps(
activation_time=offer.activation_time,
duration=offer.duration,
index=time_index
)
# if does not apply for our time range
if not any(timesteps):
continue
# stored reference to new time index
ref = {k: v for k, v in zip(offer.time_index, offer.real_power_reference)}
rp_ref = [ref[t] if t in idx else None for t in time_index]
result = {
"congestion_id": offer.congestion_id,
"customer_ids": offer.customer_ids,
"direction": offer.direction,
"real_power": offer.real_power,
"price": offer.price,
"timesteps": timesteps,
"real_power_ref": rp_ref,
}
self.model.add_open_offer(**result)
LOGGER.debug("Set {:d} open offers for level 2 model.".format(len(open_offers)))
async def process_epoch_stage2(self) -> None:
"""
Handles the optimization with flexibility request and sends the results
"""
if not self._skip_open_offers:
self._set_open_offers()
build_failed = False
try:
r = self.model.solve(level=2)
except:
LOGGER.debug("ProcessEpochStage2: Model build failed on level 2: sending zero offers")
build_failed = True
if not build_failed:
# Problem solved, results are available
LOGGER.info("ProcessEpochStage2: Solved {:s} level 2 with status {:s} and termination condition {:s}".
format(self.model.name, r.solver.status, r.solver.termination_condition))
if r.solver.termination_condition == TerminationCondition.infeasible:
# Problem infeasible?, results not available
LOGGER.info("ProcessEpochStage2: Problem not solved on level 2, sending 0 offers")
# Send zero offers for this congestion, do not save offers to OfferStorage
await self._send_zero_offer_message_no_request(congestion_id=self._latest_congestion.congestion_id,
activation_time=self._latest_congestion.activation_time,
duration=self._latest_congestion.duration,
direction=self._latest_congestion.direction)
self._request_to_process = False
return
results = self.model.results(level=2)
offer_results = results["offers"]
prices = results["prices"]
offers = []
count = len(offer_results)
congestion = self._latest_congestion
offer_base = OfferBase(
**asdict(congestion),
time_index=self.get_time_index(),
real_power_reference=results["real_power_ref"],
offer_count=count,
)
else:
# Problem not solved, results are not available
LOGGER.info("ProcessEpochStage2: Problem not solved on level 2, sending 0 offers")
# Send zero offers for this congestion, do not save offers to OfferStorage
await self._send_zero_offer_message_no_request(congestion_id=self._latest_congestion.congestion_id,
activation_time=self._latest_congestion.activation_time,
duration=self._latest_congestion.duration,
direction=self._latest_congestion.direction)
self._request_to_process = False
return
if count == 0:
# Zero offers
LOGGER.info("ProcessEpochStage2: Zero offers, sending 0 offers")
# Send zero offers for this congestion, do not save offers to OfferStorage
await self._send_zero_offer_message_no_request(congestion_id=self._latest_congestion.congestion_id,
activation_time=self._latest_congestion.activation_time,
duration=self._latest_congestion.duration,
direction=self._latest_congestion.direction)
self._request_to_process = False
return
for i, (offer_result, price) in enumerate(zip(offer_results, prices), 1):
offer_id = "{:s}-{:s}-{:d}".format(self._component_name, congestion.congestion_id, i)
offer = Offer(
**asdict(offer_base),
offer_id=offer_id,
real_power=offer_result,
price=price,
)
# print(json.dumps(asdict(offer), indent=3))
self._offer_storage.append(offer)
offers.append(offer)
# Send offers related to latest congestion
await self._send_offer_messages(self._latest_congestion.congestion_id)
self._request_to_process = False
async def process_epoch(self) -> bool:
"""
Handles the optimization and sends the results
"""
try:
if self.epoch_stage == ED_STAGE:
# ED (LFMMarketResult in problem constr)
LOGGER.info("ProcessEpoch: Starting ED calculations in epoch {:d}.".format(self._latest_epoch))
await self.process_epoch_stage1()
self.epoch_stage = FLEX_REQUEST_STAGE
# Process requests received before flexibility stage
for message in self._requests_before_flex:
# Process again only if request has not been calculated already
if self._offer_storage.check_congestion(message.congestion_id):
LOGGER.info("ProcessEpoch: Found congestion id: {cong_id}, sending zero offer".format(
cong_id=message.congestion_id))
await self._send_zero_offer_message(message)
else:
await self.process_request(message, '')
# ED w/ flexibility request
# Process if Request to be processed:
if self._request_to_process:
LOGGER.info("ProcessEpoch: Starting to process "
"request (before flex) in epoch {:d}.".format(self._latest_epoch))
await self.process_epoch_stage2()
# Empty requests to make sure not called again in this epoch
self._requests_before_flex = []
elif self.epoch_stage == FLEX_REQUEST_STAGE:
# ED w/ flexibility request
# Check if request already calculated
if self._offer_storage.check_congestion(self._latest_congestion.congestion_id):
LOGGER.info("ProcessEpoch: Found congestion id: {cong_id}, sending zero offer".format(
cong_id=self._latest_congestion.congestion_id))
await self._send_zero_offer_message_no_request(congestion_id=self._latest_congestion.congestion_id,
activation_time=
self._latest_congestion.activation_time,
duration=self._latest_congestion.duration,
direction=self._latest_congestion.direction)
else:
LOGGER.info("ProcessEpoch: Starting to process request in epoch {:d}.".format(self._latest_epoch))
await self.process_epoch_stage2()
except Exception as error:
description = "ProcessEpoch: Unable to process epoch {:d}: {!s}".format(self._latest_epoch, error)
LOGGER.error(description)
await self.send_error_message(description)
return False
if self.epoch_stage == ED_READY_STAGE:
return self._storages_received is None or all(self._storages_received.values())
else:
return False
async def process_request(self, message_object: RequestMessage, message_routing_key: str) -> None:
"""
Process Request message.
"""
if self.epoch_stage != FLEX_REQUEST_STAGE:
# Received offer before flex stage
LOGGER.debug("ProcessRequest: Received request {c_id} before flex stage".format(
c_id=message_object.congestion_id))
self._requests_before_flex.append(message_object)
return
# check if customer in our customer ids
customer_id_list = []
inv_customer_map = {val: key for key, val in self.model.customer_map.items()}
for customer_id in message_object.customer_ids:
LOGGER.debug("ProcessRequest: Checking {id1}".format(id1=customer_id))
if customer_id in inv_customer_map.keys() and \
inv_customer_map[customer_id] in self.model.network.unit_names:
LOGGER.debug("ProcessRequest: Customer {id1} found in network".format(id1=customer_id))
customer_id_list.append(customer_id)
if not len(customer_id_list) > 0:
LOGGER.debug("ProcessRequest: Flexibility request customer ids not among component's customer ids.")
await self._send_zero_offer_message(message_object)
return
self._latest_congestion = Congestion(
congestion_id=message_object.congestion_id,
customer_ids=customer_id_list,
activation_time=message_object.activation_time,
duration=int(message_object.duration.value),
direction=message_object.direction
)
timesteps, _ = ad_to_timesteps(
activation_time=message_object.activation_time,
duration=int(message_object.duration.value),
index=self.get_time_index()
)
LOGGER.debug("ProcessRequest: Flexibility request timesteps: {timelist}".format(timelist=timesteps))
# if does not apply for our timerange
if not any(timesteps):
LOGGER.debug("ProcessRequest: Flexibility request not in component's current time range")
await self._send_zero_offer_message(message_object)
return
request = {
"customer_ids": customer_id_list,
"direction": message_object.direction,
"real_power_min": message_object.real_power_min.value,
"real_power_req": min([message_object.real_power_request.value,
message_object.real_power_min.value + message_object.bid_resolution.value *
REQ_MAX_ITER]),
"bid_resolution": message_object.bid_resolution.value,
"timesteps": timesteps,
}
if request["real_power_req"] != message_object.real_power_request.value:
LOGGER.debug("ProcessRequest: Modified request value to ensure iteration is not too large!!")
# Check to see if request already handled
if not self._offer_storage.check_congestion(message_object.congestion_id):
self.model.set_request(**request)
else:
LOGGER.info("ProcessRequest: Request {cong_id} already handled".format(
cong_id=message_object.congestion_id))
await self._send_zero_offer_message(message_object)
self._request_to_process = True
LOGGER.info("ProcessRequest: Set flexibility request from {:s}".format(message_object.source_process_id))
async def process_lfm_market_result(self, message_object: LFMMarketResultMessage, message_routing_key: str) -> None:
"""
Process LFMMarketResult message.
"""
market_id = message_object.source_process_id
if market_id != self._market_id:
return
if message_object.result_count == 0:
self._lfm_results_ready[market_id] = True
LOGGER.info("ProcessLFMMarketResult: LFMMarketResult from "
"{:s} with count 0 processed.".format(message_object.source_process_id))
return
congestion_id = message_object.congestion_id
offer_id = message_object.offer_id
offer = self._offer_storage.get(offer_id)
if offer is None:
LOGGER.debug("ProcessLFMMarketResult: Offer {:s} not found".format(str(offer_id)))
# Check still to see if all received
# All lfm results received at start of epoch?
self._lfm_result_count[market_id] += 1
if self._lfm_result_count[market_id] == message_object.result_count:
self._lfm_results_ready[market_id] = True
return
self._accepted_offers.append(offer_id)
# All lfm results received at start of epoch?
self._lfm_result_count[market_id] += 1
if self._lfm_result_count[market_id] == message_object.result_count:
self._lfm_results_ready[market_id] = True
time_index = self.get_time_index()
timesteps, idx = ad_to_timesteps(
activation_time=message_object.activation_time,
duration=int(message_object.duration.value),
index=time_index
)
# if does not apply for our timerange
if not any(timesteps):
LOGGER.debug("ProcessLFMMarketResult: LFMMarketResult not in component's current time range")
return
rp = message_object.real_power
if isinstance(rp, QuantityBlock):
real_power = rp.value
elif isinstance(rp, TimeSeriesBlock):
# TODO: for now only constants allowed (value from first of series)
real_power = rp.series["Regulation"].values[0]
# stored reference to new time index
ref = {k: v for k, v in zip(offer.time_index, offer.real_power_reference)}
rp_ref = [ref[t] if t in idx else None for t in time_index]
result = {
"congestion_id": congestion_id,
"customer_ids": message_object.customerids,
"direction": message_object.direction,
"real_power": real_power,
"price": message_object.price.value,
"timesteps": timesteps,
"real_power_ref": rp_ref,
}
self.model.add_lfm_result(**result)
LOGGER.info("ProcessLFMMarketResult: Added LFMMarketResult from {:s}".format(message_object.source_process_id))
async def process_customer_info(self, message_object: InitCISCustomerInfoMessage, message_routing_key: str) -> None:
""" Process CustomerInfo message. """
customer_ids = message_object.customer_id
LOGGER.debug("ProcessCustomerInfo: Customer ids: {cust_list}".format(cust_list=customer_ids))
resource_ids = message_object.resource_id
LOGGER.debug("ProcessCustomerInfo: Resource ids: {res_list}".format(res_list=resource_ids))
self.model.update_customer_ids({r: c for c, r in zip(customer_ids, resource_ids)})
LOGGER.debug("ProcessCustomerInfo: Customer map: {cust_map}".format(cust_map=self.model.customer_map))
LOGGER.info("ProcessCustomerInfo: Customer ids from {:s} updated.".format(message_object.source_process_id))
async def process_lfm_ready(self, message_object: StatusMessage, message_routing_key: str) -> None:
"""
Process ready message from LFM.
"""
self._lfm_ready_barrier.process_arrive(message_object.source_process_id)
# after dispatch epoch is ready when all lfms are ready
if self._lfm_ready_barrier.pass_state and self._dispatch_sent:
LOGGER.info("ProcessLFMReady: All LFM ready messages have been received for epoch {:d}".format(
self._latest_epoch))
self.epoch_stage = ED_READY_STAGE
async def all_messages_received_for_epoch(self) -> bool:
"""
Returns True, if all the messages required to start the processing for the current epoch.
Checks only that all the required information is available.
"""
if self.epoch_stage == ED_STAGE:
# process if all inputs received
return self.model.ready_to_solve(level=1) and all(self._lfm_results_ready.values())
elif self.epoch_stage == FLEX_REQUEST_STAGE:
# process at new request
return self._request_to_process
elif self.epoch_stage == ED_READY_STAGE:
# process -> check epoch ready condition
return True
# error, shouldn't get here anyway if stages handled correctly
async def general_message_handler(self, message_object: Union[BaseMessage, Any],
message_routing_key: str) -> None:
"""
Forwards the message handling to the appropriate function depending on the message type.
Assumes that the messages are not of type SimulationStateMessage or EpochMessage.
"""
if isinstance(message_object, PriceForecastStateMessage):
LOGGER.debug("Received {:s} message from topic {:s}".format(
message_object.message_type, message_routing_key))
await self.process_prices(message_object, message_routing_key)
elif isinstance(message_object, ResourceForecastPowerMessage):
LOGGER.debug("Received {:s} message from topic {:s}".format(
message_object.message_type, message_routing_key))
await self.process_resource_forecast(message_object, message_routing_key)
elif isinstance(message_object, ResourceStateMessage):
LOGGER.debug("Received {:s} message from topic {:s}".format(
message_object.message_type, message_routing_key))
await self.process_states(message_object, message_routing_key)
elif isinstance(message_object, LFMMarketResultMessage):
LOGGER.debug("Received {:s} message from topic {:s}".format(
message_object.message_type, message_routing_key))
await self.process_lfm_market_result(message_object, message_routing_key)
elif isinstance(message_object, InitCISCustomerInfoMessage):
LOGGER.debug("Received {:s} message from topic {:s}".format(
message_object.message_type, message_routing_key))
await self.process_customer_info(message_object, message_routing_key)
elif isinstance(message_object, StatusMessage):
LOGGER.debug("Received {:s} message from topic {:s}".format(
message_object.message_type, message_routing_key))
await self.process_lfm_ready(message_object, message_routing_key)
elif isinstance(message_object, RequestMessage):
try:
LOGGER.debug(
"Received {:s} message from topic {:s}".format(message_object.message_type, message_routing_key))
await self.process_request(message_object, message_routing_key)
except Exception:
pass
else:
LOGGER.debug("Received unknown message: {:s}".format(str(message_object)))
if isinstance(message_object, StatusMessage) and (message_object.source_process_id != self._market_id or
message_object.epoch_number == 0):
LOGGER.debug("Ignored status message for epoch {:d} from {:s}".format(self._latest_epoch,
message_object.source_process_id))
elif not await self.start_epoch():
LOGGER.debug("Waiting for other required messages before processing epoch {:d}".format(
self._latest_epoch))
async def _send_results_message(self, results):
"""
Sends a Dispatch message.
"""
result = self._get_result_message(results)
self._dispatch_sent = True
LOGGER.debug(str(result))
await self._rabbitmq_client.send_message(self._result_topic, result.bytes())
def _get_result_message(self, results) -> ResourceForecastStateDispatchMessage:
"""
Creates new dispatch message and returns it.
Returns None, if there was a problem creating the message.
"""
dispatch = {}
for name, values in results.items():
series = {"RealPower": ValueArrayBlock(Values=values, UnitOfMeasure="kW")}
dispatch[name] = TimeSeriesBlock(TimeIndex=self.get_time_index(), Series=series)
message = ResourceForecastStateDispatchMessage(
SimulationId=self.simulation_id,
Type=ResourceForecastStateDispatchMessage.CLASS_MESSAGE_TYPE,
SourceProcessId=self.component_name,
MessageId=next(self._message_id_generator),
EpochNumber=self._latest_epoch,
TriggeringMessageIds=self._triggering_message_ids,
Dispatch=dispatch
)
return message
async def _send_offer_messages(self, searchCongestionId=None):
"""
Sends a Offer message.
"""
if searchCongestionId is None:
offers, market_ids = self._get_offer_messages()
else:
offers, market_ids = self._get_offer_messages(searchCongestionId)
for offer, market_id in zip(offers, market_ids):
await self._rabbitmq_client.send_message(self._offer_topic + "." + market_id, offer.bytes())
def _get_offer_messages(self, searchCongestionId=None) -> Tuple[List[OfferMessage], List[str]]:
"""
Creates new offer message and returns it.
Returns None, if there was a problem creating the message.
"""
messages = []
market_ids = []
if searchCongestionId is None:
# Offers stored this epoch
offers = self._offer_storage.latest(full_step=True)
else:
# Offers stored for this congestion id but not accepted
offers = self._offer_storage.get_congestion_offers(searchCongestionId, self._accepted_offers)
for offer in offers:
_, time_index = ad_to_timesteps(offer.activation_time, offer.duration, self.get_time_index())
rp_list = [offer.real_power for _ in time_index]
rp_ts_block = TimeSeriesBlock(time_index, {"Regulation": ValueArrayBlock(rp_list, "kW")})
message = OfferMessage(
SimulationId=self.simulation_id,
Type=OfferMessage.CLASS_MESSAGE_TYPE,
SourceProcessId=self.component_name,
MessageId=next(self._message_id_generator),
EpochNumber=self._latest_epoch,
TriggeringMessageIds=self._triggering_message_ids,
ActivationTime=offer.activation_time,
Duration=offer.duration,
Direction=offer.direction,
RealPower=rp_ts_block,
Price=offer.price * sum(rp_ts_block.series["Regulation"].values),
# Price to EUR (offer.price = EUR/kWh)
CongestionId=offer.congestion_id,
CustomerIds=offer.customer_ids,
OfferId=offer.offer_id,
OfferCount=offer.offer_count,
)
market_id = self._market_id
messages.append(message)
market_ids.append(market_id)
return messages, market_ids
async def _send_zero_offer_message(self, message_object: RequestMessage):
"""Sends offer message with zero OfferCount and zero customers as reply to provided request"""
message = OfferMessage(
SimulationId=self.simulation_id,
Type=OfferMessage.CLASS_MESSAGE_TYPE,
SourceProcessId=self.component_name,
MessageId=next(self._message_id_generator),
EpochNumber=self._latest_epoch,
TriggeringMessageIds=self._triggering_message_ids,
ActivationTime=message_object.activation_time,
Duration=message_object.duration,
Direction=message_object.direction,
RealPower=TimeSeriesBlock([message_object.activation_time], {"Regulation": ValueArrayBlock([0], "kW")}),
Price=0.0,
CongestionId=message_object.congestion_id,
CustomerIds=None,
OfferId="{:s}-{:s}-{:d}".format(self._component_name, message_object.congestion_id, 0),
OfferCount=0
)
await self._rabbitmq_client.send_message(self._offer_topic + "." + self._market_id, message.bytes())
async def _send_zero_offer_message_no_request(self, congestion_id: str,
activation_time: str,
duration: int,
direction: str = OfferMessage.ALLOWED_DIRECTION_VALUES[0]):
"""Sends offer message with zero OfferCount and zero customers as reply to provided request"""
message = OfferMessage(
SimulationId=self.simulation_id,
Type=OfferMessage.CLASS_MESSAGE_TYPE,
SourceProcessId=self.component_name,
MessageId=next(self._message_id_generator),
EpochNumber=self._latest_epoch,
TriggeringMessageIds=self._triggering_message_ids,
ActivationTime=activation_time,
Duration=duration,
Direction=direction,
RealPower=TimeSeriesBlock([activation_time], {"Regulation": ValueArrayBlock([0], "kW")}),
Price=0.0,
CongestionId=congestion_id,
CustomerIds=None,
OfferId="{:s}-{:s}-{:d}".format(self._component_name, congestion_id, 0),
OfferCount=0
)
await self._rabbitmq_client.send_message(self._offer_topic + "." + self._market_id, message.bytes())
|
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Routines that are implemented in assembly in asm_{amd64,386,arm,arm64}.s
// +build ppc64 ppc64le
package runtime
import _ "unsafe" // for go:linkname
func cmpstring(s1, s2 string) int {
l := len(s1)
if len(s2) < l {
l = len(s2)
}
for i := 0; i < l; i++ {
c1, c2 := s1[i], s2[i]
if c1 < c2 {
return -1
}
if c1 > c2 {
return +1
}
}
if len(s1) < len(s2) {
return -1
}
if len(s1) > len(s2) {
return +1
}
return 0
}
//go:linkname bytes_Compare bytes.Compare
func bytes_Compare(s1, s2 []byte) int {
l := len(s1)
if len(s2) < l {
l = len(s2)
}
for i := 0; i < l; i++ {
c1, c2 := s1[i], s2[i]
if c1 < c2 {
return -1
}
if c1 > c2 {
return +1
}
}
if len(s1) < len(s2) {
return -1
}
if len(s1) > len(s2) {
return +1
}
return 0
}
|
AVQ&A Welcome back to AVQ&A, where we throw out a question for discussion among the staff and readers. Consider this a prompt to compare notes on your interface with pop culture, to reveal your embarrassing tastes and experiences.
This week’s question is from our copy editing team:
What pop culture has made you cry at particularly embarrassing moments?
Laura M. Browning
In fourth grade, I looked forward to DEAR time (Drop Everything And Read), in which we had 15 glorious minutes after recess to read whatever we wanted. As I was also a dog lover, I had picked up Wilson Rawls’ Where The Red Fern Grows, about a boy and his two hunting dogs. My own dog, Molly, had died within the previous year, which left me devastated, and I buried my sorrow in the immense “dog-and-kid-lit” section at the library. I’d torn through Where The Red Fern Grows, and had just a little bit saved for this particular DEAR time. As I neared the end of the book, I was unable to control myself as the tears came—and oh how they came—but being 9, I was also too embarrassed to get up and ask for permission to leave the classroom. So I flipped up the top of my desk, rested my head on my arms inside my desk, and sobbed. I’m sure nobody noticed.
Advertisement
Marah Eakin
Someone should have told me that reading The Fault In Our Stars on an airplane wasn’t really the best idea, because that shit was rough. I literally bawled through much of John Green’s novel on a flight earlier this year, and while it was certainly cathartic, it might have been a little weird for the strange woman sitting next to me for two or three hours. (For some reason, my husband was in another row, meaning he couldn’t even throw a thin airline blanket over my ugly cry face.) When I think about it now, I wonder why I didn’t just close the book and stop reading the second I felt the tears coming—but I guess that’s a testament to Green’s work and the book’s compulsive nature. I just had to know what happened to Hazel and Gus and was willing to endure abject public humiliation to find out.
Sonia Saraiya
Fifteen years ago now, when I went to see Gladiator in theaters, I’m pretty sure that I didn’t even want to go—my mother might have wanted to see it, or my dad, who knows. I went into the film indifferent to the charms of Russell Crowe and entirely ignorant to the history of ancient Rome. I somehow managed to cry three separate times during an action film that is incredibly inaccurate and serves mostly to showcase the weird and wonderful acting skills of Joaquin Phoenix. Even now when I watch it I’m inexplicably moved; residual effects of being severely brainwashed in my impressionable youth. Apparently nothing tugs at my heartstrings like a dude bro-ing out in the name of what is good and right in Rome.
Advertisement
Becca James
I view pop culture as cheap therapy. I’m normally stoic, or so I like to think, but give me an emotional movie or television scene set to just the right music, and I’m crying. Put me alone in a car with Iron & Wine’s nine-plus-minute epic “The Trapeze Swinger,” and I’m sobbing. Sit me in front of a computer that’s playing select Best Actress Oscar acceptance speeches, and I’m blubbering. Most often, the emotion is probably tied to something else, but nonetheless, I take the opportunity for release and don’t find it too embarrassing. After all, I’m alone in all these situations. Except for that time I wasn’t and instead was accompanied by my best friend and my boyfriend at the time when I began bawling almost hysterically in my living room. The cause? The 100th episode of Gossip Girl, “Blair’s Royal Wedding.” It’s bad enough I was 23 and watching this show, but when I saw the scene where Louis says, “From this moment forward, there is nothing between us but a contract…” and goes on to explain what a sham of a marriage this will be throughout the couple’s first dance, I lost it. Meanwhile, the two gentlemen in the room sort of nervously smiled while I worked though my apparent fear of an utterly hopeless marriage. Did I mention the relationship with my boyfriend was relatively new? Yeah, I’m a charmer all right.
Josh Modell
I’m not entirely sure this is embarrassing, but embarrassment was surely part of the emotional mix. I saw Dancer In The Dark at the beautiful Oriental Theatre in Milwaukee. As a fan of Breaking The Waves, I should’ve known it wouldn’t exactly have a happy ending, but as anyone who’s seen it knows, it’s more than a little bleak—a fact compounded by its lovely songs. I was with my very dear, very emotionally reserved-when-not-drinking friend Mike, who got up after the credits and headed to the bathroom, I assumed to compose himself and avoid conversation. I stood in the lobby trying to keep it together when out of the same theater came a friendly acquaintance/local bartender. We knew each other well enough that it would’ve been awkward not to say hi, so she came over, and we both basically just burst into tears and hugged—I’m not sure there were even any words exchanged. I think they should put that on the poster instead of a critic’s quote: “So emotionally mortifying that people break down and embrace afterward!”
Advertisement
Erik Adams
In the way-back times of 2010, I wrote about losing my composure during an in-flight screening of Pixar’s Up, but I left out a lot of the specifics. For instance: I’ve always seen a lot of myself (anxious, head-in-the-clouds, bespectacled) and my wife (adventurous, artistic, determined) in the young versions of Carl and Ellie Fredrickson. The fateful trip, meanwhile, took place on Thanksgiving 2009—less than two months before our wedding, and on one of the last major holidays we’d ever spend apart. But here’s the kicker: A cartoon made me—a grown adult about to enter into the very adult realm of matrimony—weep while I was seated next to a uniformed soldier, presumably on leave and headed home to family of his own. I got all post-modern emotional next to a living, breathing symbol of old-school stars-and-stripes masculinity on American Thanksgiving, and while I’m not truly ashamed about it, we must’ve made a strange tableau for the people in the rows ahead of us.
Jason Heller
Five years ago I found myself broke, depressed, and standing at a crossroads. I’d just spent three years as The A.V. Club’s Denver City editor, a job I walked away from in order to focus on my writing—specifically my insane ambition to become a novelist. Freelancing wasn’t paying the bills, so I fell back on my first vocation: warehouse worker. I got a job pulling four 10-hour shifts a week at a warehouse in the middle of nowhere, a gig that required a long commute by bus plus nearly a mile walk to and from the bus stop each day. I started this job at the beginning of winter, so I made those long trudges through a snow-blanketed industrial wasteland. I only listened to two albums: One of them was Kate Bush’s Hounds Of Love. In my defense, it took at least a month before I cried to it—mostly because of one beautifully brutal line in the album’s title track: “I’ve always been a coward.” It’s the softest knife your gut could ever bear, and Bush delivers it with a merciless twist of the wrist. I needed that. I quit the warehouse after four months; within two years I was holding a copy of my first book. But whenever I hear Hounds Of Love today, which is gladly and often, part of me still feels like I’m making that long, cold, motherfucking walk in the opposite direction of the things I love. (FYI: The second album was Metallica’s Ride The Lightning. So basically I had two settings that winter: crying or air-guitaring.)
Carrie Raisler
Marah and I obviously got a similar “bad idea” memo (except I was a bit luckier in that I watched The Fault In Our Stars movie on the plane after having previously read the book—knowing what was coming mitigated some of the potential sobbing, I think). But my real, embarrassing, wracking sob moment came from an altogether different book-turned-movie: Atonement. I went into book not knowing anything about the story, and had I known what was coming I definitely wouldn’t have kept reading it in the middle of Tampa International Airport. I especially wouldn’t have kept reading through that part. (You know the part.) When I realized the story Ian McEwan was actually telling, I burst into immediate, loud sobs and had to quickly gather all of my carry-on items and hightail it to the bathroom to cry in peace, consoled by the comfort of a dirty public toilet. The people sitting around me when I fled the scene probably thought I just found out a loved one died, but the only thing that died that day was my dignity.
Advertisement
Molly Eichel
I have always had this weird pride about never crying at movies. That is, if I’m watching them sober. When Indiana Jones And The Kingdom Of The Crystal Skull hit theaters, I was but a poor college senior looking ahead to a very low paying job in journalism. Going to the movies was a special occasion that I found much more productive if I got shit-faced during the film. As a kid who was straight-up obsessed with Indiana Jones, I was so goddamned excited about this movie. I bought the biggest, best bottle of whiskey I could afford (let’s be honest, it was probably Bankers Club). So when Marion Ravenwood and Indiana Jones got married at the end, I immediately burst into heavy sobs, much to the confusion of my best friend. It was all I had ever wanted as a little girl! Indy and Marion getting married! This was my dream! Somewhere in the bowels of my Facebook are pictures of me smiling outside the theater with eyeliner streaming down my face. I remember raving that it was the best movie I’d ever seen. I watched it again later. I was wrong.
Caroline Siede
The better question: “What pop culture hasn’t made me cry in some embarrassing way?” I think my lowest point, however, came when I had an emotional breakdown while watching the Katherine Heigl rom-com 27 Dresses. It was during a family movie night so the location wasn’t particularly embarrassing, but really, there’s no non-humiliating time to start sob-crying at a Heigl vehicle. It wasn’t the romance that got to me, however; it was the scene in which Heigl’s self-absorbed little sister (played by Malin Akerman) cuts up their dead mom’s wedding dress to refashion it into her own. I really related to Heigl’s competent but bottled-up character (although not said character’s love of weddings), and the idea that this item she cherished was gone forever was just too much for my little heart to bear. I’ve since been able to watch the film without crying, but I always grab some tissues when it comes on TV lest I need to quickly hide the extent of my emotional instability from confused friends.
Advertisement
Dennis Perkins
Ten years ago now, I saw an ex for lunch. Ruffled by the experience as ever, I went to a matinee, not caring much what I saw. In my—or the universe’s—wisdom, I ended up at the Nickelodeon Cinema in Portland (Maine) just in time to see Eternal Sunshine Of The Spotless Mind. Smooth move, universe. Watching Jim Carrey and Kate Winslet’s relationship be born, die, and born again, seemingly forever, was a kick in the already-sore guts, sure. But it was Beck that really gutted me, his cover of The Korgis’ “Everybody’s Gotta Learn Sometime” echoing in my head as I stumbled out into the dying light of a shitty, confusing day, avoiding the eyes of my fellow moviegoers and then the people on the street until I found myself on the mercifully sheltered steps of a closed bank. (To this day, I don’t know how I crossed the four-way intersection to get there without getting splattered.) With the movie and the song echoing in my head, I sat there and wept until full dark, the mournful chorus of the song exhorting me to learn a lesson I knew I never would.
Mike Vago
As an adult, only three things have made me cry. Witnessing the birth of my two children. Visiting ground zero for the first time after the World Trade Center was destroyed. And every damn time I see It’s A Wonderful Life. I’ve had to excuse myself more than one family gathering over the years because something was in my eye. Yes, the ending gets me—the community George Bailey has made sacrifice after sacrifice for coming together to lift him up in his hour of need? You’d have to be a warped, frustrated old man indeed to not feel a pull on your heartstrings. But what really gets me is the scene at the grave—“Every man on that transport died, George! Harry wasn’t there to save them, because you weren’t there to save Harry!” The film’s timeless messages—the importance of community, the toll selflessness can take, and the way our good deeds ripple outward in unexpected ways—all hit home powerfully in that one moment. By the time George begs Clarence to take him back to his wife and children, he’s not the only one sobbing.
Advertisement
Jesse Hassenger
Generally, I’m not embarrassed to cry at movies; I’m usually impressed, because most movies that make me cry have to do it the same way that movies make me laugh the loudest: by surprising me into it. Maybe I should not have been surprised that About Time could push those buttons; it was clearly designed as a tearjerker with a father-son hook, and I was watching it less than a year after my father died. But the first hour of the movie does a splendid job lowering expectations: it’s basically a riff on The Time Traveler’s Wife, only with writer-director Richard Curtis doing his late-period cutesy shtick. This means it has to involve a faux-everyman figure looking down on all the crazy quirky colorful sidekicks in his life while pursuing a romantic relationship involving superficial love-at-first-sight pablum. But after a lot of pointless throat-clearing and unfunny comedy, About Time shifts gears to become a story about the specific implications of time travel on the faux-everyman’s family. The father-son relationship between Domhnall Gleeson and Bill Nighy moves to the forefront, and while it’s idealized and possibly treacly, the movie’s ideas about how one might use time travel to cheat loss, only to re-experience it in a different way, really hit me. It doesn’t hurt that Nighy is an effortlessly charming actor, or that I’m a sucker for a good time travel story (even, apparently, for one that takes half its running time to find its footing). Or rather, it does hurt: Not only was I suddenly choking back sobs at a movie that I had been regarding with some ill will, I was doing so at a press screening, which tends to be a somewhat reserved environment. I didn’t feel judged, but I did feel pretty silly. I guess that’s Curtis’ payback for my ability to sit stone-faced through Love Actually.
Caroline Framke
The first job I got when I moved to Los Angeles involved watching a metric ton of television (before you get jealous, none of it was any good). As the new girl, I was obviously trying to play it cool and prove I was someone worth knowing. It lasted about a week—and then every single show I had to watch started featuring commercial breaks with the trailer for the Winnie The Pooh movie. Winnie The Pooh is to me what I suspect Peter Pan is for others: a poignant story of childhood and the loss of pure imagination that comes with adulthood. That shit makes me feel things I’d rather never feel (you know, like feelings). The Winnie The Pooh trailer uses Keane’s “Somewhere Only We Know,” a treacly song that would never usually affect me, but in context of Christopher Robin growing up and over the Hundred Acre Wood, the lyrics, “I’m getting old and I need something to rely on / So if you have a minute why don’t we go somewhere only we know?” suddenly wrenched my guts out. So I’m sitting at this new job, trying desperately to keep it together, but I’m crying and I’m crying and my new coworkers are just dying laughing. From then on, all any of them had to do to get me to tear up was blast that stupid Keane song. So much for staying cool.
Zack Handlen
I’m with Dennis; break-ups mess with your head. A while back I was at work, and feeling kind of glum about someone, and I decided the best way to deal with the bad feeling was to try and overload it—to force myself to feel as much of it as possible in as short amount of time as possible, in hopes I would burn out a circuit somewhere and everything would go numb. (I use this approach a lot. I’m not very bright.) To that end, I loaded up the most potentially devastating, and immediately relevant, movie clip I could think of: “When She Loved Me,” from Toy Story 2. In context, it’s a montage about a toy whose child grows up and leaves her behind, scored to a song by Randy Newman sung by Sarah McLachlan. As a simple, direct expression of what it feels like to have your heart broken with no real hope of recovery, it’s powerful even if you aren’t in a vulnerable state. In my mood at the time, it was a bit like dousing a very lonely fire with some existential kerosene. I ended up sobbing at my desk like an absolute lunatic. Fortunately I was working in the basement, so no one noticed.
Will Harris
I can get lost in a movie at the drop of a hat and I’m a sucker for sentimentality, so you can only imagine how many times that combination has led me to sniffle and suggest that there’s clearly some problem with the air conditioning, but I was embarrassed by the unexpectedly intense wave of emotion that hit me at the end of The Mist. Perhaps I can lay part of the blame on the fact that Frank Darabont added a new ending that wasn’t in the original novella, but that’d be a cop-out: The real reason is that I was still a relatively new father—my daughter was only 2 at the time—and the combination of Thomas Jane’s character trying to save his friends and his son from a horrific death, only to realize that he couldn’t follow suit, and that his actions turned out to have been wholly unnecessary, and then contemplating how I would’ve felt if that’d been me… Yeah, I kind of lost it. Thankfully, my wife knows me well enough that she understood what was going through my head at the time, but it was still embarrassing. |
Perhaps that is the best summation of what makes the 5-foot-11, 243-pound Noa the sort of player for whom coaches have had some high hopes. For the record, Noa said it isn’t nerves, he’s just a man of few (spoken) words.
It’s always the ones who don’t say much who let the pads do the talking and make the most noise, isn’t it?
Noa has 21 tackles and a forced fumble in the Broncos’ last three games since he moved into the starting spot at weakside linebacker following Riley Whimpey’s torn ACL.
Avalos may have meant it figuratively, but Noa could do some serious damage if he ever was in the ring.
During offseason conditioning, when the Broncos worked out with Jesse Brock, a former Boise State wrestler and now MMA coach, the pop of punches was loud, but when Noa threw them? Thunderous.
Lui said in September if he had to pick a teammate to be his superhero sidekick, it would be Noa.
“Most definitely he’d have super strength — we’ll walk down the hall here, just touch his shoulders like, ‘Do you ever not work out?’ ” Lui said.
Sturdy and athletic — he also played running back in high school in San Diego — Noa often repeats the mantra of “separation in preparation.” He said confidence “was an issue I had before,” but the last few weeks have let him prove to himself he’s fully capable of getting things done at this level.
Coaches like Avalos have said Noa likely would have played last season as a true freshman, but he had ACL surgery after his senior season at Helix High in January 2017, which didn’t let him practice until late last fall. He had a minor surgery that forced him to miss the first three games this season, too.
“It was difficult, but the main thing I learned was patience,” Noa said of waiting to see the field.
Working behind Whimpey and senior Blake Whitlock, Noa got his feet wet this season before Whimpey’s injury, again staying patient. Now, with his opportunity, one that is bittersweet because it came via injury, Noa is confident and ready to be the physical presence the Broncos need to beat the Bulldogs.
Tickets: Office on the west side of Albertsons Stadium, visit BroncoSports.com/tickets or call 208-426-4737. Boise State reported just more than 20,000 tickets were out as of 5 p.m. Wednesday. |
// DeleteAll marks all of the items currently selected by this transaction for deletion. The
// actual delete will take place once the transaction is committed.
func (txn *Txn) DeleteAll() {
txn.initialize()
txn.index.Range(func(x uint32) {
txn.deleteAt(x)
})
} |
#include<bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(false);
#define ll long long
#define pb push_back
#define pii pair<ll,ll>
#define mod 1000000007
ll freq[1000010];
bitset<10000008>mark;
void sp(ll cs)
{
ll n,i,j,m,k=0;
cin>>n;
string s,ss,s1,s2,s3;
cin>>s;
bool flag=0;
vector<string>v;
for(char c='a';c<='z';c++)
{
ss=c;
v.pb(ss);
}
for(char c='a';c<='z';c++)
{
s1=c;
for(char ch='a';ch<='z';ch++)
{
ss=s1+ch;
v.pb(ss);
}
}
for(char c='a';c<='z';c++)
{
s1=c;
for(char ch='a';ch<='z';ch++)
{
s2=ch;
for(char se='a';se<='z';se++)
{ss=s1+s2+se;
v.pb(ss);}
}
}
/*for(char c='a';c<='z';c++)
{
s1=c;
for(char ch='a';ch<='z';ch++)
{
s2=ch;
for(char se='a';se<='z';se++)
{
s3=se;
for(char ehm='a';ehm<='z';ehm++)
{ss=s1+s2+s3+ehm;
v.pb(ss);
}
}
}
}
*/
for(i=0;i<v.size();i++)
{
ss=v[i];
flag=0;
k=ss.length();
for(j=0;j+k<=n;j++)
{
if(s.substr(j,k)==ss)
{
flag=1;
break;
}
}
if(flag==0)
{
cout<<ss<<endl;
return;
}
}
}
int main()
{
FAST
ll t,cs=0;
cin>>t;while(t--)
{
cs++;
sp(cs);
}
return 0;
}
|
import {BlockchainCode} from '@emeraldwallet/core';
import * as selectors from './selectors';
import {moduleName} from './types';
import {IState} from "../types";
describe('all', () => {
const state: Partial<IState> = {
[moduleName]: {
loading: false,
contacts: {
[BlockchainCode.ETC]: {
'0x123': {
address: {type: 'single', value: '0x123'},
name: 'name1',
blockchain: 101,
createdAt: new Date()
}
},
[BlockchainCode.ETH]: {
'0x222': {
address: {type: 'single', value: '0x222'},
name: 'name2',
blockchain: 100,
createdAt: new Date()
},
'0x333': {
address: {type: 'single', value: '0x333'},
name: 'name3',
blockchain: 100,
createdAt: new Date()
}
}
}
}
};
it('should return array of contacts', () => {
const result = selectors.all(state as IState);
expect(result.length).toEqual(3);
});
});
|
/**
* Represents a nitrite filter.
*
* @author Anindya Chatterjee.
* @since 4.0
*/
@Getter
@Setter
public abstract class NitriteFilter implements Filter {
private NitriteConfig nitriteConfig;
private String collectionName;
private Boolean objectFilter = false;
/**
* Creates an and filter which performs a logical AND operation on two filters and selects
* the documents that satisfy both filters.
* <p>
*
* @param filter other filter
* @return the and filter
*/
public Filter and(Filter filter) {
return new AndFilter(this, filter);
}
/**
* Creates an or filter which performs a logical OR operation on two filters and selects
* the documents that satisfy at least one of the filter.
* <p>
*
* @param filter other filter
* @return the or filter
*/
public Filter or(Filter filter) {
return new OrFilter(this, filter);
}
@Override
public boolean equals(Object o) {
if (o instanceof NitriteFilter) {
return Objects.equals(this.toString(), String.valueOf(o));
}
return false;
}
@Override
public int hashCode() {
return toString().hashCode();
}
} |
1. Field of the Invention
The invention relates to a method for selectively informing at least one person in the case of an alarm condition of an object.
2. Description of the Prior Art
In a known method an emergency centre is alerted in case of an alarm condition. An employee of the emergency centre who is apprised of the alarm condition will in turn alert a person designated for this purpose or the police. It is subsequently expected of the designated person or the police that they will go and investigate in order to establish whether there is an actual alarm condition or whether there has been a false alarm.
It is found in practice that false alarm occurs frequently, which has the result that the designated person or the police are increasingly less inclined to take action in the case they are alerted.
Known from European patent application 0 805 426 is a surveillance system and method. The system consists of at least one camera, the images of which are compared to the previous image. When there is a difference between the reference image and the camera image, the image processing module selects that changed portion of the total image and subsequently sends that portion via a communication means to at least one remotely situated observer. On the basis of the image material sent to him this person can take action. The alarm can be switched off remotely, or the police can be alerted. In this manner a person, for instance the owner of the object for surveillance, making use of present communication means, functions as intermediate link and the police are only alerted at a later stage. This surveillance system however allows one method of alarm via a limited communication means. The receiving of an alarm report is not guaranteed either, nor is a check made by the surveillance system whether the report has been received or read. In addition, different people cannot receive specific alarm reports. As final drawback can be mentioned that the person to be alerted can be disturbed with an alarm report at any time of the day/week. |
Determinants of moral attitudes toward stem cells Results. Knowledge is not the main factor that differentiates approaches towards the use of SCs. The importance of religion in the lives of the respondents has a significant impact on the perception of the use of SCs, and is associated with indications of ethically saturated terms. Focusing on the usefulness of cells is associated with lesser significance of religion and greater value placed on scientific knowledge. Introduction A significant problem that concerns contemporary researchers, doctors, medical students, ethicists, and philosophers is not whether we are technically capable of performing a complicated procedure, but whether we should perform it or whether we have a moral right to do so. 1 The disciplines that cause fundamental dilemmas and ethical controversies in modern biology and medicine are transplantology, regenerative medicine, genetic engineering and, in particular, the use of embryonic stem cells (ESCs) in modern therapy. 2 Ethical issues became a widely discussed topic in November 2018 when He Jiankui of the Southern University of Science and Technology in Shenzhen, China, announced the birth of twin girls, Lulu and Nana, after he had edited the DNA in their embryos. 3 Another example of ethically controversial research is to create animal embryos that contain human cells and transplant these into surrogate animals. This type of research was approved in 2019 in Japan. 4 Still in need of improvement, genome editing therapy raises more ethical than technical controversies. An example is mitochondrial transfer (pronuclear transfer (PNT) and maternal spindle transfer (MST)), which despite its proven therapeutic effectiveness, is not approved in the EU (except for the UK) or the USA. Stem cells (SCs) were defined in the 1940s and 1950s during studies on the effects of ionizing radiation on animals. They are characterized by their self-renewing potential and ability to reproduce and differentiate. 5 Stem cells, based on their potential, are classified as totipotent, pluripotent, multipotent, and single-potent. The first ones are SCs that are present at the earliest stages of ontogenesis and can transform into all forms of embryo and placenta tissue. Stem cells can also be classified into 4 groups corresponding to their different origins: ESCs, fetal SCs, adult SCs, and induced pluripotent SCs. 6 Research on the therapeutic use of SCs is constantly developing. Scientists are experimenting with ways to selectively target the blood-making cells within the body for destruction. Early studies suggest that the approach could make blood SCs transplants -powerful but dangerous procedures that are used mainly to treat blood cancers -safer and thereby broaden their use. The studies come as evidence piles up that such transplants can also treat some autoimmune disorders and genetic diseases. 7 The possibilities of the therapeutic use of SCs are constantly increasing. In 2019, according to a PubMed database search using the keywords "stem cells" and "human", 7295 scientific articles were published concerning applications of SC therapy in human beings. An attempt has also been made to use pluripotent SCs with the clustered regularly interspaced short palindromic repeats (CRISPR) technique. 8 Due to the ethical controversies that are still aroused by the use of SCs, despite their long-term therapeutic use, we have made an attempt to analyze students' attitudes towards this subject. In view of the ethical and social dilemmas involved, collecting, culturing and experimenting on embryonic and fetus SCs is legally restricted in many countries. 6 Moreover, some experiments with ESCs have led to the formation of cancerous cells and teratomas. Work on the implementation of a safe ESC line is still in progress. 9 The question of what really determines human moral judgment, and worldviews is becoming fundamental to the further development of biomedicine. 10 Hence, a study was conducted at the University of Medical Sciences in Poznan (Poland) on a group of 172 Polish and 161 English-speaking first-year medical students in 2007 and again in 2019. The main objective of the study was to analyze the claim that the potential development and future success of SC therapy is determined not only by the progress of biological sciences but also by legal regulations and social approval of the issue in question. The problem lies in the fact that we cannot rely only on the technological capabilities of medicine, but also on our acceptance or rejection of controversial medical techniques. Ethical aspects must not be overlooked when making fundamental decisions, and at the same time, it can be assumed that attitudes towards the issues strongly correlate with the level of relevant knowledge. 11 Therefore, the specific objective of the study was to determine the attitudes of medical students towards transplantation techniques using SCs, taking into account the influence of factors such as the level of the respondents' medical knowledge, their religious affiliation and the role it plays in their lives. Also included is an analysis of changes in the respondents' knowledge and views over the course of 12 years. One particularly interesting factor is the influence of the students' knowledge and their attitude towards religion on the terms they used to talk about SCs. This influence was analyzed from the perspective of moral psychology. Material and methods The study was based on questionnaire surveys conducted between 2005 and 2007, and again in 2019, involving 333 students of medical departments. The students were divided into 4 groups constituting statistical subgroups according to the year and language of their study curriculum (Table 1). The questionnaire used to analyze the students' beliefs concerning the ethical dimensions of using SCs was based on the following questions: 1. Please indicate the sources of your knowledge concerning stem cells. 2. Do you know any sources of obtaining stem cells? 3. Which of the phrases listed below do you associate with embryonic stem cells? 4. Would you like to be involved in research on stem cells after graduating? All the questions asked in the survey were open-ended, which made it possible to respond beyond the options provided. The students filled out the questionnaire independently and anonymously, and a section concerning their demographic and social affiliations was placed at the end of the form. Subgroups were created on the basis of the answers to particular questions, and were compared as an important element of the research process. The results of the survey were analyzed using R v. 3.5.1 statistical software (R Foundation for Statistical Computing, Vienna, Austria; http:// www.R-project.org/). The statistical significance of differences between the compared groups was determined using the Fisher-Freeman-Halton test. P-values under 0.05 were considered statistically significant. The results obtained were visualized as donut and alluvial diagrams generated using ggplot2 and RColorBrewer software (both from R Foundation for Statistical Computing). 12 A constant common feature of all the respondents was studying at the Department of Medicine of the Poznan University of Medical Sciences. Religion, attitude toward religion, and toward specific issues in ethics and bioethics were treated as features; non-researchable variables included nationality, age, gender, and origin. 13 A special focus was put on the changes in the features outlined above over a period of 12 years, which spanned a turbulent time in the development of the medical sciences, when many ethically questionable therapies were becoming standard. Stem cell therapy was chosen as an example. Results Our analysis of the findings included a comparison of the data from the questionnaires. The first step was to perform an analysis based on techniques characteristic of sociological research. The data obtained was also compared to trends observed in society. Following this, the analysis was carried out from the perspective of moral psychology. As a source of knowledge about SCs, Polish and English-speaking students starting their medical education between 2005 and 2007 used university resources, for example lectures and seminars, university textbooks or other academic literature, as well as other sources of knowledge (the Internet, radio and television, press articles). Both Polish and English-speaking students starting their education in 2019 were much more likely to gain knowledge about SCs from university textbooks and academic lectures. This may suggest that curricula and academic textbooks have been updated to include SC therapy. A difference was noted between the questionnaires from 2007 and 2019 in declarations concerning Internet-based knowledge. This is undoubtedly linked to the increase in web accessibility and the growing importance of popular science publications, where breakthroughs are often described even before they appear in peer-reviewed scientific journals, and which are easy to access via the Internet. Over the course of the study, there was an increase in declared knowledge SC harvesting sources among both Polish and English-speaking students. However, it is interesting to note that the declared increase in knowledge among Polish students was much higher than among English-speaking students. The increase was just below the threshold of statistical significance. However, it should be stressed that as early as 2005 and 2007, Englishspeaking students declared much more knowledge than their Polish peers. This could be related to the fact that in the USA, for example, the use of ESCs in therapy began in 1998, 14 whereas in Poland, the use of significantly less controversial cord blood cells in treatment did not start until 2000. 15 Language is an important tool for reflecting and shaping moral judgments. In many instances, the language constructions used by the respondents reflected their worldviews and attitudes to the issues in question. The students' responses to what they associated with the term ESCs indicate a significant difference between the responses obtained between 2005 and 2007 and in 2019. Today students are much more likely to consider SCs genetic material than those who started their studies 12 years ago. In 2019, definitely fewer students described SCs as human beings or potential human beings than in the 2005-2007 questionnaires. This may corroborate an increase in the students' scientific knowledge and a smaller share of philosophical values in moral decision-making. The analysis of the responses provided by Polish and English-speaking students showed statistically significant differences in the students' attitudes in 2005-2007 and in 2019. In both time periods, English-speaking students were more willing to take up work related to SCs than their Polish peers. In both cases, however, the interest in conducting such research after graduating was higher (Fig. 1). The answers provided by Polish and English-speaking medical students showed a clear tendency towards secularization: In the latest survey, students attached much less significance to religion in life than 12 years earlier. The secularization of students' views seems to correlate with the aforementioned increase in their interest in using SCs in therapy. Discussion The results presented above form the basis of an interesting comparative study of changes that have taken place in the respondent groups. The findings can be elaborated on and analyzed from various points of view. One of the most intriguing aspects seems to be the shift in perception of the SCs status. Our analysis will argue that the perception of SCs was of a moral nature. The main aim of the analysis is to show what plays an important role in forming beliefs concerning the status of SCs. Therefore, it seems appropriate to use tools developed in the field of moral psychology. Moral psychology is a field that seeks to understand the specificity of morality as a property that modifies human behavioral-mental activity in relation to the presence C D E F of another human. In particular, it seeks to explain why certain behaviors are absolutely acceptable or absolutely unacceptable, and why certain motives or objectives do not need to be justified while others are debatable. The doctrine of moral psychology must meet certain criteria. 16 The aim of the psychology of morality is to analyze and explain in the most reliable manner possible the moral judgment that prevails in a given environment and the norms that prevail within it. Moral psychology tries to find the motives that push people toward behavior that is praised or punished in a given environment. The study of the theory in moral psychology has demonstrated that the current challenge for theory development and research in morality is to consider the complex and multifaceted nature of the psychological antecedents and implications of moral behavior connecting different mechanisms. 17 Analysis of the findings concerning changes in how stem cells are perceived To determine the status of SCs, a number of terms were used in the study, which differ mainly in the degree of moral/ethical saturation. Below they are presented from the most morally saturated to the most professional: − a legal and sensitive member of society; − a human being; − a potential human being; − an embryo with human dignity; − genetic material; − surplus genetic material; − other. Moral saturation means that these terms: 1) are frequently used in discussions of ethical concepts that reflect on morality; 2) have connotations associated with moral assessments; 3) are associated with perceptions of humans as having special properties, about which Ingarden wrote: "Man... is the only being who feels humiliated by his evil deeds and tries to atone for his guilt". 18,19 The term 'genetic material' indicates that there are certain useful properties of SCs, while 'surplus' indicates a lack of such properties. The term 'other' is interpreted as indecision as to one's attitude toward SCs, suggesting doubt as to what characteristics should be assigned to them. This is important, as shown by Wojciszke's research 20 indicating that features belonging to the moral domain have a decisive influence on shaping the observer's impression/perception. For example, it shows that: -Moral judgment is more saturated with affect than competence; -In the moral (M) domain, negative information is more decisive and diagnostic than positive information, whereas in the competence (C) domain, the opposite is true. The effect of this asymmetry is that the integration of incongruent information results in a negative bias in the M domain and a positive bias in the C domain. 20 It seems quite reasonable to treat the terms used in the questionnaire as belonging to the M domain and the C domain. In the case of SCs, it is difficult to talk about personality, but by assigning a given status to SCs, the students clearly assigned to them specific features of a moral or competence-related nature. Therefore, it can be concluded that over the course of 12 years, the status of SCs has changed in such a way that fewer and fewer people perceive them within a moral classification: Polish students from 67% in 2007 to 33% in 2019, and English-speaking students from 58% to 50%, respectively. With regard to designations indicating that SCs have a usable nature, the share of Polish students rose from 32% to 60%, and the share of English-speaking students slightly fell from 40% do 38%. In the case of the latter, there was a significant rise of 10% in responses indicating hesitancy or doubt (other) in comparison to +5% among Polish students. This means that the changes in the perception of SCs cannot be explained by a simple shift in beliefs. Whereas in Polish students it is possible to say that this is the case, in Englishspeaking students it is not. Consequently, it is necessary to look at correlations with other factors. It is interesting that the shift in perceptions of SCs is accompanied by 3 other changes: in the respondents' sources of information about SCs, in their ideas about the potency of SCs and in their declarations concerning the importance of religion in their lives. In the case of Polish students, the share of respondents for whom religion is not significant rose by 16%, and this is almost the same as the decline in respondents for whom religion is very significant, namely by 15%. With regard to English-speaking students, the increase was 15%, whereas the decrease was 13%. This comprises nearly complete symmetry. Moreover, these are extreme positions on the scale, referring to strong declarations. The "grey zone" concerning religious declarations is comparable in all the study situations, ranging between 63% and 60%. Thus, the secularization of both Polish and English-speaking students over the 12 years was comparable, so it would not account for significant differences in perceptions of SCs in those 2 groups. Regarding the increase in knowledge, the most considerable shift of 38% is observed among Polish students, whereas among the English-speaking respondents, this is merely 6%. Thus, the increase in knowledge could explain why SCs are seen from a more useful perspective than before. This may undermine Wojciszke's thesis that moral beliefs are of significant importance to perception. Knowledge and emotion-related indicators In the study, the students were not asked about their feelings towards or knowledge on SCs, albeit one can assume that the predictors of these are the students' declarations concerning the significance of religion in their lives and their sources of knowledge on SCs. Religion was opposed to knowledge, and the fundamental difference between them seemed to be in the irrational elements, including the presence of emotional elements. As shown by research on the human brain, there are some coded universal evolutionary mechanisms that provide for generating moral judgments. According to Hauser, Baron-Cohen and Churchland, 21-23 areas of the brain responsible for both rational thinking and experiencing feelings are activated in order to generate moral judgments. However, there is an ongoing debate on which is more important to the formation of moral judgments: the ability to think rationally or to experience emotions. The advocates of the first school of thought include Kant, the utilitarian philosophers, and Bloom, 24,25 a contemporary moral psychologist. They do not eliminate emotions as a source of moral beliefs but are rather of the opinion that positively valenced behaviors require the involvement of rational thinking. Their opponents, whose precursor was Hume, include Haidt 26 and Damazio. 27 In particular, Haidt links emotions to religious beliefs. Another intriguing concept that seeks to explain humans' ability to generate opinions about the world is the so-called "left-brain interpreter" proposed by Gazzaniga, whereby humans have both the ability and the need to create a coherent (though not necessarily rational) explanation of the phenomena in the world. 28 Religion is a system of beliefs that explains these phenomena in a coherent but not a rational way. 16,29 Moral psychology offers a strong argument for treating religious beliefs as a predictor of the existence of emotions. Christianity in particular perceives SCs within personal categories, namely, those to which we can attribute characteristics of competence (knowledge, free will) and emotions (for example, love, care and compassion). An indicator that predicts knowledge of the competencerelated features of SCs is the ability to identify the sources of this knowledge. This ability does not necessarily prove the possession of such knowledge. Still, if one considers which sources the respondents identify, the assertion that students in 2019 had greater academic and scientific knowledge than in 2007 seems justified. There was a considerable increase in academic and scientific expertise among Polish students − 23% − whereas among Englishspeaking students the increase was 12%. The popularity of academic sources grew when the students did not use the Internet. However, at the starting point, the Englishspeaking students' knowledge was higher (+11%) than Polish students. Hence it is possible to see this as a specific balancing of these levels. The 2019 respondents did not look for information in popular sources, whose share in obtaining information fell by about 20%. In general, it is possible to assume that current students have greater knowledge, and that it is of better quality. Figures 2, 3 depict this situation in detail. Considering the selected indicators as predictors of emotions and knowledge, one can say that when assigning a status to SCs, the respondents did so with a considerably less emotionally charged attitude than 12 years ago. 30 It should be noted that in the case of Polish students, this was related to a 'useful/objective' approach towards SCs. It would seem that this approach was brought about by an increase in high-quality knowledge, and by a decline in the proportion of respondents who declared involvement in religion. Despite this decline, the number of Polish students who declared religious involvement was still nearly twice as high as the number of English-speaking students. This indicates that emotions pertaining to faith/religion play a more significant role than knowledge in their attitude toward the use of SCs. The fact that the respondents were believers did not prevent them from simultaneously acknowledging the usefulness of SCs. What is more, 23% of Polish students declared that religion had no significance in their lives, which according to our theory would mean they determined the status of SCs based on knowledge only. This means that they should have viewed this issue strictly from the perspective of useful or non-useful features, but many of these students see SCs as potential human beings. This would mean that knowledge is a modifier rather than a major factor that impacts on their perception of SCs, which would correspond to the findings of Wojciszke. As far as the English-speaking students were concerned, the share of respondents who declared that religion was of no significance in their lives was 26%, i.e., slightly above the percentage of Polish students stating that. Despite this, it is possible to observe an even wider variety of attitudes towards the status of SCs than among Polish students. The current English-speaking students were less eager to attach moral features to SCs than 12 years ago, but at the same time, they did not see them from a utilitarian point of view; they expressed doubts about their status. Finally, it is worth noting that the increase in knowledge declared by the students in 2019 was not paralleled by an increase in their interest in using SCs in therapy in the future. Figures 4,5 show the relationships between the respondents' knowledge, religion and perceptions of the SCs status. Conclusions As demonstrated above, knowledge is not the main factor that differentiates approaches towards SCs. Polish students with scientific knowledge defined SCs in various ways. What differentiates their definitions is the significance of religion in their lives. In the case of students who declared that religion was (very) important to them, terms that were ethically saturated definitely outweighed the other terms, with the exception being 'legal and sensitive member of society', which is an extreme term that nobody chose. When religion was unimportant in student's life, less ethically saturated terms like 'genetic material', 'other' and to a lesser extent 'potential human being' were used. Knowledge may modify attitudes in the case of respondents who indicated the term 'surplus genetic material'. These respondents declared that their knowledge was derived from popular sources, and, at the same time, that religion was fairly important to them. In this situation, it is religion that determines the non-usefulness of SCs. In the case of respondents who did not have a definite attitude towards religion, terms indicating the usefulness of SCs prevailed over other terms. In the case of the English-speaking students, one can observe a greater polarization of terms concerning the status of SCs: 50% of the terms were morally saturated, 38% were utilitarian and 12% were unspecified. In general, the proportions were similar to those among the Polish students. Nonetheless, contrary to their Polish peers, the Englishspeaking students did not select terms expressing a nonuseful nature (e.g., 'surplus'), but, interestingly, 3% of them selected an extremely ethically saturated term (i.e., 'a legal and sensible member of society'). This 3% consisted of respondents who used non-scientific knowledge and, intriguingly, those for whom religion either did not matter at all or was quite meaningful. It may be possible to hypothesize that the significance of religion connects with the selection of ethically saturated terms, while usefulness saturation is connected with attaching less meaning to faith. Although the results of this research indicate something about the respondents' religiousness, their sources of information and their perceptions of SCs, this study is only preliminary. The influence of scientific knowledge on students' views needs to be further analyzed, since it should be the basis of decisions made by scientists and workers in healthcare systems. |
/**
* Verify that a vertex and its set of dependencies have no cycles.
*
* @param vertex The vertex we want to test.
*
* @throws CyclicDependencyException if there is a cycle.
*/
public static <T> void verify(Vertex<T> vertex) throws CyclicDependencyException
{
List<Vertex<T>> vertices = new ArrayList<Vertex<T>>();
addDependencies(vertex, vertices);
verify(vertices);
} |
FT-IR Examination of the Development of Secondary Cell Wall in Cotton Fibers The secondary cell wall development of cotton fibers harvested at 18, 20, 24, 28, 32, 36 and 40 days after flowering was examined using attenuated total reflection Fourier transform-infrared (ATR FT-IR) spectroscopy. Spectra of deuterated cotton fibers did not demonstrate significant changes in their OH stretching band shapes or positions during development. Only a progressive increase in OH band intensity was observed. Results indicate that the highly crystalline cellulose component produced during secondary cell wall formation maintains the hydrogen bonding network observed for the primary cell wall. Other general changes were observed for the regular ATR spectra. A progressive intensity increase for bands assigned to cellulose I was observed during fiber development, including a marked intensity increase for vibrations at 1002 and 985 cm−1. In contrast, CO vibrational bands from dominant conformations observed at 1104, 1052, 1028 cm−1 undergo a modest intensity increase during secondary cell wall development. |
<gh_stars>0
# Create plain black square picture
from PIL import Image
img = Image.new('RGB', (225, 225), color='black')
img.save('temp/black_square.png')
|
Iran's supreme leader Ayatollah Ali Khamenei attends a meeting with high-ranking officials in Tehran August 31, 2011. REUTERS/www.khamenei.ir With a deadline for the Iranian nuclear negotiations set to expire in a few weeks and significant differences still outstanding, President Barack Obama reportedly penned a personal appeal to Iran's supreme leader, Ayatollah Ali Khamenei, last month.
The move betrays a profound misunderstanding of the Iranian leadership, and is likely to hinder rather than help achieve a durable resolution to Iran's nuclear ambitions as well as other US objectives on Iran.
If the reports are accurate — and the administration has not yet confirmed the scoop by the Wall Street Journal— the letter apparently urged Khamenei to finalize the nuclear deal and dangled the prospect of bilateral cooperation in fighting the Islamic State group (also known as ISIS or ISIL) as an incentive.
It marks the fourth time since taking office in 2009 that Obama has reached out to Khamenei personally, in addition to his exchange of letters (and an unprecedented phone call) with the country's president, Hassan Rouhani.
This constitutes a striking increase in American outreach to the Iranian leadership since the 1979 revolution. The two countries have not had direct diplomatic relations since April 1980 and have engaged in direct dialogue only sporadically since that time, most recently in concert with five other world powers in talks aimed at eliminating Iran's path to nuclear weapons capability.
In dealing with one of the world's most urgent crises, more direct dialogue is surely a net positive. But the technique and tactics matter, perhaps even more in this interaction than in most other disputes, where contact is more routinized and where there is a more substantial foundation of mutual understanding or at least familiarity.
It makes perfect sense, for example, that the US military has apparently utilized Iraqi officials as an intermediary on issues related to the ISIS campaign, which Tehran has waged independent of the US-led effort through its proxies on the ground in Iraq.
However, it is precisely at the tactical level that an Obama letter to Khamenei at this juncture appears so spectacularly ill-conceived.
First of all, it poses no realistic possibility of advancing progress in the nuclear talks or any other aspect of US-Iranian relations. After all, only the most naïve and uninformed observer of Iran would believe that a personal appeal from Obama would sway the Supreme Leader in a positive fashion.
Khamenei's mistrust and antipathy toward Washington has been a consistent feature of his public rhetoric through the 35-year history of the Islamic Republic.
He has described Washington with every possible invective; he indulges in Holocaust denial and 9/11 conspiracies; and he routinely insists that the United States is bent on regime change in Iran and perpetuating the nuclear crisis.
These views are not opportunistic or transient. Anti-Americanism is Khamenei's bedrock, ingrained in his worldview, and as such it is not susceptible to blandishments — particularly not from the very object of his loathing.
Obama would hardly be the first American president to delude himself that he can overcome international conflicts through the force of his own charisma.
Moreover, the Islamic Republic's leadership is steeped in a Hobbesian understanding of the international system. As a hardline newspaper wrote, "our world is not a fair one and everyone gets as much power as he can, not for his power of reason or the adaptation of his request to the international laws, but by his bullying …"
Interpreted in this context, Obama's appeal to Iran's highest power at this critical juncture in the nuclear diplomacy will surely be read as a supplication — and as further confirmation of American desperation and weakness in the face of Iran's position of advantage.
This may sound absurd, given the relative disparity in the two countries' capabilities and international influence. And by any objective standard, Iran has a more compelling interest in a swift resolution to the longstanding nuclear impasse, since a deal would begin to curtail the devastating sanctions that have halved Iran's oil exports and stranded its earnings in foreign banks that are off-limits to the Iranian treasury.
But Tehran has long sought to convince itself and the world otherwise.
Khamenei himself regularly revels in his conviction that America is on the retreat in the face of Iran's superior power. As he explained recently, "the reason why we are stronger is that [America] retreats step by step in all the arenas which we and the Americans have confronted each other. But we do not retreat. Rather, we move forward. This is a sign of our superiority over the Americans."
In addition, the incentive that Obama apparently proffered in his latest correspondence — a willingness to explore the confluence of interest between Tehran and Washington on combatting Sunni extremists — offers very little prospect of meaningful traction.
The simple reality is that neither side prioritizes the ISIS battle over the nuclear diplomacy, as evidenced by the fact that Iran's diplomats sought to use the same implicit linkage to lure Washington into greater nuclear concessions.
Obama on the phone with Rouhani. Twitter/@PeteSouza
Meanwhile, Iran's security establishment has categorically rejected speculation about direct cooperation with the US-led campaign, preferring to pursue its own offensive and convinced (probably correctly) that Tehran and its proxies have the upper hand in both Iraq and Syria.
As a result, there is simply no plausible scenario in which a letter from the President of the United States to Ali Khamenei generates greater Iranian flexibility on the nuclear program, which the regime has paid an exorbitant price to preserve, or somehow pushes a final agreement across the finish line.
Just the opposite — the letter undoubtedly intensified Khamenei's contempt for Washington and reinforced his longstanding determination to extract maximalist concessions from the international community. It is a blow to the delicate end-game state of play in the nuclear talks at the precise moment when American resolve was needed most.
The revelation of the letter also undercuts Obama elsewhere. It deepens tensions with America's regional allies, whose assistance in strengthening the Sunni opposition to ISIS is sorely needed. It also hurts him at home, and again at the worst possible time, given the mid-term elections' outcome and incoming Republicans majorities in both houses of Congress.
Obama's rivals on Capitol Hill were already planning an activist agenda on Iran that could disrupt the administration's diplomatic efforts. The letter will be seen — wrongly — as confirming the right's most ludicrous conspiracy theories about a covert American-Iranian alliance.
It is difficult to imagine the logic that inspired Obama's latest missive, other than an utter ineptness in understanding Iranian political dynamics.
Iranian President Hassan Rouhani gestures at the conclusion of his address to the 69th United Nations General Assembly at the United Nations Headquarters in New York, on Sept. 25, 2014. Mike Segar/Reuters However, it is consistent with prior mawkishness that the administration has demonstrated toward Iran's leadership during Rouhani's two visits to New York for the United Nations General Assembly meetings— an unseemly, artless pursuit of some personal affinity in hopes of advancing bilateral diplomacy.
Obama would hardly be the first American president to delude himself that he can overcome international conflicts through the force of his own charisma — recall, for example, President George W. Bush's excruciating assertion that he had looked into the eyes of Russian leader Vladimir Putin and sensed his soul.
But he might just be the first to fumble a crucial arms control agreement near the finish line out of a misguided overconfidence in the power of his own prose.
Suzanne Maloney studies Iran, the political economy of the Persian Gulf and Middle East energy policy. A former US State Department policy advisor, she has also counseled private companies on Middle East issues. Maloney is author of the recently published Iran's Long Reach: Iran as a Pivotal State in the Muslim World. |
Sergey Aslanyan (entrepreneur)
Biography
Sergey Aslanyan was born in Yerevan, Armenia, graduated from Faculty of Computational Mathematics and Cybernetics at Lomonosov Moscow State University. In 1996 Aslanyan he received a degree in Applied Mathematics.
Aslanyan started his career in 1997 as a senior consultant at the auditing company Coopers & Lybrand, which soon merged with Price Waterhouse and was titled PricewaterhouseCoopers. In 2001, he joined TNK-BP Management in the position of deputy head of the information technology unit.
In December 2003, Aslanyan was invited to join Mobile TeleSystems as Vice President of Information Technology – this position was created specially for him. In July 2006 he was appointed as Vice President of Engineering and Information Technology. He supervised the transition of the telecommunications operator to a new billing system, the implementation of Oracle ERP system and workflow automation system, and he was responsible for the integration of companies acquired by MTS network.
In October 2007 Aslanyan became president of the Sitronics group, which belonged to investment holding JSFC Sistema just as Mobile TeleSystems. Aslanyan presented a new strategy of the group company development, aimed at reducing non-profitable areas (e.g. consumer electronics), funding priority scientific developments of the state (e.g., microelectronics) and manufacture optimization. From 2007 to 2012 Aslanyan was a minority shareholder of Sitronics with a share of 0.687% (up to 2010 – 0.25%). In January 2013, he left the company.
In January 2013, together with a group of private investors Aslanyan acquired the company MaximaTelecom which was owned by the JSFC Sistema's systems integrator NVision Group and became the head of its board of directors. In July 2013 MaximaTelecom took part in the auction of the Moscow Metro for the right of creating and operating Wi-Fi network in the subway trains and signed a contract as the only bidder. Investments in the project amounted to more than 2 billion rubles. Since 1 December 2014 Free Wi-Fi was available on all subway lines.
Awards and recognition
Aslanyan twice won IT-leader award in 2004 and 2006 in category Telecommunication companies and Mobile operators respectively. He is a winner of Aristos award, which was established by Russian Association of Managers and the publishing house Kommersant in the category IT-director (2006). In 2009 his name was included in the biographical reference book Armenian business elite of Russia, published by scientific and educational foundation Erevank. In May 2011 Aslanyan was noted among the best IT-managers of Russian Internet by the internet periodical CNews. In 2011, he received the highest index of personal reputation among top managers of telecommunication companies in the ranking developed by TASS-Telecom. In September 2012 the newspaper Kommersant put Aslanyan in top-10 list of the best managers in the field of information technology in the XIII annual ranking of Russian top managers.
Personal life
Sergey Aslanyan enjoys playing tennis and squash. |
Emergency Presidential Power: From the Drafting of the Constitution to the War on Terror Can a U.S. president decide to hold suspected terrorists indefinitely without charges or secretly monitor telephone conversations and e-mails without a warrant in the interest of national security? Was the George W. Bush administration justified in authorising waterboarding? Was President Obama justified in ordering the killing, without trial or hearing, of a U.S. citizen suspected of terrorist activity? Defining the scope and limits of emergency presidential power might seem easy--just turn to Article II of the Constitution. But as Chris Edelson shows, the reality is complicated. In times of crisis, presidents have frequently staked out claims to broad national security power. Ultimately it is up to the Congress, the courts, and the people to decide whether presidents are acting appropriately or have gone too far. Drawing on excerpts from the U.S. Constitution, Supreme Court opinions, Department of Justice memos, and other primary documents, Edelson weighs the various arguments that presidents have used to justify the expansive use of executive power in times of crisis. Emergency Presidential Power uses the historical record to evaluate and analyse presidential actions before and after the terrorist attacks of September 11, 2001. The choices of the twenty-first century, Edelson concludes, have pushed the boundaries of emergency presidential power in ways that may provide dangerous precedents for current and future commanders-in-chief. |
<reponame>mksmbrtsh/LLRPexplorer<gh_stars>1-10
/*
*
* This file was generated by LLRP Code Generator
* see http://llrp-toolkit.cvs.sourceforge.net/llrp-toolkit/
* for more information
* Generated on: Sun Apr 08 14:14:11 EDT 2012;
*
*/
/*
* Copyright 2007 ETH Zurich
*
* 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.llrp.ltk.generated.parameters;
import maximsblog.blogspot.com.llrpexplorer.Logger;
import org.jdom2.Content;
import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.Namespace;
import org.llrp.ltk.exceptions.InvalidLLRPMessageException;
import org.llrp.ltk.exceptions.MissingParameterException;
import org.llrp.ltk.generated.LLRPConstants;
import org.llrp.ltk.generated.parameters.AccessSpecID;
import org.llrp.ltk.generated.parameters.AntennaID;
import org.llrp.ltk.generated.parameters.Custom;
import org.llrp.ltk.generated.parameters.InventoryParameterSpecID;
import org.llrp.ltk.generated.parameters.OpSpecID;
import org.llrp.ltk.generated.parameters.ROSpecID;
import org.llrp.ltk.generated.parameters.SpecIndex;
import org.llrp.ltk.types.LLRPBitList;
import org.llrp.ltk.types.LLRPMessage;
import org.llrp.ltk.types.SignedShort;
import org.llrp.ltk.types.TLVParameter;
import org.llrp.ltk.types.TVParameter;
import org.llrp.ltk.types.UTF8String_UTF_8;
import org.llrp.ltk.types.UnsignedShort;
import java.util.LinkedList;
import java.util.List;
/**
* The reader exception status event notifies the client that an unexpected event has occurred on the reader. Optional parameters provide more detail to the client as to the nature and scope of the event.
See also {@link <a href="http://www.epcglobalinc.org/standards/llrp/llrp_1_0_1-standard-20070813.pdf#page=90&view=fit">LLRP Specification Section 13.2.6.7</a>}
and {@link <a href="http://www.epcglobalinc.org/standards/llrp/llrp_1_0_1-standard-20070813.pdf#page=149&view=fit">LLRP Specification Section 16.2.7.6.6</a>}
*/
/**
* The reader exception status event notifies the client that an unexpected event has occurred on the reader. Optional parameters provide more detail to the client as to the nature and scope of the event.
See also {@link <a href="http://www.epcglobalinc.org/standards/llrp/llrp_1_0_1-standard-20070813.pdf#page=90&view=fit">LLRP Specification Section 13.2.6.7</a>}
and {@link <a href="http://www.epcglobalinc.org/standards/llrp/llrp_1_0_1-standard-20070813.pdf#page=149&view=fit">LLRP Specification Section 16.2.7.6.6</a>}
.
*/
public class ReaderExceptionEvent extends TLVParameter {
public static final SignedShort TYPENUM = new SignedShort(252);
private static final Logger LOGGER = Logger.getLogger(ReaderExceptionEvent.class);
protected UTF8String_UTF_8 message;
protected ROSpecID rOSpecID;
protected SpecIndex specIndex;
protected InventoryParameterSpecID inventoryParameterSpecID;
protected AntennaID antennaID;
protected AccessSpecID accessSpecID;
protected OpSpecID opSpecID;
protected List<Custom> customList = new LinkedList<Custom>();
/**
* empty constructor to create new parameter.
*/
public ReaderExceptionEvent() {
}
/**
* Constructor to create parameter from binary encoded parameter
* calls decodeBinary to decode parameter.
* @param list to be decoded
*/
public ReaderExceptionEvent(LLRPBitList list) {
decodeBinary(list);
}
/**
* Constructor to create parameter from xml encoded parameter
* calls decodeXML to decode parameter.
* @param element to be decoded
*/
public ReaderExceptionEvent(Element element)
throws InvalidLLRPMessageException {
decodeXML(element);
}
/**
* {@inheritDoc}
*/
public LLRPBitList encodeBinarySpecific() {
LLRPBitList resultBits = new LLRPBitList();
if (message == null) {
LOGGER.warn(" message not set");
throw new MissingParameterException(
" message not set for Parameter of Type ReaderExceptionEvent");
}
resultBits.append(message.encodeBinary());
if (rOSpecID == null) {
// optional parameter, may be null
LOGGER.info(" rOSpecID not set");
} else {
resultBits.append(rOSpecID.encodeBinary());
}
if (specIndex == null) {
// optional parameter, may be null
LOGGER.info(" specIndex not set");
} else {
resultBits.append(specIndex.encodeBinary());
}
if (inventoryParameterSpecID == null) {
// optional parameter, may be null
LOGGER.info(" inventoryParameterSpecID not set");
} else {
resultBits.append(inventoryParameterSpecID.encodeBinary());
}
if (antennaID == null) {
// optional parameter, may be null
LOGGER.info(" antennaID not set");
} else {
resultBits.append(antennaID.encodeBinary());
}
if (accessSpecID == null) {
// optional parameter, may be null
LOGGER.info(" accessSpecID not set");
} else {
resultBits.append(accessSpecID.encodeBinary());
}
if (opSpecID == null) {
// optional parameter, may be null
LOGGER.info(" opSpecID not set");
} else {
resultBits.append(opSpecID.encodeBinary());
}
if (customList == null) {
//just warn - it is optional
LOGGER.info(" customList not set");
} else {
for (Custom field : customList) {
resultBits.append(field.encodeBinary());
}
}
return resultBits;
}
/**
* {@inheritDoc}
*/
public Content encodeXML(String name, Namespace ns) {
// element in namespace defined by parent element
Element element = new Element(name, ns);
// child element are always in default LLRP namespace
ns = Namespace.getNamespace("llrp", LLRPConstants.LLRPNAMESPACE);
if (message == null) {
LOGGER.warn(" message not set");
throw new MissingParameterException(" message not set");
} else {
element.addContent(message.encodeXML("Message", ns));
}
//parameters
if (rOSpecID == null) {
LOGGER.info("rOSpecID not set");
} else {
element.addContent(rOSpecID.encodeXML(rOSpecID.getClass()
.getSimpleName(), ns));
}
if (specIndex == null) {
LOGGER.info("specIndex not set");
} else {
element.addContent(specIndex.encodeXML(specIndex.getClass()
.getSimpleName(), ns));
}
if (inventoryParameterSpecID == null) {
LOGGER.info("inventoryParameterSpecID not set");
} else {
element.addContent(inventoryParameterSpecID.encodeXML(
inventoryParameterSpecID.getClass().getSimpleName(), ns));
}
if (antennaID == null) {
LOGGER.info("antennaID not set");
} else {
element.addContent(antennaID.encodeXML(antennaID.getClass()
.getSimpleName(), ns));
}
if (accessSpecID == null) {
LOGGER.info("accessSpecID not set");
} else {
element.addContent(accessSpecID.encodeXML(
accessSpecID.getClass().getSimpleName(), ns));
}
if (opSpecID == null) {
LOGGER.info("opSpecID not set");
} else {
element.addContent(opSpecID.encodeXML(opSpecID.getClass()
.getSimpleName(), ns));
}
if (customList == null) {
LOGGER.info("customList not set");
} else {
for (Custom field : customList) {
element.addContent(field.encodeXML(field.getClass().getName()
.replaceAll(field.getClass()
.getPackage()
.getName() +
".", ""), ns));
}
}
return element;
}
/**
* {@inheritDoc}
*/
protected void decodeBinarySpecific(LLRPBitList binary) {
int position = 0;
int tempByteLength;
int tempLength = 0;
int count;
SignedShort type;
int fieldCount;
Custom custom;
// array. first 16 bits indicate length of array
fieldCount = new UnsignedShort(binary.subList(position,
UnsignedShort.length())).toShort();
tempLength = (UTF8String_UTF_8.length() * fieldCount) +
UnsignedShort.length();
message = new UTF8String_UTF_8(binary.subList(position, tempLength));
position += tempLength;
LOGGER.debug("decoding array of type: UTF8String_UTF_8 with " +
tempLength + " length");
//might need padding
// must always be blocks of 8 bites, if it is a bitlist, this might not be automatically the case
if ((tempLength % 8) > 0) {
position += (8 - (tempLength % 8));
LOGGER.info("padding needed for message ");
}
// look ahead to see type
// may be optional or exactly once
type = null;
tempByteLength = 0;
tempLength = 0;
try {
// if first bit is one it is a TV Parameter
if (binary.get(position)) {
// do not take the first bit as it is always 1
type = new SignedShort(binary.subList(position + 1, 7));
} else {
type = new SignedShort(binary.subList(position +
RESERVEDLENGTH, TYPENUMBERLENGTH));
tempByteLength = new UnsignedShort(binary.subList(position +
RESERVEDLENGTH + TYPENUMBERLENGTH,
UnsignedShort.length())).toShort();
tempLength = 8 * tempByteLength;
}
} catch (IllegalArgumentException le) {
// if an IllegalArgumentException is thrown, list was not long enough so the parameter is missing
LOGGER.info(
"ReaderExceptionEvent misses optional parameter of type ROSpecID");
}
if (binary.get(position)) {
// length can statically be determined for TV Parameters
tempLength = rOSpecID.length();
}
if ((type != null) && type.equals(ROSpecID.TYPENUM)) {
rOSpecID = new ROSpecID(binary.subList(position, tempLength));
position += tempLength;
LOGGER.debug(" rOSpecID is instantiated with ROSpecID with length" +
tempLength);
} else {
LOGGER.info(
"ReaderExceptionEvent misses optional parameter of type ROSpecID");
}
// look ahead to see type
// may be optional or exactly once
type = null;
tempByteLength = 0;
tempLength = 0;
try {
// if first bit is one it is a TV Parameter
if (binary.get(position)) {
// do not take the first bit as it is always 1
type = new SignedShort(binary.subList(position + 1, 7));
} else {
type = new SignedShort(binary.subList(position +
RESERVEDLENGTH, TYPENUMBERLENGTH));
tempByteLength = new UnsignedShort(binary.subList(position +
RESERVEDLENGTH + TYPENUMBERLENGTH,
UnsignedShort.length())).toShort();
tempLength = 8 * tempByteLength;
}
} catch (IllegalArgumentException le) {
// if an IllegalArgumentException is thrown, list was not long enough so the parameter is missing
LOGGER.info(
"ReaderExceptionEvent misses optional parameter of type SpecIndex");
}
if (binary.get(position)) {
// length can statically be determined for TV Parameters
tempLength = specIndex.length();
}
if ((type != null) && type.equals(SpecIndex.TYPENUM)) {
specIndex = new SpecIndex(binary.subList(position, tempLength));
position += tempLength;
LOGGER.debug(
" specIndex is instantiated with SpecIndex with length" +
tempLength);
} else {
LOGGER.info(
"ReaderExceptionEvent misses optional parameter of type SpecIndex");
}
// look ahead to see type
// may be optional or exactly once
type = null;
tempByteLength = 0;
tempLength = 0;
try {
// if first bit is one it is a TV Parameter
if (binary.get(position)) {
// do not take the first bit as it is always 1
type = new SignedShort(binary.subList(position + 1, 7));
} else {
type = new SignedShort(binary.subList(position +
RESERVEDLENGTH, TYPENUMBERLENGTH));
tempByteLength = new UnsignedShort(binary.subList(position +
RESERVEDLENGTH + TYPENUMBERLENGTH,
UnsignedShort.length())).toShort();
tempLength = 8 * tempByteLength;
}
} catch (IllegalArgumentException le) {
// if an IllegalArgumentException is thrown, list was not long enough so the parameter is missing
LOGGER.info(
"ReaderExceptionEvent misses optional parameter of type InventoryParameterSpecID");
}
if (binary.get(position)) {
// length can statically be determined for TV Parameters
tempLength = inventoryParameterSpecID.length();
}
if ((type != null) && type.equals(InventoryParameterSpecID.TYPENUM)) {
inventoryParameterSpecID = new InventoryParameterSpecID(binary.subList(
position, tempLength));
position += tempLength;
LOGGER.debug(
" inventoryParameterSpecID is instantiated with InventoryParameterSpecID with length" +
tempLength);
} else {
LOGGER.info(
"ReaderExceptionEvent misses optional parameter of type InventoryParameterSpecID");
}
// look ahead to see type
// may be optional or exactly once
type = null;
tempByteLength = 0;
tempLength = 0;
try {
// if first bit is one it is a TV Parameter
if (binary.get(position)) {
// do not take the first bit as it is always 1
type = new SignedShort(binary.subList(position + 1, 7));
} else {
type = new SignedShort(binary.subList(position +
RESERVEDLENGTH, TYPENUMBERLENGTH));
tempByteLength = new UnsignedShort(binary.subList(position +
RESERVEDLENGTH + TYPENUMBERLENGTH,
UnsignedShort.length())).toShort();
tempLength = 8 * tempByteLength;
}
} catch (IllegalArgumentException le) {
// if an IllegalArgumentException is thrown, list was not long enough so the parameter is missing
LOGGER.info(
"ReaderExceptionEvent misses optional parameter of type AntennaID");
}
if (binary.get(position)) {
// length can statically be determined for TV Parameters
tempLength = antennaID.length();
}
if ((type != null) && type.equals(AntennaID.TYPENUM)) {
antennaID = new AntennaID(binary.subList(position, tempLength));
position += tempLength;
LOGGER.debug(
" antennaID is instantiated with AntennaID with length" +
tempLength);
} else {
LOGGER.info(
"ReaderExceptionEvent misses optional parameter of type AntennaID");
}
// look ahead to see type
// may be optional or exactly once
type = null;
tempByteLength = 0;
tempLength = 0;
try {
// if first bit is one it is a TV Parameter
if (binary.get(position)) {
// do not take the first bit as it is always 1
type = new SignedShort(binary.subList(position + 1, 7));
} else {
type = new SignedShort(binary.subList(position +
RESERVEDLENGTH, TYPENUMBERLENGTH));
tempByteLength = new UnsignedShort(binary.subList(position +
RESERVEDLENGTH + TYPENUMBERLENGTH,
UnsignedShort.length())).toShort();
tempLength = 8 * tempByteLength;
}
} catch (IllegalArgumentException le) {
// if an IllegalArgumentException is thrown, list was not long enough so the parameter is missing
LOGGER.info(
"ReaderExceptionEvent misses optional parameter of type AccessSpecID");
}
if (binary.get(position)) {
// length can statically be determined for TV Parameters
tempLength = accessSpecID.length();
}
if ((type != null) && type.equals(AccessSpecID.TYPENUM)) {
accessSpecID = new AccessSpecID(binary.subList(position, tempLength));
position += tempLength;
LOGGER.debug(
" accessSpecID is instantiated with AccessSpecID with length" +
tempLength);
} else {
LOGGER.info(
"ReaderExceptionEvent misses optional parameter of type AccessSpecID");
}
// look ahead to see type
// may be optional or exactly once
type = null;
tempByteLength = 0;
tempLength = 0;
try {
// if first bit is one it is a TV Parameter
if (binary.get(position)) {
// do not take the first bit as it is always 1
type = new SignedShort(binary.subList(position + 1, 7));
} else {
type = new SignedShort(binary.subList(position +
RESERVEDLENGTH, TYPENUMBERLENGTH));
tempByteLength = new UnsignedShort(binary.subList(position +
RESERVEDLENGTH + TYPENUMBERLENGTH,
UnsignedShort.length())).toShort();
tempLength = 8 * tempByteLength;
}
} catch (IllegalArgumentException le) {
// if an IllegalArgumentException is thrown, list was not long enough so the parameter is missing
LOGGER.info(
"ReaderExceptionEvent misses optional parameter of type OpSpecID");
}
if (binary.get(position)) {
// length can statically be determined for TV Parameters
tempLength = opSpecID.length();
}
if ((type != null) && type.equals(OpSpecID.TYPENUM)) {
opSpecID = new OpSpecID(binary.subList(position, tempLength));
position += tempLength;
LOGGER.debug(" opSpecID is instantiated with OpSpecID with length" +
tempLength);
} else {
LOGGER.info(
"ReaderExceptionEvent misses optional parameter of type OpSpecID");
}
// list of parameters
customList = new LinkedList<Custom>();
LOGGER.debug("decoding parameter customList ");
while (position < binary.length()) {
// store if one parameter matched
boolean atLeastOnce = false;
// look ahead to see type
if (binary.get(position)) {
// do not take the first bit as it is always 1
type = new SignedShort(binary.subList(position + 1, 7));
} else {
type = new SignedShort(binary.subList(position +
RESERVEDLENGTH, TYPENUMBERLENGTH));
tempByteLength = new UnsignedShort(binary.subList(position +
RESERVEDLENGTH + TYPENUMBERLENGTH,
UnsignedShort.length())).toShort();
tempLength = 8 * tempByteLength;
}
// custom
if ((type != null) && type.equals(Custom.TYPENUM)) {
Custom cus = new Custom(binary.subList(position, tempLength));
// custom parameters for this parameter
// ReaderExceptionEvent
//end parameters
//if none matched continue wasn't called and we add just cus as we found no specific vendor implementation
customList.add(cus);
position += tempLength;
atLeastOnce = true;
}
if (!atLeastOnce) {
//no parameter matched therefore we jump out of the loop
break;
}
}
//if list is still empty no parameter matched
if (customList.isEmpty()) {
LOGGER.info(
"encoded message does not contain parameter for optional customList");
}
}
/**
* {@inheritDoc}
*/
public void decodeXML(Element element) throws InvalidLLRPMessageException {
List<Element> tempList = null;
boolean atLeastOnce = false;
Custom custom;
Element temp = null;
// child element are always in default LLRP namespace
Namespace ns = Namespace.getNamespace(LLRPConstants.LLRPNAMESPACE);
temp = element.getChild("Message", ns);
if (temp != null) {
message = new UTF8String_UTF_8(temp);
}
element.removeChild("Message", ns);
//parameter - not choices - no special actions needed
temp = element.getChild("ROSpecID", ns);
if (temp != null) {
rOSpecID = new ROSpecID(temp);
LOGGER.info(
"setting parameter rOSpecID for parameter ReaderExceptionEvent");
}
if (temp == null) {
LOGGER.info(
"ReaderExceptionEvent misses optional parameter of type rOSpecID");
}
element.removeChild("ROSpecID", ns);
//parameter - not choices - no special actions needed
temp = element.getChild("SpecIndex", ns);
if (temp != null) {
specIndex = new SpecIndex(temp);
LOGGER.info(
"setting parameter specIndex for parameter ReaderExceptionEvent");
}
if (temp == null) {
LOGGER.info(
"ReaderExceptionEvent misses optional parameter of type specIndex");
}
element.removeChild("SpecIndex", ns);
//parameter - not choices - no special actions needed
temp = element.getChild("InventoryParameterSpecID", ns);
if (temp != null) {
inventoryParameterSpecID = new InventoryParameterSpecID(temp);
LOGGER.info(
"setting parameter inventoryParameterSpecID for parameter ReaderExceptionEvent");
}
if (temp == null) {
LOGGER.info(
"ReaderExceptionEvent misses optional parameter of type inventoryParameterSpecID");
}
element.removeChild("InventoryParameterSpecID", ns);
//parameter - not choices - no special actions needed
temp = element.getChild("AntennaID", ns);
if (temp != null) {
antennaID = new AntennaID(temp);
LOGGER.info(
"setting parameter antennaID for parameter ReaderExceptionEvent");
}
if (temp == null) {
LOGGER.info(
"ReaderExceptionEvent misses optional parameter of type antennaID");
}
element.removeChild("AntennaID", ns);
//parameter - not choices - no special actions needed
temp = element.getChild("AccessSpecID", ns);
if (temp != null) {
accessSpecID = new AccessSpecID(temp);
LOGGER.info(
"setting parameter accessSpecID for parameter ReaderExceptionEvent");
}
if (temp == null) {
LOGGER.info(
"ReaderExceptionEvent misses optional parameter of type accessSpecID");
}
element.removeChild("AccessSpecID", ns);
//parameter - not choices - no special actions needed
temp = element.getChild("OpSpecID", ns);
if (temp != null) {
opSpecID = new OpSpecID(temp);
LOGGER.info(
"setting parameter opSpecID for parameter ReaderExceptionEvent");
}
if (temp == null) {
LOGGER.info(
"ReaderExceptionEvent misses optional parameter of type opSpecID");
}
element.removeChild("OpSpecID", ns);
//parameter - not choices - no special actions needed
//we expect a list of parameters
customList = new LinkedList<Custom>();
tempList = element.getChildren("Custom", ns);
if ((tempList == null) || tempList.isEmpty()) {
LOGGER.info(
"ReaderExceptionEvent misses optional parameter of type customList");
} else {
for (Element e : tempList) {
customList.add(new Custom(e));
LOGGER.debug("adding Custom to customList ");
}
}
element.removeChildren("Custom", ns);
//custom parameter
tempList = element.getChildren("Custom", ns);
for (Element e : tempList) {
customList.add(new Custom(e));
atLeastOnce = true;
LOGGER.debug("adding custom parameter");
}
element.removeChildren("Custom", ns);
//end custom
if (element.getChildren().size() > 0) {
String message = "ReaderExceptionEvent has unknown element " +
((Element) element.getChildren().get(0)).getName();
throw new InvalidLLRPMessageException(message);
}
}
//setters
/**
* set message of type UTF8String_UTF_8 .
* @param message to be set
*/
public void setMessage(final UTF8String_UTF_8 message) {
this.message = message;
}
/**
* set rOSpecID of type ROSpecID.
* @param rOSpecID to be set
*/
public void setROSpecID(final ROSpecID rOSpecID) {
this.rOSpecID = rOSpecID;
}
/**
* set specIndex of type SpecIndex.
* @param specIndex to be set
*/
public void setSpecIndex(final SpecIndex specIndex) {
this.specIndex = specIndex;
}
/**
* set inventoryParameterSpecID of type InventoryParameterSpecID.
* @param inventoryParameterSpecID to be set
*/
public void setInventoryParameterSpecID(
final InventoryParameterSpecID inventoryParameterSpecID) {
this.inventoryParameterSpecID = inventoryParameterSpecID;
}
/**
* set antennaID of type AntennaID.
* @param antennaID to be set
*/
public void setAntennaID(final AntennaID antennaID) {
this.antennaID = antennaID;
}
/**
* set accessSpecID of type AccessSpecID.
* @param accessSpecID to be set
*/
public void setAccessSpecID(final AccessSpecID accessSpecID) {
this.accessSpecID = accessSpecID;
}
/**
* set opSpecID of type OpSpecID.
* @param opSpecID to be set
*/
public void setOpSpecID(final OpSpecID opSpecID) {
this.opSpecID = opSpecID;
}
/**
* set customList of type List <Custom>.
* @param customList to be set
*/
public void setCustomList(final List<Custom> customList) {
this.customList = customList;
}
// end setter
//getters
/**
* get message of type UTF8String_UTF_8.
* @return UTF8String_UTF_8
*/
public UTF8String_UTF_8 getMessage() {
return message;
}
/**
* get rOSpecID of type ROSpecID .
* @return ROSpecID
*/
public ROSpecID getROSpecID() {
return rOSpecID;
}
/**
* get specIndex of type SpecIndex .
* @return SpecIndex
*/
public SpecIndex getSpecIndex() {
return specIndex;
}
/**
* get inventoryParameterSpecID of type InventoryParameterSpecID .
* @return InventoryParameterSpecID
*/
public InventoryParameterSpecID getInventoryParameterSpecID() {
return inventoryParameterSpecID;
}
/**
* get antennaID of type AntennaID .
* @return AntennaID
*/
public AntennaID getAntennaID() {
return antennaID;
}
/**
* get accessSpecID of type AccessSpecID .
* @return AccessSpecID
*/
public AccessSpecID getAccessSpecID() {
return accessSpecID;
}
/**
* get opSpecID of type OpSpecID .
* @return OpSpecID
*/
public OpSpecID getOpSpecID() {
return opSpecID;
}
/**
* get customList of type List <Custom> .
* @return List <Custom>
*/
public List<Custom> getCustomList() {
return customList;
}
// end getters
//add methods
/**
* add element custom of type Custom .
* @param custom of type Custom
*/
public void addToCustomList(Custom custom) {
if (this.customList == null) {
this.customList = new LinkedList<Custom>();
}
this.customList.add(custom);
}
// end add
/**
* For TLV Parameter length can not be determined at compile time. This method therefore always returns 0.
* @return Integer always zero
*/
public static Integer length() {
return 0;
}
/**
* {@inheritDoc}
*/
public SignedShort getTypeNum() {
return TYPENUM;
}
/**
* {@inheritDoc}
*/
public String getName() {
return "ReaderExceptionEvent";
}
/**
* return string representation. All field values but no parameters are included
* @return String
*/
public String toString() {
String result = "ReaderExceptionEvent: ";
result += ", message: ";
result += message;
result = result.replaceFirst(", ", "");
return result;
}
}
|
package com.example.ra.inbound;
public interface TickListener {
void onTick(int value);
}
|
Dairy management practices associated with incidence rate of clinical mastitis in low somatic cell score herds in France. An epidemiological prospective study was carried out in French dairy herds with Holstein, Montbliarde, or Normande cows and with low herd somatic cell scores. The objective was to identify dairy management practices associated with herd incidence rate of clinical mastitis. The studied herds were selected on a national basis, clinical cases were recorded through a standardized system, and a stable dairy management system existed. In the surveyed herds, mean milk yield was 7420 kg/cow per yr and mean milk somatic cell score was 2.04 (132,000 cells/mL). Overdispersion Poisson models were performed to investigate risk factors for mastitis incidence rate. From the final model, the herds with the following characteristics had lower incidence rates of clinical mastitis: 1) culling of cows with more than 3 cases of clinical mastitis within a lactation; 2) more than 2 person-years assigned to dairy herd management; 3) balanced concentrate in the cow basal diet. Moreover, herds with the following characteristics had higher incidence rates of clinical mastitis: 1) milking cows loose-housed in a straw yard; 2) no mastitis therapy performed when a single clot was observed in the milk; 3) clusters rinsed using water or soapy water after milking a cow with high somatic cell count; 4) 305-d milk yield >7435 kg; 5) herd located in the South region; 6) herd located in the North region; 7) cows with at least 1 nonfunctional quarter; and 8) premilking holding area with a slippery surface. The underlying mechanisms of some highlighted risk factors, such as milk production level and dietary management practices, should be investigated more thoroughly through international collaboration. |
Investigation of immunogenicity of cryopreserved limbal stem cells. AIM To investigate changes in immunogenicity of cryopreserved limbal stem cells. METHODS Cryopreserved limbal stem cells, fresh primary limbal stem cells and blank controls were inoculated subcutaneously in C57BL-6 mice and the percentage of CD25 cells in limbal explants was determined by flow cytometry at day 21 post inoculation. Morphological studies were performed by light and electron microscopy of limbal explant sections. RESULTS The number of regional and systemic lymphocytes derived from cryopreserved limbal stem cells was lower than that from fresh primary limbal stem cells. CONCLUSION Lymphocytes derived from cryopreserved limbal stem cells showed changes in immunogenicity, but the significance is unknown. The cryopreservation and thawing methods await further study. |
/*
* Copyright 2021 Collate
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import classNames from 'classnames';
import React, { FC } from 'react';
import { Button } from '../../buttons/Button/Button';
import PopOver from '../../common/popover/PopOver';
import { FeedPanelHeaderProp } from './ActivityFeedPanel.interface';
const FeedPanelHeader: FC<FeedPanelHeaderProp> = ({
onCancel,
entityField,
className,
noun,
onShowNewConversation,
}) => {
return (
<header className={className}>
<div className="tw-flex tw-justify-between tw-py-3">
<p data-testid="header-title">
<span data-testid="header-noun">
{noun ? noun : 'Conversation'} on{' '}
</span>
<span className="tw-heading">{entityField}</span>
</p>
<div className="tw-flex">
{onShowNewConversation ? (
<PopOver
position="bottom"
title="Start conversation"
trigger="mouseenter">
<Button
className={classNames('tw-h-7 tw-px-2')}
data-testid="add-new-conversation"
size="small"
theme="primary"
variant="outlined"
onClick={() => {
onShowNewConversation?.(true);
}}>
<FontAwesomeIcon icon="plus" />
</Button>
</PopOver>
) : null}
<svg
className="tw-w-5 tw-h-5 tw-ml-2 tw-cursor-pointer tw-self-center"
data-testid="closeDrawer"
fill="none"
stroke="#6B7280"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
onClick={onCancel}>
<path
d="M6 18L18 6M6 6l12 12"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
/>
</svg>
</div>
</div>
<hr className="tw--mx-4" data-testid="bottom-separator" />
</header>
);
};
export default FeedPanelHeader;
|
Characterization of ARF-BP1/HUWE1 Interactions with CTCF, MYC, ARF and p53 in MYC-Driven B Cell Neoplasms Transcriptional activation of MYC is a hallmark of many B cell lineage neoplasms. MYC provides a constitutive proliferative signal but can also initiate ARF-dependent activation of p53 and apoptosis. The E3 ubiquitin ligase, ARF-BP1, encoded by HUWE1, modulates the activity of both the MYC and the ARF-p53 signaling pathways, prompting us to determine if it is involved in the pathogenesis of MYC-driven B cell lymphomas. ARF-BP1 was expressed at high levels in cell lines from lymphomas with either wild type or mutated p53 but not in ARF-deficient cells. Downregulation of ARF-BP1 resulted in elevated steady state levels of p53, growth arrest and apoptosis. Co-immunoprecipitation studies identified a multiprotein complex comprised of ARF-BP1, ARF, p53, MYC and the multifunctional DNA-binding factor, CTCF, which is involved in the transcriptional regulation of MYC, p53 and ARF. ARF-BP1 bound and ubiquitylated CTCF leading to its proteasomal degradation. ARF-BP1 and CTCF thus appear to be key cofactors linking the MYC proliferative and p53-ARF apoptotic pathways. In addition, ARF-BP1 could be a therapeutic target for MYC-driven B lineage neoplasms, even if p53 is inactive, with inhibition reducing the transcriptional activity of MYC for its target genes and stabilizing the apoptosis-promoting activities of p53. Introduction Human Burkitt lymphoma (BL) is characterized in most cases by reciprocal chromosomal translocations that juxtapose the MYC proto-oncogene with immunoglobulin (Ig) heavy chain or light chain regulatory sequences resulting in deregulation of MYC transcription. Since MYC is critically involved in both G0→G1 cell cycle entry and cell cycle progression, both mRNA and protein levels must be tightly regulated to prevent abnormal cell growth. Normally, both MYC mRNA and protein exhibit rapid turnover with protein instability manifested by a half-life of less than 30 min. Increased levels of MYC protein are reported in many cancers and have, in some instances, been associated with extended half-lives for BL and pediatric lymphoblastic lymphoma (LL). High levels of MYC protein in cancers may thus reflect impairment of degradation pathways as well as increased transcription. MYC stability and transcriptional activity are both affected by multiple posttranslational modifications including phosphorylation, acetylation and ubiquitylation that serve to integrate the input from multiple signaling cascades. At least four different E3 ligase complexes contribute to MYC ubiquitylation and proteasome-mediated degradation: SKP2, FBW7, ARF-BP1/HUWE1/HECT9, and the recently described TRUSS-DDB1-CULA complex. In each instance, overexpression of a dominant negative form, knockdown or gene deletion led to decreased MYC turnover. A comprehensive model for how the activity of these complexes is assimilated to direct MYC transcriptional activity and protein stability in different types of normal cells or in cancers, including MYC-associated human BL and mouse MYC-driven lymphomas, has not been developed. Information on the features of each of these complexes has nonetheless been accumulating at an accelerated rate. Recent studies showed that SKP2 is expressed at high levels in most BL as well as lymphomas of E-MYC transgenic (TG) mice. The mouse lymphomas are phenotypically similar to normal immature or transitional B cells and together with tumors of -MYC TG mice have been classified as diffuse high-grade blastic B cell lymphoma/leukemia (DBLL). Increased expression of SKP2 in DBLL was shown to be MYC-dependent but indirect, involving transcriptional as well as posttranslational mechanisms. SKP2 interacts with MYC at promoters, acting as a co-factor for transcriptional activation, but subsequently mediates polyubiquitylation and proteasomal degradation. The action of FBW7 on MYC requires prior phosphorylation at Ser-62 as a prerequisite for GSK3-dependent phosphorylation at Thr-58. FBW7, recruited to MYC phosphorylated at Thr-58, polyubiquitylates MYC, branching through Lys-48, and leading to its proteasomal degradation. Although FBW7 has been considered as the primary determinant of MYC degradation, the finding that MYC protein levels are not enhanced by expression of stable Thr-58 mutants is inconsistent with this conclusion. The potential contributions of FBW7 downregulation to the development of BL have not been explored. The TRUSS-DDB1-CUL4 E3 ligase complex targets both MYC and MYCN for ubiquitylation and proteasomal degradation independent of MYC phosphorylation on Thr-58. TRUSS expression is reduced in tumor cells, suggesting that downregulation may promote tumor formation by enhancing MYC protein stability. However, the previous tumor survey did not include hematopoietic neoplasms and, more specifically, BL. The transcriptional activity of MYC is enhanced by recruitment of the histone acetyl transferases (HATs) CBP/p300 to gene promoters. Subsequent binding of ARF-BP1 results in polyubiquitylation with Lys-63 branching which does not lead to degradation but lead to enhanced interaction with CBP/p300 and stimulation of MYC acetylation. ARF-BP1 has also been shown to ubiquitylate p53, thereby promoting its degradation. These activities of ARF-BP1 are inhibited by binding to ARF. Again, the potential role of ARF-BP1 in modulating MYC-activated pathways in B cell lymphomagenesis has not been investigated. The current studies were undertaken to better understand the complex dynamics of ARF-BP1 and its partner proteins and targets in the transformation of B lineage cells by MYC, utilizing BL cell lines and cell lines derived from DBLL of MYC TG mice. Our study aims to support the hypothesis that by regulating MYC and p53 transcriptional activity, ARF-BP1 is a critical determinant of the proliferation of B cell lymphomas and suggest that interference with ARF-BP1 provides a potential strategy to inhibit MYC activity in these tumors. ARF-BP-1 Is Expressed at High Levels in MYC-Driven Human BL and Mouse DBLL Constitutive MYC-dependent activation of a large number of genes involved in a broad range of metabolic processes is responsible for the development of a variety of cancers. Dosage-dependent effects of MYC on transformation are well established, and studies of primary human solid tumors have shown that levels of ARF-BP1 expression parallel the requirements for MYC in proliferation. To examine the potential contributions of ARF-BP1 to MYC-driven B cell neoplasms, we elected to study cell lines derived from human BL and mouse DBLL from -MYC TG mice. We first examined the levels of ARF-BP1 protein expressed by BL cell lines mutant for p53, EBV-transformed lymphoblastoid cells (LCL) lines with wild type (wt) p53, centroblastic (CB) and immunoblastic (IB) diffuse large B cell lymphomas (DLBCL), and the epithelial cell line, MCF 10A ( Figure 1A). These studies showed that ARF-BP1 was expressed at higher levels by the BL cell lines than by the DLBCL lines and that MCF 10A cells were completely negative. In addition, it appeared that the levels of ARF-BP1 expression were higher in the BL lines bearing p53 mutations than in the LCL with a wt p53 gene. The relative protein levels of ARF and MYC to ARF-BP1 were nearly similar for each of the cell lines ( Figure 1A). Parallel studies of mouse cell lines established from primary small B cell lymphomas (SBL), DBLL and splenic marginal zone lymphomas (MZL) showed that ARF-BP1 was expressed at uniquely high levels in MYC-driven DBLL ( Figure 1B). These findings indicate that ARF-BP1 is expressed at high levels in human and mouse B lineage lymphomas that express MYC at high levels. We next proceeded to determine the patterns of expression for ARF-BP1 and its established partner and target proteins, ARF, p53 and Myc, by qRT-PCR analyses of transcript levels in a large panel of primary B cell lineage neoplasms from NFS.V + mice diagnosed as SBL, DLBCL of centroblastic (CBL) and immunoblastic (IBL) types, DBLL, and MZL ( Figure 1C). This analysis includes plasmacytoma (PCT) cell lines from BALB/c mice as NFS.V + PCT are infrequent. We also studied the same tumors for expression of CTCF, a versatile transcription factor previously shown to be involved in regulating the expression of ARF, p53 and MYC. The results showed that ARF-BP1 and ARF were expressed at the highest levels in cells over-expressing MYC from the -MYC TG or due to activating chromosomal translocations in PCT. These results are consistent with earlier studies indicating that MYC contributes to the transcriptional activation of ARF. There is currently no basis for understanding why transcript levels of ARF-BP1 levels are elevated in cells with deregulated MYC, although earlier studies indicated that ARF-BP1 is not a direct transcriptional target of MYC. Previous studies demonstrated protein-protein interactions between ARF-BP1 and ARF, MYC, p53 and MCL1 with some of these interactions being context-dependent. For example, access of ARF-BP1 to MCL1 is reported to occur only in cells exposed to DNA damaging agents. Interestingly, CTCF has been shown in unpublished studies to interact physically with MYC. These findings prompted us to ask if ARF-BP1 might interact with CTCF. We immunoprecipitated ARF-BP1 from SBL, DBLL and MZL-derived cell lines, separated the proteins by SDS-PAGE, and blotted with antibodies to ARF-BP1, ARF, p53, MYC and CTCF ( Figure 1D). Immunoprecipitation with normal IgG served as a negative control. The results showed that, as expected, ARF, p53 and MYC co-immunoprecipitated with ARF-BP1 from lysates of the DBLL cell line that expresses ARF-BP1 at high levels. Strikingly, a strong signal was also obtained for CTCF, identifying it as another component of this macromolecular complex. All four partner proteins were also brought down, but at lower levels, in precipitates from the SBL and MZL cell lines ( Figure 1D). The IP controls including protein-A-agarose beda, IgG and antibody against beta-actin that does not bind with ARF-BP1, did not produce bands when blotted with antibodies against ARF, ARF-BP1, p53, MYC, and CTCF (data not shown). Further studies would be required to determine which proteins in this complex interact directly with the others and which are pulled down through indirect interactions. ARF-BP1 Binds to and Ubiquitylates CTCF Previous studies demonstrated that the functional activity of CTCF is modulated by phosphorylation. In addition, SUMOylation contributes to the repressive function of CTCF on the MYC P2 promoter and poly-ADP ribosylation is reported to be important for CTCF-dependent chromatin insulation. The finding that CTCF and ARF-BP1 associate in vivo under pathologic conditions suggested that CTCF might also be modified by ARF-BP1-dependent ubiquitylation. To investigate this possibility, we performed studies using full length CTCF or the central CTCF zinc finger (ZF) region and showed that both constructs pulled down ARF-BP1 (data not shown). Although previous studies had shown that CTCF was post-translationally modified by the small ubiquitin-like protein SUMO with the repressive polycomb protein, Pc2, acting as a SUMO E3 ligase, there are no reports of CTCF modification by ubiquitylation. To determine if CTCF can be ubiquitylated in vivo, 293 cells were co-transfected with FLAG-CTCF and HA-tagged ubiquitin (HA-Ub) in the presence or absence of the proteasome inhibitor, MG132. The 293 cells were used rather than B cell lines because of technical limitations posed by efficient transfection of non-adherent cells. Cell lysates were precipitated with anti-FLAG. The precipitates were separated electrophoretically and immunoblotted with anti-HA-tag to detect ubiquitylated CTCF. The results of these studies ( Figure 2A) demonstrated that CTCF when overexpressed could be modified by ubiquitin and that polyubiquitylated forms were readily detected in cells blocked for proteasomal degradation. To determine if ARF-BP1 was capable of acting as an E3 ligase for CTCF, we co-transfected 293 cells with FLAG-CTCF, HA-Ub and increasing amounts of His-tagged C-terminal region of ARF-BP1 that contains the HECT domain, aa 3674-4374. Protein lysates were precipitated with anti-FLAG and the precipitates separated electrophoretically and immunoblotted with anti-HA to detect ubiquitylated CTCF. The results ( Figure 2B) showed that overexpression of ARF-BP1 resulted in enhanced polyubiquitylation of CTCF in a dose-dependent manner, identifying ARF-BP1 as an E3 ligase for CTCF. We then asked if ARF-BP1 might be active in ubiquitylating endogenous CTCF. 293 cells treated with MG132 were transfected with Ha-Ub and His-ARF-BP1 and lysed 6 h later. HA-Ub-modified proteins were immunoprecipitated with anti-HA mAb, and then analyzed for the extent of CTCF ubiquitylation by immunoblotting with a mAb to CTCF. These studies ( Figure 2C) showed that endogenous CTCF was constitutively ubiquitylated and that the levels of modification were greatly increased in cells overexpressing ARF-BP1. Our earlier studies suggested that when CTCF was overexpressed, ubiquitylation directed the protein to proteasomal degradation. To determine if ubiquitylation by ARF-BP1 would affect the stability of endogenous CTCF, 293 cells were transfected with empty vector or vector expressing His-tagged ARF-BP1. The cells were harvested 24 h later and endogenous CTCF levels were determined by immunoblotting and quantified by densitometry using tubulin levels as a control ( Figure 2D). The results showed that the levels of endogenous CTCF were reduced by nearly 50% in cells overexpressing ARF-BP1. We conclude that ARF-BP1 is an E3 ligase for endogenous CTCF and that polyubiquitylation of CTCF leads to its proteasomal degradation. ARF-BP1 Ubiquitylates MYC in B Lineage Cells Previous studies using U2OS, HeLa and 293 cells demonstrated that ARF-BP1 catalyzes K-63-linked ubiquitylation of MYC thereby switching MYC from a repressive to an activating state. To determine if MYC is ubiquitylated by ARF-BP1 in B cell neoplasms, we first took advantage of the P493-6 human B cell line that is derived from an EBV-immortalized B cell line and carries a conditional tetracycline-regulated MYC. Protein extracts from cells with MYC "on" (Myc+) and Myc "off" (Myc−) were precipitated with antibodies to its transcriptional partner protein, MAX, separated by SDS-PAGE and blotted with antibodies to ubiquitin or MYC ( Figure 2E, left panel). The results revealed multiple bands reactive with the anti-Ub antibodies in the extracts from MYC "on" cells but not MYC "off" cells, demonstrating that MYC is highly ubiquitylated as in other cell types. To determine if ARF-BP1 was responsible for MYC ubiquitylation, we performed similar studies with MYC+ cells that had been treated with an ARF-BP1-specific or a control siRNA ( Figure 2E, right panel). The results showed that, as previously established for other cell types, MYC ubiquitylation in B lineage cells was highly dependent on ARF-BP1. Inactivation of ARF-BP1 Stabilizes p53, Induces p53-Dependent Apoptosis, and Reduces Cell Proliferation in -MYC TG Cells We next examined the effects of changes in ARF-BP1 levels induced by suppressive siRNA on expression of p53, the p53 transcriptional targets, p21 and BAX, and on CTCF ( Figure 3A). A DBLL cell line derived from a -MYC lymphoma that was treated with an ARF-BP1-specific siRNA had greatly increased levels of each of these proteins, consistent with studies performed with cells from other lineages. The effects of ARF-BP1 suppression on CTCF were in keeping with our earlier studies indicating that ubiquitylation enhanced proteasomal degradation of the protein. Interestingly, the enhanced levels of p53 protein associated with ARF-BP1 knockdown were not associated with increased protein stability, suggesting important contributions from other degradative and presumably ARF-BP1-dependent mechanisms ( Figure 3B). The changes in expression of p53, p21 BAX and CTCF induced by siRNA to ARF-BP1 were reflected by changes in cell cycle regulation and apoptosis. As shown in Figure 3C, cells treated with the ARF-BP1-specific siRNA had reduced frequencies of cells in cycle and had greatly increased numbers of sub-G1 cells, indicative of an apoptotic population. Discussion The functions of the p53 tumor suppressor protein and the MYC oncogene are finely tuned through a myriad of interactions with other proteins. These interactions can lead to posttranslational modifications that regulate protein stability, DNA binding or promoter-specific transcriptional activation or repression. It is currently well accepted that ubiquitylation plays a major part in regulating the activities of both p53 and MYC and that this reflects the activities of a seemingly ever increasing number of different E3 ligases. ARF-BP1 is unique among these E3 ligases in that it targets both p53 and MYC with profound effects on the development and growth of a variety of MYC-driven solid tumors. Firstly, the results presented here demonstrated that ARF-BP1 was also highly expressed in MYC-dependent B cell lineage neoplasms of both humans and mice. Interestingly, the mouse neoplasms that expressed ARF-BP1 at high levels derived from near opposite ends of the mature B cell developmental spectrum in mice including DBLL that derive from pre-germinal center (pre-GC) B cells to PCT, which originate from mature plasma cells. In humans, they also included BL and DLBCL of GC origin. Secondly, depletion of ARF-BP1 in a DBLL cell line resulted in inhibition of cell cycle progression and increased apoptosis. These results paralleled to previous studies of ARF-BP1 knockdowns in MYC-dependent human tumor cell lines raising the possibility that ubiquitylation of MYC may be the defining function of ARF-BP1 in tumor survival and proliferation. Importantly, ARF-BP1 was expressed in human tumors and LCL expressing either wt or mutant p53 supporting the suggestion that it could be a therapeutic target in a variety of MYC-dependent lymphomas or EBV-dependent lymphoproliferative disorders regardless of p53 status. Thirdly, while previous studies had shown that ARF, ARF-BP1 and MYC could form a ternary complex, our analyses of DBLL cells demonstrated that ARF-BP1 could be part of an even larger multiprotein complex that also includes p53, MAX and CTCF. The presence of p53 and MAX in this complex can probably be understood as a consequence of p53 being a known target of ARF-BP1 and the partnership of MYC and MAX in MYC transcriptional activation promoted by ubiquitylation of MYC by ARF-BP1. The identification of CTCF as part of this complex is of particular interest for several reasons; the first is its contributions to regulated expression of other protein components of the complex (Figure 4). Binding of CTCF to the p53 promoter is reported to protect the gene from epigenetic silencing, while methylation-sensitive binding to sequences in the regulatory region is required for activation of the INK4A/ARF locus. Secondly, binding of CTCF at the human MYC locus is required for gene expression and protection from methylation. Finally, ectopic expression of CTCF results in profound inhibition of cell cycle progression, phenotypes we found to be associated with depletion of ARF-BP1. The interactions of ARF-BP1and CTCF were shown to require the central 11 ZF DBD of CTCF and the C-terminal region of ARF-BP1 that contains the HECT E3 ligase domain. Studies using transfected CTCF showed that it was polyubiquitylated, the levels of ubiquitylation were increased following co-transfection with an ARF-BP1 expression vector and the effect of ubiquitylation was to direct modified CTCF to proteasomal degradation. Finally, we showed that polyubiquitylation was not dependent on overexpression of CTCF and the levels of endogenous CTCF ubiquitylation were increased in cells co-transfected with ARF-BP1. Previous studies showed that CTCF interacts with a wide range of proteins that may approach 60 in number and include YY1, PARP1, NPM, UBF, cohesins, and RNAPII among others. Although CTCF was previously shown to be modified post-translationally by SUMOylation, phosphorylation and poly(ADP) ribosylation, to our knowledge this is the first report that CTCF is modified by ubiquitylation. While the other modifications affect the functional activity of CTCF, they have not been reported to alter its stability. Currently, we do not know if ARF-BP1 is the only E3 ligase capable of modifying CTCF, the nature of ubiquitylation, or if ubiquitylation is countered by the activity of deubiquitylating enzymes such as DUB1. It will be very important to determine the sub-cellular localization of the ARF-BP1-CTCF interaction. If it occurs in the nucleus, it may counteract SUMOylation. Since SUMOylated CTCF inhibits MYC promoters, ubiquitylation may result in transcriptional activation at these target sites. CTCF is a highly versatile protein that serves a wide variety of functions. At present, it is unsure whether these functions might be affected by changes in CTCF levels along with cell cycle progression, stress or differentiation or by differences in subcellular localization of CTCF. Ub Ub Ubiquitylation plays a key role in regulating the activity of multiple oncoproteins, including those of the MYC family. MYC is a short-lived protein that is degraded through the ubiquitin-proteasome pathway. The F Box E3 ligase, FBW7, recognizes MYC phosphorylated at threonine 58 by GSK3, polyubiquitylates MYC, and then leads its degradation by the 26S proteasome. Inhibition of GSK3 stabilizes MYC in lymphoma patients. However, ubiquitylation of transcription factors does not necessarily result in inhibition, although it can control their activity independent of proteasomal degradation. It has been reported that the switch between transcriptional activation and repression by MYC is regulated by site-specific ubiquitylation. SKP2 is another E3 ligase for MYC ubiquitylation, binding to a conserved sequence element in the amino-terminus. This is thought to be essential for transformation and transcriptional regulation. It has been shown that ARF-BP1 also functions as an E3 ubiquitin ligase for MYC and it regulates the switch between the activated and repressed state of the MYC protein. Inactivation of ARF-BP1 repressed MYC ubiquitylation in -MYC cells that express a high level of activated MYC. Previous studies demonstrated that ARF-BP1 assembles Lys63-linked polyubiquitin chains on MYC and this modification is required for gene activation by MYC, allowing the interaction of MYC with the p300 coactivator. Such K63-linked polyubiquitin chains do not target proteins for proteasomal degradation; instead they regulate the function of the modified protein. However, a recent report has shown that ARF-BP1 ubiquitylates MYCN through Lys48-mediated linkages and thereby targets it for destruction by the proteasome. The induction of ARF by MYC resulting in inhibition of ARF-BP1 may serve as a negative feedback loop to limit excessive MYC function. Recent support for the concept that ARF-BP1 is critically important in regulating the balance between pathways governing survival and death of B cell lineage lymphomas, in part through effects on p53, comes from studies of mice with a B cell-specific deficiency in ARF-BP1. Mutant B cells exhibited elevated expression of p53 and of p53 target genes in association with impaired development and homeostasis. Similar conclusions regarding ARF-BP1 control of p53 activity were drawn from studies of pancreatic B cells conditionally deficient in expression of ARF-BP1. As summarized in Figure 4, the studies presented here identify a previously unrecognized component of an interacting network of proteins that control proliferation and apoptosis in MYC-driven B cell lineage lymphomas of mice and humans. To the well-documented interactions between ARF-BP1, MYC, p53 and MDM2, established from studies of a variety of solid tumors, we have now added the multifunction nuclear factor, CTCF, and showed that it is part of the scaffolding of a multimolecular complex. The effects of CTCF on the transcription of MYC, ARF and p53 are certainly nucleoplasmic and the ARF-BP1-CTCF interactions are equally certain to be nuclear and directly chromatin-associated as there is little or no cytoplasmic CTCF and almost all CTCF appears to be tightly chromatin bound. It will be of interest to determine if all CTCF is equally accessible to ARF-BP1 as it is in nucleus during interphase, associates with the centrosome during mitosis and localizes to the midbody and reformed nuclei during telophase. How ubiquitylation relates to other post-translational modifications will also be of considerable interest. Finally, it remains to be determined if the sole effect of ARF-BP1-mediated ubiquitylation on CTCF is to direct proteasomal degradation. Mice and Cell Lines NFS.V + mice that develop a spectrum of B cell lineage neoplasms and -MYC TG mice were described previously. Tissues obtained at necropsy were used for tumor classification using established criteria, and for later preparation of RNA, DNA and protein extracts. Plasmacytoma (PCT) cell lines were a gift from Michael Potter (NCI, NIH, Bethesda, MD, USA). All animal studies were performed under NIAID IACUC approved protocol LIP6. Single cell suspensions prepared from spleen or lymph nodes of tumor bearing -MYC TG mice were cultured to develop cell lines. The cell lines were shown to be clonal based on Southern blot analyses of immunoglobulin heavy chain organization and were found to be phenotypically similar to normal splenic transitional B cells. Human BL and EBV-transformed LCL cell lines were generously provided by G.W. Bornkamm and M.D. Scharff (BL2). Human diffuse large B cell lymphoma (DLBCL) cell lines VAL and LY were a gift from R. Dalla-Favera. MCF 10A, and HEK 293 cell lines are from our laboratories. RNA Isolation and Analysis by Quantitative RT-PCR (qRT-PCR) Total RNAs were isolated from tumor cells and used for qRT-PCR as described previously. Primers designed using the Primer Express software (Applied Biosystems, Foster City, CA, USA). All samples were tested in triplicate. The comparative C T method was used for quantification of gene expression. Statistical analysis was performed using SDS v2.1 software (Applied Biosystems) according to the manufacturer's instructions. Gapdh was used as an endogenous reference. Ubiquitylation Assay For detection of protein ubiquitylation, cells were washed with ice-cold PBS and lysed in a NP40-containing buffer (50 mM Tris-HCl , 250 mM NaCl, 5 mM EDTA, 50 mM NaF, 1 mM Na 3 VO 4, 1% NP40, 0.02% NaN 3, 1 mM PMSF, and protease inhibitor cocktail ) for 30 min on ice. Extracted proteins were pre-cleared with protein G agarose beads (Invitrogen) followed by incubation with 5 g Ab coupled to protein G agarose beads overnight at 4 °C. Beads were washed three times in 20 vol of ice-cold lysis buffer, resuspended in 1 NuPAGE LDS sample buffer (Invitrogen) containing 50 nM DTT, and boiled for 5 min. Equal amounts of protein for each sample were separated on 3-8% Tris-Acetate gels (Invitrogen) and subsequently transferred to PVDF membranes (Invitrogen) in 1X NuPAGE transfer buffer (Invitrogen). After blocking with 5% skim milk for 1 h in PBS-T (0.1% Tween 20 in PBS), membranes were subsequently incubated with primary Abs and then with respective HRP-conjugated secondary Abs (Santa Cruz). Blots were developed with either SuperSignal West Pico or Dura (Pierce) and exposed to Biomax MR film (Kodak). Cell Cycle Analysis The Click-iT EdU Flow Cytometry Assay Kit (Invitrogen) was used to analyze cell cycle, according to the manufacturer's instructions. Conclusions Taken together, the present findings demonstrated that ARF-BP1 is an important determinant in MYC-driven lymphoid malignancies of mice and humans by virtue of its interactions with ARF, p53 and MYC, as well as CTCF (Figure 4). ARF-BP1 can act to promote BL tumor development by: inducing ubiquitylation and degradation of p53; enhancing the transcriptional activity of MYC; and by direct ubiquitylation of CTCF. Down-regulation of ARF-BP1 could be an important therapeutic target for MYC-driven B cell lineage neoplasms, especially for cases with p53 aberrations, by reducing transcriptional activation of MYC target genes. ARF-BP1 may thus provide a potential target for developing improved treatments for human BL. |
/*
* Copyright (C) 2017 Google 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 com.google.cloud.public_datasets.goes16;
import org.apache.beam.runners.dataflow.options.DataflowPipelineOptions;
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.io.gcp.pubsub.PubsubIO;
import org.apache.beam.sdk.options.Default;
import org.apache.beam.sdk.options.Description;
import org.apache.beam.sdk.options.PipelineOptionsFactory;
import org.apache.beam.sdk.transforms.DoFn;
import org.apache.beam.sdk.transforms.ParDo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Scales out the APDetector to a large number of volume scans
*
* @author vlakshmanan
*
*/
public class ListenPipeline {
private static final Logger log = LoggerFactory.getLogger(ListenPipeline.class);
public static interface MyOptions extends DataflowPipelineOptions {
@Description("Output directory")
@Default.String("gs://cloud-training-demos-ml/goes16/")
String getOutput();
void setOutput(String s);
}
@SuppressWarnings("serial")
public static void main(String[] args) {
MyOptions options = PipelineOptionsFactory.fromArgs(args).withValidation().as(MyOptions.class);
options.setTempLocation(options.getOutput() + "staging");
Pipeline p = Pipeline.create(options);
String topic = "projects/gcp-public-data---goes-16/topics/gcp-public-data-goes-16";
// listen to topic
p//
.apply("ReadMessage", PubsubIO.readStrings().fromTopic(topic)) //
.apply("ParseMessage", ParDo.of(new DoFn<String, String>() {
@ProcessElement
public void processElement(ProcessContext c) throws Exception {
String message = c.element();
String[] fields = message.split(" ");
for (String f : fields) {
if (f.startsWith("objectId=")) {
String objectId = f.replace("objectId=", "");
c.output("gs://gcp-public-data-goes-16/" + objectId);
}
}
}
})) //
.apply("ProcessFile", ParDo.of(new DoFn<String, String>() {
@ProcessElement
public void processElement(ProcessContext c) throws Exception {
String gcsFileName = c.element();
log.info("Processing " + gcsFileName);
}
}));
p.run();
}
}
|
Getting Into History hile historians like Hayden White have busily been trying to get out of history, feminist literary critics have been just as energetically trying to get into it.1 Since women as historical subjects are rarely included in "History" to begin with, the strong feminist interest in forging a new historicity that moves across and against "his story" is not surprising. What is more surprising perhaps is the particular form these new feminist approaches to historicism are taking: feminism enacts its engagement with history through a fetishistic fascination with its own historical roots both as a theory and as a practice. But this may be precisely the problem: histories of feminist theory have come to stand in for more rigorous feminist theories of history. Feminism's vexed relation to historicism is not so much alleviated as exacerbated by these recent attempts to deal with the category of history by tracing feminism's own genealogical roots. The exercise is not a pointless one (far from it) ; it is simply insufficient to answer the still serious charges of "ahistoricism" that seem to plague feminist theorists at every turn, even and especially those self-professed materialist literary critics who have made the most impassioned and most persuasive pleas for a historicist feminism. Toril Moi's Sexua/Textua Politics: Feminist Literary Theory is arguably the first systematic investigation of feminist literary criticism's theoretical presuppositions, and it has already received the serious and sustained attention such innovative critical work deserves. 2 My interest |
Studies on Mechanical, Thermal, and Flame Retarding Properties of Polybutadiene Rubber (PBR) Nanocomposites An effect of nanosize CaCO3 on physical, mechanical, thermal and flame retarding properties of PBR was compared with commercial CaCO3 and fly ash filled PBR. CaCO3 at the rate of 9, 15, and 21 nm were added in polybutadiene rubber (PBR) at 4, 8 and 12 wt.% separately. Properties such as swelling index, specific gravity, tensile strength, Young's modulus, elongation at break, modulus at 300% elongation, glass transition temperature, decomposition temperature, flame retardency, hardness, and abrasion resistances were determined. The swelling index decreased and specific gravity increased with reduction in particle size of fillers in PBR composites. There was significant improvement in physical, mechanical, thermal and flame-retarding properties of PBR composites due to a reduction in the particle size of fillers. Maximum improvement in mechanical and flame retarding properties was observed at 8 wt.% of filler loading. This increment in properties was more pronounced in 9 nm size CaCO3. The results were not appreciable above 8 wt.% loading of nano fillers because of agglomeration of nanoparticles. In addition, an attempt was made to consider some thermodynamically aspects of resulting system. The cross-linkage density has been assessed by Flory-Rehner equation in which free energy was increased with increase in filler content. |
Religion and cancer prevention: study protocol for a systematic review Introduction Several studies explored a relationship between religiousness and the utilisation of cancer screenings, as religious people may obtain an increased social network or could have certain personality traits that enhance screening use. To the best of our knowledge, there is no systematic review that sums up the evidence gained from research on that relationship. Thus, our review aims to appraise the findings of observational studies regarding that relationship. Its findings may be useful in addressing specific target groups to increase ineffectively the low cancer screening rates. Methods and analysis Employing a predefined search algorithm, three online databases (CINAHL, PsycInfo and PubMed) will be searched. In addition, the bibliographies of the studies included in our review will be searched through manually and independently by two reviewers. We are looking for observational studies (both cross-sectional and longitudinal) which examine the association between religion and cancer screening utilisation. However, studies regarding specific samples (as ethnic minorities or religious sects) will be excluded. We expect that the studies examine various dimensions of religion, such as religious attendance or religious intensity. We will extract data that describe methodology, sample characteristics and the findings concerning our object of investigation. Moreover, a quality assessment will be performed. Two reviewers will independently select the studies, extract the data and assess the studies quality. Disagreements will be dissolved by discussion or by inclusion of a third party. The findings will be presented narratively in text and tables. If possible, a meta-analysis will be carried out. Ethics and dissemination As no primary data are collected, the approval from an ethics committee is not required. Our review will be published in a peer-reviewed, scientific journal. PROSPERO registration number CRD42021229222. INTRODUCTION Cancer is one of the most important health issues worldwide. In 2018, there were 9.6 million deaths due to this disease. In addition, prevalence increased during the last years. 1 That process is expected to continue, as demographic ageing is correlated with several types of cancers. 2 Though, it is worth mentioning that survival rates increase as well. 3 Preventive healthcare is critical to increase those rates. It is commonly divided into three groups: Primary preventive interventions aim to reduce the prevalence of an illness, secondary prevention aims to enable an early detection and tertiary prevention tries to prohibit a worsening after a disease's detection. Regarding cancer screenings, secondary preventive strategies include procedures such as cervical screening, breast examination or colonoscopy. These examinations are supported by national health systems to reduce disease burden. For instance, German public health insurances cover the costs for all screenings whose efficacy has been demonstrated. Though such efforts have been made, the utilisation of preventive cancer screenings is not appropriate. 4 To resolve that underuse, research has revealed several determinants predicting the utilisation of secondary cancer prevention. They can be categorised into predisposing (such as age and sex), enabling (such as income and education) and need variables (such as health status), according to the Andersen behavioural model of health service utilisation. 5 Regarding predisposing and enabling factors, higher age, 6-8 female gender 4 and better education 9 were found to increase the likelihood of participation in cancer screenings. Yet, among certain types of screenings, some studies revealed opposing results for age and gender. 10 11 In addition, several need factors influence the likelihood of taking cancer screenings. A bad health status, 10 the presence of health conditions 6 Strengths and limitations of this study ► This is the first systematic review exploring the association between religiousness and participation in cancer screenings. ► To fulfil high-quality standards, all steps are carried out independently by two reviewers. ► The heterogeneity between the studies included in our review could prohibit the conduction of a meta-analysis. ► Our review only includes studies written in German or English language. Open access and the occurrence of cancer in one's family 12 were positively related to screening participation. However, social factors can also influence preventive healthcare utilisation. Prior research has shown that there is a positive association between religiousness and the utilisation of preventive cancer screenings. 6 13-21 Hereby, religion is usually operationalised as religious denomination, religiousness and religious attendance. This somewhat matches the classification of religion established by Glock,22 with religious denomination representing the 'belief' dimension, religiosity the 'feeling' aspect and religious attendance the 'practice' dimension. There are various pathways which could explain that relationship. First, religion could increase one's sensitivity towards one's own body, as a positive association between spirituality and healthy behaviours has been revealed by previous studies. 23 24 Second, a religious community could provide social support, which helps their members to take care of themselves. Such a church-based support is also positively related to a healthy lifestyle. 25 Third, people who regularly participate in religious activities could have certain traits that promote the uptake of preventive screenings. For example, religious attendance is positively related with conscientiousness 26 which is in turn positively related to participation in cancer screenings. 27 On the other hand, some studies do not reveal a significant association for outstandingly religious people, 21 who tend to have some fatalistic beliefs about health issues and, therefore, do not perceive a high impact of traditional medical procedures. 28 All in all, it seems that religion could be both beneficial and inhibitive to healthcare use, so that investigations concerning this matter need to consider other factors, such as its intensity, as well: a higher importance of religion in one's life is related to factors which were shown to increase the use of health services, such as social support, the sensitivity towards one's own body and healthy behaviours but could also lead to a decreasing belief in the usefulness of traditional medicine. To clarify the relevance of these pathways, it could be helpful to synthesise the evidence from studies which examine the role of religion and specifically its intensity on the use of cancer screening. Moreover, the importance and even the direction of the pathways introduced above could also considerably vary between countries. For example, religion may play a bigger role in American healthcare than in its European counterpart, 29 which would strengthen its role in healthcare utilisation and nearby interventions. Finally, cancer care may also be specifically related to religion, as previous studies particularly stress the spiritual dimension of cancer care, 30 which, on the other hand, is also meaningful to care in general. 31 All in all, it seems reasonable to assume that cancer screenings are related to religion as well, but direction and intensity of this relationship are not self-evident. Therefore, there are also some reviews on the association between religion and cancer screenings: on the one hand, religion was identified as a potential barrier to breast cancer screening utilisation in low-income and middle-income countries. Hereby, it was interpreted as a mediator between upholding traditional cultural beliefs and the use of preventive medicine. 34 On the other hand, a review on faith-based interventions revealed that they can increase the knowledge about cancer screenings. 35 Thus, all these works focus on specific regions. To the best of our knowledge, there is no review that solely focuses on all studies on the influence of religion on cancer screening utilisation. Regarding the different results, an overview on findings concerning this association could identify individuals at risk for low screening rates and hereby lay the groundwork for interventions related to religion that would assist in increasing the ineffectively low screening rates. Thus, the aim of this systematic review is to summarise the quantitative evidence on the association between religion and cancer screening utilisation. We abstained from including studies that were using other research methods, such as qualitative ones, because they tend to differ widely in their approaches by which they assess potential associations between different factors. Through this, synthesising the evidence that was gained from the papers which we considered for our review would require additional and specific methods besides the ones we already have to apply to synthesise the results that were gained through quantitative approaches. Furthermore, the latter designs are more likely to produce results which can be generalised and also measure the strength of an association. Regarding the organisational and social aspects of religion, which were underlined by recent research that regarded religion's relationship to health outcomes, 36 we decided to solely focus on this construct, and to exclude spirituality as long as it is not related to religion, as it does not include these kinds of aspects. That separation may also be justified by the social aspect, which is more present in religion than in spirituality, and which was found to be significantly related to religion's influence on health-related outcomes. 36 We expect different aspects of religion to be represented among the evidence found on its association to cancer screenings, such as its intensity 15 or religious attendance. 21 Both these variables may enhance screening use due to the pathways which we described above. Such a review could help to increase the quite low screening rates, 4 for example, by identifying populations who are at risk of underuse. This especially affects the lack of knowledge, which is among the most important barriers to screening uptake 8 and can at least partly be reduced by a stronger orientation towards religion. 35 With the evidence gained from this review, intervention designers could judge whether religious locations or religious people are appropriate target places or populations for certain actions, for example, whether information campaigns could take place in churches or whether highly religious people need to be more addressed by interventions. Our review could assist in identifying groups that are at risk of underusing cancer screenings, or in exploring Open access research gaps, such as a lack of longitudinal studies. In addition, as a quality assessment will be performed, so that possible quality limitations could be revealed. METHODS AND ANALYSIS This protocol is conducted under consideration of the Preferred Reporting Items for Systematic Reviews and Meta-Analyses (PRISMA) Protocols guidelines. 37 It is registered to the International Prospective Register of Systematic Reviews (PROSPERO). Eligibility criteria We will introduce our inclusion and exclusion criteria in the following two sections. Ahead of defining our final criteria, we will undertake a pretest. Therefore, a sample of 100 articles will be rated for eligibility. If necessary, we will modify our eligibility criteria. Inclusion criteria We will include: ► quantitative studies reporting the association between religion (confession, engagement or importance of religion) and cancer screening. ► studies published in scientific, peer-reviewed journals. Exclusion criteria We will exclude: ► studies not considering the relationship between religion and cancer screening. ► studies exclusively examining a specific sample (eg, sects or ethnic minorities), as the aim of our review is to summarise the existing evidence on the general association between religion and cancer screening utilisation and not to study how it turns out to be in specific groups. ► study design not observational, as we aim to conduct a quantitative review. ► studies not published in German or English. ► studies not published in scientific, peer-reviewed journals. Three leading medical and psychological online databases (CINAHL, PsycInfo and PubMed) will be searched in June 2020. While some guidelines (such as the Cochrane Guidelines) 38 recommend to include grey literature, we decided to exclude such literature in order to ensure a certain quality. Therefore, we only included peer-reviewed articles. We also abstained from using databases that do not account for the quality of the materials included, such as Google Scholar. Before submitting the final systematic review, the results will be updated, so that an up-to-date version is submitted. To identify eligible articles, a predefined search algorithm will be used. For further information, please see table 1. There are no restrictions regarding the year of the articles. Two reviewers will manually and independently scan the references from the articles included in our review. Data management Articles will be organised using EndNote V.20. If the heterogeneity between the study allows carrying out a meta-analysis, ( association between religious affiliation and use of cancer screenings, association between religious intensity and use of cancer screenings, association between religious attendance and use of cancer screenings), StataMP V.17.0 or RevMan V.5 will be used to do so. The outcome of a meta-analysis would be the utilisation of cancer screening. As there are several screening types, such as colonoscopy or mammograms, it could both be reasonable to consider all types of screenings or a specific one as the dependent variable. Our choice will mainly depend on the frequency by which the studies included in our review assess a specific procedure. Study selection process After searching the electronic databases and scanning the results they have provided, the articles will be rated for inclusion or exclusion in a two-step process that relies on the criteria specified in sections 2.2 and 2.3 during both stages. It will be carried out independently by two reviewers (BK and LB): first, titles and abstracts will be screened; second, if necessary, the full texts will be screened. Disagreements will be solved by discussion or by including a third party (AH). Open access Data collection process and data items Two reviewers (BK and LB) will extract the data: one will summarise the most important characteristics, the other one will perform a cross-check. Once more, if disagreements occur, they will be dissolved by discussion or by contacting a third party (AH). In case of ambiguity, the authors will be contacted. The following data will be extracted: study design, sample characteristics, measurements, statistical analysis and findings concerning the association between religion and cancer screening. This procedure is based on the requirements from the PRISMA guidelines. Assessment of study quality We rely on the quality assessment tool for healthcarerelated studies from Hohls et al and Stuhldreher et al. 39 40 Two reviewers (BK and LB) will rate the studies' quality. Again, disagreements will be resolved through discussion or together with a third person (AH). Data synthesis The study identification process will be illustrated employing a PRISMA flowchart. The results will be presented in both text and tables. If possible, our findings will be categorised by cancer screening (eg, mammography, colorectal screening) or by religious group (eg, Christians, Muslims). We will conduct a meta-analysis, if applicable. This mostly depends on the degree of heterogeneity between the studies included in our review. If the I test states that conducting meta-analysis is reasonable, this procedure will also be carried out by two authors (AH and BK). Random-effects or fixed-effects analyses grounded on inverse variance techniques will be applied. The results will also be displayed in ORs. Patient and public involvement statement The present protocol did not involve individual patients or public agencies. Strengths and limitations To the best of our knowledge, this is the first systematic review regarding the association between religion and participation in cancer screenings. It will fulfil highquality standards, as it is performed independently by two reviewers. Finally, several types of cancer screening are included. However, a potential weakness could be the heterogeneity between the studies listed in our review, which could prohibit the conduction of a meta-analysis. Moreover, it should be acknowledged that some studies (eg, grey literature) could be excluded. Nevertheless, only including peer-reviewed articles ensures a certain quality of the studies. In addition, our review will only include articles written in German or English language. Therefore, the articles that will be included may overrepresent Christian samples, as this is the most important religion in German-speaking and English-speaking countries. On the other hand, English is the most common language in the scientific discourse, so that not only nationally related studies but studies from all around the world are published in it. ETHICS AND DISSEMINATION As no primary data are collected, the approval from an ethics committee is not required. Our review will be published in a peer-reviewed, scientific journal. Contributors The study concept was developed by BK, H-HK, LB and AH. The manuscript of the protocol was drafted by BK and critically revised by H-HK, LB and AH. The search strategy was developed by BK, H-HK, LB and AH. Study selection, data extraction and quality assessment will be performed by BK and LB, with AH as a third party in case of disagreements. All authors have approved the final version of the manuscript. |
Treatment of malignant hypercalcaemia with clodronate We have assessed the effects of clodronate (dichloromethylene diphosphonate; Cl2MDP 0.8-3.2g daily by mouth for up to 3 months) in 17 episodes of hypercalcaemia and osteolysis due to carcinoma. Clodronate reduced serum calcium in 14 episodes and bone resorption in all patients. These remained suppressed for the duration of treatment, but recurred promptly when treatment was stopped. Clodronate may be a useful measure for controlling hypercalcaemia and osteolysis in patients with carcinoma. Secondary carcinoma affecting the skeleton is the most common cause of hypercalcaemia in hospitalized patients (), and usually indicates a poor prognosis. Prompt effective treatment may decrease morbidity allowing hospitalised patients to return home, and in some instances, enable them to tolerate additional treatment more readily. Our understanding of the pathogenesis of hypercalcaemia in carcinoma is incomplete. It is usually but not invariably associated with widespread skeletal metastases. The increased bone resorption may be accompanied by increased activity of osteoclasts but a direct effect of the tumour cells themselves on bone is also a possible mechanism (). Rarely, hypercalcaemia is associated with increased bone resorption, but without obvious skeletal deposits () and is though to be mediated by humoral mechanisms not yet well characterised (;). Adequate extracellular volume repletion is an important aspect of the treatment of hypercalcaemia which decreases renal tubular reabsorption of calcium and increases glomerular filtration and thus the filtered load of calcium (). Agents which inhibit specifically osteoclast activity have also been used, including calcitonin, corticosteroids and mithramycin. However, the response to calcitonin is commonly variable and incomplete steroids are not always effective (;) and mithramycin has toxic effects on bone marrow and liver, particulary if used with other cytotoxic agents. More recently, the use of several diphos-Correspondence: J.A. Kanis Received 22 October 1984;and in revised form 21 January 1985. phonates, has given encouraging results in the treatment of hypercalcaemia (;;van ). We have used clodronate (dichoromethylene diphosphonate) in patients with hypercalcaemia of various causes. Our results in myeloma have been reported elsewhere (), and we report here our findings in patients with hypercalcaemia due to solid tumours. Patients and methods Seventeen episodes of hypercalcaemia were studied in 15 patients (9 women and 6 men) with disseminated carcinoma before and after treatment with clodronate (Table I). Two patients (nos. 3 and 7) received a second course of clodronate which was separated by a treatment free interval of 5-6 weeks. Patients were admitted to the study if their values for serum calcium were above normal (2.1-2.6mmoll-1) and either stable or rising in a 48h control period despite adequate hydration. Six of the patients had received prednisolone (10-40mg daily), but had failed to show any hypocalcaemic response despite treatment for 12 to 28 days. Where hypocalcaemic agents (including i.v. fluids or corticosteroids) were being administered in the period before treatment, these were continued in the same dose during the early period of treatment. All patients had scintigraphic or radiographic evidence of widespread skeletal metastases and one third had biochemical evidence for hepatic dysfunction. Informed consent was obtained from all patients or from a relative where the patient was unfit to give consent. The study had the prior approval of the local Ethical Committee. All patients were fully hydrated as judged by clinical criteria before the start of treatment with clodronate. Clodronate was given by mouth in a single daily dose of 0.8-3.2g 2h before breakfast. This range of dose was chosen because earlier studies had shown this to be effective in Paget's disease and hypercalcaemia due to myeloma (;). Patients were treated for periods ranging from 3 days to 3 months (Table I). After an overnight fast, urine was collected during a 2 h period before breakfast. A venous blood sample was obtained during this period and the serum separated. Calcium, phosphate, creatinine and albumin were measured in serum by a Technicon SMAC Autoanalyser. Serum calcium was adjusted for variations in serum albumin by the addition or subtraction of 0.02 mmol 1-for each g 1 -that albumin was below or above 42 g/1. Urinary calcium and hydroxyproline were expressed as ratios of urinary creatinine, which in the fasting state provided indices of net calcium release from bone and of bone resorption (Nordin, 1976;). The significance of changes in mean values was computed using Student's t-test for paired or nonpaired observations as appropriate. Results are shown as means (±s.e.). Results The administration of clodronate resulted in a progressive fall in serum calcium in 14 of the 17 episodes studied. The maximum effect on serum calcium was seen one week after starting treatment. Mean serum calcium fell from 3.23+0.08mmoll-' to 2.85+0.09mmoll-1 at 1 week (Figure 1), and normal values for serum calcium were observed in 9 patients. In 14 studies (on 13 patients) treatment was continued for 3 to 10 weeks. In all but 4 patients a hypocalcaemic response was sustained for the duration of treatment though mean values rose slightly (Figure 1). Mean serum creatinine did not change throughout treatment (130 + 20 jumol I1 before treatment and 137 + 19 pmol 1 1 at 1 week) and no changes in haematocrit or serum albumin were observed suggesting that changes in serum calcium could not be ascribed to changes in rehydration or to improved renal glomerular function. There was no difference in response in patients given concurrent corticosteroids. There was a consistent and significant fall in fasting urinary creatinine indicating a reduction in net bone loss, which persisted for the duration of treatment. Calciuria decreased to normal values in 75% of patients. Parallel but less marked decreases in urinary excretion of hydroxyproline were also observed. Both hypercalcaemia and a rise in calcium/creatinine ratio occured when treatment was stopped. Serum activity of alkaline phosphatase rose progressively throughout treatment and declined when treatment was stopped. This did not appear to be due to changes in hepatic function since no changes in the activity of hepatic transaminases was noted, and a marked increase in serum phosphatase activity was observed in 3 patients without other biochemical evidence of hepatic involvement. No effects were noted on full blood counts. The only side effect noted was mild gastrointestinal upset in some patients. Three patients failed to show a substantial fall in serum calcium. In two however, a marked fall in urinary calcium/creatinine was noted (eg Figure 2) suggesting that the reduction in bone resorption had been masked by a simultaneous rise in renal tubular reabsorption for calcium. The remaining patient failed to show any reduction in serum or urinary calcium possibly due to inadequate absorption of the drug. Discussion These results indicate that clodronate given by mouth is an effective hypocalcaemic agent in Time (d) on treatment Figure 2 Changes in serum calcium and fasting urinary calcium in a patient (no 12) who apparently failed to respond to treatment with clodronate. Note the fall in urinary calcium during treatment suggesting that clodronate inhibited bone resorption, but the lack of effect on serum calcium. patients with solid tumours. However, the magnitude of the hypocalcaemic response was less than in our own series of patients with hypercalcaemia due to myeloma treated identically with clodronate (). Unfortunately, assays for the diphosphonates are not widely available nor easy to interpret, so that it was not possible to document the bioavailibility of the drug. Despite this difficulty it is likely that clodronate decreased bone resorption to a similar extent in both myeloma and our patients with solid tumours. Thus net calcium release from bone, as judged by the calcium/creatinine ratio, was suppressed to a similar extent in myeloma and carcinoma, which suggests that the less complete response in patients with carcinoma was due to other mechanisms. Indeed, in 2 patients in whom plasma calcium did not change, there was evidence for effective suppression of excessive bone resorption. The lack of fall in serum calcium was probably due to to an increase in renal tubular reabsorption of calcium, and others have suggested that increased renal tubular E U resorption of calcium is an important component of malignant hypercalcaemia. It is unlikely that the hypocalcaemic responses were due to changes in the state of hydration, as serum creatinine, albumin and haemocrit did not change during treatment. The changes in fasting calcium excretion were more marked than changes in urinary hydroxyproline excretion. This finding is similar to the experience of others in solid tumours () and to our findings in myeloma (). It is probable that hydroxyprolinuria is partly due to collagen turnover of tumour tissue and that this masked the effects of diphosphonate treatment on bone-derived collagen. There are now a number of reports that several different diphosphonates provide a simple and effective treatment for hypercalcaemia due to increased bone resorption (;van ;;;;). The only commercially available diphosphonate (etidronate) is a powerful inhibitor of bone resorption but also impairs mineralisation of bone, particularly when high doses are used (). This unwanted effect decreases calcium entry into bone and may explain the less complete hypocalcaemic effect of this agent. The newer diphosphonates (clodronate and aminopropylidene diphosphonate) which are currently undergoing clinical evaluation, appear to have less effect on the mineralisation process. There have been concerns that clodronate might be leukaemogenic based on the finding of acute myeloid leukaemia in 3 patients given clodronate. Investigation of these patients and surveillance of patients given clodronate is continuing to assess the significance of these observations. Our own view is that this was a coincidental rather than causal relationship. Our own studies with clodronate indicate that, despite its poor absorption from the gastrointestinal tract (), oral administration is an effective method of controlling bone resorption which can be inhibited for as long as treatment is continued. Moreover the long-term administration of clodronate to patients with breast cancer may delay the appearance of osteolysis (;). These observations suggest that the use of diphoshonates may modify the natural history of skeletal metastases in patients with solid tumours. Whether or not this might improve survival is far from clear, but is likely to decrease considerably the morbidity associated with hypercalcaemia and7fracture. RCP is a Wellcome Surgical Fellow and AJPY an MRC Clinical Research Fellow. We are grateful to the Procter and Gamble Company, Gentili SpA and Oy Star for supplies of clodronate. |
Didcot Parkway railway station
History
The railway has run through Didcot since 1 June 1840, when the Great Western Railway extended its main line from Reading to Steventon. During this period a stagecoach transported passengers to Oxford from Steventon. A few weeks later the line was extended to Faringdon Road station near West Challow, and eventually to Bristol. On 12 June 1844 the line from Didcot to Oxford was opened and Didcot station was opened at the junction. The original intended route would have taken a line from Steventon to Oxford via Abingdon, but Abingdon's townspeople objected to this idea. Otherwise, it is unlikely that Didcot would have evolved into the town it is today, as its initial growth was prompted by the coming of the railway.
The Didcot, Newbury and Southampton Railway (DN&S) linked Didcot with Newbury, carrying services to Southampton via Newbury, Highclere, Winchester and Eastleigh. In its latter years it was reduced to a rural backwater before its closure just before the Beeching cuts. The DN&S was closed to passengers on 10 September 1962 and to freight in 1967. At the eastern end of Platform 1, there is a raised section of the east car park, which used to be the bay platform for the DN&S line.
On 7 December 1964, local passenger services between Didcot and Swindon were withdrawn and the stations at Steventon, Wantage Road, Challow, Uffington, Shrivenham and Stratton Park were closed.
In 1985, a new main building for the station was built along with a new 600-space car park on the site of the former provender store to the west of the station for Park and Ride use. These were opened on 29 July 1985 by David Mitchell MP, Parliamentary Under Secretary of State for Transport, and on that date the station was renamed Didcot Parkway.
In 2018, a multi-storey car park was opened, costing £20 million and increasing the number of spaces by 65% to 1800. The car park also has a sheltered footbridge.
Electrification
As part of the 21st-century modernisation of the Great Western Main Line, the GWML was electrified to just west of Didcot Parkway in January 2018. It was extended west to Swindon in November 2018. It was originally proposed that the Oxford line also be electrified, however cost blowouts resulted in this being deferred. As a result, Didcot Parkway has seen an increase in the number of terminating services with Class 387s electric multiple units connecting at Didcot with British Rail Class 165 / 166 diesel multiple units. |
<reponame>dmidem/noct-ipc
import { NetServer } from './NetServer'
import { DgramServer, UDPType } from './DgramServer'
export type { UDPType }
export type Server = NetServer | DgramServer
export function makeServer(config, path, port, udpType: UDPType): Server {
return udpType ? new DgramServer(config, path, port, udpType) : new NetServer(config, path, port)
}
|
package rpc
import (
"encoding/hex"
"fmt"
"github.com/hacash/core/fields"
"github.com/hacash/core/stores"
"github.com/hacash/x16rs"
"net/http"
"strings"
)
// 查询钻石
func (api *RpcService) diamond(r *http.Request, w http.ResponseWriter, bodybytes []byte) {
// 是否以枚为单位
isUnitMei := CheckParamBool(r, "unitmei", false)
// 钻石 name or number
diamondValue := strings.Trim(CheckParamString(r, "name", ""), " ")
if len(diamondValue) > 0 {
if len(diamondValue) != 6 {
ResponseErrorString(w, "param diamond format error")
return
}
if !x16rs.IsDiamondValueString(diamondValue) {
ResponseError(w, fmt.Errorf("param diamond <%s> is not diamond name", diamondValue))
return
}
}
diamondNumber := CheckParamUint64(r, "number", 0)
// read store
var blockstore = api.backend.BlockChain().GetChainEngineKernel().StateRead().BlockStoreRead()
var err error
var diamondSto *stores.DiamondSmelt = nil
if diamondNumber > 0 {
diamondSto, err = blockstore.ReadDiamondByNumber(uint32(diamondNumber))
if err != nil {
ResponseError(w, err)
return
}
} else if len(diamondValue) == 6 {
diamondSto, err = blockstore.ReadDiamond(fields.DiamondName(diamondValue))
if err != nil {
ResponseError(w, err)
return
}
} else {
ResponseErrorString(w, "param name or number must give")
return
}
if diamondSto == nil {
ResponseError(w, fmt.Errorf("diamond not find"))
return
}
diamondValue = string(diamondSto.Diamond)
bidfee := diamondSto.GetApproxFeeOffer()
// data
retdata := ResponseCreateData("number", diamondSto.Number)
retdata["name"] = diamondValue
retdata["miner_address"] = diamondSto.MinerAddress.ToReadable()
retdata["approx_fee_offer"] = bidfee.ToMeiOrFinString(isUnitMei)
retdata["nonce"] = hex.EncodeToString(diamondSto.Nonce)
retdata["custom_message"] = hex.EncodeToString(diamondSto.CustomMessage)
retdata["contain_block_height"] = diamondSto.ContainBlockHeight
retdata["contain_block_hash"] = hex.EncodeToString(diamondSto.ContainBlockHash)
retdata["prev_block_hash"] = hex.EncodeToString(diamondSto.PrevContainBlockHash)
// get current belong
sto2, e := api.backend.BlockChain().GetChainEngineKernel().StateRead().Diamond(fields.DiamondName(diamondValue))
if e != nil {
ResponseError(w, e)
return
}
if sto2 != nil {
retdata["current_belong_address"] = sto2.Address.ToReadable()
} else {
retdata["current_belong_address"] = diamondSto.MinerAddress.ToReadable()
}
// return
ResponseData(w, retdata)
return
}
|
WASHINGTON (AP) — The chairman and top Democrat on the House Judiciary Committee have met with Special Counsel Bob Mueller. That’s according to the committee, which says they met Thursday.
Mueller is investigating allegations of Russian meddling in the 2016 election and any possible links to President Donald Trump’s campaign.
Several congressional committees are also investigating, but Judiciary Committee Chairman Bob Goodlatte of Virginia has said his panel will defer to Mueller. Goodlatte has said the panel will exercise oversight over Mueller as appropriate, and that Mueller should not be impeded by politics.
Goodlatte has also called on the Justice Department to appoint a second special counsel to investigate “unaddressed issues” related to the 2016 election and former Obama administration officials, including Hillary Clinton.
Democrat John Conyers of Michigan also attended the meeting. |
<reponame>xlui/eFuture<filename>mail/mail.py
import smtplib
from email.header import Header
from email.mime.text import MIMEText
from config import host, port, username, password
from log import logger
__charset = 'utf-8'
def send_mail(receiver: str, subject: str, message: str):
message = MIMEText(message, _charset=__charset)
message['From'] = Header('Future Email <{}>'.format(username))
message['To'] = Header('<{}>'.format(receiver))
message['Subject'] = Header(subject)
try:
smtp = smtplib.SMTP(host=host, port=port)
smtp.starttls()
smtp.login(username, password)
smtp.sendmail(username, [receiver], message.as_string())
logger.info('Successfully send')
except smtplib.SMTPException as e:
logger.error('Cannot send email: {0}'.format(e))
if __name__ == '__main__':
send_mail('<EMAIL>', 'Test send mail to gmail', 'Sent from python')
|
Alignment of breast cancer screening guidelines, accountability metrics, and practice patterns. OBJECTIVES Breast cancer screening guidelines and metrics are inconsistent with each other and may differ from breast screening practice patterns in primary care. This study measured breast cancer screening practice patterns in relation to common evidence-based guidelines and accountability metrics. STUDY DESIGN Cohort study using primary data collected from a regional breast cancer screening research network between 2011 and 2014. METHODS Using information on women aged 30 to 89 years within 21 primary care practices of 2 large integrated health systems in New England, we measured the proportion of women screened overall and by age using 2 screening definition categories: any mammogram and screening mammogram. RESULTS Of the 81,352 women in our cohort, 54,903 (67.5%) had at least 1 mammogram during the time period, 48,314 (59.4%) had a screening mammogram. Women aged 50 to 69 years were the highest proportion screened (82.4% any mammogram, 75% screening indication); 72.6% of women at age 40 had a screening mammogram with a median of 70% (range = 54.3%-84.8%) among the practices. Of women aged at least 75 years, 63.3% had a screening mammogram, with the median of 63.9% (range = 37.2%-78.3%) among the practices. Of women who had 2 or more mammograms, 79.5% were screened annually. CONCLUSIONS Primary care practice patterns for breast cancer screening are not well aligned with some evidence-based guidelines and accountability metrics. Metrics and incentives should be designed with more uniformity and should also include shared decision making when the evidence does not clearly support one single conclusion. |
Our vision is to be the leading mobile community platform by letting you easily turn your group, team or organization into a thriving mobile community. Until Zerista, community managers have had to use a wide range of generic tools to try to manage their community communications and activities. And none of the existing tools are built for active, mobile communities. Zerista is the first company to put everything the community manager needs into a single, comprehensive, yet easy to use package.
Zerista will use the financing to roll-out its mobile community platform. |
(1S,2R/1R,2S)-cis-Cyclopentyl PNAs (cpPNAs) as Constrained PNA Analogues: Synthesis and Evaluation of aeg-cpPNA Chimera and Stereopreferences in Hybridization with DNA/RNA Conformationally constrained chiral PNA analogues were designed on the basis of stereospecific imposition of a 1,2-cis-cyclopentyl moiety on an aminoethyl segment of aegPNA. It is known that the cyclopentane ring is a relatively flexible system in which the characteristic puckering dictates the pseudoaxial/pseudoequatorial dispositions of substituents. Hence, favorable torsional adjustments are possible to attain the necessary hybridization-competent conformations when the moiety is imposed on the conventional PNA backbone. The synthesis of the enantiomerically pure 1,2-cis-cyclopentyl PNA monomers (10a and 10b) was achieved by stereoselective enzymatic hydrolysis of a key intermediate ester 2. The chiral (1S,2R/1R,2S)-aminocyclopentylglycyl thymine monomers were incorporated into PNA oligomers at defined positions and through the entire sequence. Hybridization studies with complementary DNA and RNA sequences using UV-T m measurements indicate that aeg-cpPNA chimera form thermally more stable complexes than aegPNA with stereochemistry-dependent selective binding of cDNA/RNA. Differential gel shift retardation was observed on hybridization of aeg-cpPNAs with complementary DNA. |
<gh_stars>0
package me.labate.utt.lo02.gui;
import java.awt.Dimension;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import me.labate.utt.lo02.core.Game;
import me.labate.utt.lo02.core.Game.Action;
import me.labate.utt.lo02.core.Game.Choice;
public class MainWindow extends JFrame {
/**
*
*/
private static final long serialVersionUID = 2334999391323336120L;
ScorePanel scorePanel;
StatusPanel statusPanel;
DeckPanel deckPanel;
MolePanel molePanel;
LastActionPanel lastActionPanel;
IngredientPanel ingredientPanel;
BonusPanel bonusPanel;
LeprechaunPanel leprechaunPanel;
DefendPanel defendPanel;
RankingPanel rankingPanel;
JButton moleButton;
@SuppressWarnings("static-access")
public MainWindow() {
super();
// Configure window
setTitle("Le jeu du Menhir");
this.setMinimumSize(new Dimension(320, 240));
setSize(new Dimension(1000, 600));
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// Create scroll area
// JScrollPane scrollArea = new JScrollPane();
// setContentPane(scrollArea);
//
// Create subpanels
scorePanel = new ScorePanel();
scorePanel.setAlignmentX(ScorePanel.CENTER_ALIGNMENT);
statusPanel = new StatusPanel();
statusPanel.setAlignmentX(ScorePanel.CENTER_ALIGNMENT);
moleButton = new JButton("Attaquer quelqu'un avec une taupe géante..");
moleButton.setAlignmentX(JButton.CENTER_ALIGNMENT);
moleButton.setActionCommand("moleStart");
molePanel = new MolePanel();
molePanel.setAlignmentX(ScorePanel.CENTER_ALIGNMENT);
lastActionPanel = new LastActionPanel();
lastActionPanel.setAlignmentX(ScorePanel.CENTER_ALIGNMENT);
ingredientPanel = new IngredientPanel();
ingredientPanel.setAlignmentX(ingredientPanel.CENTER_ALIGNMENT);
leprechaunPanel = new LeprechaunPanel();
leprechaunPanel.setAlignmentX(leprechaunPanel.CENTER_ALIGNMENT);
defendPanel = new DefendPanel();
defendPanel.setAlignmentX(defendPanel.CENTER_ALIGNMENT);
bonusPanel = new BonusPanel();
bonusPanel.setAlignmentX(bonusPanel.CENTER_ALIGNMENT);
rankingPanel = new RankingPanel();
rankingPanel.setAlignmentX(rankingPanel.CENTER_ALIGNMENT);
deckPanel = new DeckPanel();
// Create main vertical layout
JPanel mainPanel = new JPanel();
mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));
mainPanel.add(statusPanel);
mainPanel.add(scorePanel);
mainPanel.add(moleButton);
mainPanel.add(molePanel);
mainPanel.add(lastActionPanel);
mainPanel.add(ingredientPanel);
mainPanel.add(leprechaunPanel);
mainPanel.add(defendPanel);
mainPanel.add(bonusPanel);
mainPanel.add(rankingPanel);
mainPanel.add(deckPanel);
// scrollArea.setViewportView(mainPanel);
this.add(mainPanel);
}
/**
* @return the moleButton
*/
public JButton getMoleButton() {
return moleButton;
}
public void hydrate(Game game)
{
scorePanel.hydrate(game);
statusPanel.hydrate(game);
deckPanel.hydrate(game);
// Middle panel selection
if(game.getLastAction() != Action.NOTHING)
{
lastActionPanel.hydrate(game);
selectMiddlePanel(lastActionPanel);
game.clearLastAction();
}
else if(game.getNeededChoice() == Choice.INGREDIENT)
{
ingredientPanel.hydrate(game);
selectMiddlePanel(ingredientPanel);
deckPanel.enableClick(true, game.getSeason());
}
else if(game.getNeededChoice() == Choice.BONUS)
{
bonusPanel.hydrate(game);
selectMiddlePanel(bonusPanel);
}
else if(game.getNeededChoice() == Choice.DEFEND)
{
// we need to check if the player is a bot or no
if(game.getNeededPlayer().isBot()){
lastActionPanel.hydrate(game);
selectMiddlePanel(lastActionPanel);
game.clearLastAction();
}
else {
defendPanel.hydrate(game);
selectMiddlePanel(defendPanel);
deckPanel.highlightAllySeason(game.getSeason());
}
}
else
{
rankingPanel.hydrate(game);
selectMiddlePanel(rankingPanel);
}
// Hide mole button if there is no ally card on the table
// and no HumanPlayer who own AllyCard
moleButton.setVisible(false);
for(int i=0; i<game.getPlayerCount(); i++)
{
if(game.getPlayer(i).hasAllyCard() && !game.getPlayer(i).isBot())
{
moleButton.setVisible(true);
break;
}
}
}
public void selectMiddlePanel(JPanel panel)
{
molePanel.setVisible(false);
lastActionPanel.setVisible(false);
ingredientPanel.setVisible(false);
leprechaunPanel.setVisible(false);
defendPanel.setVisible(false);
bonusPanel.setVisible(false);
rankingPanel.setVisible(false);
panel.setVisible(true);
}
/**
* @return the scorePanel
*/
public ScorePanel getScorePanel() {
return scorePanel;
}
/**
* @return the statusPanel
*/
public StatusPanel getStatusPanel() {
return statusPanel;
}
/**
* @return the molePanel
*/
public MolePanel getMolePanel() {
return molePanel;
}
/**
* @return the lastActionPanel
*/
public LastActionPanel getLastActionPanel() {
return lastActionPanel;
}
/**
* @return the deckPanel
*/
public DeckPanel getDeckPanel() {
return deckPanel;
}
/**
* @return the leprechaunPanel
*/
public LeprechaunPanel getLeprechaunPanel() {
return leprechaunPanel;
}
/**
* @return the ingredientPanel
*/
public IngredientPanel getIngredientPanel() {
return ingredientPanel;
}
/**
* @return the bonusPanel
*/
public BonusPanel getBonusPanel() {
return bonusPanel;
}
/**
* @return the defendPanel
*/
public DefendPanel getDefendPanel() {
return defendPanel;
}
/**
* @return the rankingPanel
*/
public RankingPanel getRankingPanel() {
return rankingPanel;
}
}
|
Development and characterization of a radioimmunoassay to measure human tissue kallikrein in biological fluids. A direct radioimmunoassay has been developed to measure tissue kallikrein in human biological fluids. These fluids include serum, plasma, urine, pancreatic juice and saliva. Purified kallikreins from human urine and human saliva were used to raise rabbit antibody and each was labelled with Na125I for use in the radioimmunoassay. A comparison of the different antigen-antibody systems was then made. Bound and free enzyme were separated by a double-antibody technique. The usable range of the standard curve was from 2.5 to 100 micrograms kallikrein/l. The intra-assay coefficient of variation was 4.7%, the interassay coefficient of variation 8.9% and the recoveries of purified kallikrein added to the samples were 99.3, 96.0, 110.8 and 81.2% for urine, saliva, serum and plasma respectively. Parallel dilution curves were obtained for serum and plasma, as well as for urine, saliva and pancreatic juice. However, plasma anticoagulated with EDTA or heparin gave consistently lower values than serum, when measured in the radioimmunoassay. From eight different subjects plasma (EDTA) values were on average 50% lower than those of serum. Experiments designed to determine the cause of this difference revealed that treatment of blood with some anticoagulants, in particular heparin and EDTA, resulted in a marked reduction in the amount of measurable tissue kallikrein. |
On the virtual array concept for the fourth-order direction finding problem For more than a decade, fourth-order (FO) direction finding (DF) methods have been developed for non-Gaussian signals. Recently, it has been shown, through the introduction of the virtual cross-correlation (VCC) concept, that the use of FO cumulants for the DF problem increases the effective aperture of an arbitrary antenna array, which eventually introduces the virtual array concept. The purpose of this correspondence is first to present this virtual array (VA) concept through an alternative way that is easier and more direct to handle than the VCC tool and, second, to present further results associated with this concept, not only for arrays with space diversity but also for arrays with angular and/or polarization diversity. |
// pad returns x rounded to the least multiple of m greater than or equal to x.
func pad(x, m int) int {
r := x % m
if r > 0 {
return x + (m - x%m)
} else {
return x
}
} |
A decision support methodology for increasing public investment efficiency in Brazilian agrarian reform The Brazilian Agrarian Reform Program has subsidized the settlement of over 425,000 destitute families on previously unproductive land in what has become a very effective vehicle for social inclusion and productivity growth for those settlers who reach the final stage of the process and receive definitive title to the land. Unfortunately, there is a large difference in efficiency and productivity between more and less successful settlements fewer than 10% of relocated families have received title and over 25% of them have abandoned the property to which they were assigned. This paper presents a decision support methodology for increasing the efficiency of public investments in agrarian reform that includes a data envelopment analysis model and a mechanism for building consensus among the various constituencies of the agrarian reform process, who not infrequently have conflicting objectives. The OR model described herein uses principal component analysis and data envelopment analysis to identify the most important success factors for relocated families leading to an increase in the chance of both autonomous integration with the market economy and definitive entitlement by these displaced families as well as an increase in the predictability of future settlement success. The model was implemented successfully in Rio Grande do Sul, the southernmost state of Brazil, and was partially used in a pilot project for the countrywide agrarian reform accelerated consolidation program. |
Former Vancouver mayor Art Phillips, known for ending the controversial plan to have freeways run through the city, died Friday afternoon at the age of 82.
Former Vancouver mayor Art Phillips died Friday afternoon at the age of 82.
Phillips died at Vancouver General Hospital as a result of complications from an infection.
He leaves behind his wife and SFU chancellor Carole Taylor, six children, numerous grandchildren and one great-grandchild.
"With today’s passing of Art Phillips, Vancouver has lost a visionary leader and citizen who made an indelible mark on the city," Mayor Gregor Robertson said in a written release.
"He helped shape Vancouver through his vision and commitment to public service. He was a champion of livability and inclusivity. During his time in office, Art fundamentally changed the political and social direction of our city. He added social housing and parks.
"His leadership and achievements will inspire the city well into the future."
Both B.C. Premier Christy Clark said NDP leader Adrian Dix released statements Friday evening.
"The approach to urban planning he introduced put Vancouver on a path towards becoming a more liveable, vibrant and sustainable city," Dix said.
Clark called Phillips one of Vancouver's "greatest city-builders."
"A gentleman in every sense of the word, Art was concerned with improving the quality of life in Vancouver. We who are lucky enough to call Vancouver home owe him a great debt," she said.
Phillips was mayor from 1972 to 1977. During his time in office, the city turned Granville Mall into a car-free zone. Phillips is known for ending the controversial plan to have freeways run through the city.
He is also credited for transforming False Creek into a residential community. He and his wife moved into the neighbourhood shortly after they were married.
"Much of what [the city] is today is because of the foundation that was laid down and what Art Phillips set in motion," said Gordon Price, a former city councillor.
"False Creek was a industrial sewer and when Art Phillips and Carole Taylor made the decision to move to Leg-in-Boot Square, they established for at least a segment of the city that this was a legitimate, a good place to live. You could raise a family there."
Phillips publicly defended the city's safe injection sites against federal interference. He also led "Save the Grizzlies", a campaign to keep the NBA team in the city.
He was a founder of the Vancouver investment firm Phillips, Hager & North.
A celebration of his life is being planned for April. |
<gh_stars>0
import React, { Fragment } from "react";
import { Layout, Icon } from "antd";
const { Footer } = Layout;
class FooterView extends React.Component {
render() {
return (
<Footer style={{ textAlign: "center" }}>
<br />
<Fragment>
Technology spreads civilization, practices synchronize world. <Icon type="copyright" /> 2021 X-lab
</Fragment>
<br />
{ /*<a href="http://www.miitbeian.gov.cn">沪ICP备18019397号</a>*/ }
</Footer>
);
}
}
export default FooterView;
|
<reponame>gunaskr/odbogm<gh_stars>0
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package net.odbogm.proxy;
import java.util.Map;
import com.orientechnologies.orient.core.record.ODirection;
import com.orientechnologies.orient.core.record.OEdge;
import com.orientechnologies.orient.core.record.OVertex;
import net.odbogm.Transaction;
/**
*
* @author <NAME> {@literal <<EMAIL>>}
*/
public interface ILazyMapCalls extends ILazyCalls {
public void init(Transaction t, OVertex relatedTo, IObjectProxy parent, String field, Class<?> keyClass, Class<?> valueClass, ODirection d);
public Map<Object,ObjectCollectionState> collectionState();
public Map<Object, ObjectCollectionState> getEntitiesState();
public Map<Object, ObjectCollectionState> getKeyState();
public Map<Object, OEdge> getKeyToEdge();
}
|
/**
* Returns the receivers for this relation.
* @param columnDef the column definition
* @return the receivers for the specified relation.
* @throws InvalidRequestException if the relation is invalid
*/
private List<? extends ColumnSpecification> toReceivers(ColumnMetadata columnDef) throws InvalidRequestException
{
ColumnSpecification receiver = columnDef;
checkFalse(isContainsKey() && !(receiver.type instanceof MapType), "Cannot use CONTAINS KEY on non-map column %s", receiver.name);
checkFalse(isContains() && !(receiver.type.isCollection()), "Cannot use CONTAINS on non-collection column %s", receiver.name);
if (mapKey != null)
{
checkFalse(receiver.type instanceof ListType, "Indexes on list entries (%s[index] = value) are not currently supported.", receiver.name);
checkTrue(receiver.type instanceof MapType, "Column %s cannot be used as a map", receiver.name);
checkTrue(receiver.type.isMultiCell(), "Map-entry equality predicates on frozen map column %s are not supported", receiver.name);
checkTrue(isEQ(), "Only EQ relations are supported on map entries");
}
checkFalse(receiver.type.isUDT() && receiver.type.isMultiCell(),
"Non-frozen UDT column '%s' (%s) cannot be restricted by any relation",
receiver.name,
receiver.type.asCQL3Type());
if (receiver.type.isCollection())
{
checkFalse(receiver.type.isMultiCell() && !isLegalRelationForNonFrozenCollection(),
"Collection column '%s' (%s) cannot be restricted by a '%s' relation",
receiver.name,
receiver.type.asCQL3Type(),
operator());
if (isContainsKey() || isContains())
{
receiver = makeCollectionReceiver(receiver, isContainsKey());
}
else if (receiver.type.isMultiCell() && mapKey != null && isEQ())
{
List<ColumnSpecification> receivers = new ArrayList<>(2);
receivers.add(makeCollectionReceiver(receiver, true));
receivers.add(makeCollectionReceiver(receiver, false));
return receivers;
}
}
return Collections.singletonList(receiver);
} |
<reponame>hafrei/aoc2020
use std::fs;
use std::collections::HashMap;
pub fn execute_daysix() {
let path = "./input/day6.txt";
let mut count = get_sum(get_everyones_answers(path));
println!("Sum is {}", count);
count = get_second_sum(get_group_answers(path));
println!("Actually sum is {}", count);
}
fn get_sum(list: Vec<String>) -> i32 {
let mut count: i32 = 0;
for a in list {
count += a.len() as i32;
}
count
}
fn get_second_sum(list: Vec<HashMap<char, i32>>) -> i32 {
let mut count: i32 = 0;
let pnd = '#';
for a in list.into_iter() {
let gimmie_max = *a.get(&pnd).unwrap();
for (b, c) in a {
if c.eq(&gimmie_max) && !b.eq(&pnd) {
count += 1;
}
}
}
count
}
fn get_group_answers(filepath: &str) -> Vec<HashMap<char, i32>> {
let mut ret = Vec::new();
let mut hm = HashMap::new();
let list = fs::read_to_string(filepath).expect("Yeah, that's not a file");
let mut builder: Vec<String> = Vec::new();
for lin in list.lines() {
if lin.is_empty() {
for derp in builder.clone() {
for ch in derp.chars() {
hm.entry(ch).and_modify(|e| *e += 1).or_insert(1);
}
}
let leng = '#';
let what2 = builder.len() as i32;
hm.entry(leng).or_insert(what2);
hm.retain(|_, v| *v == what2);
ret.push(hm);
hm = HashMap::new();
builder = Vec::new();
} else {
builder.push(lin.to_string());
}
}
if builder.is_empty() {
for derp in builder.clone() {
for ch in derp.chars() {
hm.entry(ch).and_modify(|e| *e += 1).or_insert(1);
}
}
let leng = '#';
let what2 = builder.len() as i32;
hm.entry(leng).or_insert(what2);
hm.retain(|_, v| *v == what2);
ret.push(hm);
}
ret
}
fn get_everyones_answers(filepath: &str) -> Vec<String> {
let mut ret: Vec<String> = Vec::new();
let list = fs::read_to_string(filepath).expect("Yeah, that's not a file");
let mut builder = String::new();
for lin in list.lines() {
if lin.is_empty() {
let mut what: Vec<char> = builder.chars().collect();
what.sort_unstable();
what.dedup();
ret.push(what.into_iter().collect());
builder = String::new();
} else {
builder.push_str(lin);
}
}
if builder.is_empty() {
let mut what: Vec<char> = builder.chars().collect();
what.sort_unstable();
what.dedup();
ret.push(what.into_iter().collect());
}
ret
}
|
export interface WatchListPropsType {
item_key: string | number;
title: string;
average_vote: number;
media_type: 'tv' | 'movie';
poster_path: string;
duration: number;
is_liked?: string | null;
release_date: Date | string | null;
}
|
Interaction of Added L-Cyteine with 2-Threityl-thiazolidine-4-carboxylic Acid derived from Xylose-Cysteine System Affecting its Maillard Browning. Maillard reaction under stepwise increase of temperature using L-cysteine as the indicator was performed to determine the formation conditions for the preparation of 2-threityl-thiazolidine-4-carboxylic acid (TTCA) which was the main Maillard reaction intermediate (MRI) derived from xylose (Xyl)-cysteine (Cys) model system in aqueous medium. In order to clarify the indicating mechanism of Cys for the TTCA formation, the thermal model systems of TTCA-Cys and TTCA solutions were investigated. The browning of the final Maillard reaction products (MRPs) and concentration of downstream degradation products of MRIs indicated that the added Cys could react with TTCA to inhibit the formation of visible color via preventing the generation of dicarbonyl compounds derived from MRIs. Through HPLC analysis, it was demonstrated that added Cys affected the normal reaction pathway from TTCA to ARP and other downstream products by restoring TTCA to sugar and amino acid under heat treatment. |
At the Mattress Direct in New Orleans, LA, you can get a wide selection of quality mattresses including serta, icomfort, iseries, Tempur pedic, foam mattresses and more. We carry all of the brands that you'll want to check out.
Posted on December 16, 2016. Brought to you by getfave.
Posted by Linda on June 25, 2014. Brought to you by yahoolocal.
Experience the Mattress Direct difference with a new Serta Mattress.
Posted by Westbank for life on October 14, 2010.
Mattress Direct is located at 200 N Carrollton Ave in New Orleans and has been in the business of Retail - Mattresses since 2008. |
Improvement of the Low-Voltage Ride-through Capability of Doubly Fed Induction Generator Wind Turbines So far, active crowbars are a preferred technique for doubly fed induction generator (DFIG) wind turbines, which is used to protect the power converter against over-current and undesirably high dc link voltage during voltage dip. However, its main drawbacks are that the DFIG absorbs reactive power from the grid during grid voltage dips, the crowbar activation increases the acceleration of the rotor and so, deteriorates the dynamic stability of DFIG, and the control is not flexible for long-time voltage sags. In the paper, three different initiating logic control methods of crowbar protection are compared, and how low-voltage ride-through (LVRT) characteristics of DFIG wind turbines with active crowbar are affected by different switching logic control modes of the crowbar are investigated. According to the comparison results, an improved crowbar switching control strategy is proposed to reduce its operation time and improve the LVRT capability of DFIG wind turbines. In addition, an emergency pitch blade angle control scheme to reduce the acceleration of the rotor and prevent the over-speeding of rotor is presented in detail, and as a result, the LVRT capability of DFIG wind turbines is enhanced even during long-time voltage sags. Finally, the presented control strategies are validated in simulation tool Matalab/Simulink for a 1.5MW generator. |
Solar NeutrinosFrom Puzzle to Paradox The solar neutrino puzzle is deepening into a paradox that refutes the basic logic of the reaction chain that powers the sun by the fusion of protons into heavy elements. Experiments now reveal a serious anomaly in the relative neutrino fluxes from the different steps in the chain. Neutrinos from boron-8 at the end of the chain are seen but hardly any are seen from beryllium-7, without which the observed boron-8 cannot be made. The only apparent way to avoid a paradoxical "missing link" in the sun's energy chain is a nonzero neutrino mass, an idea that can be tested in future experiments. |
<reponame>barracuda-cloudgen-access/access-cli
// Package cmd implements access-cli commands
package cmd
/*
Copyright © 2020 Barracuda Networks, 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.
*/
import (
"reflect"
"strconv"
"testing"
"github.com/nbio/st"
"github.com/spf13/cobra"
)
type fakePageable struct {
perPage int64
page int64
data []int
fetchCount int
}
// SetPerPage sets how many fake results to return per fakeFetch
func (f *fakePageable) SetPerPage(perPage *int64) {
f.perPage = *perPage
}
// SetPerPage sets the current page of fake results
func (f *fakePageable) SetPage(page *int64) {
f.page = *page
}
func (f *fakePageable) fakeFetch() []int {
f.fetchCount++
start := (f.page - 1) * f.perPage
if start >= int64(len(f.data)) {
return []int{}
}
end := start + f.perPage
if end > int64(len(f.data)) {
end = int64(len(f.data))
}
return f.data[start:end]
}
func TestPagination(t *testing.T) {
type tcase struct {
rangeStart, rangeEnd, pageSize int
data []int
expectedFetches int
expected []int
}
genData := make([]int, 234)
for i := 0; i < 234; i++ {
genData[i] = i + 1
}
testCases := []tcase{
{
rangeStart: 1, rangeEnd: 10, pageSize: 5,
data: []int{},
expectedFetches: 1,
expected: []int{},
},
{
rangeStart: 1, rangeEnd: 10, pageSize: 5,
data: genData[0:20],
expectedFetches: 2,
expected: genData[0:9],
},
{
rangeStart: 1, rangeEnd: 10, pageSize: 50,
data: genData[0:20],
expectedFetches: 1,
expected: genData[0:9],
},
{
rangeStart: 1, rangeEnd: 10, pageSize: 10,
data: genData[0:20],
expectedFetches: 1,
expected: genData[0:9],
},
{
rangeStart: 1, rangeEnd: 0, pageSize: 7,
data: genData[0:20],
expectedFetches: 3,
expected: genData[0:20],
},
{
rangeStart: 99, rangeEnd: 104, pageSize: 10,
data: genData,
expectedFetches: 2,
expected: genData[98:103],
},
{
rangeStart: 10, rangeEnd: 0, pageSize: 7,
data: genData[0:20],
expectedFetches: 2,
expected: genData[9:20],
},
{
rangeStart: 1, rangeEnd: 0, pageSize: 34,
data: genData,
expectedFetches: 7,
expected: genData,
},
{
rangeStart: 1, rangeEnd: 11, pageSize: 10,
data: genData,
expectedFetches: 1,
expected: genData[0:10],
},
}
for _, testCase := range testCases {
fakeCmd := &cobra.Command{}
initPaginationFlags(fakeCmd)
fakeCmd.Flags().Set("range-start", strconv.Itoa(testCase.rangeStart))
fakeCmd.Flags().Set("range-end", strconv.Itoa(testCase.rangeEnd))
fPageable := &fakePageable{
data: testCase.data,
}
global.FetchPerPage = testCase.pageSize
result := []int{}
cutStart, cutEnd, err := forAllPages(fakeCmd, fPageable, func() (int, int64, error) {
r := fPageable.fakeFetch()
result = append(result, r...)
return len(r), int64(len(fPageable.data)), nil
})
st.Expect(t, err, nil)
result = result[cutStart:cutEnd]
if !reflect.DeepEqual(result, testCase.expected) {
t.Error("Result should be", testCase.expected, "but was", result)
}
if fPageable.fetchCount != testCase.expectedFetches {
t.Error("Expected result in", testCase.expectedFetches, "fetches but", fPageable.fetchCount, "were made")
}
}
}
|
package de.xxschrandxx.awm.listener;
import org.bukkit.GameMode;
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerTeleportEvent;
import de.xxschrandxx.awm.AsyncWorldManager;
import de.xxschrandxx.awm.api.config.*;
import de.xxschrandxx.awm.api.modifier.Modifier;
public class WorldTeleportListener implements Listener {
@EventHandler
public void onWorldTeleport(PlayerTeleportEvent e) {
Player p = e.getPlayer();
World world = e.getTo().getWorld();
if (WorldConfigManager.getWorlddataFromName(world.getName()) != null) {
WorldData worlddata = WorldConfigManager.getWorlddataFromName(world.getName());
if (!p.hasPermission(AsyncWorldManager.config.get().getString("event.permissions.worldmanager.gamemode.bypass"))) {
p.setGameMode((GameMode) worlddata.getModifierValue(Modifier.gamemode));
}
}
}
}
|
<reponame>3Jade/Ocean<gh_stars>1-10
#pragma once
namespace SkipProbe
{
template<typename t_KeyType, typename t_ValueType>
struct Node;
template<typename t_KeyType, typename t_ValueType>
struct LinkedNode;
}
template<typename t_KeyType, typename t_ValueType>
struct SkipProbe::Node
{
t_KeyType key;
t_ValueType value;
};
template<typename t_KeyType, typename t_ValueType>
struct SkipProbe::LinkedNode : public SkipProbe::Node<t_KeyType, t_ValueType>
{
LinkedNode* firstInBucket;
LinkedNode* nextInBucket;
LinkedNode* prevInBucket;
LinkedNode* lastInBucket;
size_t hash;
};
|
Pavement Concrete with Air-Cooled Blast Furnace Slag and Dolomite as Coarse Aggregates This study evaluated the effects of substituting natural coarse aggregate (dolomite) with air-cooled blast furnace slag (ACBFS) on the strength and durability properties of pavement concretes. The scope of the study included evaluation and analysis of four types of concrete subjected to three deicers while undergoing freezethaw (FT) exposure. Of the four types of concrete mixtures, two were prepared with ACBFS and two with natural dolomite as coarse aggregate. For each aggregate type, one mixture was produced with Type 1 portland cement, while the second one was produced with a binder composed of Type 1 cement and Class C fly ash (20% replacement by weight). Fresh properties of concrete tested included slump, unit weight, and total air content, while compressive and flexural strengths were measured for hardened concrete. Durability of concrete exposed to FT was assessed by periodically measuring dynamic modulus of elasticity of concrete and average depth of chloride penetration. Concrete with ACBFS aggregates developed slightly higher (~6%) compressive strength but lower (~15%) flexural strength than did concrete with natural dolomite. Periodic measurements of dynamic modulus of elasticity and visual observations of test specimens showed that of the three deicers used, the CaCl2 was the most aggressive, followed by MgCl2 and NaCl. In regard to resistance to the FT cycles in the presence of deicers, fly ash concretes (with either ACBFS or dolomite as coarse aggregate) showed better performance than did corresponding plain cement concretes. |
def step(self, actions, omitDead=False, preprocessActions=True):
if preprocessActions:
for entID in list(actions.keys()):
ent = self.realm.players[entID]
if not ent.alive:
continue
for atn, args in actions[entID].items():
for arg, val in args.items():
if len(arg.edges) > 0:
actions[entID][atn][arg] = arg.edges[val]
elif val < len(ent.targets):
targ = ent.targets[val]
actions[entID][atn][arg] = self.realm.entity(targ)
else:
actions[entID][atn][arg] = ent
dead = self.realm.step(actions)
obs, rewards, dones, self.raw = {}, {}, {}, {}
for entID, ent in self.realm.players.items():
ob = self.realm.dataframe.get(ent)
obs[entID] = ob
rewards[entID] = self.reward(entID)
dones[entID] = False
for entID, ent in dead.items():
self.log(ent)
if omitDead:
return obs, rewards, dones, {}
for entID, ent in dead.items():
rewards[ent.entID] = self.reward(ent)
dones[ent.entID] = True
obs[ent.entID] = ob
return obs, rewards, dones, {} |
<reponame>MatthewZelriche/LanternOS
#pragma once
struct psf2_header {
unsigned char magic[4];
unsigned int version;
unsigned int headerSize;
unsigned int flags;
unsigned int length;
unsigned int charSize;
unsigned int height, width;
}; |
Culture and Social Support Provision The present research examined cultural differences in the type and frequency of support provided as well as the motivations underlying these behaviors. Study 1, an open-ended survey, asked participants about their social interactions in the past 24 hours and found that European Americans reported providing emotion-focused support more frequently than problem-focused support, whereas Japanese exhibited the opposite pattern. Study 2, a closed-ended questionnaire study, found that, in response to the close others big stressor, European Americans provided more emotion-focused support whereas Japanese provided equivalent amounts of emotion-focused and problem-focused support. In addition, Study 2 examined motivational explanations for these differences. Social support provision was motivated by the goal of closeness and increasing recipient self-esteem among European Americans, but only associated with the motive for closeness among Japanese. These studies illustrate the importance of considering cultural context and its role in determining the meaning and function of various support behaviors. |
Let's put JPMorgan Chase chairman, president and CEO James "Jamie" Dimon on trial. Mr. Dimon has a reputation for being the sagest guy on Wall Street and an expert at managing risk. JPMorgan emerged from the financial crisis not just unscathed but secure enough to step in and rescue Bear Stearns when the government asked it to. (He gets very mad when you say that his bank got bailed out by the government, and he insists that the government made him take all that free money.) Then his bank somehow accidentally lost billions of dollars last week, whoops! And he is really embarrassed, but not embarrassed enough to fire himself. So, let's put him on trial and force him to explain what good he and his bank are.
The SEC is investigating the massive loss, but that will take a lot of time and the eventual report will probably be very difficult for novices to understand and probably they won't put anyone in jail. Dimon might have to be hauled before Congress to answer questions, but no one watches congressional hearings, and no one likes members of Congress. I think a big televised prime-time tribunal would be best. And then maybe some JPMorgan shareholders, unemployed people, journalists and angry bloggers can just ask him some really simple questions about why he thinks JPMorgan shouldn't be regulated at all.
Advertisement:
While I am definitely endorsing a humiliating show trial, we don't have to send Jamie Dimon to jail afterward, even if a jury of people who had their houses foreclosed on them find him guilty. The point of this is to mainly have him on the record, compelled to answer questions plainly and clearly, to an unfriendly audience of non-Davos people.
This very good explainer helps us to understand how exactly JPMorgan came to misplace billions of dollars, but it raises more questions than it answers. Questions like, "Wouldn't it have been better if that $2 billion had been used for almost anything in the world besides shady mega-bank gambling that no one understands?" And, "Doesn't it seem you guys could save a bit of money on salaries and so forth while still achieving basically the same results if you replaced your chief investment officer with some old people who play video slots all day?"
I am just not really clear on the role JPMorgan has in a healthy and functioning economy, whether it is making billions in high-stakes gambling or losing billions in high-stakes gambling. It seems like America was actually doing pretty well with there not being any such thing as credit-default swaps, which JPMorgan invented, in the 1990s, right before investment banks were allowed to merge with retail banks and do whatever they wanted with everyone's money.
I'd also like Mr. Dimon to have to explain whether he knew he was about to have to admit to losing billions of dollars when, on May 3, he complained about the "discrimination" faced by bankers. Dimon also argued a few days later that the economy would've added twice as many jobs in the last 24 months if it weren't for a "constant attack on business" from various unnamed hippies and government bureaucrats. I would like to know how many jobs were created when JPMorgan accidentally lost some unknown amount of money that is likely to end up being more than $2 billion? Also did Dimon lie during his first-quarter earnings call last month, or did he have no idea what sort of things his chief investment office was up to (even after their actions were reported in the press)? If he didn't have any idea, shouldn't he maybe step down to run a smaller bank, where he can keep a closer eye on everything? Dimon said initially that the stuff that lost all the money wouldn't have violated the Volcker Rule, even though it plainly violates the spirit of the Volcker Rule but also he's not sure if the bank broke any laws? Jamie, I think maybe you should consider retirement; this bank is too complicated for you.
Dimon gets so defensive when people trash banks and bankers because he thinks his bank makes the world a better place. He thinks that JPMorgan making as much money for itself as possible is good for everyone, because capitalism. Much as today's super-rich, the .01 percent who are largely CEOs and financial industry professionals, are a bunch of rentiers who've convinced themselves that they are job-creating titans of industry, Dimon has convinced himself that his firm is making our economy function better instead of just playing incredibly complex computer games with unimaginable sums of other people's money.
So let's haul him before a judge (I would be fine with Judge Judy) and ask him to explain, without jargon, what positive role JPMorgan plays for the American and world economies that a few much smaller, less leveraged firms couldn't also play while not being at risk of losing billions of dollars by accident in a "hedge" and sending world markets reeling.
Advertisement:
I mean, I'm sure he'd never admit to any sort of culpability for our current morass (it's the gubmint's fault!) because he clearly believes his own bullshit and he's never faced any sort of serious challenge to his viewpoint, but it still might be very good television. |
/**
* Records all the changes made prior to this call to a single chunk
* with supplied hash.
* Later those updates could be either persisted to backing Source (deletes only)
* or reverted from the backing Source (inserts only)
*/
public synchronized Update commitUpdates(byte[] updateHash) {
currentUpdate.updateHash = updateHash;
journal.put(updateHash, currentUpdate);
Update committed = currentUpdate;
currentUpdate = new Update();
return committed;
} |
Hematomyelia with arteriovenous malformation of the cord: successful surgical treatment. To the Editor. The most common consequence of these embryologic abnormalities is gradual progression from paraparesis to paraplegia. 1 Less common is the acute onset of hematomyelia, thrombosis of the malformation, or subarachnoid hemorrhage with associated deficits in function. Report of a Case. A 6-year-old boy had progressive thoracic back pain of one month's duration, with an acute spastic paraparesis. Mental status, cranial nerve function, coordination of his arms and anal tone were normal. There was impairment to light touch and proprioception in the legs. Myelography showed a complete obstruction at the T-6 level due to an intramedullary mass lesion with dilated and tortuous vessels. The spinal fluid was discolored but not xanthochromic, acellular, with a protein content of 500 mg/dl and a glucose level of 52 mg/dl. At operation, distended tortuous vessels were seen between T-9 and T-12 typical of an arteriovenous malformation (AVM) of the spinal cord. At |
Mathematical Distinction in Action Potential between Primo-Vessels and Smooth Muscle We studied the action potential of Primo-vessels in rats to determine the electrophysiological characteristics of these structures. We introduced a mathematical analysis method, a normalized Fourier transform that displays the sine and cosine components separately, to compare the action potentials of Primo-vessels with those for the smooth muscle. We found that Primo-vessels generated two types of action potential pulses that differed from those of smooth muscle: Type I pulse had rapid depolarizing and repolarizing phases, and Type II pulse had a rapid depolarizing phase and a gradually slowing repolarizing phase. Introduction Acupuncture has been an important part of oriental medicine for thousands of years. However, due to the lack of anatomical study of meridians and the lack of scientific proof of the existence of Qi, the nature of oriental medicine is controversial. Many researchers have studied meridians, acupuncture points, and Qi circulation. However, the results of these studies have also been disputed because they were limited in topology and/or have not been repeated often. Kim published his findings on the substance of meridians in the early 1960s. He reported that meridians made up a new system in the living body, different from both the nervous system and the blood or lymphatic vessels. Unfortunately, he did not disclose the staining materials or methods used to observe the claimed structures; therefore, interest in such studies has declined over the past 40 years. Recently, certain researchers have become interested in Primo-vascular system (the scientific name for Bonghan system) and have tried to investigate Primo-vascular system by finding Primo-node (Bonghan corpuscle) and Primovessels (Bonghan ducts). It was too difficult to study the functions of Primo-vessels directly because of their small size. Therefore, more research based on electrophysiology was needed, for example, action potential measurements. It is well known that tissues have different action potentials depending on their structure and function. Thus, the function of a tissue can be inferred by analyzing its action potential. The study presented herein was a comparison of the action potentials generated by Primo-vessels with the pacemaker potential, made by smooth muscle from the small intestine. We also introduced a mathematical analysis method, a normalized Fourier transform that is more useful for viewing the waveform and phase than the power spectrum from a general Fourier transform. Animals and Tissue Preparation. Male 7-week-old Sprague-Dawley rats weighing 250-320 g were used. The rats were anesthetized with an injection of 1.5 g/kg urethane (C 3 H 7 NO 2 ) into the femoral region, and the entire surgical procedure was performed with the rat in the anesthetized state. A midline abdominal incision was made, and the internal organs were exposed. Smooth muscle from the small intestine and the small intestine surface Primo-vessels were removed from the rats and placed on Sylgard. Primo-vessels Figure 1: The pacemaker potential waves from smooth muscle in small intestine. The pulses rose fast and decreased gradually before falling to the rest potential. The pulses were generated periodically and had uniform amplitude. Equipment. Tissue preparation was viewed under a microscope (SMZ1500, Nikon, Japan). Light was supplied by a Fiber-Lite (MI-150, Dolan Jenner Industries, MA). Another microscope (SZ61, Olympus, Japan) was used for insertion of electrode (0.002 bare tungsten wire, A-M Systems, WA) to tissue. Data were acquired by a data acquisition system (PowerLab/16SP, ADInstruments, CO) and amplified by Bio Amp (ML131, ADInstruments, CO). Data acquisition program (LabChart 6, ADInstruments, CO) was used to record. Data were analyzed with Microsoft Excel 2010 (Microsoft, WA). Extracellular Recording. An electrode was placed in the tissue on Sylgard. The tissue was perfused with Kreb's solution at a constant flow rate of about 5 mL/min. Kreb's solution contained (in mM) 10.10 D-glucose, 115.48 NaCl, 21.90 NaHCO 3, 4.61 KCl, 1.14 NaH 2 PO 4, 2.50 CaCl 2, and 1.16 MgSO 4. This solution had pH 7.4 at 36 C. The temperature of the solution in the organ bath was maintained at 36∼38 C. Electrical responses were amplified, low pass filtered (50 Hz), and recorded (time interval: 0.0005 sec) on a computer. The laboratory was isolated from electromagnetic noise by Faraday cage. Analysis. The whole action potential pulses recorded from the smooth muscles and Primo-vessels were each extracted separately. All pulses were differentiated by time. For normalizing, the depolarizing and repolarizing sections of each pulse were selected. Amplitude and time were rescaled to have value from 0 to 1; this ensured that every pulse had the same size on the x-axis and y-axis for a comparison of only the pulse shape. To distinguish the waveform, normalized pulses were Fourier transformed, and the coefficients for the sine and cosine components were displayed separately. The coefficients for the sine components were dotted on the negative x-axis and those for the cosine components were dotted on the positive x-axis. The coefficients were derived using a Fourier transform, as shown in: The following is the inverse normalized Fourier transform: f : integer, sign f : In this study, the Fourier transform was performed in a 0-10 frequency range. Additionally, the amplitude, the FW (full width, the time from depolarization back to repolarization at the rest potential), and t max (the time from the rest potential to the maximum potential) were calculated. Results We identified action potential waves in the smooth muscle called the pacemaker potentials. These waves had a rapid rising phase followed by a plateau component with monotonically declining amplitude. Figure 1 shows some of the pacemaker pulses from the smooth muscle. These pulses were generated periodically having frequency of 17.7 ± 5.0/min. Also, there is uniform amplitude in these pulses. On the other hand, different types of potential waves were found in Primo-vessels. Figure 2 shows some of the action potential waves from Primo-vessels. These pulses differed from those of smooth muscle in their fast rise and fall as well as their larger amplitude. The pulses were generated aperiodically and amplitude was irregular. Ninety-one pulses from smooth muscle and 180 pulses from the Primo-vessels were extracted. Figure 3 shows a representative pacemaker pulse and its derivative. The mean amplitude of these pulses was 4.45 ± 3.02 mV, and it took 0.39 ± 0.16 s to rise to the maximum potential and 1.83 ± 0.90 s to return to the rest potential ( Table 1). The derivative had a shape with short, sharp positive and long, flat negative. There were some different two types of pulse in records from Primo-vessels. Figure 4 shows representative pulses of the two types generated in Primo-vessels. Type I pulses had mean amplitude of 10.02 ± 8.36 mV, and it took 0.31 ± 0.10 s to rise to Table 1: Amplitude, FW, and t max of the action potentials from smooth muscle and Primo-vessels. The amplitude means the difference between the maximum potential and the rest potential. The FW means the time from depolarizing to repolarizing to the rest potential. The t max means time that is taken to arrive at the maximum potential. The amplitude of the action potential from Primo-vessels was larger than that from smooth muscle. It took similar time for depolarizing of all types of pulses including pacemaker, but their repolarizing time varied. Action potential from Primo-vessel V (mV) Figure 2: The action potential waves from Primo-vessel. The pulses rose fast and fell to the rest potential immediately. The pulses were generated aperiodically having irregular amplitude. The amplitude of these pulses was larger than those of smooth muscle. the maximum potential and 0.88 ± 0.38 s to return to the rest potential. The derivative of this type had a shape with short, sharp positive and negative. Type II pulses had mean amplitude of 13.67 ± 8.69 mV, and it took 0.38 ± 0.15 s to rise to a maximum potential and 2.75 ± 1.17 s to return to the rest potential. The derivative of this type had a shape with short, sharp positive and broad, hill-like negative. This shape was similar to the shape of pacemaker, but both of the two patterns were clearly different. The derivative of pacemaker pulse had flat and not decreasing negative value; however, that of Type II did not have flat but decreasing negative value. For the detailed comparison of the shape of the action potential pulses from smooth muscle and Primo-vessels, all pulses were normalized and Fourier transformed at the frequency range of 0 to 10. Figure 5 shows the results of a normalized Fourier transform for the pulses from smooth muscle and for the two types of pulses from Primo-vessels. For the result from smooth muscle, the first sine and cosine components were dominant with a slight superiority of the sine component. The Type I pulses had the same dominant components, but the cosine component was slightly larger than the sine component. On the other hand, for the result of the Type II pulses, only the first sine component was dominant. Power spectrum of three types of pulses had same pattern and values. Discussion In this study, we investigated the mathematical difference between the action potentials of the smooth muscle and Primo-vessels. In the results from the smooth muscle, we found the periodic pulses with uniform amplitude. This result is similar to that of the study by Kito and Suzuki. This similarity demonstrates that extracellular recording is reliable and repeatable. Though extracellular recording has inaccuracy in amplitude and rest potential, it supports enough information to study about periodic pattern and waveform of action potential. Therefore, we studied the action potential of Primo-vessels by extracellular recording to determine their electrophysiological characteristics. Based on the Primo-vessel pulse results, it seemed that there was no severe periodic repetition and that the amplitude had a large variation. This result indicates that Primo-vessels may not act periodically and that the intensity of the action is not uniform. Aperiodic pattern and varying amplitude can be shown also in the study by Choi et al.. In addition, the derivatives of the pulses for smooth muscle and Primo-vessels had different patterns in between. The pulses from the smooth muscle had rapid depolarization phase and consistently slow repolarization phase. However, the pulses from the Primo-vessels had two types of derivative patterns. Type I pattern demonstrated that depolarization and repolarization were fast. Type II pattern signified that depolarization is rapid and that repolarization started rapidly Figure 4: Representative traces for the two types of action potential pulses from Primo-vessels and their derivatives. The derivative of Type I pulse had a shape with short, sharp positive and negative within depolarizing from the rest potential and repolarizing to the rest potential. For the Type II, the derivative consisted of short, sharp positive and broad, hill-like negative. There was no significant difference in amplitude of these two types, but huge difference existed in FW. but slowed gradually. These phenomena are shown by the FW and t max values. The t max for the three types were short suggesting that depolarization was fast. The FW values varied greatly, indicating that the repolarization velocities were different for each type of pulse. It suggests that Primo-vessels have at least two types of cells generating action potential. For a more analytical comparison, all pulses were normalized and Fourier transformed. The dominant coefficient distribution implies that frequency density was maximal at 1 in the three pulses, although their phases were different. With respect to the characteristics of the sine and cosine waves, the maximum amplitude of the sine wave leaned toward the side, but the maximum amplitude of the cosine wave was located in the center. For the pulses from the smooth muscle, the sine component was slightly larger than the cosine component. In contrast, for the Type I pulse, the cosine component was slightly larger than the sine component. These observations indicate that the pulses from the smooth muscle had an asymmetrical structure that leaned toward the left and that the Type I pulses had a more symmetrical structure. For the pacemaker pulse, faster depolarization than repolarization causes the pulse to lean toward the left, and a slow repolarization pulse maintains a potential higher than half of the amplitude in the middle of the FW. On the other hand, the symmetry of the fast depolarization and repolarization generates a dominant cosine component, and the slight lean toward the left and the asymmetry of the curvature creates a dominant sine component that is slightly smaller in Type I pulse. However, only the first sine component was dominant for the Type II pulses. The dominance of the sine component implies that depolarization is faster than repolarization, as for smooth muscle. The lack of a cosine component suggests that repolarization started rapidly, and thus the potential went down to under half of the amplitude in the middle of the FW, and then the repolarization slowed gradually. The larger second sine component in Type II pulses indicates that the pulses leaned more toward the left. We also compared power spectrum of three types of pulses. Power spectrum of three types of pulses had same pattern and values. Judging from the results of power spectrum, it was identified that the action potentials of smooth muscle and Primo-vessels were not distinguished by power spectrum since power spectrum provided fragmentary information, only frequency density. Evidence-Based Complementary and Alternative Medicine Therefore, the normalized Fourier transform serves as a more sophisticated criterion for pulse distinction in comparison with power spectrum. Conclusion We found that Primo-vessels generated different types of the action potentials from smooth muscle located nearby using a simple measurement of the FW, the pulse derivatives, and a normalized Fourier transform. There were two types of pulses generated by the Primo-vessels: Type I pulses had fast depolarizing and repolarizing phases, and Type II pulses had a fast depolarizing phase and gradually slowing repolarizing phase. The sharp top and larger amplitude of the pulses generated by Primo-vessels could distinguish them from the pulses generated by smooth muscle; thus, it is possible to assume that Primo-vessels perform a different function from the smooth muscle. For confirmation of this hypothesis, further study is needed regarding the physiological mechanism responsible for generating these pulses and regarding which ion channels are used. |
JAKARTA — Indonesia’s new anti-narcotics chief Heru Winarko called for an expansion of rehabilitation centers across the country on Wednesday, flagging a new approach in contrast to the blood-soaked war on drugs underway in its neighbor, the Philippines.
More users, addicts and even minor dealers would be diverted into centers run by medical professionals and counselors rather than heading straight into an over-crowded prison system, Winarko told Reuters in an interview.
Winarko took over as head of Indonesia’s anti-narcotics agency in March, replacing Budi Waseso, a former top police officer who advocated surrounding prisons with moats filled with crocodiles and piranhas to stop drug convicts escaping.
Rather than wildlife, Winarko said he planned to set up rehabilitation facilities near prisons.
“It is better if there is a rehabilitation center located close to a prison,” he said, noting that a former mental hospital near a correctional facility in Bali was being converted into a center for offenders to tackle addiction.
Indonesia’s president, Joko Widodo, has long warned that the country was gripped by a “drugs emergency” amid assertions by officials – challenged by some experts – that there were more than 6 million users.
Widodo has said drugs posed a bigger danger than Islamist militancy and he intensified a drugs war that has included the execution of drug traffickers, including some foreigners.
Winarko said there needed to be rapid growth in assessment centers which determine if drug convicts would benefit from therapy rather than incarceration.
The country’s 127 rehabilitation centers were inadequate for a population of 250 million, and more should be built and existing facilities better integrated, he said.
David McRea, a researcher from the University of Melbourne, said Winarko’s enthusiasm for rehabilitation needed to be treated cautiously.
Indonesia’s criminal justice system already allowed for some offenders to be rehabilitated but the option was rarely used.
“For years, there’s been talk in Indonesia of a shift to rehabilitate people but people are still being sentenced to prison for petty drug crimes,” he said.
Methamphetamine, known as shabu, is the most popular drug, according to Winarko. More than two tonnes of methamphetamine was seized off the coast of Sumatra island in February in two separate, record busts.
Law enforcement officials would maintain their “stern”” approach to traffickers and their “shoot to kill” policy if suspects were armed and resisted arrest, said Winarko.
But he added Indonesia would not mimic the violent policies of President Rodrigo Duterte of the Philippines, who was praised by his predecessor, Waseso.
“We have our own standard operating procedures,” he said.
More than 4,100 people have died during police anti-narcotics operations in the Philippines since July 2016. Another 2,300 have been killed by unidentified gunmen.
Philippines authorities say their actions are lawful and the deaths occur when suspects threaten police.
However, human rights groups and U.N. officials have accused Philippine anti-drugs agents of extrajudicial killings. Police deny that.
According to Amnesty International, Indonesian police killed 98 drug suspects in 2017, up from 18 the previous year. It said the deaths were rarely investigated.
McRea said the trend of rising drug-related slayings continued in Indonesia this year and was “disturbing”. |
// HandleHostEvent handles host event.
func (in *Handler) HandleHostEvent(event genericStorage.WatchEvent) {
defer in.logger.Sync()
host := genericStorage.NewHost()
err := event.Unmarshal(host)
if err != nil {
in.logger.Errorf("Received host event seems to be invalid: %v", err)
return
}
in.sendJob(host, false)
} |
Microbial diversity in biofilm infections of the urinary tract with the use of sonication techniques. Infections of the urinary tract account for >40% of nosocomial infections; most of these are infections in catheterized patients. Bacterial colonization of the urinary tract and catheters causes not only the particular infection but also a number of complications, for example blockage of catheters with crystallic deposits of bacterial origin, generation of gravels and pyelonephritis. Infections of urinary catheters are only rarely single-species infections. The longer a patient is catheterized, the higher the diversity of biofilm microbial communities. The aims of this study were to investigate the microbial diversity on the catheters and to compare the ability to form biofilm among isolated microbial species. The next aim was to discriminate particular causative agents of infections of the urinary tract and their importance as biofilm formers in the microbial community on the urinary catheter. We examined catheters from 535 patients and isolated 1555 strains of microorganisms. Most of the catheters were infected by three or more microorganisms; only 12.5% showed monomicrobial infection. Among the microorganisms isolated from the urinary catheters, there were significant differences in biofilm-forming ability, and we therefore conclude that some microbial species have greater potential to cause a biofilm-based infection, whereas others can be only passive members of the biofilm community. |
<reponame>ShinShil/spovm
#pragma once
#include "fileObject.hpp"
class FileUser : public FileObject {
public:
virtual string getPath();
virtual string getName();
virtual string getType();
virtual string getContent();
} |
Secure Data Deduplication With Reliable Key Management for Dynamic Updates in CPSS With the increasing sensing and communication in cyber physical social system (CPSS), the data volume is growing much rapidly in recent years. Secure deduplication has attracted considerable interests of storage provider for data management efficiency and data privacy preserving. One of the most challenging issues in secure deduplication is how to manage data and the convergent key when users frequently update it. To solve this problem, D. Koo et al. use bilinear paring as the key method. However, bilinear paring requires high computation cost for implementations. In this paper, we propose a session-key-based convergent key management scheme, named SKC, to secure the dynamic update in the data deduplication. Specifically, each data owner in SKC can verify the correctness of the session key and dynamically change it with the data update. Furthermore, to enable group combination and remove the aid of gateway (GW), a convergent key sharing scheme, named CKS, is presented. Security analysis demonstrates that both SKC and CKS can protect the confidentiality of the data and the convergent key in the case of dynamic updates. The simulation results show that our SKC and CKS can significantly reduce computation complexity and communication during the data uploading phase. |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "esp_system.h"
void set_keyboard_visible(bool visible);
void mouse_on_keyboard_event(int x, int y, int button);
|
/// Save the usage statistics to the given file
///
/// @param filename The file to save to. If NULL, save to the file that
/// was loaded from when `stats_load()' is called.
void stats_save(const char* filename) {
FILE *file;
int rc;
if (filename == NULL) {
KP_ASSERT(m_stats_file != NULL);
filename = m_stats_file;
}
file = fopen(filename, "w+");
if (file == NULL) {
KP_LOG_ERROR("failed to open stats file %s: %s", filename, strerror(errno));
return;
}
rc = stats_write(file);
if (rc < 0) {
KP_LOG_ERROR("failed to write to stats.json: %s", strerror(errno));
}
fflush(file);
fclose(file);
} |
The Ontolingua Server: a tool for collaborative ontology construction Reusable ontologies are becoming increasingly important for tasks such as information integration, knowledge-level interoperation and knowledge-base development. We have developed a set of tools and services to support the process of achieving consensus on commonly shared ontologies by geographically distributed groups. These tools make use of the World Wide Web to enable wide access and provide users with the ability to publish, browse, create and edit ontologies stored on anontology server. Users can quickly assemble a new ontology from a library of modules. We discuss how our system was constructed, how it exploits existing protocols and browsing tools, and our experience supporting hundreds of users. We describe applications using our tools to achieve consensus on ontologies and to integrate information.The Ontolingua Server may be accessed through the URLhttp://ontolingua.stanford.edu |
The present disclosure relates generally to the field of aviation. Specifically, the present disclosure relates to a system and method for runway identification via a radar receiver.
Airplanes sometimes land short, land long, enter the wrong runway, enter an active runway, and/or enter a runway with hazardous conditions. A runway has certain characteristics that are unique to a particular runway. These characteristics may be runway length, width, starting position, ending position and runway-end-warning distance. An airplane may enter a runway short because the airplane landed before the runway-starting position. An airplane may enter a runway long because the airplane landed too far from the runway-starting position. An airplane may enter the wrong runway because of a miscommunication between the aircrew and the tower.
A runway identification system may be used to improve situational awareness which may reduce pilot workload to allow the aircrews to avoid mistakes, such as landing short, landing long, entering an active runway, entering the wrong runway, and/or entering a runway with hazardous conditions. A system that is configured to provide runway identification details, which could be utilized to provide warning signals based on the airplane potentially landing short, landing long, entering the wrong runway, entering an active runway, and/or entering a runway with hazardous conditions would be advantageous. The system is configured to provide warning signals, which could reduce the likelihood of any of these situations from occurring.
What is needed is a runway identification system configured to provide sufficient runway identification details to allow the aircrew to more effectively determine the appropriate course of action in an aircraft landing situation.
It would be desirable to provide a system and/or method that provides one or more of these or other advantageous features. Other features and advantages will be made apparent from the present specification. The teachings disclosed extend to those embodiments which fall within the scope of the appended claims, regardless of whether they accomplish one or more of the aforementioned needs. |
Radio Frequency Interference Due to Power Plane Radiation and Mitigation Using RFI and PI Co-Optimized Design in Mobile Platforms This papers main focus is to study the noise radiation risk from motherboard power planes, including the mechanism of power plane radiation. A design for a power plane that is optimized for radio frequency interference (RFI) and power integrity (PI) is studied and simulation and measurement results are presented. This design has been proposed to reduce the level of RFI radiated from the power plane to the nearby antennas. |
<reponame>BlackFairy/PMQ-MCAPI<filename>include/pmq_layer.h
//This module acts as a layer between the actual POSIX-calls and other modules
#ifndef PMQ_LAYER_H
#define PMQ_LAYER_H
#include <mcapi.h>
#include <mqueue.h>
void givewals( unsigned long* before, unsigned long* after );
//sends a message via posix message queue
//mqd_t msgq_id: the identifier of the receiving queue
//void* buffer: the buffer containing the message
//size_t buffer_size: the size of the message within buffer
//mcapi_priority_t priority: the priority, ascending
//mcapi_timeout_t timeout: the timeout in milliseconds
//if set to MCAPI_TIMEOUT_INFINITE, there is no timeout
//RETURNS MCAPI_SUCCESS on success, else error or timeout
inline mcapi_status_t pmq_send(
mqd_t msgq_id,
void* buffer,
size_t buffer_size,
mcapi_priority_t priority,
mcapi_timeout_t timeout );
//receives a message via posix message queue
//mqd_t msgq_id: the identifier of the receiving queue
//void* buffer: the buffer containing the message
//size_t buffer_size: the size of the buffer for message
//size_t* received_size: the actual received size
//mcapi_priority_t priority*: the priority, ascending
//mcapi_timeout_t timeout: the timeout in milliseconds
//if set to MCAPI_TIMEOUT_INFINITE, there is no timeout
//RETURNS MCAPI_SUCCESS on success, else error or timeout
inline mcapi_status_t pmq_recv(
mqd_t msgq_id,
void* buffer,
size_t buffer_size,
size_t* received_size,
mcapi_priority_t* priority,
mcapi_timeout_t timeout );
//checks if there is any messages in queue
//mqd_t msgq_id: the identifier of the receiving queue
//mcapi_status_t* mcapi_status: MCAPI_SUCCESS on success,
//else MCAPI_ERR_GENERAL
//RETURNS count of messages, or MCAPI_NULL on failure
inline mcapi_uint_t pmq_avail(
mqd_t msgq_id,
mcapi_status_t* mcapi_status );
//creates message queue for the given local endpoint
//RETURNS MCAPI_SUCCESS on success, else error
inline mcapi_status_t pmq_create_epd(
mcapi_endpoint_t endpoint );
//sets message queue for the given remote endpoint
//mcapi_timeout_t timeout: the timeout in milliseconds
//if set to MCAPI_TIMEOUT_INFINITE, there is no timeout
//RETURNS MCAPI_SUCCESS on success, else error or timeout
inline mcapi_status_t pmq_open_epd(
mcapi_endpoint_t endpoint,
mcapi_timeout_t timeout );
//destroys the given local endpoint
inline void pmq_delete_epd(
mcapi_endpoint_t endpoint );
//opens channel message queue for the given local endpoint
//sending and receiving ends have their own functions for this
//RETURNS MCAPI_TRUE on success or MCAPI_FALSE on failure
inline mcapi_boolean_t pmq_open_chan_recv( mcapi_endpoint_t us );
inline mcapi_boolean_t pmq_open_chan_send( mcapi_endpoint_t us );
//destroys the channel message queue of the given local endpoint
//unlinks only if parameter unlink is MCAPI_TRUE
inline void pmq_delete_chan(
mcapi_endpoint_t endpoint,
mcapi_boolean_t unlink );
#endif
|
Organizing the Un-Organized? The Rise, Recession and Revival of Indian Diamond Industry The Indian diamond industry thrives in the atmosphere of secrecy and informality that envelops the diamond trade and has for long been labeled as an unorganized sector of the economy. However, it resembles a close-knit community composed of thousands of small, medium and large sized CPD ( cut and polished diamonds) units and has grown to become one of the highest foreign exchange earners for the country. The industry exports cut and polished diamonds worth US $ 14 billion annually and enjoys a 95 % market share of the global exports of cut and polished diamond pieces. An in-depth study of the industry reveals that the so called unorganized sector is in fact highly organized and has great potential to offer useful insights to the field of management in terms of new forms of organizing, networking, business processing and for doing international business. This paper presents summary of findings from research conducted in the Indian diamond industry over a period of last four years. Part I includes insights about the remarkable rise, growth and the unique working of the industry. Part II makes use of a case study of a 40 years old large- sized CPD unit to help gain further understanding of the Indian diamond industry. Part III is about the impact of the 2008 global turmoil and of the industrys revival after a severe recession. The analysis of findings and implications for future research have been discussed. |
Results in patients with breast cancer treated by radical mastectomy and postoperative irradiation with no adjuvant chemotherapy In 1963 an electron beam became available, making irradiation of the chest wall technically easy. In addition to peripheral lymphatic irradiation in patients with positive axillary nodes and/or the tumor in the inner quadrants or centrally located, patients with tumor larger than 5 cm or with grave signs and/or a significant incidence of positive axillary nodes received chest wall irradiation. None of the patients has received elective chemotherapy. Diseasefree survival rates at ten years are 54% for the overall group, 79% for the patients with negative nodes, 44% for patients with positive nodes, 61% for patients with 13 positive nodes, and 33% for patients with four or more positive nodes. The incidence of peripheral lymphatic failures is low as well as the incidence of failures on the chest wall in the patients having had chest wall irradiation. With the availability of electron beam and adjustments in doses, complications are nonexistent. The incidence of treatment failures, localregional, or distant, that have appeared by ten years are compared with the incidence of failures that were experienced by the placebo patients in the clinical trial of the NSABP of thioTEPA versus placebo. The clearly lesser incidence of treatment failures in the U.T.M.D. Anderson Hospital patients either suggests that postoperative irradiation may have survival benefits or that the data of the NSABP series are not representative of all series. |
<filename>server-core/src/main/java/io/onedev/server/web/component/user/gpgkey/GpgKeyCssResourceReference.java<gh_stars>1-10
package io.onedev.server.web.component.user.gpgkey;
import io.onedev.server.web.page.base.BaseDependentCssResourceReference;
public class GpgKeyCssResourceReference extends BaseDependentCssResourceReference {
private static final long serialVersionUID = 1L;
public GpgKeyCssResourceReference() {
super(GpgKeyCssResourceReference.class, "gpg-key.css");
}
}
|
Entanglement density, macromolecular orientation, and their effect on elastic strain recovery of polyolefin films For amorphous polymers, restoring forces are generated by the progressive orientation of the macromolecular chains in the stretching direction leading to a decrease in the system entropy. Orienting the chains in the future stretching direction thus reduces the entropy variation induced by the stretching and limits the entropic restoring force magnitude. Entropic restoring forces created during stretching have been correlated to the number of junction points by previous studies. Reducing the entanglement density (i.e., the number of junction points) is supposed to limit the entropic restoring force magnitude. In this study, the influence of blend ratio of low molecular weight wax and orientation level on the mechanical properties of the thin films, especially the elastic recovery, were evaluated. Elastic energy strain recovery was calculated from hysteresis curve obtained during 60% loading (stretch) and unloading (recovery) cycle and compared to rheological and orientation measurement. It has been shown that a decrease in entanglement density can minimize elastic recovery, Nevertheless, a compromise must be found, in order to limit the permanent deformation caused by chain flow. Macromolecular orientation is also a way to adjust the film mechanical properties. A LDPE 3 3 biaxial orientation leads to a 25% reduction in transversal direction elastic recovery (compared to MDO cast film) without altering machine direction mechanical behavior. However, for ethylene vinyl acetate, the uniaxial macromolecular orientation seems to impact the film behavior in the transverse direction by causing a smaller inter-atom distance, favoring a higher bond strength. The latter acts as transient physical nodes, increasing entropic restoring forces. |
<filename>2016season/TurtleBot/src/com/team1458/turtleshell/pid/TurtleStraightDrivePID.java
package com.team1458.turtleshell.pid;
import com.team1458.turtleshell.logging.TurtleLogger;
import com.team1458.turtleshell.util.MotorValue;
import com.team1458.turtleshell.util.Output;
import com.team1458.turtleshell.util.TurtleMaths;
/**
* Class used drive the robot in a straight line
*
* @author mehnadnerd
*
*/
public class TurtleStraightDrivePID implements TurtleDualPID {
private final TurtlePID lPID;
private final TurtlePID rPID;
private final double kLR;
private double lDist;
private double rDist;
private double lRate;
private double rRate;
/**
* Constructs a new TurtleStraightDrivePID
*
* @param kP
* @param kD
* @param kDD
* @param target
* @param kLR
*/
public TurtleStraightDrivePID(TurtlePIDConstants constants, double target, double kLR, double kError) {
Output.outputNumber("targetLinear", target);
lPID = new TurtlePDD2(constants, target, kError);
rPID = new TurtlePDD2(constants, target, kError);
this.kLR = kLR;
}
@Override
public boolean atTarget() {
return lPID.atTarget() && rPID.atTarget() && TurtleMaths.absDiff(lDist, rDist) < 20;
}
/**
*
* @param inputs
* Left Encoder, Right Encoder, LeftEncoder Rate, Right Encoder
* Rate
* @return Left Motor Value, Right Motor Value
*/
@Override
public MotorValue[] newValue(double[] inputs) {
Output.outputNumber("lDist", inputs[0]);
Output.outputNumber("rDist", inputs[1]);
TurtleLogger.info("lDist: "+inputs[0]);
TurtleLogger.info("rDist: "+inputs[1]);
lDist = inputs[0];
rDist = inputs[1];
lRate = inputs[2];
rRate = inputs[3];
double leftRaw = lPID.newValue(new double[] { lDist, lRate }).getValue();
double rightRaw = rPID.newValue(new double[] { rDist, rRate }).getValue();
double lrDelta = (lDist - rDist);
TurtleLogger.info("LeftRaw: " + leftRaw);
TurtleLogger.info("Right raw: " + rightRaw);
TurtleLogger.info("lrDelta: " + lrDelta);
return new MotorValue[] { new MotorValue(1.0 * (leftRaw - kLR * lrDelta)), new MotorValue(1.0 * (rightRaw + kLR * lrDelta)) };
}
}
|
/** Display the statistics or histogram. */
public void displayStatistics(Shape shape, boolean b) {
PlanarImage img = JAI.create("extrema", source, null);
double[] maximum = (double[])img.getProperty("maximum");
double maxValue = ((int)(maximum[0] + 255)/256) * 256.0;
Shape roi = transformOnROI(shape);
ParameterBlock pb = (new ParameterBlock()).addSource(source);
pb.add(new ROIShape(roi)).add(1).add(1).add(new int[]{256});
pb.add(new double[]{0.0}).add(new double[] {maxValue});
PlanarImage dst = JAI.create("histogram", pb);
Histogram h = (Histogram)dst.getProperty("hiStOgRam");
JFrame frame = new HistogramFrame(h, b, lut, physicalROI(shape));
Dimension size = frame.getSize();
Dimension screenSize =
MedicalApp.getInstance().getToolkit().getScreenSize();
frame.setBounds(screenSize.width/4, screenSize.height/4,
screenSize.width/2, screenSize.height/2);
frame.show();
frame.pack();
} |
<filename>Source/BMWeexExtension/BMInputView.h
//
// BMInputView.h
// BM-JYT
//
// Created by 窦静轩 on 2017/3/11.
// Copyright © 2017年 XHY. All rights reserved.
//
#import <UIKit/UIKit.h>
@class BMInputView;
typedef NS_ENUM(NSInteger, BMInputTextType) {
BMInputIDCardType, //默认从0开始
BMInputOtherType
};
@interface BMInputView : UIView
-(instancetype)initWithInputType:(BMInputTextType)type;
@property (nonatomic,assign)UITextField * textFiled;
@end
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.